+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.
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
])# 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
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
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
])# 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
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
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
])# 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__
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
@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.
@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.
@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.
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
])# 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
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
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
])# 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
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
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
])# 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__
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
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
])# 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
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
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
])# 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
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
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
])# 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__
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
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
])# 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
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
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
])# 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
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
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
])# 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__
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