diff options
author | Rhys Ulerich <rhys.ulerich@gmail.com> | 2008-11-07 00:07:19 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2008-11-07 00:07:19 +0100 |
commit | 3a26712ace5ab2a47ea5e8f17d1aec80f373fdc7 (patch) | |
tree | 0ed92dac4c67c0d22d189c6c6587dfce20e358ca /m4/ax_trilinos_epetraext_hdf5.m4 | |
parent | d3e9b1463db867d2c396e0349fd62169c17f9954 (diff) | |
download | autoconf-archive-3a26712ace5ab2a47ea5e8f17d1aec80f373fdc7.tar.gz |
Updated AX_TRILINOS macros.
Diffstat (limited to 'm4/ax_trilinos_epetraext_hdf5.m4')
-rw-r--r-- | m4/ax_trilinos_epetraext_hdf5.m4 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/m4/ax_trilinos_epetraext_hdf5.m4 b/m4/ax_trilinos_epetraext_hdf5.m4 new file mode 100644 index 0000000..7e6fd65 --- /dev/null +++ b/m4/ax_trilinos_epetraext_hdf5.m4 @@ -0,0 +1,56 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_trilinos_epetraext_hdf5.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_TRILINOS_EPETRAEXT_HDF5([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# Checks if EpetraExt was compiled with HDF5 support +# (--enable-epetraext-hdf5) enabled. When ACTION-IF-NOT-FOUND is not +# specified, the default behavior is for configure to fail. +# +# LAST MODIFICATION +# +# 2008-11-02 +# +# COPYLEFT +# +# Copyright (c) 2008 Rhys Ulerich <rhys.ulerich@gmail.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_TRILINOS_EPETRAEXT_HDF5],[ + AC_REQUIRE([AC_LIB_HDF5]) + AC_REQUIRE([AX_TRILINOS_EPETRAEXT]) + ax_trilinos_epetraext_hdf5=yes + AC_CHECK_HEADER([EpetraExt_ConfigDefs.h],,[ax_trilinos_epetraext_hdf5=no]) + AC_MSG_CHECKING([for HDF5 support in EpetraExt release]) + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@include <EpetraExt_ConfigDefs.h> + ]], [[ + #ifndef HAVE_EPETRAEXT_HDF5 + # error HAVE_EPETRAEXT_HDF5 was not defined in EpetraExt_ConfigDefs.h + #endif + ]])],[ + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ax_trilinos_epetraext_hdf5=no + ]) + AC_LANG_POP([C++]) + if test "$ax_trilinos_epetraext_hdf5" = yes; then + : # NOP + ifelse([$1],,, + [$1]) + else + : # NOP + ifelse([$2],,AC_MSG_ERROR([Trilinos EpetraExt HDF5 not usable.]), + [$2]) + fi +]) |