2006-05-22 Stepan Kasal * doc/autoconf.texi (Defining Symbols): Literal parameter of AC_DEFINE is now passed to m4_pattern_allow. * NEWS: Mention that; likewise for AC_SUBST. * lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL): Pass the parameter to m4_pattern_allow. * tests/tools.at: Add a check for that. Index: NEWS =================================================================== RCS file: /cvsroot/autoconf/autoconf/NEWS,v retrieving revision 1.371 diff -u -r1.371 NEWS --- NEWS 21 May 2006 00:19:42 -0000 1.371 +++ NEWS 22 May 2006 15:47:19 -0000 @@ -4,6 +4,9 @@ These never-documented variables have been marked with a comment saying that we intend to remove them in a future release. +** AC_SUBST, AC_DEFINE + Literal arguments to these are passed to m4_pattern_allow now. + ** AC_PROG_CC_STDC Passing 'ac_cv_prog_cc_stdc=no' to 'configure' now sets ac_cv_prog_cc_c99 and ac_cv_prog_cc_c89 to 'no' as well, for backward compatibility with Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.1019 diff -u -r1.1019 autoconf.texi --- doc/autoconf.texi 22 May 2006 10:28:34 -0000 1.1019 +++ doc/autoconf.texi 22 May 2006 15:47:39 -0000 @@ -7948,6 +7948,9 @@ @var{value} defaults to 1 instead of to the empty string. This is for backwards compatibility with older versions of Autoconf, but this usage is obsolescent and may be withdrawn in future versions of Autoconf. + +If the @var{variable} is a literal string, it is passed to address@hidden (@pxref{Forbidden Patterns}). @end defmac @defmac AC_DEFINE_UNQUOTED (@var{variable}, @var{value}, @ovar{description}) Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.918 diff -u -r1.918 general.m4 --- lib/autoconf/general.m4 21 May 2006 00:19:42 -0000 1.918 +++ lib/autoconf/general.m4 22 May 2006 15:47:41 -0000 @@ -1940,9 +1940,9 @@ # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL) # ------------------------------------------- -# This macro is useless, it is used only with --trace to collect the -# list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED. -m4_define([AC_DEFINE_TRACE_LITERAL]) +# Used by --trace to collect the list of AC_DEFINEd macros. +m4_define([AC_DEFINE_TRACE_LITERAL], +[m4_pattern_allow([^$1$])]) # AC_DEFINE_TRACE(CPP-SYMBOL) Index: tests/tools.at =================================================================== RCS file: /cvsroot/autoconf/autoconf/tests/tools.at,v retrieving revision 1.84 diff -u -r1.84 tools.at --- tests/tools.at 19 May 2006 04:14:13 -0000 1.84 +++ tests/tools.at 22 May 2006 15:47:42 -0000 @@ -309,6 +309,23 @@ AT_CLEANUP +# autoconf: automatically allowed tokens +# -------------------------------------- +AT_SETUP([autoconf: automatically alowed tokens]) + +AT_DATA_M4SH([configure.ac], +[[AC_INIT +m4_pattern_forbid([^FB_]) +AC_DEFINE([FB_ONE]) +AC_SUBST([FB_TWO]) +AC_OUTPUT +]]) + +AT_CHECK_AUTOCONF + +AT_CLEANUP + + # autoconf: subdirectories # -------------------------------------- AT_SETUP([autoconf: subdirectories])