Hello Eric, * Eric Blake wrote on Thu, Oct 11, 2007 at 01:04:51AM CEST: > 2007-10-10 Eric Blake <[EMAIL PROTECTED]> > > Avoid some overhead from m4_defn and m4_popdef. > * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Only > pass on first argument, since we are documented that way. > (m4_for, m4_append_uniq, m4_text_wrap): Optimize out defined-ness > check where it is safe to do so. > (m4_append): Likewise, and quote the separator. > (m4_text_box): Likewise, and avoid regex, also be robust to > expansion and quadrigraphs.
This patch causes a regression with CVS Libtool: its configure script is unusably botched with this. More specifically, when I revert the hunk below, things look better, but I haven't analysed this further. I can't even tell whether it's Libtool to blame (but even if it is, we may want to be a bit careful anyway). If it's not, then some Autoconf testsuite addition would seem to be in order. Cheers, Ralf > diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 > index 952794a..85f2c72 100644 > --- a/lib/m4sugar/m4sugar.m4 > +++ b/lib/m4sugar/m4sugar.m4 [...] > @@ -1680,9 +1681,11 @@ m4_defun([m4_join], > # => act1 > # => > # => active > +# > +# Use m4_builtin to avoid overhead of m4_defn. > m4_define([m4_append], > [m4_define([$1], > - m4_ifdef([$1], [m4_defn([$1])$3])[$2])]) > + m4_ifdef([$1], [m4_builtin([defn], [$1])[$3]])[$2])]) > > > # m4_append_uniq(MACRO-NAME, STRING, [SEPARATOR])
