annotate src/opus-1.3/m4/ltoptions.m4 @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 7aeed7906520
children
rev   line source
Chris@69 1 # Helper functions for option handling. -*- Autoconf -*-
Chris@69 2 #
Chris@69 3 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
Chris@69 4 # Foundation, Inc.
Chris@69 5 # Written by Gary V. Vaughan, 2004
Chris@69 6 #
Chris@69 7 # This file is free software; the Free Software Foundation gives
Chris@69 8 # unlimited permission to copy and/or distribute it, with or without
Chris@69 9 # modifications, as long as this notice is preserved.
Chris@69 10
Chris@69 11 # serial 8 ltoptions.m4
Chris@69 12
Chris@69 13 # This is to help aclocal find these macros, as it can't see m4_define.
Chris@69 14 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
Chris@69 15
Chris@69 16
Chris@69 17 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
Chris@69 18 # ------------------------------------------
Chris@69 19 m4_define([_LT_MANGLE_OPTION],
Chris@69 20 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
Chris@69 21
Chris@69 22
Chris@69 23 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
Chris@69 24 # ---------------------------------------
Chris@69 25 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
Chris@69 26 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
Chris@69 27 # saved as a flag.
Chris@69 28 m4_define([_LT_SET_OPTION],
Chris@69 29 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
Chris@69 30 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
Chris@69 31 _LT_MANGLE_DEFUN([$1], [$2]),
Chris@69 32 [m4_warning([Unknown $1 option '$2'])])[]dnl
Chris@69 33 ])
Chris@69 34
Chris@69 35
Chris@69 36 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
Chris@69 37 # ------------------------------------------------------------
Chris@69 38 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
Chris@69 39 m4_define([_LT_IF_OPTION],
Chris@69 40 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
Chris@69 41
Chris@69 42
Chris@69 43 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
Chris@69 44 # -------------------------------------------------------
Chris@69 45 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
Chris@69 46 # are set.
Chris@69 47 m4_define([_LT_UNLESS_OPTIONS],
Chris@69 48 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
Chris@69 49 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
Chris@69 50 [m4_define([$0_found])])])[]dnl
Chris@69 51 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
Chris@69 52 ])[]dnl
Chris@69 53 ])
Chris@69 54
Chris@69 55
Chris@69 56 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
Chris@69 57 # ----------------------------------------
Chris@69 58 # OPTION-LIST is a space-separated list of Libtool options associated
Chris@69 59 # with MACRO-NAME. If any OPTION has a matching handler declared with
Chris@69 60 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
Chris@69 61 # the unknown option and exit.
Chris@69 62 m4_defun([_LT_SET_OPTIONS],
Chris@69 63 [# Set options
Chris@69 64 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
Chris@69 65 [_LT_SET_OPTION([$1], _LT_Option)])
Chris@69 66
Chris@69 67 m4_if([$1],[LT_INIT],[
Chris@69 68 dnl
Chris@69 69 dnl Simply set some default values (i.e off) if boolean options were not
Chris@69 70 dnl specified:
Chris@69 71 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
Chris@69 72 ])
Chris@69 73 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
Chris@69 74 ])
Chris@69 75 dnl
Chris@69 76 dnl If no reference was made to various pairs of opposing options, then
Chris@69 77 dnl we run the default mode handler for the pair. For example, if neither
Chris@69 78 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
Chris@69 79 dnl archives by default:
Chris@69 80 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
Chris@69 81 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
Chris@69 82 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
Chris@69 83 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
Chris@69 84 [_LT_ENABLE_FAST_INSTALL])
Chris@69 85 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
Chris@69 86 [_LT_WITH_AIX_SONAME([aix])])
Chris@69 87 ])
Chris@69 88 ])# _LT_SET_OPTIONS
Chris@69 89
Chris@69 90
Chris@69 91 ## --------------------------------- ##
Chris@69 92 ## Macros to handle LT_INIT options. ##
Chris@69 93 ## --------------------------------- ##
Chris@69 94
Chris@69 95 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
Chris@69 96 # -----------------------------------------
Chris@69 97 m4_define([_LT_MANGLE_DEFUN],
Chris@69 98 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
Chris@69 99
Chris@69 100
Chris@69 101 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
Chris@69 102 # -----------------------------------------------
Chris@69 103 m4_define([LT_OPTION_DEFINE],
Chris@69 104 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
Chris@69 105 ])# LT_OPTION_DEFINE
Chris@69 106
Chris@69 107
Chris@69 108 # dlopen
Chris@69 109 # ------
Chris@69 110 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
Chris@69 111 ])
Chris@69 112
Chris@69 113 AU_DEFUN([AC_LIBTOOL_DLOPEN],
Chris@69 114 [_LT_SET_OPTION([LT_INIT], [dlopen])
Chris@69 115 AC_DIAGNOSE([obsolete],
Chris@69 116 [$0: Remove this warning and the call to _LT_SET_OPTION when you
Chris@69 117 put the 'dlopen' option into LT_INIT's first parameter.])
Chris@69 118 ])
Chris@69 119
Chris@69 120 dnl aclocal-1.4 backwards compatibility:
Chris@69 121 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
Chris@69 122
Chris@69 123
Chris@69 124 # win32-dll
Chris@69 125 # ---------
Chris@69 126 # Declare package support for building win32 dll's.
Chris@69 127 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
Chris@69 128 [enable_win32_dll=yes
Chris@69 129
Chris@69 130 case $host in
Chris@69 131 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
Chris@69 132 AC_CHECK_TOOL(AS, as, false)
Chris@69 133 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@69 134 AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@69 135 ;;
Chris@69 136 esac
Chris@69 137
Chris@69 138 test -z "$AS" && AS=as
Chris@69 139 _LT_DECL([], [AS], [1], [Assembler program])dnl
Chris@69 140
Chris@69 141 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@69 142 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
Chris@69 143
Chris@69 144 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@69 145 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
Chris@69 146 ])# win32-dll
Chris@69 147
Chris@69 148 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
Chris@69 149 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 150 _LT_SET_OPTION([LT_INIT], [win32-dll])
Chris@69 151 AC_DIAGNOSE([obsolete],
Chris@69 152 [$0: Remove this warning and the call to _LT_SET_OPTION when you
Chris@69 153 put the 'win32-dll' option into LT_INIT's first parameter.])
Chris@69 154 ])
Chris@69 155
Chris@69 156 dnl aclocal-1.4 backwards compatibility:
Chris@69 157 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
Chris@69 158
Chris@69 159
Chris@69 160 # _LT_ENABLE_SHARED([DEFAULT])
Chris@69 161 # ----------------------------
Chris@69 162 # implement the --enable-shared flag, and supports the 'shared' and
Chris@69 163 # 'disable-shared' LT_INIT options.
Chris@69 164 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
Chris@69 165 m4_define([_LT_ENABLE_SHARED],
Chris@69 166 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
Chris@69 167 AC_ARG_ENABLE([shared],
Chris@69 168 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
Chris@69 169 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
Chris@69 170 [p=${PACKAGE-default}
Chris@69 171 case $enableval in
Chris@69 172 yes) enable_shared=yes ;;
Chris@69 173 no) enable_shared=no ;;
Chris@69 174 *)
Chris@69 175 enable_shared=no
Chris@69 176 # Look at the argument we got. We use all the common list separators.
Chris@69 177 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
Chris@69 178 for pkg in $enableval; do
Chris@69 179 IFS=$lt_save_ifs
Chris@69 180 if test "X$pkg" = "X$p"; then
Chris@69 181 enable_shared=yes
Chris@69 182 fi
Chris@69 183 done
Chris@69 184 IFS=$lt_save_ifs
Chris@69 185 ;;
Chris@69 186 esac],
Chris@69 187 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
Chris@69 188
Chris@69 189 _LT_DECL([build_libtool_libs], [enable_shared], [0],
Chris@69 190 [Whether or not to build shared libraries])
Chris@69 191 ])# _LT_ENABLE_SHARED
Chris@69 192
Chris@69 193 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
Chris@69 194 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
Chris@69 195
Chris@69 196 # Old names:
Chris@69 197 AC_DEFUN([AC_ENABLE_SHARED],
Chris@69 198 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
Chris@69 199 ])
Chris@69 200
Chris@69 201 AC_DEFUN([AC_DISABLE_SHARED],
Chris@69 202 [_LT_SET_OPTION([LT_INIT], [disable-shared])
Chris@69 203 ])
Chris@69 204
Chris@69 205 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
Chris@69 206 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
Chris@69 207
Chris@69 208 dnl aclocal-1.4 backwards compatibility:
Chris@69 209 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
Chris@69 210 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
Chris@69 211
Chris@69 212
Chris@69 213
Chris@69 214 # _LT_ENABLE_STATIC([DEFAULT])
Chris@69 215 # ----------------------------
Chris@69 216 # implement the --enable-static flag, and support the 'static' and
Chris@69 217 # 'disable-static' LT_INIT options.
Chris@69 218 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
Chris@69 219 m4_define([_LT_ENABLE_STATIC],
Chris@69 220 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
Chris@69 221 AC_ARG_ENABLE([static],
Chris@69 222 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
Chris@69 223 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
Chris@69 224 [p=${PACKAGE-default}
Chris@69 225 case $enableval in
Chris@69 226 yes) enable_static=yes ;;
Chris@69 227 no) enable_static=no ;;
Chris@69 228 *)
Chris@69 229 enable_static=no
Chris@69 230 # Look at the argument we got. We use all the common list separators.
Chris@69 231 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
Chris@69 232 for pkg in $enableval; do
Chris@69 233 IFS=$lt_save_ifs
Chris@69 234 if test "X$pkg" = "X$p"; then
Chris@69 235 enable_static=yes
Chris@69 236 fi
Chris@69 237 done
Chris@69 238 IFS=$lt_save_ifs
Chris@69 239 ;;
Chris@69 240 esac],
Chris@69 241 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
Chris@69 242
Chris@69 243 _LT_DECL([build_old_libs], [enable_static], [0],
Chris@69 244 [Whether or not to build static libraries])
Chris@69 245 ])# _LT_ENABLE_STATIC
Chris@69 246
Chris@69 247 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
Chris@69 248 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
Chris@69 249
Chris@69 250 # Old names:
Chris@69 251 AC_DEFUN([AC_ENABLE_STATIC],
Chris@69 252 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
Chris@69 253 ])
Chris@69 254
Chris@69 255 AC_DEFUN([AC_DISABLE_STATIC],
Chris@69 256 [_LT_SET_OPTION([LT_INIT], [disable-static])
Chris@69 257 ])
Chris@69 258
Chris@69 259 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
Chris@69 260 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
Chris@69 261
Chris@69 262 dnl aclocal-1.4 backwards compatibility:
Chris@69 263 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
Chris@69 264 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
Chris@69 265
Chris@69 266
Chris@69 267
Chris@69 268 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
Chris@69 269 # ----------------------------------
Chris@69 270 # implement the --enable-fast-install flag, and support the 'fast-install'
Chris@69 271 # and 'disable-fast-install' LT_INIT options.
Chris@69 272 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
Chris@69 273 m4_define([_LT_ENABLE_FAST_INSTALL],
Chris@69 274 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
Chris@69 275 AC_ARG_ENABLE([fast-install],
Chris@69 276 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
Chris@69 277 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
Chris@69 278 [p=${PACKAGE-default}
Chris@69 279 case $enableval in
Chris@69 280 yes) enable_fast_install=yes ;;
Chris@69 281 no) enable_fast_install=no ;;
Chris@69 282 *)
Chris@69 283 enable_fast_install=no
Chris@69 284 # Look at the argument we got. We use all the common list separators.
Chris@69 285 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
Chris@69 286 for pkg in $enableval; do
Chris@69 287 IFS=$lt_save_ifs
Chris@69 288 if test "X$pkg" = "X$p"; then
Chris@69 289 enable_fast_install=yes
Chris@69 290 fi
Chris@69 291 done
Chris@69 292 IFS=$lt_save_ifs
Chris@69 293 ;;
Chris@69 294 esac],
Chris@69 295 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
Chris@69 296
Chris@69 297 _LT_DECL([fast_install], [enable_fast_install], [0],
Chris@69 298 [Whether or not to optimize for fast installation])dnl
Chris@69 299 ])# _LT_ENABLE_FAST_INSTALL
Chris@69 300
Chris@69 301 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
Chris@69 302 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
Chris@69 303
Chris@69 304 # Old names:
Chris@69 305 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
Chris@69 306 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
Chris@69 307 AC_DIAGNOSE([obsolete],
Chris@69 308 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
Chris@69 309 the 'fast-install' option into LT_INIT's first parameter.])
Chris@69 310 ])
Chris@69 311
Chris@69 312 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
Chris@69 313 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
Chris@69 314 AC_DIAGNOSE([obsolete],
Chris@69 315 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
Chris@69 316 the 'disable-fast-install' option into LT_INIT's first parameter.])
Chris@69 317 ])
Chris@69 318
Chris@69 319 dnl aclocal-1.4 backwards compatibility:
Chris@69 320 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
Chris@69 321 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
Chris@69 322
Chris@69 323
Chris@69 324 # _LT_WITH_AIX_SONAME([DEFAULT])
Chris@69 325 # ----------------------------------
Chris@69 326 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
Chris@69 327 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
Chris@69 328 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
Chris@69 329 m4_define([_LT_WITH_AIX_SONAME],
Chris@69 330 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
Chris@69 331 shared_archive_member_spec=
Chris@69 332 case $host,$enable_shared in
Chris@69 333 power*-*-aix[[5-9]]*,yes)
Chris@69 334 AC_MSG_CHECKING([which variant of shared library versioning to provide])
Chris@69 335 AC_ARG_WITH([aix-soname],
Chris@69 336 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
Chris@69 337 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
Chris@69 338 [case $withval in
Chris@69 339 aix|svr4|both)
Chris@69 340 ;;
Chris@69 341 *)
Chris@69 342 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
Chris@69 343 ;;
Chris@69 344 esac
Chris@69 345 lt_cv_with_aix_soname=$with_aix_soname],
Chris@69 346 [AC_CACHE_VAL([lt_cv_with_aix_soname],
Chris@69 347 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
Chris@69 348 with_aix_soname=$lt_cv_with_aix_soname])
Chris@69 349 AC_MSG_RESULT([$with_aix_soname])
Chris@69 350 if test aix != "$with_aix_soname"; then
Chris@69 351 # For the AIX way of multilib, we name the shared archive member
Chris@69 352 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
Chris@69 353 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
Chris@69 354 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
Chris@69 355 # the AIX toolchain works better with OBJECT_MODE set (default 32).
Chris@69 356 if test 64 = "${OBJECT_MODE-32}"; then
Chris@69 357 shared_archive_member_spec=shr_64
Chris@69 358 else
Chris@69 359 shared_archive_member_spec=shr
Chris@69 360 fi
Chris@69 361 fi
Chris@69 362 ;;
Chris@69 363 *)
Chris@69 364 with_aix_soname=aix
Chris@69 365 ;;
Chris@69 366 esac
Chris@69 367
Chris@69 368 _LT_DECL([], [shared_archive_member_spec], [0],
Chris@69 369 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
Chris@69 370 ])# _LT_WITH_AIX_SONAME
Chris@69 371
Chris@69 372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
Chris@69 373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
Chris@69 374 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
Chris@69 375
Chris@69 376
Chris@69 377 # _LT_WITH_PIC([MODE])
Chris@69 378 # --------------------
Chris@69 379 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
Chris@69 380 # LT_INIT options.
Chris@69 381 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
Chris@69 382 m4_define([_LT_WITH_PIC],
Chris@69 383 [AC_ARG_WITH([pic],
Chris@69 384 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
Chris@69 385 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
Chris@69 386 [lt_p=${PACKAGE-default}
Chris@69 387 case $withval in
Chris@69 388 yes|no) pic_mode=$withval ;;
Chris@69 389 *)
Chris@69 390 pic_mode=default
Chris@69 391 # Look at the argument we got. We use all the common list separators.
Chris@69 392 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
Chris@69 393 for lt_pkg in $withval; do
Chris@69 394 IFS=$lt_save_ifs
Chris@69 395 if test "X$lt_pkg" = "X$lt_p"; then
Chris@69 396 pic_mode=yes
Chris@69 397 fi
Chris@69 398 done
Chris@69 399 IFS=$lt_save_ifs
Chris@69 400 ;;
Chris@69 401 esac],
Chris@69 402 [pic_mode=m4_default([$1], [default])])
Chris@69 403
Chris@69 404 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
Chris@69 405 ])# _LT_WITH_PIC
Chris@69 406
Chris@69 407 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
Chris@69 408 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
Chris@69 409
Chris@69 410 # Old name:
Chris@69 411 AU_DEFUN([AC_LIBTOOL_PICMODE],
Chris@69 412 [_LT_SET_OPTION([LT_INIT], [pic-only])
Chris@69 413 AC_DIAGNOSE([obsolete],
Chris@69 414 [$0: Remove this warning and the call to _LT_SET_OPTION when you
Chris@69 415 put the 'pic-only' option into LT_INIT's first parameter.])
Chris@69 416 ])
Chris@69 417
Chris@69 418 dnl aclocal-1.4 backwards compatibility:
Chris@69 419 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
Chris@69 420
Chris@69 421 ## ----------------- ##
Chris@69 422 ## LTDL_INIT Options ##
Chris@69 423 ## ----------------- ##
Chris@69 424
Chris@69 425 m4_define([_LTDL_MODE], [])
Chris@69 426 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
Chris@69 427 [m4_define([_LTDL_MODE], [nonrecursive])])
Chris@69 428 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
Chris@69 429 [m4_define([_LTDL_MODE], [recursive])])
Chris@69 430 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
Chris@69 431 [m4_define([_LTDL_MODE], [subproject])])
Chris@69 432
Chris@69 433 m4_define([_LTDL_TYPE], [])
Chris@69 434 LT_OPTION_DEFINE([LTDL_INIT], [installable],
Chris@69 435 [m4_define([_LTDL_TYPE], [installable])])
Chris@69 436 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
Chris@69 437 [m4_define([_LTDL_TYPE], [convenience])])