1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/crashreporter/google-breakpad/m4/ltoptions.m4 Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,368 @@ 1.4 +# Helper functions for option handling. -*- Autoconf -*- 1.5 +# 1.6 +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 1.7 +# Written by Gary V. Vaughan, 2004 1.8 +# 1.9 +# This file is free software; the Free Software Foundation gives 1.10 +# unlimited permission to copy and/or distribute it, with or without 1.11 +# modifications, as long as this notice is preserved. 1.12 + 1.13 +# serial 6 ltoptions.m4 1.14 + 1.15 +# This is to help aclocal find these macros, as it can't see m4_define. 1.16 +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 1.17 + 1.18 + 1.19 +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 1.20 +# ------------------------------------------ 1.21 +m4_define([_LT_MANGLE_OPTION], 1.22 +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 1.23 + 1.24 + 1.25 +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 1.26 +# --------------------------------------- 1.27 +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 1.28 +# matching handler defined, dispatch to it. Other OPTION-NAMEs are 1.29 +# saved as a flag. 1.30 +m4_define([_LT_SET_OPTION], 1.31 +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 1.32 +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 1.33 + _LT_MANGLE_DEFUN([$1], [$2]), 1.34 + [m4_warning([Unknown $1 option `$2'])])[]dnl 1.35 +]) 1.36 + 1.37 + 1.38 +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 1.39 +# ------------------------------------------------------------ 1.40 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1.41 +m4_define([_LT_IF_OPTION], 1.42 +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 1.43 + 1.44 + 1.45 +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 1.46 +# ------------------------------------------------------- 1.47 +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 1.48 +# are set. 1.49 +m4_define([_LT_UNLESS_OPTIONS], 1.50 +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 1.51 + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 1.52 + [m4_define([$0_found])])])[]dnl 1.53 +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 1.54 +])[]dnl 1.55 +]) 1.56 + 1.57 + 1.58 +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 1.59 +# ---------------------------------------- 1.60 +# OPTION-LIST is a space-separated list of Libtool options associated 1.61 +# with MACRO-NAME. If any OPTION has a matching handler declared with 1.62 +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 1.63 +# the unknown option and exit. 1.64 +m4_defun([_LT_SET_OPTIONS], 1.65 +[# Set options 1.66 +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 1.67 + [_LT_SET_OPTION([$1], _LT_Option)]) 1.68 + 1.69 +m4_if([$1],[LT_INIT],[ 1.70 + dnl 1.71 + dnl Simply set some default values (i.e off) if boolean options were not 1.72 + dnl specified: 1.73 + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 1.74 + ]) 1.75 + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 1.76 + ]) 1.77 + dnl 1.78 + dnl If no reference was made to various pairs of opposing options, then 1.79 + dnl we run the default mode handler for the pair. For example, if neither 1.80 + dnl `shared' nor `disable-shared' was passed, we enable building of shared 1.81 + dnl archives by default: 1.82 + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 1.83 + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 1.84 + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 1.85 + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 1.86 + [_LT_ENABLE_FAST_INSTALL]) 1.87 + ]) 1.88 +])# _LT_SET_OPTIONS 1.89 + 1.90 + 1.91 +## --------------------------------- ## 1.92 +## Macros to handle LT_INIT options. ## 1.93 +## --------------------------------- ## 1.94 + 1.95 +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 1.96 +# ----------------------------------------- 1.97 +m4_define([_LT_MANGLE_DEFUN], 1.98 +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 1.99 + 1.100 + 1.101 +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 1.102 +# ----------------------------------------------- 1.103 +m4_define([LT_OPTION_DEFINE], 1.104 +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 1.105 +])# LT_OPTION_DEFINE 1.106 + 1.107 + 1.108 +# dlopen 1.109 +# ------ 1.110 +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 1.111 +]) 1.112 + 1.113 +AU_DEFUN([AC_LIBTOOL_DLOPEN], 1.114 +[_LT_SET_OPTION([LT_INIT], [dlopen]) 1.115 +AC_DIAGNOSE([obsolete], 1.116 +[$0: Remove this warning and the call to _LT_SET_OPTION when you 1.117 +put the `dlopen' option into LT_INIT's first parameter.]) 1.118 +]) 1.119 + 1.120 +dnl aclocal-1.4 backwards compatibility: 1.121 +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 1.122 + 1.123 + 1.124 +# win32-dll 1.125 +# --------- 1.126 +# Declare package support for building win32 dll's. 1.127 +LT_OPTION_DEFINE([LT_INIT], [win32-dll], 1.128 +[enable_win32_dll=yes 1.129 + 1.130 +case $host in 1.131 +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 1.132 + AC_CHECK_TOOL(AS, as, false) 1.133 + AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1.134 + AC_CHECK_TOOL(OBJDUMP, objdump, false) 1.135 + ;; 1.136 +esac 1.137 + 1.138 +test -z "$AS" && AS=as 1.139 +_LT_DECL([], [AS], [0], [Assembler program])dnl 1.140 + 1.141 +test -z "$DLLTOOL" && DLLTOOL=dlltool 1.142 +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 1.143 + 1.144 +test -z "$OBJDUMP" && OBJDUMP=objdump 1.145 +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 1.146 +])# win32-dll 1.147 + 1.148 +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 1.149 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1.150 +_LT_SET_OPTION([LT_INIT], [win32-dll]) 1.151 +AC_DIAGNOSE([obsolete], 1.152 +[$0: Remove this warning and the call to _LT_SET_OPTION when you 1.153 +put the `win32-dll' option into LT_INIT's first parameter.]) 1.154 +]) 1.155 + 1.156 +dnl aclocal-1.4 backwards compatibility: 1.157 +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 1.158 + 1.159 + 1.160 +# _LT_ENABLE_SHARED([DEFAULT]) 1.161 +# ---------------------------- 1.162 +# implement the --enable-shared flag, and supports the `shared' and 1.163 +# `disable-shared' LT_INIT options. 1.164 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1.165 +m4_define([_LT_ENABLE_SHARED], 1.166 +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 1.167 +AC_ARG_ENABLE([shared], 1.168 + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1.169 + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 1.170 + [p=${PACKAGE-default} 1.171 + case $enableval in 1.172 + yes) enable_shared=yes ;; 1.173 + no) enable_shared=no ;; 1.174 + *) 1.175 + enable_shared=no 1.176 + # Look at the argument we got. We use all the common list separators. 1.177 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1.178 + for pkg in $enableval; do 1.179 + IFS="$lt_save_ifs" 1.180 + if test "X$pkg" = "X$p"; then 1.181 + enable_shared=yes 1.182 + fi 1.183 + done 1.184 + IFS="$lt_save_ifs" 1.185 + ;; 1.186 + esac], 1.187 + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 1.188 + 1.189 + _LT_DECL([build_libtool_libs], [enable_shared], [0], 1.190 + [Whether or not to build shared libraries]) 1.191 +])# _LT_ENABLE_SHARED 1.192 + 1.193 +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 1.194 +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 1.195 + 1.196 +# Old names: 1.197 +AC_DEFUN([AC_ENABLE_SHARED], 1.198 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 1.199 +]) 1.200 + 1.201 +AC_DEFUN([AC_DISABLE_SHARED], 1.202 +[_LT_SET_OPTION([LT_INIT], [disable-shared]) 1.203 +]) 1.204 + 1.205 +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 1.206 +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 1.207 + 1.208 +dnl aclocal-1.4 backwards compatibility: 1.209 +dnl AC_DEFUN([AM_ENABLE_SHARED], []) 1.210 +dnl AC_DEFUN([AM_DISABLE_SHARED], []) 1.211 + 1.212 + 1.213 + 1.214 +# _LT_ENABLE_STATIC([DEFAULT]) 1.215 +# ---------------------------- 1.216 +# implement the --enable-static flag, and support the `static' and 1.217 +# `disable-static' LT_INIT options. 1.218 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1.219 +m4_define([_LT_ENABLE_STATIC], 1.220 +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 1.221 +AC_ARG_ENABLE([static], 1.222 + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1.223 + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 1.224 + [p=${PACKAGE-default} 1.225 + case $enableval in 1.226 + yes) enable_static=yes ;; 1.227 + no) enable_static=no ;; 1.228 + *) 1.229 + enable_static=no 1.230 + # Look at the argument we got. We use all the common list separators. 1.231 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1.232 + for pkg in $enableval; do 1.233 + IFS="$lt_save_ifs" 1.234 + if test "X$pkg" = "X$p"; then 1.235 + enable_static=yes 1.236 + fi 1.237 + done 1.238 + IFS="$lt_save_ifs" 1.239 + ;; 1.240 + esac], 1.241 + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 1.242 + 1.243 + _LT_DECL([build_old_libs], [enable_static], [0], 1.244 + [Whether or not to build static libraries]) 1.245 +])# _LT_ENABLE_STATIC 1.246 + 1.247 +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 1.248 +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 1.249 + 1.250 +# Old names: 1.251 +AC_DEFUN([AC_ENABLE_STATIC], 1.252 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 1.253 +]) 1.254 + 1.255 +AC_DEFUN([AC_DISABLE_STATIC], 1.256 +[_LT_SET_OPTION([LT_INIT], [disable-static]) 1.257 +]) 1.258 + 1.259 +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 1.260 +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 1.261 + 1.262 +dnl aclocal-1.4 backwards compatibility: 1.263 +dnl AC_DEFUN([AM_ENABLE_STATIC], []) 1.264 +dnl AC_DEFUN([AM_DISABLE_STATIC], []) 1.265 + 1.266 + 1.267 + 1.268 +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 1.269 +# ---------------------------------- 1.270 +# implement the --enable-fast-install flag, and support the `fast-install' 1.271 +# and `disable-fast-install' LT_INIT options. 1.272 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1.273 +m4_define([_LT_ENABLE_FAST_INSTALL], 1.274 +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 1.275 +AC_ARG_ENABLE([fast-install], 1.276 + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 1.277 + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 1.278 + [p=${PACKAGE-default} 1.279 + case $enableval in 1.280 + yes) enable_fast_install=yes ;; 1.281 + no) enable_fast_install=no ;; 1.282 + *) 1.283 + enable_fast_install=no 1.284 + # Look at the argument we got. We use all the common list separators. 1.285 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1.286 + for pkg in $enableval; do 1.287 + IFS="$lt_save_ifs" 1.288 + if test "X$pkg" = "X$p"; then 1.289 + enable_fast_install=yes 1.290 + fi 1.291 + done 1.292 + IFS="$lt_save_ifs" 1.293 + ;; 1.294 + esac], 1.295 + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 1.296 + 1.297 +_LT_DECL([fast_install], [enable_fast_install], [0], 1.298 + [Whether or not to optimize for fast installation])dnl 1.299 +])# _LT_ENABLE_FAST_INSTALL 1.300 + 1.301 +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 1.302 +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 1.303 + 1.304 +# Old names: 1.305 +AU_DEFUN([AC_ENABLE_FAST_INSTALL], 1.306 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 1.307 +AC_DIAGNOSE([obsolete], 1.308 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1.309 +the `fast-install' option into LT_INIT's first parameter.]) 1.310 +]) 1.311 + 1.312 +AU_DEFUN([AC_DISABLE_FAST_INSTALL], 1.313 +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 1.314 +AC_DIAGNOSE([obsolete], 1.315 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1.316 +the `disable-fast-install' option into LT_INIT's first parameter.]) 1.317 +]) 1.318 + 1.319 +dnl aclocal-1.4 backwards compatibility: 1.320 +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 1.321 +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 1.322 + 1.323 + 1.324 +# _LT_WITH_PIC([MODE]) 1.325 +# -------------------- 1.326 +# implement the --with-pic flag, and support the `pic-only' and `no-pic' 1.327 +# LT_INIT options. 1.328 +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 1.329 +m4_define([_LT_WITH_PIC], 1.330 +[AC_ARG_WITH([pic], 1.331 + [AS_HELP_STRING([--with-pic], 1.332 + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1.333 + [pic_mode="$withval"], 1.334 + [pic_mode=default]) 1.335 + 1.336 +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 1.337 + 1.338 +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 1.339 +])# _LT_WITH_PIC 1.340 + 1.341 +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 1.342 +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 1.343 + 1.344 +# Old name: 1.345 +AU_DEFUN([AC_LIBTOOL_PICMODE], 1.346 +[_LT_SET_OPTION([LT_INIT], [pic-only]) 1.347 +AC_DIAGNOSE([obsolete], 1.348 +[$0: Remove this warning and the call to _LT_SET_OPTION when you 1.349 +put the `pic-only' option into LT_INIT's first parameter.]) 1.350 +]) 1.351 + 1.352 +dnl aclocal-1.4 backwards compatibility: 1.353 +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 1.354 + 1.355 +## ----------------- ## 1.356 +## LTDL_INIT Options ## 1.357 +## ----------------- ## 1.358 + 1.359 +m4_define([_LTDL_MODE], []) 1.360 +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 1.361 + [m4_define([_LTDL_MODE], [nonrecursive])]) 1.362 +LT_OPTION_DEFINE([LTDL_INIT], [recursive], 1.363 + [m4_define([_LTDL_MODE], [recursive])]) 1.364 +LT_OPTION_DEFINE([LTDL_INIT], [subproject], 1.365 + [m4_define([_LTDL_MODE], [subproject])]) 1.366 + 1.367 +m4_define([_LTDL_TYPE], []) 1.368 +LT_OPTION_DEFINE([LTDL_INIT], [installable], 1.369 + [m4_define([_LTDL_TYPE], [installable])]) 1.370 +LT_OPTION_DEFINE([LTDL_INIT], [convenience], 1.371 + [m4_define([_LTDL_TYPE], [convenience])])