annotate src/fftw-3.3.3/m4/ltsugar.m4 @ 140:59a8758c56b1

Add source for PortAudio stable v190600_20161030
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 13:44:07 +0000
parents 89f5e221ed7b
children
rev   line source
cannam@95 1 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
cannam@95 2 #
cannam@95 3 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
cannam@95 4 # Written by Gary V. Vaughan, 2004
cannam@95 5 #
cannam@95 6 # This file is free software; the Free Software Foundation gives
cannam@95 7 # unlimited permission to copy and/or distribute it, with or without
cannam@95 8 # modifications, as long as this notice is preserved.
cannam@95 9
cannam@95 10 # serial 6 ltsugar.m4
cannam@95 11
cannam@95 12 # This is to help aclocal find these macros, as it can't see m4_define.
cannam@95 13 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
cannam@95 14
cannam@95 15
cannam@95 16 # lt_join(SEP, ARG1, [ARG2...])
cannam@95 17 # -----------------------------
cannam@95 18 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
cannam@95 19 # associated separator.
cannam@95 20 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
cannam@95 21 # versions in m4sugar had bugs.
cannam@95 22 m4_define([lt_join],
cannam@95 23 [m4_if([$#], [1], [],
cannam@95 24 [$#], [2], [[$2]],
cannam@95 25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
cannam@95 26 m4_define([_lt_join],
cannam@95 27 [m4_if([$#$2], [2], [],
cannam@95 28 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
cannam@95 29
cannam@95 30
cannam@95 31 # lt_car(LIST)
cannam@95 32 # lt_cdr(LIST)
cannam@95 33 # ------------
cannam@95 34 # Manipulate m4 lists.
cannam@95 35 # These macros are necessary as long as will still need to support
cannam@95 36 # Autoconf-2.59 which quotes differently.
cannam@95 37 m4_define([lt_car], [[$1]])
cannam@95 38 m4_define([lt_cdr],
cannam@95 39 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
cannam@95 40 [$#], 1, [],
cannam@95 41 [m4_dquote(m4_shift($@))])])
cannam@95 42 m4_define([lt_unquote], $1)
cannam@95 43
cannam@95 44
cannam@95 45 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
cannam@95 46 # ------------------------------------------
cannam@95 47 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
cannam@95 48 # Note that neither SEPARATOR nor STRING are expanded; they are appended
cannam@95 49 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
cannam@95 50 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
cannam@95 51 # than defined and empty).
cannam@95 52 #
cannam@95 53 # This macro is needed until we can rely on Autoconf 2.62, since earlier
cannam@95 54 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
cannam@95 55 m4_define([lt_append],
cannam@95 56 [m4_define([$1],
cannam@95 57 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
cannam@95 58
cannam@95 59
cannam@95 60
cannam@95 61 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
cannam@95 62 # ----------------------------------------------------------
cannam@95 63 # Produce a SEP delimited list of all paired combinations of elements of
cannam@95 64 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
cannam@95 65 # has the form PREFIXmINFIXSUFFIXn.
cannam@95 66 # Needed until we can rely on m4_combine added in Autoconf 2.62.
cannam@95 67 m4_define([lt_combine],
cannam@95 68 [m4_if(m4_eval([$# > 3]), [1],
cannam@95 69 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
cannam@95 70 [[m4_foreach([_Lt_prefix], [$2],
cannam@95 71 [m4_foreach([_Lt_suffix],
cannam@95 72 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
cannam@95 73 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
cannam@95 74
cannam@95 75
cannam@95 76 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
cannam@95 77 # -----------------------------------------------------------------------
cannam@95 78 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
cannam@95 79 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
cannam@95 80 m4_define([lt_if_append_uniq],
cannam@95 81 [m4_ifdef([$1],
cannam@95 82 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
cannam@95 83 [lt_append([$1], [$2], [$3])$4],
cannam@95 84 [$5])],
cannam@95 85 [lt_append([$1], [$2], [$3])$4])])
cannam@95 86
cannam@95 87
cannam@95 88 # lt_dict_add(DICT, KEY, VALUE)
cannam@95 89 # -----------------------------
cannam@95 90 m4_define([lt_dict_add],
cannam@95 91 [m4_define([$1($2)], [$3])])
cannam@95 92
cannam@95 93
cannam@95 94 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
cannam@95 95 # --------------------------------------------
cannam@95 96 m4_define([lt_dict_add_subkey],
cannam@95 97 [m4_define([$1($2:$3)], [$4])])
cannam@95 98
cannam@95 99
cannam@95 100 # lt_dict_fetch(DICT, KEY, [SUBKEY])
cannam@95 101 # ----------------------------------
cannam@95 102 m4_define([lt_dict_fetch],
cannam@95 103 [m4_ifval([$3],
cannam@95 104 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
cannam@95 105 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
cannam@95 106
cannam@95 107
cannam@95 108 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
cannam@95 109 # -----------------------------------------------------------------
cannam@95 110 m4_define([lt_if_dict_fetch],
cannam@95 111 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
cannam@95 112 [$5],
cannam@95 113 [$6])])
cannam@95 114
cannam@95 115
cannam@95 116 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
cannam@95 117 # --------------------------------------------------------------
cannam@95 118 m4_define([lt_dict_filter],
cannam@95 119 [m4_if([$5], [], [],
cannam@95 120 [lt_join(m4_quote(m4_default([$4], [[, ]])),
cannam@95 121 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
cannam@95 122 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
cannam@95 123 ])