4eba48b430
- fix the --with-f90-max-array-dim configure switch - fix configure test to find the supported f90 linker switch to find fortran modules - Unbelievably, some versions of sh (cough cough Solaris 9 cough cough) actually seem to internally perform a "cd" into a subdirectory when you run "./foo/bar", such that if you try to source a script in the top-level directory in the bar script (i.e., ". some_script" in the bar script), it will try to run it in the "foo" subdirectory, rather than the top-level directory! #$@#$%#$% So we have to pass in the pwd to the scripts so that they know where some_script is. - Reworked much of ompi/mpi/f90/Makefile.am for lots of reasons. See the internal comments (mostly having to do with dependency stuff -- Libtool does not apparently support F90, so we can only build the F90 library statically. This commit was SVN r6993.
81 строка
2.0 KiB
Bash
81 строка
2.0 KiB
Bash
dnl -*- shell-script -*-
|
|
dnl
|
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
dnl All rights reserved.
|
|
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
dnl All rights reserved.
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
dnl University of Stuttgart. All rights reserved.
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
dnl All rights reserved.
|
|
dnl $COPYRIGHT$
|
|
dnl
|
|
dnl Additional copyrights may follow
|
|
dnl
|
|
dnl $HEADER$
|
|
dnl
|
|
|
|
AC_DEFUN([OMPI_F90_FIND_MODULE_INCLUDE_FLAG],[
|
|
|
|
AC_MSG_CHECKING([for FORTRAN compiler module include flag])
|
|
possible_flags="-I -p -M"
|
|
|
|
mkdir conftest.$$
|
|
cd conftest.$$
|
|
|
|
#
|
|
# Try to compile an F90 module
|
|
#
|
|
|
|
mkdir subdir
|
|
cd subdir
|
|
cat > conftest-module.f90 <<EOF
|
|
module OMPI_MOD_FLAG
|
|
|
|
type OMPI_MOD_FLAG_TYPE
|
|
integer :: i
|
|
end type OMPI_MOD_FLAG_TYPE
|
|
|
|
end module OMPI_MOD_FLAG
|
|
EOF
|
|
|
|
OMPI_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 -c conftest-module.f90], ,
|
|
AC_MSG_RESULT([Whoops!])
|
|
AC_MSG_WARN([*** Cannot seem to compile an f90 module])
|
|
AC_MSG_ERROR([Cannot continue]))
|
|
cd ..
|
|
|
|
#
|
|
# Now try to compile a simple program usinng that module, iterating
|
|
# through the possible flags that the compiler might use
|
|
#
|
|
|
|
cat > conftest.f90 <<EOF
|
|
program main
|
|
use OMPI_MOD_FLAG
|
|
end program main
|
|
EOF
|
|
|
|
OMPI_FC_MODULE_FLAG=
|
|
for flag in $possible_flags; do
|
|
if test "$OMPI_FC_MODULE_FLAG" = ""; then
|
|
OMPI_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 ${flag}subdir],
|
|
[OMPI_FC_MODULE_FLAG="$flag"])
|
|
fi
|
|
done
|
|
cd ..
|
|
rm -rf conftest.$$
|
|
|
|
#
|
|
# Did we find it?
|
|
#
|
|
|
|
if test "$OMPI_FC_MODULE_FLAG" = ""; then
|
|
AC_MSG_RESULT([])
|
|
AC_MSG_WARN([*** Could not determine the f90 compiler flag to indicate where modules reside])
|
|
AC_MSG_ERROR([Cannot continue])
|
|
fi
|
|
AC_MSG_RESULT([$OMPI_FC_MODULE_FLAG])
|
|
|
|
AC_SUBST(OMPI_FC_MODULE_FLAG)])dnl
|