From 1c78dd25cd4110301930bb36c78369c13cbeb93e Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 4 Mar 2011 21:25:06 +0100 Subject: [PATCH] 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. Signed-off-by: Ralf Wildenhues --- ChangeLog | 6 ++++++ tests/fortran.at | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2033f55..085e7a96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-03-04 Ralf Wildenhues + 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, diff --git a/tests/fortran.at b/tests/fortran.at index f0fec7cd..87403a7e 100644 --- a/tests/fortran.at +++ b/tests/fortran.at @@ -32,17 +32,19 @@ AT_CHECK_MACRO([GNU Fortran 77], [[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]) -- 2.47.2