ltoptions.m4 revision 7204935c
11016ad83Smrg# Helper functions for option handling.                    -*- Autoconf -*-
21016ad83Smrg#
37204935cSmrg#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
47204935cSmrg#   Foundation, Inc.
51016ad83Smrg#   Written by Gary V. Vaughan, 2004
61016ad83Smrg#
71016ad83Smrg# This file is free software; the Free Software Foundation gives
81016ad83Smrg# unlimited permission to copy and/or distribute it, with or without
91016ad83Smrg# modifications, as long as this notice is preserved.
101016ad83Smrg
117204935cSmrg# serial 8 ltoptions.m4
121016ad83Smrg
131016ad83Smrg# This is to help aclocal find these macros, as it can't see m4_define.
141016ad83SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
151016ad83Smrg
161016ad83Smrg
171016ad83Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
181016ad83Smrg# ------------------------------------------
191016ad83Smrgm4_define([_LT_MANGLE_OPTION],
201016ad83Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
211016ad83Smrg
221016ad83Smrg
231016ad83Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
241016ad83Smrg# ---------------------------------------
251016ad83Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
261016ad83Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
271016ad83Smrg# saved as a flag.
281016ad83Smrgm4_define([_LT_SET_OPTION],
291016ad83Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
301016ad83Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
311016ad83Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
327204935cSmrg    [m4_warning([Unknown $1 option '$2'])])[]dnl
331016ad83Smrg])
341016ad83Smrg
351016ad83Smrg
361016ad83Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
371016ad83Smrg# ------------------------------------------------------------
381016ad83Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
391016ad83Smrgm4_define([_LT_IF_OPTION],
401016ad83Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
411016ad83Smrg
421016ad83Smrg
431016ad83Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
441016ad83Smrg# -------------------------------------------------------
451016ad83Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
461016ad83Smrg# are set.
471016ad83Smrgm4_define([_LT_UNLESS_OPTIONS],
481016ad83Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
491016ad83Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
501016ad83Smrg		      [m4_define([$0_found])])])[]dnl
511016ad83Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
521016ad83Smrg])[]dnl
531016ad83Smrg])
541016ad83Smrg
551016ad83Smrg
561016ad83Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
571016ad83Smrg# ----------------------------------------
581016ad83Smrg# OPTION-LIST is a space-separated list of Libtool options associated
591016ad83Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
601016ad83Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
611016ad83Smrg# the unknown option and exit.
621016ad83Smrgm4_defun([_LT_SET_OPTIONS],
631016ad83Smrg[# Set options
641016ad83Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
651016ad83Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
661016ad83Smrg
671016ad83Smrgm4_if([$1],[LT_INIT],[
681016ad83Smrg  dnl
691016ad83Smrg  dnl Simply set some default values (i.e off) if boolean options were not
701016ad83Smrg  dnl specified:
711016ad83Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
721016ad83Smrg  ])
731016ad83Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
741016ad83Smrg  ])
751016ad83Smrg  dnl
761016ad83Smrg  dnl If no reference was made to various pairs of opposing options, then
771016ad83Smrg  dnl we run the default mode handler for the pair.  For example, if neither
787204935cSmrg  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
791016ad83Smrg  dnl archives by default:
801016ad83Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
811016ad83Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
821016ad83Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
831016ad83Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
847204935cSmrg		   [_LT_ENABLE_FAST_INSTALL])
857204935cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
867204935cSmrg		   [_LT_WITH_AIX_SONAME([aix])])
871016ad83Smrg  ])
881016ad83Smrg])# _LT_SET_OPTIONS
891016ad83Smrg
901016ad83Smrg
911016ad83Smrg## --------------------------------- ##
921016ad83Smrg## Macros to handle LT_INIT options. ##
931016ad83Smrg## --------------------------------- ##
941016ad83Smrg
951016ad83Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
961016ad83Smrg# -----------------------------------------
971016ad83Smrgm4_define([_LT_MANGLE_DEFUN],
981016ad83Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
991016ad83Smrg
1001016ad83Smrg
1011016ad83Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
1021016ad83Smrg# -----------------------------------------------
1031016ad83Smrgm4_define([LT_OPTION_DEFINE],
1041016ad83Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
1051016ad83Smrg])# LT_OPTION_DEFINE
1061016ad83Smrg
1071016ad83Smrg
1081016ad83Smrg# dlopen
1091016ad83Smrg# ------
1101016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
1111016ad83Smrg])
1121016ad83Smrg
1131016ad83SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
1141016ad83Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
1151016ad83SmrgAC_DIAGNOSE([obsolete],
1161016ad83Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
1177204935cSmrgput the 'dlopen' option into LT_INIT's first parameter.])
1181016ad83Smrg])
1191016ad83Smrg
1201016ad83Smrgdnl aclocal-1.4 backwards compatibility:
1211016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
1221016ad83Smrg
1231016ad83Smrg
1241016ad83Smrg# win32-dll
1251016ad83Smrg# ---------
1261016ad83Smrg# Declare package support for building win32 dll's.
1271016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
1281016ad83Smrg[enable_win32_dll=yes
1291016ad83Smrg
1301016ad83Smrgcase $host in
1311016ad83Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
1321016ad83Smrg  AC_CHECK_TOOL(AS, as, false)
1331016ad83Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1341016ad83Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1351016ad83Smrg  ;;
1361016ad83Smrgesac
1371016ad83Smrg
1381016ad83Smrgtest -z "$AS" && AS=as
1391016ad83Smrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
1401016ad83Smrg
1411016ad83Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1421016ad83Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
1431016ad83Smrg
1441016ad83Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1451016ad83Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
1461016ad83Smrg])# win32-dll
1471016ad83Smrg
1481016ad83SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
1491016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1501016ad83Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
1511016ad83SmrgAC_DIAGNOSE([obsolete],
1521016ad83Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
1537204935cSmrgput the 'win32-dll' option into LT_INIT's first parameter.])
1541016ad83Smrg])
1551016ad83Smrg
1561016ad83Smrgdnl aclocal-1.4 backwards compatibility:
1571016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
1581016ad83Smrg
1591016ad83Smrg
1601016ad83Smrg# _LT_ENABLE_SHARED([DEFAULT])
1611016ad83Smrg# ----------------------------
1627204935cSmrg# implement the --enable-shared flag, and supports the 'shared' and
1637204935cSmrg# 'disable-shared' LT_INIT options.
1647204935cSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
1651016ad83Smrgm4_define([_LT_ENABLE_SHARED],
1661016ad83Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
1671016ad83SmrgAC_ARG_ENABLE([shared],
1681016ad83Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1691016ad83Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
1701016ad83Smrg    [p=${PACKAGE-default}
1711016ad83Smrg    case $enableval in
1721016ad83Smrg    yes) enable_shared=yes ;;
1731016ad83Smrg    no) enable_shared=no ;;
1741016ad83Smrg    *)
1751016ad83Smrg      enable_shared=no
1761016ad83Smrg      # Look at the argument we got.  We use all the common list separators.
1777204935cSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
1781016ad83Smrg      for pkg in $enableval; do
1797204935cSmrg	IFS=$lt_save_ifs
1801016ad83Smrg	if test "X$pkg" = "X$p"; then
1811016ad83Smrg	  enable_shared=yes
1821016ad83Smrg	fi
1831016ad83Smrg      done
1847204935cSmrg      IFS=$lt_save_ifs
1851016ad83Smrg      ;;
1861016ad83Smrg    esac],
1871016ad83Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
1881016ad83Smrg
1891016ad83Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
1901016ad83Smrg	[Whether or not to build shared libraries])
1911016ad83Smrg])# _LT_ENABLE_SHARED
1921016ad83Smrg
1931016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
1941016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
1951016ad83Smrg
1961016ad83Smrg# Old names:
1971016ad83SmrgAC_DEFUN([AC_ENABLE_SHARED],
1981016ad83Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
1991016ad83Smrg])
2001016ad83Smrg
2011016ad83SmrgAC_DEFUN([AC_DISABLE_SHARED],
2021016ad83Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
2031016ad83Smrg])
2041016ad83Smrg
2051016ad83SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
2061016ad83SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
2071016ad83Smrg
2081016ad83Smrgdnl aclocal-1.4 backwards compatibility:
2091016ad83Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
2101016ad83Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
2111016ad83Smrg
2121016ad83Smrg
2131016ad83Smrg
2141016ad83Smrg# _LT_ENABLE_STATIC([DEFAULT])
2151016ad83Smrg# ----------------------------
2167204935cSmrg# implement the --enable-static flag, and support the 'static' and
2177204935cSmrg# 'disable-static' LT_INIT options.
2187204935cSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
2191016ad83Smrgm4_define([_LT_ENABLE_STATIC],
2201016ad83Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
2211016ad83SmrgAC_ARG_ENABLE([static],
2221016ad83Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2231016ad83Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
2241016ad83Smrg    [p=${PACKAGE-default}
2251016ad83Smrg    case $enableval in
2261016ad83Smrg    yes) enable_static=yes ;;
2271016ad83Smrg    no) enable_static=no ;;
2281016ad83Smrg    *)
2291016ad83Smrg     enable_static=no
2301016ad83Smrg      # Look at the argument we got.  We use all the common list separators.
2317204935cSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
2321016ad83Smrg      for pkg in $enableval; do
2337204935cSmrg	IFS=$lt_save_ifs
2341016ad83Smrg	if test "X$pkg" = "X$p"; then
2351016ad83Smrg	  enable_static=yes
2361016ad83Smrg	fi
2371016ad83Smrg      done
2387204935cSmrg      IFS=$lt_save_ifs
2391016ad83Smrg      ;;
2401016ad83Smrg    esac],
2411016ad83Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
2421016ad83Smrg
2431016ad83Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
2441016ad83Smrg	[Whether or not to build static libraries])
2451016ad83Smrg])# _LT_ENABLE_STATIC
2461016ad83Smrg
2471016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
2481016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
2491016ad83Smrg
2501016ad83Smrg# Old names:
2511016ad83SmrgAC_DEFUN([AC_ENABLE_STATIC],
2521016ad83Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
2531016ad83Smrg])
2541016ad83Smrg
2551016ad83SmrgAC_DEFUN([AC_DISABLE_STATIC],
2561016ad83Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
2571016ad83Smrg])
2581016ad83Smrg
2591016ad83SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
2601016ad83SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
2611016ad83Smrg
2621016ad83Smrgdnl aclocal-1.4 backwards compatibility:
2631016ad83Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
2641016ad83Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
2651016ad83Smrg
2661016ad83Smrg
2671016ad83Smrg
2681016ad83Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
2691016ad83Smrg# ----------------------------------
2707204935cSmrg# implement the --enable-fast-install flag, and support the 'fast-install'
2717204935cSmrg# and 'disable-fast-install' LT_INIT options.
2727204935cSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
2731016ad83Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
2741016ad83Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
2751016ad83SmrgAC_ARG_ENABLE([fast-install],
2761016ad83Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2771016ad83Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2781016ad83Smrg    [p=${PACKAGE-default}
2791016ad83Smrg    case $enableval in
2801016ad83Smrg    yes) enable_fast_install=yes ;;
2811016ad83Smrg    no) enable_fast_install=no ;;
2821016ad83Smrg    *)
2831016ad83Smrg      enable_fast_install=no
2841016ad83Smrg      # Look at the argument we got.  We use all the common list separators.
2857204935cSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
2861016ad83Smrg      for pkg in $enableval; do
2877204935cSmrg	IFS=$lt_save_ifs
2881016ad83Smrg	if test "X$pkg" = "X$p"; then
2891016ad83Smrg	  enable_fast_install=yes
2901016ad83Smrg	fi
2911016ad83Smrg      done
2927204935cSmrg      IFS=$lt_save_ifs
2931016ad83Smrg      ;;
2941016ad83Smrg    esac],
2951016ad83Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
2961016ad83Smrg
2971016ad83Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
2981016ad83Smrg	 [Whether or not to optimize for fast installation])dnl
2991016ad83Smrg])# _LT_ENABLE_FAST_INSTALL
3001016ad83Smrg
3011016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
3021016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
3031016ad83Smrg
3041016ad83Smrg# Old names:
3051016ad83SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
3061016ad83Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
3071016ad83SmrgAC_DIAGNOSE([obsolete],
3081016ad83Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
3097204935cSmrgthe 'fast-install' option into LT_INIT's first parameter.])
3101016ad83Smrg])
3111016ad83Smrg
3121016ad83SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
3131016ad83Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
3141016ad83SmrgAC_DIAGNOSE([obsolete],
3151016ad83Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
3167204935cSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.])
3171016ad83Smrg])
3181016ad83Smrg
3191016ad83Smrgdnl aclocal-1.4 backwards compatibility:
3201016ad83Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
3211016ad83Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
3221016ad83Smrg
3231016ad83Smrg
3247204935cSmrg# _LT_WITH_AIX_SONAME([DEFAULT])
3257204935cSmrg# ----------------------------------
3267204935cSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix'
3277204935cSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
3287204935cSmrg# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
3297204935cSmrgm4_define([_LT_WITH_AIX_SONAME],
3307204935cSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
3317204935cSmrgshared_archive_member_spec=
3327204935cSmrgcase $host,$enable_shared in
3337204935cSmrgpower*-*-aix[[5-9]]*,yes)
3347204935cSmrg  AC_MSG_CHECKING([which variant of shared library versioning to provide])
3357204935cSmrg  AC_ARG_WITH([aix-soname],
3367204935cSmrg    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
3377204935cSmrg      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
3387204935cSmrg    [case $withval in
3397204935cSmrg    aix|svr4|both)
3407204935cSmrg      ;;
3417204935cSmrg    *)
3427204935cSmrg      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
3437204935cSmrg      ;;
3447204935cSmrg    esac
3457204935cSmrg    lt_cv_with_aix_soname=$with_aix_soname],
3467204935cSmrg    [AC_CACHE_VAL([lt_cv_with_aix_soname],
3477204935cSmrg      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
3487204935cSmrg    with_aix_soname=$lt_cv_with_aix_soname])
3497204935cSmrg  AC_MSG_RESULT([$with_aix_soname])
3507204935cSmrg  if test aix != "$with_aix_soname"; then
3517204935cSmrg    # For the AIX way of multilib, we name the shared archive member
3527204935cSmrg    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
3537204935cSmrg    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
3547204935cSmrg    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
3557204935cSmrg    # the AIX toolchain works better with OBJECT_MODE set (default 32).
3567204935cSmrg    if test 64 = "${OBJECT_MODE-32}"; then
3577204935cSmrg      shared_archive_member_spec=shr_64
3587204935cSmrg    else
3597204935cSmrg      shared_archive_member_spec=shr
3607204935cSmrg    fi
3617204935cSmrg  fi
3627204935cSmrg  ;;
3637204935cSmrg*)
3647204935cSmrg  with_aix_soname=aix
3657204935cSmrg  ;;
3667204935cSmrgesac
3677204935cSmrg
3687204935cSmrg_LT_DECL([], [shared_archive_member_spec], [0],
3697204935cSmrg    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
3707204935cSmrg])# _LT_WITH_AIX_SONAME
3717204935cSmrg
3727204935cSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
3737204935cSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
3747204935cSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
3757204935cSmrg
3767204935cSmrg
3771016ad83Smrg# _LT_WITH_PIC([MODE])
3781016ad83Smrg# --------------------
3797204935cSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
3801016ad83Smrg# LT_INIT options.
3817204935cSmrg# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
3821016ad83Smrgm4_define([_LT_WITH_PIC],
3831016ad83Smrg[AC_ARG_WITH([pic],
3841016ad83Smrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
3851016ad83Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
3861016ad83Smrg    [lt_p=${PACKAGE-default}
3871016ad83Smrg    case $withval in
3881016ad83Smrg    yes|no) pic_mode=$withval ;;
3891016ad83Smrg    *)
3901016ad83Smrg      pic_mode=default
3911016ad83Smrg      # Look at the argument we got.  We use all the common list separators.
3927204935cSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
3931016ad83Smrg      for lt_pkg in $withval; do
3947204935cSmrg	IFS=$lt_save_ifs
3951016ad83Smrg	if test "X$lt_pkg" = "X$lt_p"; then
3961016ad83Smrg	  pic_mode=yes
3971016ad83Smrg	fi
3981016ad83Smrg      done
3997204935cSmrg      IFS=$lt_save_ifs
4001016ad83Smrg      ;;
4011016ad83Smrg    esac],
4027204935cSmrg    [pic_mode=m4_default([$1], [default])])
4031016ad83Smrg
4041016ad83Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
4051016ad83Smrg])# _LT_WITH_PIC
4061016ad83Smrg
4071016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
4081016ad83SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
4091016ad83Smrg
4101016ad83Smrg# Old name:
4111016ad83SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
4121016ad83Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
4131016ad83SmrgAC_DIAGNOSE([obsolete],
4141016ad83Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
4157204935cSmrgput the 'pic-only' option into LT_INIT's first parameter.])
4161016ad83Smrg])
4171016ad83Smrg
4181016ad83Smrgdnl aclocal-1.4 backwards compatibility:
4191016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
4201016ad83Smrg
4211016ad83Smrg## ----------------- ##
4221016ad83Smrg## LTDL_INIT Options ##
4231016ad83Smrg## ----------------- ##
4241016ad83Smrg
4251016ad83Smrgm4_define([_LTDL_MODE], [])
4261016ad83SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
4271016ad83Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
4281016ad83SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
4291016ad83Smrg		 [m4_define([_LTDL_MODE], [recursive])])
4301016ad83SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
4311016ad83Smrg		 [m4_define([_LTDL_MODE], [subproject])])
4321016ad83Smrg
4331016ad83Smrgm4_define([_LTDL_TYPE], [])
4341016ad83SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
4351016ad83Smrg		 [m4_define([_LTDL_TYPE], [installable])])
4361016ad83SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
4371016ad83Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
438