autoconf-patches
[Top][All Lists]
Advanced

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

Re: loop in libtool m4 macros


From: Ralf Menzel
Subject: Re: loop in libtool m4 macros
Date: Thu, 09 Jun 2005 18:50:18 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Reasonable Discussion, usg-unix-v)

Ralf Wildenhues <address@hidden> writes:
> Any pointers/help much appreciated.

Well, I probably don't know as much about m4 as you do. But I had a
look nevertheless ....

> Index: m4/libtool.m4
[...]
> -[lt_join($@, lt_decl_varnames_tagged([$1],
[...]

Well I head a look at the traces. This indicated that lt_combine might
be the culprit. (lt_join uses lt_combine.) Though I didn't know what
this might effect, I made the following change. (More or less just
because _lt_combine looks similar.)

--- snip ---
Index: m4/ltsugar.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltsugar.m4,v
retrieving revision 1.3
diff -u -p -r1.3 ltsugar.m4
--- m4/ltsugar.m4       8 Jan 2005 21:17:57 -0000       1.3
+++ m4/ltsugar.m4       9 Jun 2005 16:36:48 -0000
@@ -38,7 +38,7 @@ m4_define([lt_join],
 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
 # has the form PREFIXmINFIXSUFFIXn.
 m4_define([lt_combine],
-[m4_if([$2], [[]], [],
+[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, $@)))])])
--- snip ---

I was pleasently suprised to see, that the loop disapeared. But
instead I got another error:

--- snip ---
configure.ac:44: error: Unknown option `' to LT_INIT_LIBTOOL
../../m4/libtool.m4:83: LT_INIT is expanded from...
configure.ac:44: the top level
autom4te: /home/menzel/sw5.9-gcc3.4/bin/m4 failed with exit status: 1
--- snip ---

The error came for every configure.ac where LT_INIT is used without
options. I'd try the following change but haven't got time to test it
now. Maybe someone else can make further investigation.

--- snip ---
Index: m4/ltoptions.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltoptions.m4,v
retrieving revision 1.10
diff -u -p -r1.10 ltoptions.m4
--- m4/ltoptions.m4     8 Jan 2005 21:17:57 -0000       1.10
+++ m4/ltoptions.m4     9 Jun 2005 16:36:48 -0000
@@ -52,10 +52,11 @@ m4_ifdef([$0_found], [m4_undefine([$0_fo
 # and exit.
 m4_define([_LT_SET_OPTIONS],
 [AC_FOREACH([_LT_Option], [$1],
-    [_LT_SET_OPTION(_LT_Option)
-    m4_ifdef(_LT_MANGLE_DEFUN(_LT_Option),
-               _LT_MANGLE_DEFUN(_LT_Option),
-       [m4_fatal([Unknown option `]_LT_Option[' to LT][_INIT_LIBTOOL])])
+    [m4_if(_LT_Option, [], [],
+       [_LT_SET_OPTION(_LT_Option)
+           m4_ifdef(_LT_MANGLE_DEFUN(_LT_Option),
+                   _LT_MANGLE_DEFUN(_LT_Option),
+           [m4_fatal([Unknown option `]_LT_Option[' to LT][_INIT_LIBTOOL])])])
     ])dnl
 dnl
 dnl Simply set some default values (i.e off) if boolean options were not
--- snip ---

Bye,
Ralf Menzel




reply via email to

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