From 57f01592f0403ac6cf3e986db76bc0b65845f084 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 23 Apr 2012 19:18:43 +0000 Subject: [PATCH] It is not a configure error if the Fortran compiler does not support optional arguments; it just means that we won't build the mpi_f08 bindings. This commit was SVN r26312. --- ompi/config/fortran_check_optional_args.m4 | 23 ++++++++++++++-------- ompi/config/ompi_setup_mpi_fortran.m4 | 3 ++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ompi/config/fortran_check_optional_args.m4 b/ompi/config/fortran_check_optional_args.m4 index 5e281c4ead..e6d42f3f30 100644 --- a/ompi/config/fortran_check_optional_args.m4 +++ b/ompi/config/fortran_check_optional_args.m4 @@ -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) 2010-2011 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -84,16 +84,23 @@ EOF OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c], [OPAL_LOG_COMMAND([$FC $FCFLAGS conftestf.f90 conftest.o -o conftest $LDFLAGS $LIBS], - [happy="yes"], [happy="no"])], [happy="no"]) + [happy="yes"], [happy="no"])], + [happy="c_fail"]) - if test "$happy" = "no" ; then - AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Could not determine if Fortran compiler supports optional arguments]) - fi + AS_IF([test "$happy" = "c_fail"], + [AC_MSG_RESULT([error]) + AC_MSG_ERROR([This error should not happen -- contact the Open MPI developers]) + ]) + + AS_IF([test "$happy" = "no"], + [AC_MSG_RESULT([unknown]) + AC_MSG_WARN([Cannot determine if Fortran compiler supports optional arguments]) + AC_MSG_WARN([Assuming: no]) + ]) AS_IF([test "$cross_compiling" = "yes"], - [AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Can not determine if Fortran compiler supports optional arguments when cross-compiling])], + [AC_MSG_RESULT([cross-compiling]) + AC_MSG_ERROR([Cannot determine if Fortran compiler supports optional arguments when cross-compiling])], [OPAL_LOG_COMMAND([./conftest], [ompi_cv_fortran_optional_args=yes]) ]) diff --git a/ompi/config/ompi_setup_mpi_fortran.m4 b/ompi/config/ompi_setup_mpi_fortran.m4 index 14de713a47..f19f02ee16 100644 --- a/ompi/config/ompi_setup_mpi_fortran.m4 +++ b/ompi/config/ompi_setup_mpi_fortran.m4 @@ -347,7 +347,8 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [ # Does the compiler have optional arguments? OMPI_FORTRAN_CHECK_OPTIONAL_ARGS( [OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=1], - [OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0])]) + [OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0 + OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0])]) OMPI_FORTRAN_HAVE_PRIVATE=0 AS_IF([test $OMPI_WANT_FORTRAN_USEMPIF08_BINDINGS -eq 1 -a \