10f57e2e1Smrg# Helper functions for option handling. -*- Autoconf -*- 20f57e2e1Smrg# 30f57e2e1Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 40f57e2e1Smrg# Software Foundation, Inc. 50f57e2e1Smrg# Written by Gary V. Vaughan, 2004 60f57e2e1Smrg# 70f57e2e1Smrg# This file is free software; the Free Software Foundation gives 80f57e2e1Smrg# unlimited permission to copy and/or distribute it, with or without 90f57e2e1Smrg# modifications, as long as this notice is preserved. 100f57e2e1Smrg 110f57e2e1Smrg# serial 8 ltoptions.m4 120f57e2e1Smrg 130f57e2e1Smrg# This is to help aclocal find these macros, as it can't see m4_define. 140f57e2e1SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 150f57e2e1Smrg 160f57e2e1Smrg 170f57e2e1Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 180f57e2e1Smrg# ------------------------------------------ 190f57e2e1Smrgm4_define([_LT_MANGLE_OPTION], 200f57e2e1Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 210f57e2e1Smrg 220f57e2e1Smrg 230f57e2e1Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 240f57e2e1Smrg# --------------------------------------- 250f57e2e1Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 260f57e2e1Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 270f57e2e1Smrg# saved as a flag. 280f57e2e1Smrgm4_define([_LT_SET_OPTION], 290f57e2e1Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 300f57e2e1Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 310f57e2e1Smrg _LT_MANGLE_DEFUN([$1], [$2]), 320f57e2e1Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 330f57e2e1Smrg]) 340f57e2e1Smrg 350f57e2e1Smrg 360f57e2e1Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 370f57e2e1Smrg# ------------------------------------------------------------ 380f57e2e1Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 390f57e2e1Smrgm4_define([_LT_IF_OPTION], 400f57e2e1Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 410f57e2e1Smrg 420f57e2e1Smrg 430f57e2e1Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 440f57e2e1Smrg# ------------------------------------------------------- 450f57e2e1Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 460f57e2e1Smrg# are set. 470f57e2e1Smrgm4_define([_LT_UNLESS_OPTIONS], 480f57e2e1Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 490f57e2e1Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 500f57e2e1Smrg [m4_define([$0_found])])])[]dnl 510f57e2e1Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 520f57e2e1Smrg])[]dnl 530f57e2e1Smrg]) 540f57e2e1Smrg 550f57e2e1Smrg 560f57e2e1Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 570f57e2e1Smrg# ---------------------------------------- 580f57e2e1Smrg# OPTION-LIST is a space-separated list of Libtool options associated 590f57e2e1Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 600f57e2e1Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 610f57e2e1Smrg# the unknown option and exit. 620f57e2e1Smrgm4_defun([_LT_SET_OPTIONS], 630f57e2e1Smrg[# Set options 640f57e2e1Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 650f57e2e1Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 660f57e2e1Smrg 670f57e2e1Smrgm4_if([$1],[LT_INIT],[ 680f57e2e1Smrg dnl 690f57e2e1Smrg dnl Simply set some default values (i.e off) if boolean options were not 700f57e2e1Smrg dnl specified: 710f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 720f57e2e1Smrg ]) 730f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 740f57e2e1Smrg ]) 750f57e2e1Smrg dnl 760f57e2e1Smrg dnl If no reference was made to various pairs of opposing options, then 770f57e2e1Smrg dnl we run the default mode handler for the pair. For example, if neither 780f57e2e1Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 790f57e2e1Smrg dnl archives by default: 800f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 810f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 820f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 830f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 840f57e2e1Smrg [_LT_ENABLE_FAST_INSTALL]) 850f57e2e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 860f57e2e1Smrg [_LT_WITH_AIX_SONAME([aix])]) 870f57e2e1Smrg ]) 880f57e2e1Smrg])# _LT_SET_OPTIONS 890f57e2e1Smrg 900f57e2e1Smrg 910f57e2e1Smrg## --------------------------------- ## 920f57e2e1Smrg## Macros to handle LT_INIT options. ## 930f57e2e1Smrg## --------------------------------- ## 940f57e2e1Smrg 950f57e2e1Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 960f57e2e1Smrg# ----------------------------------------- 970f57e2e1Smrgm4_define([_LT_MANGLE_DEFUN], 980f57e2e1Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 990f57e2e1Smrg 1000f57e2e1Smrg 1010f57e2e1Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 1020f57e2e1Smrg# ----------------------------------------------- 1030f57e2e1Smrgm4_define([LT_OPTION_DEFINE], 1040f57e2e1Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 1050f57e2e1Smrg])# LT_OPTION_DEFINE 1060f57e2e1Smrg 1070f57e2e1Smrg 1080f57e2e1Smrg# dlopen 1090f57e2e1Smrg# ------ 1100f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 1110f57e2e1Smrg]) 1120f57e2e1Smrg 1130f57e2e1SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 1140f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 1150f57e2e1SmrgAC_DIAGNOSE([obsolete], 1160f57e2e1Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1170f57e2e1Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 1180f57e2e1Smrg]) 1190f57e2e1Smrg 1200f57e2e1Smrgdnl aclocal-1.4 backwards compatibility: 1210f57e2e1Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 1220f57e2e1Smrg 1230f57e2e1Smrg 1240f57e2e1Smrg# win32-dll 1250f57e2e1Smrg# --------- 1260f57e2e1Smrg# Declare package support for building win32 dll's. 1270f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 1280f57e2e1Smrg[enable_win32_dll=yes 1290f57e2e1Smrg 1300f57e2e1Smrgcase $host in 1310f57e2e1Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 1320f57e2e1Smrg AC_CHECK_TOOL(AS, as, false) 1330f57e2e1Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1340f57e2e1Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1350f57e2e1Smrg ;; 1360f57e2e1Smrgesac 1370f57e2e1Smrg 1380f57e2e1Smrgtest -z "$AS" && AS=as 1390f57e2e1Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 1400f57e2e1Smrg 1410f57e2e1Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1420f57e2e1Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 1430f57e2e1Smrg 1440f57e2e1Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1450f57e2e1Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 1460f57e2e1Smrg])# win32-dll 1470f57e2e1Smrg 1480f57e2e1SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 1490f57e2e1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1500f57e2e1Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 1510f57e2e1SmrgAC_DIAGNOSE([obsolete], 1520f57e2e1Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1530f57e2e1Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 1540f57e2e1Smrg]) 1550f57e2e1Smrg 1560f57e2e1Smrgdnl aclocal-1.4 backwards compatibility: 1570f57e2e1Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 1580f57e2e1Smrg 1590f57e2e1Smrg 1600f57e2e1Smrg# _LT_ENABLE_SHARED([DEFAULT]) 1610f57e2e1Smrg# ---------------------------- 1620f57e2e1Smrg# implement the --enable-shared flag, and supports the 'shared' and 1630f57e2e1Smrg# 'disable-shared' LT_INIT options. 1640f57e2e1Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 1650f57e2e1Smrgm4_define([_LT_ENABLE_SHARED], 1660f57e2e1Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 1670f57e2e1SmrgAC_ARG_ENABLE([shared], 1680f57e2e1Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1690f57e2e1Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 1700f57e2e1Smrg [p=${PACKAGE-default} 1710f57e2e1Smrg case $enableval in 1720f57e2e1Smrg yes) enable_shared=yes ;; 1730f57e2e1Smrg no) enable_shared=no ;; 1740f57e2e1Smrg *) 1750f57e2e1Smrg enable_shared=no 1760f57e2e1Smrg # Look at the argument we got. We use all the common list separators. 1770f57e2e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 1780f57e2e1Smrg for pkg in $enableval; do 1790f57e2e1Smrg IFS=$lt_save_ifs 1800f57e2e1Smrg if test "X$pkg" = "X$p"; then 1810f57e2e1Smrg enable_shared=yes 1820f57e2e1Smrg fi 1830f57e2e1Smrg done 1840f57e2e1Smrg IFS=$lt_save_ifs 1850f57e2e1Smrg ;; 1860f57e2e1Smrg esac], 1870f57e2e1Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 1880f57e2e1Smrg 1890f57e2e1Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 1900f57e2e1Smrg [Whether or not to build shared libraries]) 1910f57e2e1Smrg])# _LT_ENABLE_SHARED 1920f57e2e1Smrg 1930f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 1940f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 1950f57e2e1Smrg 1960f57e2e1Smrg# Old names: 1970f57e2e1SmrgAC_DEFUN([AC_ENABLE_SHARED], 1980f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 1990f57e2e1Smrg]) 2000f57e2e1Smrg 2010f57e2e1SmrgAC_DEFUN([AC_DISABLE_SHARED], 2020f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 2030f57e2e1Smrg]) 2040f57e2e1Smrg 2050f57e2e1SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 2060f57e2e1SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 2070f57e2e1Smrg 2080f57e2e1Smrgdnl aclocal-1.4 backwards compatibility: 2090f57e2e1Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 2100f57e2e1Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 2110f57e2e1Smrg 2120f57e2e1Smrg 2130f57e2e1Smrg 2140f57e2e1Smrg# _LT_ENABLE_STATIC([DEFAULT]) 2150f57e2e1Smrg# ---------------------------- 2160f57e2e1Smrg# implement the --enable-static flag, and support the 'static' and 2170f57e2e1Smrg# 'disable-static' LT_INIT options. 2180f57e2e1Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 2190f57e2e1Smrgm4_define([_LT_ENABLE_STATIC], 2200f57e2e1Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 2210f57e2e1SmrgAC_ARG_ENABLE([static], 2220f57e2e1Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2230f57e2e1Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 2240f57e2e1Smrg [p=${PACKAGE-default} 2250f57e2e1Smrg case $enableval in 2260f57e2e1Smrg yes) enable_static=yes ;; 2270f57e2e1Smrg no) enable_static=no ;; 2280f57e2e1Smrg *) 2290f57e2e1Smrg enable_static=no 2300f57e2e1Smrg # Look at the argument we got. We use all the common list separators. 2310f57e2e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 2320f57e2e1Smrg for pkg in $enableval; do 2330f57e2e1Smrg IFS=$lt_save_ifs 2340f57e2e1Smrg if test "X$pkg" = "X$p"; then 2350f57e2e1Smrg enable_static=yes 2360f57e2e1Smrg fi 2370f57e2e1Smrg done 2380f57e2e1Smrg IFS=$lt_save_ifs 2390f57e2e1Smrg ;; 2400f57e2e1Smrg esac], 2410f57e2e1Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 2420f57e2e1Smrg 2430f57e2e1Smrg _LT_DECL([build_old_libs], [enable_static], [0], 2440f57e2e1Smrg [Whether or not to build static libraries]) 2450f57e2e1Smrg])# _LT_ENABLE_STATIC 2460f57e2e1Smrg 2470f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 2480f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 2490f57e2e1Smrg 2500f57e2e1Smrg# Old names: 2510f57e2e1SmrgAC_DEFUN([AC_ENABLE_STATIC], 2520f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 2530f57e2e1Smrg]) 2540f57e2e1Smrg 2550f57e2e1SmrgAC_DEFUN([AC_DISABLE_STATIC], 2560f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 2570f57e2e1Smrg]) 2580f57e2e1Smrg 2590f57e2e1SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 2600f57e2e1SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 2610f57e2e1Smrg 2620f57e2e1Smrgdnl aclocal-1.4 backwards compatibility: 2630f57e2e1Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 2640f57e2e1Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 2650f57e2e1Smrg 2660f57e2e1Smrg 2670f57e2e1Smrg 2680f57e2e1Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 2690f57e2e1Smrg# ---------------------------------- 2700f57e2e1Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 2710f57e2e1Smrg# and 'disable-fast-install' LT_INIT options. 2720f57e2e1Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 2730f57e2e1Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 2740f57e2e1Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 2750f57e2e1SmrgAC_ARG_ENABLE([fast-install], 2760f57e2e1Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2770f57e2e1Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2780f57e2e1Smrg [p=${PACKAGE-default} 2790f57e2e1Smrg case $enableval in 2800f57e2e1Smrg yes) enable_fast_install=yes ;; 2810f57e2e1Smrg no) enable_fast_install=no ;; 2820f57e2e1Smrg *) 2830f57e2e1Smrg enable_fast_install=no 2840f57e2e1Smrg # Look at the argument we got. We use all the common list separators. 2850f57e2e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 2860f57e2e1Smrg for pkg in $enableval; do 2870f57e2e1Smrg IFS=$lt_save_ifs 2880f57e2e1Smrg if test "X$pkg" = "X$p"; then 2890f57e2e1Smrg enable_fast_install=yes 2900f57e2e1Smrg fi 2910f57e2e1Smrg done 2920f57e2e1Smrg IFS=$lt_save_ifs 2930f57e2e1Smrg ;; 2940f57e2e1Smrg esac], 2950f57e2e1Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 2960f57e2e1Smrg 2970f57e2e1Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 2980f57e2e1Smrg [Whether or not to optimize for fast installation])dnl 2990f57e2e1Smrg])# _LT_ENABLE_FAST_INSTALL 3000f57e2e1Smrg 3010f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 3020f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 3030f57e2e1Smrg 3040f57e2e1Smrg# Old names: 3050f57e2e1SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 3060f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 3070f57e2e1SmrgAC_DIAGNOSE([obsolete], 3080f57e2e1Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 3090f57e2e1Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 3100f57e2e1Smrg]) 3110f57e2e1Smrg 3120f57e2e1SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 3130f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 3140f57e2e1SmrgAC_DIAGNOSE([obsolete], 3150f57e2e1Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 3160f57e2e1Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 3170f57e2e1Smrg]) 3180f57e2e1Smrg 3190f57e2e1Smrgdnl aclocal-1.4 backwards compatibility: 3200f57e2e1Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 3210f57e2e1Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 3220f57e2e1Smrg 3230f57e2e1Smrg 3240f57e2e1Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 3250f57e2e1Smrg# ---------------------------------- 3260f57e2e1Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 3270f57e2e1Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 3280f57e2e1Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 3290f57e2e1Smrgm4_define([_LT_WITH_AIX_SONAME], 3300f57e2e1Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 3310f57e2e1Smrgshared_archive_member_spec= 3320f57e2e1Smrgcase $host,$enable_shared in 3330f57e2e1Smrgpower*-*-aix[[5-9]]*,yes) 3340f57e2e1Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 3350f57e2e1Smrg AC_ARG_WITH([aix-soname], 3360f57e2e1Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 3370f57e2e1Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 3380f57e2e1Smrg [case $withval in 3390f57e2e1Smrg aix|svr4|both) 3400f57e2e1Smrg ;; 3410f57e2e1Smrg *) 3420f57e2e1Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 3430f57e2e1Smrg ;; 3440f57e2e1Smrg esac 3450f57e2e1Smrg lt_cv_with_aix_soname=$with_aix_soname], 3460f57e2e1Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 3470f57e2e1Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 3480f57e2e1Smrg with_aix_soname=$lt_cv_with_aix_soname]) 3490f57e2e1Smrg AC_MSG_RESULT([$with_aix_soname]) 3500f57e2e1Smrg if test aix != "$with_aix_soname"; then 3510f57e2e1Smrg # For the AIX way of multilib, we name the shared archive member 3520f57e2e1Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 3530f57e2e1Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 3540f57e2e1Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 3550f57e2e1Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 3560f57e2e1Smrg if test 64 = "${OBJECT_MODE-32}"; then 3570f57e2e1Smrg shared_archive_member_spec=shr_64 3580f57e2e1Smrg else 3590f57e2e1Smrg shared_archive_member_spec=shr 3600f57e2e1Smrg fi 3610f57e2e1Smrg fi 3620f57e2e1Smrg ;; 3630f57e2e1Smrg*) 3640f57e2e1Smrg with_aix_soname=aix 3650f57e2e1Smrg ;; 3660f57e2e1Smrgesac 3670f57e2e1Smrg 3680f57e2e1Smrg_LT_DECL([], [shared_archive_member_spec], [0], 3690f57e2e1Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 3700f57e2e1Smrg])# _LT_WITH_AIX_SONAME 3710f57e2e1Smrg 3720f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 3730f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 3740f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 3750f57e2e1Smrg 3760f57e2e1Smrg 3770f57e2e1Smrg# _LT_WITH_PIC([MODE]) 3780f57e2e1Smrg# -------------------- 3790f57e2e1Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 3800f57e2e1Smrg# LT_INIT options. 3810f57e2e1Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 3820f57e2e1Smrgm4_define([_LT_WITH_PIC], 3830f57e2e1Smrg[AC_ARG_WITH([pic], 3840f57e2e1Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 3850f57e2e1Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 3860f57e2e1Smrg [lt_p=${PACKAGE-default} 3870f57e2e1Smrg case $withval in 3880f57e2e1Smrg yes|no) pic_mode=$withval ;; 3890f57e2e1Smrg *) 3900f57e2e1Smrg pic_mode=default 3910f57e2e1Smrg # Look at the argument we got. We use all the common list separators. 3920f57e2e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 3930f57e2e1Smrg for lt_pkg in $withval; do 3940f57e2e1Smrg IFS=$lt_save_ifs 3950f57e2e1Smrg if test "X$lt_pkg" = "X$lt_p"; then 3960f57e2e1Smrg pic_mode=yes 3970f57e2e1Smrg fi 3980f57e2e1Smrg done 3990f57e2e1Smrg IFS=$lt_save_ifs 4000f57e2e1Smrg ;; 4010f57e2e1Smrg esac], 4020f57e2e1Smrg [pic_mode=m4_default([$1], [default])]) 4030f57e2e1Smrg 4040f57e2e1Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 4050f57e2e1Smrg])# _LT_WITH_PIC 4060f57e2e1Smrg 4070f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 4080f57e2e1SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 4090f57e2e1Smrg 4100f57e2e1Smrg# Old name: 4110f57e2e1SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 4120f57e2e1Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 4130f57e2e1SmrgAC_DIAGNOSE([obsolete], 4140f57e2e1Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 4150f57e2e1Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 4160f57e2e1Smrg]) 4170f57e2e1Smrg 4180f57e2e1Smrgdnl aclocal-1.4 backwards compatibility: 4190f57e2e1Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 4200f57e2e1Smrg 4210f57e2e1Smrg## ----------------- ## 4220f57e2e1Smrg## LTDL_INIT Options ## 4230f57e2e1Smrg## ----------------- ## 4240f57e2e1Smrg 4250f57e2e1Smrgm4_define([_LTDL_MODE], []) 4260f57e2e1SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 4270f57e2e1Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 4280f57e2e1SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 4290f57e2e1Smrg [m4_define([_LTDL_MODE], [recursive])]) 4300f57e2e1SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 4310f57e2e1Smrg [m4_define([_LTDL_MODE], [subproject])]) 4320f57e2e1Smrg 4330f57e2e1Smrgm4_define([_LTDL_TYPE], []) 4340f57e2e1SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 4350f57e2e1Smrg [m4_define([_LTDL_TYPE], [installable])]) 4360f57e2e1SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 4370f57e2e1Smrg [m4_define([_LTDL_TYPE], [convenience])]) 438