[Dune-devel] Release branch backporting

Oliver Sander sander at igpm.rwth-aachen.de
Mon Nov 18 15:15:00 CET 2013


Hi Markus,
it would help me if this patch made it into the 2.3 release.  In fact I was hoping to
finish it before you branch.
Do you have objections to backporting it?  Under the current policy, who does the
backport?  Do you as the release manager? Do I do it myself?
I actually have two more psurface-related patches that I would like to have in the
release.  They need a bit more work, but I suppose I can do that before the end of
the week.
Thanks,
Oliver


-------- Original-Nachricht --------
Betreff: [Dune-Commit] [Commit] dune-grid - 326c0a9: Search for psurface using pkg-config
Datum: Mon, 18 Nov 2013 14:59:29 +0100
Von: Oliver Sander <sander at igpm.rwth-aachen.de>
Antwort an: dune-devel at dune-project.org
An: dune-commit at dune-project.org

New commit, appeared at Mon Nov 18 14:59:29 2013 +0100
as part of the following ref changes:

    branch refs/heads/master    updated from cdb2e62 -> bf48690

Browsable version: http://cgit.dune-project.org/repositories/dune-grid/commit/?id=326c0a98c5b523e576e841c4f91902605a526d72

======================================================================

commit 326c0a98c5b523e576e841c4f91902605a526d72
Author: Oliver Sander <sander at igpm.rwth-aachen.de>
Date:   Mon Nov 18 14:51:50 2013 +0100

    Search for psurface using pkg-config

    The upcoming psurface version 2.0 will support pkg-config.  This patch changes
    the test for psurface such that it will first look for psurface using pkg-config,
    and if nothing is found, then the old test without pkg-config will be run.
    Hence old and new psurface versions are supported.

    You do need the new version for psurface-2.0, though, because only that one will
    set the proper compiler and linker flags if psurface has been built with
    hdf5 support.

 m4/psurface.m4 | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)



diff --git a/m4/psurface.m4 b/m4/psurface.m4
index 4736d38..14fc25d 100644
--- a/m4/psurface.m4
+++ b/m4/psurface.m4
@@ -39,6 +39,7 @@ AC_DEFUN([DUNE_PATH_PSURFACE],[
 ac_save_LDFLAGS="$LDFLAGS"
 ac_save_CPPFLAGS="$CPPFLAGS"
 ac_save_LIBS="$LIBS"
+ac_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"

 # initialize to sane value
 HAVE_PSURFACE=0
@@ -60,6 +61,26 @@ if test "x$PSURFACEROOT" = x; then
     PSURFACEROOT="/usr/local/psurface"
 fi

+    # Check for psurface using pkg-config
+    # This works for psurface-2.0 and later
+    export PKG_CONFIG_PATH="$PSURFACEROOT/lib/pkgconfig:$PKG_CONFIG_PATH"
+    PKG_CHECK_MODULES([PSURFACE], [psurface], [
+        HAVE_PSURFACE="1"
+        AC_DEFINE(PSURFACE_NAMESPACE,
+                  psurface::,
+                  [The namespace prefix of the psurface library])
+        AC_MSG_RESULT([yes (by pkg-config)])
+    ], [
+        AC_MSG_WARN([PSurface >= 2.0 not found in $PSURFACEROOT])
+    ])
+
+    # PKG_CHECK_MODULES puts the stuff we would expect in PSURFACE_CPPFLAGS
+    # (namely, -I<path>) in PSURFACE_CFLAGS. We therefore copy it by hand.
+    PSURFACE_CPPFLAGS="$PSURFACE_CFLAGS"
+
+# If pkg-config didn't find psurface we may be dealing with an older version
+# of psurface (without pkg-config support).  We try to find that without pkg-config.
+if test x$HAVE_PSURFACE != x1 ; then
 PSURFACE_INCLUDE_PATH="$PSURFACEROOT/include"
 PSURFACE_LIB_PATH="$PSURFACEROOT/lib"
 AS_IF([test -d $PSURFACE_LIB_PATH],
@@ -124,6 +145,9 @@ fi

 AC_LANG_POP([C++])

+## end of the psurface check not using pkg-config
+fi
+
 ## end of psurface check (--without wasn't set)
 fi

@@ -154,6 +178,7 @@ AM_CONDITIONAL(PSURFACE, test x$HAVE_PSURFACE = x1)
 LIBS="$ac_save_LIBS"
 CPPFLAGS="$ac_save_CPPFLAGS"
 LDFLAGS="$ac_save_LDFLAGS"
+PKG_CONFIG_PATH="$ac_save_PKG_CONFIG_PATH"

 DUNE_ADD_SUMMARY_ENTRY([psurface],[$with_psurface])


_______________________________________________
Dune-Commit mailing list
Dune-Commit at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune-commit



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20131118/93011cda/attachment.sig>


More information about the Dune-devel mailing list