]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/compile.at (GNU Fortran 77): Be robust to compilers that
authorAkim Demaille <akim@epita.fr>
Tue, 12 Dec 2000 11:40:21 +0000 (11:40 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 12 Dec 2000 11:40:21 +0000 (11:40 +0000)
choke on `--version'.

ChangeLog
tests/compile.at

index 5fd821d6c709bb9fac4923468799e19748134f62..2aa16a82c7f0397e0c15e77d8ebcd7807faea460 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-12  Akim Demaille  <akim@epita.fr>
+
+       * tests/compile.at (GNU Fortran 77): Be robust to compilers that
+       choke on `--version'.
+
 2000-12-12  Akim Demaille  <akim@epita.fr>
 
        * tests/suite.at: Run `tools.at' first.
index f72f0f40f15cbb0149ce13d41956323a2909294d..ec8214ab97a3fc1a125a6d4ef6af61f95911a09d 100644 (file)
@@ -111,9 +111,13 @@ AT_CHECK_MACRO([GNU Fortran 77],
 [[AC_LANG(Fortran 77)
 AC_LANG_COMPILER
 
-case `$F77 --version`,$G77 in
-  *GNU*,yes) ;;
-  *GNU*,no ) AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler]);;
-     *,yes ) AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler]);;
+if $F77 --version 2> /dev/null | grep GNU >/dev/null; then
+  # Has GNU in --version.
+  test $G77 = no &&
+    AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler]);;
+else
+  # Has not.
+  test $g77 = yes &&
+    AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler]);;
 esac
 exit 0]])