2004-01-08 16:34:31 +03:00
|
|
|
dnl -*- shell-script -*-
|
|
|
|
dnl
|
2005-11-05 22:57:48 +03:00
|
|
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
dnl University Research and Technology
|
|
|
|
dnl Corporation. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
dnl of Tennessee Research Foundation. All rights
|
|
|
|
dnl reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
dnl University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
dnl All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
dnl $COPYRIGHT$
|
|
|
|
dnl
|
|
|
|
dnl Additional copyrights may follow
|
|
|
|
dnl
|
2004-01-08 16:34:31 +03:00
|
|
|
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)
|
2004-06-07 19:33:53 +04:00
|
|
|
dnl OMPI_WANT_F77_BINDINGS : (actually set by ompi_configure_options, may be
|
2004-03-28 14:02:38 +04:00
|
|
|
dnl redefined here)
|
|
|
|
dnl FC : Same as F77. Side effect of AC_PROG_FC. Should
|
|
|
|
dnl not be used
|
|
|
|
dnl defines:
|
2004-06-07 19:33:53 +04:00
|
|
|
dnl OMPI_F77 : same as F77
|
|
|
|
dnl OMPI_WANT_F77_BINDINGS :
|
2004-03-28 14:02:38 +04:00
|
|
|
dnl am_conditional:
|
2004-06-07 19:33:53 +04:00
|
|
|
dnl OMPI_WANT_F77_BINDINGS :
|
2004-01-08 16:34:31 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
AC_DEFUN([OMPI_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.
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_show_subtitle "Fortran 77 compiler"
|
2004-01-08 16:34:31 +03:00
|
|
|
|
2004-03-28 14:02:38 +04:00
|
|
|
#
|
|
|
|
# Check for the compiler
|
|
|
|
#
|
|
|
|
# Note that we don't actually *use* the fortran compiler to build
|
2004-06-07 19:33:53 +04:00
|
|
|
# anything in OMPI; it's only used here in configure to find out
|
2004-03-28 14:02:38 +04:00
|
|
|
# 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
|
|
|
|
#
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_fflags_save="$FFLAGS"
|
2005-08-25 02:25:48 +04:00
|
|
|
AC_PROG_F77([gfortran g77 f77 xlf frt ifort pgf77 fort77 fl32 af77])
|
2004-06-07 19:33:53 +04:00
|
|
|
FFLAGS="$ompi_fflags_save"
|
2004-03-28 14:02:38 +04:00
|
|
|
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-06-07 19:33:53 +04:00
|
|
|
OMPI_WANT_F77_BINDINGS=0
|
|
|
|
OMPI_F77="none"
|
2004-03-28 14:02:38 +04:00
|
|
|
BASEF77="none"
|
2005-06-17 05:06:36 +04:00
|
|
|
OMPI_F77_ABSOLUTE="none"
|
2004-01-08 16:34:31 +03:00
|
|
|
else
|
2005-06-17 05:06:36 +04:00
|
|
|
OMPI_F77="$F77"
|
|
|
|
BASEF77="`basename $OMPI_F77`"
|
|
|
|
OMPI_F77_ABSOLUTE="`which $F77`"
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
if test "$OMPI_WANT_F77_BINDINGS" = "0" ; then
|
2004-03-28 14:30:36 +04:00
|
|
|
AC_MSG_WARN([*** Fortran 77 bindings disabled by user])
|
2004-06-07 19:33:53 +04:00
|
|
|
OMPI_WANT_F77_BINDINGS=0
|
2004-01-08 16:34:31 +03:00
|
|
|
else
|
2004-06-07 19:33:53 +04:00
|
|
|
OMPI_WANT_F77_BINDINGS=1
|
2004-01-08 16:34:31 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2006-02-05 04:28:05 +03:00
|
|
|
# make sure the compiler actually works, if not cross-compiling
|
|
|
|
# Don't just use the AC macro so that we can have a pretty
|
|
|
|
# message.
|
|
|
|
AS_IF([test $OMPI_WANT_F77_BINDINGS -eq 1],
|
|
|
|
[OMPI_CHECK_COMPILER_WORKS([Fortran 77], [], [],
|
|
|
|
[AC_MSG_ERROR([Could not run a simple Fortran 77 program. Aborting.])])])
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
AC_DEFINE_UNQUOTED(OMPI_WANT_F77_BINDINGS, $OMPI_WANT_F77_BINDINGS,
|
2004-01-29 06:13:45 +03:00
|
|
|
[Whether we want the MPI f77 bindings or not])
|
2004-06-07 19:33:53 +04:00
|
|
|
AC_DEFINE_UNQUOTED(OMPI_F77, "$OMPI_F77", [OMPI underlying F77 compiler])
|
|
|
|
AM_CONDITIONAL(OMPI_WANT_F77_BINDINGS, test "$OMPI_WANT_F77_BINDINGS" = "1")
|
2005-06-17 05:06:36 +04:00
|
|
|
AC_SUBST(OMPI_F77_ABSOLUTE)
|
2004-01-08 16:34:31 +03:00
|
|
|
])
|