]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Add AC_PROG_EGREP to AU_DEFUN for AC_HEADER_STDC (#110215)
authorZack Weinberg <zackw@panix.com>
Sun, 12 Jul 2020 15:26:47 +0000 (11:26 -0400)
committerZack Weinberg <zackw@panix.com>
Sun, 12 Jul 2020 15:26:47 +0000 (11:26 -0400)
AC_HEADER_STDC used to use AC_EGREP_CPP, and therefore had the side
effect of AC_REQUIRE([AC_PROG_EGREP]).  In 2.70 AC_HEADER_STDC is an
AU_DEFUN and, before this change, the replacement didn’t invoke
AC_PROG_EGREP, which broke configure scripts that assumed $EGREP would
be set.  Problem reported by Ross Burton.

* lib/autoconf/headers.m4 (AU::AC_HEADER_STDC): Also invoke AC_PROG_EGREP.

NEWS
lib/autoconf/headers.m4

diff --git a/NEWS b/NEWS
index 4f6d59a12c3ceb07954a01f67beb2b3de68a07c4..394727e8763c9b06ed5ab92e0f0922fad3fe472c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -44,8 +44,16 @@ GNU Autoconf NEWS - User visible changes.
      variables used later in the configure script, or in generated
      Makefiles.
 
-   - AC_REQUIRE must not appear inside hand-written shell conditional
-     constructs.  Use AS_IF, AS_FOR, etc. instead.
+   - Autoconf macros that use AC_REQUIRE internally, are not safe to
+     use inside of hand-written shell conditional or looping
+     constructs.  Use AS_IF, AS_CASE, AS_FOR, etc. instead.
+     (See the “Prerequisite Macros” section of the manual for
+     further explanation.)
+
+     The set of macros that use AC_REQUIRE internally may change from
+     release to release.  The only macros that are guaranteed *not* to
+     use AC_REQUIRE are the macros for acting on the results of a
+     test: AC_DEFINE, AC_SUBST, AC_MSG_*, AC_CACHE_CHECK, etc.
 
    - AC_REQUIRE cannot be applied to macros that need to be used with
      arguments.  Instead, invoke the macro normally, with its arguments.
index ae8bf28f3b06e0a88e47b9797b053cdf8677d2e4..cd750ebeefb8da5ede088e7402c937898db5581e 100644 (file)
@@ -655,9 +655,11 @@ fi
 # AU::AC_HEADER_STDC
 # ------------------
 AU_DEFUN([AC_HEADER_STDC],
-[# Autoupdate added the following line to ensure that your configure
-# script's behavior did not change.  It is probably safe to remove.
-AC_CHECK_INCLUDES_DEFAULT],
+[# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change.  They are probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+],
  [The preprocessor macro `STDC_HEADERS' is obsolete.
   Except in unusual embedded environments, you can safely include all
   ISO C90 headers unconditionally.])