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