Split out ltoptions.m4
authorSam Lantinga <slouken@libsdl.org>
Sun, 04 Oct 2009 21:00:33 +0000
changeset 3345437378d409b1
parent 3344 b2abf7a772fc
child 3346 195eb6d42bf0
Split out ltoptions.m4
acinclude/ltdl.m4
acinclude/ltoptions.m4
     1.1 --- a/acinclude/ltdl.m4	Sun Oct 04 20:46:33 2009 +0000
     1.2 +++ b/acinclude/ltdl.m4	Sun Oct 04 21:00:33 2009 +0000
     1.3 @@ -804,373 +804,3 @@
     1.4  dnl aclocal-1.4 backwards compatibility:
     1.5  dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
     1.6  
     1.7 -##############################################################################
     1.8 -# Helper functions for option handling.                    -*- Autoconf -*-
     1.9 -#
    1.10 -#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
    1.11 -#   Written by Gary V. Vaughan, 2004
    1.12 -#
    1.13 -# This file is free software; the Free Software Foundation gives
    1.14 -# unlimited permission to copy and/or distribute it, with or without
    1.15 -# modifications, as long as this notice is preserved.
    1.16 -
    1.17 -# serial 6 ltoptions.m4
    1.18 -
    1.19 -# This is to help aclocal find these macros, as it can't see m4_define.
    1.20 -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
    1.21 -
    1.22 -
    1.23 -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
    1.24 -# ------------------------------------------
    1.25 -m4_define([_LT_MANGLE_OPTION],
    1.26 -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
    1.27 -
    1.28 -
    1.29 -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
    1.30 -# ---------------------------------------
    1.31 -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
    1.32 -# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
    1.33 -# saved as a flag.
    1.34 -m4_define([_LT_SET_OPTION],
    1.35 -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
    1.36 -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
    1.37 -        _LT_MANGLE_DEFUN([$1], [$2]),
    1.38 -    [m4_warning([Unknown $1 option `$2'])])[]dnl
    1.39 -])
    1.40 -
    1.41 -
    1.42 -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
    1.43 -# ------------------------------------------------------------
    1.44 -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
    1.45 -m4_define([_LT_IF_OPTION],
    1.46 -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
    1.47 -
    1.48 -
    1.49 -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
    1.50 -# -------------------------------------------------------
    1.51 -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
    1.52 -# are set.
    1.53 -m4_define([_LT_UNLESS_OPTIONS],
    1.54 -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
    1.55 -	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
    1.56 -		      [m4_define([$0_found])])])[]dnl
    1.57 -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
    1.58 -])[]dnl
    1.59 -])
    1.60 -
    1.61 -
    1.62 -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
    1.63 -# ----------------------------------------
    1.64 -# OPTION-LIST is a space-separated list of Libtool options associated
    1.65 -# with MACRO-NAME.  If any OPTION has a matching handler declared with
    1.66 -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
    1.67 -# the unknown option and exit.
    1.68 -m4_defun([_LT_SET_OPTIONS],
    1.69 -[# Set options
    1.70 -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
    1.71 -    [_LT_SET_OPTION([$1], _LT_Option)])
    1.72 -
    1.73 -m4_if([$1],[LT_INIT],[
    1.74 -  dnl
    1.75 -  dnl Simply set some default values (i.e off) if boolean options were not
    1.76 -  dnl specified:
    1.77 -  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
    1.78 -  ])
    1.79 -  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
    1.80 -  ])
    1.81 -  dnl
    1.82 -  dnl If no reference was made to various pairs of opposing options, then
    1.83 -  dnl we run the default mode handler for the pair.  For example, if neither
    1.84 -  dnl `shared' nor `disable-shared' was passed, we enable building of shared
    1.85 -  dnl archives by default:
    1.86 -  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
    1.87 -  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
    1.88 -  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
    1.89 -  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
    1.90 -  		   [_LT_ENABLE_FAST_INSTALL])
    1.91 -  ])
    1.92 -])# _LT_SET_OPTIONS
    1.93 -
    1.94 -
    1.95 -## --------------------------------- ##
    1.96 -## Macros to handle LT_INIT options. ##
    1.97 -## --------------------------------- ##
    1.98 -
    1.99 -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
   1.100 -# -----------------------------------------
   1.101 -m4_define([_LT_MANGLE_DEFUN],
   1.102 -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
   1.103 -
   1.104 -
   1.105 -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
   1.106 -# -----------------------------------------------
   1.107 -m4_define([LT_OPTION_DEFINE],
   1.108 -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
   1.109 -])# LT_OPTION_DEFINE
   1.110 -
   1.111 -
   1.112 -# dlopen
   1.113 -# ------
   1.114 -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
   1.115 -])
   1.116 -
   1.117 -AU_DEFUN([AC_LIBTOOL_DLOPEN],
   1.118 -[_LT_SET_OPTION([LT_INIT], [dlopen])
   1.119 -AC_DIAGNOSE([obsolete],
   1.120 -[$0: Remove this warning and the call to _LT_SET_OPTION when you
   1.121 -put the `dlopen' option into LT_INIT's first parameter.])
   1.122 -])
   1.123 -
   1.124 -dnl aclocal-1.4 backwards compatibility:
   1.125 -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
   1.126 -
   1.127 -
   1.128 -# win32-dll
   1.129 -# ---------
   1.130 -# Declare package support for building win32 dll's.
   1.131 -LT_OPTION_DEFINE([LT_INIT], [win32-dll],
   1.132 -[enable_win32_dll=yes
   1.133 -
   1.134 -case $host in
   1.135 -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
   1.136 -  AC_CHECK_TOOL(AS, as, false)
   1.137 -  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   1.138 -  AC_CHECK_TOOL(OBJDUMP, objdump, false)
   1.139 -  ;;
   1.140 -esac
   1.141 -
   1.142 -test -z "$AS" && AS=as
   1.143 -_LT_DECL([], [AS],      [0], [Assembler program])dnl
   1.144 -
   1.145 -test -z "$DLLTOOL" && DLLTOOL=dlltool
   1.146 -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
   1.147 -
   1.148 -test -z "$OBJDUMP" && OBJDUMP=objdump
   1.149 -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
   1.150 -])# win32-dll
   1.151 -
   1.152 -AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
   1.153 -[AC_REQUIRE([AC_CANONICAL_HOST])dnl
   1.154 -_LT_SET_OPTION([LT_INIT], [win32-dll])
   1.155 -AC_DIAGNOSE([obsolete],
   1.156 -[$0: Remove this warning and the call to _LT_SET_OPTION when you
   1.157 -put the `win32-dll' option into LT_INIT's first parameter.])
   1.158 -])
   1.159 -
   1.160 -dnl aclocal-1.4 backwards compatibility:
   1.161 -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
   1.162 -
   1.163 -
   1.164 -# _LT_ENABLE_SHARED([DEFAULT])
   1.165 -# ----------------------------
   1.166 -# implement the --enable-shared flag, and supports the `shared' and
   1.167 -# `disable-shared' LT_INIT options.
   1.168 -# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
   1.169 -m4_define([_LT_ENABLE_SHARED],
   1.170 -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
   1.171 -AC_ARG_ENABLE([shared],
   1.172 -    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
   1.173 -	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
   1.174 -    [p=${PACKAGE-default}
   1.175 -    case $enableval in
   1.176 -    yes) enable_shared=yes ;;
   1.177 -    no) enable_shared=no ;;
   1.178 -    *)
   1.179 -      enable_shared=no
   1.180 -      # Look at the argument we got.  We use all the common list separators.
   1.181 -      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   1.182 -      for pkg in $enableval; do
   1.183 -	IFS="$lt_save_ifs"
   1.184 -	if test "X$pkg" = "X$p"; then
   1.185 -	  enable_shared=yes
   1.186 -	fi
   1.187 -      done
   1.188 -      IFS="$lt_save_ifs"
   1.189 -      ;;
   1.190 -    esac],
   1.191 -    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
   1.192 -
   1.193 -    _LT_DECL([build_libtool_libs], [enable_shared], [0],
   1.194 -	[Whether or not to build shared libraries])
   1.195 -])# _LT_ENABLE_SHARED
   1.196 -
   1.197 -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
   1.198 -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
   1.199 -
   1.200 -# Old names:
   1.201 -AC_DEFUN([AC_ENABLE_SHARED],
   1.202 -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
   1.203 -])
   1.204 -
   1.205 -AC_DEFUN([AC_DISABLE_SHARED],
   1.206 -[_LT_SET_OPTION([LT_INIT], [disable-shared])
   1.207 -])
   1.208 -
   1.209 -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
   1.210 -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
   1.211 -
   1.212 -dnl aclocal-1.4 backwards compatibility:
   1.213 -dnl AC_DEFUN([AM_ENABLE_SHARED], [])
   1.214 -dnl AC_DEFUN([AM_DISABLE_SHARED], [])
   1.215 -
   1.216 -
   1.217 -
   1.218 -# _LT_ENABLE_STATIC([DEFAULT])
   1.219 -# ----------------------------
   1.220 -# implement the --enable-static flag, and support the `static' and
   1.221 -# `disable-static' LT_INIT options.
   1.222 -# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
   1.223 -m4_define([_LT_ENABLE_STATIC],
   1.224 -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
   1.225 -AC_ARG_ENABLE([static],
   1.226 -    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
   1.227 -	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
   1.228 -    [p=${PACKAGE-default}
   1.229 -    case $enableval in
   1.230 -    yes) enable_static=yes ;;
   1.231 -    no) enable_static=no ;;
   1.232 -    *)
   1.233 -     enable_static=no
   1.234 -      # Look at the argument we got.  We use all the common list separators.
   1.235 -      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   1.236 -      for pkg in $enableval; do
   1.237 -	IFS="$lt_save_ifs"
   1.238 -	if test "X$pkg" = "X$p"; then
   1.239 -	  enable_static=yes
   1.240 -	fi
   1.241 -      done
   1.242 -      IFS="$lt_save_ifs"
   1.243 -      ;;
   1.244 -    esac],
   1.245 -    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
   1.246 -
   1.247 -    _LT_DECL([build_old_libs], [enable_static], [0],
   1.248 -	[Whether or not to build static libraries])
   1.249 -])# _LT_ENABLE_STATIC
   1.250 -
   1.251 -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
   1.252 -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
   1.253 -
   1.254 -# Old names:
   1.255 -AC_DEFUN([AC_ENABLE_STATIC],
   1.256 -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
   1.257 -])
   1.258 -
   1.259 -AC_DEFUN([AC_DISABLE_STATIC],
   1.260 -[_LT_SET_OPTION([LT_INIT], [disable-static])
   1.261 -])
   1.262 -
   1.263 -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
   1.264 -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
   1.265 -
   1.266 -dnl aclocal-1.4 backwards compatibility:
   1.267 -dnl AC_DEFUN([AM_ENABLE_STATIC], [])
   1.268 -dnl AC_DEFUN([AM_DISABLE_STATIC], [])
   1.269 -
   1.270 -
   1.271 -
   1.272 -# _LT_ENABLE_FAST_INSTALL([DEFAULT])
   1.273 -# ----------------------------------
   1.274 -# implement the --enable-fast-install flag, and support the `fast-install'
   1.275 -# and `disable-fast-install' LT_INIT options.
   1.276 -# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
   1.277 -m4_define([_LT_ENABLE_FAST_INSTALL],
   1.278 -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
   1.279 -AC_ARG_ENABLE([fast-install],
   1.280 -    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
   1.281 -    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
   1.282 -    [p=${PACKAGE-default}
   1.283 -    case $enableval in
   1.284 -    yes) enable_fast_install=yes ;;
   1.285 -    no) enable_fast_install=no ;;
   1.286 -    *)
   1.287 -      enable_fast_install=no
   1.288 -      # Look at the argument we got.  We use all the common list separators.
   1.289 -      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   1.290 -      for pkg in $enableval; do
   1.291 -	IFS="$lt_save_ifs"
   1.292 -	if test "X$pkg" = "X$p"; then
   1.293 -	  enable_fast_install=yes
   1.294 -	fi
   1.295 -      done
   1.296 -      IFS="$lt_save_ifs"
   1.297 -      ;;
   1.298 -    esac],
   1.299 -    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
   1.300 -
   1.301 -_LT_DECL([fast_install], [enable_fast_install], [0],
   1.302 -	 [Whether or not to optimize for fast installation])dnl
   1.303 -])# _LT_ENABLE_FAST_INSTALL
   1.304 -
   1.305 -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
   1.306 -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
   1.307 -
   1.308 -# Old names:
   1.309 -AU_DEFUN([AC_ENABLE_FAST_INSTALL],
   1.310 -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
   1.311 -AC_DIAGNOSE([obsolete],
   1.312 -[$0: Remove this warning and the call to _LT_SET_OPTION when you put
   1.313 -the `fast-install' option into LT_INIT's first parameter.])
   1.314 -])
   1.315 -
   1.316 -AU_DEFUN([AC_DISABLE_FAST_INSTALL],
   1.317 -[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
   1.318 -AC_DIAGNOSE([obsolete],
   1.319 -[$0: Remove this warning and the call to _LT_SET_OPTION when you put
   1.320 -the `disable-fast-install' option into LT_INIT's first parameter.])
   1.321 -])
   1.322 -
   1.323 -dnl aclocal-1.4 backwards compatibility:
   1.324 -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
   1.325 -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
   1.326 -
   1.327 -
   1.328 -# _LT_WITH_PIC([MODE])
   1.329 -# --------------------
   1.330 -# implement the --with-pic flag, and support the `pic-only' and `no-pic'
   1.331 -# LT_INIT options.
   1.332 -# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
   1.333 -m4_define([_LT_WITH_PIC],
   1.334 -[AC_ARG_WITH([pic],
   1.335 -    [AS_HELP_STRING([--with-pic],
   1.336 -	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
   1.337 -    [pic_mode="$withval"],
   1.338 -    [pic_mode=default])
   1.339 -
   1.340 -test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
   1.341 -
   1.342 -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
   1.343 -])# _LT_WITH_PIC
   1.344 -
   1.345 -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
   1.346 -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
   1.347 -
   1.348 -# Old name:
   1.349 -AU_DEFUN([AC_LIBTOOL_PICMODE],
   1.350 -[_LT_SET_OPTION([LT_INIT], [pic-only])
   1.351 -AC_DIAGNOSE([obsolete],
   1.352 -[$0: Remove this warning and the call to _LT_SET_OPTION when you
   1.353 -put the `pic-only' option into LT_INIT's first parameter.])
   1.354 -])
   1.355 -
   1.356 -dnl aclocal-1.4 backwards compatibility:
   1.357 -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
   1.358 -
   1.359 -## ----------------- ##
   1.360 -## LTDL_INIT Options ##
   1.361 -## ----------------- ##
   1.362 -
   1.363 -m4_define([_LTDL_MODE], [])
   1.364 -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
   1.365 -		 [m4_define([_LTDL_MODE], [nonrecursive])])
   1.366 -LT_OPTION_DEFINE([LTDL_INIT], [recursive],
   1.367 -		 [m4_define([_LTDL_MODE], [recursive])])
   1.368 -LT_OPTION_DEFINE([LTDL_INIT], [subproject],
   1.369 -		 [m4_define([_LTDL_MODE], [subproject])])
   1.370 -
   1.371 -m4_define([_LTDL_TYPE], [])
   1.372 -LT_OPTION_DEFINE([LTDL_INIT], [installable],
   1.373 -		 [m4_define([_LTDL_TYPE], [installable])])
   1.374 -LT_OPTION_DEFINE([LTDL_INIT], [convenience],
   1.375 -		 [m4_define([_LTDL_TYPE], [convenience])])
   1.376 -
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/acinclude/ltoptions.m4	Sun Oct 04 21:00:33 2009 +0000
     2.3 @@ -0,0 +1,370 @@
     2.4 +##############################################################################
     2.5 +# Helper functions for option handling.                    -*- Autoconf -*-
     2.6 +#
     2.7 +#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
     2.8 +#   Written by Gary V. Vaughan, 2004
     2.9 +#
    2.10 +# This file is free software; the Free Software Foundation gives
    2.11 +# unlimited permission to copy and/or distribute it, with or without
    2.12 +# modifications, as long as this notice is preserved.
    2.13 +
    2.14 +# serial 6 ltoptions.m4
    2.15 +
    2.16 +# This is to help aclocal find these macros, as it can't see m4_define.
    2.17 +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
    2.18 +
    2.19 +
    2.20 +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
    2.21 +# ------------------------------------------
    2.22 +m4_define([_LT_MANGLE_OPTION],
    2.23 +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
    2.24 +
    2.25 +
    2.26 +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
    2.27 +# ---------------------------------------
    2.28 +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
    2.29 +# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
    2.30 +# saved as a flag.
    2.31 +m4_define([_LT_SET_OPTION],
    2.32 +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
    2.33 +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
    2.34 +        _LT_MANGLE_DEFUN([$1], [$2]),
    2.35 +    [m4_warning([Unknown $1 option `$2'])])[]dnl
    2.36 +])
    2.37 +
    2.38 +
    2.39 +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
    2.40 +# ------------------------------------------------------------
    2.41 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
    2.42 +m4_define([_LT_IF_OPTION],
    2.43 +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
    2.44 +
    2.45 +
    2.46 +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
    2.47 +# -------------------------------------------------------
    2.48 +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
    2.49 +# are set.
    2.50 +m4_define([_LT_UNLESS_OPTIONS],
    2.51 +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
    2.52 +	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
    2.53 +		      [m4_define([$0_found])])])[]dnl
    2.54 +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
    2.55 +])[]dnl
    2.56 +])
    2.57 +
    2.58 +
    2.59 +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
    2.60 +# ----------------------------------------
    2.61 +# OPTION-LIST is a space-separated list of Libtool options associated
    2.62 +# with MACRO-NAME.  If any OPTION has a matching handler declared with
    2.63 +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
    2.64 +# the unknown option and exit.
    2.65 +m4_defun([_LT_SET_OPTIONS],
    2.66 +[# Set options
    2.67 +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
    2.68 +    [_LT_SET_OPTION([$1], _LT_Option)])
    2.69 +
    2.70 +m4_if([$1],[LT_INIT],[
    2.71 +  dnl
    2.72 +  dnl Simply set some default values (i.e off) if boolean options were not
    2.73 +  dnl specified:
    2.74 +  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
    2.75 +  ])
    2.76 +  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
    2.77 +  ])
    2.78 +  dnl
    2.79 +  dnl If no reference was made to various pairs of opposing options, then
    2.80 +  dnl we run the default mode handler for the pair.  For example, if neither
    2.81 +  dnl `shared' nor `disable-shared' was passed, we enable building of shared
    2.82 +  dnl archives by default:
    2.83 +  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
    2.84 +  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
    2.85 +  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
    2.86 +  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
    2.87 +  		   [_LT_ENABLE_FAST_INSTALL])
    2.88 +  ])
    2.89 +])# _LT_SET_OPTIONS
    2.90 +
    2.91 +
    2.92 +## --------------------------------- ##
    2.93 +## Macros to handle LT_INIT options. ##
    2.94 +## --------------------------------- ##
    2.95 +
    2.96 +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
    2.97 +# -----------------------------------------
    2.98 +m4_define([_LT_MANGLE_DEFUN],
    2.99 +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
   2.100 +
   2.101 +
   2.102 +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
   2.103 +# -----------------------------------------------
   2.104 +m4_define([LT_OPTION_DEFINE],
   2.105 +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
   2.106 +])# LT_OPTION_DEFINE
   2.107 +
   2.108 +
   2.109 +# dlopen
   2.110 +# ------
   2.111 +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
   2.112 +])
   2.113 +
   2.114 +AU_DEFUN([AC_LIBTOOL_DLOPEN],
   2.115 +[_LT_SET_OPTION([LT_INIT], [dlopen])
   2.116 +AC_DIAGNOSE([obsolete],
   2.117 +[$0: Remove this warning and the call to _LT_SET_OPTION when you
   2.118 +put the `dlopen' option into LT_INIT's first parameter.])
   2.119 +])
   2.120 +
   2.121 +dnl aclocal-1.4 backwards compatibility:
   2.122 +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
   2.123 +
   2.124 +
   2.125 +# win32-dll
   2.126 +# ---------
   2.127 +# Declare package support for building win32 dll's.
   2.128 +LT_OPTION_DEFINE([LT_INIT], [win32-dll],
   2.129 +[enable_win32_dll=yes
   2.130 +
   2.131 +case $host in
   2.132 +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
   2.133 +  AC_CHECK_TOOL(AS, as, false)
   2.134 +  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   2.135 +  AC_CHECK_TOOL(OBJDUMP, objdump, false)
   2.136 +  ;;
   2.137 +esac
   2.138 +
   2.139 +test -z "$AS" && AS=as
   2.140 +_LT_DECL([], [AS],      [0], [Assembler program])dnl
   2.141 +
   2.142 +test -z "$DLLTOOL" && DLLTOOL=dlltool
   2.143 +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
   2.144 +
   2.145 +test -z "$OBJDUMP" && OBJDUMP=objdump
   2.146 +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
   2.147 +])# win32-dll
   2.148 +
   2.149 +AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
   2.150 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
   2.151 +_LT_SET_OPTION([LT_INIT], [win32-dll])
   2.152 +AC_DIAGNOSE([obsolete],
   2.153 +[$0: Remove this warning and the call to _LT_SET_OPTION when you
   2.154 +put the `win32-dll' option into LT_INIT's first parameter.])
   2.155 +])
   2.156 +
   2.157 +dnl aclocal-1.4 backwards compatibility:
   2.158 +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
   2.159 +
   2.160 +
   2.161 +# _LT_ENABLE_SHARED([DEFAULT])
   2.162 +# ----------------------------
   2.163 +# implement the --enable-shared flag, and supports the `shared' and
   2.164 +# `disable-shared' LT_INIT options.
   2.165 +# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
   2.166 +m4_define([_LT_ENABLE_SHARED],
   2.167 +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
   2.168 +AC_ARG_ENABLE([shared],
   2.169 +    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
   2.170 +	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
   2.171 +    [p=${PACKAGE-default}
   2.172 +    case $enableval in
   2.173 +    yes) enable_shared=yes ;;
   2.174 +    no) enable_shared=no ;;
   2.175 +    *)
   2.176 +      enable_shared=no
   2.177 +      # Look at the argument we got.  We use all the common list separators.
   2.178 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   2.179 +      for pkg in $enableval; do
   2.180 +	IFS="$lt_save_ifs"
   2.181 +	if test "X$pkg" = "X$p"; then
   2.182 +	  enable_shared=yes
   2.183 +	fi
   2.184 +      done
   2.185 +      IFS="$lt_save_ifs"
   2.186 +      ;;
   2.187 +    esac],
   2.188 +    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
   2.189 +
   2.190 +    _LT_DECL([build_libtool_libs], [enable_shared], [0],
   2.191 +	[Whether or not to build shared libraries])
   2.192 +])# _LT_ENABLE_SHARED
   2.193 +
   2.194 +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
   2.195 +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
   2.196 +
   2.197 +# Old names:
   2.198 +AC_DEFUN([AC_ENABLE_SHARED],
   2.199 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
   2.200 +])
   2.201 +
   2.202 +AC_DEFUN([AC_DISABLE_SHARED],
   2.203 +[_LT_SET_OPTION([LT_INIT], [disable-shared])
   2.204 +])
   2.205 +
   2.206 +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
   2.207 +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
   2.208 +
   2.209 +dnl aclocal-1.4 backwards compatibility:
   2.210 +dnl AC_DEFUN([AM_ENABLE_SHARED], [])
   2.211 +dnl AC_DEFUN([AM_DISABLE_SHARED], [])
   2.212 +
   2.213 +
   2.214 +
   2.215 +# _LT_ENABLE_STATIC([DEFAULT])
   2.216 +# ----------------------------
   2.217 +# implement the --enable-static flag, and support the `static' and
   2.218 +# `disable-static' LT_INIT options.
   2.219 +# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
   2.220 +m4_define([_LT_ENABLE_STATIC],
   2.221 +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
   2.222 +AC_ARG_ENABLE([static],
   2.223 +    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
   2.224 +	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
   2.225 +    [p=${PACKAGE-default}
   2.226 +    case $enableval in
   2.227 +    yes) enable_static=yes ;;
   2.228 +    no) enable_static=no ;;
   2.229 +    *)
   2.230 +     enable_static=no
   2.231 +      # Look at the argument we got.  We use all the common list separators.
   2.232 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   2.233 +      for pkg in $enableval; do
   2.234 +	IFS="$lt_save_ifs"
   2.235 +	if test "X$pkg" = "X$p"; then
   2.236 +	  enable_static=yes
   2.237 +	fi
   2.238 +      done
   2.239 +      IFS="$lt_save_ifs"
   2.240 +      ;;
   2.241 +    esac],
   2.242 +    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
   2.243 +
   2.244 +    _LT_DECL([build_old_libs], [enable_static], [0],
   2.245 +	[Whether or not to build static libraries])
   2.246 +])# _LT_ENABLE_STATIC
   2.247 +
   2.248 +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
   2.249 +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
   2.250 +
   2.251 +# Old names:
   2.252 +AC_DEFUN([AC_ENABLE_STATIC],
   2.253 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
   2.254 +])
   2.255 +
   2.256 +AC_DEFUN([AC_DISABLE_STATIC],
   2.257 +[_LT_SET_OPTION([LT_INIT], [disable-static])
   2.258 +])
   2.259 +
   2.260 +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
   2.261 +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
   2.262 +
   2.263 +dnl aclocal-1.4 backwards compatibility:
   2.264 +dnl AC_DEFUN([AM_ENABLE_STATIC], [])
   2.265 +dnl AC_DEFUN([AM_DISABLE_STATIC], [])
   2.266 +
   2.267 +
   2.268 +
   2.269 +# _LT_ENABLE_FAST_INSTALL([DEFAULT])
   2.270 +# ----------------------------------
   2.271 +# implement the --enable-fast-install flag, and support the `fast-install'
   2.272 +# and `disable-fast-install' LT_INIT options.
   2.273 +# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
   2.274 +m4_define([_LT_ENABLE_FAST_INSTALL],
   2.275 +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
   2.276 +AC_ARG_ENABLE([fast-install],
   2.277 +    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
   2.278 +    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
   2.279 +    [p=${PACKAGE-default}
   2.280 +    case $enableval in
   2.281 +    yes) enable_fast_install=yes ;;
   2.282 +    no) enable_fast_install=no ;;
   2.283 +    *)
   2.284 +      enable_fast_install=no
   2.285 +      # Look at the argument we got.  We use all the common list separators.
   2.286 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   2.287 +      for pkg in $enableval; do
   2.288 +	IFS="$lt_save_ifs"
   2.289 +	if test "X$pkg" = "X$p"; then
   2.290 +	  enable_fast_install=yes
   2.291 +	fi
   2.292 +      done
   2.293 +      IFS="$lt_save_ifs"
   2.294 +      ;;
   2.295 +    esac],
   2.296 +    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
   2.297 +
   2.298 +_LT_DECL([fast_install], [enable_fast_install], [0],
   2.299 +	 [Whether or not to optimize for fast installation])dnl
   2.300 +])# _LT_ENABLE_FAST_INSTALL
   2.301 +
   2.302 +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
   2.303 +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
   2.304 +
   2.305 +# Old names:
   2.306 +AU_DEFUN([AC_ENABLE_FAST_INSTALL],
   2.307 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
   2.308 +AC_DIAGNOSE([obsolete],
   2.309 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put
   2.310 +the `fast-install' option into LT_INIT's first parameter.])
   2.311 +])
   2.312 +
   2.313 +AU_DEFUN([AC_DISABLE_FAST_INSTALL],
   2.314 +[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
   2.315 +AC_DIAGNOSE([obsolete],
   2.316 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put
   2.317 +the `disable-fast-install' option into LT_INIT's first parameter.])
   2.318 +])
   2.319 +
   2.320 +dnl aclocal-1.4 backwards compatibility:
   2.321 +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
   2.322 +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
   2.323 +
   2.324 +
   2.325 +# _LT_WITH_PIC([MODE])
   2.326 +# --------------------
   2.327 +# implement the --with-pic flag, and support the `pic-only' and `no-pic'
   2.328 +# LT_INIT options.
   2.329 +# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
   2.330 +m4_define([_LT_WITH_PIC],
   2.331 +[AC_ARG_WITH([pic],
   2.332 +    [AS_HELP_STRING([--with-pic],
   2.333 +	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
   2.334 +    [pic_mode="$withval"],
   2.335 +    [pic_mode=default])
   2.336 +
   2.337 +test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
   2.338 +
   2.339 +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
   2.340 +])# _LT_WITH_PIC
   2.341 +
   2.342 +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
   2.343 +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
   2.344 +
   2.345 +# Old name:
   2.346 +AU_DEFUN([AC_LIBTOOL_PICMODE],
   2.347 +[_LT_SET_OPTION([LT_INIT], [pic-only])
   2.348 +AC_DIAGNOSE([obsolete],
   2.349 +[$0: Remove this warning and the call to _LT_SET_OPTION when you
   2.350 +put the `pic-only' option into LT_INIT's first parameter.])
   2.351 +])
   2.352 +
   2.353 +dnl aclocal-1.4 backwards compatibility:
   2.354 +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
   2.355 +
   2.356 +## ----------------- ##
   2.357 +## LTDL_INIT Options ##
   2.358 +## ----------------- ##
   2.359 +
   2.360 +m4_define([_LTDL_MODE], [])
   2.361 +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
   2.362 +		 [m4_define([_LTDL_MODE], [nonrecursive])])
   2.363 +LT_OPTION_DEFINE([LTDL_INIT], [recursive],
   2.364 +		 [m4_define([_LTDL_MODE], [recursive])])
   2.365 +LT_OPTION_DEFINE([LTDL_INIT], [subproject],
   2.366 +		 [m4_define([_LTDL_MODE], [subproject])])
   2.367 +
   2.368 +m4_define([_LTDL_TYPE], [])
   2.369 +LT_OPTION_DEFINE([LTDL_INIT], [installable],
   2.370 +		 [m4_define([_LTDL_TYPE], [installable])])
   2.371 +LT_OPTION_DEFINE([LTDL_INIT], [convenience],
   2.372 +		 [m4_define([_LTDL_TYPE], [convenience])])
   2.373 +