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