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