summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-23 22:16:30 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-23 22:16:30 (GMT)
commitfbf21b18ee7d83d2ff553ef3f920fba33708ded6 (patch)
tree94d717921218447e6e736b411f4bd9da97c8252a /configure
parent47f189a194fc560af2afc937c1601e4bec733ae8 (diff)
downloadhdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.zip
hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.tar.gz
hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.tar.bz2
[svn-r26917] added conditional for C_LONG_DOUBLE
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure142
1 files changed, 95 insertions, 47 deletions
diff --git a/configure b/configure
index 01fcbe4..4f26f17 100755
--- a/configure
+++ b/configure
@@ -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"