2011-03-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ tests: accept f2c/fort77 as GNU Fortran 77.
+ * tests/fortran.at (GNU Fortran 77): Try to detect f2c wrapper
+ fort77 as GNU as well: it defines __GNUC__ too. Fixes testsuite
+ failure when f77 is fort77.
+ Report from Giulio Paci.
+
docs: macro synopses document default failure cases.
* doc/autoconf.texi (Fortran Compiler, Obsolete Macros):
Document failure case for AC_F77_DUMMY_MAIN, AC_FC_DUMMY_MAIN,
[[AC_LANG(Fortran 77)
AC_LANG_COMPILER
-if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]); then
+: > conftest.f
+if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]) \
+ || AC_TRY_COMMAND([$F77 -v -c conftest.f 2>&1 | grep "f2c " >&2]); then
# Be sure to remove files which might be created by compilers that
- # don't support --version.
- rm -f a.exe a.out
+ # don't support --version, or by the second compile.
+ rm -f a.exe a.out conftest.f conftest.$ac_objext
# Has GNU in --version.
test "$G77" != yes &&
AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler])
else
# Be sure to remove files which might be created by compilers that
- # don't support --version.
- rm -f a.exe a.out
+ # don't support --version, or by the second compile.
+ rm -f a.exe a.out conftest.f conftest.$ac_objext
# Has not.
test "$G77" = yes &&
AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler])