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