diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2011-09-27 05:02:38 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2011-09-27 05:02:38 (GMT) |
commit | 4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc (patch) | |
tree | 01f90619962c447280074bb8d10ae5c7b2b9acbc /configure | |
parent | a07004c825e3a4e4b61269fd3e5f2b57092f073c (diff) | |
download | hdf5-4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc.zip hdf5-4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc.tar.gz hdf5-4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc.tar.bz2 |
[svn-r21421] Merged the Fortran 2003 changes from the trunk into the 1.8 branch, used:
svn merge -r 20506:21414 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
Tested: jam (gnu, intel, pgi compilers)
Also merged effected non-Fortran files:
svn merge -r21247:r21248 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/src/libhdf5.settings.in
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 178 |
1 files changed, 167 insertions, 11 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 21399 2011-09-19 00:49:38Z hdftest . +# From configure.in Id: configure.in 21416 2011-09-26 00:25:48Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.8.8-snap16. # @@ -713,6 +713,8 @@ ac_ct_CXX CXXFLAGS FORTRAN_DEFAULT_REALisDBLE_F_FALSE FORTRAN_DEFAULT_REALisDBLE_F_TRUE +FORTRAN_2003_CONDITIONAL_F_FALSE +FORTRAN_2003_CONDITIONAL_F_TRUE FORTRAN_HAVE_SIZEOF_FALSE FORTRAN_HAVE_SIZEOF_TRUE FCLIBS @@ -731,6 +733,7 @@ HSIZE_T HADDR_T R_INTEGER R_LARGE +HAVE_FORTRAN_2003 HDF5_INTERFACES am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -761,7 +764,9 @@ GPFS HDF5_HL CXX HDF_CXX +FC2003 FC +HDF_FORTRAN2003 HDF_FORTRAN STATIC_EXEC MPE @@ -859,6 +864,7 @@ enable_maintainer_mode enable_dependency_tracking enable_unsupported enable_fortran +enable_fortran2003 enable_cxx enable_shared enable_static @@ -1543,7 +1549,9 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-unsupported Allow unsupported combinations of configure options - --enable-fortran Compile the Fortran interface [default=no] + --enable-fortran Compile the Fortran 77/90/95 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] @@ -3838,7 +3846,9 @@ $as_echo "done" >&6; } MPE=no STATIC_EXEC=no HDF_FORTRAN=no + HDF_FORTRAN2003=no HDF_FORTRAN=no + HDF_FORTRAN2003=no HDF_CXX=no HDF_CXX=no HDF5_HL=yes @@ -4987,15 +4997,42 @@ 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 + + + +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" + HAVE_FORTRAN_2003="no" + HAVE_ISO_C_BINDING="no" + @@ -6251,8 +6288,6 @@ fi - - { $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; } @@ -6298,16 +6333,125 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ac_ext=c + + 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_n "checking if Fortran compiler supports ISO_C_BINDING module... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + program main +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 +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" = "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_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_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 11; then + HAVE_FORTRAN_2003="yes" + echo $HAVE_FORTRAN_2003 + else + if test -n "$vers_major" && test "$vers_major" = 11 && test -n "$vers_minor" && test "$vers_minor" -gt 6; then + HAVE_FORTRAN_2003="yes" + echo $HAVE_FORTRAN_2003 + else + echo $HAVE_FORTRAN_2003 + as_fn_error $? "Only The Portland Group Compiler, Version >= 11.7-0 F2003 supported; remove --enable-fortran2003" "$LINENO" 5 + fi + fi + fi + + if test "X$HAVE_FORTRAN_2003" = "Xno"; then + echo $HAVE_FORTRAN_2003 + as_fn_error $? "Failed to find a supported F2003 compiler; remove --enable-fortran2003" "$LINENO" 5 + fi + + fi +fi + +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= @@ -6317,6 +6461,14 @@ else FORTRAN_HAVE_SIZEOF_FALSE= fi + if test "X$HAVE_FORTRAN_2003" = "Xyes"; then + FORTRAN_2003_CONDITIONAL_F_TRUE= + FORTRAN_2003_CONDITIONAL_F_FALSE='#' +else + FORTRAN_2003_CONDITIONAL_F_TRUE='#' + FORTRAN_2003_CONDITIONAL_F_FALSE= +fi + if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then FORTRAN_DEFAULT_REALisDBLE_F_TRUE= FORTRAN_DEFAULT_REALisDBLE_F_FALSE='#' @@ -7369,7 +7521,7 @@ $as_echo "none" >&6; } ;; esac -if test "X$HDF_FORTRAN" = "Xyes"; then +if test "X$HDF_FORTRAN" = "Xyes" ; then ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -30062,6 +30214,10 @@ if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then + as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |