* lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
   Rename to AC_CHECK_INCLUDES_DEFAULT.  All callers changed.
   (AC_HEADER_STDC, AC_UNISTD_H): Use AC_CHECK_INCLUDES_DEFAULT instead
   of previous kludge.

 * doc/autoconf.texi: Document AC_CHECK_INCLUDES_DEFAULT.

Signed-off-by: Zack Weinberg <za...@panix.com>
---
 doc/autoconf.texi       |   13 +++++++++++++
 lib/autoconf/headers.m4 |   22 +++++++++-------------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d097c23..dad882f 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -3980,6 +3980,19 @@ unconditionally defines @code{HAVE_STRING_H}, @code{HAVE_STDLIB_H}, and
 @code{STDC_HEADERS}.
 @end defmac
 
+@defmac AC_CHECK_INCLUDES_DEFAULT
+@acindex{CHECK_INCLUDES_DEFAULT}
+Check for all the headers that @code{AC_INCLUDES_DEFAULT} would check
+for as a side-effect, if this has not already happened.
+
+This macro mainly exists so that @code{autoupdate} can replace certain
+obsolete constructs with it. You should not need to use it yourself; in
+fact, it is likely to be safe to delete it from any script in which it
+appears.  (@code{autoupdate} does not know whether preprocessor macros
+such as @code{HAVE_STDINT_H} are used in the program, nor whether they
+would get defined as a side-effect of other checks.)
+@end defmac
+
 @node Alternative Programs
 @section Alternative Programs
 @cindex Programs, checking
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 2fa06cf..e4fe347 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -208,7 +208,7 @@ _AC_HEADERS_EXPANSION])AC_REQUIRE([_AC_Header_]m4_translit([[$1]],
 # and vice versa.
 
 AC_DEFUN([AC_CHECK_HEADERS_ONCE],
-[AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
+[AC_REQUIRE([AC_CHECK_INCLUDES_DEFAULT])dnl
 _AC_CHECK_HEADERS_ONCE([$1])])
 AC_DEFUN([_AC_CHECK_HEADERS_ONCE],
 [m4_map_args_w([$1], [_AC_CHECK_HEADER_ONCE(], [)])])
@@ -231,10 +231,10 @@ m4_define([_AC_HEADERS_EXPANSION],
 # macros.  It is easier to document, to extend, and to understand than
 # having specific defaults for each macro.
 
-# _AC_INCLUDES_DEFAULT_REQUIREMENTS
-# ---------------------------------
+# AC_CHECK_INCLUDES_DEFAULT
+# -------------------------
 # Required when AC_INCLUDES_DEFAULT uses its default branch.
-AC_DEFUN_ONCE([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
+AC_DEFUN_ONCE([AC_CHECK_INCLUDES_DEFAULT],
 dnl If ever you change this variable, please keep autoconf.texi in sync.
 [m4_divert_text([DEFAULTS],
 [# Factoring default headers for most tests.
@@ -276,7 +276,7 @@ dnl HAVE_STDLIB_H, HAVE_STRING_H, and STDC_HEADERS.
 [AC_DEFINE([STDC_HEADERS], [1],
   [Always define to 1, for backward compatibility.
    You can assume the C90 standard headers exist.])])
-# _AC_INCLUDES_DEFAULT_REQUIREMENTS
+# AC_CHECK_INCLUDES_DEFAULT
 
 
 # AC_INCLUDES_DEFAULT([INCLUDES])
@@ -291,11 +291,8 @@ dnl HAVE_STDLIB_H, HAVE_STRING_H, and STDC_HEADERS.
 AC_DEFUN([AC_INCLUDES_DEFAULT],
 [m4_ifval([$1], [$1
 ],
-	  [AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
-$ac_includes_default])])
-
-
-
+[AC_REQUIRE([AC_CHECK_INCLUDES_DEFAULT])]dnl
+[$ac_includes_default])])
 
 
 ## ------------------------------------------- ##
@@ -607,8 +604,7 @@ fi
 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.
-AS_IF([:], [], [ac_dummy="AC_INCLUDES_DEFAULT"])
-],
+AC_CHECK_INCLUDES_DEFAULT],
  [The preprocessor macro `STDC_HEADERS' is obsolete.
   Except in unusual embedded environments, you can safely include all
   ISO C90 headers unconditionally.])
@@ -715,7 +711,7 @@ fi
 AU_DEFUN([AC_UNISTD_H],
 [# Autoupdate added the following line to ensure that your configure
 # script's behavior did not change.  It is probably safe to remove.
-AS_IF([:], [], [ac_dummy="AC_INCLUDES_DEFAULT"])])
+AC_CHECK_INCLUDES_DEFAULT])
 
 
 # AU::AC_USG

Reply via email to