From d29c5a6e6ad8cb50a94e9215d2b2b8682e56818f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 15:16:07 -0500 Subject: [PATCH] [svn-r26052] Fixed false positive tests for intrensic functions. Tested: jam (mpi, gfortran, intel) --enable-fortran, and --enable-fortran --enable-fortran2003 --- configure | 241 ++++++++++++++++++++++++---------------------- configure.ac | 11 +-- m4/aclocal_cxx.m4 | 12 +-- m4/aclocal_fc.m4 | 13 ++- 4 files changed, 144 insertions(+), 133 deletions(-) diff --git a/configure b/configure index 841ae4e935..163c2b586b 100755 --- a/configure +++ b/configure @@ -1888,6 +1888,52 @@ fi } # ac_fn_c_try_link +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_link + # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -1963,6 +2009,52 @@ fi } # ac_fn_cxx_try_cpp +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2148,98 +2240,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link - # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -5269,7 +5269,11 @@ if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5 else - echo "yes" + if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" + else + echo "no" + fi fi HAVE_SIZEOF="no" @@ -5881,11 +5885,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## It seems that libtool (as of Libtool 1.5.14) is trying to - ## configure itself for Fortran 77. - ## Tell it that our F77 compiler is $FC (actually a F9X compiler) - F77=$FC - ## Change to the Fortran 90 language ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -6581,6 +6580,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ## -------------------------------------------------------------------- ## See if the fortran compiler supports the intrinsic function "SIZEOF" + HAVE_SIZEOF_FORTRAN="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } cat > conftest.$ac_ext <<_ACEOF @@ -6590,7 +6590,7 @@ $as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } END PROGRAM _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_SIZEOF_FORTRAN="yes" @@ -6598,11 +6598,13 @@ 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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + HAVE_C_SIZEOF_FORTRAN="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } cat > conftest.$ac_ext <<_ACEOF @@ -6615,7 +6617,7 @@ $as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } END PROGRAM _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_C_SIZEOF_FORTRAN="yes" @@ -6623,11 +6625,13 @@ 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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + HAVE_STORAGE_SIZE_FORTRAN="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } cat > conftest.$ac_ext <<_ACEOF @@ -6639,7 +6643,7 @@ $as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >& END PROGRAM _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_STORAGE_SIZE_FORTRAN="yes" @@ -6647,13 +6651,15 @@ 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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. + FORTRAN_DEFAULT_REALisDBLE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran default REAL is DOUBLE PRECISION" >&5 $as_echo_n "checking if Fortran default REAL is DOUBLE PRECISION... " >&6; } @@ -6700,7 +6706,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $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" - cat > conftest.$ac_ext <<_ACEOF program main @@ -6716,7 +6721,7 @@ $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HD end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_F2003_REQUIREMENTS=yes @@ -6724,7 +6729,8 @@ 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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then @@ -7377,7 +7383,7 @@ $as_echo_n "checking if $CXX needs old style header files in includes... " >&6; int main(void) { return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else @@ -7386,7 +7392,8 @@ $as_echo "yes" >&6; } CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # Checking if C++ can handle namespaces @@ -7407,7 +7414,7 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -7416,7 +7423,8 @@ $as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # Checking if C++ has offsetof extension @@ -7456,7 +7464,7 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -7466,7 +7474,8 @@ 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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # if C++ can handle static cast @@ -7485,7 +7494,7 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -7494,7 +7503,8 @@ $as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext else @@ -7561,7 +7571,6 @@ done fi - ## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. diff --git a/configure.ac b/configure.ac index 393b194393..cd4fa9e793 100644 --- a/configure.ac +++ b/configure.ac @@ -399,7 +399,11 @@ if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003]) else - echo "yes" + if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" + else + echo "no" + fi fi HAVE_SIZEOF="no" @@ -446,11 +450,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_PROG_FC([PAC_FC_SEARCH_LIST],) AC_F9X_MODS - ## It seems that libtool (as of Libtool 1.5.14) is trying to - ## configure itself for Fortran 77. - ## Tell it that our F77 compiler is $FC (actually a F9X compiler) - F77=$FC - ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4 index 2068587f3d..f373b51441 100644 --- a/m4/aclocal_cxx.m4 +++ b/m4/aclocal_cxx.m4 @@ -25,12 +25,12 @@ dnl Checking if C++ needs old style header files in includes AC_DEFUN([PAC_PROG_CXX_HEADERS],[ AC_MSG_CHECKING([if $CXX needs old style header files in includes]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ #include int main(void) { return 0; } ])], - [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes]) CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"]) @@ -40,7 +40,7 @@ dnl Checking if ++ can handle namespaces AC_DEFUN([PAC_PROG_CXX_NAMESPACE],[ AC_MSG_CHECKING([if $CXX can handle namespaces]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ namespace H5 { int fnord; } @@ -60,7 +60,7 @@ dnl Checking if C++ supports std AC_DEFUN([PAC_PROG_CXX_STD],[ AC_MSG_CHECKING([if $CXX supports std]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ #include using namespace std; @@ -79,7 +79,7 @@ dnl Checking if C++ has offsetof extension AC_DEFUN([PAC_PROG_CXX_OFFSETOF],[ AC_MSG_CHECKING([if $CXX has offsetof extension]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ],[ @@ -102,7 +102,7 @@ dnl Checking if C++ can handle static cast AC_DEFUN([PAC_PROG_CXX_STAIC_CAST],[ AC_MSG_CHECKING([if $CXX can handle static cast]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ int main(void) { float test_float; int test_int; diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index ec638a38c7..72b0d64b67 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -60,8 +60,9 @@ dnl dnl See if the fortran compiler supports the intrinsic function "SIZEOF" AC_DEFUN([PAC_PROG_FC_SIZEOF],[ + HAVE_SIZEOF_FORTRAN="no" AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ PROGRAM main i = sizeof(x) END PROGRAM @@ -73,8 +74,9 @@ AC_DEFUN([PAC_PROG_FC_SIZEOF],[ dnl See if the fortran compiler supports the intrinsic function "C_SIZEOF" AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[ + HAVE_C_SIZEOF_FORTRAN="no" AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ PROGRAM main USE ISO_C_BINDING INTEGER(C_INT) :: a @@ -89,8 +91,9 @@ AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[ dnl See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ + HAVE_STORAGE_SIZE_FORTRAN="no" AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ PROGRAM main INTEGER :: a INTEGER :: result @@ -106,6 +109,7 @@ dnl Check to see if -r8 was specified to determine if we need to dnl compile the DOUBLE PRECISION interfaces. AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[ + FORTRAN_DEFAULT_REALisDBLE="no" AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -140,8 +144,7 @@ dnl disable Fortran 2003 if it does not. AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) HAVE_FORTRAN_2003="no" - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ USE iso_c_binding IMPLICIT NONE