[cig-commits] r18556 - cs/autoconf/trunk

brad at geodynamics.org brad at geodynamics.org
Wed Jun 8 15:38:08 PDT 2011


Author: brad
Date: 2011-06-08 15:38:08 -0700 (Wed, 08 Jun 2011)
New Revision: 18556

Added:
   cs/autoconf/trunk/cit_hdf5.m4
Modified:
   cs/autoconf/trunk/cit_hdf.m4
Log:
Created new file for updated HDF5 macros that are more general.

Modified: cs/autoconf/trunk/cit_hdf.m4
===================================================================
--- cs/autoconf/trunk/cit_hdf.m4	2011-06-08 21:57:26 UTC (rev 18555)
+++ cs/autoconf/trunk/cit_hdf.m4	2011-06-08 22:38:08 UTC (rev 18556)
@@ -1,6 +1,8 @@
 # -*- Autoconf -*-
 
+## Old autoconf macros (used by Cigma?)
 
+
 ## ------------------------ ##
 ## Autoconf macros for HDF. ##
 ## ------------------------ ##

Added: cs/autoconf/trunk/cit_hdf5.m4
===================================================================
--- cs/autoconf/trunk/cit_hdf5.m4	                        (rev 0)
+++ cs/autoconf/trunk/cit_hdf5.m4	2011-06-08 22:38:08 UTC (rev 18556)
@@ -0,0 +1,48 @@
+# -*- Autoconf -*-
+
+# ======================================================================
+# Autoconf macros for HDF5.
+# ======================================================================
+
+# ----------------------------------------------------------------------
+# CIT_HDF5_HEADER
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_HDF5_HEADER], [
+  AC_LANG(C++)
+  AC_CHECK_HEADER([hdf5.h], [], [
+    AC_MSG_ERROR([HDF5 header not found; try CPPFLAGS="-I<hdf5 include dir>"])
+  ])dnl
+])dnl CIT_HDF5_HEADER
+
+
+# ----------------------------------------------------------------------
+# CIT_NETCDF_LIB
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_HDF5_LIB], [
+  AC_LANG(C++)
+  AC_REQUIRE_CPP
+  AC_MSG_CHECKING([for H5Fopen in -lhdf5])
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <hdf5.h>]],
+	             [[H5Fopen("test.h5", H5F_ACC_TRUNC, H5P_DEFAULT);]])],
+    [AC_MSG_RESULT(yes)],
+    [AC_MSG_RESULT(no)
+     AC_MSG_ERROR([hdf5 library not found; try LDFLAGS="-L<hdf5 lib dir>"])
+    ])dnl
+  ]))
+])dnl CIT_HDF5_LIB
+
+
+# ----------------------------------------------------------------------
+# CIT_NETCDF_LIB_PARALLEL
+# ----------------------------------------------------------------------
+AC_DEFUN([CIT_HDF5_LIB_PARALLEL], [
+  AC_LANG(C++)
+  AC_REQUIRE_CPP
+  AC_SEARCH_LIBS([H5Pset_dxpl_mpio], [hdf5], [], [
+    AC_MSG_WARN([parallel HDF5 library not found; DO NOT attempt to use HDF5 in parallel OR configure HDF5 with '--enable-parallel'])
+  ])
+])dnl CIT_HDF5_LIB
+
+
+dnl end of file



More information about the CIG-COMMITS mailing list