1
1

fortran configury: minor updates

* Add a few minor comments
* Rename $OMPI_WANT_FORTRAN_BINDINGS -> $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS
* Minor whitespace cleanups
* Change an "if ..." to an AS_IF
Этот коммит содержится в:
Jeff Squyres 2015-02-23 16:40:41 -08:00 коммит произвёл Gilles Gouaillardet
родитель dd572a0838
Коммит 286c018120
2 изменённых файлов: 29 добавлений и 23 удалений

Просмотреть файл

@ -10,7 +10,7 @@ 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 (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
@ -106,48 +106,56 @@ AC_ARG_ENABLE(mpi-fortran,
AC_HELP_STRING([--enable-mpi-fortran],
[specify which Fortran MPI bindings to build: yes, none (or no), best-effort, mpifh (build only mpif.h support), usempi (build mpif.h and the mpi module), or usempif08 (or all, build mpifh, the mpi module, and the mpi_f08 module) (default: "yes" if Fortran compiler found)]))
# These are the 4 monotonically-rising values indicating levels of
# Fortran bindings support.
OMPI_FORTRAN_NO_BINDINGS=0
OMPI_FORTRAN_MPIFH_BINDINGS=1
OMPI_FORTRAN_USEMPI_BINDINGS=2
OMPI_FORTRAN_USEMPIF08_BINDINGS=3
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
# Set this variable to minimum the level of Fortran bindings support
# that is *required* (i.e., if we can't achieve this level, then
# configure should abort).
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
# Set this variable to the highest level of Fortran bindings support
# that should be attempted. This value will never be <=
# $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS.
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
case "x$enable_mpi_fortran" in
x|xbest-effort)
AC_MSG_RESULT([ (try)])
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
;;
xyes)
AC_MSG_RESULT([yes (default)])
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
;;
xall|xusempif08)
AC_MSG_RESULT([all (usempif08)])
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
;;
xno|xnone)
AC_MSG_RESULT([no (none)])
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
;;
xmpifh)
AC_MSG_RESULT([yes (mpif.h)])
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
;;
xusempi)
AC_MSG_RESULT([yes (mpif.h, mpi module)])
OMPI_WANT_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
;;

Просмотреть файл

@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2007 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 (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
dnl reserved.
@ -85,14 +85,14 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
ompi_fortran_plain=0
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_MPIFH_BINDINGS],
[$OMPI_FORTRAN_MPIFH_BINDINGS],
[Support for mpif.h bindings])
[$OMPI_FORTRAN_MPIFH_BINDINGS],
[Whether we are building support for the mpif.h bindings or not])
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_USEMPI_BINDINGS],
[$OMPI_FORTRAN_USEMPI_BINDINGS],
[Support for use mpi bindings])
[$OMPI_FORTRAN_USEMPI_BINDINGS],
[Whether we are building support for the "use mpi" bindings or not])
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_USEMPIF08_BINDINGS],
[$OMPI_FORTRAN_USEMPIF08_BINDINGS],
[Support for use mpif08 bindings])
[$OMPI_FORTRAN_USEMPIF08_BINDINGS],
[Whether we are building support for the "use mpif08" bindings or not])
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS],
[OMPI_SETUP_FC([ompi_fortran_happy=1])])
@ -117,7 +117,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
# specifically requested. If so, and we weren't able to setup the
# Fortran compiler properly, it's an error.
AS_IF([test $ompi_fortran_happy -eq 0 && \
test $OMPI_WANT_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS],
test $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS],
[AC_MSG_WARN([MPI Fortran bindings requested, but no suitable Fortran compiler found])
AC_MSG_ERROR([Cannot continue])])
@ -543,11 +543,9 @@ end type test_mpi_handle],
# implementation, but for now, I'm just hard-wiring
# OMPI_FORTRAN_NEED_WRAPPER_ROUTINES to 1 when we're
# building the F08 wrappers.
if test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS; then
OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1
else
OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=0
fi
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1],
[OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=0])
AC_MSG_CHECKING([if building Fortran 'use mpi_f08' bindings])
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
@ -557,9 +555,9 @@ end type test_mpi_handle],
AC_MSG_RESULT([no])])
# If Fortran bindings is requested, make sure at least one can be built
AS_IF([test $OMPI_WANT_FORTRAN_BINDINGS -gt $OMPI_BUILD_FORTRAN_BINDINGS],
AS_IF([test $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS -gt $OMPI_BUILD_FORTRAN_BINDINGS],
[AC_MSG_ERROR([Cannot build requested Fortran bindings, aborting])])
# -------------------
# mpif.h final setup
# -------------------