xref: /aosp_15_r20/external/libconfig/m4/ltoptions.m4 (revision 2e9d491483b805f09ea864149eadd5680efcc72a)
1*2e9d4914SAndroid Build Coastguard Worker# Helper functions for option handling.                    -*- Autoconf -*-
2*2e9d4914SAndroid Build Coastguard Worker#
3*2e9d4914SAndroid Build Coastguard Worker#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
4*2e9d4914SAndroid Build Coastguard Worker#   Inc.
5*2e9d4914SAndroid Build Coastguard Worker#   Written by Gary V. Vaughan, 2004
6*2e9d4914SAndroid Build Coastguard Worker#
7*2e9d4914SAndroid Build Coastguard Worker# This file is free software; the Free Software Foundation gives
8*2e9d4914SAndroid Build Coastguard Worker# unlimited permission to copy and/or distribute it, with or without
9*2e9d4914SAndroid Build Coastguard Worker# modifications, as long as this notice is preserved.
10*2e9d4914SAndroid Build Coastguard Worker
11*2e9d4914SAndroid Build Coastguard Worker# serial 7 ltoptions.m4
12*2e9d4914SAndroid Build Coastguard Worker
13*2e9d4914SAndroid Build Coastguard Worker# This is to help aclocal find these macros, as it can't see m4_define.
14*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
15*2e9d4914SAndroid Build Coastguard Worker
16*2e9d4914SAndroid Build Coastguard Worker
17*2e9d4914SAndroid Build Coastguard Worker# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
18*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------------
19*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_MANGLE_OPTION],
20*2e9d4914SAndroid Build Coastguard Worker[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
21*2e9d4914SAndroid Build Coastguard Worker
22*2e9d4914SAndroid Build Coastguard Worker
23*2e9d4914SAndroid Build Coastguard Worker# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
24*2e9d4914SAndroid Build Coastguard Worker# ---------------------------------------
25*2e9d4914SAndroid Build Coastguard Worker# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
26*2e9d4914SAndroid Build Coastguard Worker# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
27*2e9d4914SAndroid Build Coastguard Worker# saved as a flag.
28*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_SET_OPTION],
29*2e9d4914SAndroid Build Coastguard Worker[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
30*2e9d4914SAndroid Build Coastguard Workerm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
31*2e9d4914SAndroid Build Coastguard Worker        _LT_MANGLE_DEFUN([$1], [$2]),
32*2e9d4914SAndroid Build Coastguard Worker    [m4_warning([Unknown $1 option `$2'])])[]dnl
33*2e9d4914SAndroid Build Coastguard Worker])
34*2e9d4914SAndroid Build Coastguard Worker
35*2e9d4914SAndroid Build Coastguard Worker
36*2e9d4914SAndroid Build Coastguard Worker# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
37*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------------------------------
38*2e9d4914SAndroid Build Coastguard Worker# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
39*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_IF_OPTION],
40*2e9d4914SAndroid Build Coastguard Worker[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
41*2e9d4914SAndroid Build Coastguard Worker
42*2e9d4914SAndroid Build Coastguard Worker
43*2e9d4914SAndroid Build Coastguard Worker# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
44*2e9d4914SAndroid Build Coastguard Worker# -------------------------------------------------------
45*2e9d4914SAndroid Build Coastguard Worker# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
46*2e9d4914SAndroid Build Coastguard Worker# are set.
47*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_UNLESS_OPTIONS],
48*2e9d4914SAndroid Build Coastguard Worker[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
49*2e9d4914SAndroid Build Coastguard Worker	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
50*2e9d4914SAndroid Build Coastguard Worker		      [m4_define([$0_found])])])[]dnl
51*2e9d4914SAndroid Build Coastguard Workerm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
52*2e9d4914SAndroid Build Coastguard Worker])[]dnl
53*2e9d4914SAndroid Build Coastguard Worker])
54*2e9d4914SAndroid Build Coastguard Worker
55*2e9d4914SAndroid Build Coastguard Worker
56*2e9d4914SAndroid Build Coastguard Worker# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
57*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------------
58*2e9d4914SAndroid Build Coastguard Worker# OPTION-LIST is a space-separated list of Libtool options associated
59*2e9d4914SAndroid Build Coastguard Worker# with MACRO-NAME.  If any OPTION has a matching handler declared with
60*2e9d4914SAndroid Build Coastguard Worker# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
61*2e9d4914SAndroid Build Coastguard Worker# the unknown option and exit.
62*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_SET_OPTIONS],
63*2e9d4914SAndroid Build Coastguard Worker[# Set options
64*2e9d4914SAndroid Build Coastguard Workerm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
65*2e9d4914SAndroid Build Coastguard Worker    [_LT_SET_OPTION([$1], _LT_Option)])
66*2e9d4914SAndroid Build Coastguard Worker
67*2e9d4914SAndroid Build Coastguard Workerm4_if([$1],[LT_INIT],[
68*2e9d4914SAndroid Build Coastguard Worker  dnl
69*2e9d4914SAndroid Build Coastguard Worker  dnl Simply set some default values (i.e off) if boolean options were not
70*2e9d4914SAndroid Build Coastguard Worker  dnl specified:
71*2e9d4914SAndroid Build Coastguard Worker  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
72*2e9d4914SAndroid Build Coastguard Worker  ])
73*2e9d4914SAndroid Build Coastguard Worker  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
74*2e9d4914SAndroid Build Coastguard Worker  ])
75*2e9d4914SAndroid Build Coastguard Worker  dnl
76*2e9d4914SAndroid Build Coastguard Worker  dnl If no reference was made to various pairs of opposing options, then
77*2e9d4914SAndroid Build Coastguard Worker  dnl we run the default mode handler for the pair.  For example, if neither
78*2e9d4914SAndroid Build Coastguard Worker  dnl `shared' nor `disable-shared' was passed, we enable building of shared
79*2e9d4914SAndroid Build Coastguard Worker  dnl archives by default:
80*2e9d4914SAndroid Build Coastguard Worker  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
81*2e9d4914SAndroid Build Coastguard Worker  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
82*2e9d4914SAndroid Build Coastguard Worker  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
83*2e9d4914SAndroid Build Coastguard Worker  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
84*2e9d4914SAndroid Build Coastguard Worker  		   [_LT_ENABLE_FAST_INSTALL])
85*2e9d4914SAndroid Build Coastguard Worker  ])
86*2e9d4914SAndroid Build Coastguard Worker])# _LT_SET_OPTIONS
87*2e9d4914SAndroid Build Coastguard Worker
88*2e9d4914SAndroid Build Coastguard Worker
89*2e9d4914SAndroid Build Coastguard Worker## --------------------------------- ##
90*2e9d4914SAndroid Build Coastguard Worker## Macros to handle LT_INIT options. ##
91*2e9d4914SAndroid Build Coastguard Worker## --------------------------------- ##
92*2e9d4914SAndroid Build Coastguard Worker
93*2e9d4914SAndroid Build Coastguard Worker# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
94*2e9d4914SAndroid Build Coastguard Worker# -----------------------------------------
95*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_MANGLE_DEFUN],
96*2e9d4914SAndroid Build Coastguard Worker[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
97*2e9d4914SAndroid Build Coastguard Worker
98*2e9d4914SAndroid Build Coastguard Worker
99*2e9d4914SAndroid Build Coastguard Worker# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
100*2e9d4914SAndroid Build Coastguard Worker# -----------------------------------------------
101*2e9d4914SAndroid Build Coastguard Workerm4_define([LT_OPTION_DEFINE],
102*2e9d4914SAndroid Build Coastguard Worker[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
103*2e9d4914SAndroid Build Coastguard Worker])# LT_OPTION_DEFINE
104*2e9d4914SAndroid Build Coastguard Worker
105*2e9d4914SAndroid Build Coastguard Worker
106*2e9d4914SAndroid Build Coastguard Worker# dlopen
107*2e9d4914SAndroid Build Coastguard Worker# ------
108*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
109*2e9d4914SAndroid Build Coastguard Worker])
110*2e9d4914SAndroid Build Coastguard Worker
111*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_DLOPEN],
112*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], [dlopen])
113*2e9d4914SAndroid Build Coastguard WorkerAC_DIAGNOSE([obsolete],
114*2e9d4914SAndroid Build Coastguard Worker[$0: Remove this warning and the call to _LT_SET_OPTION when you
115*2e9d4914SAndroid Build Coastguard Workerput the `dlopen' option into LT_INIT's first parameter.])
116*2e9d4914SAndroid Build Coastguard Worker])
117*2e9d4914SAndroid Build Coastguard Worker
118*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
119*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
120*2e9d4914SAndroid Build Coastguard Worker
121*2e9d4914SAndroid Build Coastguard Worker
122*2e9d4914SAndroid Build Coastguard Worker# win32-dll
123*2e9d4914SAndroid Build Coastguard Worker# ---------
124*2e9d4914SAndroid Build Coastguard Worker# Declare package support for building win32 dll's.
125*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [win32-dll],
126*2e9d4914SAndroid Build Coastguard Worker[enable_win32_dll=yes
127*2e9d4914SAndroid Build Coastguard Worker
128*2e9d4914SAndroid Build Coastguard Workercase $host in
129*2e9d4914SAndroid Build Coastguard Worker*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
130*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_TOOL(AS, as, false)
131*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
132*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_TOOL(OBJDUMP, objdump, false)
133*2e9d4914SAndroid Build Coastguard Worker  ;;
134*2e9d4914SAndroid Build Coastguard Workeresac
135*2e9d4914SAndroid Build Coastguard Worker
136*2e9d4914SAndroid Build Coastguard Workertest -z "$AS" && AS=as
137*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [AS],      [1], [Assembler program])dnl
138*2e9d4914SAndroid Build Coastguard Worker
139*2e9d4914SAndroid Build Coastguard Workertest -z "$DLLTOOL" && DLLTOOL=dlltool
140*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
141*2e9d4914SAndroid Build Coastguard Worker
142*2e9d4914SAndroid Build Coastguard Workertest -z "$OBJDUMP" && OBJDUMP=objdump
143*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
144*2e9d4914SAndroid Build Coastguard Worker])# win32-dll
145*2e9d4914SAndroid Build Coastguard Worker
146*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
147*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
148*2e9d4914SAndroid Build Coastguard Worker_LT_SET_OPTION([LT_INIT], [win32-dll])
149*2e9d4914SAndroid Build Coastguard WorkerAC_DIAGNOSE([obsolete],
150*2e9d4914SAndroid Build Coastguard Worker[$0: Remove this warning and the call to _LT_SET_OPTION when you
151*2e9d4914SAndroid Build Coastguard Workerput the `win32-dll' option into LT_INIT's first parameter.])
152*2e9d4914SAndroid Build Coastguard Worker])
153*2e9d4914SAndroid Build Coastguard Worker
154*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
155*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
156*2e9d4914SAndroid Build Coastguard Worker
157*2e9d4914SAndroid Build Coastguard Worker
158*2e9d4914SAndroid Build Coastguard Worker# _LT_ENABLE_SHARED([DEFAULT])
159*2e9d4914SAndroid Build Coastguard Worker# ----------------------------
160*2e9d4914SAndroid Build Coastguard Worker# implement the --enable-shared flag, and supports the `shared' and
161*2e9d4914SAndroid Build Coastguard Worker# `disable-shared' LT_INIT options.
162*2e9d4914SAndroid Build Coastguard Worker# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
163*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_ENABLE_SHARED],
164*2e9d4914SAndroid Build Coastguard Worker[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
165*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE([shared],
166*2e9d4914SAndroid Build Coastguard Worker    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
167*2e9d4914SAndroid Build Coastguard Worker	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
168*2e9d4914SAndroid Build Coastguard Worker    [p=${PACKAGE-default}
169*2e9d4914SAndroid Build Coastguard Worker    case $enableval in
170*2e9d4914SAndroid Build Coastguard Worker    yes) enable_shared=yes ;;
171*2e9d4914SAndroid Build Coastguard Worker    no) enable_shared=no ;;
172*2e9d4914SAndroid Build Coastguard Worker    *)
173*2e9d4914SAndroid Build Coastguard Worker      enable_shared=no
174*2e9d4914SAndroid Build Coastguard Worker      # Look at the argument we got.  We use all the common list separators.
175*2e9d4914SAndroid Build Coastguard Worker      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
176*2e9d4914SAndroid Build Coastguard Worker      for pkg in $enableval; do
177*2e9d4914SAndroid Build Coastguard Worker	IFS="$lt_save_ifs"
178*2e9d4914SAndroid Build Coastguard Worker	if test "X$pkg" = "X$p"; then
179*2e9d4914SAndroid Build Coastguard Worker	  enable_shared=yes
180*2e9d4914SAndroid Build Coastguard Worker	fi
181*2e9d4914SAndroid Build Coastguard Worker      done
182*2e9d4914SAndroid Build Coastguard Worker      IFS="$lt_save_ifs"
183*2e9d4914SAndroid Build Coastguard Worker      ;;
184*2e9d4914SAndroid Build Coastguard Worker    esac],
185*2e9d4914SAndroid Build Coastguard Worker    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
186*2e9d4914SAndroid Build Coastguard Worker
187*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([build_libtool_libs], [enable_shared], [0],
188*2e9d4914SAndroid Build Coastguard Worker	[Whether or not to build shared libraries])
189*2e9d4914SAndroid Build Coastguard Worker])# _LT_ENABLE_SHARED
190*2e9d4914SAndroid Build Coastguard Worker
191*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
192*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
193*2e9d4914SAndroid Build Coastguard Worker
194*2e9d4914SAndroid Build Coastguard Worker# Old names:
195*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([AC_ENABLE_SHARED],
196*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
197*2e9d4914SAndroid Build Coastguard Worker])
198*2e9d4914SAndroid Build Coastguard Worker
199*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([AC_DISABLE_SHARED],
200*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], [disable-shared])
201*2e9d4914SAndroid Build Coastguard Worker])
202*2e9d4914SAndroid Build Coastguard Worker
203*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
204*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
205*2e9d4914SAndroid Build Coastguard Worker
206*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
207*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_ENABLE_SHARED], [])
208*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_DISABLE_SHARED], [])
209*2e9d4914SAndroid Build Coastguard Worker
210*2e9d4914SAndroid Build Coastguard Worker
211*2e9d4914SAndroid Build Coastguard Worker
212*2e9d4914SAndroid Build Coastguard Worker# _LT_ENABLE_STATIC([DEFAULT])
213*2e9d4914SAndroid Build Coastguard Worker# ----------------------------
214*2e9d4914SAndroid Build Coastguard Worker# implement the --enable-static flag, and support the `static' and
215*2e9d4914SAndroid Build Coastguard Worker# `disable-static' LT_INIT options.
216*2e9d4914SAndroid Build Coastguard Worker# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
217*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_ENABLE_STATIC],
218*2e9d4914SAndroid Build Coastguard Worker[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
219*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE([static],
220*2e9d4914SAndroid Build Coastguard Worker    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
221*2e9d4914SAndroid Build Coastguard Worker	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
222*2e9d4914SAndroid Build Coastguard Worker    [p=${PACKAGE-default}
223*2e9d4914SAndroid Build Coastguard Worker    case $enableval in
224*2e9d4914SAndroid Build Coastguard Worker    yes) enable_static=yes ;;
225*2e9d4914SAndroid Build Coastguard Worker    no) enable_static=no ;;
226*2e9d4914SAndroid Build Coastguard Worker    *)
227*2e9d4914SAndroid Build Coastguard Worker     enable_static=no
228*2e9d4914SAndroid Build Coastguard Worker      # Look at the argument we got.  We use all the common list separators.
229*2e9d4914SAndroid Build Coastguard Worker      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
230*2e9d4914SAndroid Build Coastguard Worker      for pkg in $enableval; do
231*2e9d4914SAndroid Build Coastguard Worker	IFS="$lt_save_ifs"
232*2e9d4914SAndroid Build Coastguard Worker	if test "X$pkg" = "X$p"; then
233*2e9d4914SAndroid Build Coastguard Worker	  enable_static=yes
234*2e9d4914SAndroid Build Coastguard Worker	fi
235*2e9d4914SAndroid Build Coastguard Worker      done
236*2e9d4914SAndroid Build Coastguard Worker      IFS="$lt_save_ifs"
237*2e9d4914SAndroid Build Coastguard Worker      ;;
238*2e9d4914SAndroid Build Coastguard Worker    esac],
239*2e9d4914SAndroid Build Coastguard Worker    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
240*2e9d4914SAndroid Build Coastguard Worker
241*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([build_old_libs], [enable_static], [0],
242*2e9d4914SAndroid Build Coastguard Worker	[Whether or not to build static libraries])
243*2e9d4914SAndroid Build Coastguard Worker])# _LT_ENABLE_STATIC
244*2e9d4914SAndroid Build Coastguard Worker
245*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
246*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
247*2e9d4914SAndroid Build Coastguard Worker
248*2e9d4914SAndroid Build Coastguard Worker# Old names:
249*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([AC_ENABLE_STATIC],
250*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
251*2e9d4914SAndroid Build Coastguard Worker])
252*2e9d4914SAndroid Build Coastguard Worker
253*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([AC_DISABLE_STATIC],
254*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], [disable-static])
255*2e9d4914SAndroid Build Coastguard Worker])
256*2e9d4914SAndroid Build Coastguard Worker
257*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
258*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
259*2e9d4914SAndroid Build Coastguard Worker
260*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
261*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_ENABLE_STATIC], [])
262*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_DISABLE_STATIC], [])
263*2e9d4914SAndroid Build Coastguard Worker
264*2e9d4914SAndroid Build Coastguard Worker
265*2e9d4914SAndroid Build Coastguard Worker
266*2e9d4914SAndroid Build Coastguard Worker# _LT_ENABLE_FAST_INSTALL([DEFAULT])
267*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------
268*2e9d4914SAndroid Build Coastguard Worker# implement the --enable-fast-install flag, and support the `fast-install'
269*2e9d4914SAndroid Build Coastguard Worker# and `disable-fast-install' LT_INIT options.
270*2e9d4914SAndroid Build Coastguard Worker# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
271*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_ENABLE_FAST_INSTALL],
272*2e9d4914SAndroid Build Coastguard Worker[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
273*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_ENABLE([fast-install],
274*2e9d4914SAndroid Build Coastguard Worker    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
275*2e9d4914SAndroid Build Coastguard Worker    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
276*2e9d4914SAndroid Build Coastguard Worker    [p=${PACKAGE-default}
277*2e9d4914SAndroid Build Coastguard Worker    case $enableval in
278*2e9d4914SAndroid Build Coastguard Worker    yes) enable_fast_install=yes ;;
279*2e9d4914SAndroid Build Coastguard Worker    no) enable_fast_install=no ;;
280*2e9d4914SAndroid Build Coastguard Worker    *)
281*2e9d4914SAndroid Build Coastguard Worker      enable_fast_install=no
282*2e9d4914SAndroid Build Coastguard Worker      # Look at the argument we got.  We use all the common list separators.
283*2e9d4914SAndroid Build Coastguard Worker      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
284*2e9d4914SAndroid Build Coastguard Worker      for pkg in $enableval; do
285*2e9d4914SAndroid Build Coastguard Worker	IFS="$lt_save_ifs"
286*2e9d4914SAndroid Build Coastguard Worker	if test "X$pkg" = "X$p"; then
287*2e9d4914SAndroid Build Coastguard Worker	  enable_fast_install=yes
288*2e9d4914SAndroid Build Coastguard Worker	fi
289*2e9d4914SAndroid Build Coastguard Worker      done
290*2e9d4914SAndroid Build Coastguard Worker      IFS="$lt_save_ifs"
291*2e9d4914SAndroid Build Coastguard Worker      ;;
292*2e9d4914SAndroid Build Coastguard Worker    esac],
293*2e9d4914SAndroid Build Coastguard Worker    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
294*2e9d4914SAndroid Build Coastguard Worker
295*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([fast_install], [enable_fast_install], [0],
296*2e9d4914SAndroid Build Coastguard Worker	 [Whether or not to optimize for fast installation])dnl
297*2e9d4914SAndroid Build Coastguard Worker])# _LT_ENABLE_FAST_INSTALL
298*2e9d4914SAndroid Build Coastguard Worker
299*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
300*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
301*2e9d4914SAndroid Build Coastguard Worker
302*2e9d4914SAndroid Build Coastguard Worker# Old names:
303*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_ENABLE_FAST_INSTALL],
304*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
305*2e9d4914SAndroid Build Coastguard WorkerAC_DIAGNOSE([obsolete],
306*2e9d4914SAndroid Build Coastguard Worker[$0: Remove this warning and the call to _LT_SET_OPTION when you put
307*2e9d4914SAndroid Build Coastguard Workerthe `fast-install' option into LT_INIT's first parameter.])
308*2e9d4914SAndroid Build Coastguard Worker])
309*2e9d4914SAndroid Build Coastguard Worker
310*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_DISABLE_FAST_INSTALL],
311*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
312*2e9d4914SAndroid Build Coastguard WorkerAC_DIAGNOSE([obsolete],
313*2e9d4914SAndroid Build Coastguard Worker[$0: Remove this warning and the call to _LT_SET_OPTION when you put
314*2e9d4914SAndroid Build Coastguard Workerthe `disable-fast-install' option into LT_INIT's first parameter.])
315*2e9d4914SAndroid Build Coastguard Worker])
316*2e9d4914SAndroid Build Coastguard Worker
317*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
318*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
319*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
320*2e9d4914SAndroid Build Coastguard Worker
321*2e9d4914SAndroid Build Coastguard Worker
322*2e9d4914SAndroid Build Coastguard Worker# _LT_WITH_PIC([MODE])
323*2e9d4914SAndroid Build Coastguard Worker# --------------------
324*2e9d4914SAndroid Build Coastguard Worker# implement the --with-pic flag, and support the `pic-only' and `no-pic'
325*2e9d4914SAndroid Build Coastguard Worker# LT_INIT options.
326*2e9d4914SAndroid Build Coastguard Worker# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
327*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_WITH_PIC],
328*2e9d4914SAndroid Build Coastguard Worker[AC_ARG_WITH([pic],
329*2e9d4914SAndroid Build Coastguard Worker    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
330*2e9d4914SAndroid Build Coastguard Worker	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
331*2e9d4914SAndroid Build Coastguard Worker    [lt_p=${PACKAGE-default}
332*2e9d4914SAndroid Build Coastguard Worker    case $withval in
333*2e9d4914SAndroid Build Coastguard Worker    yes|no) pic_mode=$withval ;;
334*2e9d4914SAndroid Build Coastguard Worker    *)
335*2e9d4914SAndroid Build Coastguard Worker      pic_mode=default
336*2e9d4914SAndroid Build Coastguard Worker      # Look at the argument we got.  We use all the common list separators.
337*2e9d4914SAndroid Build Coastguard Worker      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
338*2e9d4914SAndroid Build Coastguard Worker      for lt_pkg in $withval; do
339*2e9d4914SAndroid Build Coastguard Worker	IFS="$lt_save_ifs"
340*2e9d4914SAndroid Build Coastguard Worker	if test "X$lt_pkg" = "X$lt_p"; then
341*2e9d4914SAndroid Build Coastguard Worker	  pic_mode=yes
342*2e9d4914SAndroid Build Coastguard Worker	fi
343*2e9d4914SAndroid Build Coastguard Worker      done
344*2e9d4914SAndroid Build Coastguard Worker      IFS="$lt_save_ifs"
345*2e9d4914SAndroid Build Coastguard Worker      ;;
346*2e9d4914SAndroid Build Coastguard Worker    esac],
347*2e9d4914SAndroid Build Coastguard Worker    [pic_mode=default])
348*2e9d4914SAndroid Build Coastguard Worker
349*2e9d4914SAndroid Build Coastguard Workertest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
350*2e9d4914SAndroid Build Coastguard Worker
351*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
352*2e9d4914SAndroid Build Coastguard Worker])# _LT_WITH_PIC
353*2e9d4914SAndroid Build Coastguard Worker
354*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
355*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
356*2e9d4914SAndroid Build Coastguard Worker
357*2e9d4914SAndroid Build Coastguard Worker# Old name:
358*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_PICMODE],
359*2e9d4914SAndroid Build Coastguard Worker[_LT_SET_OPTION([LT_INIT], [pic-only])
360*2e9d4914SAndroid Build Coastguard WorkerAC_DIAGNOSE([obsolete],
361*2e9d4914SAndroid Build Coastguard Worker[$0: Remove this warning and the call to _LT_SET_OPTION when you
362*2e9d4914SAndroid Build Coastguard Workerput the `pic-only' option into LT_INIT's first parameter.])
363*2e9d4914SAndroid Build Coastguard Worker])
364*2e9d4914SAndroid Build Coastguard Worker
365*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
366*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
367*2e9d4914SAndroid Build Coastguard Worker
368*2e9d4914SAndroid Build Coastguard Worker## ----------------- ##
369*2e9d4914SAndroid Build Coastguard Worker## LTDL_INIT Options ##
370*2e9d4914SAndroid Build Coastguard Worker## ----------------- ##
371*2e9d4914SAndroid Build Coastguard Worker
372*2e9d4914SAndroid Build Coastguard Workerm4_define([_LTDL_MODE], [])
373*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
374*2e9d4914SAndroid Build Coastguard Worker		 [m4_define([_LTDL_MODE], [nonrecursive])])
375*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LTDL_INIT], [recursive],
376*2e9d4914SAndroid Build Coastguard Worker		 [m4_define([_LTDL_MODE], [recursive])])
377*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LTDL_INIT], [subproject],
378*2e9d4914SAndroid Build Coastguard Worker		 [m4_define([_LTDL_MODE], [subproject])])
379*2e9d4914SAndroid Build Coastguard Worker
380*2e9d4914SAndroid Build Coastguard Workerm4_define([_LTDL_TYPE], [])
381*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LTDL_INIT], [installable],
382*2e9d4914SAndroid Build Coastguard Worker		 [m4_define([_LTDL_TYPE], [installable])])
383*2e9d4914SAndroid Build Coastguard WorkerLT_OPTION_DEFINE([LTDL_INIT], [convenience],
384*2e9d4914SAndroid Build Coastguard Worker		 [m4_define([_LTDL_TYPE], [convenience])])
385