[cig-commits] r4246 - mc/3D/CitcomS/trunk

luis at geodynamics.org luis at geodynamics.org
Tue Aug 8 13:47:10 PDT 2006


Author: luis
Date: 2006-08-08 13:47:10 -0700 (Tue, 08 Aug 2006)
New Revision: 4246

Modified:
   mc/3D/CitcomS/trunk/configure.ac
Log:
Fix checks for hdf5.h and for parallel HDF5. Should now be
performed only if --with-hdf5 is specified.


Modified: mc/3D/CitcomS/trunk/configure.ac
===================================================================
--- mc/3D/CitcomS/trunk/configure.ac	2006-08-08 04:55:38 UTC (rev 4245)
+++ mc/3D/CitcomS/trunk/configure.ac	2006-08-08 20:47:10 UTC (rev 4246)
@@ -153,23 +153,24 @@
 AC_SUBST(LIBM)
 
 AC_ARG_VAR(LIBHDF5, [HDF5 library])
-if test -z "$LIBHDF5"; then
-    AC_CHECK_FUNC(H5Fopen, , [
-        AC_CHECK_LIB(hdf5, H5Fopen, [
-            LIBHDF5="-lhdf5"
-        ], [
-            AC_MSG_ERROR([HDF5 library not found; try setting LIBHDF5])
+if test "$want_hdf5" = yes; then
+    if test -z "$LIBHDF5"; then
+        AC_CHECK_FUNC(H5Fopen, , [
+            AC_CHECK_LIB(hdf5, H5Fopen, [
+                LIBHDF5="-lhdf5"
+            ], [
+                AC_MSG_ERROR([HDF5 library not found; try setting LIBHDF5])
+            ])
         ])
-    ])
-fi
-if test "$want_hdf5" = yes; then
+    fi
     AC_CHECK_FUNC(H5Pset_dxpl_mpio, , [
         AC_CHECK_LIB(hdf5, H5Pset_dxpl_mpio, [
-            LIBHDF5="-lhdf5"
-        ] , [
-            AC_MSG_ERROR([Need Parallel HDF5; try compiling HDF5 with --enable-parallel])
+            have_phdf5="yes"
         ])
     ])
+    if test -z "$have_phdf5"; then
+        AC_MSG_ERROR([Need Parallel HDF5; try compiling HDF5 with --enable-parallel])
+    fi
 fi
 
 AC_SUBST(LIBHDF5)



More information about the cig-commits mailing list