diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2008-09-30 16:36:29 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2008-09-30 16:36:29 (GMT) |
commit | b8ed65ed6249564e91df0ff9de302edead2e5b6f (patch) | |
tree | a8faebf221c12b57ff918b61452cbb43afd47fdc /configure.in | |
parent | 0cd5c3edb290cf9f7c7f80c04afc9397bc0bf3c9 (diff) | |
download | hdf5-b8ed65ed6249564e91df0ff9de302edead2e5b6f.zip hdf5-b8ed65ed6249564e91df0ff9de302edead2e5b6f.tar.gz hdf5-b8ed65ed6249564e91df0ff9de302edead2e5b6f.tar.bz2 |
[svn-r15725] Description:
Made changes to reflect the changes made in the fortran directory; merged the fortran trunk into the 1.8 branch.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/configure.in b/configure.in index e190e72..1f0e404 100644 --- a/configure.in +++ b/configure.in @@ -318,6 +318,10 @@ AC_ARG_ENABLE([fortran], [Compile the Fortran interface [default=no]])], [HDF_FORTRAN=$enableval]) + +HAVE_SIZEOF="no" +FORTRAN_DEFAULT_REALisDBLE="no" + if test "X$HDF_FORTRAN" = "Xyes"; then echo "yes" @@ -381,12 +385,59 @@ dnl ], AC_MSG_RESULT(yes), dnl AC_MSG_RESULT(no) dnl FCFLAGS="$FCFLAGS_saved") +dnl -------------------------------------------------------------------- +dnl See if the fortran compiler supports the intrinsic function "SIZEOF" + + AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) + AC_TRY_RUN([ + PROGRAM main + i = sizeof(x) + END PROGRAM + ], [AC_MSG_RESULT(yes) + HAVE_SIZEOF="yes"], + AC_MSG_RESULT(no)) + + +dnl Check to see if -r8 was specified to determine if we need to +dnl compile the DOUBLE PRECISION interfaces. + + + AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) + + AC_TRY_RUN([ + MODULE type_mod + INTERFACE h5t + MODULE PROCEDURE h5t_real + MODULE PROCEDURE h5t_dble + END INTERFACE + CONTAINS + SUBROUTINE h5t_real(r) + REAL :: r + END SUBROUTINE h5t_real + SUBROUTINE h5t_dble(d) + DOUBLE PRECISION :: d + END SUBROUTINE h5t_dble + END MODULE type_mod + PROGRAM main + USE type_mod + REAL :: r + DOUBLE PRECISION :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + ], + AC_MSG_RESULT(no), + [AC_MSG_RESULT(yes) + FORTRAN_DEFAULT_REALisDBLE="yes"]) dnl Change back to the C language AC_LANG_POP(Fortran) else echo "no" fi +AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) + dnl ---------------------------------------------------------------------- dnl Check if they would like the C++ interface compiled dnl @@ -835,10 +886,14 @@ if test "X${HDF_FORTRAN}" = "Xyes"; then H5_FORTRAN_SHARED="no" fi - if (${FC} -V 2>&1 | grep '^Intel(R) Fortran Compiler') > /dev/null; then - H5_FORTRAN_SHARED="no" + if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then + if (${FC} -v 2>&1 | grep '^Version 8.') > /dev/null; then + H5_FORTRAN_SHARED="no" + else +dnl echo 'adding fortran compiler flag needed for building shared libraries' + FCFLAGS="${FCFLAGS} -fPIC" + fi fi - if (${FC} +version 2>&1 | grep '^HP F90') > /dev/null; then H5_FORTRAN_SHARED="no" fi |