Commit afffde98 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

Remove needless file patches/dumux-m4.patch

It was for compatibilty with Dune 2.2 which is no longer supported.
(reviewed by becker)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14479 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent a32aac32
Index: m4/dumux.m4
===================================================================
--- m4/dumux.m4 (revision 12534)
+++ m4/dumux.m4 (working copy)
@@ -168,9 +168,9 @@
# DUMUX_CHECK_MODULES(NAME, HEADER, SYMBOL)
#
-# THIS MACRO IS JUST A COPY OF DUNE_CHECK_MODULES (FROM dune-common/m4/dune.m4) WITH
-# THE REQUIREMENT THAT ALL HEADERS MUST RESIDE IN $MODULE_ROOT/dune REMOVED.
-# SEE DUNE FS#987 FOR MORE DETAILS WHY DUNE KEEPS THIS BEHAVOR.
+# THIS MACRO IS JUST A COPY OF DUNE_CHECK_MODULES WITH THE REQUIREMENT THAT ALL
+# HEADERS MUST RESIDE IN $MODULE_ROOT/dune REMOVED. REMOVE THIS MACRO AS SOON AS DUNE
+# DOES NOT FEATURE THIS BUG ANYMORE.
#
# Generic check for dune modules. This macro should not be used directly, but
# in the modules m4/{module}.m4 in the {MODULE}_CHECK_MODULE macro. The
@@ -281,11 +281,15 @@
AC_MSG_ERROR([pkg-config is required for using installed modules])
])
AS_IF(AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]),[
- _dune_cm_CPPFLAGS="`$PKG_CONFIG --cflags _dune_name` -I./" 2>/dev/null
+ _dune_cm_CPPFLAGS="`$PKG_CONFIG --cflags _dune_name`" 2>/dev/null
_DUNE_MODULE[]_ROOT="`$PKG_CONFIG --variable=prefix _dune_name`" 2>/dev/null
_DUNE_MODULE[]_VERSION="`$PKG_CONFIG --modversion _dune_name`" 2>/dev/null
- _DUNE_MODULE[]_LIBDIR=`$PKG_CONFIG --variable=libdir _dune_name 2>/dev/null`
- _dune_cm_LIBS=`$PKG_CONFIG --libs _dune_name 2>/dev/null`
+ _dune_cm_LDFLAGS=""
+ ifelse(_dune_symbol,,
+ [_DUNE_MODULE[]_LIBDIR=""
+ _dune_cm_LIBS=""],
+ [_DUNE_MODULE[]_LIBDIR=`$PKG_CONFIG --variable=libdir _dune_name 2>/dev/null`
+ _dune_cm_LIBS="-L$_DUNE_MODULE[]_LIBDIR -l[]_dune_lib"])
HAVE_[]_DUNE_MODULE=1
AC_MSG_RESULT([global installation in $_DUNE_MODULE[]_ROOT])
],[
@@ -299,7 +303,6 @@
AS_IF([test -d "$with_[]_dune_module"],[
# expand tilde / other stuff
_DUNE_MODULE[]_ROOT=`cd $with_[]_dune_module && pwd`
- _DUNE_MODULE[]_LIBDIR="$_DUNE_MODULE[]_ROOT/lib"
# expand search path (otherwise empty CPPFLAGS)
AS_IF([test -d "$_DUNE_MODULE[]_ROOT/include/dune"],[
@@ -307,18 +310,21 @@
_dune_cm_CPPFLAGS="-I$_DUNE_MODULE[]_ROOT/include"
_DUNE_MODULE[]_BUILDDIR=_DUNE_MODULE[]_ROOT
_DUNE_MODULE[]_VERSION="`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$_DUNE_MODULE[]_ROOT/lib/pkgconfig $PKG_CONFIG --modversion _dune_name`" 2>/dev/null
- _dune_cm_LIBS="-L$_DUNE_MODULE[]_LIBDIR -l[]_dune_lib"
],[
_DUNE_MODULE[]_SRCDIR=$_DUNE_MODULE[]_ROOT
# extract src and build path from Makefile, if found
- AS_IF([test -f $_DUNE_MODULE[]_ROOT/Makefile],[
+ AS_IF([test -f $_DUNE_MODULE[]_ROOT/Makefile],[
_DUNE_MODULE[]_SRCDIR="`sed -ne '/^abs_top_srcdir = /{s/^abs_top_srcdir = //; p;}' $_DUNE_MODULE[]_ROOT/Makefile`"
- ])
+ ])
_dune_cm_CPPFLAGS="-I$_DUNE_MODULE[]_SRCDIR"
_DUNE_MODULE[]_VERSION="`grep Version $_DUNE_MODULE[]_SRCDIR/dune.module | sed -e 's/^Version: *//'`" 2>/dev/null
- # local modules is linked directly via the .la file
- _dune_cm_LIBS="$_DUNE_MODULE[]_LIBDIR[]/lib[]_dune_lib[].la"
])
+ _dune_cm_LDFLAGS=""
+ ifelse(_dune_symbol,,
+ [_DUNE_MODULE[]_LIBDIR=""
+ _dune_cm_LIBS=""],
+ [_DUNE_MODULE[]_LIBDIR="$_DUNE_MODULE[]_ROOT/lib"
+ _dune_cm_LIBS="-L$_DUNE_MODULE[]_LIBDIR -l[]_dune_lib"])
# set expanded module path
with_[]_dune_module="$_DUNE_MODULE[]_ROOT"
HAVE_[]_DUNE_MODULE=1
@@ -330,7 +336,7 @@
])
])
- CPPFLAGS="$ac_save_CPPFLAGS $DUNE_CPPFLAGS_TMP $DUNE_PKG_CPPFLAGS $_dune_cm_CPPFLAGS"
+ CPPFLAGS="$ac_save_CPPFLAGS $DUNE_CPPFLAGS $_dune_cm_CPPFLAGS"
##
## check for an arbitrary header
##
@@ -342,54 +348,50 @@
AC_CHECK_HEADER([[]_dune_header],
[HAVE_[]_DUNE_MODULE=1; DUNE_[]_HEADER_PREFIX=""],
[HAVE_[]_DUNE_MODULE=0])
- ])
+ ])
AS_IF([test "$HAVE_[]_DUNE_MODULE" != "1"],[
AC_MSG_WARN([$_DUNE_MODULE[]_ROOT does not seem to contain a valid _dune_name (dune/[]_dune_header not found)])
])
-
+
##
## check for lib (if lib name was provided)
##
ifelse(_dune_symbol,,
- # clear libs flags and inform the user
- _DUNE_MODULE[]_LIBDIR=""
- _dune_cm_LIBS=""
AC_MSG_NOTICE([_dune_name does not provide libs]),
AS_IF([test "x$enable_dunelibcheck" = "xno"],[
AC_MSG_WARN([library check for _dune_name is disabled. DANGEROUS!])
],[
AS_IF([test "x$HAVE_[]_DUNE_MODULE" = "x1"],[
+
# save current LDFLAGS
ac_save_CXX="$CXX"
- AC_CACHE_CHECK([for lib[]_dune_lib], dune_cv_lib[]_dune_lib, [
- # Use $CXX $DUNE_LDFLAGS as link command, as the latter might
- # contain the -static option to force static linkage
- ac_cxx_ld=`echo $ac_save_CXX | sed -e "s@$CXX@$CXX $DUNE_LDFLAGS_TMP@"`
+ HAVE_[]_DUNE_MODULE=0
- # define LTCXXLINK like it will be defined in the Makefile
- CXX="./libtool --tag=CXX --mode=link $ac_cxx_ld "
+ # define LTCXXLINK like it will be defined in the Makefile
+ CXX="./libtool --tag=CXX --mode=link $ac_save_CXX"
- # use module LDFLAGS
- LDFLAGS="$ac_save_LDFLAGS $DUNE_LDFLAGS_TMP $DUNE_PKG_LDFLAGS $_dune_cm_LDFLAGS"
- LIBS="$_dune_cm_LIBS $DUNE_LIBS_TMP $LIBS"
+ # use module LDFLAGS
+ LDFLAGS="$ac_save_LDFLAGS $DUNE_LDFLAGS $DUNE_PKG_LDFLAGS $_dune_cm_LDFLAGS"
+ LIBS="$_dune_cm_LIBS $DUNE_LIBS $LIBS"
- AC_TRY_LINK(dnl
- [#]include<dune/[]_dune_header>,
- _dune_symbol,
- dune_cv_lib[]_dune_lib=yes,
- dune_cv_lib[]_dune_lib=no)
- ])
+ AC_MSG_CHECKING([for lib[]_dune_lib])
- AS_IF([test "x$dune_cv_lib[]_dune_lib" = "xyes"], [
- HAVE_[]_DUNE_MODULE=1
+ AC_TRY_LINK(dnl
+ [#]include<$DUNE_[]_HEADER_PREFIX/[]_dune_header>,
+ _dune_symbol,
+ [
+ AC_MSG_RESULT([yes])
+ HAVE_[]_DUNE_MODULE=1
],[
- HAVE_[]_DUNE_MODULE=0
- AS_IF([test -n "$_DUNE_MODULE[]_ROOT"],[
- AC_MSG_WARN([$with_[]_dune_module does not seem to contain a valid _dune_name (failed to link with lib[]_dune_lib[].la)])
- ])
- ])
+ AC_MSG_RESULT([no])
+ HAVE_[]_DUNE_MODULE=0
+ AS_IF([test -n "$_DUNE_MODULE[]_ROOT"],[
+ AC_MSG_WARN([$with_[]_dune_module does not seem to contain a valid _dune_name (failed to link with lib[]_dune_lib[].la)])
+ ])
+ ]
+ )
])
# reset variables
@@ -405,9 +407,9 @@
[$_dune_cm_CPPFLAGS], [$_dune_cm_LDFLAGS], [$_dune_cm_LIBS])
# set variables for our modules
- AC_SUBST(_DUNE_MODULE[]_CPPFLAGS, "$_dune_cm_CPPFLAGS")
- AC_SUBST(_DUNE_MODULE[]_LDFLAGS, "$_dune_cm_LDFLAGS")
- AC_SUBST(_DUNE_MODULE[]_LIBS, "$_dune_cm_LIBS")
+ AC_SUBST(_DUNE_MODULE[]_CPPFLAGS, "$_DUNE_MODULE[]_CPPFLAGS")
+ AC_SUBST(_DUNE_MODULE[]_LDFLAGS, "$_DUNE_MODULE[]_LDFLAGS")
+ AC_SUBST(_DUNE_MODULE[]_LIBS, "$_DUNE_MODULE[]_LIBS")
AC_SUBST(_DUNE_MODULE[]_ROOT, "$_DUNE_MODULE[]_ROOT")
ifelse(m4_defn([_dune_symbol]),,
[],
@@ -420,14 +422,8 @@
# set DUNE_* variables
# This should actually be unneccesary, but I'm keeping it in here for now
# for backward compatibility
- DUNE_CPPFLAGS="$DUNE_CPPFLAGS \${_DUNE_MODULE[]_CPPFLAGS}"
- DUNE_LDFLAGS="$DUNE_LDFLAGS \${_DUNE_MODULE[]_LDFLAGS}"
- DUNE_LIBS="\${_DUNE_MODULE[]_LIBS} $DUNE_LIBS"
-
- # the TMP version is used during the checks
- DUNE_CPPFLAGS_TMP="$DUNE_CPPFLAGS_TMP $_DUNE_MODULE[]_CPPFLAGS"
- DUNE_LDFLAGS_TMP="$DUNE_LDFLAGS_TMP $_DUNE_MODULE[]_LDFLAGS"
- DUNE_LIBS_TMP="$_DUNE_MODULE[]_LIBS $DUNE_LIBS_TMP"
+ DUNE_LDFLAGS="$DUNE_LDFLAGS $_DUNE_MODULE[]_LDFLAGS"
+ DUNE_LIBS="$_DUNE_MODULE[]_LIBS $DUNE_LIBS"
# add to global list
# only add my flags other flags are added by other packages
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment