diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 142 |
1 files changed, 95 insertions, 47 deletions
@@ -1805,10 +1805,10 @@ fi } # ac_fn_fc_try_compile -# ac_fn_c_try_link LINENO -# ----------------------- +# ac_fn_fc_try_link LINENO +# ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +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 @@ -1828,7 +1828,7 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -1849,12 +1849,12 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_link +} # ac_fn_fc_try_link -# ac_fn_fc_try_link LINENO -# ------------------------ +# ac_fn_c_try_link LINENO +# ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext @@ -1874,7 +1874,7 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -1895,7 +1895,7 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_fc_try_link +} # ac_fn_c_try_link # ac_fn_cxx_try_compile LINENO # ---------------------------- @@ -5728,6 +5728,46 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. + + { $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" + HAVE_F2003_REQUIREMENTS="no" + cat > conftest.$ac_ext <<_ACEOF + program main + + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + + end +_ACEOF +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 +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_exeext conftest.$ac_ext + + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + else + HAVE_FORTRAN_2003="yes" + fi + ## -------------------------------------------------------------------- ## Define wrappers for the C compiler to use Fortran function names ## @@ -6492,6 +6532,49 @@ rm -f core conftest.err conftest.$ac_objext \ + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE + + HAVE_C_LONG_DOUBLE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 +$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_LONG_DOUBLE_FORTRAN="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 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 as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 @@ -6515,45 +6598,10 @@ $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h fi + if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then - ## Checking if the compiler supports the required Fortran 2003 features and - ## disable Fortran 2003 if it does not. - - { $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" - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - +$as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - - ptr = C_LOC(ichr(1:1)) - - - end -_ACEOF -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 -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_exeext conftest.$ac_ext - - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" fi else FC="no" |