19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall##############################################################################
29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Helper functions for option handling.                    -*- Autoconf -*-
39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   Written by Gary V. Vaughan, 2004
69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This file is free software; the Free Software Foundation gives
89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# unlimited permission to copy and/or distribute it, with or without
99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# modifications, as long as this notice is preserved.
109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# serial 6 ltoptions.m4
129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This is to help aclocal find these macros, as it can't see m4_define.
149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------------------
199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_MANGLE_OPTION],
209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------------------
259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# saved as a flag.
289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_SET_OPTION],
299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_MANGLE_DEFUN([$1], [$2]),
329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [m4_warning([Unknown $1 option `$2'])])[]dnl
339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------------------------------------
389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_IF_OPTION],
409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------------------------------------
459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# are set.
479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_UNLESS_OPTIONS],
489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		      [m4_define([$0_found])])])[]dnl
519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])[]dnl
539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------------
589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# OPTION-LIST is a space-separated list of Libtool options associated
599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# with MACRO-NAME.  If any OPTION has a matching handler declared with
609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the unknown option and exit.
629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_SET_OPTIONS],
639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[# Set options
649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [_LT_SET_OPTION([$1], _LT_Option)])
669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1],[LT_INIT],[
689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl
699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl Simply set some default values (i.e off) if boolean options were not
709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl specified:
719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ])
739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ])
759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl
769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl If no reference was made to various pairs of opposing options, then
779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl we run the default mode handler for the pair.  For example, if neither
789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl `shared' nor `disable-shared' was passed, we enable building of shared
799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dnl archives by default:
809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  		   [_LT_ENABLE_FAST_INSTALL])
859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ])
869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_SET_OPTIONS
879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## --------------------------------- ##
909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## Macros to handle LT_INIT options. ##
919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## --------------------------------- ##
929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------------------------
959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_MANGLE_DEFUN],
969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------------------------------
1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([LT_OPTION_DEFINE],
1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_OPTION_DEFINE
1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# dlopen
1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------
1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_DLOPEN],
1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], [dlopen])
1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DIAGNOSE([obsolete],
1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$0: Remove this warning and the call to _LT_SET_OPTION when you
1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallput the `dlopen' option into LT_INIT's first parameter.])
1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# win32-dll
1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------
1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Declare package support for building win32 dll's.
1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [win32-dll],
1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[enable_win32_dll=yes
1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host in
1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_TOOL(AS, as, false)
1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$AS" && AS=as
1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [AS],      [0], [Assembler program])dnl
1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$DLLTOOL" && DLLTOOL=dlltool
1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$OBJDUMP" && OBJDUMP=objdump
1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# win32-dll
1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_SET_OPTION([LT_INIT], [win32-dll])
1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DIAGNOSE([obsolete],
1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$0: Remove this warning and the call to _LT_SET_OPTION when you
1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallput the `win32-dll' option into LT_INIT's first parameter.])
1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_ENABLE_SHARED([DEFAULT])
1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------
1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# implement the --enable-shared flag, and supports the `shared' and
1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# `disable-shared' LT_INIT options.
1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_ENABLE_SHARED],
1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_ENABLE([shared],
1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [p=${PACKAGE-default}
1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $enableval in
1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    yes) enable_shared=yes ;;
1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    no) enable_shared=no ;;
1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      enable_shared=no
1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Look at the argument we got.  We use all the common list separators.
1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      for pkg in $enableval; do
1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	IFS="$lt_save_ifs"
1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "X$pkg" = "X$p"; then
1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  enable_shared=yes
1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      done
1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      IFS="$lt_save_ifs"
1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
1849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac],
1859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
1869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([build_libtool_libs], [enable_shared], [0],
1889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[Whether or not to build shared libraries])
1899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_ENABLE_SHARED
1909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
1929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
1939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names:
1959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([AC_ENABLE_SHARED],
1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([AC_DISABLE_SHARED],
2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], [disable-shared])
2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_ENABLE_SHARED], [])
2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_DISABLE_SHARED], [])
2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_ENABLE_STATIC([DEFAULT])
2139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------
2149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# implement the --enable-static flag, and support the `static' and
2159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# `disable-static' LT_INIT options.
2169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_ENABLE_STATIC],
2189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
2199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_ENABLE([static],
2209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
2229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [p=${PACKAGE-default}
2239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $enableval in
2249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    yes) enable_static=yes ;;
2259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    no) enable_static=no ;;
2269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
2279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     enable_static=no
2289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Look at the argument we got.  We use all the common list separators.
2299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      for pkg in $enableval; do
2319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	IFS="$lt_save_ifs"
2329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "X$pkg" = "X$p"; then
2339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  enable_static=yes
2349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
2359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      done
2369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      IFS="$lt_save_ifs"
2379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
2389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac],
2399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
2409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([build_old_libs], [enable_static], [0],
2429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[Whether or not to build static libraries])
2439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_ENABLE_STATIC
2449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
2469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
2479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names:
2499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([AC_ENABLE_STATIC],
2509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
2519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
2529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([AC_DISABLE_STATIC],
2549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], [disable-static])
2559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
2569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
2589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
2599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
2619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_ENABLE_STATIC], [])
2629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_DISABLE_STATIC], [])
2639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_ENABLE_FAST_INSTALL([DEFAULT])
2679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------
2689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# implement the --enable-fast-install flag, and support the `fast-install'
2699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and `disable-fast-install' LT_INIT options.
2709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_ENABLE_FAST_INSTALL],
2729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
2739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_ENABLE([fast-install],
2749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [p=${PACKAGE-default}
2779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $enableval in
2789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    yes) enable_fast_install=yes ;;
2799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    no) enable_fast_install=no ;;
2809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
2819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      enable_fast_install=no
2829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Look at the argument we got.  We use all the common list separators.
2839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      for pkg in $enableval; do
2859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	IFS="$lt_save_ifs"
2869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "X$pkg" = "X$p"; then
2879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  enable_fast_install=yes
2889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
2899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      done
2909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      IFS="$lt_save_ifs"
2919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
2929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac],
2939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
2949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([fast_install], [enable_fast_install], [0],
2969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 [Whether or not to optimize for fast installation])dnl
2979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_ENABLE_FAST_INSTALL
2989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
3009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
3019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names:
3039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_ENABLE_FAST_INSTALL],
3049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
3059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DIAGNOSE([obsolete],
3069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$0: Remove this warning and the call to _LT_SET_OPTION when you put
3079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallthe `fast-install' option into LT_INIT's first parameter.])
3089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
3099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_DISABLE_FAST_INSTALL],
3119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
3129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DIAGNOSE([obsolete],
3139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$0: Remove this warning and the call to _LT_SET_OPTION when you put
3149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallthe `disable-fast-install' option into LT_INIT's first parameter.])
3159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
3169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
3189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
3199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
3209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_WITH_PIC([MODE])
3239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------
3249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# implement the --with-pic flag, and support the `pic-only' and `no-pic'
3259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_INIT options.
3269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_WITH_PIC],
3289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_ARG_WITH([pic],
3299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AS_HELP_STRING([--with-pic],
3309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
3319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [pic_mode="$withval"],
3329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [pic_mode=default])
3339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
3359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
3379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_WITH_PIC
3389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
3409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
3419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
3439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_PICMODE],
3449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SET_OPTION([LT_INIT], [pic-only])
3459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DIAGNOSE([obsolete],
3469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$0: Remove this warning and the call to _LT_SET_OPTION when you
3479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallput the `pic-only' option into LT_INIT's first parameter.])
3489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
3499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
3519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
3529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## ----------------- ##
3549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## LTDL_INIT Options ##
3559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## ----------------- ##
3569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LTDL_MODE], [])
3589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
3599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 [m4_define([_LTDL_MODE], [nonrecursive])])
3609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LTDL_INIT], [recursive],
3619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 [m4_define([_LTDL_MODE], [recursive])])
3629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LTDL_INIT], [subproject],
3639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 [m4_define([_LTDL_MODE], [subproject])])
3649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LTDL_TYPE], [])
3669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LTDL_INIT], [installable],
3679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 [m4_define([_LTDL_TYPE], [installable])])
3689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_OPTION_DEFINE([LTDL_INIT], [convenience],
3699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 [m4_define([_LTDL_TYPE], [convenience])])
3709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
371