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