diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-26 16:21:02 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-26 16:21:02 +0000 |
commit | 5028c5045f132e633e1573fd960e82527afc9b3e (patch) | |
tree | 19ed065a7ac3584c6682b87d203bfa8da13642bd /ltsugar.m4 | |
parent | d030fa30e9e2eaf90fca1df13cdbd13f9afc4a36 (diff) | |
download | gcc-5028c5045f132e633e1573fd960e82527afc9b3e.tar.gz |
* libtool.m4: Update to libtool 2.2.6.
* lt~obsolete.m4: Update to libtool 2.2.6.
* ltmain.sh: Update to libtool 2.2.6.
* ltsugar.m4: Update to libtool 2.2.6.
* ltversion.m4: Update to libtool 2.2.6.
* ltoptions.m4: Update to libtool 2.2.6.
* ltgcc.m4: Update to match changes from libtool 2.2.6.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'ltsugar.m4')
-rw-r--r-- | ltsugar.m4 | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/ltsugar.m4 b/ltsugar.m4 index dd4f871ee96..9000a057d31 100644 --- a/ltsugar.m4 +++ b/ltsugar.m4 @@ -1,13 +1,13 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Gary V. Vaughan. +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 ltsugar.m4 +# serial 6 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) @@ -49,11 +45,13 @@ m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded. No SEPARATOR is -# output if MACRO-NAME was previously undefined (different than defined -# and empty). +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# # This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4 mistakenly expanded SEPARATOR. +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) @@ -65,14 +63,14 @@ m4_define([lt_append], # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], -[m4_if([$2], [], [], - [m4_if([$4], [], [], - [lt_join(m4_quote(m4_default([$1], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], - [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), - [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl -]) +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) @@ -84,13 +82,13 @@ m4_define([lt_if_append_uniq], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], - [lt_append([$1], [$2], [$3])$4])]) + [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], -[m4_define([$1($2)], [$4])]) +[m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) |