1 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
1 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
2 # |
2 # |
3 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. |
3 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software |
|
4 # Foundation, Inc. |
4 # Written by Gary V. Vaughan, 2004 |
5 # Written by Gary V. Vaughan, 2004 |
5 # |
6 # |
6 # This file is free software; the Free Software Foundation gives |
7 # This file is free software; the Free Software Foundation gives |
7 # unlimited permission to copy and/or distribute it, with or without |
8 # unlimited permission to copy and/or distribute it, with or without |
8 # modifications, as long as this notice is preserved. |
9 # modifications, as long as this notice is preserved. |
31 # lt_car(LIST) |
32 # lt_car(LIST) |
32 # lt_cdr(LIST) |
33 # lt_cdr(LIST) |
33 # ------------ |
34 # ------------ |
34 # Manipulate m4 lists. |
35 # Manipulate m4 lists. |
35 # These macros are necessary as long as will still need to support |
36 # These macros are necessary as long as will still need to support |
36 # Autoconf-2.59 which quotes differently. |
37 # Autoconf-2.59, which quotes differently. |
37 m4_define([lt_car], [[$1]]) |
38 m4_define([lt_car], [[$1]]) |
38 m4_define([lt_cdr], |
39 m4_define([lt_cdr], |
39 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], |
40 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], |
40 [$#], 1, [], |
41 [$#], 1, [], |
41 [m4_dquote(m4_shift($@))])]) |
42 [m4_dquote(m4_shift($@))])]) |
42 m4_define([lt_unquote], $1) |
43 m4_define([lt_unquote], $1) |
43 |
44 |
44 |
45 |
45 # lt_append(MACRO-NAME, STRING, [SEPARATOR]) |
46 # lt_append(MACRO-NAME, STRING, [SEPARATOR]) |
46 # ------------------------------------------ |
47 # ------------------------------------------ |
47 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. |
48 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. |
48 # Note that neither SEPARATOR nor STRING are expanded; they are appended |
49 # Note that neither SEPARATOR nor STRING are expanded; they are appended |
49 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). |
50 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). |
50 # No SEPARATOR is output if MACRO-NAME was previously undefined (different |
51 # No SEPARATOR is output if MACRO-NAME was previously undefined (different |
51 # than defined and empty). |
52 # than defined and empty). |
52 # |
53 # |