[MOAB-dev] r2120 - MOAB/trunk/m4

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Oct 1 15:42:35 CDT 2008


Author: kraftche
Date: 2008-10-01 15:42:35 -0500 (Wed, 01 Oct 2008)
New Revision: 2120

Modified:
   MOAB/trunk/m4/hdf5.m4
Log:
It is an error if the user specified the --with-hdf5 option and
HDF5 was not found.


Modified: MOAB/trunk/m4/hdf5.m4
===================================================================
--- MOAB/trunk/m4/hdf5.m4	2008-10-01 20:38:23 UTC (rev 2119)
+++ MOAB/trunk/m4/hdf5.m4	2008-10-01 20:42:35 UTC (rev 2120)
@@ -84,7 +84,7 @@
 AC_HELP_STRING([--without-hdf5], [Disable support for native HDF5 file format])],
 [HDF5_ARG=$withval
  DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-hdf5=\"${withval}\""
-], [HDF5_ARG=yes])
+], [HDF5_ARG=])
 if test "xno" = "x$HDF5_ARG"; then
   AC_MSG_RESULT([no])
 else
@@ -101,7 +101,7 @@
   fi
 
     # if a path is specified, update LIBS and INCLUDES accordingly
-  if test "xyes" != "x$HDF5_ARG"; then
+  if test "xyes" != "x$HDF5_ARG" && "x" != "x$HDF5_ARG"; then
     if test -d "${HDF5_ARG}/lib"; then
       HDF5_LDFLAGS="$HDF5_LDFLAGS -L${HDF5_ARG}/lib"
     elif test -d "${HDF5_ARG}"; then
@@ -151,11 +151,15 @@
     fi
   fi
   if test "x$HAVE_LIB_HDF5" = "xno"; then
-    AC_MSG_WARN([Could not find HDF5 library (-lhdf5)])
     HAVE_HDF5=no
   fi
   
   if test "x$HAVE_HDF5" = "xno"; then
+    if test "x" = "x$HDF5_ARG"; then
+      AC_MSG_WARN([HDF5 library not found or not usable.])
+    else
+      AC_MSG_ERROR([HDF5 library not found or not usable.])
+    fi
     HDF5_CPPFLAGS=
     HDF5_LDFLAGS=
     HDF5_LIBS=




More information about the moab-dev mailing list