[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
take AC_CACHE_CHECK_INT back private
From: |
Paul Eggert |
Subject: |
take AC_CACHE_CHECK_INT back private |
Date: |
Sun, 22 Oct 2006 23:14:29 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Since nobody else seemed to cheer about AC_CACHE_CHECK_INT, I
made it private to Autoconf. We can always make it public
later. I installed this:
2006-10-22 Paul Eggert <address@hidden>
* 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.
Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.405
diff -u -r1.405 NEWS
--- NEWS 20 Oct 2006 01:34:32 -0000 1.405
+++ NEWS 23 Oct 2006 06:11:52 -0000
@@ -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.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1098
diff -u -r1.1098 autoconf.texi
--- doc/autoconf.texi 20 Oct 2006 16:25:30 -0000 1.1098
+++ doc/autoconf.texi 23 Oct 2006 06:11:53 -0000
@@ -8500,22 +8500,6 @@
setting the variable @var{cache-id}, see below.
@end defmac
address@hidden AC_CACHE_CHECK_INT (@var{message}, @var{cache-id},
@var{expression}, @dvar{includes, default-includes}, @ovar{action-if-fails})
address@hidden
-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
address@hidden
-
-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}.
address@hidden Results}, for more information.
address@hidden 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
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.935
diff -u -r1.935 general.m4
--- lib/autoconf/general.m4 15 Oct 2006 01:12:02 -0000 1.935
+++ lib/autoconf/general.m4 23 Oct 2006 06:11:53 -0000
@@ -1926,13 +1926,13 @@
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
Index: lib/autoconf/types.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/types.m4,v
retrieving revision 1.46
diff -u -r1.46 types.m4
--- lib/autoconf/types.m4 15 Oct 2006 01:12:02 -0000 1.46
+++ lib/autoconf/types.m4 23 Oct 2006 06:11:53 -0000
@@ -684,7 +684,7 @@
# 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_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
Index: tests/base.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/base.at,v
retrieving revision 1.39
diff -u -r1.39 base.at
--- tests/base.at 2 Sep 2006 05:37:08 -0000 1.39
+++ tests/base.at 23 Oct 2006 06:11:53 -0000
@@ -220,22 +220,21 @@
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])
]])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- take AC_CACHE_CHECK_INT back private,
Paul Eggert <=