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