]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Expose the checks done by AC_INCLUDES_DEFAULT as a public macro.
authorZack Weinberg <zackw@panix.com>
Sun, 15 Sep 2013 21:16:18 +0000 (17:16 -0400)
committerZack Weinberg <zackw@panix.com>
Sun, 22 Sep 2013 00:02:47 +0000 (20:02 -0400)
 * 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, NEWS: Document AC_CHECK_INCLUDES_DEFAULT.

NEWS
doc/autoconf.texi
lib/autoconf/headers.m4

diff --git a/NEWS b/NEWS
index f2cd5c52fd79aef073ddc936b3b3a5da144abd78..36d20cc7930f651332e94fd9adfa5b2a521759af 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -94,6 +94,13 @@ GNU Autoconf NEWS - User visible changes.
 
   These macros were already labeled obsolescent in the manual.
 
+- New macro, AC_CHECK_INCLUDES_DEFAULT.  It causes the checks normally
+  performed as a side-effect by AC_INCLUDES_DEFAULT to happen at that
+  point in 'configure', if they haven't already been done.  Autoupdate
+  will replace certain obsolete constructs, whose only remaining
+  useful effect is to trigger those checks, with this macro.  It is
+  unlikely to be useful otherwise.
+
 * Noteworthy changes in release 2.69 (2012-04-24) [stable]
 
 ** Autoconf now requires perl 5.6 or better (but generated configure
index 3e27e29530d35c5ccc55083a1029e27ea2437dd2..a2368e7059ad9b37a8fb86b64cddd4024a639bbf 100644 (file)
@@ -3981,6 +3981,19 @@ unconditionally defines @code{HAVE_STRING_H}, @code{HAVE_STDLIB_H}, and
 macros.
 @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
index 7d6ef916a78647f810fb52257a8db85c5e417c65..34783f0c250e2f0a5fec5bb5038c7255baa388c9 100644 (file)
@@ -207,7 +207,7 @@ _AC_HEADERS_EXPANSION])AC_REQUIRE([_AC_Header_]m4_translit([[$1]],
 # Note: has intimate knowledge of how AC_INCLUDES_DEFAULT works,
 # 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],
@@ -229,10 +229,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.
@@ -274,7 +274,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])
@@ -289,11 +289,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])])
 
 
 ## ------------------------------------------- ##
@@ -605,8 +602,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.])
@@ -713,7 +709,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