bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: recent changes in libtool-2-0 branch cause a m4 loop


From: Ralf Wildenhues
Subject: FYI: recent changes in libtool-2-0 branch cause a m4 loop
Date: Fri, 17 Jun 2005 14:44:39 +0200
User-agent: Mutt/1.4.1i

Hi Christoph,

* Christoph Egger wrote on Fri, Jun 17, 2005 at 07:25:05AM CEST:
> 
> > Quick hack: define our own (fixed) versions of m4_car and m4_cdr, so we
> > are independent of the Autoconf version used.
> > 
> > Does anybody know a better solution?
> 
> This patch makes libtool branch-2-0 working with autoconf 2.59 again.
> Can anyone commit it into branch-2-0, please? The branch-2-0 is still
> broken...

I'm sorry I did not get this done before leaving (and have just
returned).

Applied to HEAD and branch-2-0.  (Yes, I know strictly speaking this is
necessary for branch-2-0 only, since HEAD needs newer than 2.59 anyways.
View it as a sign of robustness -- we can take it out when we can depend
on 2.60.)

Regards,
Ralf

        * m4/ltsugar.m4 (lt_car, lt_cdr): New macros, clones of m4_car/m4_cdr
        with the fixed semantics of Autoconf-59c CVS, in order to work with
        2.59.  (lt_combine): Use it.
        Reported by Christoph Egger <address@hidden>.

Index: m4/ltsugar.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltsugar.m4,v
retrieving revision 1.3
diff -u -r1.3 ltsugar.m4
--- m4/ltsugar.m4       8 Jan 2005 21:17:57 -0000       1.3
+++ m4/ltsugar.m4       17 Jun 2005 12:40:02 -0000
@@ -32,6 +32,19 @@
 ])
 
 
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+
+
 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
 # ----------------------------------------------------------
 # Produce a SEP delimited list of all paired combinations of elements of
@@ -40,8 +53,8 @@
 m4_define([lt_combine],
 [m4_if([$2], [[]], [],
        [lt_join(m4_quote(m4_default([$1], [, ])),
-               _$0([$1], m4_car($2)[$3], m4_shiftn(3, $@)),
-               $0([$1], m4_cdr($2), m4_shiftn(2, $@)))])])
+               _$0([$1], lt_car($2)[$3], m4_shiftn(3, $@)),
+               $0([$1], lt_cdr($2), m4_shiftn(2, $@)))])])
 m4_define([_lt_combine],
 [m4_if([$3], [], [],
        [lt_join(m4_quote(m4_default([$1], [, ])),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]