From: Akim Demaille Date: Tue, 12 Dec 2000 11:40:21 +0000 (+0000) Subject: * tests/compile.at (GNU Fortran 77): Be robust to compilers that X-Git-Tag: autoconf-2.50~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81ed11fb67433970e1701a1f80b1376744ed622e;p=thirdparty%2Fautoconf.git * tests/compile.at (GNU Fortran 77): Be robust to compilers that choke on `--version'. --- diff --git a/ChangeLog b/ChangeLog index 5fd821d6c..2aa16a82c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-12-12 Akim Demaille + + * tests/compile.at (GNU Fortran 77): Be robust to compilers that + choke on `--version'. + 2000-12-12 Akim Demaille * tests/suite.at: Run `tools.at' first. diff --git a/tests/compile.at b/tests/compile.at index f72f0f40f..ec8214ab9 100644 --- a/tests/compile.at +++ b/tests/compile.at @@ -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]])