mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r5916] Purpose:
Bug Fix Description: Sometimes, we needed to pick up a header file in the current build directory. Solution: Added a test to see if the compiler can handle the "-I." option so that it will get that header file. Platforms tested: Modi4
This commit is contained in:
parent
85ebef607f
commit
e5d5634456
@ -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 -------------------------------------------------------------------------
|
||||
|
||||
@ -261,6 +270,37 @@ AC_SUBST(F9XMODEXT)
|
||||
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
|
||||
|
42
fortran/configure
vendored
42
fortran/configure
vendored
@ -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*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user