diff --git a/config/lam_configure_options.m4 b/config/lam_configure_options.m4 index c11943c4bb..dd52b96c07 100644 --- a/config/lam_configure_options.m4 +++ b/config/lam_configure_options.m4 @@ -115,8 +115,6 @@ else AC_MSG_RESULT([no]) WANT_MPI_F77=0 fi -AC_DEFINE_UNQUOTED(LAM_ENABLE_MPI_F77, $WANT_MPI_F77, - [Whether we want the MPI f77 bindings or not]) # # MPI profiling @@ -152,8 +150,6 @@ else AC_MSG_RESULT([no]) WANT_MPI_F90=0 fi -AC_DEFINE_UNQUOTED(LAM_ENABLE_MPI_F90, $WANT_MPI_F90, - [Whether we want the MPI f90 bindings or not]) # # Do we want -llam/-lmpi, or just -lmpi? diff --git a/config/lam_setup_f77.m4 b/config/lam_setup_f77.m4 index d1670a7eb3..dce2b509a3 100644 --- a/config/lam_setup_f77.m4 +++ b/config/lam_setup_f77.m4 @@ -13,9 +13,13 @@ lam_show_subtitle "Fortran 77 compiler" if test "$enable_fortran" = "no"; then AC_MSG_WARN([*** Fortran disabled by user]) LAM_WANT_F77=0 + F77=none + BASEF77=none elif test "$enable_f77" = "no"; then AC_MSG_WARN([*** Fortran 77 disabled by user]) LAM_WANT_F77=0 + F77=none + BASEF77=none else # @@ -29,16 +33,20 @@ else lam_fflags_save="$FFLAGS" AC_PROG_F77 - AC_DEFINE_UNQUOTED(LAM_F77, "$F77", [LAM underlying F77 compiler]) FFLAGS="$lam_fflags_save" if test -z "$F77"; then - AC_MSG_WARN([*** Could not find Fortran 77 compiler]) - LAM_WANT_F77=0 + AC_MSG_WARN([*** Could not find Fortran 77 compiler]) + LAM_WANT_F77=0 + F77=none + BASEF77=none else - LAM_WANT_F77=1 - BASEF77="`basename $F77`" + LAM_WANT_F77=1 + BASEF77="`basename $F77`" fi fi +AC_DEFINE_UNQUOTED(LAM_ENABLE_MPI_F77, $LAM_WANT_F77, + [Whether we want the MPI f77 bindings or not]) +AC_DEFINE_UNQUOTED(LAM_F77, "$F77", [LAM underlying F77 compiler]) AM_CONDITIONAL(BUILD_MPI_F77, test "$LAM_WANT_F77" = "1") ]) diff --git a/config/lam_setup_f90.m4 b/config/lam_setup_f90.m4 index 2dd882e14b..fcc5dd1c92 100644 --- a/config/lam_setup_f90.m4 +++ b/config/lam_setup_f90.m4 @@ -13,9 +13,13 @@ lam_show_subtitle "Fortran 90/95 compiler" if test "$enable_fortran" = "no"; then AC_MSG_WARN([*** Fortran disabled by user]) LAM_WANT_F90=0 + FC=none + BASEF90=none elif test "$enable_f90" = "no"; then AC_MSG_WARN([*** Fortran 90/95 disabled by user]) LAM_WANT_F90=0 + FC=none + BASEF90=none else # @@ -29,21 +33,27 @@ else lam_fflags_save="$FFLAGS" AC_PROG_FC - AC_DEFINE_UNQUOTED(LAM_F90, "$FC", [LAM underlying F90 compiler]) FFLAGS="$lam_fflags_save" if test -z "$FC"; then AC_MSG_WARN([*** Could not find Fortran 90/95 compiler]) LAM_WANT_F90=0 + FC=none + BASEF90=none elif test "$FC" = "$F77"; then AC_MSG_WARN([*** Found same compiler for Fortran 77 and 90/95.]) AC_MSG_WARN([*** Assuming no Fortran 90/95 compiler; disabling]) AC_MSG_WARN([*** Fortran 90 MPI bindings.]) LAM_WANT_F90=0 + FC=none + BASEF90=none else LAM_WANT_F90=1 BASEF90="`basename $FC`" fi fi +AC_DEFINE_UNQUOTED(LAM_ENABLE_MPI_F90, $LAM_WANT_F90, + [Whether we want the MPI f90 bindings or not]) +AC_DEFINE_UNQUOTED(LAM_F90, "$FC", [LAM underlying F90 compiler]) AM_CONDITIONAL(BUILD_MPI_F90, test "$LAM_WANT_F90" = "1") ])