annotate src/libsndfile-1.0.27/M4/ltoptions.m4 @ 40:1df64224f5ac

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