From: Paul Eggert Date: Mon, 23 Oct 2006 06:12:40 +0000 (+0000) Subject: * NEWS: Remove AC_CACHE_CHECK_INT. X-Git-Tag: AUTOCONF-2.60b~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8b3323beed3701bdb8be7ed9a7d9700a29fdb90;p=thirdparty%2Fautoconf.git * NEWS: Remove AC_CACHE_CHECK_INT. * doc/autoconf.texi (Caching Results): Likewise. * lib/autoconf/general.m4 (_AC_CACHE_CHECK_INT): Renamed from AC_CACHE_CHECK_INT, since it's no longer public. * lib/autoconf/types.m4: All uses of AC_CACHE_CHECK_INT changed. * tests/base.at (AC_COMPUTE_INT): Test this, not AC_CACHE_CHECK_INT. --- diff --git a/ChangeLog b/ChangeLog index 4614d9c53..1d94d2f9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-10-22 Paul Eggert + + * NEWS: Remove AC_CACHE_CHECK_INT. + * doc/autoconf.texi (Caching Results): Likewise. + * lib/autoconf/general.m4 (_AC_CACHE_CHECK_INT): Renamed from + AC_CACHE_CHECK_INT, since it's no longer public. + * lib/autoconf/types.m4: All uses of AC_CACHE_CHECK_INT changed. + * tests/base.at (AC_COMPUTE_INT): Test this, not AC_CACHE_CHECK_INT. + 2006-10-20 Ralf Wildenhues * doc/autoconf.texi (Limitations of Usual Tools): Fix two typos. diff --git a/NEWS b/NEWS index 030542319..416014727 100644 --- a/NEWS +++ b/NEWS @@ -15,13 +15,12 @@ New programs should use the Gnulib counterparts of these macros. We have no current plans to remove them from Autoconf. -** AC_CACHE_CHECK_INT - New macro, with the behavior of the 2.60a AC_COMPUTE_INT macro. - AC_COMPUTE_INT no longer caches or reports results. +** AC_COMPUTE_INT + No longer caches or reports results. ** AC_CHECK_DECL now also works with aggregate objects. -** AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for the NonStop platform. +** AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for NonStop platforms. ** GNU M4 1.4.7 or later is now recommended. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index bb0fa3aa5..fb20df0ad 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8500,22 +8500,6 @@ The @var{commands-to-set-it} @emph{must have no side effects} except for setting the variable @var{cache-id}, see below. @end defmac -@defmac AC_CACHE_CHECK_INT (@var{message}, @var{cache-id}, @var{expression}, @dvar{includes, default-includes}, @ovar{action-if-fails}) -@acindex{CACHE_CHECK_INT} -This is a convenience macro for invoking @code{AC_COMPUTE_INT} to store -into @var{cache-id} the value of the integer @var{expression}. - -This macro also checks whether the result is cached, -and reports the test on the standard output -with @code{AC_MSG_CHECKING} (which prints @var{message}) and -@code{AC_MSG_RESULT}. - -Execute @var{action-if-fails} if the value cannot be determined correctly. -Commands in @var{action-if-fails} must have no side effects -except for possibly setting the variable @var{cache-id}. -@xref{Caching Results}, for more information. -@end defmac - It is common to find buggy macros using @code{AC_CACHE_VAL} or @code{AC_CACHE_CHECK}, because people are tempted to call @code{AC_DEFINE} in the @var{commands-to-set-it}. Instead, the code that diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 01e0371b6..bdf48f64e 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1926,13 +1926,13 @@ AS_LITERAL_IF([$2], AC_MSG_RESULT([$ac_res])])dnl ]) -# AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION, -# [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS]) +# _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION, +# [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS]) # ------------------------------------------------------------- -AC_DEFUN([AC_CACHE_CHECK_INT], +AC_DEFUN([_AC_CACHE_CHECK_INT], [AC_CACHE_CHECK([$1], [$2], [AC_COMPUTE_INT([$2], [$3], [$4], [$5])]) -])# AC_CACHE_CHECK_INT +])# _AC_CACHE_CHECK_INT diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 7a1796a51..606eafeba 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -684,7 +684,7 @@ AC_CHECK_TYPE([$1], [], [], [$3]) # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -AC_CACHE_CHECK_INT([size of $1], [AS_TR_SH([ac_cv_sizeof_$1])], +_AC_CACHE_CHECK_INT([size of $1], [AS_TR_SH([ac_cv_sizeof_$1])], [(long int) (sizeof (ac__type_sizeof_))], [AC_INCLUDES_DEFAULT([$3]) typedef $1 ac__type_sizeof_;], @@ -707,7 +707,7 @@ AC_DEFUN([AC_CHECK_ALIGNOF], AC_CHECK_TYPE([$1], [], [], [$2]) # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. -AC_CACHE_CHECK_INT([alignment of $1], [AS_TR_SH([ac_cv_alignof_$1])], +_AC_CACHE_CHECK_INT([alignment of $1], [AS_TR_SH([ac_cv_alignof_$1])], [(long int) offsetof (ac__type_alignof_, y)], [AC_INCLUDES_DEFAULT([$2]) #ifndef offsetof diff --git a/tests/base.at b/tests/base.at index b1133f727..0311a4c9e 100644 --- a/tests/base.at +++ b/tests/base.at @@ -220,22 +220,21 @@ AT_CHECK_CONFIGURE([-q]) AT_CLEANUP -## -------------------- ## -## AC_CACHE_CHECK_INT. ## -## -------------------- ## -- -# Make sure AC_CACHE_CHECK_INT fails properly. +## ---------------- ## +## AC_COMPUTE_INT. ## +## ---------------- ## + +# Make sure AC_COMPUTE_INT fails properly. -AT_SETUP([AC_CACHE_CHECK_INT]) +AT_SETUP([AC_COMPUTE_INT]) AT_DATA([configure.ac], [[AC_INIT -AC_CACHE_CHECK_INT([for division by zero], - [my_cv_divide_by_zero], - [1 / 0], - [], - [my_cv_divide_by_zero=failed]) -test "$my_cv_divide_by_zero" = failed || +AC_COMPUTE_INT([divide_by_zero], + [1 / 0], + [], + [divide_by_zero=failed]) +test "$divide_by_zero" = failed || AC_MSG_ERROR([1 / 0 did not fail]) ]])