[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Make AC_COMPUTE_INT public
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] Make AC_COMPUTE_INT public |
Date: |
Mon, 19 Jun 2006 22:20:17 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (Macintosh/20060530) |
Well, I will definitely reject a patch renaming _AC_COMPUTE_INT to
AC_COMPUTE_INT at this point: I'd guess it would break about a dozen
packages at least. But AU_ALIASing it, now that's a different idea
altogether.
Well, I suppose you're right...
Please submit the patch (it wasn't in your post) to autoconf-patches.
If you didn't write the manual addition yet (and the NEWS entry), make
sure to list the limitations of AC_COMPUTE_INT.
I wrote that, but I don't know the limitations... I only mentioned that
it should be computed at compile-time. If the attached patch is not
precise enough, please tell me.
Paolo
2006-06-19 Paolo Bonzini <address@hidden>
* doc/autoconf.texi (Generic compiler characteristics):
Document AC_COMPUTE_INT.
* lib/autoconf/general.m4 (AC_COMPUTE_INT): Renamed from
_AC_COMPUTE_INT. Add AU_ALIAS. Modify default prolog to be
the default headers.
* lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Use
new name of _AC_COMPUTE_INT.
* NEWS: Document change.
Index: NEWS
===================================================================
RCS file: /sources/autoconf/autoconf/NEWS,v
retrieving revision 1.381
diff -p -u -b -r1.381 NEWS
--- NEWS 6 Jun 2006 06:18:40 -0000 1.381
+++ NEWS 19 Jun 2006 20:16:34 -0000
@@ -1,5 +1,9 @@
* Major changes in Autoconf 2.59e
+** The _AC_COMPUTE_INT macro has been made public and documented, and
+ renamed to AC_COMPUTE_INT. autoupdate will change the old private name
+ to the new one.
+
* Major changes in Autoconf 2.59d
Released 2006-06-05, by Ralf Wildenhues.
Index: doc/autoconf.texi
===================================================================
RCS file: /sources/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1051
diff -p -u -b -r1.1051 autoconf.texi
--- doc/autoconf.texi 16 Jun 2006 20:38:03 -0000 1.1051
+++ doc/autoconf.texi 19 Jun 2006 20:16:45 -0000
@@ -6111,6 +6111,17 @@ include @file{stddef.h} and @file{stdio.
macro to work correctly.
@end defmac
address@hidden AC_COMPUTE_INT (@var{expression}, @var{var}, @dvar{includes,
default-includes}, @var{if-fails})
address@hidden
+Compute the evaluation of the integer @var{expression} in @var{var}. It
+should be possible to evaluate the expression at compile-time, for example
+in an initializer for a C variable of type @code{int}.
+If no @var{includes} are specified, the default includes are used
+(@pxref{Default Includes}). If you provide @var{include}, be sure to
+include @file{stddef.h} and @file{stdio.h} which are required for this
+macro to work correctly.
address@hidden defmac
+
@defmac AC_LANG_WERROR
@acindex{LANG_WERROR}
Normally Autoconf ignores warnings generated by the compiler, linker, and
Index: lib/autoconf/general.m4
===================================================================
RCS file: /sources/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.925
diff -p -u -b -r1.925 general.m4
--- lib/autoconf/general.m4 7 Jun 2006 05:35:46 -0000 1.925
+++ lib/autoconf/general.m4 19 Jun 2006 20:16:46 -0000
@@ -2716,14 +2716,15 @@ m4_define([_AC_COMPUTE_INT_RUN],
[$2=`cat conftest.val`], [$4])])
-# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, IF-FAILS)
+# AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, IF-FAILS)
# ---------------------------------------------------------
-m4_define([_AC_COMPUTE_INT],
+AU_ALIAS([_AC_COMPUTE_INT], [AC_COMPUTE_INT])
+m4_define([AC_COMPUTE_INT],
[AC_LANG_COMPILER_REQUIRE()dnl
if test "$cross_compiling" = yes; then
- _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
+ _AC_COMPUTE_INT_COMPILE([$1], [$2], [AC_INCLUDES_DEFAULT([$3])], [$4])
else
- _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
+ _AC_COMPUTE_INT_RUN([$1], [$2], [AC_INCLUDES_DEFAULT([$3])], [$4])
fi
rm -f conftest.val[]dnl
-])# _AC_COMPUTE_INT
+])# AC_COMPUTE_INT
Index: lib/autoconf/types.m4
===================================================================
RCS file: /sources/autoconf/autoconf/lib/autoconf/types.m4,v
retrieving revision 1.39
diff -p -u -b -r1.39 types.m4
--- lib/autoconf/types.m4 19 Jun 2006 18:28:12 -0000 1.39
+++ lib/autoconf/types.m4 19 Jun 2006 20:16:46 -0000
@@ -676,7 +676,7 @@ AC_CACHE_CHECK([size of $1], AS_TR_SH([a
# 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_COMPUTE_INT([(long int) (sizeof (ac__type_sizeof_))],
+ AC_COMPUTE_INT([(long int) (sizeof (ac__type_sizeof_))],
[AS_TR_SH([ac_cv_sizeof_$1])],
[AC_INCLUDES_DEFAULT([$3])
typedef $1 ac__type_sizeof_;],
@@ -699,7 +699,7 @@ AC_CACHE_CHECK([alignment of $1], AS_TR_
[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
# The cast to long int works around a bug in the HP C Compiler,
# see AC_CHECK_SIZEOF for more information.
- _AC_COMPUTE_INT([(long int) offsetof (ac__type_alignof_, y)],
+ AC_COMPUTE_INT([(long int) offsetof (ac__type_alignof_, y)],
[AS_TR_SH([ac_cv_alignof_$1])],
[AC_INCLUDES_DEFAULT([$2])
#ifndef offsetof
- Re: [PATCH] Make AC_COMPUTE_INT public,
Paolo Bonzini <=
- Re: [PATCH] Make AC_COMPUTE_INT public, Ralf Wildenhues, 2006/06/19
- Re: [PATCH] Make AC_COMPUTE_INT public, Ralf Wildenhues, 2006/06/20
- Re: [PATCH] Make AC_COMPUTE_INT public, Paolo Bonzini, 2006/06/20
- Re: [PATCH] Make AC_COMPUTE_INT public, Ralf Wildenhues, 2006/06/20
- Re: [PATCH] Make AC_COMPUTE_INT public, Paul Eggert, 2006/06/20
- Re: [PATCH] Make AC_COMPUTE_INT public, Ralf Wildenhues, 2006/06/21
- Re: [PATCH] Make AC_COMPUTE_INT public, Paolo Bonzini, 2006/06/22
- Re: [PATCH] Make AC_COMPUTE_INT public, Ralf Wildenhues, 2006/06/22
- Re: [PATCH] Make AC_COMPUTE_INT public, Paolo Bonzini, 2006/06/27
- Re: [PATCH] Make AC_COMPUTE_INT public, Paul Eggert, 2006/06/27