]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU):
authorAkim Demaille <akim@epita.fr>
Fri, 19 May 2000 12:55:02 +0000 (12:55 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 19 May 2000 12:55:02 +0000 (12:55 +0000)
Rename as:
(_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): these.
Compute the value of GCC, GXX and G77 here.
Set to `no' (instead of empty) if not the GNU compiler.
(AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust.
* doc/autoconf.texi: Adjust.

ChangeLog
aclang.m4
doc/autoconf.texi
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4

index 8536afd9ba7b552444e9c7ebbad7434efaf6977f..8a1bf72ee08ac0fc056179717c0a1a3d40f987e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-05-19  Akim Demaille  <akim@epita.fr>
+
+       * aclang.m4 (AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU):
+       Rename as:
+       (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): these.
+       Compute the value of GCC, GXX and G77 here.
+       Set to `no' (instead of empty) if not the GNU compiler.
+       (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust.
+       * doc/autoconf.texi: Adjust.
+
 2000-05-19  Akim Demaille  <akim@epita.fr>
 
        Fix Autoconf/106.
index 45e6ca3a7eeb414e143502f2375013218f3ae19b..b7df8c446472fdf78dd309bce4c95220da44054d 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -399,13 +399,7 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 if test "$cross_compiling" != yes; then
   AC_PROG_CC_WORKS
 fi
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
+_AC_PROG_CC_GNU
 
 dnl Check whether -g works, even if CFLAGS is set, in case the package
 dnl plays around with CFLAGS (such as to build both debugging and
@@ -453,9 +447,9 @@ fi
 ])# AC_PROG_CC_WORKS
 
 
-# AC_PROG_CC_GNU
-# --------------
-AC_DEFUN(AC_PROG_CC_GNU,
+# _AC_PROG_CC_GNU
+# ---------------
+define([_AC_PROG_CC_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.c <<EOF
@@ -467,8 +461,13 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
-fi])[]dnl
-])# AC_PROG_CC_GNU
+fi])
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi[]dnl
+])# _AC_PROG_CC_GNU
 
 
 # AC_PROG_CC_G
@@ -599,13 +598,7 @@ AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
 if test "$cross_compiling" != yes; then
   AC_PROG_CXX_WORKS
 fi
-AC_PROG_CXX_GNU
-
-if test $ac_cv_prog_gxx = yes; then
-  GXX=yes
-else
-  GXX=
-fi
+_AC_PROG_CXX_GNU
 
 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
 dnl plays around with CXXFLAGS (such as to build both debugging and
@@ -653,9 +646,9 @@ fi
 ])# AC_PROG_CXX_WORKS
 
 
-# AC_PROG_CXX_GNU
-# ---------------
-AC_DEFUN(AC_PROG_CXX_GNU,
+# _AC_PROG_CXX_GNU
+# ----------------
+define([_AC_PROG_CXX_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.C <<EOF
@@ -667,8 +660,14 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
-fi])[]dnl
-])# AC_PROG_CXX_GNU
+fi])
+
+if test $ac_cv_prog_gxx = yes; then
+  GXX=yes
+else
+  GXX=
+fi[]dnl
+])# _AC_PROG_CXX_GNU
 
 
 # AC_PROG_CXX_G
@@ -703,13 +702,7 @@ AC_CHECK_PROGS(F77,
 if test "$cross_compiling" != yes; then
   AC_PROG_F77_WORKS
 fi
-AC_PROG_F77_GNU
-
-if test $ac_cv_prog_g77 = yes; then
-  G77=yes
-else
-  G77=
-fi
+_AC_PROG_F77_GNU
 
 dnl Check whether -g works, even if FFLAGS is set, in case the package
 dnl plays around with FFLAGS (such as to build both debugging and
@@ -763,12 +756,12 @@ fi
 ])# AC_PROG_F77_WORKS
 
 
-# AC_PROG_F77_GNU
-# ---------------
+# _AC_PROG_F77_GNU
+# ----------------
 # Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77
 # Compiler).  This test depends on whether the Fortran 77 compiler can
 # do CPP pre-processing.
-AC_DEFUN(AC_PROG_F77_GNU,
+define([_AC_PROG_F77_GNU],
 [AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
 [cat >conftest.fpp <<EOF
 #ifdef __GNUC__
@@ -779,7 +772,13 @@ if AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_g77=yes
 else
   ac_cv_prog_g77=no
-fi])])# AC_PROG_F77_GNU
+fi])
+if test $ac_cv_prog_g77 = yes; then
+  G77=yes
+else
+  G77=
+fi[]dnl
+])# _AC_PROG_F77_GNU
 
 
 # AC_PROG_F77_G
index 55bafdc2c088c7b51badfbdbe5ed134c09c4ce1d..ced9da0effe8360dd26cc8cfb7f7c33e8fd1d4e3 100644 (file)
@@ -2353,10 +2353,9 @@ AC_PROG_CC(cl egcs gcc cc)
 @end example
 
 If using the @sc{gnu} C compiler, set shell variable @code{GCC} to
-@samp{yes}, empty otherwise.  If output variable @code{CFLAGS} was not
-already set, set it to @samp{-g -O2} for the @sc{gnu} C compiler
-(@samp{-O2} on systems where GCC does not accept @samp{-g}), or
-@samp{-g} for other compilers.
+@samp{yes}.  If output variable @code{CFLAGS} was not already set, set
+it to @samp{-g -O2} for the @sc{gnu} C compiler (@samp{-O2} on systems
+where GCC does not accept @samp{-g}), or @samp{-g} for other compilers.
 
 If the compiler being used does not produce executables, fail.  If the
 executables can't be run, and cross-compilation is not enabled, fail.
@@ -2431,10 +2430,9 @@ AC_PROG_CXX(cl KCC CC cxx cc++ xlC aCC c++ g++ egcs gcc)
 @end example
 
 If using the @sc{gnu} C++ compiler, set shell variable @code{GXX} to
-@samp{yes}, empty otherwise.  If output variable @code{CXXFLAGS} was not
-already set, set it to @samp{-g -O2} for the @sc{gnu} C++ compiler
-(@samp{-O2} on systems where G++ does not accept @samp{-g}), or
-@samp{-g} for other compilers.
+@samp{yes}.  If output variable @code{CXXFLAGS} was not already set, set
+it to @samp{-g -O2} for the @sc{gnu} C++ compiler (@samp{-O2} on systems
+where G++ does not accept @samp{-g}), or @samp{-g} for other compilers.
 
 If the compiler being used does not produce executables, fail.  If the
 executables can't be run, and cross-compilation is not enabled, fail.
@@ -2477,12 +2475,11 @@ AC_PROG_F77(fl32 f77 fort77 xlf cf77 g77 f90 xlf90 f2c)
 @end example
 
 If using @code{g77} (the @sc{gnu} Fortran 77 compiler), then
-@code{AC_PROG_F77} will set the shell variable @code{G77} to @samp{yes},
-and empty otherwise.  If the output variable @code{FFLAGS} was not
-already set in the environment, then set it to @samp{-g -02} for
-@code{g77} (or @samp{-O2} where @code{g77} does not accept @samp{-g}).
-Otherwise, set @code{FFLAGS} to @samp{-g} for all other Fortran 77
-compilers.
+@code{AC_PROG_F77} will set the shell variable @code{G77} to @samp{yes}.
+If the output variable @code{FFLAGS} was not already set in the
+environment, then set it to @samp{-g -02} for @code{g77} (or @samp{-O2}
+where @code{g77} does not accept @samp{-g}).  Otherwise, set
+@code{FFLAGS} to @samp{-g} for all other Fortran 77 compilers.
 
 If the compiler being used does not produce executables, fail.  If the
 executables can't be run, and cross-compilation is not enabled, fail.
index 45e6ca3a7eeb414e143502f2375013218f3ae19b..b7df8c446472fdf78dd309bce4c95220da44054d 100644 (file)
@@ -399,13 +399,7 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 if test "$cross_compiling" != yes; then
   AC_PROG_CC_WORKS
 fi
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
+_AC_PROG_CC_GNU
 
 dnl Check whether -g works, even if CFLAGS is set, in case the package
 dnl plays around with CFLAGS (such as to build both debugging and
@@ -453,9 +447,9 @@ fi
 ])# AC_PROG_CC_WORKS
 
 
-# AC_PROG_CC_GNU
-# --------------
-AC_DEFUN(AC_PROG_CC_GNU,
+# _AC_PROG_CC_GNU
+# ---------------
+define([_AC_PROG_CC_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.c <<EOF
@@ -467,8 +461,13 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
-fi])[]dnl
-])# AC_PROG_CC_GNU
+fi])
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi[]dnl
+])# _AC_PROG_CC_GNU
 
 
 # AC_PROG_CC_G
@@ -599,13 +598,7 @@ AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
 if test "$cross_compiling" != yes; then
   AC_PROG_CXX_WORKS
 fi
-AC_PROG_CXX_GNU
-
-if test $ac_cv_prog_gxx = yes; then
-  GXX=yes
-else
-  GXX=
-fi
+_AC_PROG_CXX_GNU
 
 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
 dnl plays around with CXXFLAGS (such as to build both debugging and
@@ -653,9 +646,9 @@ fi
 ])# AC_PROG_CXX_WORKS
 
 
-# AC_PROG_CXX_GNU
-# ---------------
-AC_DEFUN(AC_PROG_CXX_GNU,
+# _AC_PROG_CXX_GNU
+# ----------------
+define([_AC_PROG_CXX_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.C <<EOF
@@ -667,8 +660,14 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
-fi])[]dnl
-])# AC_PROG_CXX_GNU
+fi])
+
+if test $ac_cv_prog_gxx = yes; then
+  GXX=yes
+else
+  GXX=
+fi[]dnl
+])# _AC_PROG_CXX_GNU
 
 
 # AC_PROG_CXX_G
@@ -703,13 +702,7 @@ AC_CHECK_PROGS(F77,
 if test "$cross_compiling" != yes; then
   AC_PROG_F77_WORKS
 fi
-AC_PROG_F77_GNU
-
-if test $ac_cv_prog_g77 = yes; then
-  G77=yes
-else
-  G77=
-fi
+_AC_PROG_F77_GNU
 
 dnl Check whether -g works, even if FFLAGS is set, in case the package
 dnl plays around with FFLAGS (such as to build both debugging and
@@ -763,12 +756,12 @@ fi
 ])# AC_PROG_F77_WORKS
 
 
-# AC_PROG_F77_GNU
-# ---------------
+# _AC_PROG_F77_GNU
+# ----------------
 # Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77
 # Compiler).  This test depends on whether the Fortran 77 compiler can
 # do CPP pre-processing.
-AC_DEFUN(AC_PROG_F77_GNU,
+define([_AC_PROG_F77_GNU],
 [AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
 [cat >conftest.fpp <<EOF
 #ifdef __GNUC__
@@ -779,7 +772,13 @@ if AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_g77=yes
 else
   ac_cv_prog_g77=no
-fi])])# AC_PROG_F77_GNU
+fi])
+if test $ac_cv_prog_g77 = yes; then
+  G77=yes
+else
+  G77=
+fi[]dnl
+])# _AC_PROG_F77_GNU
 
 
 # AC_PROG_F77_G
index 45e6ca3a7eeb414e143502f2375013218f3ae19b..b7df8c446472fdf78dd309bce4c95220da44054d 100644 (file)
@@ -399,13 +399,7 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 if test "$cross_compiling" != yes; then
   AC_PROG_CC_WORKS
 fi
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
+_AC_PROG_CC_GNU
 
 dnl Check whether -g works, even if CFLAGS is set, in case the package
 dnl plays around with CFLAGS (such as to build both debugging and
@@ -453,9 +447,9 @@ fi
 ])# AC_PROG_CC_WORKS
 
 
-# AC_PROG_CC_GNU
-# --------------
-AC_DEFUN(AC_PROG_CC_GNU,
+# _AC_PROG_CC_GNU
+# ---------------
+define([_AC_PROG_CC_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.c <<EOF
@@ -467,8 +461,13 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
-fi])[]dnl
-])# AC_PROG_CC_GNU
+fi])
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi[]dnl
+])# _AC_PROG_CC_GNU
 
 
 # AC_PROG_CC_G
@@ -599,13 +598,7 @@ AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
 if test "$cross_compiling" != yes; then
   AC_PROG_CXX_WORKS
 fi
-AC_PROG_CXX_GNU
-
-if test $ac_cv_prog_gxx = yes; then
-  GXX=yes
-else
-  GXX=
-fi
+_AC_PROG_CXX_GNU
 
 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
 dnl plays around with CXXFLAGS (such as to build both debugging and
@@ -653,9 +646,9 @@ fi
 ])# AC_PROG_CXX_WORKS
 
 
-# AC_PROG_CXX_GNU
-# ---------------
-AC_DEFUN(AC_PROG_CXX_GNU,
+# _AC_PROG_CXX_GNU
+# ----------------
+define([_AC_PROG_CXX_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.C <<EOF
@@ -667,8 +660,14 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
-fi])[]dnl
-])# AC_PROG_CXX_GNU
+fi])
+
+if test $ac_cv_prog_gxx = yes; then
+  GXX=yes
+else
+  GXX=
+fi[]dnl
+])# _AC_PROG_CXX_GNU
 
 
 # AC_PROG_CXX_G
@@ -703,13 +702,7 @@ AC_CHECK_PROGS(F77,
 if test "$cross_compiling" != yes; then
   AC_PROG_F77_WORKS
 fi
-AC_PROG_F77_GNU
-
-if test $ac_cv_prog_g77 = yes; then
-  G77=yes
-else
-  G77=
-fi
+_AC_PROG_F77_GNU
 
 dnl Check whether -g works, even if FFLAGS is set, in case the package
 dnl plays around with FFLAGS (such as to build both debugging and
@@ -763,12 +756,12 @@ fi
 ])# AC_PROG_F77_WORKS
 
 
-# AC_PROG_F77_GNU
-# ---------------
+# _AC_PROG_F77_GNU
+# ----------------
 # Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77
 # Compiler).  This test depends on whether the Fortran 77 compiler can
 # do CPP pre-processing.
-AC_DEFUN(AC_PROG_F77_GNU,
+define([_AC_PROG_F77_GNU],
 [AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
 [cat >conftest.fpp <<EOF
 #ifdef __GNUC__
@@ -779,7 +772,13 @@ if AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_g77=yes
 else
   ac_cv_prog_g77=no
-fi])])# AC_PROG_F77_GNU
+fi])
+if test $ac_cv_prog_g77 = yes; then
+  G77=yes
+else
+  G77=
+fi[]dnl
+])# _AC_PROG_F77_GNU
 
 
 # AC_PROG_F77_G
index 45e6ca3a7eeb414e143502f2375013218f3ae19b..b7df8c446472fdf78dd309bce4c95220da44054d 100644 (file)
@@ -399,13 +399,7 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 if test "$cross_compiling" != yes; then
   AC_PROG_CC_WORKS
 fi
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
+_AC_PROG_CC_GNU
 
 dnl Check whether -g works, even if CFLAGS is set, in case the package
 dnl plays around with CFLAGS (such as to build both debugging and
@@ -453,9 +447,9 @@ fi
 ])# AC_PROG_CC_WORKS
 
 
-# AC_PROG_CC_GNU
-# --------------
-AC_DEFUN(AC_PROG_CC_GNU,
+# _AC_PROG_CC_GNU
+# ---------------
+define([_AC_PROG_CC_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.c <<EOF
@@ -467,8 +461,13 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
-fi])[]dnl
-])# AC_PROG_CC_GNU
+fi])
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi[]dnl
+])# _AC_PROG_CC_GNU
 
 
 # AC_PROG_CC_G
@@ -599,13 +598,7 @@ AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gpp CC cxx cc++ cl]), g++)
 if test "$cross_compiling" != yes; then
   AC_PROG_CXX_WORKS
 fi
-AC_PROG_CXX_GNU
-
-if test $ac_cv_prog_gxx = yes; then
-  GXX=yes
-else
-  GXX=
-fi
+_AC_PROG_CXX_GNU
 
 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
 dnl plays around with CXXFLAGS (such as to build both debugging and
@@ -653,9 +646,9 @@ fi
 ])# AC_PROG_CXX_WORKS
 
 
-# AC_PROG_CXX_GNU
-# ---------------
-AC_DEFUN(AC_PROG_CXX_GNU,
+# _AC_PROG_CXX_GNU
+# ----------------
+define([_AC_PROG_CXX_GNU],
 [AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
 cat >conftest.C <<EOF
@@ -667,8 +660,14 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
-fi])[]dnl
-])# AC_PROG_CXX_GNU
+fi])
+
+if test $ac_cv_prog_gxx = yes; then
+  GXX=yes
+else
+  GXX=
+fi[]dnl
+])# _AC_PROG_CXX_GNU
 
 
 # AC_PROG_CXX_G
@@ -703,13 +702,7 @@ AC_CHECK_PROGS(F77,
 if test "$cross_compiling" != yes; then
   AC_PROG_F77_WORKS
 fi
-AC_PROG_F77_GNU
-
-if test $ac_cv_prog_g77 = yes; then
-  G77=yes
-else
-  G77=
-fi
+_AC_PROG_F77_GNU
 
 dnl Check whether -g works, even if FFLAGS is set, in case the package
 dnl plays around with FFLAGS (such as to build both debugging and
@@ -763,12 +756,12 @@ fi
 ])# AC_PROG_F77_WORKS
 
 
-# AC_PROG_F77_GNU
-# ---------------
+# _AC_PROG_F77_GNU
+# ----------------
 # Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77
 # Compiler).  This test depends on whether the Fortran 77 compiler can
 # do CPP pre-processing.
-AC_DEFUN(AC_PROG_F77_GNU,
+define([_AC_PROG_F77_GNU],
 [AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
 [cat >conftest.fpp <<EOF
 #ifdef __GNUC__
@@ -779,7 +772,13 @@ if AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_g77=yes
 else
   ac_cv_prog_g77=no
-fi])])# AC_PROG_F77_GNU
+fi])
+if test $ac_cv_prog_g77 = yes; then
+  G77=yes
+else
+  G77=
+fi[]dnl
+])# _AC_PROG_F77_GNU
 
 
 # AC_PROG_F77_G