From: Zack Weinberg Date: Sun, 15 Sep 2013 21:16:18 +0000 (-0400) Subject: Expose the checks done by AC_INCLUDES_DEFAULT as a public macro. X-Git-Tag: v2.69b~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f181785d0e754b4265d592e7288169b976cfc441;p=thirdparty%2Fautoconf.git Expose the checks done by AC_INCLUDES_DEFAULT as a public macro. * 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. --- diff --git a/NEWS b/NEWS index f2cd5c52..36d20cc7 100644 --- 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 diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 3e27e295..a2368e70 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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 diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 7d6ef916..34783f0c 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -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