diff options
author | Zack Weinberg <zackw@panix.com> | 2020-07-12 11:26:47 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-07-12 11:26:47 -0400 |
commit | d5cb54d02dba7ba9c0cd3736b46e7b50a71ce2f3 (patch) | |
tree | c3578bdb7d5dbb5fec2e4ca4adacdd5a46ffef44 | |
parent | 8173e5d6fefd8a2a36974610f85784121f8dc36e (diff) | |
download | autoconf-d5cb54d02dba7ba9c0cd3736b46e7b50a71ce2f3.tar.gz |
Add AC_PROG_EGREP to AU_DEFUN for AC_HEADER_STDC (#110215)
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.
-rw-r--r-- | NEWS | 12 | ||||
-rw-r--r-- | lib/autoconf/headers.m4 | 8 |
2 files changed, 15 insertions, 5 deletions
@@ -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. diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index ae8bf28f..cd750ebe 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -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.]) |