diff options
author | Joel Frederico <joelfred@slac.stanford.edu> | 2016-06-14 17:29:59 -0700 |
---|---|---|
committer | Joel Frederico <joelfred@slac.stanford.edu> | 2016-06-14 17:29:59 -0700 |
commit | 756338c19ab215b0bc6b734095c2e218552cb4fc (patch) | |
tree | fa5ae7ce8c225892d46debd26e3424543401e7cb | |
parent | 3332defad74aaa264cf8a7fb411c6d84e20d5bf5 (diff) | |
download | autoconf-archive-756338c19ab215b0bc6b734095c2e218552cb4fc.tar.gz |
ax_lib_hdf5.m4: env var HDF5_TYPE indicates parallel or serial
-rw-r--r-- | m4/ax_lib_hdf5.m4 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/m4/ax_lib_hdf5.m4 b/m4/ax_lib_hdf5.m4 index fa6bc0b..b1f76ec 100644 --- a/m4/ax_lib_hdf5.m4 +++ b/m4/ax_lib_hdf5.m4 @@ -33,6 +33,7 @@ # AC_SUBST(HDF5_FC) # AC_SUBST(HDF5_FFLAGS) # AC_SUBST(HDF5_FLIBS) +# AC_SUBST(HDF5_TYPE) # AC_DEFINE(HAVE_HDF5) # # and sets with_hdf5="yes". Additionally, the macro sets @@ -74,6 +75,9 @@ # AC_MSG_ERROR([Unable to find HDF5, we need parallel HDF5.]) # fi # +# The HDF5_TYPE environment variable returns "parallel" or "serial", +# depending on which type of library is found. +# # LICENSE # # Copyright (c) 2009 Timothy Brown <tbrown@freeshell.org> @@ -137,6 +141,7 @@ HDF5_LIBS="" HDF5_FC="" HDF5_FFLAGS="" HDF5_FLIBS="" +HDF5_TYPE="" dnl Try and find hdf5 compiler tools and options. if test "$with_hdf5" = "yes"; then @@ -153,6 +158,11 @@ if test "$with_hdf5" = "yes"; then AC_MSG_CHECKING([Using provided HDF5 C wrapper]) AC_MSG_RESULT([$H5CC]) fi + if test "$H5CC$" = "h5cc"; then + HDF5_TYPE="serial" + else + HDF5_TYPE="parallel" + fi AC_MSG_CHECKING([for HDF5 libraries]) if test ! -f "$H5CC" || test ! -x "$H5CC"; then AC_MSG_RESULT([no]) @@ -305,6 +315,7 @@ HDF5 support is being disabled (equivalent to --with-hdf5=no). AC_SUBST([HDF5_FC]) AC_SUBST([HDF5_FFLAGS]) AC_SUBST([HDF5_FLIBS]) + AC_SUBST([HDF5_TYPE]) AC_DEFINE([HAVE_HDF5], [1], [Defined if you have HDF5 support]) fi fi |