]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix regression in AC_DEFINE([macro(with_arg)]).
authorEric Blake <ebb9@byu.net>
Mon, 1 Oct 2007 16:10:42 +0000 (10:10 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 1 Oct 2007 16:10:42 +0000 (10:10 -0600)
* lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't chop off close
quotes with a careless m4_substr.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/autoconf/general.m4

index cfe81ea9ea995a2b5dfbd5fa40aacf4818cefdc9..1e0920156feacd7a49d5bf7734d1a0762bd6f124 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-01  Eric Blake  <ebb9@byu.net>
+
+       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  <ebb9@byu.net>
 
        Allow nameless iteration.
index 7835f246876b7359f1a2e5edf9f266db5e8cf86b..ecbbe996c28ef7d49387bb5abf4a36f1ff380a3d 100644 (file)
@@ -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])