summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
1 files changed, 26 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 5bcd530..aaaceb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -389,6 +389,13 @@ fi
if test "X$HDF_FORTRAN" = "Xyes"; then
+## We will output an include file for Fortran, H5config_f.inc which
+## contains various configure definitions used by the Fortran Library.
+## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro
+## names and those generated by another software package that uses the HDF5 library.
+ AC_CONFIG_HEADERS([fortran/src/H5config_f.inc],
+ [sed -i '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' fortran/src/H5config_f.inc])
+
AC_SUBST([FC]) HDF_FORTRAN=yes
AC_SUBST([HAVE_FORTRAN_2003])
@@ -434,13 +441,26 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## See if the fortran compiler supports the intrinsic function "C_SIZEOF"
PAC_PROG_FC_C_SIZEOF
-
+
## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE"
- PAC_PROG_FC_STORAGE_SIZE
+ PAC_PROG_FC_STORAGE_SIZE
+
+ ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error
+ if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then
+ AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE])
+ fi
+
+ if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then
+ AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE])
+ fi
- ## Check to see if -r8 was specified to determine if we need to
- ## compile the DOUBLE PRECISION interfaces.
- PAC_PROG_FC_DEFAULT_REALisDBLE
+ if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then
+ AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF])
+ fi
+
+ if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then
+ AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF])
+ fi
if test "X$HDF_FORTRAN2003" = "Xyes"; then
@@ -461,11 +481,7 @@ fi
## Change back to the C language
AC_LANG_POP(Fortran)
-AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"])
-AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"])
-AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"])
AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"])
-AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"])
## ----------------------------------------------------------------------
## Check if they would like the C++ interface compiled
@@ -530,12 +546,6 @@ if test "X$HDF5_HL" = "Xyes"; then
HL="hl"
AC_DEFINE([INCLUDE_HL], [1],
[Define if HDF5's high-level library headers should be included in hdf5.h])
-
- ## If Fortran's default real is double precision and HL is being built then configure
- ## should fail due to bug HDFFV-889.
- if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then
- AC_MSG_ERROR([Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl.])
- fi
else
echo "no"
fi
@@ -975,7 +985,7 @@ case "$host_cpu-$host_vendor-$host_os" in
##
## POSIX feature information can be found in the gcc manual at:
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS"
+##SCOT H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS"
## Need to add this so that O_DIRECT is visible for the direct
## VFD on Linux systems.