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