Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7KB

  1. # ===============================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_trilinos_epetraext_hdf5.html
  3. # ===============================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_TRILINOS_EPETRAEXT_HDF5([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Checks if EpetraExt was compiled with HDF5 support
  12. # (--enable-epetraext-hdf5) enabled. When ACTION-IF-NOT-FOUND is not
  13. # specified, the default behavior is for configure to fail.
  14. #
  15. # LICENSE
  16. #
  17. # Copyright (c) 2009 Rhys Ulerich <rhys.ulerich@gmail.com>
  18. #
  19. # Copying and distribution of this file, with or without modification, are
  20. # permitted in any medium without royalty provided the copyright notice
  21. # and this notice are preserved. This file is offered as-is, without any
  22. # warranty.
  23. #serial 8
  24. AC_DEFUN([AX_TRILINOS_EPETRAEXT_HDF5],[
  25. AC_REQUIRE([AC_LIB_HDF5])
  26. AC_REQUIRE([AX_TRILINOS_EPETRAEXT])
  27. ax_trilinos_epetraext_hdf5=yes
  28. AC_CHECK_HEADER([EpetraExt_ConfigDefs.h],,[ax_trilinos_epetraext_hdf5=no])
  29. AC_MSG_CHECKING([for HDF5 support in EpetraExt release])
  30. AC_LANG_PUSH(C++)
  31. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  32. @%:@include <EpetraExt_ConfigDefs.h>
  33. ]], [[
  34. #ifndef HAVE_EPETRAEXT_HDF5
  35. # error HAVE_EPETRAEXT_HDF5 was not defined in EpetraExt_ConfigDefs.h
  36. #endif
  37. ]])],[
  38. AC_MSG_RESULT(yes)
  39. ],[
  40. AC_MSG_RESULT(no)
  41. ax_trilinos_epetraext_hdf5=no
  42. ])
  43. AC_LANG_POP([C++])
  44. if test "$ax_trilinos_epetraext_hdf5" = yes; then
  45. : # NOP
  46. ifelse([$1],,,
  47. [$1])
  48. else
  49. : # NOP
  50. ifelse([$2],,AC_MSG_ERROR([Trilinos EpetraExt HDF5 not usable.]),
  51. [$2])
  52. fi
  53. ])