From 3eb2a3141af1ff3c5aaa2fbe638707da710afa74 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 4 Aug 2009 21:37:10 +0000 Subject: [PATCH] These changes appear to make us play nicely with AC 2.64. I'm not sure ''why'' these changes are necessary -- they don't really have any functional difference. Strange... This commit was SVN r21759. --- config/ompi_setup_cxx.m4 | 4 ++-- config/ompi_setup_f77.m4 | 10 +++++++++- config/ompi_setup_f90.m4 | 9 ++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/config/ompi_setup_cxx.m4 b/config/ompi_setup_cxx.m4 index 77bb65cf8a..d1767e7d86 100644 --- a/config/ompi_setup_cxx.m4 +++ b/config/ompi_setup_cxx.m4 @@ -62,8 +62,8 @@ AC_DEFUN([_OMPI_SETUP_CXX_COMPILER],[ # case #1 or #3) ompi_cxxflags_save="$CXXFLAGS" - AC_PROG_CXX - AC_PROG_CXXCPP + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PROG_CXXCPP]) BASECXX="`basename $CXX`" CXXFLAGS="$ompi_cxxflags_save" diff --git a/config/ompi_setup_f77.m4 b/config/ompi_setup_f77.m4 index f0cf5b17f6..b858fb60fb 100644 --- a/config/ompi_setup_f77.m4 +++ b/config/ompi_setup_f77.m4 @@ -13,6 +13,7 @@ dnl All rights reserved. dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights dnl reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -32,6 +33,11 @@ dnl OMPI_WANT_F77_BINDINGS : dnl am_conditional: dnl OMPI_WANT_F77_BINDINGS : +# See note below about why this macro exists +AC_DEFUN([OMPI_PROG_F77],[ + AC_PROG_F77([gfortran g77 f77 xlf frt ifort pgf77 fort77 fl32 af77]) +]) + AC_DEFUN([OMPI_SETUP_F77],[ # Modularize this setup so that sub-configure.in scripts can use this @@ -51,7 +57,9 @@ ompi_show_subtitle "Fortran 77 compiler" # value for the Fint tests # ompi_fflags_save="$FFLAGS" -AC_PROG_F77([gfortran g77 f77 xlf frt ifort pgf77 fort77 fl32 af77]) +# Strangeness in AC2.64 forces us to require a macro that calls +# PROG_FC instead of calling it directly. Weird. +AC_REQUIRE([OMPI_PROG_F77]) FFLAGS="$ompi_fflags_save" if test -z "$F77"; then AC_MSG_WARN([*** Fortran 77 bindings disabled (could not find compiler)]) diff --git a/config/ompi_setup_f90.m4 b/config/ompi_setup_f90.m4 index 5f28e754d1..fd3f5b868d 100644 --- a/config/ompi_setup_f90.m4 +++ b/config/ompi_setup_f90.m4 @@ -34,6 +34,11 @@ dnl OMPI_WANT_F90_BINDINGS : dnl am_conditional: dnl OMPI_WANT_F90_BINDINGS : +# See note below about why this macro exists +AC_DEFUN([OMPI_PROG_FC],[ + AC_PROG_FC([gfortran f95 fort xlf95 ifort ifc efc pgf95 lf95 f90 xlf90 pgf90 epcf90]) +])dnl + AC_DEFUN([OMPI_SETUP_F90],[ AC_REQUIRE([AC_PROG_GREP]) @@ -80,7 +85,9 @@ else # ompi_fcflags_save="$FCFLAGS" - AC_PROG_FC([gfortran f95 fort xlf95 ifort ifc efc pgf95 lf95 f90 xlf90 pgf90 epcf90]) + # Strangeness in AC2.64 forces us to require a macro that calls + # PROG_FC instead of calling it directly. Weird. + AC_REQUIRE([OMPI_PROG_FC]) FCFLAGS="$ompi_fcflags_save" if test -z "$FC"; then AC_MSG_WARN([*** Fortran 90/95 bindings disabled (could not find compiler)])