summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2011-10-14 05:05:28 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2011-10-14 05:05:28 (GMT)
commit7fbd4ccbb5cf883e0c5bd8e1e0eafcebdc4ef4c3 (patch)
tree89ceb2ddeb308cfe42be5c2bfc5cf5d6d31e7ee3 /configure
parent3b62414fdf2f4fc22b73d77e0bfa0cfd6f80864f (diff)
downloadhdf5-7fbd4ccbb5cf883e0c5bd8e1e0eafcebdc4ef4c3.zip
hdf5-7fbd4ccbb5cf883e0c5bd8e1e0eafcebdc4ef4c3.tar.gz
hdf5-7fbd4ccbb5cf883e0c5bd8e1e0eafcebdc4ef4c3.tar.bz2
[svn-r21559] Description:
Merged r21525 from trunk; removes hard coded compatability checks for F2003 compilers, replaced with a test program for features. Tested: jam (gnu)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure117
1 files changed, 23 insertions, 94 deletions
diff --git a/configure b/configure
index 3a43fc4..c171e86 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Id: configure.in 21525 2011-10-11 23:59:40Z brtnfld .
+# From configure.in Id: configure.in 21541 2011-10-13 13:16:39Z derobins .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for HDF5 1.8.8-snap18.
#
@@ -5014,10 +5014,10 @@ fi
if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then
- echo "yes"
+ echo "no"
as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5
else
- echo "no"
+ echo "yes"
fi
HAVE_SIZEOF="no"
@@ -5031,7 +5031,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
HAVE_FORTRAN_2003="no"
- HAVE_ISO_C_BINDING="no"
+ HAVE_F2003_REQUIREMENTS="no"
@@ -6337,111 +6337,40 @@ 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_n "checking if Fortran compiler supports ISO_C_BINDING module... " >&6; }
+ { $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
-USE iso_c_binding
+
+
+ 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_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- HAVE_ISO_C_BINDING=yes
+ 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_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
+ 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
- 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