Skip to content
Snippets Groups Projects
Commit 0ab6d927 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

[DUNE_ADD_ALL_PKG] Document usage better, and correctly use it in hdf5.m4.

[[Imported from SVN: r6953]]
parent 0d3dbf93
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,9 @@ AS_VAR_SET([$1], ["$_dune_va_tmp"$2])])
# LIBS The libraries to add.
#
# All arguments allow shell substitutions. Each argument should be suitable
# for use inside shell double quotes.
# for use inside shell double quotes. The flags given as argument here should
# not include the flags of dependend libraries that already call
# DUNE_ADD_ALL_PKG themselves; e.g. HDF5 should not add the DUNEMPI* flags.
#
# configure/shell variables:
# ALL_PKG_CPPFLAGS
......
......@@ -204,6 +204,8 @@ AC_DEFUN([DUNE_MPI],[
AC_SUBST(DUNEMPILIBS)
AC_SUBST(MPI_VERSION, $dune_MPI_VERSION)
# NOTE: If you intent to copy-n-paste this line, try to avoid including any
# flags of dependent libraries that call DUNE_ADD_ALL_PKG themselves.
DUNE_ADD_ALL_PKG([MPI], [\${DUNEMPICPPFLAGS}], [\${DUNEMPILDFLAGS}], [\${DUNEMPILIBS}])
AM_CONDITIONAL(MPI, [test "x$with_mpi" != "xno"])
......
......@@ -65,8 +65,11 @@ AC_DEFUN([DUNE_PATH_HDF5],[
CPPFLAGS="$CPPFLAGS $_dune_hdf5_incpath"
nodep_HDF5_CPPFLAGS="$_dune_hdf5_incpath"
HDF5_CPPFLAGS="$_dune_hdf5_incpath"
nodep_HDF5_LDFLAGS=""
HDF5_LDFLAGS=""
nodep_HDF5_LIBS=""
HDF5_LIBS=""
HDF5_PARALLEL=0
# test if we are parallel
......@@ -89,7 +92,10 @@ AC_DEFUN([DUNE_PATH_HDF5],[
# test for lib
if test x$HAVE_HDF5 = x1 ; then
AC_CHECK_LIB([hdf5], [H5open],
[HDF5_LIBS="$_dune_hdf5_libpath -lhdf5 $with_hdf5_libs $HDF5_LIBS"],
[
nodep_HDF5_LIBS="$_dune_hdf5_libpath -lhdf5 $with_hdf5_libs $nodep_HDF5_LIBS"
HDF5_LIBS="$_dune_hdf5_libpath -lhdf5 $with_hdf5_libs $HDF5_LIBS"
],
[HAVE_HDF5=0], ["$with_hdf5_libs"])
fi
......@@ -107,8 +113,11 @@ AC_DEFUN([DUNE_PATH_HDF5],[
fi
else
# clear variables
nodep_HDF5_CPPFLAGS=
HDF5_CPPFLAGS=
nodep_HDF5_LDFLAGS=
HDF5_LDFLAGS=
nodep_HDF5_LIBS=
HDF5_LIBS=
HDF5_PARALLEL=0
fi
......@@ -121,8 +130,8 @@ AC_DEFUN([DUNE_PATH_HDF5],[
AM_CONDITIONAL(HDF5, test x$HAVE_HDF5 = x1)
# add to global list
DUNE_ADD_ALL_PKG([HDF5], [\${HDF5_CPPFLAGS}],
[\${HDF5_LDFLAGS}], [\${HDF5_LIBS}])
DUNE_ADD_ALL_PKG([HDF5], [$nodep_HDF5_CPPFLAGS],
[$nodep_HDF5_LDFLAGS], [$nodep_HDF5_LIBS])
# reset values
LIBS="$ac_save_LIBS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment