diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/aclocal_fc.f90 | 25 | ||||
-rw-r--r-- | m4/aclocal_fc.m4 | 11 |
2 files changed, 36 insertions, 0 deletions
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 index 245da9b..d485f77 100644 --- a/m4/aclocal_fc.f90 +++ b/m4/aclocal_fc.f90 @@ -55,6 +55,31 @@ PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS ptr = C_LOC(ichr(1:1)) END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS +!---- START ----- Check to see C_BOOL is different from LOGICAL +MODULE l_type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_bool + MODULE PROCEDURE h5t_logical + END INTERFACE +CONTAINS + SUBROUTINE h5t_c_bool(lcb) + LOGICAL(KIND=C_BOOL) :: lcb + END SUBROUTINE h5t_c_bool + SUBROUTINE h5t_logical(l) + LOGICAL :: l + END SUBROUTINE h5t_logical +END MODULE l_type_mod +PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL + USE ISO_C_BINDING + USE l_type_mod + LOGICAL(KIND=C_BOOL) :: lcb + LOGICAL :: l + CALL h5t(lcb) + CALL h5t(l) +END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL +!---- END ------- Check to see C_BOOL is different from LOGICAL + !---- START ----- Check to see C_LONG_DOUBLE is different from C_DOUBLE MODULE type_mod USE ISO_C_BINDING diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 5d7bca9..5e47626 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -131,6 +131,17 @@ AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[ ]) fi +dnl Check if C_BOOL is different from default LOGICAL + +AC_DEFUN([PAC_PROG_FC_C_BOOL_EQ_LOGICAL],[ + C_BOOL_IS_UNIQUE_FORTRAN="no" + AC_MSG_CHECKING([if Fortran C_BOOL is different from default LOGICAL]) + TEST_SRC="`sed -n '/MODULE l_type_mod/,/END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL/p' $srcdir/m4/aclocal_fc.f90`" + AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes]) + C_BOOL_IS_UNIQUE_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. |