Hi Eric, * Eric Blake wrote on Wed, Jul 16, 2008 at 12:09:59AM CEST: > > I have completed patching the argv_ref branch of m4.git to perform m4_append > in > linear rather than quadratic time; more details in a later email: > http://git.savannah.gnu.org/gitweb/?p=m4.git;a=shortlog;h=refs/heads/argv_ref
Nice. > It turns out that 'git grep m4_prepend' turns up nothing of interest in > bison.git, so apparantly, bison is not using it anymore (as of 2006-01-03, > http://git.savannah.gnu.org/gitweb/?p=bison.git;a=commitdiff;h=8f7e3cf). > Should I go ahead and revert my addition of m4_prepend altogether, seeing as > how it is an inferior interface to m4_append (now that I have a concrete O(n) > rather than O(n^2) m4 implementation, at least on the argv_ref branch)? Reverting is fine with me. > Also, I needed this followup commit, so that bison doesn't try dereferencing > m4_defn(m4_PACKAGE_VERSION) in creating the definition of m4_version_prereq > (the m4_fatal alternate is so that it will be immediately apparent why > m4_version_prereq does not work in bison, which lacks m4sugar/version.m4). See comment below. > --- a/lib/m4sugar/m4sugar.m4 > +++ b/lib/m4sugar/m4sugar.m4 > @@ -2243,12 +2243,14 @@ m4_sinclude([m4sugar/version.m4]) > # ---------------------------------------------------- > # Check this Autoconf version against VERSION. > m4_define([m4_version_prereq], > -[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]), > - [-1], > - [m4_default([$3], > - [m4_fatal([Autoconf version $1 or higher is required], > - [63])])], > - [$2])]) > +m4_ifdef([m4_PACKAGE_VERSION], > +[[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]), That's overquoted, no? How can this work as intended? (untested) > + [-1], > + [m4_default([$3], > + [m4_fatal([Autoconf version $1 or higher is required], > + [63])])], > + [$2])]], > +[[m4_fatal([m4sugar/version.m4 not found])]])) Cheers, Ralf
