diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index f20b029..2e640f2 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -578,6 +578,8 @@ esac # information of library and object files (normally -v) # Needed for _AC_FC_LIBRARY_FLAGS # Some compilers don't accept -v (Lahey: (-)-verbose, xlf: -V, Fujitsu: -###) +# Fujitsu accepts --verbose and passes it to the linker, which doesn't yield +# the desired result. Therefore test for -### before testing for --verbose. AC_DEFUN([_AC_PROG_FC_V], [_AC_FORTRAN_ASSERT()dnl AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]], @@ -585,7 +587,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 -V -\#\#\# --verbose; 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