From: Eric Blake Date: Tue, 16 Oct 2007 22:45:49 +0000 (+0000) Subject: Speed up bootstrap by improving lt_join. X-Git-Tag: release-2-1b~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0c01e98923e3012cd3aee459e15e84e11b05a7b;p=thirdparty%2Flibtool.git Speed up bootstrap by improving lt_join. * libltdl/m4/ltsugar.m4 (lt_join, _lt_join): Rewrite to mirror Autoconf 2.62's faster implementation. --- diff --git a/ChangeLog b/ChangeLog index 1fa09ead8..97a2c2d6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-16 Eric Blake + + Speed up bootstrap by improving lt_join. + * libltdl/m4/ltsugar.m4 (lt_join, _lt_join): Rewrite to mirror + Autoconf 2.62's faster implementation. + 2007-10-12 Eric Blake Whitespace cleanup. diff --git a/libltdl/m4/ltsugar.m4 b/libltdl/m4/ltsugar.m4 index 239051a62..0d258e070 100644 --- a/libltdl/m4/ltsugar.m4 +++ b/libltdl/m4/ltsugar.m4 @@ -7,7 +7,7 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 ltsugar.m4 +# serial 5 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) @@ -17,19 +17,15 @@ AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. m4_define([lt_join], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [], - [2], [[$2]], - [m4_ifval([$2], - [[$2][]m4_foreach(_lt_Arg, lt_car([m4_shiftn(2, $@)]), - [_$0([$1], _lt_Arg)])], - [$0([$1], m4_shiftn(2, $@))])])[]dnl -]) +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], -[m4_ifval([$2],[$1][$2])[]dnl -]) +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST)