From: Eric Blake Date: Mon, 1 Oct 2007 16:10:42 +0000 (-0600) Subject: Fix regression in AC_DEFINE([macro(with_arg)]). X-Git-Tag: v2.62~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19a706a7ed196727075cf5642f6d7b24f24748ed;p=thirdparty%2Fautoconf.git Fix regression in AC_DEFINE([macro(with_arg)]). * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't chop off close quotes with a careless m4_substr. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index cfe81ea9..1e092015 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-01 Eric Blake + + Fix regression in AC_DEFINE([macro(with_arg)]). + * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't chop off close + quotes with a careless m4_substr. + 2007-09-30 Eric Blake Allow nameless iteration. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 7835f246..ecbbe996 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2008,11 +2008,12 @@ m4_bmatch([$1], ^m4_defn([m4_re_word])$, [], # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters # out non literal symbols. # -# m4_index is roughly 5 to 8 times faster than m4_bpatsubst. +# m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so only +# use the regex when necessary. m4_define([AC_DEFINE_TRACE], [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL( - m4_if(m4_index([[$1]], [(]), [-1], [[$1]], - [m4_substr([[$1]], [0], m4_index([[$1]], [(]))]))])]) + m4_if(m4_index([$1], [(]), [-1], [[$1]], + [m4_bpatsubst([[$1]], [(.*)])]))])]) # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])