diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1332,23 +1332,6 @@ ## Restore FFLAGS. FFLAGS="$save_FFLAGS" -## If necessary, try again with -ff2c in FFLAGS -if test $ax_blas_ok = no; then - save_FFLAGS="$FFLAGS" - FFLAGS="-ff2c $FFLAGS $F77_INTEGER_8_FLAG" - - AX_BLAS_WITH_F77_FUNC([:], [:]) - AX_LAPACK([:], [:]) - - ## Restore FFLAGS, with -ff2c if that was helpful - - if test $ax_blas_ok = yes; then - FFLAGS="-ff2c $save_FFLAGS" - else - FFLAGS="$save_FFLAGS" - fi -fi - ## On OSX, try again with a wrapper library (without -ff2c!) if test $ax_blas_ok = no; then case $host_os in @@ -1391,6 +1374,23 @@ esac fi +## If necessary, try again with -ff2c in FFLAGS +if test $ax_blas_ok = no; then + save_FFLAGS="$FFLAGS" + FFLAGS="-ff2c $FFLAGS $F77_INTEGER_8_FLAG" + + AX_BLAS_WITH_F77_FUNC([:], [:]) + AX_LAPACK([:], [:]) + + ## Restore FFLAGS, with -ff2c if that was helpful + + if test $ax_blas_ok = yes; then + FFLAGS="-ff2c $save_FFLAGS" + else + FFLAGS="$save_FFLAGS" + fi +fi + if test $ax_blas_ok = no; then if test $USE_64_BIT_IDX_T = yes && test "$ax_blas_integer_size_ok" = no; then ## Attempt to be more informative.