From e07b6ac562422d0ce3d63f209619f808b854f0b2 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 17 Oct 2015 11:12:37 +0000 Subject: [PATCH] psblas-3.3-maint: Fix modflag. --- config/ax_f90_module_flag.m4 | 7 ++++--- configure | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/ax_f90_module_flag.m4 b/config/ax_f90_module_flag.m4 index e5b76bb1..c723d952 100644 --- a/config/ax_f90_module_flag.m4 +++ b/config/ax_f90_module_flag.m4 @@ -26,6 +26,7 @@ while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do done mkdir tmpdir_$i cd tmpdir_$i +ac_ext='f90'; AC_COMPILE_IFELSE([ module conftest_module contains @@ -34,7 +35,7 @@ AC_COMPILE_IFELSE([ end subroutine conftest_routine end module conftest_module ],[],[]) -cd .. +cd ..; ax_cv_f90_modflag="not found" for ax_flag in "-I " "-M" "-p"; do if test "$ax_cv_f90_modflag" = "not found" ; then @@ -50,8 +51,8 @@ for ax_flag in "-I " "-M" "-p"; do fi done rm -fr tmpdir_$i -if test "$ax_flag" = "not found" ; then - AC_MSG_ERROR([unable to find compiler flag for modules inclusion]) +if test "$ax_cv_f90_modflag" = "not found" ; then + AC_MSG_ERROR([unable to find compiler flag for modules inclusion]) fi AC_LANG_POP(Fortran) ])]) diff --git a/configure b/configure index d144edb6..ee1c65c3 100755 --- a/configure +++ b/configure @@ -6731,6 +6731,7 @@ while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do done mkdir tmpdir_$i cd tmpdir_$i +ac_ext='f90'; cat > conftest.$ac_ext <<_ACEOF module conftest_module @@ -6745,7 +6746,7 @@ if ac_fn_fc_try_compile "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -cd .. +cd ..; ax_cv_f90_modflag="not found" for ax_flag in "-I " "-M" "-p"; do if test "$ax_cv_f90_modflag" = "not found" ; then @@ -6767,8 +6768,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done rm -fr tmpdir_$i -if test "$ax_flag" = "not found" ; then - as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 +if test "$ax_cv_f90_modflag" = "not found" ; then + as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS'