commit ac89710a97cd83a809163cc4f439b58c707cf0d3 Author: Jeroen Demeyer Date: Fri Jun 15 11:40:23 2012 +0200 _AC_PROG_FC_V: use -### instead of -v to detect linker options diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index 3803595..bd3c58e 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -574,10 +574,16 @@ esac # _AC_PROG_FC_V # ------------- # -# Determine the flag that causes the Fortran compiler to print -# information of library and object files (normally -v) +# Determine the flag that causes the Fortran compiler to print what +# it is doing: which library / object files are linked in. # Needed for _AC_FC_LIBRARY_FLAGS -# Some compilers don't accept -v (Lahey: (-)-verbose, xlf: -V, Fujitsu: -###) +# +# gfortran prefers -### for this. With -###, the compiler/linker is not +# actually run, it is printed to stderr what would happen. This is +# better than -v because running the compiler/linker might print +# warnings which confuse this script. +# +# Many other compilers use -v; Lahey uses (-)-verbose; xlf uses -V AC_DEFUN([_AC_PROG_FC_V], [_AC_FORTRAN_ASSERT()dnl AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]], @@ -585,7 +591,7 @@ AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_[]_AC_LANG_ABBREV[]_v= # Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do +for ac_verb in -\#\#\# -v -verbose --verbose -V; do _AC_PROG_FC_V_OUTPUT($ac_verb) # look for -l* and *.a constructs in the output for ac_arg in $ac_[]_AC_LANG_ABBREV[]_v_output; do