summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/acsite.m446
-rwxr-xr-xfortran/configure42
-rw-r--r--fortran/configure.in12
3 files changed, 97 insertions, 3 deletions
diff --git a/fortran/acsite.m4 b/fortran/acsite.m4
index 940a584..74da0dc 100644
--- a/fortran/acsite.m4
+++ b/fortran/acsite.m4
@@ -1,11 +1,20 @@
dnl -------------------------------------------------------------------------
dnl -------------------------------------------------------------------------
dnl
+dnl Copyright by the Board of Trustees of the University of Illinois.
+dnl All rights reserved.
+dnl
+dnl This file is part of HDF5. The full HDF5 copyright notice, including
+dnl terms governing use, modification, and redistribution, is contained in
+dnl the files COPYING and Copyright.html. COPYING can be found at the root
+dnl of the source code distribution tree; Copyright.html can be found at the
+dnl root level of an installed copy of the electronic HDF5 document set and
+dnl is linked from the top-level documents page. It can also be found at
+dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
+dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
+dnl
dnl Macros for HDF5 Fortran
dnl
-dnl Copyright (C) 2000, 2002
-dnl National Center for Supercomputing Applications.
-dnl All rights reserved.
dnl -------------------------------------------------------------------------
dnl -------------------------------------------------------------------------
@@ -262,6 +271,37 @@ rm -rf conftest*
])
dnl -------------------------------------------------------------------------
+dnl AC_TRY_FCOMPILE()
+dnl
+dnl Check if we can compile a simple Fortran 90 program.
+dnl
+dnl AC_TRY_FCOMPILE(FUNCTION-BODY,
+dnl [ACTION-IF-SUCCESS], [ACTION-IF-NOT-SUCCESS])
+dnl
+AC_DEFUN([AC_TRY_FCOMPILE],
+[AC_LANG_SAVE
+AC_LANG_FORTRAN9X
+
+test -d conftestdir || mkdir conftestdir
+cd conftestdir
+rm -rf *
+
+cat >conftest.$ac_ext <<EOF
+ $1
+EOF
+
+if AC_TRY_EVAL(ac_compile); then
+ :
+ [$2]
+else
+ :
+ [$3]
+fi
+cd ..
+rm -rf conftest*
+])
+
+dnl -------------------------------------------------------------------------
dnl AC_TRY_FLINK()
dnl
dnl Check if we can link a simple Fortran 90 program.
diff --git a/fortran/configure b/fortran/configure
index bb32a65..aa08f1b 100755
--- a/fortran/configure
+++ b/fortran/configure
@@ -8075,6 +8075,48 @@ ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $L
cross_compiling=$ac_cv_prog_f9x_cross
+FFLAGS_saved=$FFLAGS
+FFLAGS="$FFLAGS -I."
+
+echo "$as_me:$LINENO: checking if compiler supports -I. option" >&5
+echo $ECHO_N "checking if compiler supports -I. option... $ECHO_C" >&6
+
+
+ac_ext=f90
+ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5'
+ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_f9x_cross
+
+
+test -d conftestdir || mkdir conftestdir
+cd conftestdir
+rm -rf *
+
+cat >conftest.$ac_ext <<EOF
+
+ program conftest
+ end
+
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ :
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ :
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ FFLAGS="$FFLAGS_saved"
+fi
+cd ..
+rm -rf conftest*
+
+
diff --git a/fortran/configure.in b/fortran/configure.in
index e894841..8385b03 100644
--- a/fortran/configure.in
+++ b/fortran/configure.in
@@ -407,6 +407,18 @@ AC_CACHE_SAVE
dnl Change back to the Fortran 90 language
AC_LANG_FORTRAN9X
+dnl See if the compiler will support the "-I." option
+FFLAGS_saved=$FFLAGS
+FFLAGS="$FFLAGS -I."
+
+AC_MSG_CHECKING(if compiler supports -I. option)
+AC_TRY_FCOMPILE([
+ program conftest
+ end
+], AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ FFLAGS="$FFLAGS_saved")
+
dnl ----------------------------------------------------------------------
dnl The following variables are used to distinguish between building a
dnl serial and parallel library.