[MOAB-dev] r4506 - MOAB/branches/Version4.0/config
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed Feb 16 13:08:25 CST 2011
Author: kraftche
Date: 2011-02-16 13:08:25 -0600 (Wed, 16 Feb 2011)
New Revision: 4506
Modified:
MOAB/branches/Version4.0/config/hdf5.m4
MOAB/branches/Version4.0/config/netcdf.m4
Log:
port fix from trunk for configuring with netcdf 4.x depending on binary hdf5 library
Modified: MOAB/branches/Version4.0/config/hdf5.m4
===================================================================
--- MOAB/branches/Version4.0/config/hdf5.m4 2011-02-16 18:29:08 UTC (rev 4505)
+++ MOAB/branches/Version4.0/config/hdf5.m4 2011-02-16 19:08:25 UTC (rev 4506)
@@ -1,4 +1,53 @@
+
#######################################################################################
+# Helper function for FATHOM_CHECK_HDF5 and FATHOM_CHECK_NETCDF
+# If HAVE_LIB_HDF5 == yes, then does nothing.
+# Otherwise sets HAVE_LIB_HDF5 to yes or no depending on whether or not
+# HDF5 libraries are detected and sets HDF5_LIBS
+# Respects caller's LDFLAGS, CPPFLAGS, and LIBS. Caller should set appropriately.
+# Respections optional HDF5_LIBNAME uses to specify alternate library name. If
+# not specified, will be set to -lhdf5
+#######################################################################################
+AC_DEFUN([FATHOM_DETECT_HDF5_LIBS],[
+
+ # if we've already done this check, then don't do it again
+if test "xyes" != "x$HAVE_LIB_HDF5"; then
+ # Check for IBM parallel IO library
+ if test "x$WITH_MPI" != "xno"; then
+ AC_CHECK_LIB([gpfs],[gpfs_stat],[HDF5_LIBS="-lgpfs $HDF5_LIBS"])
+ fi
+
+ test "x" != "x$HDF5_LIBNAME" || HDF5_LIBNAME=hdf5
+
+ HAVE_LIB_HDF5=no
+ AC_CHECK_LIB( [$HDF5_LIBNAME], [H5Fopen], [HAVE_LIB_HDF5=yes] )
+ if test $HAVE_LIB_HDF5 = no; then
+ if test $HAVE_ZLIB = yes; then
+ unset "ac_cv_lib_${HDF5_LIBNAME}_H5Fopen"
+ unset "ac_cv_lib_${HDF5_LIBNAME}___H5Fopen"
+ AC_CHECK_LIB( [${HDF5_LIBNAME}], [H5Fopen], [HAVE_LIB_HDF5=yes; HDF5_LIBS="$HDF5_LIBS -lz"], [], [-lz] )
+ fi
+ fi
+ if test $HAVE_LIB_HDF5 = no; then
+ if test $HAVE_SZIP = yes; then
+ unset "ac_cv_lib_${HDF5_LIBNAME}_H5Fopen"
+ unset "ac_cv_lib_${HDF5_LIBNAME}___H5Fopen"
+ AC_CHECK_LIB( [$HDF5_LIBNAME], [H5Fopen], [HAVE_LIB_HDF5=yes; HDF5_LIBS="$HDF5_LIBS -lsz"], [], [-lsz] )
+ fi
+ fi
+ if test $HAVE_LIB_HDF5 = no; then
+ if test $HAVE_SZIP = yes; then
+ if test $HAVE_ZLIB = yes; then
+ unset "ac_cv_lib_${HDF5_LIBNAME}_H5Fopen"
+ unset "ac_cv_lib_${HDF5_LIBNAME}___H5Fopen"
+ AC_CHECK_LIB( [$HDF5_LIBNAME], [H5Fopen], [HAVE_LIB_HDF5=yes; HDF5_LIBS="$HDF5_LIBS -lsz -lz"], [], [-lz -lsz] )
+ fi
+ fi
+ fi
More information about the moab-dev
mailing list