summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2011-08-21 03:17:37 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2011-08-21 03:17:37 (GMT)
commit8137c9fda74ddbcd99083cd95a1a866dfab75a86 (patch)
tree53cf3eee6cc3fc14adf26e0a7ee50e7f0df0ca2b
parentde1609418532ebef39eec211cd8a9ea85333a9e1 (diff)
downloadhdf5-8137c9fda74ddbcd99083cd95a1a866dfab75a86.zip
hdf5-8137c9fda74ddbcd99083cd95a1a866dfab75a86.tar.gz
hdf5-8137c9fda74ddbcd99083cd95a1a866dfab75a86.tar.bz2
[svn-r21275] Description: Changed the --enable-fortran2003 behavior to:
1) --enable-fortran2003 will enable only F2003 features. It is not a replacement for --enable-fortran. If compiler is not F2003 compliant configure should fail. 2) if --enable-fortran2003 is specified with out --enable-fortran configure fails 3) Configure help indicates that --enable-fortran2003 is in addition to --enable-fortran Updated the version checks of different compilers. Tested: jam (gcc 4.1 4.6, intel 10.1 11.1 12.0, pgi)
-rwxr-xr-xconfigure186
-rw-r--r--configure.in230
-rw-r--r--fortran/src/hdf5_fortrandll.def1
3 files changed, 230 insertions, 187 deletions
diff --git a/configure b/configure
index 9e9836e..16f7628 100755
--- a/configure
+++ b/configure
@@ -1549,7 +1549,8 @@ Optional Features:
--enable-dependency-tracking do not reject slow dependency extractors
--enable-unsupported Allow unsupported combinations of configure options
--enable-fortran Compile the Fortran 77/90/95 interface [default=no]
- --enable-fortran2003 Compile the Fortran 2003 interface [default=no]
+ --enable-fortran2003 Compile the Fortran 2003 interface, must also
+ specify --enable-fortran [default=no]
--enable-cxx Compile the C++ interface [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
@@ -4993,24 +4994,36 @@ if test "${enable_fortran+set}" = set; then :
fi
+if test "X$HDF_FORTRAN" = "Xyes"; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 2003 interface enabled" >&5
+$as_echo_n "checking if Fortran 2003 interface enabled... " >&6; }
# Check whether --enable-fortran2003 was given.
if test "${enable_fortran2003+set}" = set; then :
enableval=$enable_fortran2003; HDF_FORTRAN2003=$enableval
fi
-HAVE_SIZEOF="no"
-FORTRAN_DEFAULT_REALisDBLE="no"
-
-if test "X$HDF_FORTRAN2003" = "Xyes"; then
- HDF_FORTRAN=yes
+if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then
+ echo "yes"
+ as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5
+else
+ echo "no"
fi
-
+HAVE_SIZEOF="no"
+FORTRAN_DEFAULT_REALisDBLE="no"
if test "X$HDF_FORTRAN" = "Xyes"; then
- echo "yes"
+
+ HDF_FORTRAN=yes
+
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
@@ -6321,110 +6334,117 @@ fi
if test "X$HDF_FORTRAN2003" = "Xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports ISO_C_BINDING module" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports ISO_C_BINDING module" >&5
$as_echo_n "checking if Fortran compiler supports ISO_C_BINDING module... " >&6; }
- cat > conftest.$ac_ext <<_ACEOF
+ cat > conftest.$ac_ext <<_ACEOF
program main
- USE iso_c_binding
+ USE iso_c_binding
end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- HAVE_ISO_C_BINDING="yes"
+ HAVE_ISO_C_BINDING="yes"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "X$HAVE_ISO_C_BINDING" = "Xyes"; then
+ if test "X$HAVE_ISO_C_BINDING" = "Xno"; then
+ as_fn_error $? "Fortran compiler does not have ISO_C_BINDING; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5
+ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5
$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; }
- HAVE_FORTRAN_2003="no"
-
- if (${FC} -V 2>&1 | grep 'Sun Fortran') > /dev/null; then
- vers=`${FC} -V 2>&1 | sed -rn '\|Fortran 95 | s|.* ([0-9.]+) .*|\1|p' | sed -e 's/[^0-9]//g'`
- if test -n "$vers" && test "$vers" -ge 86; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only Sun Fortran Compiler, Version >= 8.6 supported; disabling Fortran 2003 features" >&5
-$as_echo "$as_me: WARNING: Only Sun Fortran Compiler, Version >= 8.6 supported; disabling Fortran 2003 features" >&2;}
- fi
- fi
-
- if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then
- vers=`${FC} -v 2>&1 | sed -e 's/[^0-9]//g'`
- if test -n "$vers" && test "$vers" -ge 101; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only Intel Fortran Compiler, Version > 10.1 supported; disabling Fortran 2003 features" >&5
-$as_echo "$as_me: WARNING: Only Intel Fortran Compiler, Version > 10.1 supported; disabling Fortran 2003 features" >&2;}
- fi
- fi
-
- if (${FC} -dumpversion 2>&1 | grep 'G95') > /dev/null; then
- vers=`${FC} -dumpversion 2>&1 | grep -o '[^ ]*!' | sed -e 's/[^0-9]//g'`
- if test -n "$vers" && test "$vers" -ge 90; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only G95 Fortran Compiler, Version > .9 supported; disabling Fortran 2003 features" >&5
-$as_echo "$as_me: WARNING: Only G95 Fortran Compiler, Version > .9 supported; disabling Fortran 2003 features" >&2;}
- fi
- fi
-
- if (${FC} --version 2>&1 | grep 'GNU Fortran') > /dev/null; then
- vers_major=`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o ' [0-9]*\.' | sed -e 's/[^0-9]//g'`
- vers_minor=`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o '\.[0-9]*\.' | sed -e 's/[^0-9]//g'`
-
- if test -n "$vers_major" && test -n "$vers_minor" && test "$vers_major" -ge 4 && test "$vers_minor" -ge 1; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only GNU Fortran Compiler, Version > 4.1.0 supported; disabling Fortran 2003 features" >&5
-$as_echo "$as_me: WARNING: Only GNU Fortran Compiler, Version > 4.1.0 supported; disabling Fortran 2003 features" >&2;}
- fi
- fi
-
- if (${FC} -V 2>&1 | grep 'Portland Group') > /dev/null; then
- vers=`${FC} -V 2>&1 | grep 'pgf' | grep -o '[^ ]*[^ ]\.[^ ]' | sed -e 's/[^0-9]//g'`
- if test -n "$vers" && test "$vers" -ge 104; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only The Portland Group Compiler, Version > 10.4-0 supported; disabling Fortran 2003 features" >&5
-$as_echo "$as_me: WARNING: Only The Portland Group Compiler, Version > 10.4-0 supported; disabling Fortran 2003 features" >&2;}
- fi
-
- fi
+ HAVE_FORTRAN_2003="no"
+ if (${FC} -V 2>&1 | grep 'Sun Fortran') > /dev/null; then
+ vers=`${FC} -V 2>&1 | sed -rn '\|Fortran 95 | s|.* ([0-9.]+) .*|\1|p' | sed -e 's/[^0-9]//g'`
+ if test -n "$vers" && test "$vers" -ge 86; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ as_fn_error $? "Only Sun Fortran Compiler, Version >= 8.6 F2003 supported; remove --enable-fortran2003" "$LINENO" 5
+ fi
+ fi
+ if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then
+ vers_major=`${FC} -v 2>&1 | grep -o ' [0-9]*\.' | sed -e 's/[^0-9]//g'`
+ vers_minor=`${FC} -v 2>&1 | grep -o '\.[0-9]*[.? ?]' | sed -e 's/[^0-9]//g'`
+ if test -n "$vers_major" && test "$vers_major" -gt 10; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ if test -n "$vers_major" && test "$vers_major" = 10 && test -n "$vers_minor" && test "$vers_minor" -ge 1; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ as_fn_error $? "Only Intel Fortran Compiler, Version >= 10.1 F2003 supported; remove --enable-fortran2003" "$LINENO" 5
fi
+ fi
+ fi
+
+ if (${FC} -dumpversion 2>&1 | grep 'G95') > /dev/null; then
+ vers=`${FC} -dumpversion 2>&1 | grep -o '[^ ]*!' | sed -e 's/[^0-9]//g'`
+ if test -n "$vers" && test "$vers" -ge 90; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ as_fn_error $? "Only G95 Fortran Compiler, Version >= .9 F2003 supported; remove --enable-fortran2003" "$LINENO" 5
+ fi
+ fi
+
+ if (${FC} --version 2>&1 | grep 'GNU Fortran') > /dev/null; then
+ vers_major=`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o ') [0-9]*\.' | sed -e 's/[^0-9]//g'`
+ vers_minor=`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o '\.[0-9]*\.' | sed -e 's/[^0-9]//g'`
+
+ if test -n "$vers_major" && test "$vers_major" -gt 4; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ if test -n "$vers_major" && test "$vers_major" = 4 && test -n "$vers_minor" && test "$vers_minor" -gt 1; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ as_fn_error $? "Only GNU Fortran Compiler, Version > 4.1.0 F2003 supported; remove --enable-fortran2003" "$LINENO" 5
+ fi
+ fi
+ fi
+ if (${FC} -V 2>&1 | grep 'Portland Group') > /dev/null; then
+ vers_major=`${FC} -V 2>&1 | grep 'pgf' | grep -o ' [0-9]*\.' | sed -e 's/[^0-9]//g'`
+ vers_minor=`${FC} -V 2>&1 | grep 'pgf' | grep -o '\.[0-9]*\-' | sed -e 's/[^0-9]//g'`
+
+ if test -n "$vers_major" && test "$vers_major" -gt 10; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ if test -n "$vers_major" && test "$vers_major" = 10 && test -n "$vers_minor" && test "$vers_minor" -gt 4; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ as_fn_error $? "Only The Portland Group Compiler, Version >= 10.4-0 F2003 supported; remove --enable-fortran2003" "$LINENO" 5
+ fi
+ fi
+ fi
fi
+fi
- ac_ext=c
+ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-else
- echo "no"
- FC="no"
-fi
if test "X$HAVE_SIZEOF" = "Xyes"; then
FORTRAN_HAVE_SIZEOF_TRUE=
diff --git a/configure.in b/configure.in
index 4c36451..2d632e2 100644
--- a/configure.in
+++ b/configure.in
@@ -376,29 +376,41 @@ AC_ARG_ENABLE([fortran],
[Compile the Fortran 77/90/95 interface [default=no]])],
[HDF_FORTRAN=$enableval])
+if test "X$HDF_FORTRAN" = "Xyes"; then
+ echo "yes"
+else
+ echo "no"
+fi
+
+
dnl ----------------------------------------------------------------------
dnl Check if they would like the Fortran 2003 interface compiled
dnl
+AC_MSG_CHECKING([if Fortran 2003 interface enabled])
AC_ARG_ENABLE([fortran2003],
[AC_HELP_STRING([--enable-fortran2003],
- [Compile the Fortran 2003 interface [default=no]])],
+ [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])],
[HDF_FORTRAN2003=$enableval])
-HAVE_SIZEOF="no"
-FORTRAN_DEFAULT_REALisDBLE="no"
-
-dnl If FORTRAN 2003 interface enabled then mark that the general
-dnl Fortran interface is also enabled
+dnl ----------------------------------------------------------------------
+dnl Check to make sure --enable-fortran is present if --enable-fortran2003
+dnl was specified
-if test "X$HDF_FORTRAN2003" = "Xyes"; then
- AC_SUBST(FC) HDF_FORTRAN=yes
+if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then
+ echo "yes"
+ AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003])
+else
+ echo "no"
fi
-AC_SUBST([HAVE_FORTRAN_2003])
+HAVE_SIZEOF="no"
+FORTRAN_DEFAULT_REALisDBLE="no"
if test "X$HDF_FORTRAN" = "Xyes"; then
- echo "yes"
+ AC_SUBST(FC) HDF_FORTRAN=yes
+ AC_SUBST([HAVE_FORTRAN_2003])
+
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
dnl --------------------------------------------------------------------
@@ -455,16 +467,16 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl --------------------------------------------------------------------
dnl See if the compiler will support the "-I." option
dnl
-dnl AM_FCFLAGS_saved=$AM_FCFLAGS
-dnl AM_FCFLAGS="${AM_FCFLAGS} -I."
+ dnl AM_FCFLAGS_saved=$AM_FCFLAGS
+ dnl AM_FCFLAGS="${AM_FCFLAGS} -I."
-dnl AC_MSG_CHECKING(if compiler supports -I. option)
-dnl AC_TRY_FCOMPILE([
-dnl program conftest
-dnl end
-dnl ], AC_MSG_RESULT(yes),
-dnl AC_MSG_RESULT(no)
-dnl AM_FCFLAGS="$AM_FCFLAGS_saved")
+ dnl AC_MSG_CHECKING(if compiler supports -I. option)
+ dnl AC_TRY_FCOMPILE([
+ dnl program conftest
+ dnl end
+ dnl ], AC_MSG_RESULT(yes),
+ dnl AC_MSG_RESULT(no)
+ dnl AM_FCFLAGS="$AM_FCFLAGS_saved")
dnl --------------------------------------------------------------------
dnl See if the fortran compiler supports the intrinsic function "SIZEOF"
@@ -511,98 +523,110 @@ dnl AM_FCFLAGS="$AM_FCFLAGS_saved")
if test "X$HDF_FORTRAN2003" = "Xyes"; then
- dnl Checking if the compiler supports the ISO_C_BINDING module, if it does
- dnl not then don't bother checking any other fortran 2003 features and
- dnl disable fortran 2003.
+ dnl Checking if the compiler supports the ISO_C_BINDING module, if it does
+ dnl not then don't bother checking any other Fortran 2003 features and
+ dnl disable Fortran 2003.
- AC_MSG_CHECKING([if Fortran compiler supports ISO_C_BINDING module])
-
- AC_TRY_COMPILE(,[
- USE iso_c_binding
- ], [AC_MSG_RESULT(yes)
- HAVE_ISO_C_BINDING="yes"] ,
- AC_MSG_RESULT(no))
-
- if test "X$HAVE_ISO_C_BINDING" = "Xyes"; then
-
- AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF])
- HAVE_FORTRAN_2003="no"
-
- dnl Sun compiler
- if (${FC} -V 2>&1 | grep 'Sun Fortran') > /dev/null; then
- vers=[`${FC} -V 2>&1 | sed -rn '\|Fortran 95 | s|.* ([0-9.]+) .*|\1|p' | sed -e 's/[^0-9]//g'`]
- if test -n "$vers" && test "$vers" -ge 86; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- AC_MSG_WARN([Only Sun Fortran Compiler, Version >= 8.6 supported; disabling Fortran 2003 features])
- fi
- fi
-
- dnl Intel compiler
- if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then
- vers=[`${FC} -v 2>&1 | sed -e 's/[^0-9]//g'`]
- if test -n "$vers" && test "$vers" -ge 101; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- AC_MSG_WARN([Only Intel Fortran Compiler, Version > 10.1 supported; disabling Fortran 2003 features])
- fi
- fi
-
- dnl g95 compiler
- if (${FC} -dumpversion 2>&1 | grep 'G95') > /dev/null; then
- vers=[`${FC} -dumpversion 2>&1 | grep -o '[^ ]*!' | sed -e 's/[^0-9]//g'`]
- if test -n "$vers" && test "$vers" -ge 90; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- AC_MSG_WARN([Only G95 Fortran Compiler, Version > .9 supported; disabling Fortran 2003 features])
- fi
- fi
-
- dnl gfortran
- if (${FC} --version 2>&1 | grep 'GNU Fortran') > /dev/null; then
- vers_major=[`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o ' [0-9]*\.' | sed -e 's/[^0-9]//g'`]
- vers_minor=[`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o '\.[0-9]*\.' | sed -e 's/[^0-9]//g'`]
-
- if test -n "$vers_major" && test -n "$vers_minor" && test "$vers_major" -ge 4 && test "$vers_minor" -ge 1; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- AC_MSG_WARN([Only GNU Fortran Compiler, Version > 4.1.0 supported; disabling Fortran 2003 features])
- fi
- fi
-
- dnl The Portland Group
- if (${FC} -V 2>&1 | grep 'Portland Group') > /dev/null; then
- vers=[`${FC} -V 2>&1 | grep 'pgf' | grep -o '[^ ]*[^ ]\.[^ ]' | sed -e 's/[^0-9]//g'`]
- if test -n "$vers" && test "$vers" -ge 104; then
- HAVE_FORTRAN_2003="yes"
- echo $HAVE_FORTRAN_2003
- else
- echo $HAVE_FORTRAN_2003
- AC_MSG_WARN([Only The Portland Group Compiler, Version > 10.4-0 supported; disabling Fortran 2003 features])
- fi
-
- fi
+ AC_MSG_CHECKING([if Fortran compiler supports ISO_C_BINDING module])
+ AC_TRY_COMPILE(,[
+ USE iso_c_binding
+ ], [AC_MSG_RESULT(yes)
+ HAVE_ISO_C_BINDING="yes"],
+ AC_MSG_RESULT(no))
+
+ if test "X$HAVE_ISO_C_BINDING" = "Xno"; then
+ AC_MSG_ERROR([Fortran compiler does not have ISO_C_BINDING; unsupported Fortran 2003 compiler, remove --enable-fortran2003])
+ fi
+
+ AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF])
+ HAVE_FORTRAN_2003="no"
+
+ dnl Sun compiler
+ if (${FC} -V 2>&1 | grep 'Sun Fortran') > /dev/null; then
+ vers=[`${FC} -V 2>&1 | sed -rn '\|Fortran 95 | s|.* ([0-9.]+) .*|\1|p' | sed -e 's/[^0-9]//g'`]
+ if test -n "$vers" && test "$vers" -ge 86; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ AC_MSG_ERROR([Only Sun Fortran Compiler, Version >= 8.6 F2003 supported; remove --enable-fortran2003])
+ fi
+ fi
+ dnl Intel compiler
+ if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then
+ vers_major=[`${FC} -v 2>&1 | grep -o ' [0-9]*\.' | sed -e 's/[^0-9]//g'`]
+ vers_minor=[`${FC} -v 2>&1 | grep -o '\.[0-9]*[.? ?]' | sed -e 's/[^0-9]//g'`]
+ if test -n "$vers_major" && test "$vers_major" -gt 10; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ if test -n "$vers_major" && test "$vers_major" = 10 && test -n "$vers_minor" && test "$vers_minor" -ge 1; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ AC_MSG_ERROR([Only Intel Fortran Compiler, Version >= 10.1 F2003 supported; remove --enable-fortran2003])
fi
+ fi
+ fi
- fi
+ dnl g95 compiler
+ if (${FC} -dumpversion 2>&1 | grep 'G95') > /dev/null; then
+ vers=[`${FC} -dumpversion 2>&1 | grep -o '[^ ]*!' | sed -e 's/[^0-9]//g'`]
+ if test -n "$vers" && test "$vers" -ge 90; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ AC_MSG_ERROR([Only G95 Fortran Compiler, Version >= .9 F2003 supported; remove --enable-fortran2003])
+ fi
+ fi
- dnl Change back to the C language
- AC_LANG_POP(Fortran)
-else
- echo "no"
- FC="no"
+ dnl gfortran
+ if (${FC} --version 2>&1 | grep 'GNU Fortran') > /dev/null; then
+ vers_major=[`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o ') [0-9]*\.' | sed -e 's/[^0-9]//g'`]
+ vers_minor=[`${FC} --version 2>&1 | grep 'GNU Fortran (' | grep -o '\.[0-9]*\.' | sed -e 's/[^0-9]//g'`]
+
+ if test -n "$vers_major" && test "$vers_major" -gt 4; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ if test -n "$vers_major" && test "$vers_major" = 4 && test -n "$vers_minor" && test "$vers_minor" -gt 1; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ AC_MSG_ERROR([Only GNU Fortran Compiler, Version > 4.1.0 F2003 supported; remove --enable-fortran2003])
+ fi
+ fi
+ fi
+
+ dnl The Portland Group
+ if (${FC} -V 2>&1 | grep 'Portland Group') > /dev/null; then
+ vers_major=[`${FC} -V 2>&1 | grep 'pgf' | grep -o ' [0-9]*\.' | sed -e 's/[^0-9]//g'`]
+ vers_minor=[`${FC} -V 2>&1 | grep 'pgf' | grep -o '\.[0-9]*\-' | sed -e 's/[^0-9]//g'`]
+
+ if test -n "$vers_major" && test "$vers_major" -gt 10; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ if test -n "$vers_major" && test "$vers_major" = 10 && test -n "$vers_minor" && test "$vers_minor" -gt 4; then
+ HAVE_FORTRAN_2003="yes"
+ echo $HAVE_FORTRAN_2003
+ else
+ echo $HAVE_FORTRAN_2003
+ AC_MSG_ERROR([Only The Portland Group Compiler, Version >= 10.4-0 F2003 supported; remove --enable-fortran2003])
+ fi
+ fi
+ fi
+ fi
fi
+dnl Change back to the C language
+AC_LANG_POP(Fortran)
+
AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF" = "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"])
diff --git a/fortran/src/hdf5_fortrandll.def b/fortran/src/hdf5_fortrandll.def
index 5355a3c..5f45350 100644
--- a/fortran/src/hdf5_fortrandll.def
+++ b/fortran/src/hdf5_fortrandll.def
@@ -284,7 +284,6 @@ H5L_mp_H5LIS_REGISTERED_F
H5L_mp_H5LMOVE_F
H5L_mp_H5LGET_NAME_BY_IDX_F
; H5O
-H5O_mp_CLOSE_F
H5O_mp_H5OLINK_F
H5O_mp_H5OOPEN_F
H5O_mp_H5OOPEN_BY_ADDR_F