2004-01-08 16:34:31 +03:00
|
|
|
dnl -*- shell-script -*-
|
|
|
|
dnl
|
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
2004-03-28 14:02:38 +04:00
|
|
|
dnl sets:
|
|
|
|
dnl F77 : full pathname to compiler
|
|
|
|
dnl BASEF77 : compiler name (no path)
|
|
|
|
dnl LAM_WANT_F77_BINDINGS : (actually set by lam_configure_options, may be
|
|
|
|
dnl redefined here)
|
|
|
|
dnl FC : Same as F77. Side effect of AC_PROG_FC. Should
|
|
|
|
dnl not be used
|
|
|
|
dnl defines:
|
|
|
|
dnl LAM_F77 : same as F77
|
|
|
|
dnl LAM_WANT_F77_BINDINGS :
|
|
|
|
dnl am_conditional:
|
|
|
|
dnl LAM_WANT_F77_BINDINGS :
|
2004-01-08 16:34:31 +03:00
|
|
|
|
2004-01-15 21:10:26 +03:00
|
|
|
AC_DEFUN([LAM_SETUP_F77],[
|
2004-01-08 16:34:31 +03:00
|
|
|
|
|
|
|
# Modularize this setup so that sub-configure.in scripts can use this
|
|
|
|
# same setup code.
|
|
|
|
|
|
|
|
lam_show_subtitle "Fortran 77 compiler"
|
|
|
|
|
2004-03-28 14:02:38 +04:00
|
|
|
#
|
|
|
|
# Check for the compiler
|
|
|
|
#
|
|
|
|
# Note that we don't actually *use* the fortran compiler to build
|
|
|
|
# anything in LAM; it's only used here in configure to find out
|
|
|
|
# symbol conventions, type sizes, etc. We also pass it down to
|
|
|
|
# the wrapper compiler mpif77.
|
|
|
|
#
|
|
|
|
# Always run this test, even if fortran isn't wanted so that F77 has
|
|
|
|
# value for the Fint tests
|
|
|
|
#
|
|
|
|
lam_fflags_save="$FFLAGS"
|
|
|
|
AC_PROG_F77
|
|
|
|
FFLAGS="$lam_fflags_save"
|
|
|
|
if test -z "$F77"; then
|
2004-03-28 14:30:36 +04:00
|
|
|
AC_MSG_WARN([*** Fortran 77 bindings disabled (could not find compiler)])
|
2004-03-28 14:02:38 +04:00
|
|
|
LAM_WANT_F77_BINDINGS=0
|
2004-03-28 14:52:58 +04:00
|
|
|
LAM_F77="none"
|
2004-03-28 14:02:38 +04:00
|
|
|
BASEF77="none"
|
2004-01-08 16:34:31 +03:00
|
|
|
else
|
2004-03-28 14:02:38 +04:00
|
|
|
if test "$LAM_WANT_F77_BINDINGS" = "0" ; then
|
2004-03-28 14:30:36 +04:00
|
|
|
AC_MSG_WARN([*** Fortran 77 bindings disabled by user])
|
2004-03-28 14:02:38 +04:00
|
|
|
LAM_WANT_F77_BINDINGS=0
|
2004-03-28 14:52:58 +04:00
|
|
|
LAM_F77="$F77"
|
|
|
|
BASEF77="`basename $LAM_F77`"
|
2004-01-08 16:34:31 +03:00
|
|
|
else
|
2004-03-28 14:02:38 +04:00
|
|
|
LAM_WANT_F77_BINDINGS=1
|
2004-03-28 14:52:58 +04:00
|
|
|
LAM_F77="$F77"
|
|
|
|
BASEF77="`basename $LAM_F77`"
|
2004-01-08 16:34:31 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2004-03-28 14:02:38 +04:00
|
|
|
AC_DEFINE_UNQUOTED(LAM_WANT_F77_BINDINGS, $LAM_WANT_F77_BINDINGS,
|
2004-01-29 06:13:45 +03:00
|
|
|
[Whether we want the MPI f77 bindings or not])
|
2004-03-28 14:52:58 +04:00
|
|
|
AC_DEFINE_UNQUOTED(LAM_F77, "$LAM_F77", [LAM underlying F77 compiler])
|
2004-03-28 14:02:38 +04:00
|
|
|
AM_CONDITIONAL(LAM_WANT_F77_BINDINGS, test "$LAM_WANT_F77_BINDINGS" = "1")
|
2004-01-08 16:34:31 +03:00
|
|
|
])
|