diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-04-23 22:16:30 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-04-23 22:16:30 (GMT) |
commit | fbf21b18ee7d83d2ff553ef3f920fba33708ded6 (patch) | |
tree | 94d717921218447e6e736b411f4bd9da97c8252a /m4 | |
parent | 47f189a194fc560af2afc937c1601e4bec733ae8 (diff) | |
download | hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.zip hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.tar.gz hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.tar.bz2 |
[svn-r26917] added conditional for C_LONG_DOUBLE
Diffstat (limited to 'm4')
-rw-r--r-- | m4/aclocal_fc.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index c177143..571ad43 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -111,6 +111,41 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ ]) +dnl Check to see C_LONG_DOUBLE is available, and if it +dnl is different from C_DOUBLE + +AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ + HAVE_C_LONG_DOUBLE_FORTRAN="no" + AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is valid]) + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + 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 + ])], [AC_MSG_RESULT([yes]) + HAVE_C_LONG_DOUBLE_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) +]) + dnl Checking if the compiler supports the required Fortran 2003 features and dnl disable Fortran 2003 if it does not. |