18f9fac4aSmrg# Helper functions for option handling. -*- Autoconf -*- 28f9fac4aSmrg# 38f9fac4aSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2024 Free 48f9fac4aSmrg# Software Foundation, Inc. 58f9fac4aSmrg# Written by Gary V. Vaughan, 2004 68f9fac4aSmrg# 78f9fac4aSmrg# This file is free software; the Free Software Foundation gives 88f9fac4aSmrg# unlimited permission to copy and/or distribute it, with or without 98f9fac4aSmrg# modifications, as long as this notice is preserved. 108f9fac4aSmrg 118f9fac4aSmrg# serial 10 ltoptions.m4 128f9fac4aSmrg 138f9fac4aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 148f9fac4aSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 158f9fac4aSmrg 168f9fac4aSmrg 178f9fac4aSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 188f9fac4aSmrg# ------------------------------------------ 198f9fac4aSmrgm4_define([_LT_MANGLE_OPTION], 208f9fac4aSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 218f9fac4aSmrg 228f9fac4aSmrg 238f9fac4aSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 248f9fac4aSmrg# --------------------------------------- 258f9fac4aSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 268f9fac4aSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 278f9fac4aSmrg# saved as a flag. 288f9fac4aSmrgm4_define([_LT_SET_OPTION], 298f9fac4aSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 308f9fac4aSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 318f9fac4aSmrg _LT_MANGLE_DEFUN([$1], [$2]), 328f9fac4aSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 338f9fac4aSmrg]) 348f9fac4aSmrg 358f9fac4aSmrg 368f9fac4aSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 378f9fac4aSmrg# ------------------------------------------------------------ 388f9fac4aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 398f9fac4aSmrgm4_define([_LT_IF_OPTION], 408f9fac4aSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 418f9fac4aSmrg 428f9fac4aSmrg 438f9fac4aSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 448f9fac4aSmrg# ------------------------------------------------------- 458f9fac4aSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 468f9fac4aSmrg# are set. 478f9fac4aSmrgm4_define([_LT_UNLESS_OPTIONS], 488f9fac4aSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 498f9fac4aSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 508f9fac4aSmrg [m4_define([$0_found])])])[]dnl 518f9fac4aSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 528f9fac4aSmrg])[]dnl 538f9fac4aSmrg]) 548f9fac4aSmrg 558f9fac4aSmrg 568f9fac4aSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 578f9fac4aSmrg# ---------------------------------------- 588f9fac4aSmrg# OPTION-LIST is a space-separated list of Libtool options associated 598f9fac4aSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 608f9fac4aSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 618f9fac4aSmrg# the unknown option and exit. 628f9fac4aSmrgm4_defun([_LT_SET_OPTIONS], 638f9fac4aSmrg[# Set options 648f9fac4aSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 658f9fac4aSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 668f9fac4aSmrg 678f9fac4aSmrgm4_if([$1],[LT_INIT],[ 688f9fac4aSmrg dnl 698f9fac4aSmrg dnl Simply set some default values (i.e off) if boolean options were not 708f9fac4aSmrg dnl specified: 718f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 728f9fac4aSmrg ]) 738f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 748f9fac4aSmrg ]) 758f9fac4aSmrg dnl 768f9fac4aSmrg dnl If no reference was made to various pairs of opposing options, then 778f9fac4aSmrg dnl we run the default mode handler for the pair. For example, if neither 788f9fac4aSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 798f9fac4aSmrg dnl archives by default: 808f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 818f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 828f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 838f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 848f9fac4aSmrg [_LT_ENABLE_FAST_INSTALL]) 858f9fac4aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 868f9fac4aSmrg [_LT_WITH_AIX_SONAME([aix])]) 878f9fac4aSmrg ]) 888f9fac4aSmrg])# _LT_SET_OPTIONS 898f9fac4aSmrg 908f9fac4aSmrg 918f9fac4aSmrg## --------------------------------- ## 928f9fac4aSmrg## Macros to handle LT_INIT options. ## 938f9fac4aSmrg## --------------------------------- ## 948f9fac4aSmrg 958f9fac4aSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 968f9fac4aSmrg# ----------------------------------------- 978f9fac4aSmrgm4_define([_LT_MANGLE_DEFUN], 988f9fac4aSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 998f9fac4aSmrg 1008f9fac4aSmrg 1018f9fac4aSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 1028f9fac4aSmrg# ----------------------------------------------- 1038f9fac4aSmrgm4_define([LT_OPTION_DEFINE], 1048f9fac4aSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 1058f9fac4aSmrg])# LT_OPTION_DEFINE 1068f9fac4aSmrg 1078f9fac4aSmrg 1088f9fac4aSmrg# dlopen 1098f9fac4aSmrg# ------ 1108f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 1118f9fac4aSmrg]) 1128f9fac4aSmrg 1138f9fac4aSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 1148f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 1158f9fac4aSmrgAC_DIAGNOSE([obsolete], 1168f9fac4aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1178f9fac4aSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 1188f9fac4aSmrg]) 1198f9fac4aSmrg 1208f9fac4aSmrgdnl aclocal-1.4 backwards compatibility: 1218f9fac4aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 1228f9fac4aSmrg 1238f9fac4aSmrg 1248f9fac4aSmrg# win32-dll 1258f9fac4aSmrg# --------- 1268f9fac4aSmrg# Declare package support for building win32 dll's. 1278f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 1288f9fac4aSmrg[enable_win32_dll=yes 1298f9fac4aSmrg 1308f9fac4aSmrgcase $host in 1318f9fac4aSmrg*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*) 1328f9fac4aSmrg AC_CHECK_TOOL(AS, as, false) 1338f9fac4aSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1348f9fac4aSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1358f9fac4aSmrg ;; 1368f9fac4aSmrgesac 1378f9fac4aSmrg 1388f9fac4aSmrgtest -z "$AS" && AS=as 1398f9fac4aSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 1408f9fac4aSmrg 1418f9fac4aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1428f9fac4aSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 1438f9fac4aSmrg 1448f9fac4aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1458f9fac4aSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 1468f9fac4aSmrg])# win32-dll 1478f9fac4aSmrg 1488f9fac4aSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 1498f9fac4aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1508f9fac4aSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 1518f9fac4aSmrgAC_DIAGNOSE([obsolete], 1528f9fac4aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1538f9fac4aSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 1548f9fac4aSmrg]) 1558f9fac4aSmrg 1568f9fac4aSmrgdnl aclocal-1.4 backwards compatibility: 1578f9fac4aSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 1588f9fac4aSmrg 1598f9fac4aSmrg 1608f9fac4aSmrg# _LT_ENABLE_SHARED([DEFAULT]) 1618f9fac4aSmrg# ---------------------------- 1628f9fac4aSmrg# implement the --enable-shared flag, and supports the 'shared' and 1638f9fac4aSmrg# 'disable-shared' LT_INIT options. 1648f9fac4aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 1658f9fac4aSmrgm4_define([_LT_ENABLE_SHARED], 1668f9fac4aSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 1678f9fac4aSmrgAC_ARG_ENABLE([shared], 1688f9fac4aSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1698f9fac4aSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 1708f9fac4aSmrg [p=${PACKAGE-default} 1718f9fac4aSmrg case $enableval in 1728f9fac4aSmrg yes) enable_shared=yes ;; 1738f9fac4aSmrg no) enable_shared=no ;; 1748f9fac4aSmrg *) 1758f9fac4aSmrg enable_shared=no 1768f9fac4aSmrg # Look at the argument we got. We use all the common list separators. 1778f9fac4aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 1788f9fac4aSmrg for pkg in $enableval; do 1798f9fac4aSmrg IFS=$lt_save_ifs 1808f9fac4aSmrg if test "X$pkg" = "X$p"; then 1818f9fac4aSmrg enable_shared=yes 1828f9fac4aSmrg fi 1838f9fac4aSmrg done 1848f9fac4aSmrg IFS=$lt_save_ifs 1858f9fac4aSmrg ;; 1868f9fac4aSmrg esac], 1878f9fac4aSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 1888f9fac4aSmrg 1898f9fac4aSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 1908f9fac4aSmrg [Whether or not to build shared libraries]) 1918f9fac4aSmrg])# _LT_ENABLE_SHARED 1928f9fac4aSmrg 1938f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 1948f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 1958f9fac4aSmrg 1968f9fac4aSmrg# Old names: 1978f9fac4aSmrgAC_DEFUN([AC_ENABLE_SHARED], 1988f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 1998f9fac4aSmrg]) 2008f9fac4aSmrg 2018f9fac4aSmrgAC_DEFUN([AC_DISABLE_SHARED], 2028f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 2038f9fac4aSmrg]) 2048f9fac4aSmrg 2058f9fac4aSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 2068f9fac4aSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 2078f9fac4aSmrg 2088f9fac4aSmrgdnl aclocal-1.4 backwards compatibility: 2098f9fac4aSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 2108f9fac4aSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 2118f9fac4aSmrg 2128f9fac4aSmrg 2138f9fac4aSmrg 2148f9fac4aSmrg# _LT_ENABLE_STATIC([DEFAULT]) 2158f9fac4aSmrg# ---------------------------- 2168f9fac4aSmrg# implement the --enable-static flag, and support the 'static' and 2178f9fac4aSmrg# 'disable-static' LT_INIT options. 2188f9fac4aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 2198f9fac4aSmrgm4_define([_LT_ENABLE_STATIC], 2208f9fac4aSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 2218f9fac4aSmrgAC_ARG_ENABLE([static], 2228f9fac4aSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2238f9fac4aSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 2248f9fac4aSmrg [p=${PACKAGE-default} 2258f9fac4aSmrg case $enableval in 2268f9fac4aSmrg yes) enable_static=yes ;; 2278f9fac4aSmrg no) enable_static=no ;; 2288f9fac4aSmrg *) 2298f9fac4aSmrg enable_static=no 2308f9fac4aSmrg # Look at the argument we got. We use all the common list separators. 2318f9fac4aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 2328f9fac4aSmrg for pkg in $enableval; do 2338f9fac4aSmrg IFS=$lt_save_ifs 2348f9fac4aSmrg if test "X$pkg" = "X$p"; then 2358f9fac4aSmrg enable_static=yes 2368f9fac4aSmrg fi 2378f9fac4aSmrg done 2388f9fac4aSmrg IFS=$lt_save_ifs 2398f9fac4aSmrg ;; 2408f9fac4aSmrg esac], 2418f9fac4aSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 2428f9fac4aSmrg 2438f9fac4aSmrg _LT_DECL([build_old_libs], [enable_static], [0], 2448f9fac4aSmrg [Whether or not to build static libraries]) 2458f9fac4aSmrg])# _LT_ENABLE_STATIC 2468f9fac4aSmrg 2478f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 2488f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 2498f9fac4aSmrg 2508f9fac4aSmrg# Old names: 2518f9fac4aSmrgAC_DEFUN([AC_ENABLE_STATIC], 2528f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 2538f9fac4aSmrg]) 2548f9fac4aSmrg 2558f9fac4aSmrgAC_DEFUN([AC_DISABLE_STATIC], 2568f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 2578f9fac4aSmrg]) 2588f9fac4aSmrg 2598f9fac4aSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 2608f9fac4aSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 2618f9fac4aSmrg 2628f9fac4aSmrgdnl aclocal-1.4 backwards compatibility: 2638f9fac4aSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 2648f9fac4aSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 2658f9fac4aSmrg 2668f9fac4aSmrg 2678f9fac4aSmrg 2688f9fac4aSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 2698f9fac4aSmrg# ---------------------------------- 2708f9fac4aSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 2718f9fac4aSmrg# and 'disable-fast-install' LT_INIT options. 2728f9fac4aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 2738f9fac4aSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 2748f9fac4aSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 2758f9fac4aSmrgAC_ARG_ENABLE([fast-install], 2768f9fac4aSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2778f9fac4aSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2788f9fac4aSmrg [p=${PACKAGE-default} 2798f9fac4aSmrg case $enableval in 2808f9fac4aSmrg yes) enable_fast_install=yes ;; 2818f9fac4aSmrg no) enable_fast_install=no ;; 2828f9fac4aSmrg *) 2838f9fac4aSmrg enable_fast_install=no 2848f9fac4aSmrg # Look at the argument we got. We use all the common list separators. 2858f9fac4aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 2868f9fac4aSmrg for pkg in $enableval; do 2878f9fac4aSmrg IFS=$lt_save_ifs 2888f9fac4aSmrg if test "X$pkg" = "X$p"; then 2898f9fac4aSmrg enable_fast_install=yes 2908f9fac4aSmrg fi 2918f9fac4aSmrg done 2928f9fac4aSmrg IFS=$lt_save_ifs 2938f9fac4aSmrg ;; 2948f9fac4aSmrg esac], 2958f9fac4aSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 2968f9fac4aSmrg 2978f9fac4aSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 2988f9fac4aSmrg [Whether or not to optimize for fast installation])dnl 2998f9fac4aSmrg])# _LT_ENABLE_FAST_INSTALL 3008f9fac4aSmrg 3018f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 3028f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 3038f9fac4aSmrg 3048f9fac4aSmrg# Old names: 3058f9fac4aSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 3068f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 3078f9fac4aSmrgAC_DIAGNOSE([obsolete], 3088f9fac4aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 3098f9fac4aSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 3108f9fac4aSmrg]) 3118f9fac4aSmrg 3128f9fac4aSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 3138f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 3148f9fac4aSmrgAC_DIAGNOSE([obsolete], 3158f9fac4aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 3168f9fac4aSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 3178f9fac4aSmrg]) 3188f9fac4aSmrg 3198f9fac4aSmrgdnl aclocal-1.4 backwards compatibility: 3208f9fac4aSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 3218f9fac4aSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 3228f9fac4aSmrg 3238f9fac4aSmrg 3248f9fac4aSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 3258f9fac4aSmrg# ---------------------------------- 3268f9fac4aSmrg# implement the --enable-aix-soname configure option, and support the 3278f9fac4aSmrg# `aix-soname=aix' and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. 3288f9fac4aSmrg# DEFAULT is either `aix', `both', or `svr4'. If omitted, it defaults to `aix'. 3298f9fac4aSmrgm4_define([_LT_WITH_AIX_SONAME], 3308f9fac4aSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 3318f9fac4aSmrgshared_archive_member_spec= 3328f9fac4aSmrgcase $host,$enable_shared in 3338f9fac4aSmrgpower*-*-aix[[5-9]]*,yes) 3348f9fac4aSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 3358f9fac4aSmrg AC_ARG_ENABLE([aix-soname], 3368f9fac4aSmrg [AS_HELP_STRING([--enable-aix-soname=aix|svr4|both], 3378f9fac4aSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 3388f9fac4aSmrg [case $enableval in 3398f9fac4aSmrg aix|svr4|both) 3408f9fac4aSmrg ;; 3418f9fac4aSmrg *) 3428f9fac4aSmrg AC_MSG_ERROR([Unknown argument to --enable-aix-soname]) 3438f9fac4aSmrg ;; 3448f9fac4aSmrg esac 3458f9fac4aSmrg lt_cv_with_aix_soname=$enable_aix_soname], 3468f9fac4aSmrg [_AC_ENABLE_IF([with], [aix-soname], 3478f9fac4aSmrg [case $withval in 3488f9fac4aSmrg aix|svr4|both) 3498f9fac4aSmrg ;; 3508f9fac4aSmrg *) 3518f9fac4aSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 3528f9fac4aSmrg ;; 3538f9fac4aSmrg esac 3548f9fac4aSmrg lt_cv_with_aix_soname=$with_aix_soname], 3558f9fac4aSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 3568f9fac4aSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)]) 3578f9fac4aSmrg enable_aix_soname=$lt_cv_with_aix_soname]) 3588f9fac4aSmrg with_aix_soname=$enable_aix_soname 3598f9fac4aSmrg AC_MSG_RESULT([$with_aix_soname]) 3608f9fac4aSmrg if test aix != "$with_aix_soname"; then 3618f9fac4aSmrg # For the AIX way of multilib, we name the shared archive member 3628f9fac4aSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 3638f9fac4aSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 3648f9fac4aSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 3658f9fac4aSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 3668f9fac4aSmrg if test 64 = "${OBJECT_MODE-32}"; then 3678f9fac4aSmrg shared_archive_member_spec=shr_64 3688f9fac4aSmrg else 3698f9fac4aSmrg shared_archive_member_spec=shr 3708f9fac4aSmrg fi 3718f9fac4aSmrg fi 3728f9fac4aSmrg ;; 3738f9fac4aSmrg*) 3748f9fac4aSmrg with_aix_soname=aix 3758f9fac4aSmrg ;; 3768f9fac4aSmrgesac 3778f9fac4aSmrg 3788f9fac4aSmrg_LT_DECL([], [shared_archive_member_spec], [0], 3798f9fac4aSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 3808f9fac4aSmrg])# _LT_WITH_AIX_SONAME 3818f9fac4aSmrg 3828f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 3838f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 3848f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 3858f9fac4aSmrg 3868f9fac4aSmrg 3878f9fac4aSmrg# _LT_WITH_PIC([MODE]) 3888f9fac4aSmrg# -------------------- 3898f9fac4aSmrg# implement the --enable-pic flag, and support the 'pic-only' and 'no-pic' 3908f9fac4aSmrg# LT_INIT options. 3918f9fac4aSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 3928f9fac4aSmrgm4_define([_LT_WITH_PIC], 3938f9fac4aSmrg[AC_ARG_ENABLE([pic], 3948f9fac4aSmrg [AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@], 3958f9fac4aSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 3968f9fac4aSmrg [lt_p=${PACKAGE-default} 3978f9fac4aSmrg case $enableval in 3988f9fac4aSmrg yes|no) pic_mode=$enableval ;; 3998f9fac4aSmrg *) 4008f9fac4aSmrg pic_mode=default 4018f9fac4aSmrg # Look at the argument we got. We use all the common list separators. 4028f9fac4aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 4038f9fac4aSmrg for lt_pkg in $enableval; do 4048f9fac4aSmrg IFS=$lt_save_ifs 4058f9fac4aSmrg if test "X$lt_pkg" = "X$lt_p"; then 4068f9fac4aSmrg pic_mode=yes 4078f9fac4aSmrg fi 4088f9fac4aSmrg done 4098f9fac4aSmrg IFS=$lt_save_ifs 4108f9fac4aSmrg ;; 4118f9fac4aSmrg esac], 4128f9fac4aSmrg [dnl Continue to support --with-pic and --without-pic, for backward 4138f9fac4aSmrg dnl compatibility. 4148f9fac4aSmrg _AC_ENABLE_IF([with], [pic], 4158f9fac4aSmrg [lt_p=${PACKAGE-default} 4168f9fac4aSmrg case $withval in 4178f9fac4aSmrg yes|no) pic_mode=$withval ;; 4188f9fac4aSmrg *) 4198f9fac4aSmrg pic_mode=default 4208f9fac4aSmrg # Look at the argument we got. We use all the common list separators. 4218f9fac4aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 4228f9fac4aSmrg for lt_pkg in $withval; do 4238f9fac4aSmrg IFS=$lt_save_ifs 4248f9fac4aSmrg if test "X$lt_pkg" = "X$lt_p"; then 4258f9fac4aSmrg pic_mode=yes 4268f9fac4aSmrg fi 4278f9fac4aSmrg done 4288f9fac4aSmrg IFS=$lt_save_ifs 4298f9fac4aSmrg ;; 4308f9fac4aSmrg esac], 4318f9fac4aSmrg [pic_mode=m4_default([$1], [default])])] 4328f9fac4aSmrg ) 4338f9fac4aSmrg 4348f9fac4aSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 4358f9fac4aSmrg])# _LT_WITH_PIC 4368f9fac4aSmrg 4378f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 4388f9fac4aSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 4398f9fac4aSmrg 4408f9fac4aSmrg# Old name: 4418f9fac4aSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 4428f9fac4aSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 4438f9fac4aSmrgAC_DIAGNOSE([obsolete], 4448f9fac4aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 4458f9fac4aSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 4468f9fac4aSmrg]) 4478f9fac4aSmrg 4488f9fac4aSmrgdnl aclocal-1.4 backwards compatibility: 4498f9fac4aSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 4508f9fac4aSmrg 4518f9fac4aSmrg## ----------------- ## 4528f9fac4aSmrg## LTDL_INIT Options ## 4538f9fac4aSmrg## ----------------- ## 4548f9fac4aSmrg 4558f9fac4aSmrgm4_define([_LTDL_MODE], []) 4568f9fac4aSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 4578f9fac4aSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 4588f9fac4aSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 4598f9fac4aSmrg [m4_define([_LTDL_MODE], [recursive])]) 4608f9fac4aSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 4618f9fac4aSmrg [m4_define([_LTDL_MODE], [subproject])]) 4628f9fac4aSmrg 4638f9fac4aSmrgm4_define([_LTDL_TYPE], []) 4648f9fac4aSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 4658f9fac4aSmrg [m4_define([_LTDL_TYPE], [installable])]) 4668f9fac4aSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 4678f9fac4aSmrg [m4_define([_LTDL_TYPE], [convenience])]) 468