aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@fb53df36-e548-4a1e-8150-ab98cbd5e786>2014-11-12 10:37:43 +0000
committerrhaas <rhaas@fb53df36-e548-4a1e-8150-ab98cbd5e786>2014-11-12 10:37:43 +0000
commitd46288e04ad4232e7c5329727826253062cedb78 (patch)
treea2773e0137310446fca5d25825e1cfb0c5133622
parent5a1db31c107a8f43fd474ed37cdadf0e837d00be (diff)
include MPI INC_DIRS and LIB_DIRS in HDF5 variables
wgen using parallel HDF5, hdf5.h will include mpi.h as well as libhdf5 linking to libmpi so we need to ensure that they are found, even when the user of HDF5 does not depend on MPI itself. git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/HDF5/trunk@94 fb53df36-e548-4a1e-8150-ab98cbd5e786
-rw-r--r--configure.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.sh b/configure.sh
index 921b6dc..b5f2f63 100644
--- a/configure.sh
+++ b/configure.sh
@@ -320,6 +320,18 @@ if [ $test_zlib -eq 0 ]; then
fi
fi
+# Check whether we have to link with MPI
+if grep -qe '#define H5_HAVE_PARALLEL 1' ${HDF5_DIR}/include/H5pubconf.h 2> /dev/null; then
+ test_mpi=0
+else
+ test_mpi=1
+fi
+if [ $test_mpi -eq 0 ]; then
+ HDF5_LIB_DIRS="$HDF5_LIB_DIRS $MPI_LIB_DIRS"
+ HDF5_INC_DIRS="$HDF5_INC_DIRS $MPI_INC_DIRS"
+ HDF5_LIBS="$HDF5_LIBS $MPI_LIBS"
+fi
+
# Add the math library which might not be linked by default
if [ $is_windows -eq 0 ]; then
HDF5_LIBS="$HDF5_LIBS m"