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