]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
tests: accept f2c/fort77 as GNU Fortran 77.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 4 Mar 2011 20:25:06 +0000 (21:25 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 4 Mar 2011 20:25:06 +0000 (21:25 +0100)
* 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 <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/fortran.at

index b2033f55ec7c3df423ceaa78cb3b1c82d51cbeb9..085e7a96bbdb536461bf493f35839d142e02e2ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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,
index f0fec7cdb845248ab04f779981df7fcc4ca64d01..87403a7e39d7462877a92548561ffc7e6e9ce095 100644 (file)
@@ -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])