xref: /aosp_15_r20/external/libpng/scripts/autoconf/libtool.m4 (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard Worker# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2*a67afe4dSAndroid Build Coastguard Worker#
3*a67afe4dSAndroid Build Coastguard Worker#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
4*a67afe4dSAndroid Build Coastguard Worker#   Foundation, Inc.
5*a67afe4dSAndroid Build Coastguard Worker#   Written by Gordon Matzigkeit, 1996
6*a67afe4dSAndroid Build Coastguard Worker#
7*a67afe4dSAndroid Build Coastguard Worker# This file is free software; the Free Software Foundation gives
8*a67afe4dSAndroid Build Coastguard Worker# unlimited permission to copy and/or distribute it, with or without
9*a67afe4dSAndroid Build Coastguard Worker# modifications, as long as this notice is preserved.
10*a67afe4dSAndroid Build Coastguard Worker
11*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_COPYING], [dnl
12*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2014 Free Software Foundation, Inc.
13*a67afe4dSAndroid Build Coastguard Worker# This is free software; see the source for copying conditions.  There is NO
14*a67afe4dSAndroid Build Coastguard Worker# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15*a67afe4dSAndroid Build Coastguard Worker
16*a67afe4dSAndroid Build Coastguard Worker# GNU Libtool is free software; you can redistribute it and/or modify
17*a67afe4dSAndroid Build Coastguard Worker# it under the terms of the GNU General Public License as published by
18*a67afe4dSAndroid Build Coastguard Worker# the Free Software Foundation; either version 2 of of the License, or
19*a67afe4dSAndroid Build Coastguard Worker# (at your option) any later version.
20*a67afe4dSAndroid Build Coastguard Worker#
21*a67afe4dSAndroid Build Coastguard Worker# As a special exception to the GNU General Public License, if you
22*a67afe4dSAndroid Build Coastguard Worker# distribute this file as part of a program or library that is built
23*a67afe4dSAndroid Build Coastguard Worker# using GNU Libtool, you may include this file under the  same
24*a67afe4dSAndroid Build Coastguard Worker# distribution terms that you use for the rest of that program.
25*a67afe4dSAndroid Build Coastguard Worker#
26*a67afe4dSAndroid Build Coastguard Worker# GNU Libtool is distributed in the hope that it will be useful, but
27*a67afe4dSAndroid Build Coastguard Worker# WITHOUT ANY WARRANTY; without even the implied warranty of
28*a67afe4dSAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29*a67afe4dSAndroid Build Coastguard Worker# GNU General Public License for more details.
30*a67afe4dSAndroid Build Coastguard Worker#
31*a67afe4dSAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License
32*a67afe4dSAndroid Build Coastguard Worker# along with this program.  If not, see <http://www.gnu.org/licenses/>.
33*a67afe4dSAndroid Build Coastguard Worker])
34*a67afe4dSAndroid Build Coastguard Worker
35*a67afe4dSAndroid Build Coastguard Worker# serial 59 LT_INIT
36*a67afe4dSAndroid Build Coastguard Worker
37*a67afe4dSAndroid Build Coastguard Worker
38*a67afe4dSAndroid Build Coastguard Worker# LT_PREREQ(VERSION)
39*a67afe4dSAndroid Build Coastguard Worker# ------------------
40*a67afe4dSAndroid Build Coastguard Worker# Complain and exit if this libtool version is less that VERSION.
41*a67afe4dSAndroid Build Coastguard Workerm4_defun([LT_PREREQ],
42*a67afe4dSAndroid Build Coastguard Worker[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
43*a67afe4dSAndroid Build Coastguard Worker       [m4_default([$3],
44*a67afe4dSAndroid Build Coastguard Worker		   [m4_fatal([Libtool version $1 or higher is required],
45*a67afe4dSAndroid Build Coastguard Worker		             63)])],
46*a67afe4dSAndroid Build Coastguard Worker       [$2])])
47*a67afe4dSAndroid Build Coastguard Worker
48*a67afe4dSAndroid Build Coastguard Worker
49*a67afe4dSAndroid Build Coastguard Worker# _LT_CHECK_BUILDDIR
50*a67afe4dSAndroid Build Coastguard Worker# ------------------
51*a67afe4dSAndroid Build Coastguard Worker# Complain if the absolute build directory name contains unusual characters
52*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_BUILDDIR],
53*a67afe4dSAndroid Build Coastguard Worker[case `pwd` in
54*a67afe4dSAndroid Build Coastguard Worker  *\ * | *\	*)
55*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
56*a67afe4dSAndroid Build Coastguard Workeresac
57*a67afe4dSAndroid Build Coastguard Worker])
58*a67afe4dSAndroid Build Coastguard Worker
59*a67afe4dSAndroid Build Coastguard Worker
60*a67afe4dSAndroid Build Coastguard Worker# LT_INIT([OPTIONS])
61*a67afe4dSAndroid Build Coastguard Worker# ------------------
62*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_INIT],
63*a67afe4dSAndroid Build Coastguard Worker[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
64*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
65*a67afe4dSAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_LANG])dnl
66*a67afe4dSAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_OUTPUT])dnl
67*a67afe4dSAndroid Build Coastguard WorkerAC_BEFORE([$0], [LTDL_INIT])dnl
68*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CHECK_BUILDDIR])dnl
69*a67afe4dSAndroid Build Coastguard Worker
70*a67afe4dSAndroid Build Coastguard Workerdnl Autoconf doesn't catch unexpanded LT_ macros by default:
71*a67afe4dSAndroid Build Coastguard Workerm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
72*a67afe4dSAndroid Build Coastguard Workerm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
73*a67afe4dSAndroid Build Coastguard Workerdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
74*a67afe4dSAndroid Build Coastguard Workerdnl unless we require an AC_DEFUNed macro:
75*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LTOPTIONS_VERSION])dnl
76*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LTSUGAR_VERSION])dnl
77*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LTVERSION_VERSION])dnl
78*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LTOBSOLETE_VERSION])dnl
79*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_PROG_LTMAIN])dnl
80*a67afe4dSAndroid Build Coastguard Worker
81*a67afe4dSAndroid Build Coastguard Worker_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
82*a67afe4dSAndroid Build Coastguard Worker
83*a67afe4dSAndroid Build Coastguard Workerdnl Parse OPTIONS
84*a67afe4dSAndroid Build Coastguard Worker_LT_SET_OPTIONS([$0], [$1])
85*a67afe4dSAndroid Build Coastguard Worker
86*a67afe4dSAndroid Build Coastguard Worker# This can be used to rebuild libtool when needed
87*a67afe4dSAndroid Build Coastguard WorkerLIBTOOL_DEPS=$ltmain
88*a67afe4dSAndroid Build Coastguard Worker
89*a67afe4dSAndroid Build Coastguard Worker# Always use our own libtool.
90*a67afe4dSAndroid Build Coastguard WorkerLIBTOOL='$(SHELL) $(top_builddir)/libtool'
91*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL)dnl
92*a67afe4dSAndroid Build Coastguard Worker
93*a67afe4dSAndroid Build Coastguard Worker_LT_SETUP
94*a67afe4dSAndroid Build Coastguard Worker
95*a67afe4dSAndroid Build Coastguard Worker# Only expand once:
96*a67afe4dSAndroid Build Coastguard Workerm4_define([LT_INIT])
97*a67afe4dSAndroid Build Coastguard Worker])# LT_INIT
98*a67afe4dSAndroid Build Coastguard Worker
99*a67afe4dSAndroid Build Coastguard Worker# Old names:
100*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
101*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
102*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
103*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
104*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
105*a67afe4dSAndroid Build Coastguard Worker
106*a67afe4dSAndroid Build Coastguard Worker
107*a67afe4dSAndroid Build Coastguard Worker# _LT_PREPARE_CC_BASENAME
108*a67afe4dSAndroid Build Coastguard Worker# -----------------------
109*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_CC_BASENAME], [
110*a67afe4dSAndroid Build Coastguard Worker# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
111*a67afe4dSAndroid Build Coastguard Workerfunc_cc_basename ()
112*a67afe4dSAndroid Build Coastguard Worker{
113*a67afe4dSAndroid Build Coastguard Worker    for cc_temp in @S|@*""; do
114*a67afe4dSAndroid Build Coastguard Worker      case $cc_temp in
115*a67afe4dSAndroid Build Coastguard Worker        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116*a67afe4dSAndroid Build Coastguard Worker        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
117*a67afe4dSAndroid Build Coastguard Worker        \-*) ;;
118*a67afe4dSAndroid Build Coastguard Worker        *) break;;
119*a67afe4dSAndroid Build Coastguard Worker      esac
120*a67afe4dSAndroid Build Coastguard Worker    done
121*a67afe4dSAndroid Build Coastguard Worker    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
122*a67afe4dSAndroid Build Coastguard Worker}
123*a67afe4dSAndroid Build Coastguard Worker])# _LT_PREPARE_CC_BASENAME
124*a67afe4dSAndroid Build Coastguard Worker
125*a67afe4dSAndroid Build Coastguard Worker
126*a67afe4dSAndroid Build Coastguard Worker# _LT_CC_BASENAME(CC)
127*a67afe4dSAndroid Build Coastguard Worker# -------------------
128*a67afe4dSAndroid Build Coastguard Worker# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
129*a67afe4dSAndroid Build Coastguard Worker# but that macro is also expanded into generated libtool script, which
130*a67afe4dSAndroid Build Coastguard Worker# arranges for $SED and $ECHO to be set by different means.
131*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CC_BASENAME],
132*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_PREPARE_CC_BASENAME])dnl
133*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED])dnl
134*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
135*a67afe4dSAndroid Build Coastguard Workerfunc_cc_basename $1
136*a67afe4dSAndroid Build Coastguard Workercc_basename=$func_cc_basename_result
137*a67afe4dSAndroid Build Coastguard Worker])
138*a67afe4dSAndroid Build Coastguard Worker
139*a67afe4dSAndroid Build Coastguard Worker
140*a67afe4dSAndroid Build Coastguard Worker# _LT_FILEUTILS_DEFAULTS
141*a67afe4dSAndroid Build Coastguard Worker# ----------------------
142*a67afe4dSAndroid Build Coastguard Worker# It is okay to use these file commands and assume they have been set
143*a67afe4dSAndroid Build Coastguard Worker# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
144*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_FILEUTILS_DEFAULTS],
145*a67afe4dSAndroid Build Coastguard Worker[: ${CP="cp -f"}
146*a67afe4dSAndroid Build Coastguard Worker: ${MV="mv -f"}
147*a67afe4dSAndroid Build Coastguard Worker: ${RM="rm -f"}
148*a67afe4dSAndroid Build Coastguard Worker])# _LT_FILEUTILS_DEFAULTS
149*a67afe4dSAndroid Build Coastguard Worker
150*a67afe4dSAndroid Build Coastguard Worker
151*a67afe4dSAndroid Build Coastguard Worker# _LT_SETUP
152*a67afe4dSAndroid Build Coastguard Worker# ---------
153*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_SETUP],
154*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
155*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
156*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
157*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
158*a67afe4dSAndroid Build Coastguard Worker
159*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
160*a67afe4dSAndroid Build Coastguard Workerdnl
161*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [host_alias], [0], [The host system])dnl
162*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [host], [0])dnl
163*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [host_os], [0])dnl
164*a67afe4dSAndroid Build Coastguard Workerdnl
165*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [build_alias], [0], [The build system])dnl
166*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [build], [0])dnl
167*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [build_os], [0])dnl
168*a67afe4dSAndroid Build Coastguard Workerdnl
169*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl
170*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl
171*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
172*a67afe4dSAndroid Build Coastguard Workerdnl
173*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_LN_S])dnl
174*a67afe4dSAndroid Build Coastguard Workertest -z "$LN_S" && LN_S="ln -s"
175*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176*a67afe4dSAndroid Build Coastguard Workerdnl
177*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LT_CMD_MAX_LEN])dnl
178*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180*a67afe4dSAndroid Build Coastguard Workerdnl
181*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
182*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl
183*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
184*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CMD_RELOAD])dnl
185*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_FILECMD])dnl
186*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CHECK_MAGIC_METHOD])dnl
187*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
188*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CMD_OLD_ARCHIVE])dnl
189*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
190*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_WITH_SYSROOT])dnl
191*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CMD_TRUNCATE])dnl
192*a67afe4dSAndroid Build Coastguard Worker
193*a67afe4dSAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([
194*a67afe4dSAndroid Build Coastguard Worker# See if we are running on zsh, and set the options that allow our
195*a67afe4dSAndroid Build Coastguard Worker# commands through without removal of \ escapes INIT.
196*a67afe4dSAndroid Build Coastguard Workerif test -n "\${ZSH_VERSION+set}"; then
197*a67afe4dSAndroid Build Coastguard Worker   setopt NO_GLOB_SUBST
198*a67afe4dSAndroid Build Coastguard Workerfi
199*a67afe4dSAndroid Build Coastguard Worker])
200*a67afe4dSAndroid Build Coastguard Workerif test -n "${ZSH_VERSION+set}"; then
201*a67afe4dSAndroid Build Coastguard Worker   setopt NO_GLOB_SUBST
202*a67afe4dSAndroid Build Coastguard Workerfi
203*a67afe4dSAndroid Build Coastguard Worker
204*a67afe4dSAndroid Build Coastguard Worker_LT_CHECK_OBJDIR
205*a67afe4dSAndroid Build Coastguard Worker
206*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
207*a67afe4dSAndroid Build Coastguard Worker
208*a67afe4dSAndroid Build Coastguard Workercase $host_os in
209*a67afe4dSAndroid Build Coastguard Workeraix3*)
210*a67afe4dSAndroid Build Coastguard Worker  # AIX sometimes has problems with the GCC collect2 program.  For some
211*a67afe4dSAndroid Build Coastguard Worker  # reason, if we set the COLLECT_NAMES environment variable, the problems
212*a67afe4dSAndroid Build Coastguard Worker  # vanish in a puff of smoke.
213*a67afe4dSAndroid Build Coastguard Worker  if test set != "${COLLECT_NAMES+set}"; then
214*a67afe4dSAndroid Build Coastguard Worker    COLLECT_NAMES=
215*a67afe4dSAndroid Build Coastguard Worker    export COLLECT_NAMES
216*a67afe4dSAndroid Build Coastguard Worker  fi
217*a67afe4dSAndroid Build Coastguard Worker  ;;
218*a67afe4dSAndroid Build Coastguard Workeresac
219*a67afe4dSAndroid Build Coastguard Worker
220*a67afe4dSAndroid Build Coastguard Worker# Global variables:
221*a67afe4dSAndroid Build Coastguard Workerofile=libtool
222*a67afe4dSAndroid Build Coastguard Workercan_build_shared=yes
223*a67afe4dSAndroid Build Coastguard Worker
224*a67afe4dSAndroid Build Coastguard Worker# All known linkers require a '.a' archive for static linking (except MSVC and
225*a67afe4dSAndroid Build Coastguard Worker# ICC, which need '.lib').
226*a67afe4dSAndroid Build Coastguard Workerlibext=a
227*a67afe4dSAndroid Build Coastguard Worker
228*a67afe4dSAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld
229*a67afe4dSAndroid Build Coastguard Worker
230*a67afe4dSAndroid Build Coastguard Workerold_CC=$CC
231*a67afe4dSAndroid Build Coastguard Workerold_CFLAGS=$CFLAGS
232*a67afe4dSAndroid Build Coastguard Worker
233*a67afe4dSAndroid Build Coastguard Worker# Set sane defaults for various variables
234*a67afe4dSAndroid Build Coastguard Workertest -z "$CC" && CC=cc
235*a67afe4dSAndroid Build Coastguard Workertest -z "$LTCC" && LTCC=$CC
236*a67afe4dSAndroid Build Coastguard Workertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
237*a67afe4dSAndroid Build Coastguard Workertest -z "$LD" && LD=ld
238*a67afe4dSAndroid Build Coastguard Workertest -z "$ac_objext" && ac_objext=o
239*a67afe4dSAndroid Build Coastguard Worker
240*a67afe4dSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
241*a67afe4dSAndroid Build Coastguard Worker
242*a67afe4dSAndroid Build Coastguard Worker# Only perform the check for file, if the check method requires it
243*a67afe4dSAndroid Build Coastguard Workertest -z "$MAGIC_CMD" && MAGIC_CMD=file
244*a67afe4dSAndroid Build Coastguard Workercase $deplibs_check_method in
245*a67afe4dSAndroid Build Coastguard Workerfile_magic*)
246*a67afe4dSAndroid Build Coastguard Worker  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
247*a67afe4dSAndroid Build Coastguard Worker    _LT_PATH_MAGIC
248*a67afe4dSAndroid Build Coastguard Worker  fi
249*a67afe4dSAndroid Build Coastguard Worker  ;;
250*a67afe4dSAndroid Build Coastguard Workeresac
251*a67afe4dSAndroid Build Coastguard Worker
252*a67afe4dSAndroid Build Coastguard Worker# Use C for the default configuration in the libtool script
253*a67afe4dSAndroid Build Coastguard WorkerLT_SUPPORTED_TAG([CC])
254*a67afe4dSAndroid Build Coastguard Worker_LT_LANG_C_CONFIG
255*a67afe4dSAndroid Build Coastguard Worker_LT_LANG_DEFAULT_CONFIG
256*a67afe4dSAndroid Build Coastguard Worker_LT_CONFIG_COMMANDS
257*a67afe4dSAndroid Build Coastguard Worker])# _LT_SETUP
258*a67afe4dSAndroid Build Coastguard Worker
259*a67afe4dSAndroid Build Coastguard Worker
260*a67afe4dSAndroid Build Coastguard Worker# _LT_PREPARE_SED_QUOTE_VARS
261*a67afe4dSAndroid Build Coastguard Worker# --------------------------
262*a67afe4dSAndroid Build Coastguard Worker# Define a few sed substitution that help us do robust quoting.
263*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
264*a67afe4dSAndroid Build Coastguard Worker[# Backslashify metacharacters that are still active within
265*a67afe4dSAndroid Build Coastguard Worker# double-quoted strings.
266*a67afe4dSAndroid Build Coastguard Workersed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
267*a67afe4dSAndroid Build Coastguard Worker
268*a67afe4dSAndroid Build Coastguard Worker# Same as above, but do not quote variable references.
269*a67afe4dSAndroid Build Coastguard Workerdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
270*a67afe4dSAndroid Build Coastguard Worker
271*a67afe4dSAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped shell variable in a
272*a67afe4dSAndroid Build Coastguard Worker# double_quote_subst'ed string.
273*a67afe4dSAndroid Build Coastguard Workerdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
274*a67afe4dSAndroid Build Coastguard Worker
275*a67afe4dSAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped single quote.
276*a67afe4dSAndroid Build Coastguard Workerdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
277*a67afe4dSAndroid Build Coastguard Worker
278*a67afe4dSAndroid Build Coastguard Worker# Sed substitution to avoid accidental globbing in evaled expressions
279*a67afe4dSAndroid Build Coastguard Workerno_glob_subst='s/\*/\\\*/g'
280*a67afe4dSAndroid Build Coastguard Worker])
281*a67afe4dSAndroid Build Coastguard Worker
282*a67afe4dSAndroid Build Coastguard Worker# _LT_PROG_LTMAIN
283*a67afe4dSAndroid Build Coastguard Worker# ---------------
284*a67afe4dSAndroid Build Coastguard Worker# Note that this code is called both from 'configure', and 'config.status'
285*a67afe4dSAndroid Build Coastguard Worker# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
286*a67afe4dSAndroid Build Coastguard Worker# 'config.status' has no value for ac_aux_dir unless we are using Automake,
287*a67afe4dSAndroid Build Coastguard Worker# so we pass a copy along to make sure it has a sensible value anyway.
288*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PROG_LTMAIN],
289*a67afe4dSAndroid Build Coastguard Worker[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
290*a67afe4dSAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
291*a67afe4dSAndroid Build Coastguard Workerltmain=$ac_aux_dir/ltmain.sh
292*a67afe4dSAndroid Build Coastguard Worker])# _LT_PROG_LTMAIN
293*a67afe4dSAndroid Build Coastguard Worker
294*a67afe4dSAndroid Build Coastguard Worker
295*a67afe4dSAndroid Build Coastguard Worker## ------------------------------------- ##
296*a67afe4dSAndroid Build Coastguard Worker## Accumulate code for creating libtool. ##
297*a67afe4dSAndroid Build Coastguard Worker## ------------------------------------- ##
298*a67afe4dSAndroid Build Coastguard Worker
299*a67afe4dSAndroid Build Coastguard Worker# So that we can recreate a full libtool script including additional
300*a67afe4dSAndroid Build Coastguard Worker# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
301*a67afe4dSAndroid Build Coastguard Worker# in macros and then make a single call at the end using the 'libtool'
302*a67afe4dSAndroid Build Coastguard Worker# label.
303*a67afe4dSAndroid Build Coastguard Worker
304*a67afe4dSAndroid Build Coastguard Worker
305*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
306*a67afe4dSAndroid Build Coastguard Worker# ----------------------------------------
307*a67afe4dSAndroid Build Coastguard Worker# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL_INIT],
309*a67afe4dSAndroid Build Coastguard Worker[m4_ifval([$1],
310*a67afe4dSAndroid Build Coastguard Worker          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
311*a67afe4dSAndroid Build Coastguard Worker                     [$1
312*a67afe4dSAndroid Build Coastguard Worker])])])
313*a67afe4dSAndroid Build Coastguard Worker
314*a67afe4dSAndroid Build Coastguard Worker# Initialize.
315*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_INIT])
316*a67afe4dSAndroid Build Coastguard Worker
317*a67afe4dSAndroid Build Coastguard Worker
318*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL([COMMANDS])
319*a67afe4dSAndroid Build Coastguard Worker# ------------------------------
320*a67afe4dSAndroid Build Coastguard Worker# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
321*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL],
322*a67afe4dSAndroid Build Coastguard Worker[m4_ifval([$1],
323*a67afe4dSAndroid Build Coastguard Worker          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
324*a67afe4dSAndroid Build Coastguard Worker                     [$1
325*a67afe4dSAndroid Build Coastguard Worker])])])
326*a67afe4dSAndroid Build Coastguard Worker
327*a67afe4dSAndroid Build Coastguard Worker# Initialize.
328*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
329*a67afe4dSAndroid Build Coastguard Worker
330*a67afe4dSAndroid Build Coastguard Worker
331*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
332*a67afe4dSAndroid Build Coastguard Worker# -----------------------------------------------------
333*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_SAVE_COMMANDS],
334*a67afe4dSAndroid Build Coastguard Worker[_LT_CONFIG_LIBTOOL([$1])
335*a67afe4dSAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([$2])
336*a67afe4dSAndroid Build Coastguard Worker])
337*a67afe4dSAndroid Build Coastguard Worker
338*a67afe4dSAndroid Build Coastguard Worker
339*a67afe4dSAndroid Build Coastguard Worker# _LT_FORMAT_COMMENT([COMMENT])
340*a67afe4dSAndroid Build Coastguard Worker# -----------------------------
341*a67afe4dSAndroid Build Coastguard Worker# Add leading comment marks to the start of each line, and a trailing
342*a67afe4dSAndroid Build Coastguard Worker# full-stop to the whole comment if one is not present already.
343*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_FORMAT_COMMENT],
344*a67afe4dSAndroid Build Coastguard Worker[m4_ifval([$1], [
345*a67afe4dSAndroid Build Coastguard Workerm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
346*a67afe4dSAndroid Build Coastguard Worker              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
347*a67afe4dSAndroid Build Coastguard Worker)])
348*a67afe4dSAndroid Build Coastguard Worker
349*a67afe4dSAndroid Build Coastguard Worker
350*a67afe4dSAndroid Build Coastguard Worker
351*a67afe4dSAndroid Build Coastguard Worker## ------------------------ ##
352*a67afe4dSAndroid Build Coastguard Worker## FIXME: Eliminate VARNAME ##
353*a67afe4dSAndroid Build Coastguard Worker## ------------------------ ##
354*a67afe4dSAndroid Build Coastguard Worker
355*a67afe4dSAndroid Build Coastguard Worker
356*a67afe4dSAndroid Build Coastguard Worker# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
357*a67afe4dSAndroid Build Coastguard Worker# -------------------------------------------------------------------
358*a67afe4dSAndroid Build Coastguard Worker# CONFIGNAME is the name given to the value in the libtool script.
359*a67afe4dSAndroid Build Coastguard Worker# VARNAME is the (base) name used in the configure script.
360*a67afe4dSAndroid Build Coastguard Worker# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
361*a67afe4dSAndroid Build Coastguard Worker# VARNAME.  Any other value will be used directly.
362*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_DECL],
363*a67afe4dSAndroid Build Coastguard Worker[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
364*a67afe4dSAndroid Build Coastguard Worker    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
365*a67afe4dSAndroid Build Coastguard Worker	[m4_ifval([$1], [$1], [$2])])
366*a67afe4dSAndroid Build Coastguard Worker    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
367*a67afe4dSAndroid Build Coastguard Worker    m4_ifval([$4],
368*a67afe4dSAndroid Build Coastguard Worker	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
369*a67afe4dSAndroid Build Coastguard Worker    lt_dict_add_subkey([lt_decl_dict], [$2],
370*a67afe4dSAndroid Build Coastguard Worker	[tagged?], [m4_ifval([$5], [yes], [no])])])
371*a67afe4dSAndroid Build Coastguard Worker])
372*a67afe4dSAndroid Build Coastguard Worker
373*a67afe4dSAndroid Build Coastguard Worker
374*a67afe4dSAndroid Build Coastguard Worker# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
375*a67afe4dSAndroid Build Coastguard Worker# --------------------------------------------------------
376*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
377*a67afe4dSAndroid Build Coastguard Worker
378*a67afe4dSAndroid Build Coastguard Worker
379*a67afe4dSAndroid Build Coastguard Worker# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
380*a67afe4dSAndroid Build Coastguard Worker# ------------------------------------------------
381*a67afe4dSAndroid Build Coastguard Workerm4_define([lt_decl_tag_varnames],
382*a67afe4dSAndroid Build Coastguard Worker[_lt_decl_filter([tagged?], [yes], $@)])
383*a67afe4dSAndroid Build Coastguard Worker
384*a67afe4dSAndroid Build Coastguard Worker
385*a67afe4dSAndroid Build Coastguard Worker# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
386*a67afe4dSAndroid Build Coastguard Worker# ---------------------------------------------------------
387*a67afe4dSAndroid Build Coastguard Workerm4_define([_lt_decl_filter],
388*a67afe4dSAndroid Build Coastguard Worker[m4_case([$#],
389*a67afe4dSAndroid Build Coastguard Worker  [0], [m4_fatal([$0: too few arguments: $#])],
390*a67afe4dSAndroid Build Coastguard Worker  [1], [m4_fatal([$0: too few arguments: $#: $1])],
391*a67afe4dSAndroid Build Coastguard Worker  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
392*a67afe4dSAndroid Build Coastguard Worker  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
393*a67afe4dSAndroid Build Coastguard Worker  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
394*a67afe4dSAndroid Build Coastguard Worker])
395*a67afe4dSAndroid Build Coastguard Worker
396*a67afe4dSAndroid Build Coastguard Worker
397*a67afe4dSAndroid Build Coastguard Worker# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
398*a67afe4dSAndroid Build Coastguard Worker# --------------------------------------------------
399*a67afe4dSAndroid Build Coastguard Workerm4_define([lt_decl_quote_varnames],
400*a67afe4dSAndroid Build Coastguard Worker[_lt_decl_filter([value], [1], $@)])
401*a67afe4dSAndroid Build Coastguard Worker
402*a67afe4dSAndroid Build Coastguard Worker
403*a67afe4dSAndroid Build Coastguard Worker# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
404*a67afe4dSAndroid Build Coastguard Worker# ---------------------------------------------------
405*a67afe4dSAndroid Build Coastguard Workerm4_define([lt_decl_dquote_varnames],
406*a67afe4dSAndroid Build Coastguard Worker[_lt_decl_filter([value], [2], $@)])
407*a67afe4dSAndroid Build Coastguard Worker
408*a67afe4dSAndroid Build Coastguard Worker
409*a67afe4dSAndroid Build Coastguard Worker# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
410*a67afe4dSAndroid Build Coastguard Worker# ---------------------------------------------------
411*a67afe4dSAndroid Build Coastguard Workerm4_define([lt_decl_varnames_tagged],
412*a67afe4dSAndroid Build Coastguard Worker[m4_assert([$# <= 2])dnl
413*a67afe4dSAndroid Build Coastguard Worker_$0(m4_quote(m4_default([$1], [[, ]])),
414*a67afe4dSAndroid Build Coastguard Worker    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
415*a67afe4dSAndroid Build Coastguard Worker    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
416*a67afe4dSAndroid Build Coastguard Workerm4_define([_lt_decl_varnames_tagged],
417*a67afe4dSAndroid Build Coastguard Worker[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
418*a67afe4dSAndroid Build Coastguard Worker
419*a67afe4dSAndroid Build Coastguard Worker
420*a67afe4dSAndroid Build Coastguard Worker# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
421*a67afe4dSAndroid Build Coastguard Worker# ------------------------------------------------
422*a67afe4dSAndroid Build Coastguard Workerm4_define([lt_decl_all_varnames],
423*a67afe4dSAndroid Build Coastguard Worker[_$0(m4_quote(m4_default([$1], [[, ]])),
424*a67afe4dSAndroid Build Coastguard Worker     m4_if([$2], [],
425*a67afe4dSAndroid Build Coastguard Worker	   m4_quote(lt_decl_varnames),
426*a67afe4dSAndroid Build Coastguard Worker	m4_quote(m4_shift($@))))[]dnl
427*a67afe4dSAndroid Build Coastguard Worker])
428*a67afe4dSAndroid Build Coastguard Workerm4_define([_lt_decl_all_varnames],
429*a67afe4dSAndroid Build Coastguard Worker[lt_join($@, lt_decl_varnames_tagged([$1],
430*a67afe4dSAndroid Build Coastguard Worker			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
431*a67afe4dSAndroid Build Coastguard Worker])
432*a67afe4dSAndroid Build Coastguard Worker
433*a67afe4dSAndroid Build Coastguard Worker
434*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARE([VARNAME])
435*a67afe4dSAndroid Build Coastguard Worker# ------------------------------------
436*a67afe4dSAndroid Build Coastguard Worker# Quote a variable value, and forward it to 'config.status' so that its
437*a67afe4dSAndroid Build Coastguard Worker# declaration there will have the same value as in 'configure'.  VARNAME
438*a67afe4dSAndroid Build Coastguard Worker# must have a single quote delimited value for this to work.
439*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_CONFIG_STATUS_DECLARE],
440*a67afe4dSAndroid Build Coastguard Worker[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
441*a67afe4dSAndroid Build Coastguard Worker
442*a67afe4dSAndroid Build Coastguard Worker
443*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARATIONS
444*a67afe4dSAndroid Build Coastguard Worker# ------------------------------
445*a67afe4dSAndroid Build Coastguard Worker# We delimit libtool config variables with single quotes, so when
446*a67afe4dSAndroid Build Coastguard Worker# we write them to config.status, we have to be sure to quote all
447*a67afe4dSAndroid Build Coastguard Worker# embedded single quotes properly.  In configure, this macro expands
448*a67afe4dSAndroid Build Coastguard Worker# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
449*a67afe4dSAndroid Build Coastguard Worker#
450*a67afe4dSAndroid Build Coastguard Worker#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
451*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
452*a67afe4dSAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
453*a67afe4dSAndroid Build Coastguard Worker    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
454*a67afe4dSAndroid Build Coastguard Worker
455*a67afe4dSAndroid Build Coastguard Worker
456*a67afe4dSAndroid Build Coastguard Worker# _LT_LIBTOOL_TAGS
457*a67afe4dSAndroid Build Coastguard Worker# ----------------
458*a67afe4dSAndroid Build Coastguard Worker# Output comment and list of tags supported by the script
459*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_TAGS],
460*a67afe4dSAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
461*a67afe4dSAndroid Build Coastguard Workeravailable_tags='_LT_TAGS'dnl
462*a67afe4dSAndroid Build Coastguard Worker])
463*a67afe4dSAndroid Build Coastguard Worker
464*a67afe4dSAndroid Build Coastguard Worker
465*a67afe4dSAndroid Build Coastguard Worker# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
466*a67afe4dSAndroid Build Coastguard Worker# -----------------------------------
467*a67afe4dSAndroid Build Coastguard Worker# Extract the dictionary values for VARNAME (optionally with TAG) and
468*a67afe4dSAndroid Build Coastguard Worker# expand to a commented shell variable setting:
469*a67afe4dSAndroid Build Coastguard Worker#
470*a67afe4dSAndroid Build Coastguard Worker#    # Some comment about what VAR is for.
471*a67afe4dSAndroid Build Coastguard Worker#    visible_name=$lt_internal_name
472*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_DECLARE],
473*a67afe4dSAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
474*a67afe4dSAndroid Build Coastguard Worker					   [description])))[]dnl
475*a67afe4dSAndroid Build Coastguard Workerm4_pushdef([_libtool_name],
476*a67afe4dSAndroid Build Coastguard Worker    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
477*a67afe4dSAndroid Build Coastguard Workerm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
478*a67afe4dSAndroid Build Coastguard Worker    [0], [_libtool_name=[$]$1],
479*a67afe4dSAndroid Build Coastguard Worker    [1], [_libtool_name=$lt_[]$1],
480*a67afe4dSAndroid Build Coastguard Worker    [2], [_libtool_name=$lt_[]$1],
481*a67afe4dSAndroid Build Coastguard Worker    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
482*a67afe4dSAndroid Build Coastguard Workerm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
483*a67afe4dSAndroid Build Coastguard Worker])
484*a67afe4dSAndroid Build Coastguard Worker
485*a67afe4dSAndroid Build Coastguard Worker
486*a67afe4dSAndroid Build Coastguard Worker# _LT_LIBTOOL_CONFIG_VARS
487*a67afe4dSAndroid Build Coastguard Worker# -----------------------
488*a67afe4dSAndroid Build Coastguard Worker# Produce commented declarations of non-tagged libtool config variables
489*a67afe4dSAndroid Build Coastguard Worker# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
490*a67afe4dSAndroid Build Coastguard Worker# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
491*a67afe4dSAndroid Build Coastguard Worker# section) are produced by _LT_LIBTOOL_TAG_VARS.
492*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_CONFIG_VARS],
493*a67afe4dSAndroid Build Coastguard Worker[m4_foreach([_lt_var],
494*a67afe4dSAndroid Build Coastguard Worker    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
495*a67afe4dSAndroid Build Coastguard Worker    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
496*a67afe4dSAndroid Build Coastguard Worker
497*a67afe4dSAndroid Build Coastguard Worker
498*a67afe4dSAndroid Build Coastguard Worker# _LT_LIBTOOL_TAG_VARS(TAG)
499*a67afe4dSAndroid Build Coastguard Worker# -------------------------
500*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_TAG_VARS],
501*a67afe4dSAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
502*a67afe4dSAndroid Build Coastguard Worker    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
503*a67afe4dSAndroid Build Coastguard Worker
504*a67afe4dSAndroid Build Coastguard Worker
505*a67afe4dSAndroid Build Coastguard Worker# _LT_TAGVAR(VARNAME, [TAGNAME])
506*a67afe4dSAndroid Build Coastguard Worker# ------------------------------
507*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
508*a67afe4dSAndroid Build Coastguard Worker
509*a67afe4dSAndroid Build Coastguard Worker
510*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG_COMMANDS
511*a67afe4dSAndroid Build Coastguard Worker# -------------------
512*a67afe4dSAndroid Build Coastguard Worker# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
513*a67afe4dSAndroid Build Coastguard Worker# variables for single and double quote escaping we saved from calls
514*a67afe4dSAndroid Build Coastguard Worker# to _LT_DECL, we can put quote escaped variables declarations
515*a67afe4dSAndroid Build Coastguard Worker# into 'config.status', and then the shell code to quote escape them in
516*a67afe4dSAndroid Build Coastguard Worker# for loops in 'config.status'.  Finally, any additional code accumulated
517*a67afe4dSAndroid Build Coastguard Worker# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
518*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_COMMANDS],
519*a67afe4dSAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([LT_OUTPUT],
520*a67afe4dSAndroid Build Coastguard Worker	dnl If the libtool generation code has been placed in $CONFIG_LT,
521*a67afe4dSAndroid Build Coastguard Worker	dnl instead of duplicating it all over again into config.status,
522*a67afe4dSAndroid Build Coastguard Worker	dnl then we will have config.status run $CONFIG_LT later, so it
523*a67afe4dSAndroid Build Coastguard Worker	dnl needs to know what name is stored there:
524*a67afe4dSAndroid Build Coastguard Worker        [AC_CONFIG_COMMANDS([libtool],
525*a67afe4dSAndroid Build Coastguard Worker            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
526*a67afe4dSAndroid Build Coastguard Worker    dnl If the libtool generation code is destined for config.status,
527*a67afe4dSAndroid Build Coastguard Worker    dnl expand the accumulated commands and init code now:
528*a67afe4dSAndroid Build Coastguard Worker    [AC_CONFIG_COMMANDS([libtool],
529*a67afe4dSAndroid Build Coastguard Worker        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
530*a67afe4dSAndroid Build Coastguard Worker])#_LT_CONFIG_COMMANDS
531*a67afe4dSAndroid Build Coastguard Worker
532*a67afe4dSAndroid Build Coastguard Worker
533*a67afe4dSAndroid Build Coastguard Worker# Initialize.
534*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
535*a67afe4dSAndroid Build Coastguard Worker[
536*a67afe4dSAndroid Build Coastguard Worker
537*a67afe4dSAndroid Build Coastguard Worker# The HP-UX ksh and POSIX shell print the target directory to stdout
538*a67afe4dSAndroid Build Coastguard Worker# if CDPATH is set.
539*a67afe4dSAndroid Build Coastguard Worker(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
540*a67afe4dSAndroid Build Coastguard Worker
541*a67afe4dSAndroid Build Coastguard Workersed_quote_subst='$sed_quote_subst'
542*a67afe4dSAndroid Build Coastguard Workerdouble_quote_subst='$double_quote_subst'
543*a67afe4dSAndroid Build Coastguard Workerdelay_variable_subst='$delay_variable_subst'
544*a67afe4dSAndroid Build Coastguard Worker_LT_CONFIG_STATUS_DECLARATIONS
545*a67afe4dSAndroid Build Coastguard WorkerLTCC='$LTCC'
546*a67afe4dSAndroid Build Coastguard WorkerLTCFLAGS='$LTCFLAGS'
547*a67afe4dSAndroid Build Coastguard Workercompiler='$compiler_DEFAULT'
548*a67afe4dSAndroid Build Coastguard Worker
549*a67afe4dSAndroid Build Coastguard Worker# A function that is used when there is no print builtin or printf.
550*a67afe4dSAndroid Build Coastguard Workerfunc_fallback_echo ()
551*a67afe4dSAndroid Build Coastguard Worker{
552*a67afe4dSAndroid Build Coastguard Worker  eval 'cat <<_LTECHO_EOF
553*a67afe4dSAndroid Build Coastguard Worker\$[]1
554*a67afe4dSAndroid Build Coastguard Worker_LTECHO_EOF'
555*a67afe4dSAndroid Build Coastguard Worker}
556*a67afe4dSAndroid Build Coastguard Worker
557*a67afe4dSAndroid Build Coastguard Worker# Quote evaled strings.
558*a67afe4dSAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \
559*a67afe4dSAndroid Build Coastguard Worker]], lt_decl_quote_varnames); do
560*a67afe4dSAndroid Build Coastguard Worker    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561*a67afe4dSAndroid Build Coastguard Worker    *[[\\\\\\\`\\"\\\$]]*)
562*a67afe4dSAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563*a67afe4dSAndroid Build Coastguard Worker      ;;
564*a67afe4dSAndroid Build Coastguard Worker    *)
565*a67afe4dSAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566*a67afe4dSAndroid Build Coastguard Worker      ;;
567*a67afe4dSAndroid Build Coastguard Worker    esac
568*a67afe4dSAndroid Build Coastguard Workerdone
569*a67afe4dSAndroid Build Coastguard Worker
570*a67afe4dSAndroid Build Coastguard Worker# Double-quote double-evaled strings.
571*a67afe4dSAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \
572*a67afe4dSAndroid Build Coastguard Worker]], lt_decl_dquote_varnames); do
573*a67afe4dSAndroid Build Coastguard Worker    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
574*a67afe4dSAndroid Build Coastguard Worker    *[[\\\\\\\`\\"\\\$]]*)
575*a67afe4dSAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
576*a67afe4dSAndroid Build Coastguard Worker      ;;
577*a67afe4dSAndroid Build Coastguard Worker    *)
578*a67afe4dSAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
579*a67afe4dSAndroid Build Coastguard Worker      ;;
580*a67afe4dSAndroid Build Coastguard Worker    esac
581*a67afe4dSAndroid Build Coastguard Workerdone
582*a67afe4dSAndroid Build Coastguard Worker
583*a67afe4dSAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_INIT
584*a67afe4dSAndroid Build Coastguard Worker])
585*a67afe4dSAndroid Build Coastguard Worker
586*a67afe4dSAndroid Build Coastguard Worker# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
587*a67afe4dSAndroid Build Coastguard Worker# ------------------------------------
588*a67afe4dSAndroid Build Coastguard Worker# Generate a child script FILE with all initialization necessary to
589*a67afe4dSAndroid Build Coastguard Worker# reuse the environment learned by the parent script, and make the
590*a67afe4dSAndroid Build Coastguard Worker# file executable.  If COMMENT is supplied, it is inserted after the
591*a67afe4dSAndroid Build Coastguard Worker# '#!' sequence but before initialization text begins.  After this
592*a67afe4dSAndroid Build Coastguard Worker# macro, additional text can be appended to FILE to form the body of
593*a67afe4dSAndroid Build Coastguard Worker# the child script.  The macro ends with non-zero status if the
594*a67afe4dSAndroid Build Coastguard Worker# file could not be fully written (such as if the disk is full).
595*a67afe4dSAndroid Build Coastguard Workerm4_ifdef([AS_INIT_GENERATED],
596*a67afe4dSAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
597*a67afe4dSAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],
598*a67afe4dSAndroid Build Coastguard Worker[m4_require([AS_PREPARE])]dnl
599*a67afe4dSAndroid Build Coastguard Worker[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
600*a67afe4dSAndroid Build Coastguard Worker[lt_write_fail=0
601*a67afe4dSAndroid Build Coastguard Workercat >$1 <<_ASEOF || lt_write_fail=1
602*a67afe4dSAndroid Build Coastguard Worker#! $SHELL
603*a67afe4dSAndroid Build Coastguard Worker# Generated by $as_me.
604*a67afe4dSAndroid Build Coastguard Worker$2
605*a67afe4dSAndroid Build Coastguard WorkerSHELL=\${CONFIG_SHELL-$SHELL}
606*a67afe4dSAndroid Build Coastguard Workerexport SHELL
607*a67afe4dSAndroid Build Coastguard Worker_ASEOF
608*a67afe4dSAndroid Build Coastguard Workercat >>$1 <<\_ASEOF || lt_write_fail=1
609*a67afe4dSAndroid Build Coastguard WorkerAS_SHELL_SANITIZE
610*a67afe4dSAndroid Build Coastguard Worker_AS_PREPARE
611*a67afe4dSAndroid Build Coastguard Workerexec AS_MESSAGE_FD>&1
612*a67afe4dSAndroid Build Coastguard Worker_ASEOF
613*a67afe4dSAndroid Build Coastguard Workertest 0 = "$lt_write_fail" && chmod +x $1[]dnl
614*a67afe4dSAndroid Build Coastguard Workerm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
615*a67afe4dSAndroid Build Coastguard Worker
616*a67afe4dSAndroid Build Coastguard Worker# LT_OUTPUT
617*a67afe4dSAndroid Build Coastguard Worker# ---------
618*a67afe4dSAndroid Build Coastguard Worker# This macro allows early generation of the libtool script (before
619*a67afe4dSAndroid Build Coastguard Worker# AC_OUTPUT is called), incase it is used in configure for compilation
620*a67afe4dSAndroid Build Coastguard Worker# tests.
621*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_OUTPUT],
622*a67afe4dSAndroid Build Coastguard Worker[: ${CONFIG_LT=./config.lt}
623*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $CONFIG_LT])
624*a67afe4dSAndroid Build Coastguard Worker_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
625*a67afe4dSAndroid Build Coastguard Worker[# Run this file to recreate a libtool stub with the current configuration.])
626*a67afe4dSAndroid Build Coastguard Worker
627*a67afe4dSAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF
628*a67afe4dSAndroid Build Coastguard Workerlt_cl_silent=false
629*a67afe4dSAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log
630*a67afe4dSAndroid Build Coastguard Worker{
631*a67afe4dSAndroid Build Coastguard Worker  echo
632*a67afe4dSAndroid Build Coastguard Worker  AS_BOX([Running $as_me.])
633*a67afe4dSAndroid Build Coastguard Worker} >&AS_MESSAGE_LOG_FD
634*a67afe4dSAndroid Build Coastguard Worker
635*a67afe4dSAndroid Build Coastguard Workerlt_cl_help="\
636*a67afe4dSAndroid Build Coastguard Worker'$as_me' creates a local libtool stub from the current configuration,
637*a67afe4dSAndroid Build Coastguard Workerfor use in further configure time tests before the real libtool is
638*a67afe4dSAndroid Build Coastguard Workergenerated.
639*a67afe4dSAndroid Build Coastguard Worker
640*a67afe4dSAndroid Build Coastguard WorkerUsage: $[0] [[OPTIONS]]
641*a67afe4dSAndroid Build Coastguard Worker
642*a67afe4dSAndroid Build Coastguard Worker  -h, --help      print this help, then exit
643*a67afe4dSAndroid Build Coastguard Worker  -V, --version   print version number, then exit
644*a67afe4dSAndroid Build Coastguard Worker  -q, --quiet     do not print progress messages
645*a67afe4dSAndroid Build Coastguard Worker  -d, --debug     don't remove temporary files
646*a67afe4dSAndroid Build Coastguard Worker
647*a67afe4dSAndroid Build Coastguard WorkerReport bugs to <[email protected]>."
648*a67afe4dSAndroid Build Coastguard Worker
649*a67afe4dSAndroid Build Coastguard Workerlt_cl_version="\
650*a67afe4dSAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
651*a67afe4dSAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
652*a67afe4dSAndroid Build Coastguard Workerconfigured by $[0], generated by m4_PACKAGE_STRING.
653*a67afe4dSAndroid Build Coastguard Worker
654*a67afe4dSAndroid Build Coastguard WorkerCopyright (C) 2011 Free Software Foundation, Inc.
655*a67afe4dSAndroid Build Coastguard WorkerThis config.lt script is free software; the Free Software Foundation
656*a67afe4dSAndroid Build Coastguard Workergives unlimited permision to copy, distribute and modify it."
657*a67afe4dSAndroid Build Coastguard Worker
658*a67afe4dSAndroid Build Coastguard Workerwhile test 0 != $[#]
659*a67afe4dSAndroid Build Coastguard Workerdo
660*a67afe4dSAndroid Build Coastguard Worker  case $[1] in
661*a67afe4dSAndroid Build Coastguard Worker    --version | --v* | -V )
662*a67afe4dSAndroid Build Coastguard Worker      echo "$lt_cl_version"; exit 0 ;;
663*a67afe4dSAndroid Build Coastguard Worker    --help | --h* | -h )
664*a67afe4dSAndroid Build Coastguard Worker      echo "$lt_cl_help"; exit 0 ;;
665*a67afe4dSAndroid Build Coastguard Worker    --debug | --d* | -d )
666*a67afe4dSAndroid Build Coastguard Worker      debug=: ;;
667*a67afe4dSAndroid Build Coastguard Worker    --quiet | --q* | --silent | --s* | -q )
668*a67afe4dSAndroid Build Coastguard Worker      lt_cl_silent=: ;;
669*a67afe4dSAndroid Build Coastguard Worker
670*a67afe4dSAndroid Build Coastguard Worker    -*) AC_MSG_ERROR([unrecognized option: $[1]
671*a67afe4dSAndroid Build Coastguard WorkerTry '$[0] --help' for more information.]) ;;
672*a67afe4dSAndroid Build Coastguard Worker
673*a67afe4dSAndroid Build Coastguard Worker    *) AC_MSG_ERROR([unrecognized argument: $[1]
674*a67afe4dSAndroid Build Coastguard WorkerTry '$[0] --help' for more information.]) ;;
675*a67afe4dSAndroid Build Coastguard Worker  esac
676*a67afe4dSAndroid Build Coastguard Worker  shift
677*a67afe4dSAndroid Build Coastguard Workerdone
678*a67afe4dSAndroid Build Coastguard Worker
679*a67afe4dSAndroid Build Coastguard Workerif $lt_cl_silent; then
680*a67afe4dSAndroid Build Coastguard Worker  exec AS_MESSAGE_FD>/dev/null
681*a67afe4dSAndroid Build Coastguard Workerfi
682*a67afe4dSAndroid Build Coastguard Worker_LTEOF
683*a67afe4dSAndroid Build Coastguard Worker
684*a67afe4dSAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<_LTEOF
685*a67afe4dSAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
686*a67afe4dSAndroid Build Coastguard Worker_LTEOF
687*a67afe4dSAndroid Build Coastguard Worker
688*a67afe4dSAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF
689*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $ofile])
690*a67afe4dSAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS
691*a67afe4dSAndroid Build Coastguard WorkerAS_EXIT(0)
692*a67afe4dSAndroid Build Coastguard Worker_LTEOF
693*a67afe4dSAndroid Build Coastguard Workerchmod +x "$CONFIG_LT"
694*a67afe4dSAndroid Build Coastguard Worker
695*a67afe4dSAndroid Build Coastguard Worker# configure is writing to config.log, but config.lt does its own redirection,
696*a67afe4dSAndroid Build Coastguard Worker# appending to config.log, which fails on DOS, as config.log is still kept
697*a67afe4dSAndroid Build Coastguard Worker# open by configure.  Here we exec the FD to /dev/null, effectively closing
698*a67afe4dSAndroid Build Coastguard Worker# config.log, so it can be properly (re)opened and appended to by config.lt.
699*a67afe4dSAndroid Build Coastguard Workerlt_cl_success=:
700*a67afe4dSAndroid Build Coastguard Workertest yes = "$silent" &&
701*a67afe4dSAndroid Build Coastguard Worker  lt_config_lt_args="$lt_config_lt_args --quiet"
702*a67afe4dSAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>/dev/null
703*a67afe4dSAndroid Build Coastguard Worker$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704*a67afe4dSAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log
705*a67afe4dSAndroid Build Coastguard Worker$lt_cl_success || AS_EXIT(1)
706*a67afe4dSAndroid Build Coastguard Worker])# LT_OUTPUT
707*a67afe4dSAndroid Build Coastguard Worker
708*a67afe4dSAndroid Build Coastguard Worker
709*a67afe4dSAndroid Build Coastguard Worker# _LT_CONFIG(TAG)
710*a67afe4dSAndroid Build Coastguard Worker# ---------------
711*a67afe4dSAndroid Build Coastguard Worker# If TAG is the built-in tag, create an initial libtool script with a
712*a67afe4dSAndroid Build Coastguard Worker# default configuration from the untagged config vars.  Otherwise add code
713*a67afe4dSAndroid Build Coastguard Worker# to config.status for appending the configuration named by TAG from the
714*a67afe4dSAndroid Build Coastguard Worker# matching tagged config vars.
715*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG],
716*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
717*a67afe4dSAndroid Build Coastguard Worker_LT_CONFIG_SAVE_COMMANDS([
718*a67afe4dSAndroid Build Coastguard Worker  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
719*a67afe4dSAndroid Build Coastguard Worker  m4_if(_LT_TAG, [C], [
720*a67afe4dSAndroid Build Coastguard Worker    # See if we are running on zsh, and set the options that allow our
721*a67afe4dSAndroid Build Coastguard Worker    # commands through without removal of \ escapes.
722*a67afe4dSAndroid Build Coastguard Worker    if test -n "${ZSH_VERSION+set}"; then
723*a67afe4dSAndroid Build Coastguard Worker      setopt NO_GLOB_SUBST
724*a67afe4dSAndroid Build Coastguard Worker    fi
725*a67afe4dSAndroid Build Coastguard Worker
726*a67afe4dSAndroid Build Coastguard Worker    cfgfile=${ofile}T
727*a67afe4dSAndroid Build Coastguard Worker    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
728*a67afe4dSAndroid Build Coastguard Worker    $RM "$cfgfile"
729*a67afe4dSAndroid Build Coastguard Worker
730*a67afe4dSAndroid Build Coastguard Worker    cat <<_LT_EOF >> "$cfgfile"
731*a67afe4dSAndroid Build Coastguard Worker#! $SHELL
732*a67afe4dSAndroid Build Coastguard Worker# Generated automatically by $as_me ($PACKAGE) $VERSION
733*a67afe4dSAndroid Build Coastguard Worker# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
734*a67afe4dSAndroid Build Coastguard Worker# NOTE: Changes made to this file will be lost: look at ltmain.sh.
735*a67afe4dSAndroid Build Coastguard Worker
736*a67afe4dSAndroid Build Coastguard Worker# Provide generalized library-building support services.
737*a67afe4dSAndroid Build Coastguard Worker# Written by Gordon Matzigkeit, 1996
738*a67afe4dSAndroid Build Coastguard Worker
739*a67afe4dSAndroid Build Coastguard Worker_LT_COPYING
740*a67afe4dSAndroid Build Coastguard Worker_LT_LIBTOOL_TAGS
741*a67afe4dSAndroid Build Coastguard Worker
742*a67afe4dSAndroid Build Coastguard Worker# Configured defaults for sys_lib_dlsearch_path munging.
743*a67afe4dSAndroid Build Coastguard Worker: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
744*a67afe4dSAndroid Build Coastguard Worker
745*a67afe4dSAndroid Build Coastguard Worker# ### BEGIN LIBTOOL CONFIG
746*a67afe4dSAndroid Build Coastguard Worker_LT_LIBTOOL_CONFIG_VARS
747*a67afe4dSAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS
748*a67afe4dSAndroid Build Coastguard Worker# ### END LIBTOOL CONFIG
749*a67afe4dSAndroid Build Coastguard Worker
750*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
751*a67afe4dSAndroid Build Coastguard Worker
752*a67afe4dSAndroid Build Coastguard Worker    cat <<'_LT_EOF' >> "$cfgfile"
753*a67afe4dSAndroid Build Coastguard Worker
754*a67afe4dSAndroid Build Coastguard Worker# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
755*a67afe4dSAndroid Build Coastguard Worker
756*a67afe4dSAndroid Build Coastguard Worker_LT_PREPARE_MUNGE_PATH_LIST
757*a67afe4dSAndroid Build Coastguard Worker_LT_PREPARE_CC_BASENAME
758*a67afe4dSAndroid Build Coastguard Worker
759*a67afe4dSAndroid Build Coastguard Worker# ### END FUNCTIONS SHARED WITH CONFIGURE
760*a67afe4dSAndroid Build Coastguard Worker
761*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
762*a67afe4dSAndroid Build Coastguard Worker
763*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
764*a67afe4dSAndroid Build Coastguard Worker  aix3*)
765*a67afe4dSAndroid Build Coastguard Worker    cat <<\_LT_EOF >> "$cfgfile"
766*a67afe4dSAndroid Build Coastguard Worker# AIX sometimes has problems with the GCC collect2 program.  For some
767*a67afe4dSAndroid Build Coastguard Worker# reason, if we set the COLLECT_NAMES environment variable, the problems
768*a67afe4dSAndroid Build Coastguard Worker# vanish in a puff of smoke.
769*a67afe4dSAndroid Build Coastguard Workerif test set != "${COLLECT_NAMES+set}"; then
770*a67afe4dSAndroid Build Coastguard Worker  COLLECT_NAMES=
771*a67afe4dSAndroid Build Coastguard Worker  export COLLECT_NAMES
772*a67afe4dSAndroid Build Coastguard Workerfi
773*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
774*a67afe4dSAndroid Build Coastguard Worker    ;;
775*a67afe4dSAndroid Build Coastguard Worker  esac
776*a67afe4dSAndroid Build Coastguard Worker
777*a67afe4dSAndroid Build Coastguard Worker  _LT_PROG_LTMAIN
778*a67afe4dSAndroid Build Coastguard Worker
779*a67afe4dSAndroid Build Coastguard Worker  # We use sed instead of cat because bash on DJGPP gets confused if
780*a67afe4dSAndroid Build Coastguard Worker  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
781*a67afe4dSAndroid Build Coastguard Worker  # text mode, it properly converts lines to CR/LF.  This bash problem
782*a67afe4dSAndroid Build Coastguard Worker  # is reportedly fixed, but why not run on old versions too?
783*a67afe4dSAndroid Build Coastguard Worker  $SED '$q' "$ltmain" >> "$cfgfile" \
784*a67afe4dSAndroid Build Coastguard Worker     || (rm -f "$cfgfile"; exit 1)
785*a67afe4dSAndroid Build Coastguard Worker
786*a67afe4dSAndroid Build Coastguard Worker   mv -f "$cfgfile" "$ofile" ||
787*a67afe4dSAndroid Build Coastguard Worker    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
788*a67afe4dSAndroid Build Coastguard Worker  chmod +x "$ofile"
789*a67afe4dSAndroid Build Coastguard Worker],
790*a67afe4dSAndroid Build Coastguard Worker[cat <<_LT_EOF >> "$ofile"
791*a67afe4dSAndroid Build Coastguard Worker
792*a67afe4dSAndroid Build Coastguard Workerdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
793*a67afe4dSAndroid Build Coastguard Workerdnl in a comment (ie after a #).
794*a67afe4dSAndroid Build Coastguard Worker# ### BEGIN LIBTOOL TAG CONFIG: $1
795*a67afe4dSAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS(_LT_TAG)
796*a67afe4dSAndroid Build Coastguard Worker# ### END LIBTOOL TAG CONFIG: $1
797*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
798*a67afe4dSAndroid Build Coastguard Worker])dnl /m4_if
799*a67afe4dSAndroid Build Coastguard Worker],
800*a67afe4dSAndroid Build Coastguard Worker[m4_if([$1], [], [
801*a67afe4dSAndroid Build Coastguard Worker    PACKAGE='$PACKAGE'
802*a67afe4dSAndroid Build Coastguard Worker    VERSION='$VERSION'
803*a67afe4dSAndroid Build Coastguard Worker    RM='$RM'
804*a67afe4dSAndroid Build Coastguard Worker    ofile='$ofile'], [])
805*a67afe4dSAndroid Build Coastguard Worker])dnl /_LT_CONFIG_SAVE_COMMANDS
806*a67afe4dSAndroid Build Coastguard Worker])# _LT_CONFIG
807*a67afe4dSAndroid Build Coastguard Worker
808*a67afe4dSAndroid Build Coastguard Worker
809*a67afe4dSAndroid Build Coastguard Worker# LT_SUPPORTED_TAG(TAG)
810*a67afe4dSAndroid Build Coastguard Worker# ---------------------
811*a67afe4dSAndroid Build Coastguard Worker# Trace this macro to discover what tags are supported by the libtool
812*a67afe4dSAndroid Build Coastguard Worker# --tag option, using:
813*a67afe4dSAndroid Build Coastguard Worker#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
814*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_SUPPORTED_TAG], [])
815*a67afe4dSAndroid Build Coastguard Worker
816*a67afe4dSAndroid Build Coastguard Worker
817*a67afe4dSAndroid Build Coastguard Worker# C support is built-in for now
818*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_LANG_C_enabled], [])
819*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_TAGS], [])
820*a67afe4dSAndroid Build Coastguard Worker
821*a67afe4dSAndroid Build Coastguard Worker
822*a67afe4dSAndroid Build Coastguard Worker# LT_LANG(LANG)
823*a67afe4dSAndroid Build Coastguard Worker# -------------
824*a67afe4dSAndroid Build Coastguard Worker# Enable libtool support for the given language if not already enabled.
825*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_LANG],
826*a67afe4dSAndroid Build Coastguard Worker[AC_BEFORE([$0], [LT_OUTPUT])dnl
827*a67afe4dSAndroid Build Coastguard Workerm4_case([$1],
828*a67afe4dSAndroid Build Coastguard Worker  [C],			[_LT_LANG(C)],
829*a67afe4dSAndroid Build Coastguard Worker  [C++],		[_LT_LANG(CXX)],
830*a67afe4dSAndroid Build Coastguard Worker  [Go],			[_LT_LANG(GO)],
831*a67afe4dSAndroid Build Coastguard Worker  [Java],		[_LT_LANG(GCJ)],
832*a67afe4dSAndroid Build Coastguard Worker  [Fortran 77],		[_LT_LANG(F77)],
833*a67afe4dSAndroid Build Coastguard Worker  [Fortran],		[_LT_LANG(FC)],
834*a67afe4dSAndroid Build Coastguard Worker  [Windows Resource],	[_LT_LANG(RC)],
835*a67afe4dSAndroid Build Coastguard Worker  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
836*a67afe4dSAndroid Build Coastguard Worker    [_LT_LANG($1)],
837*a67afe4dSAndroid Build Coastguard Worker    [m4_fatal([$0: unsupported language: "$1"])])])dnl
838*a67afe4dSAndroid Build Coastguard Worker])# LT_LANG
839*a67afe4dSAndroid Build Coastguard Worker
840*a67afe4dSAndroid Build Coastguard Worker
841*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG(LANGNAME)
842*a67afe4dSAndroid Build Coastguard Worker# ------------------
843*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG],
844*a67afe4dSAndroid Build Coastguard Worker[m4_ifdef([_LT_LANG_]$1[_enabled], [],
845*a67afe4dSAndroid Build Coastguard Worker  [LT_SUPPORTED_TAG([$1])dnl
846*a67afe4dSAndroid Build Coastguard Worker  m4_append([_LT_TAGS], [$1 ])dnl
847*a67afe4dSAndroid Build Coastguard Worker  m4_define([_LT_LANG_]$1[_enabled], [])dnl
848*a67afe4dSAndroid Build Coastguard Worker  _LT_LANG_$1_CONFIG($1)])dnl
849*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG
850*a67afe4dSAndroid Build Coastguard Worker
851*a67afe4dSAndroid Build Coastguard Worker
852*a67afe4dSAndroid Build Coastguard Workerm4_ifndef([AC_PROG_GO], [
853*a67afe4dSAndroid Build Coastguard Worker############################################################
854*a67afe4dSAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into   #
855*a67afe4dSAndroid Build Coastguard Worker#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
856*a67afe4dSAndroid Build Coastguard Worker#  a released version of Autoconf we should remove this    #
857*a67afe4dSAndroid Build Coastguard Worker#  macro and use it instead.                               #
858*a67afe4dSAndroid Build Coastguard Worker############################################################
859*a67afe4dSAndroid Build Coastguard Workerm4_defun([AC_PROG_GO],
860*a67afe4dSAndroid Build Coastguard Worker[AC_LANG_PUSH(Go)dnl
861*a67afe4dSAndroid Build Coastguard WorkerAC_ARG_VAR([GOC],     [Go compiler command])dnl
862*a67afe4dSAndroid Build Coastguard WorkerAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
863*a67afe4dSAndroid Build Coastguard Worker_AC_ARG_VAR_LDFLAGS()dnl
864*a67afe4dSAndroid Build Coastguard WorkerAC_CHECK_TOOL(GOC, gccgo)
865*a67afe4dSAndroid Build Coastguard Workerif test -z "$GOC"; then
866*a67afe4dSAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
867*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
868*a67afe4dSAndroid Build Coastguard Worker  fi
869*a67afe4dSAndroid Build Coastguard Workerfi
870*a67afe4dSAndroid Build Coastguard Workerif test -z "$GOC"; then
871*a67afe4dSAndroid Build Coastguard Worker  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
872*a67afe4dSAndroid Build Coastguard Workerfi
873*a67afe4dSAndroid Build Coastguard Worker])#m4_defun
874*a67afe4dSAndroid Build Coastguard Worker])#m4_ifndef
875*a67afe4dSAndroid Build Coastguard Worker
876*a67afe4dSAndroid Build Coastguard Worker
877*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_DEFAULT_CONFIG
878*a67afe4dSAndroid Build Coastguard Worker# -----------------------
879*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_DEFAULT_CONFIG],
880*a67afe4dSAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([AC_PROG_CXX],
881*a67afe4dSAndroid Build Coastguard Worker  [LT_LANG(CXX)],
882*a67afe4dSAndroid Build Coastguard Worker  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
883*a67afe4dSAndroid Build Coastguard Worker
884*a67afe4dSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_F77],
885*a67afe4dSAndroid Build Coastguard Worker  [LT_LANG(F77)],
886*a67afe4dSAndroid Build Coastguard Worker  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
887*a67afe4dSAndroid Build Coastguard Worker
888*a67afe4dSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_FC],
889*a67afe4dSAndroid Build Coastguard Worker  [LT_LANG(FC)],
890*a67afe4dSAndroid Build Coastguard Worker  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
891*a67afe4dSAndroid Build Coastguard Worker
892*a67afe4dSAndroid Build Coastguard Workerdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
893*a67afe4dSAndroid Build Coastguard Workerdnl pulling things in needlessly.
894*a67afe4dSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GCJ],
895*a67afe4dSAndroid Build Coastguard Worker  [LT_LANG(GCJ)],
896*a67afe4dSAndroid Build Coastguard Worker  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
897*a67afe4dSAndroid Build Coastguard Worker    [LT_LANG(GCJ)],
898*a67afe4dSAndroid Build Coastguard Worker    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
899*a67afe4dSAndroid Build Coastguard Worker      [LT_LANG(GCJ)],
900*a67afe4dSAndroid Build Coastguard Worker      [m4_ifdef([AC_PROG_GCJ],
901*a67afe4dSAndroid Build Coastguard Worker	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
902*a67afe4dSAndroid Build Coastguard Worker       m4_ifdef([A][M_PROG_GCJ],
903*a67afe4dSAndroid Build Coastguard Worker	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
904*a67afe4dSAndroid Build Coastguard Worker       m4_ifdef([LT_PROG_GCJ],
905*a67afe4dSAndroid Build Coastguard Worker	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
906*a67afe4dSAndroid Build Coastguard Worker
907*a67afe4dSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GO],
908*a67afe4dSAndroid Build Coastguard Worker  [LT_LANG(GO)],
909*a67afe4dSAndroid Build Coastguard Worker  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
910*a67afe4dSAndroid Build Coastguard Worker
911*a67afe4dSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([LT_PROG_RC],
912*a67afe4dSAndroid Build Coastguard Worker  [LT_LANG(RC)],
913*a67afe4dSAndroid Build Coastguard Worker  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
914*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_DEFAULT_CONFIG
915*a67afe4dSAndroid Build Coastguard Worker
916*a67afe4dSAndroid Build Coastguard Worker# Obsolete macros:
917*a67afe4dSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
918*a67afe4dSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
919*a67afe4dSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
920*a67afe4dSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
921*a67afe4dSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
922*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
923*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
924*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_F77], [])
925*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_FC], [])
926*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
927*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_RC], [])
928*a67afe4dSAndroid Build Coastguard Worker
929*a67afe4dSAndroid Build Coastguard Worker
930*a67afe4dSAndroid Build Coastguard Worker# _LT_TAG_COMPILER
931*a67afe4dSAndroid Build Coastguard Worker# ----------------
932*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_TAG_COMPILER],
933*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
934*a67afe4dSAndroid Build Coastguard Worker
935*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
936*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
937*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
938*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
939*a67afe4dSAndroid Build Coastguard Worker
940*a67afe4dSAndroid Build Coastguard Worker# If no C compiler was specified, use CC.
941*a67afe4dSAndroid Build Coastguard WorkerLTCC=${LTCC-"$CC"}
942*a67afe4dSAndroid Build Coastguard Worker
943*a67afe4dSAndroid Build Coastguard Worker# If no C compiler flags were specified, use CFLAGS.
944*a67afe4dSAndroid Build Coastguard WorkerLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
945*a67afe4dSAndroid Build Coastguard Worker
946*a67afe4dSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
947*a67afe4dSAndroid Build Coastguard Workercompiler=$CC
948*a67afe4dSAndroid Build Coastguard Worker])# _LT_TAG_COMPILER
949*a67afe4dSAndroid Build Coastguard Worker
950*a67afe4dSAndroid Build Coastguard Worker
951*a67afe4dSAndroid Build Coastguard Worker# _LT_COMPILER_BOILERPLATE
952*a67afe4dSAndroid Build Coastguard Worker# ------------------------
953*a67afe4dSAndroid Build Coastguard Worker# Check for compiler boilerplate output or warnings with
954*a67afe4dSAndroid Build Coastguard Worker# the simple compiler test code.
955*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_BOILERPLATE],
956*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
957*a67afe4dSAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext
958*a67afe4dSAndroid Build Coastguard Workerecho "$lt_simple_compile_test_code" >conftest.$ac_ext
959*a67afe4dSAndroid Build Coastguard Workereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
960*a67afe4dSAndroid Build Coastguard Worker_lt_compiler_boilerplate=`cat conftest.err`
961*a67afe4dSAndroid Build Coastguard Worker$RM conftest*
962*a67afe4dSAndroid Build Coastguard Worker])# _LT_COMPILER_BOILERPLATE
963*a67afe4dSAndroid Build Coastguard Worker
964*a67afe4dSAndroid Build Coastguard Worker
965*a67afe4dSAndroid Build Coastguard Worker# _LT_LINKER_BOILERPLATE
966*a67afe4dSAndroid Build Coastguard Worker# ----------------------
967*a67afe4dSAndroid Build Coastguard Worker# Check for linker boilerplate output or warnings with
968*a67afe4dSAndroid Build Coastguard Worker# the simple link test code.
969*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LINKER_BOILERPLATE],
970*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
971*a67afe4dSAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext
972*a67afe4dSAndroid Build Coastguard Workerecho "$lt_simple_link_test_code" >conftest.$ac_ext
973*a67afe4dSAndroid Build Coastguard Workereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
974*a67afe4dSAndroid Build Coastguard Worker_lt_linker_boilerplate=`cat conftest.err`
975*a67afe4dSAndroid Build Coastguard Worker$RM -r conftest*
976*a67afe4dSAndroid Build Coastguard Worker])# _LT_LINKER_BOILERPLATE
977*a67afe4dSAndroid Build Coastguard Worker
978*a67afe4dSAndroid Build Coastguard Worker# _LT_REQUIRED_DARWIN_CHECKS
979*a67afe4dSAndroid Build Coastguard Worker# -------------------------
980*a67afe4dSAndroid Build Coastguard Workerm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
981*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
982*a67afe4dSAndroid Build Coastguard Worker    rhapsody* | darwin*)
983*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
984*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
985*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_TOOL([LIPO], [lipo], [:])
986*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_TOOL([OTOOL], [otool], [:])
987*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
988*a67afe4dSAndroid Build Coastguard Worker    _LT_DECL([], [DSYMUTIL], [1],
989*a67afe4dSAndroid Build Coastguard Worker      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
990*a67afe4dSAndroid Build Coastguard Worker    _LT_DECL([], [NMEDIT], [1],
991*a67afe4dSAndroid Build Coastguard Worker      [Tool to change global to local symbols on Mac OS X])
992*a67afe4dSAndroid Build Coastguard Worker    _LT_DECL([], [LIPO], [1],
993*a67afe4dSAndroid Build Coastguard Worker      [Tool to manipulate fat objects and archives on Mac OS X])
994*a67afe4dSAndroid Build Coastguard Worker    _LT_DECL([], [OTOOL], [1],
995*a67afe4dSAndroid Build Coastguard Worker      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
996*a67afe4dSAndroid Build Coastguard Worker    _LT_DECL([], [OTOOL64], [1],
997*a67afe4dSAndroid Build Coastguard Worker      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
998*a67afe4dSAndroid Build Coastguard Worker
999*a67afe4dSAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1000*a67afe4dSAndroid Build Coastguard Worker      [lt_cv_apple_cc_single_mod=no
1001*a67afe4dSAndroid Build Coastguard Worker      if test -z "$LT_MULTI_MODULE"; then
1002*a67afe4dSAndroid Build Coastguard Worker	# By default we will add the -single_module flag. You can override
1003*a67afe4dSAndroid Build Coastguard Worker	# by either setting the environment variable LT_MULTI_MODULE
1004*a67afe4dSAndroid Build Coastguard Worker	# non-empty at configure time, or by adding -multi_module to the
1005*a67afe4dSAndroid Build Coastguard Worker	# link flags.
1006*a67afe4dSAndroid Build Coastguard Worker	rm -rf libconftest.dylib*
1007*a67afe4dSAndroid Build Coastguard Worker	echo "int foo(void){return 1;}" > conftest.c
1008*a67afe4dSAndroid Build Coastguard Worker	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009*a67afe4dSAndroid Build Coastguard Worker-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1010*a67afe4dSAndroid Build Coastguard Worker	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1011*a67afe4dSAndroid Build Coastguard Worker	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1012*a67afe4dSAndroid Build Coastguard Worker        _lt_result=$?
1013*a67afe4dSAndroid Build Coastguard Worker	# If there is a non-empty error log, and "single_module"
1014*a67afe4dSAndroid Build Coastguard Worker	# appears in it, assume the flag caused a linker warning
1015*a67afe4dSAndroid Build Coastguard Worker        if test -s conftest.err && $GREP single_module conftest.err; then
1016*a67afe4dSAndroid Build Coastguard Worker	  cat conftest.err >&AS_MESSAGE_LOG_FD
1017*a67afe4dSAndroid Build Coastguard Worker	# Otherwise, if the output was created with a 0 exit code from
1018*a67afe4dSAndroid Build Coastguard Worker	# the compiler, it worked.
1019*a67afe4dSAndroid Build Coastguard Worker	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1020*a67afe4dSAndroid Build Coastguard Worker	  lt_cv_apple_cc_single_mod=yes
1021*a67afe4dSAndroid Build Coastguard Worker	else
1022*a67afe4dSAndroid Build Coastguard Worker	  cat conftest.err >&AS_MESSAGE_LOG_FD
1023*a67afe4dSAndroid Build Coastguard Worker	fi
1024*a67afe4dSAndroid Build Coastguard Worker	rm -rf libconftest.dylib*
1025*a67afe4dSAndroid Build Coastguard Worker	rm -f conftest.*
1026*a67afe4dSAndroid Build Coastguard Worker      fi])
1027*a67afe4dSAndroid Build Coastguard Worker
1028*a67afe4dSAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1029*a67afe4dSAndroid Build Coastguard Worker      [lt_cv_ld_exported_symbols_list],
1030*a67afe4dSAndroid Build Coastguard Worker      [lt_cv_ld_exported_symbols_list=no
1031*a67afe4dSAndroid Build Coastguard Worker      save_LDFLAGS=$LDFLAGS
1032*a67afe4dSAndroid Build Coastguard Worker      echo "_main" > conftest.sym
1033*a67afe4dSAndroid Build Coastguard Worker      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1034*a67afe4dSAndroid Build Coastguard Worker      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1035*a67afe4dSAndroid Build Coastguard Worker	[lt_cv_ld_exported_symbols_list=yes],
1036*a67afe4dSAndroid Build Coastguard Worker	[lt_cv_ld_exported_symbols_list=no])
1037*a67afe4dSAndroid Build Coastguard Worker	LDFLAGS=$save_LDFLAGS
1038*a67afe4dSAndroid Build Coastguard Worker    ])
1039*a67afe4dSAndroid Build Coastguard Worker
1040*a67afe4dSAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1041*a67afe4dSAndroid Build Coastguard Worker      [lt_cv_ld_force_load=no
1042*a67afe4dSAndroid Build Coastguard Worker      cat > conftest.c << _LT_EOF
1043*a67afe4dSAndroid Build Coastguard Workerint forced_loaded() { return 2;}
1044*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
1045*a67afe4dSAndroid Build Coastguard Worker      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1046*a67afe4dSAndroid Build Coastguard Worker      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1047*a67afe4dSAndroid Build Coastguard Worker      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1048*a67afe4dSAndroid Build Coastguard Worker      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1049*a67afe4dSAndroid Build Coastguard Worker      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1050*a67afe4dSAndroid Build Coastguard Worker      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1051*a67afe4dSAndroid Build Coastguard Worker      cat > conftest.c << _LT_EOF
1052*a67afe4dSAndroid Build Coastguard Workerint main() { return 0;}
1053*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
1054*a67afe4dSAndroid Build Coastguard Worker      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1055*a67afe4dSAndroid Build Coastguard Worker      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1056*a67afe4dSAndroid Build Coastguard Worker      _lt_result=$?
1057*a67afe4dSAndroid Build Coastguard Worker      if test -s conftest.err && $GREP force_load conftest.err; then
1058*a67afe4dSAndroid Build Coastguard Worker	cat conftest.err >&AS_MESSAGE_LOG_FD
1059*a67afe4dSAndroid Build Coastguard Worker      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1060*a67afe4dSAndroid Build Coastguard Worker	lt_cv_ld_force_load=yes
1061*a67afe4dSAndroid Build Coastguard Worker      else
1062*a67afe4dSAndroid Build Coastguard Worker	cat conftest.err >&AS_MESSAGE_LOG_FD
1063*a67afe4dSAndroid Build Coastguard Worker      fi
1064*a67afe4dSAndroid Build Coastguard Worker        rm -f conftest.err libconftest.a conftest conftest.c
1065*a67afe4dSAndroid Build Coastguard Worker        rm -rf conftest.dSYM
1066*a67afe4dSAndroid Build Coastguard Worker    ])
1067*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
1068*a67afe4dSAndroid Build Coastguard Worker    rhapsody* | darwin1.[[012]])
1069*a67afe4dSAndroid Build Coastguard Worker      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1070*a67afe4dSAndroid Build Coastguard Worker    darwin1.*)
1071*a67afe4dSAndroid Build Coastguard Worker      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1072*a67afe4dSAndroid Build Coastguard Worker    darwin*)
1073*a67afe4dSAndroid Build Coastguard Worker      case $MACOSX_DEPLOYMENT_TARGET,$host in
1074*a67afe4dSAndroid Build Coastguard Worker        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1075*a67afe4dSAndroid Build Coastguard Worker          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1076*a67afe4dSAndroid Build Coastguard Worker        *)
1077*a67afe4dSAndroid Build Coastguard Worker          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1078*a67afe4dSAndroid Build Coastguard Worker      esac
1079*a67afe4dSAndroid Build Coastguard Worker    ;;
1080*a67afe4dSAndroid Build Coastguard Worker  esac
1081*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$lt_cv_apple_cc_single_mod"; then
1082*a67afe4dSAndroid Build Coastguard Worker      _lt_dar_single_mod='$single_module'
1083*a67afe4dSAndroid Build Coastguard Worker    fi
1084*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1085*a67afe4dSAndroid Build Coastguard Worker      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1086*a67afe4dSAndroid Build Coastguard Worker    else
1087*a67afe4dSAndroid Build Coastguard Worker      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1088*a67afe4dSAndroid Build Coastguard Worker    fi
1089*a67afe4dSAndroid Build Coastguard Worker    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1090*a67afe4dSAndroid Build Coastguard Worker      _lt_dsymutil='~$DSYMUTIL $lib || :'
1091*a67afe4dSAndroid Build Coastguard Worker    else
1092*a67afe4dSAndroid Build Coastguard Worker      _lt_dsymutil=
1093*a67afe4dSAndroid Build Coastguard Worker    fi
1094*a67afe4dSAndroid Build Coastguard Worker    ;;
1095*a67afe4dSAndroid Build Coastguard Worker  esac
1096*a67afe4dSAndroid Build Coastguard Worker])
1097*a67afe4dSAndroid Build Coastguard Worker
1098*a67afe4dSAndroid Build Coastguard Worker
1099*a67afe4dSAndroid Build Coastguard Worker# _LT_DARWIN_LINKER_FEATURES([TAG])
1100*a67afe4dSAndroid Build Coastguard Worker# ---------------------------------
1101*a67afe4dSAndroid Build Coastguard Worker# Checks for linker and compiler features on darwin
1102*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_DARWIN_LINKER_FEATURES],
1103*a67afe4dSAndroid Build Coastguard Worker[
1104*a67afe4dSAndroid Build Coastguard Worker  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1105*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1106*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct, $1)=no
1107*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_automatic, $1)=yes
1108*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1109*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$lt_cv_ld_force_load"; then
1110*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1111*a67afe4dSAndroid Build Coastguard Worker    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1112*a67afe4dSAndroid Build Coastguard Worker                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1113*a67afe4dSAndroid Build Coastguard Worker  else
1114*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1115*a67afe4dSAndroid Build Coastguard Worker  fi
1116*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(link_all_deplibs, $1)=yes
1117*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1118*a67afe4dSAndroid Build Coastguard Worker  case $cc_basename in
1119*a67afe4dSAndroid Build Coastguard Worker     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1120*a67afe4dSAndroid Build Coastguard Worker     *) _lt_dar_can_shared=$GCC ;;
1121*a67afe4dSAndroid Build Coastguard Worker  esac
1122*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$_lt_dar_can_shared"; then
1123*a67afe4dSAndroid Build Coastguard Worker    output_verbose_link_cmd=func_echo_all
1124*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
1125*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1126*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
1127*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
1128*a67afe4dSAndroid Build Coastguard Worker    m4_if([$1], [CXX],
1129*a67afe4dSAndroid Build Coastguard Worker[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1130*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
1131*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
1132*a67afe4dSAndroid Build Coastguard Worker    fi
1133*a67afe4dSAndroid Build Coastguard Worker],[])
1134*a67afe4dSAndroid Build Coastguard Worker  else
1135*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(ld_shlibs, $1)=no
1136*a67afe4dSAndroid Build Coastguard Worker  fi
1137*a67afe4dSAndroid Build Coastguard Worker])
1138*a67afe4dSAndroid Build Coastguard Worker
1139*a67afe4dSAndroid Build Coastguard Worker# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1140*a67afe4dSAndroid Build Coastguard Worker# ----------------------------------
1141*a67afe4dSAndroid Build Coastguard Worker# Links a minimal program and checks the executable
1142*a67afe4dSAndroid Build Coastguard Worker# for the system default hardcoded library path. In most cases,
1143*a67afe4dSAndroid Build Coastguard Worker# this is /usr/lib:/lib, but when the MPI compilers are used
1144*a67afe4dSAndroid Build Coastguard Worker# the location of the communication and MPI libs are included too.
1145*a67afe4dSAndroid Build Coastguard Worker# If we don't find anything, use the default library path according
1146*a67afe4dSAndroid Build Coastguard Worker# to the aix ld manual.
1147*a67afe4dSAndroid Build Coastguard Worker# Store the results from the different compilers for each TAGNAME.
1148*a67afe4dSAndroid Build Coastguard Worker# Allow to override them for all tags through lt_cv_aix_libpath.
1149*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_SYS_MODULE_PATH_AIX],
1150*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
1151*a67afe4dSAndroid Build Coastguard Workerif test set = "${lt_cv_aix_libpath+set}"; then
1152*a67afe4dSAndroid Build Coastguard Worker  aix_libpath=$lt_cv_aix_libpath
1153*a67afe4dSAndroid Build Coastguard Workerelse
1154*a67afe4dSAndroid Build Coastguard Worker  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1155*a67afe4dSAndroid Build Coastguard Worker  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1156*a67afe4dSAndroid Build Coastguard Worker  lt_aix_libpath_sed='[
1157*a67afe4dSAndroid Build Coastguard Worker      /Import File Strings/,/^$/ {
1158*a67afe4dSAndroid Build Coastguard Worker	  /^0/ {
1159*a67afe4dSAndroid Build Coastguard Worker	      s/^0  *\([^ ]*\) *$/\1/
1160*a67afe4dSAndroid Build Coastguard Worker	      p
1161*a67afe4dSAndroid Build Coastguard Worker	  }
1162*a67afe4dSAndroid Build Coastguard Worker      }]'
1163*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1164*a67afe4dSAndroid Build Coastguard Worker  # Check for a 64-bit object if we didn't find anything.
1165*a67afe4dSAndroid Build Coastguard Worker  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1166*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1167*a67afe4dSAndroid Build Coastguard Worker  fi],[])
1168*a67afe4dSAndroid Build Coastguard Worker  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1169*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1170*a67afe4dSAndroid Build Coastguard Worker  fi
1171*a67afe4dSAndroid Build Coastguard Worker  ])
1172*a67afe4dSAndroid Build Coastguard Worker  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1173*a67afe4dSAndroid Build Coastguard Workerfi
1174*a67afe4dSAndroid Build Coastguard Worker])# _LT_SYS_MODULE_PATH_AIX
1175*a67afe4dSAndroid Build Coastguard Worker
1176*a67afe4dSAndroid Build Coastguard Worker
1177*a67afe4dSAndroid Build Coastguard Worker# _LT_SHELL_INIT(ARG)
1178*a67afe4dSAndroid Build Coastguard Worker# -------------------
1179*a67afe4dSAndroid Build Coastguard Workerm4_define([_LT_SHELL_INIT],
1180*a67afe4dSAndroid Build Coastguard Worker[m4_divert_text([M4SH-INIT], [$1
1181*a67afe4dSAndroid Build Coastguard Worker])])# _LT_SHELL_INIT
1182*a67afe4dSAndroid Build Coastguard Worker
1183*a67afe4dSAndroid Build Coastguard Worker
1184*a67afe4dSAndroid Build Coastguard Worker
1185*a67afe4dSAndroid Build Coastguard Worker# _LT_PROG_ECHO_BACKSLASH
1186*a67afe4dSAndroid Build Coastguard Worker# -----------------------
1187*a67afe4dSAndroid Build Coastguard Worker# Find how we can fake an echo command that does not interpret backslash.
1188*a67afe4dSAndroid Build Coastguard Worker# In particular, with Autoconf 2.60 or later we add some code to the start
1189*a67afe4dSAndroid Build Coastguard Worker# of the generated configure script that will find a shell with a builtin
1190*a67afe4dSAndroid Build Coastguard Worker# printf (that we can use as an echo command).
1191*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PROG_ECHO_BACKSLASH],
1192*a67afe4dSAndroid Build Coastguard Worker[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1193*a67afe4dSAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1194*a67afe4dSAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1195*a67afe4dSAndroid Build Coastguard Worker
1196*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to print strings])
1197*a67afe4dSAndroid Build Coastguard Worker# Test print first, because it will be a builtin if present.
1198*a67afe4dSAndroid Build Coastguard Workerif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1199*a67afe4dSAndroid Build Coastguard Worker   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1200*a67afe4dSAndroid Build Coastguard Worker  ECHO='print -r --'
1201*a67afe4dSAndroid Build Coastguard Workerelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1202*a67afe4dSAndroid Build Coastguard Worker  ECHO='printf %s\n'
1203*a67afe4dSAndroid Build Coastguard Workerelse
1204*a67afe4dSAndroid Build Coastguard Worker  # Use this function as a fallback that always works.
1205*a67afe4dSAndroid Build Coastguard Worker  func_fallback_echo ()
1206*a67afe4dSAndroid Build Coastguard Worker  {
1207*a67afe4dSAndroid Build Coastguard Worker    eval 'cat <<_LTECHO_EOF
1208*a67afe4dSAndroid Build Coastguard Worker$[]1
1209*a67afe4dSAndroid Build Coastguard Worker_LTECHO_EOF'
1210*a67afe4dSAndroid Build Coastguard Worker  }
1211*a67afe4dSAndroid Build Coastguard Worker  ECHO='func_fallback_echo'
1212*a67afe4dSAndroid Build Coastguard Workerfi
1213*a67afe4dSAndroid Build Coastguard Worker
1214*a67afe4dSAndroid Build Coastguard Worker# func_echo_all arg...
1215*a67afe4dSAndroid Build Coastguard Worker# Invoke $ECHO with all args, space-separated.
1216*a67afe4dSAndroid Build Coastguard Workerfunc_echo_all ()
1217*a67afe4dSAndroid Build Coastguard Worker{
1218*a67afe4dSAndroid Build Coastguard Worker    $ECHO "$*"
1219*a67afe4dSAndroid Build Coastguard Worker}
1220*a67afe4dSAndroid Build Coastguard Worker
1221*a67afe4dSAndroid Build Coastguard Workercase $ECHO in
1222*a67afe4dSAndroid Build Coastguard Worker  printf*) AC_MSG_RESULT([printf]) ;;
1223*a67afe4dSAndroid Build Coastguard Worker  print*) AC_MSG_RESULT([print -r]) ;;
1224*a67afe4dSAndroid Build Coastguard Worker  *) AC_MSG_RESULT([cat]) ;;
1225*a67afe4dSAndroid Build Coastguard Workeresac
1226*a67afe4dSAndroid Build Coastguard Worker
1227*a67afe4dSAndroid Build Coastguard Workerm4_ifdef([_AS_DETECT_SUGGESTED],
1228*a67afe4dSAndroid Build Coastguard Worker[_AS_DETECT_SUGGESTED([
1229*a67afe4dSAndroid Build Coastguard Worker  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1230*a67afe4dSAndroid Build Coastguard Worker    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1231*a67afe4dSAndroid Build Coastguard Worker    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1232*a67afe4dSAndroid Build Coastguard Worker    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1233*a67afe4dSAndroid Build Coastguard Worker    PATH=/empty FPATH=/empty; export PATH FPATH
1234*a67afe4dSAndroid Build Coastguard Worker    test "X`printf %s $ECHO`" = "X$ECHO" \
1235*a67afe4dSAndroid Build Coastguard Worker      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1236*a67afe4dSAndroid Build Coastguard Worker
1237*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1238*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1239*a67afe4dSAndroid Build Coastguard Worker])# _LT_PROG_ECHO_BACKSLASH
1240*a67afe4dSAndroid Build Coastguard Worker
1241*a67afe4dSAndroid Build Coastguard Worker
1242*a67afe4dSAndroid Build Coastguard Worker# _LT_WITH_SYSROOT
1243*a67afe4dSAndroid Build Coastguard Worker# ----------------
1244*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([_LT_WITH_SYSROOT],
1245*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
1246*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([for sysroot])
1247*a67afe4dSAndroid Build Coastguard WorkerAC_ARG_WITH([sysroot],
1248*a67afe4dSAndroid Build Coastguard Worker[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1249*a67afe4dSAndroid Build Coastguard Worker  [Search for dependent libraries within DIR (or the compiler's sysroot
1250*a67afe4dSAndroid Build Coastguard Worker   if not specified).])],
1251*a67afe4dSAndroid Build Coastguard Worker[], [with_sysroot=no])
1252*a67afe4dSAndroid Build Coastguard Worker
1253*a67afe4dSAndroid Build Coastguard Workerdnl lt_sysroot will always be passed unquoted.  We quote it here
1254*a67afe4dSAndroid Build Coastguard Workerdnl in case the user passed a directory name.
1255*a67afe4dSAndroid Build Coastguard Workerlt_sysroot=
1256*a67afe4dSAndroid Build Coastguard Workercase $with_sysroot in #(
1257*a67afe4dSAndroid Build Coastguard Worker yes)
1258*a67afe4dSAndroid Build Coastguard Worker   if test yes = "$GCC"; then
1259*a67afe4dSAndroid Build Coastguard Worker     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1260*a67afe4dSAndroid Build Coastguard Worker   fi
1261*a67afe4dSAndroid Build Coastguard Worker   ;; #(
1262*a67afe4dSAndroid Build Coastguard Worker /*)
1263*a67afe4dSAndroid Build Coastguard Worker   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1264*a67afe4dSAndroid Build Coastguard Worker   ;; #(
1265*a67afe4dSAndroid Build Coastguard Worker no|'')
1266*a67afe4dSAndroid Build Coastguard Worker   ;; #(
1267*a67afe4dSAndroid Build Coastguard Worker *)
1268*a67afe4dSAndroid Build Coastguard Worker   AC_MSG_RESULT([$with_sysroot])
1269*a67afe4dSAndroid Build Coastguard Worker   AC_MSG_ERROR([The sysroot must be an absolute path.])
1270*a67afe4dSAndroid Build Coastguard Worker   ;;
1271*a67afe4dSAndroid Build Coastguard Workeresac
1272*a67afe4dSAndroid Build Coastguard Worker
1273*a67afe4dSAndroid Build Coastguard Worker AC_MSG_RESULT([${lt_sysroot:-no}])
1274*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1275*a67afe4dSAndroid Build Coastguard Worker[dependent libraries, and where our libraries should be installed.])])
1276*a67afe4dSAndroid Build Coastguard Worker
1277*a67afe4dSAndroid Build Coastguard Worker# _LT_ENABLE_LOCK
1278*a67afe4dSAndroid Build Coastguard Worker# ---------------
1279*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_ENABLE_LOCK],
1280*a67afe4dSAndroid Build Coastguard Worker[AC_ARG_ENABLE([libtool-lock],
1281*a67afe4dSAndroid Build Coastguard Worker  [AS_HELP_STRING([--disable-libtool-lock],
1282*a67afe4dSAndroid Build Coastguard Worker    [avoid locking (might break parallel builds)])])
1283*a67afe4dSAndroid Build Coastguard Workertest no = "$enable_libtool_lock" || enable_libtool_lock=yes
1284*a67afe4dSAndroid Build Coastguard Worker
1285*a67afe4dSAndroid Build Coastguard Worker# Some flags need to be propagated to the compiler or linker for good
1286*a67afe4dSAndroid Build Coastguard Worker# libtool support.
1287*a67afe4dSAndroid Build Coastguard Workercase $host in
1288*a67afe4dSAndroid Build Coastguard Workeria64-*-hpux*)
1289*a67afe4dSAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set mode
1290*a67afe4dSAndroid Build Coastguard Worker  # options accordingly.
1291*a67afe4dSAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1292*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1293*a67afe4dSAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1294*a67afe4dSAndroid Build Coastguard Worker      *ELF-32*)
1295*a67afe4dSAndroid Build Coastguard Worker	HPUX_IA64_MODE=32
1296*a67afe4dSAndroid Build Coastguard Worker	;;
1297*a67afe4dSAndroid Build Coastguard Worker      *ELF-64*)
1298*a67afe4dSAndroid Build Coastguard Worker	HPUX_IA64_MODE=64
1299*a67afe4dSAndroid Build Coastguard Worker	;;
1300*a67afe4dSAndroid Build Coastguard Worker    esac
1301*a67afe4dSAndroid Build Coastguard Worker  fi
1302*a67afe4dSAndroid Build Coastguard Worker  rm -rf conftest*
1303*a67afe4dSAndroid Build Coastguard Worker  ;;
1304*a67afe4dSAndroid Build Coastguard Worker*-*-irix6*)
1305*a67afe4dSAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1306*a67afe4dSAndroid Build Coastguard Worker  # options accordingly.
1307*a67afe4dSAndroid Build Coastguard Worker  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1308*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1309*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$lt_cv_prog_gnu_ld"; then
1310*a67afe4dSAndroid Build Coastguard Worker      case `$FILECMD conftest.$ac_objext` in
1311*a67afe4dSAndroid Build Coastguard Worker	*32-bit*)
1312*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -melf32bsmip"
1313*a67afe4dSAndroid Build Coastguard Worker	  ;;
1314*a67afe4dSAndroid Build Coastguard Worker	*N32*)
1315*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -melf32bmipn32"
1316*a67afe4dSAndroid Build Coastguard Worker	  ;;
1317*a67afe4dSAndroid Build Coastguard Worker	*64-bit*)
1318*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -melf64bmip"
1319*a67afe4dSAndroid Build Coastguard Worker	;;
1320*a67afe4dSAndroid Build Coastguard Worker      esac
1321*a67afe4dSAndroid Build Coastguard Worker    else
1322*a67afe4dSAndroid Build Coastguard Worker      case `$FILECMD conftest.$ac_objext` in
1323*a67afe4dSAndroid Build Coastguard Worker	*32-bit*)
1324*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -32"
1325*a67afe4dSAndroid Build Coastguard Worker	  ;;
1326*a67afe4dSAndroid Build Coastguard Worker	*N32*)
1327*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -n32"
1328*a67afe4dSAndroid Build Coastguard Worker	  ;;
1329*a67afe4dSAndroid Build Coastguard Worker	*64-bit*)
1330*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -64"
1331*a67afe4dSAndroid Build Coastguard Worker	  ;;
1332*a67afe4dSAndroid Build Coastguard Worker      esac
1333*a67afe4dSAndroid Build Coastguard Worker    fi
1334*a67afe4dSAndroid Build Coastguard Worker  fi
1335*a67afe4dSAndroid Build Coastguard Worker  rm -rf conftest*
1336*a67afe4dSAndroid Build Coastguard Worker  ;;
1337*a67afe4dSAndroid Build Coastguard Worker
1338*a67afe4dSAndroid Build Coastguard Workermips64*-*linux*)
1339*a67afe4dSAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1340*a67afe4dSAndroid Build Coastguard Worker  # options accordingly.
1341*a67afe4dSAndroid Build Coastguard Worker  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1342*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1343*a67afe4dSAndroid Build Coastguard Worker    emul=elf
1344*a67afe4dSAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1345*a67afe4dSAndroid Build Coastguard Worker      *32-bit*)
1346*a67afe4dSAndroid Build Coastguard Worker	emul="${emul}32"
1347*a67afe4dSAndroid Build Coastguard Worker	;;
1348*a67afe4dSAndroid Build Coastguard Worker      *64-bit*)
1349*a67afe4dSAndroid Build Coastguard Worker	emul="${emul}64"
1350*a67afe4dSAndroid Build Coastguard Worker	;;
1351*a67afe4dSAndroid Build Coastguard Worker    esac
1352*a67afe4dSAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1353*a67afe4dSAndroid Build Coastguard Worker      *MSB*)
1354*a67afe4dSAndroid Build Coastguard Worker	emul="${emul}btsmip"
1355*a67afe4dSAndroid Build Coastguard Worker	;;
1356*a67afe4dSAndroid Build Coastguard Worker      *LSB*)
1357*a67afe4dSAndroid Build Coastguard Worker	emul="${emul}ltsmip"
1358*a67afe4dSAndroid Build Coastguard Worker	;;
1359*a67afe4dSAndroid Build Coastguard Worker    esac
1360*a67afe4dSAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1361*a67afe4dSAndroid Build Coastguard Worker      *N32*)
1362*a67afe4dSAndroid Build Coastguard Worker	emul="${emul}n32"
1363*a67afe4dSAndroid Build Coastguard Worker	;;
1364*a67afe4dSAndroid Build Coastguard Worker    esac
1365*a67afe4dSAndroid Build Coastguard Worker    LD="${LD-ld} -m $emul"
1366*a67afe4dSAndroid Build Coastguard Worker  fi
1367*a67afe4dSAndroid Build Coastguard Worker  rm -rf conftest*
1368*a67afe4dSAndroid Build Coastguard Worker  ;;
1369*a67afe4dSAndroid Build Coastguard Worker
1370*a67afe4dSAndroid Build Coastguard Workerx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1371*a67afe4dSAndroid Build Coastguard Workers390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1372*a67afe4dSAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1373*a67afe4dSAndroid Build Coastguard Worker  # options accordingly.  Note that the listed cases only cover the
1374*a67afe4dSAndroid Build Coastguard Worker  # situations where additional linker options are needed (such as when
1375*a67afe4dSAndroid Build Coastguard Worker  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1376*a67afe4dSAndroid Build Coastguard Worker  # vice versa); the common cases where no linker options are needed do
1377*a67afe4dSAndroid Build Coastguard Worker  # not appear in the list.
1378*a67afe4dSAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1379*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1380*a67afe4dSAndroid Build Coastguard Worker    case `$FILECMD conftest.o` in
1381*a67afe4dSAndroid Build Coastguard Worker      *32-bit*)
1382*a67afe4dSAndroid Build Coastguard Worker	case $host in
1383*a67afe4dSAndroid Build Coastguard Worker	  x86_64-*kfreebsd*-gnu)
1384*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_i386_fbsd"
1385*a67afe4dSAndroid Build Coastguard Worker	    ;;
1386*a67afe4dSAndroid Build Coastguard Worker	  x86_64-*linux*)
1387*a67afe4dSAndroid Build Coastguard Worker	    case `$FILECMD conftest.o` in
1388*a67afe4dSAndroid Build Coastguard Worker	      *x86-64*)
1389*a67afe4dSAndroid Build Coastguard Worker		LD="${LD-ld} -m elf32_x86_64"
1390*a67afe4dSAndroid Build Coastguard Worker		;;
1391*a67afe4dSAndroid Build Coastguard Worker	      *)
1392*a67afe4dSAndroid Build Coastguard Worker		LD="${LD-ld} -m elf_i386"
1393*a67afe4dSAndroid Build Coastguard Worker		;;
1394*a67afe4dSAndroid Build Coastguard Worker	    esac
1395*a67afe4dSAndroid Build Coastguard Worker	    ;;
1396*a67afe4dSAndroid Build Coastguard Worker	  powerpc64le-*linux*)
1397*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32lppclinux"
1398*a67afe4dSAndroid Build Coastguard Worker	    ;;
1399*a67afe4dSAndroid Build Coastguard Worker	  powerpc64-*linux*)
1400*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32ppclinux"
1401*a67afe4dSAndroid Build Coastguard Worker	    ;;
1402*a67afe4dSAndroid Build Coastguard Worker	  s390x-*linux*)
1403*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_s390"
1404*a67afe4dSAndroid Build Coastguard Worker	    ;;
1405*a67afe4dSAndroid Build Coastguard Worker	  sparc64-*linux*)
1406*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32_sparc"
1407*a67afe4dSAndroid Build Coastguard Worker	    ;;
1408*a67afe4dSAndroid Build Coastguard Worker	esac
1409*a67afe4dSAndroid Build Coastguard Worker	;;
1410*a67afe4dSAndroid Build Coastguard Worker      *64-bit*)
1411*a67afe4dSAndroid Build Coastguard Worker	case $host in
1412*a67afe4dSAndroid Build Coastguard Worker	  x86_64-*kfreebsd*-gnu)
1413*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_x86_64_fbsd"
1414*a67afe4dSAndroid Build Coastguard Worker	    ;;
1415*a67afe4dSAndroid Build Coastguard Worker	  x86_64-*linux*)
1416*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_x86_64"
1417*a67afe4dSAndroid Build Coastguard Worker	    ;;
1418*a67afe4dSAndroid Build Coastguard Worker	  powerpcle-*linux*)
1419*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64lppc"
1420*a67afe4dSAndroid Build Coastguard Worker	    ;;
1421*a67afe4dSAndroid Build Coastguard Worker	  powerpc-*linux*)
1422*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64ppc"
1423*a67afe4dSAndroid Build Coastguard Worker	    ;;
1424*a67afe4dSAndroid Build Coastguard Worker	  s390*-*linux*|s390*-*tpf*)
1425*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64_s390"
1426*a67afe4dSAndroid Build Coastguard Worker	    ;;
1427*a67afe4dSAndroid Build Coastguard Worker	  sparc*-*linux*)
1428*a67afe4dSAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64_sparc"
1429*a67afe4dSAndroid Build Coastguard Worker	    ;;
1430*a67afe4dSAndroid Build Coastguard Worker	esac
1431*a67afe4dSAndroid Build Coastguard Worker	;;
1432*a67afe4dSAndroid Build Coastguard Worker    esac
1433*a67afe4dSAndroid Build Coastguard Worker  fi
1434*a67afe4dSAndroid Build Coastguard Worker  rm -rf conftest*
1435*a67afe4dSAndroid Build Coastguard Worker  ;;
1436*a67afe4dSAndroid Build Coastguard Worker
1437*a67afe4dSAndroid Build Coastguard Worker*-*-sco3.2v5*)
1438*a67afe4dSAndroid Build Coastguard Worker  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1439*a67afe4dSAndroid Build Coastguard Worker  SAVE_CFLAGS=$CFLAGS
1440*a67afe4dSAndroid Build Coastguard Worker  CFLAGS="$CFLAGS -belf"
1441*a67afe4dSAndroid Build Coastguard Worker  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1442*a67afe4dSAndroid Build Coastguard Worker    [AC_LANG_PUSH(C)
1443*a67afe4dSAndroid Build Coastguard Worker     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1444*a67afe4dSAndroid Build Coastguard Worker     AC_LANG_POP])
1445*a67afe4dSAndroid Build Coastguard Worker  if test yes != "$lt_cv_cc_needs_belf"; then
1446*a67afe4dSAndroid Build Coastguard Worker    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447*a67afe4dSAndroid Build Coastguard Worker    CFLAGS=$SAVE_CFLAGS
1448*a67afe4dSAndroid Build Coastguard Worker  fi
1449*a67afe4dSAndroid Build Coastguard Worker  ;;
1450*a67afe4dSAndroid Build Coastguard Worker*-*solaris*)
1451*a67afe4dSAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1452*a67afe4dSAndroid Build Coastguard Worker  # options accordingly.
1453*a67afe4dSAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1454*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1455*a67afe4dSAndroid Build Coastguard Worker    case `$FILECMD conftest.o` in
1456*a67afe4dSAndroid Build Coastguard Worker    *64-bit*)
1457*a67afe4dSAndroid Build Coastguard Worker      case $lt_cv_prog_gnu_ld in
1458*a67afe4dSAndroid Build Coastguard Worker      yes*)
1459*a67afe4dSAndroid Build Coastguard Worker        case $host in
1460*a67afe4dSAndroid Build Coastguard Worker        i?86-*-solaris*|x86_64-*-solaris*)
1461*a67afe4dSAndroid Build Coastguard Worker          LD="${LD-ld} -m elf_x86_64"
1462*a67afe4dSAndroid Build Coastguard Worker          ;;
1463*a67afe4dSAndroid Build Coastguard Worker        sparc*-*-solaris*)
1464*a67afe4dSAndroid Build Coastguard Worker          LD="${LD-ld} -m elf64_sparc"
1465*a67afe4dSAndroid Build Coastguard Worker          ;;
1466*a67afe4dSAndroid Build Coastguard Worker        esac
1467*a67afe4dSAndroid Build Coastguard Worker        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1468*a67afe4dSAndroid Build Coastguard Worker        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1469*a67afe4dSAndroid Build Coastguard Worker          LD=${LD-ld}_sol2
1470*a67afe4dSAndroid Build Coastguard Worker        fi
1471*a67afe4dSAndroid Build Coastguard Worker        ;;
1472*a67afe4dSAndroid Build Coastguard Worker      *)
1473*a67afe4dSAndroid Build Coastguard Worker	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1474*a67afe4dSAndroid Build Coastguard Worker	  LD="${LD-ld} -64"
1475*a67afe4dSAndroid Build Coastguard Worker	fi
1476*a67afe4dSAndroid Build Coastguard Worker	;;
1477*a67afe4dSAndroid Build Coastguard Worker      esac
1478*a67afe4dSAndroid Build Coastguard Worker      ;;
1479*a67afe4dSAndroid Build Coastguard Worker    esac
1480*a67afe4dSAndroid Build Coastguard Worker  fi
1481*a67afe4dSAndroid Build Coastguard Worker  rm -rf conftest*
1482*a67afe4dSAndroid Build Coastguard Worker  ;;
1483*a67afe4dSAndroid Build Coastguard Workeresac
1484*a67afe4dSAndroid Build Coastguard Worker
1485*a67afe4dSAndroid Build Coastguard Workerneed_locks=$enable_libtool_lock
1486*a67afe4dSAndroid Build Coastguard Worker])# _LT_ENABLE_LOCK
1487*a67afe4dSAndroid Build Coastguard Worker
1488*a67afe4dSAndroid Build Coastguard Worker
1489*a67afe4dSAndroid Build Coastguard Worker# _LT_PROG_AR
1490*a67afe4dSAndroid Build Coastguard Worker# -----------
1491*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PROG_AR],
1492*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOLS(AR, [ar], false)
1493*a67afe4dSAndroid Build Coastguard Worker: ${AR=ar}
1494*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [AR], [1], [The archiver])
1495*a67afe4dSAndroid Build Coastguard Worker
1496*a67afe4dSAndroid Build Coastguard Worker# Use ARFLAGS variable as AR's operation code to sync the variable naming with
1497*a67afe4dSAndroid Build Coastguard Worker# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1498*a67afe4dSAndroid Build Coastguard Worker# higher priority because thats what people were doing historically (setting
1499*a67afe4dSAndroid Build Coastguard Worker# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
1500*a67afe4dSAndroid Build Coastguard Worker# variable obsoleted/removed.
1501*a67afe4dSAndroid Build Coastguard Worker
1502*a67afe4dSAndroid Build Coastguard Workertest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1503*a67afe4dSAndroid Build Coastguard Workerlt_ar_flags=$AR_FLAGS
1504*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1505*a67afe4dSAndroid Build Coastguard Worker
1506*a67afe4dSAndroid Build Coastguard Worker# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
1507*a67afe4dSAndroid Build Coastguard Worker# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1508*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1509*a67afe4dSAndroid Build Coastguard Worker         [Flags to create an archive])
1510*a67afe4dSAndroid Build Coastguard Worker
1511*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1512*a67afe4dSAndroid Build Coastguard Worker  [lt_cv_ar_at_file=no
1513*a67afe4dSAndroid Build Coastguard Worker   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1514*a67afe4dSAndroid Build Coastguard Worker     [echo conftest.$ac_objext > conftest.lst
1515*a67afe4dSAndroid Build Coastguard Worker      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1516*a67afe4dSAndroid Build Coastguard Worker      AC_TRY_EVAL([lt_ar_try])
1517*a67afe4dSAndroid Build Coastguard Worker      if test 0 -eq "$ac_status"; then
1518*a67afe4dSAndroid Build Coastguard Worker	# Ensure the archiver fails upon bogus file names.
1519*a67afe4dSAndroid Build Coastguard Worker	rm -f conftest.$ac_objext libconftest.a
1520*a67afe4dSAndroid Build Coastguard Worker	AC_TRY_EVAL([lt_ar_try])
1521*a67afe4dSAndroid Build Coastguard Worker	if test 0 -ne "$ac_status"; then
1522*a67afe4dSAndroid Build Coastguard Worker          lt_cv_ar_at_file=@
1523*a67afe4dSAndroid Build Coastguard Worker        fi
1524*a67afe4dSAndroid Build Coastguard Worker      fi
1525*a67afe4dSAndroid Build Coastguard Worker      rm -f conftest.* libconftest.a
1526*a67afe4dSAndroid Build Coastguard Worker     ])
1527*a67afe4dSAndroid Build Coastguard Worker  ])
1528*a67afe4dSAndroid Build Coastguard Worker
1529*a67afe4dSAndroid Build Coastguard Workerif test no = "$lt_cv_ar_at_file"; then
1530*a67afe4dSAndroid Build Coastguard Worker  archiver_list_spec=
1531*a67afe4dSAndroid Build Coastguard Workerelse
1532*a67afe4dSAndroid Build Coastguard Worker  archiver_list_spec=$lt_cv_ar_at_file
1533*a67afe4dSAndroid Build Coastguard Workerfi
1534*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [archiver_list_spec], [1],
1535*a67afe4dSAndroid Build Coastguard Worker  [How to feed a file listing to the archiver])
1536*a67afe4dSAndroid Build Coastguard Worker])# _LT_PROG_AR
1537*a67afe4dSAndroid Build Coastguard Worker
1538*a67afe4dSAndroid Build Coastguard Worker
1539*a67afe4dSAndroid Build Coastguard Worker# _LT_CMD_OLD_ARCHIVE
1540*a67afe4dSAndroid Build Coastguard Worker# -------------------
1541*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CMD_OLD_ARCHIVE],
1542*a67afe4dSAndroid Build Coastguard Worker[_LT_PROG_AR
1543*a67afe4dSAndroid Build Coastguard Worker
1544*a67afe4dSAndroid Build Coastguard WorkerAC_CHECK_TOOL(STRIP, strip, :)
1545*a67afe4dSAndroid Build Coastguard Workertest -z "$STRIP" && STRIP=:
1546*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1547*a67afe4dSAndroid Build Coastguard Worker
1548*a67afe4dSAndroid Build Coastguard WorkerAC_CHECK_TOOL(RANLIB, ranlib, :)
1549*a67afe4dSAndroid Build Coastguard Workertest -z "$RANLIB" && RANLIB=:
1550*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [RANLIB], [1],
1551*a67afe4dSAndroid Build Coastguard Worker    [Commands used to install an old-style archive])
1552*a67afe4dSAndroid Build Coastguard Worker
1553*a67afe4dSAndroid Build Coastguard Worker# Determine commands to create old-style static archives.
1554*a67afe4dSAndroid Build Coastguard Workerold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1555*a67afe4dSAndroid Build Coastguard Workerold_postinstall_cmds='chmod 644 $oldlib'
1556*a67afe4dSAndroid Build Coastguard Workerold_postuninstall_cmds=
1557*a67afe4dSAndroid Build Coastguard Worker
1558*a67afe4dSAndroid Build Coastguard Workerif test -n "$RANLIB"; then
1559*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
1560*a67afe4dSAndroid Build Coastguard Worker  bitrig* | openbsd*)
1561*a67afe4dSAndroid Build Coastguard Worker    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1562*a67afe4dSAndroid Build Coastguard Worker    ;;
1563*a67afe4dSAndroid Build Coastguard Worker  *)
1564*a67afe4dSAndroid Build Coastguard Worker    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1565*a67afe4dSAndroid Build Coastguard Worker    ;;
1566*a67afe4dSAndroid Build Coastguard Worker  esac
1567*a67afe4dSAndroid Build Coastguard Worker  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1568*a67afe4dSAndroid Build Coastguard Workerfi
1569*a67afe4dSAndroid Build Coastguard Worker
1570*a67afe4dSAndroid Build Coastguard Workercase $host_os in
1571*a67afe4dSAndroid Build Coastguard Worker  darwin*)
1572*a67afe4dSAndroid Build Coastguard Worker    lock_old_archive_extraction=yes ;;
1573*a67afe4dSAndroid Build Coastguard Worker  *)
1574*a67afe4dSAndroid Build Coastguard Worker    lock_old_archive_extraction=no ;;
1575*a67afe4dSAndroid Build Coastguard Workeresac
1576*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [old_postinstall_cmds], [2])
1577*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [old_postuninstall_cmds], [2])
1578*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_cmds], [2],
1579*a67afe4dSAndroid Build Coastguard Worker    [Commands used to build an old-style archive])
1580*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [lock_old_archive_extraction], [0],
1581*a67afe4dSAndroid Build Coastguard Worker    [Whether to use a lock for old archive extraction])
1582*a67afe4dSAndroid Build Coastguard Worker])# _LT_CMD_OLD_ARCHIVE
1583*a67afe4dSAndroid Build Coastguard Worker
1584*a67afe4dSAndroid Build Coastguard Worker
1585*a67afe4dSAndroid Build Coastguard Worker# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1586*a67afe4dSAndroid Build Coastguard Worker#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1587*a67afe4dSAndroid Build Coastguard Worker# ----------------------------------------------------------------
1588*a67afe4dSAndroid Build Coastguard Worker# Check whether the given compiler option works
1589*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([_LT_COMPILER_OPTION],
1590*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1591*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
1592*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2],
1593*a67afe4dSAndroid Build Coastguard Worker  [$2=no
1594*a67afe4dSAndroid Build Coastguard Worker   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1595*a67afe4dSAndroid Build Coastguard Worker   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1596*a67afe4dSAndroid Build Coastguard Worker   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1597*a67afe4dSAndroid Build Coastguard Worker   # Insert the option either (1) after the last *FLAGS variable, or
1598*a67afe4dSAndroid Build Coastguard Worker   # (2) before a word containing "conftest.", or (3) at the end.
1599*a67afe4dSAndroid Build Coastguard Worker   # Note that $ac_compile itself does not contain backslashes and begins
1600*a67afe4dSAndroid Build Coastguard Worker   # with a dollar sign (not a hyphen), so the echo should work correctly.
1601*a67afe4dSAndroid Build Coastguard Worker   # The option is referenced via a variable to avoid confusing sed.
1602*a67afe4dSAndroid Build Coastguard Worker   lt_compile=`echo "$ac_compile" | $SED \
1603*a67afe4dSAndroid Build Coastguard Worker   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1604*a67afe4dSAndroid Build Coastguard Worker   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1605*a67afe4dSAndroid Build Coastguard Worker   -e 's:$: $lt_compiler_flag:'`
1606*a67afe4dSAndroid Build Coastguard Worker   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1607*a67afe4dSAndroid Build Coastguard Worker   (eval "$lt_compile" 2>conftest.err)
1608*a67afe4dSAndroid Build Coastguard Worker   ac_status=$?
1609*a67afe4dSAndroid Build Coastguard Worker   cat conftest.err >&AS_MESSAGE_LOG_FD
1610*a67afe4dSAndroid Build Coastguard Worker   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1611*a67afe4dSAndroid Build Coastguard Worker   if (exit $ac_status) && test -s "$ac_outfile"; then
1612*a67afe4dSAndroid Build Coastguard Worker     # The compiler can only warn and ignore the option if not recognized
1613*a67afe4dSAndroid Build Coastguard Worker     # So say no if there are warnings other than the usual output.
1614*a67afe4dSAndroid Build Coastguard Worker     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1615*a67afe4dSAndroid Build Coastguard Worker     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1616*a67afe4dSAndroid Build Coastguard Worker     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1617*a67afe4dSAndroid Build Coastguard Worker       $2=yes
1618*a67afe4dSAndroid Build Coastguard Worker     fi
1619*a67afe4dSAndroid Build Coastguard Worker   fi
1620*a67afe4dSAndroid Build Coastguard Worker   $RM conftest*
1621*a67afe4dSAndroid Build Coastguard Worker])
1622*a67afe4dSAndroid Build Coastguard Worker
1623*a67afe4dSAndroid Build Coastguard Workerif test yes = "[$]$2"; then
1624*a67afe4dSAndroid Build Coastguard Worker    m4_if([$5], , :, [$5])
1625*a67afe4dSAndroid Build Coastguard Workerelse
1626*a67afe4dSAndroid Build Coastguard Worker    m4_if([$6], , :, [$6])
1627*a67afe4dSAndroid Build Coastguard Workerfi
1628*a67afe4dSAndroid Build Coastguard Worker])# _LT_COMPILER_OPTION
1629*a67afe4dSAndroid Build Coastguard Worker
1630*a67afe4dSAndroid Build Coastguard Worker# Old name:
1631*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1632*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1633*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1634*a67afe4dSAndroid Build Coastguard Worker
1635*a67afe4dSAndroid Build Coastguard Worker
1636*a67afe4dSAndroid Build Coastguard Worker# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1637*a67afe4dSAndroid Build Coastguard Worker#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1638*a67afe4dSAndroid Build Coastguard Worker# ----------------------------------------------------
1639*a67afe4dSAndroid Build Coastguard Worker# Check whether the given linker option works
1640*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([_LT_LINKER_OPTION],
1641*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1642*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
1643*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2],
1644*a67afe4dSAndroid Build Coastguard Worker  [$2=no
1645*a67afe4dSAndroid Build Coastguard Worker   save_LDFLAGS=$LDFLAGS
1646*a67afe4dSAndroid Build Coastguard Worker   LDFLAGS="$LDFLAGS $3"
1647*a67afe4dSAndroid Build Coastguard Worker   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1648*a67afe4dSAndroid Build Coastguard Worker   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1649*a67afe4dSAndroid Build Coastguard Worker     # The linker can only warn and ignore the option if not recognized
1650*a67afe4dSAndroid Build Coastguard Worker     # So say no if there are warnings
1651*a67afe4dSAndroid Build Coastguard Worker     if test -s conftest.err; then
1652*a67afe4dSAndroid Build Coastguard Worker       # Append any errors to the config.log.
1653*a67afe4dSAndroid Build Coastguard Worker       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1654*a67afe4dSAndroid Build Coastguard Worker       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1655*a67afe4dSAndroid Build Coastguard Worker       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1656*a67afe4dSAndroid Build Coastguard Worker       if diff conftest.exp conftest.er2 >/dev/null; then
1657*a67afe4dSAndroid Build Coastguard Worker         $2=yes
1658*a67afe4dSAndroid Build Coastguard Worker       fi
1659*a67afe4dSAndroid Build Coastguard Worker     else
1660*a67afe4dSAndroid Build Coastguard Worker       $2=yes
1661*a67afe4dSAndroid Build Coastguard Worker     fi
1662*a67afe4dSAndroid Build Coastguard Worker   fi
1663*a67afe4dSAndroid Build Coastguard Worker   $RM -r conftest*
1664*a67afe4dSAndroid Build Coastguard Worker   LDFLAGS=$save_LDFLAGS
1665*a67afe4dSAndroid Build Coastguard Worker])
1666*a67afe4dSAndroid Build Coastguard Worker
1667*a67afe4dSAndroid Build Coastguard Workerif test yes = "[$]$2"; then
1668*a67afe4dSAndroid Build Coastguard Worker    m4_if([$4], , :, [$4])
1669*a67afe4dSAndroid Build Coastguard Workerelse
1670*a67afe4dSAndroid Build Coastguard Worker    m4_if([$5], , :, [$5])
1671*a67afe4dSAndroid Build Coastguard Workerfi
1672*a67afe4dSAndroid Build Coastguard Worker])# _LT_LINKER_OPTION
1673*a67afe4dSAndroid Build Coastguard Worker
1674*a67afe4dSAndroid Build Coastguard Worker# Old name:
1675*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1676*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1677*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1678*a67afe4dSAndroid Build Coastguard Worker
1679*a67afe4dSAndroid Build Coastguard Worker
1680*a67afe4dSAndroid Build Coastguard Worker# LT_CMD_MAX_LEN
1681*a67afe4dSAndroid Build Coastguard Worker#---------------
1682*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_CMD_MAX_LEN],
1683*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1684*a67afe4dSAndroid Build Coastguard Worker# find the maximum length of command line arguments
1685*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([the maximum length of command line arguments])
1686*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1687*a67afe4dSAndroid Build Coastguard Worker  i=0
1688*a67afe4dSAndroid Build Coastguard Worker  teststring=ABCD
1689*a67afe4dSAndroid Build Coastguard Worker
1690*a67afe4dSAndroid Build Coastguard Worker  case $build_os in
1691*a67afe4dSAndroid Build Coastguard Worker  msdosdjgpp*)
1692*a67afe4dSAndroid Build Coastguard Worker    # On DJGPP, this test can blow up pretty badly due to problems in libc
1693*a67afe4dSAndroid Build Coastguard Worker    # (any single argument exceeding 2000 bytes causes a buffer overrun
1694*a67afe4dSAndroid Build Coastguard Worker    # during glob expansion).  Even if it were fixed, the result of this
1695*a67afe4dSAndroid Build Coastguard Worker    # check would be larger than it should be.
1696*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1697*a67afe4dSAndroid Build Coastguard Worker    ;;
1698*a67afe4dSAndroid Build Coastguard Worker
1699*a67afe4dSAndroid Build Coastguard Worker  gnu*)
1700*a67afe4dSAndroid Build Coastguard Worker    # Under GNU Hurd, this test is not required because there is
1701*a67afe4dSAndroid Build Coastguard Worker    # no limit to the length of command line arguments.
1702*a67afe4dSAndroid Build Coastguard Worker    # Libtool will interpret -1 as no limit whatsoever
1703*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=-1;
1704*a67afe4dSAndroid Build Coastguard Worker    ;;
1705*a67afe4dSAndroid Build Coastguard Worker
1706*a67afe4dSAndroid Build Coastguard Worker  cygwin* | mingw* | cegcc*)
1707*a67afe4dSAndroid Build Coastguard Worker    # On Win9x/ME, this test blows up -- it succeeds, but takes
1708*a67afe4dSAndroid Build Coastguard Worker    # about 5 minutes as the teststring grows exponentially.
1709*a67afe4dSAndroid Build Coastguard Worker    # Worse, since 9x/ME are not pre-emptively multitasking,
1710*a67afe4dSAndroid Build Coastguard Worker    # you end up with a "frozen" computer, even though with patience
1711*a67afe4dSAndroid Build Coastguard Worker    # the test eventually succeeds (with a max line length of 256k).
1712*a67afe4dSAndroid Build Coastguard Worker    # Instead, let's just punt: use the minimum linelength reported by
1713*a67afe4dSAndroid Build Coastguard Worker    # all of the supported platforms: 8192 (on NT/2K/XP).
1714*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1715*a67afe4dSAndroid Build Coastguard Worker    ;;
1716*a67afe4dSAndroid Build Coastguard Worker
1717*a67afe4dSAndroid Build Coastguard Worker  mint*)
1718*a67afe4dSAndroid Build Coastguard Worker    # On MiNT this can take a long time and run out of memory.
1719*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1720*a67afe4dSAndroid Build Coastguard Worker    ;;
1721*a67afe4dSAndroid Build Coastguard Worker
1722*a67afe4dSAndroid Build Coastguard Worker  amigaos*)
1723*a67afe4dSAndroid Build Coastguard Worker    # On AmigaOS with pdksh, this test takes hours, literally.
1724*a67afe4dSAndroid Build Coastguard Worker    # So we just punt and use a minimum line length of 8192.
1725*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1726*a67afe4dSAndroid Build Coastguard Worker    ;;
1727*a67afe4dSAndroid Build Coastguard Worker
1728*a67afe4dSAndroid Build Coastguard Worker  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1729*a67afe4dSAndroid Build Coastguard Worker    # This has been around since 386BSD, at least.  Likely further.
1730*a67afe4dSAndroid Build Coastguard Worker    if test -x /sbin/sysctl; then
1731*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1732*a67afe4dSAndroid Build Coastguard Worker    elif test -x /usr/sbin/sysctl; then
1733*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1734*a67afe4dSAndroid Build Coastguard Worker    else
1735*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1736*a67afe4dSAndroid Build Coastguard Worker    fi
1737*a67afe4dSAndroid Build Coastguard Worker    # And add a safety zone
1738*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1739*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1740*a67afe4dSAndroid Build Coastguard Worker    ;;
1741*a67afe4dSAndroid Build Coastguard Worker
1742*a67afe4dSAndroid Build Coastguard Worker  interix*)
1743*a67afe4dSAndroid Build Coastguard Worker    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1744*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=196608
1745*a67afe4dSAndroid Build Coastguard Worker    ;;
1746*a67afe4dSAndroid Build Coastguard Worker
1747*a67afe4dSAndroid Build Coastguard Worker  os2*)
1748*a67afe4dSAndroid Build Coastguard Worker    # The test takes a long time on OS/2.
1749*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192
1750*a67afe4dSAndroid Build Coastguard Worker    ;;
1751*a67afe4dSAndroid Build Coastguard Worker
1752*a67afe4dSAndroid Build Coastguard Worker  osf*)
1753*a67afe4dSAndroid Build Coastguard Worker    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1754*a67afe4dSAndroid Build Coastguard Worker    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1755*a67afe4dSAndroid Build Coastguard Worker    # nice to cause kernel panics so lets avoid the loop below.
1756*a67afe4dSAndroid Build Coastguard Worker    # First set a reasonable default.
1757*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=16384
1758*a67afe4dSAndroid Build Coastguard Worker    #
1759*a67afe4dSAndroid Build Coastguard Worker    if test -x /sbin/sysconfig; then
1760*a67afe4dSAndroid Build Coastguard Worker      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1761*a67afe4dSAndroid Build Coastguard Worker        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1762*a67afe4dSAndroid Build Coastguard Worker      esac
1763*a67afe4dSAndroid Build Coastguard Worker    fi
1764*a67afe4dSAndroid Build Coastguard Worker    ;;
1765*a67afe4dSAndroid Build Coastguard Worker  sco3.2v5*)
1766*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=102400
1767*a67afe4dSAndroid Build Coastguard Worker    ;;
1768*a67afe4dSAndroid Build Coastguard Worker  sysv5* | sco5v6* | sysv4.2uw2*)
1769*a67afe4dSAndroid Build Coastguard Worker    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1770*a67afe4dSAndroid Build Coastguard Worker    if test -n "$kargmax"; then
1771*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
1772*a67afe4dSAndroid Build Coastguard Worker    else
1773*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=32768
1774*a67afe4dSAndroid Build Coastguard Worker    fi
1775*a67afe4dSAndroid Build Coastguard Worker    ;;
1776*a67afe4dSAndroid Build Coastguard Worker  *)
1777*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1778*a67afe4dSAndroid Build Coastguard Worker    if test -n "$lt_cv_sys_max_cmd_len" && \
1779*a67afe4dSAndroid Build Coastguard Worker       test undefined != "$lt_cv_sys_max_cmd_len"; then
1780*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1781*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1782*a67afe4dSAndroid Build Coastguard Worker    else
1783*a67afe4dSAndroid Build Coastguard Worker      # Make teststring a little bigger before we do anything with it.
1784*a67afe4dSAndroid Build Coastguard Worker      # a 1K string should be a reasonable start.
1785*a67afe4dSAndroid Build Coastguard Worker      for i in 1 2 3 4 5 6 7 8; do
1786*a67afe4dSAndroid Build Coastguard Worker        teststring=$teststring$teststring
1787*a67afe4dSAndroid Build Coastguard Worker      done
1788*a67afe4dSAndroid Build Coastguard Worker      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1789*a67afe4dSAndroid Build Coastguard Worker      # If test is not a shell built-in, we'll probably end up computing a
1790*a67afe4dSAndroid Build Coastguard Worker      # maximum length that is only half of the actual maximum length, but
1791*a67afe4dSAndroid Build Coastguard Worker      # we can't tell.
1792*a67afe4dSAndroid Build Coastguard Worker      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1793*a67afe4dSAndroid Build Coastguard Worker	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1794*a67afe4dSAndroid Build Coastguard Worker	      test 17 != "$i" # 1/2 MB should be enough
1795*a67afe4dSAndroid Build Coastguard Worker      do
1796*a67afe4dSAndroid Build Coastguard Worker        i=`expr $i + 1`
1797*a67afe4dSAndroid Build Coastguard Worker        teststring=$teststring$teststring
1798*a67afe4dSAndroid Build Coastguard Worker      done
1799*a67afe4dSAndroid Build Coastguard Worker      # Only check the string length outside the loop.
1800*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1801*a67afe4dSAndroid Build Coastguard Worker      teststring=
1802*a67afe4dSAndroid Build Coastguard Worker      # Add a significant safety factor because C++ compilers can tack on
1803*a67afe4dSAndroid Build Coastguard Worker      # massive amounts of additional arguments before passing them to the
1804*a67afe4dSAndroid Build Coastguard Worker      # linker.  It appears as though 1/2 is a usable value.
1805*a67afe4dSAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1806*a67afe4dSAndroid Build Coastguard Worker    fi
1807*a67afe4dSAndroid Build Coastguard Worker    ;;
1808*a67afe4dSAndroid Build Coastguard Worker  esac
1809*a67afe4dSAndroid Build Coastguard Worker])
1810*a67afe4dSAndroid Build Coastguard Workerif test -n "$lt_cv_sys_max_cmd_len"; then
1811*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1812*a67afe4dSAndroid Build Coastguard Workerelse
1813*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT(none)
1814*a67afe4dSAndroid Build Coastguard Workerfi
1815*a67afe4dSAndroid Build Coastguard Workermax_cmd_len=$lt_cv_sys_max_cmd_len
1816*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [max_cmd_len], [0],
1817*a67afe4dSAndroid Build Coastguard Worker    [What is the maximum length of a command?])
1818*a67afe4dSAndroid Build Coastguard Worker])# LT_CMD_MAX_LEN
1819*a67afe4dSAndroid Build Coastguard Worker
1820*a67afe4dSAndroid Build Coastguard Worker# Old name:
1821*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1822*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1823*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1824*a67afe4dSAndroid Build Coastguard Worker
1825*a67afe4dSAndroid Build Coastguard Worker
1826*a67afe4dSAndroid Build Coastguard Worker# _LT_HEADER_DLFCN
1827*a67afe4dSAndroid Build Coastguard Worker# ----------------
1828*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_HEADER_DLFCN],
1829*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1830*a67afe4dSAndroid Build Coastguard Worker])# _LT_HEADER_DLFCN
1831*a67afe4dSAndroid Build Coastguard Worker
1832*a67afe4dSAndroid Build Coastguard Worker
1833*a67afe4dSAndroid Build Coastguard Worker# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1834*a67afe4dSAndroid Build Coastguard Worker#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1835*a67afe4dSAndroid Build Coastguard Worker# ----------------------------------------------------------------
1836*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_TRY_DLOPEN_SELF],
1837*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl
1838*a67afe4dSAndroid Build Coastguard Workerif test yes = "$cross_compiling"; then :
1839*a67afe4dSAndroid Build Coastguard Worker  [$4]
1840*a67afe4dSAndroid Build Coastguard Workerelse
1841*a67afe4dSAndroid Build Coastguard Worker  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1842*a67afe4dSAndroid Build Coastguard Worker  lt_status=$lt_dlunknown
1843*a67afe4dSAndroid Build Coastguard Worker  cat > conftest.$ac_ext <<_LT_EOF
1844*a67afe4dSAndroid Build Coastguard Worker[#line $LINENO "configure"
1845*a67afe4dSAndroid Build Coastguard Worker#include "confdefs.h"
1846*a67afe4dSAndroid Build Coastguard Worker
1847*a67afe4dSAndroid Build Coastguard Worker#if HAVE_DLFCN_H
1848*a67afe4dSAndroid Build Coastguard Worker#include <dlfcn.h>
1849*a67afe4dSAndroid Build Coastguard Worker#endif
1850*a67afe4dSAndroid Build Coastguard Worker
1851*a67afe4dSAndroid Build Coastguard Worker#include <stdio.h>
1852*a67afe4dSAndroid Build Coastguard Worker
1853*a67afe4dSAndroid Build Coastguard Worker#ifdef RTLD_GLOBAL
1854*a67afe4dSAndroid Build Coastguard Worker#  define LT_DLGLOBAL		RTLD_GLOBAL
1855*a67afe4dSAndroid Build Coastguard Worker#else
1856*a67afe4dSAndroid Build Coastguard Worker#  ifdef DL_GLOBAL
1857*a67afe4dSAndroid Build Coastguard Worker#    define LT_DLGLOBAL		DL_GLOBAL
1858*a67afe4dSAndroid Build Coastguard Worker#  else
1859*a67afe4dSAndroid Build Coastguard Worker#    define LT_DLGLOBAL		0
1860*a67afe4dSAndroid Build Coastguard Worker#  endif
1861*a67afe4dSAndroid Build Coastguard Worker#endif
1862*a67afe4dSAndroid Build Coastguard Worker
1863*a67afe4dSAndroid Build Coastguard Worker/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1864*a67afe4dSAndroid Build Coastguard Worker   find out it does not work in some platform. */
1865*a67afe4dSAndroid Build Coastguard Worker#ifndef LT_DLLAZY_OR_NOW
1866*a67afe4dSAndroid Build Coastguard Worker#  ifdef RTLD_LAZY
1867*a67afe4dSAndroid Build Coastguard Worker#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1868*a67afe4dSAndroid Build Coastguard Worker#  else
1869*a67afe4dSAndroid Build Coastguard Worker#    ifdef DL_LAZY
1870*a67afe4dSAndroid Build Coastguard Worker#      define LT_DLLAZY_OR_NOW		DL_LAZY
1871*a67afe4dSAndroid Build Coastguard Worker#    else
1872*a67afe4dSAndroid Build Coastguard Worker#      ifdef RTLD_NOW
1873*a67afe4dSAndroid Build Coastguard Worker#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1874*a67afe4dSAndroid Build Coastguard Worker#      else
1875*a67afe4dSAndroid Build Coastguard Worker#        ifdef DL_NOW
1876*a67afe4dSAndroid Build Coastguard Worker#          define LT_DLLAZY_OR_NOW	DL_NOW
1877*a67afe4dSAndroid Build Coastguard Worker#        else
1878*a67afe4dSAndroid Build Coastguard Worker#          define LT_DLLAZY_OR_NOW	0
1879*a67afe4dSAndroid Build Coastguard Worker#        endif
1880*a67afe4dSAndroid Build Coastguard Worker#      endif
1881*a67afe4dSAndroid Build Coastguard Worker#    endif
1882*a67afe4dSAndroid Build Coastguard Worker#  endif
1883*a67afe4dSAndroid Build Coastguard Worker#endif
1884*a67afe4dSAndroid Build Coastguard Worker
1885*a67afe4dSAndroid Build Coastguard Worker/* When -fvisibility=hidden is used, assume the code has been annotated
1886*a67afe4dSAndroid Build Coastguard Worker   correspondingly for the symbols needed.  */
1887*a67afe4dSAndroid Build Coastguard Worker#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1888*a67afe4dSAndroid Build Coastguard Workerint fnord () __attribute__((visibility("default")));
1889*a67afe4dSAndroid Build Coastguard Worker#endif
1890*a67afe4dSAndroid Build Coastguard Worker
1891*a67afe4dSAndroid Build Coastguard Workerint fnord () { return 42; }
1892*a67afe4dSAndroid Build Coastguard Workerint main ()
1893*a67afe4dSAndroid Build Coastguard Worker{
1894*a67afe4dSAndroid Build Coastguard Worker  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1895*a67afe4dSAndroid Build Coastguard Worker  int status = $lt_dlunknown;
1896*a67afe4dSAndroid Build Coastguard Worker
1897*a67afe4dSAndroid Build Coastguard Worker  if (self)
1898*a67afe4dSAndroid Build Coastguard Worker    {
1899*a67afe4dSAndroid Build Coastguard Worker      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1900*a67afe4dSAndroid Build Coastguard Worker      else
1901*a67afe4dSAndroid Build Coastguard Worker        {
1902*a67afe4dSAndroid Build Coastguard Worker	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1903*a67afe4dSAndroid Build Coastguard Worker          else puts (dlerror ());
1904*a67afe4dSAndroid Build Coastguard Worker	}
1905*a67afe4dSAndroid Build Coastguard Worker      /* dlclose (self); */
1906*a67afe4dSAndroid Build Coastguard Worker    }
1907*a67afe4dSAndroid Build Coastguard Worker  else
1908*a67afe4dSAndroid Build Coastguard Worker    puts (dlerror ());
1909*a67afe4dSAndroid Build Coastguard Worker
1910*a67afe4dSAndroid Build Coastguard Worker  return status;
1911*a67afe4dSAndroid Build Coastguard Worker}]
1912*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
1913*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1914*a67afe4dSAndroid Build Coastguard Worker    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1915*a67afe4dSAndroid Build Coastguard Worker    lt_status=$?
1916*a67afe4dSAndroid Build Coastguard Worker    case x$lt_status in
1917*a67afe4dSAndroid Build Coastguard Worker      x$lt_dlno_uscore) $1 ;;
1918*a67afe4dSAndroid Build Coastguard Worker      x$lt_dlneed_uscore) $2 ;;
1919*a67afe4dSAndroid Build Coastguard Worker      x$lt_dlunknown|x*) $3 ;;
1920*a67afe4dSAndroid Build Coastguard Worker    esac
1921*a67afe4dSAndroid Build Coastguard Worker  else :
1922*a67afe4dSAndroid Build Coastguard Worker    # compilation failed
1923*a67afe4dSAndroid Build Coastguard Worker    $3
1924*a67afe4dSAndroid Build Coastguard Worker  fi
1925*a67afe4dSAndroid Build Coastguard Workerfi
1926*a67afe4dSAndroid Build Coastguard Workerrm -fr conftest*
1927*a67afe4dSAndroid Build Coastguard Worker])# _LT_TRY_DLOPEN_SELF
1928*a67afe4dSAndroid Build Coastguard Worker
1929*a67afe4dSAndroid Build Coastguard Worker
1930*a67afe4dSAndroid Build Coastguard Worker# LT_SYS_DLOPEN_SELF
1931*a67afe4dSAndroid Build Coastguard Worker# ------------------
1932*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_SYS_DLOPEN_SELF],
1933*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl
1934*a67afe4dSAndroid Build Coastguard Workerif test yes != "$enable_dlopen"; then
1935*a67afe4dSAndroid Build Coastguard Worker  enable_dlopen=unknown
1936*a67afe4dSAndroid Build Coastguard Worker  enable_dlopen_self=unknown
1937*a67afe4dSAndroid Build Coastguard Worker  enable_dlopen_self_static=unknown
1938*a67afe4dSAndroid Build Coastguard Workerelse
1939*a67afe4dSAndroid Build Coastguard Worker  lt_cv_dlopen=no
1940*a67afe4dSAndroid Build Coastguard Worker  lt_cv_dlopen_libs=
1941*a67afe4dSAndroid Build Coastguard Worker
1942*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
1943*a67afe4dSAndroid Build Coastguard Worker  beos*)
1944*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen=load_add_on
1945*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1946*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_self=yes
1947*a67afe4dSAndroid Build Coastguard Worker    ;;
1948*a67afe4dSAndroid Build Coastguard Worker
1949*a67afe4dSAndroid Build Coastguard Worker  mingw* | pw32* | cegcc*)
1950*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen=LoadLibrary
1951*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1952*a67afe4dSAndroid Build Coastguard Worker    ;;
1953*a67afe4dSAndroid Build Coastguard Worker
1954*a67afe4dSAndroid Build Coastguard Worker  cygwin*)
1955*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen=dlopen
1956*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1957*a67afe4dSAndroid Build Coastguard Worker    ;;
1958*a67afe4dSAndroid Build Coastguard Worker
1959*a67afe4dSAndroid Build Coastguard Worker  darwin*)
1960*a67afe4dSAndroid Build Coastguard Worker    # if libdl is installed we need to link against it
1961*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_LIB([dl], [dlopen],
1962*a67afe4dSAndroid Build Coastguard Worker		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1963*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen=dyld
1964*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1965*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_self=yes
1966*a67afe4dSAndroid Build Coastguard Worker    ])
1967*a67afe4dSAndroid Build Coastguard Worker    ;;
1968*a67afe4dSAndroid Build Coastguard Worker
1969*a67afe4dSAndroid Build Coastguard Worker  tpf*)
1970*a67afe4dSAndroid Build Coastguard Worker    # Don't try to run any link tests for TPF.  We know it's impossible
1971*a67afe4dSAndroid Build Coastguard Worker    # because TPF is a cross-compiler, and we know how we open DSOs.
1972*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen=dlopen
1973*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1974*a67afe4dSAndroid Build Coastguard Worker    lt_cv_dlopen_self=no
1975*a67afe4dSAndroid Build Coastguard Worker    ;;
1976*a67afe4dSAndroid Build Coastguard Worker
1977*a67afe4dSAndroid Build Coastguard Worker  *)
1978*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_FUNC([shl_load],
1979*a67afe4dSAndroid Build Coastguard Worker	  [lt_cv_dlopen=shl_load],
1980*a67afe4dSAndroid Build Coastguard Worker      [AC_CHECK_LIB([dld], [shl_load],
1981*a67afe4dSAndroid Build Coastguard Worker	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1982*a67afe4dSAndroid Build Coastguard Worker	[AC_CHECK_FUNC([dlopen],
1983*a67afe4dSAndroid Build Coastguard Worker	      [lt_cv_dlopen=dlopen],
1984*a67afe4dSAndroid Build Coastguard Worker	  [AC_CHECK_LIB([dl], [dlopen],
1985*a67afe4dSAndroid Build Coastguard Worker		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1986*a67afe4dSAndroid Build Coastguard Worker	    [AC_CHECK_LIB([svld], [dlopen],
1987*a67afe4dSAndroid Build Coastguard Worker		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1988*a67afe4dSAndroid Build Coastguard Worker	      [AC_CHECK_LIB([dld], [dld_link],
1989*a67afe4dSAndroid Build Coastguard Worker		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1990*a67afe4dSAndroid Build Coastguard Worker	      ])
1991*a67afe4dSAndroid Build Coastguard Worker	    ])
1992*a67afe4dSAndroid Build Coastguard Worker	  ])
1993*a67afe4dSAndroid Build Coastguard Worker	])
1994*a67afe4dSAndroid Build Coastguard Worker      ])
1995*a67afe4dSAndroid Build Coastguard Worker    ;;
1996*a67afe4dSAndroid Build Coastguard Worker  esac
1997*a67afe4dSAndroid Build Coastguard Worker
1998*a67afe4dSAndroid Build Coastguard Worker  if test no = "$lt_cv_dlopen"; then
1999*a67afe4dSAndroid Build Coastguard Worker    enable_dlopen=no
2000*a67afe4dSAndroid Build Coastguard Worker  else
2001*a67afe4dSAndroid Build Coastguard Worker    enable_dlopen=yes
2002*a67afe4dSAndroid Build Coastguard Worker  fi
2003*a67afe4dSAndroid Build Coastguard Worker
2004*a67afe4dSAndroid Build Coastguard Worker  case $lt_cv_dlopen in
2005*a67afe4dSAndroid Build Coastguard Worker  dlopen)
2006*a67afe4dSAndroid Build Coastguard Worker    save_CPPFLAGS=$CPPFLAGS
2007*a67afe4dSAndroid Build Coastguard Worker    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2008*a67afe4dSAndroid Build Coastguard Worker
2009*a67afe4dSAndroid Build Coastguard Worker    save_LDFLAGS=$LDFLAGS
2010*a67afe4dSAndroid Build Coastguard Worker    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2011*a67afe4dSAndroid Build Coastguard Worker
2012*a67afe4dSAndroid Build Coastguard Worker    save_LIBS=$LIBS
2013*a67afe4dSAndroid Build Coastguard Worker    LIBS="$lt_cv_dlopen_libs $LIBS"
2014*a67afe4dSAndroid Build Coastguard Worker
2015*a67afe4dSAndroid Build Coastguard Worker    AC_CACHE_CHECK([whether a program can dlopen itself],
2016*a67afe4dSAndroid Build Coastguard Worker	  lt_cv_dlopen_self, [dnl
2017*a67afe4dSAndroid Build Coastguard Worker	  _LT_TRY_DLOPEN_SELF(
2018*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2019*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2020*a67afe4dSAndroid Build Coastguard Worker    ])
2021*a67afe4dSAndroid Build Coastguard Worker
2022*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$lt_cv_dlopen_self"; then
2023*a67afe4dSAndroid Build Coastguard Worker      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2024*a67afe4dSAndroid Build Coastguard Worker      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2025*a67afe4dSAndroid Build Coastguard Worker	  lt_cv_dlopen_self_static, [dnl
2026*a67afe4dSAndroid Build Coastguard Worker	  _LT_TRY_DLOPEN_SELF(
2027*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2028*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2029*a67afe4dSAndroid Build Coastguard Worker      ])
2030*a67afe4dSAndroid Build Coastguard Worker    fi
2031*a67afe4dSAndroid Build Coastguard Worker
2032*a67afe4dSAndroid Build Coastguard Worker    CPPFLAGS=$save_CPPFLAGS
2033*a67afe4dSAndroid Build Coastguard Worker    LDFLAGS=$save_LDFLAGS
2034*a67afe4dSAndroid Build Coastguard Worker    LIBS=$save_LIBS
2035*a67afe4dSAndroid Build Coastguard Worker    ;;
2036*a67afe4dSAndroid Build Coastguard Worker  esac
2037*a67afe4dSAndroid Build Coastguard Worker
2038*a67afe4dSAndroid Build Coastguard Worker  case $lt_cv_dlopen_self in
2039*a67afe4dSAndroid Build Coastguard Worker  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2040*a67afe4dSAndroid Build Coastguard Worker  *) enable_dlopen_self=unknown ;;
2041*a67afe4dSAndroid Build Coastguard Worker  esac
2042*a67afe4dSAndroid Build Coastguard Worker
2043*a67afe4dSAndroid Build Coastguard Worker  case $lt_cv_dlopen_self_static in
2044*a67afe4dSAndroid Build Coastguard Worker  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2045*a67afe4dSAndroid Build Coastguard Worker  *) enable_dlopen_self_static=unknown ;;
2046*a67afe4dSAndroid Build Coastguard Worker  esac
2047*a67afe4dSAndroid Build Coastguard Workerfi
2048*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([dlopen_support], [enable_dlopen], [0],
2049*a67afe4dSAndroid Build Coastguard Worker	 [Whether dlopen is supported])
2050*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2051*a67afe4dSAndroid Build Coastguard Worker	 [Whether dlopen of programs is supported])
2052*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2053*a67afe4dSAndroid Build Coastguard Worker	 [Whether dlopen of statically linked programs is supported])
2054*a67afe4dSAndroid Build Coastguard Worker])# LT_SYS_DLOPEN_SELF
2055*a67afe4dSAndroid Build Coastguard Worker
2056*a67afe4dSAndroid Build Coastguard Worker# Old name:
2057*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2058*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
2059*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2060*a67afe4dSAndroid Build Coastguard Worker
2061*a67afe4dSAndroid Build Coastguard Worker
2062*a67afe4dSAndroid Build Coastguard Worker# _LT_COMPILER_C_O([TAGNAME])
2063*a67afe4dSAndroid Build Coastguard Worker# ---------------------------
2064*a67afe4dSAndroid Build Coastguard Worker# Check to see if options -c and -o are simultaneously supported by compiler.
2065*a67afe4dSAndroid Build Coastguard Worker# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2066*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_C_O],
2067*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
2068*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2069*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
2070*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2071*a67afe4dSAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2072*a67afe4dSAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2073*a67afe4dSAndroid Build Coastguard Worker   $RM -r conftest 2>/dev/null
2074*a67afe4dSAndroid Build Coastguard Worker   mkdir conftest
2075*a67afe4dSAndroid Build Coastguard Worker   cd conftest
2076*a67afe4dSAndroid Build Coastguard Worker   mkdir out
2077*a67afe4dSAndroid Build Coastguard Worker   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2078*a67afe4dSAndroid Build Coastguard Worker
2079*a67afe4dSAndroid Build Coastguard Worker   lt_compiler_flag="-o out/conftest2.$ac_objext"
2080*a67afe4dSAndroid Build Coastguard Worker   # Insert the option either (1) after the last *FLAGS variable, or
2081*a67afe4dSAndroid Build Coastguard Worker   # (2) before a word containing "conftest.", or (3) at the end.
2082*a67afe4dSAndroid Build Coastguard Worker   # Note that $ac_compile itself does not contain backslashes and begins
2083*a67afe4dSAndroid Build Coastguard Worker   # with a dollar sign (not a hyphen), so the echo should work correctly.
2084*a67afe4dSAndroid Build Coastguard Worker   lt_compile=`echo "$ac_compile" | $SED \
2085*a67afe4dSAndroid Build Coastguard Worker   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2086*a67afe4dSAndroid Build Coastguard Worker   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2087*a67afe4dSAndroid Build Coastguard Worker   -e 's:$: $lt_compiler_flag:'`
2088*a67afe4dSAndroid Build Coastguard Worker   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2089*a67afe4dSAndroid Build Coastguard Worker   (eval "$lt_compile" 2>out/conftest.err)
2090*a67afe4dSAndroid Build Coastguard Worker   ac_status=$?
2091*a67afe4dSAndroid Build Coastguard Worker   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2092*a67afe4dSAndroid Build Coastguard Worker   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2093*a67afe4dSAndroid Build Coastguard Worker   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2094*a67afe4dSAndroid Build Coastguard Worker   then
2095*a67afe4dSAndroid Build Coastguard Worker     # The compiler can only warn and ignore the option if not recognized
2096*a67afe4dSAndroid Build Coastguard Worker     # So say no if there are warnings
2097*a67afe4dSAndroid Build Coastguard Worker     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2098*a67afe4dSAndroid Build Coastguard Worker     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2099*a67afe4dSAndroid Build Coastguard Worker     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2100*a67afe4dSAndroid Build Coastguard Worker       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2101*a67afe4dSAndroid Build Coastguard Worker     fi
2102*a67afe4dSAndroid Build Coastguard Worker   fi
2103*a67afe4dSAndroid Build Coastguard Worker   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2104*a67afe4dSAndroid Build Coastguard Worker   $RM conftest*
2105*a67afe4dSAndroid Build Coastguard Worker   # SGI C++ compiler will create directory out/ii_files/ for
2106*a67afe4dSAndroid Build Coastguard Worker   # template instantiation
2107*a67afe4dSAndroid Build Coastguard Worker   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2108*a67afe4dSAndroid Build Coastguard Worker   $RM out/* && rmdir out
2109*a67afe4dSAndroid Build Coastguard Worker   cd ..
2110*a67afe4dSAndroid Build Coastguard Worker   $RM -r conftest
2111*a67afe4dSAndroid Build Coastguard Worker   $RM conftest*
2112*a67afe4dSAndroid Build Coastguard Worker])
2113*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2114*a67afe4dSAndroid Build Coastguard Worker	[Does compiler simultaneously support -c and -o options?])
2115*a67afe4dSAndroid Build Coastguard Worker])# _LT_COMPILER_C_O
2116*a67afe4dSAndroid Build Coastguard Worker
2117*a67afe4dSAndroid Build Coastguard Worker
2118*a67afe4dSAndroid Build Coastguard Worker# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2119*a67afe4dSAndroid Build Coastguard Worker# ----------------------------------
2120*a67afe4dSAndroid Build Coastguard Worker# Check to see if we can do hard links to lock some files if needed
2121*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_FILE_LOCKS],
2122*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_ENABLE_LOCK])dnl
2123*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2124*a67afe4dSAndroid Build Coastguard Worker_LT_COMPILER_C_O([$1])
2125*a67afe4dSAndroid Build Coastguard Worker
2126*a67afe4dSAndroid Build Coastguard Workerhard_links=nottested
2127*a67afe4dSAndroid Build Coastguard Workerif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2128*a67afe4dSAndroid Build Coastguard Worker  # do not overwrite the value of need_locks provided by the user
2129*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([if we can lock with hard links])
2130*a67afe4dSAndroid Build Coastguard Worker  hard_links=yes
2131*a67afe4dSAndroid Build Coastguard Worker  $RM conftest*
2132*a67afe4dSAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2133*a67afe4dSAndroid Build Coastguard Worker  touch conftest.a
2134*a67afe4dSAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>&5 || hard_links=no
2135*a67afe4dSAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2136*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT([$hard_links])
2137*a67afe4dSAndroid Build Coastguard Worker  if test no = "$hard_links"; then
2138*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2139*a67afe4dSAndroid Build Coastguard Worker    need_locks=warn
2140*a67afe4dSAndroid Build Coastguard Worker  fi
2141*a67afe4dSAndroid Build Coastguard Workerelse
2142*a67afe4dSAndroid Build Coastguard Worker  need_locks=no
2143*a67afe4dSAndroid Build Coastguard Workerfi
2144*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2145*a67afe4dSAndroid Build Coastguard Worker])# _LT_COMPILER_FILE_LOCKS
2146*a67afe4dSAndroid Build Coastguard Worker
2147*a67afe4dSAndroid Build Coastguard Worker
2148*a67afe4dSAndroid Build Coastguard Worker# _LT_CHECK_OBJDIR
2149*a67afe4dSAndroid Build Coastguard Worker# ----------------
2150*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_OBJDIR],
2151*a67afe4dSAndroid Build Coastguard Worker[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2152*a67afe4dSAndroid Build Coastguard Worker[rm -f .libs 2>/dev/null
2153*a67afe4dSAndroid Build Coastguard Workermkdir .libs 2>/dev/null
2154*a67afe4dSAndroid Build Coastguard Workerif test -d .libs; then
2155*a67afe4dSAndroid Build Coastguard Worker  lt_cv_objdir=.libs
2156*a67afe4dSAndroid Build Coastguard Workerelse
2157*a67afe4dSAndroid Build Coastguard Worker  # MS-DOS does not allow filenames that begin with a dot.
2158*a67afe4dSAndroid Build Coastguard Worker  lt_cv_objdir=_libs
2159*a67afe4dSAndroid Build Coastguard Workerfi
2160*a67afe4dSAndroid Build Coastguard Workerrmdir .libs 2>/dev/null])
2161*a67afe4dSAndroid Build Coastguard Workerobjdir=$lt_cv_objdir
2162*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [objdir], [0],
2163*a67afe4dSAndroid Build Coastguard Worker         [The name of the directory that contains temporary libtool files])dnl
2164*a67afe4dSAndroid Build Coastguard Workerm4_pattern_allow([LT_OBJDIR])dnl
2165*a67afe4dSAndroid Build Coastguard WorkerAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2166*a67afe4dSAndroid Build Coastguard Worker  [Define to the sub-directory where libtool stores uninstalled libraries.])
2167*a67afe4dSAndroid Build Coastguard Worker])# _LT_CHECK_OBJDIR
2168*a67afe4dSAndroid Build Coastguard Worker
2169*a67afe4dSAndroid Build Coastguard Worker
2170*a67afe4dSAndroid Build Coastguard Worker# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2171*a67afe4dSAndroid Build Coastguard Worker# --------------------------------------
2172*a67afe4dSAndroid Build Coastguard Worker# Check hardcoding attributes.
2173*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2174*a67afe4dSAndroid Build Coastguard Worker[AC_MSG_CHECKING([how to hardcode library paths into programs])
2175*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_action, $1)=
2176*a67afe4dSAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2177*a67afe4dSAndroid Build Coastguard Worker   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2178*a67afe4dSAndroid Build Coastguard Worker   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2179*a67afe4dSAndroid Build Coastguard Worker
2180*a67afe4dSAndroid Build Coastguard Worker  # We can hardcode non-existent directories.
2181*a67afe4dSAndroid Build Coastguard Worker  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2182*a67afe4dSAndroid Build Coastguard Worker     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2183*a67afe4dSAndroid Build Coastguard Worker     # have to relink, otherwise we might link with an installed library
2184*a67afe4dSAndroid Build Coastguard Worker     # when we should be linking with a yet-to-be-installed one
2185*a67afe4dSAndroid Build Coastguard Worker     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2186*a67afe4dSAndroid Build Coastguard Worker     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2187*a67afe4dSAndroid Build Coastguard Worker    # Linking always hardcodes the temporary library directory.
2188*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_action, $1)=relink
2189*a67afe4dSAndroid Build Coastguard Worker  else
2190*a67afe4dSAndroid Build Coastguard Worker    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2191*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_action, $1)=immediate
2192*a67afe4dSAndroid Build Coastguard Worker  fi
2193*a67afe4dSAndroid Build Coastguard Workerelse
2194*a67afe4dSAndroid Build Coastguard Worker  # We cannot hardcode anything, or else we can only hardcode existing
2195*a67afe4dSAndroid Build Coastguard Worker  # directories.
2196*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_action, $1)=unsupported
2197*a67afe4dSAndroid Build Coastguard Workerfi
2198*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2199*a67afe4dSAndroid Build Coastguard Worker
2200*a67afe4dSAndroid Build Coastguard Workerif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2201*a67afe4dSAndroid Build Coastguard Worker   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2202*a67afe4dSAndroid Build Coastguard Worker  # Fast installation is not supported
2203*a67afe4dSAndroid Build Coastguard Worker  enable_fast_install=no
2204*a67afe4dSAndroid Build Coastguard Workerelif test yes = "$shlibpath_overrides_runpath" ||
2205*a67afe4dSAndroid Build Coastguard Worker     test no = "$enable_shared"; then
2206*a67afe4dSAndroid Build Coastguard Worker  # Fast installation is not necessary
2207*a67afe4dSAndroid Build Coastguard Worker  enable_fast_install=needless
2208*a67afe4dSAndroid Build Coastguard Workerfi
2209*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_action], [0],
2210*a67afe4dSAndroid Build Coastguard Worker    [How to hardcode a shared library path into an executable])
2211*a67afe4dSAndroid Build Coastguard Worker])# _LT_LINKER_HARDCODE_LIBPATH
2212*a67afe4dSAndroid Build Coastguard Worker
2213*a67afe4dSAndroid Build Coastguard Worker
2214*a67afe4dSAndroid Build Coastguard Worker# _LT_CMD_STRIPLIB
2215*a67afe4dSAndroid Build Coastguard Worker# ----------------
2216*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CMD_STRIPLIB],
2217*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
2218*a67afe4dSAndroid Build Coastguard Workerstriplib=
2219*a67afe4dSAndroid Build Coastguard Workerold_striplib=
2220*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether stripping libraries is possible])
2221*a67afe4dSAndroid Build Coastguard Workerif test -z "$STRIP"; then
2222*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT([no])
2223*a67afe4dSAndroid Build Coastguard Workerelse
2224*a67afe4dSAndroid Build Coastguard Worker  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2225*a67afe4dSAndroid Build Coastguard Worker    old_striplib="$STRIP --strip-debug"
2226*a67afe4dSAndroid Build Coastguard Worker    striplib="$STRIP --strip-unneeded"
2227*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([yes])
2228*a67afe4dSAndroid Build Coastguard Worker  else
2229*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
2230*a67afe4dSAndroid Build Coastguard Worker    darwin*)
2231*a67afe4dSAndroid Build Coastguard Worker      # FIXME - insert some real tests, host_os isn't really good enough
2232*a67afe4dSAndroid Build Coastguard Worker      striplib="$STRIP -x"
2233*a67afe4dSAndroid Build Coastguard Worker      old_striplib="$STRIP -S"
2234*a67afe4dSAndroid Build Coastguard Worker      AC_MSG_RESULT([yes])
2235*a67afe4dSAndroid Build Coastguard Worker      ;;
2236*a67afe4dSAndroid Build Coastguard Worker    freebsd*)
2237*a67afe4dSAndroid Build Coastguard Worker      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2238*a67afe4dSAndroid Build Coastguard Worker        old_striplib="$STRIP --strip-debug"
2239*a67afe4dSAndroid Build Coastguard Worker        striplib="$STRIP --strip-unneeded"
2240*a67afe4dSAndroid Build Coastguard Worker        AC_MSG_RESULT([yes])
2241*a67afe4dSAndroid Build Coastguard Worker      else
2242*a67afe4dSAndroid Build Coastguard Worker        AC_MSG_RESULT([no])
2243*a67afe4dSAndroid Build Coastguard Worker      fi
2244*a67afe4dSAndroid Build Coastguard Worker      ;;
2245*a67afe4dSAndroid Build Coastguard Worker    *)
2246*a67afe4dSAndroid Build Coastguard Worker      AC_MSG_RESULT([no])
2247*a67afe4dSAndroid Build Coastguard Worker      ;;
2248*a67afe4dSAndroid Build Coastguard Worker    esac
2249*a67afe4dSAndroid Build Coastguard Worker  fi
2250*a67afe4dSAndroid Build Coastguard Workerfi
2251*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2252*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [striplib], [1])
2253*a67afe4dSAndroid Build Coastguard Worker])# _LT_CMD_STRIPLIB
2254*a67afe4dSAndroid Build Coastguard Worker
2255*a67afe4dSAndroid Build Coastguard Worker
2256*a67afe4dSAndroid Build Coastguard Worker# _LT_PREPARE_MUNGE_PATH_LIST
2257*a67afe4dSAndroid Build Coastguard Worker# ---------------------------
2258*a67afe4dSAndroid Build Coastguard Worker# Make sure func_munge_path_list() is defined correctly.
2259*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2260*a67afe4dSAndroid Build Coastguard Worker[[# func_munge_path_list VARIABLE PATH
2261*a67afe4dSAndroid Build Coastguard Worker# -----------------------------------
2262*a67afe4dSAndroid Build Coastguard Worker# VARIABLE is name of variable containing _space_ separated list of
2263*a67afe4dSAndroid Build Coastguard Worker# directories to be munged by the contents of PATH, which is string
2264*a67afe4dSAndroid Build Coastguard Worker# having a format:
2265*a67afe4dSAndroid Build Coastguard Worker# "DIR[:DIR]:"
2266*a67afe4dSAndroid Build Coastguard Worker#       string "DIR[ DIR]" will be prepended to VARIABLE
2267*a67afe4dSAndroid Build Coastguard Worker# ":DIR[:DIR]"
2268*a67afe4dSAndroid Build Coastguard Worker#       string "DIR[ DIR]" will be appended to VARIABLE
2269*a67afe4dSAndroid Build Coastguard Worker# "DIRP[:DIRP]::[DIRA:]DIRA"
2270*a67afe4dSAndroid Build Coastguard Worker#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2271*a67afe4dSAndroid Build Coastguard Worker#       "DIRA[ DIRA]" will be appended to VARIABLE
2272*a67afe4dSAndroid Build Coastguard Worker# "DIR[:DIR]"
2273*a67afe4dSAndroid Build Coastguard Worker#       VARIABLE will be replaced by "DIR[ DIR]"
2274*a67afe4dSAndroid Build Coastguard Workerfunc_munge_path_list ()
2275*a67afe4dSAndroid Build Coastguard Worker{
2276*a67afe4dSAndroid Build Coastguard Worker    case x@S|@2 in
2277*a67afe4dSAndroid Build Coastguard Worker    x)
2278*a67afe4dSAndroid Build Coastguard Worker        ;;
2279*a67afe4dSAndroid Build Coastguard Worker    *:)
2280*a67afe4dSAndroid Build Coastguard Worker        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2281*a67afe4dSAndroid Build Coastguard Worker        ;;
2282*a67afe4dSAndroid Build Coastguard Worker    x:*)
2283*a67afe4dSAndroid Build Coastguard Worker        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2284*a67afe4dSAndroid Build Coastguard Worker        ;;
2285*a67afe4dSAndroid Build Coastguard Worker    *::*)
2286*a67afe4dSAndroid Build Coastguard Worker        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2287*a67afe4dSAndroid Build Coastguard Worker        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2288*a67afe4dSAndroid Build Coastguard Worker        ;;
2289*a67afe4dSAndroid Build Coastguard Worker    *)
2290*a67afe4dSAndroid Build Coastguard Worker        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2291*a67afe4dSAndroid Build Coastguard Worker        ;;
2292*a67afe4dSAndroid Build Coastguard Worker    esac
2293*a67afe4dSAndroid Build Coastguard Worker}
2294*a67afe4dSAndroid Build Coastguard Worker]])# _LT_PREPARE_PATH_LIST
2295*a67afe4dSAndroid Build Coastguard Worker
2296*a67afe4dSAndroid Build Coastguard Worker
2297*a67afe4dSAndroid Build Coastguard Worker# _LT_SYS_DYNAMIC_LINKER([TAG])
2298*a67afe4dSAndroid Build Coastguard Worker# -----------------------------
2299*a67afe4dSAndroid Build Coastguard Worker# PORTME Fill in your ld.so characteristics
2300*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_SYS_DYNAMIC_LINKER],
2301*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2302*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
2303*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2304*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])dnl
2305*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
2306*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2307*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2308*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([dynamic linker characteristics])
2309*a67afe4dSAndroid Build Coastguard Workerm4_if([$1],
2310*a67afe4dSAndroid Build Coastguard Worker	[], [
2311*a67afe4dSAndroid Build Coastguard Workerif test yes = "$GCC"; then
2312*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
2313*a67afe4dSAndroid Build Coastguard Worker    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2314*a67afe4dSAndroid Build Coastguard Worker    *) lt_awk_arg='/^libraries:/' ;;
2315*a67afe4dSAndroid Build Coastguard Worker  esac
2316*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
2317*a67afe4dSAndroid Build Coastguard Worker    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2318*a67afe4dSAndroid Build Coastguard Worker    *) lt_sed_strip_eq='s|=/|/|g' ;;
2319*a67afe4dSAndroid Build Coastguard Worker  esac
2320*a67afe4dSAndroid Build Coastguard Worker  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2321*a67afe4dSAndroid Build Coastguard Worker  case $lt_search_path_spec in
2322*a67afe4dSAndroid Build Coastguard Worker  *\;*)
2323*a67afe4dSAndroid Build Coastguard Worker    # if the path contains ";" then we assume it to be the separator
2324*a67afe4dSAndroid Build Coastguard Worker    # otherwise default to the standard path separator (i.e. ":") - it is
2325*a67afe4dSAndroid Build Coastguard Worker    # assumed that no part of a normal pathname contains ";" but that should
2326*a67afe4dSAndroid Build Coastguard Worker    # okay in the real world where ";" in dirpaths is itself problematic.
2327*a67afe4dSAndroid Build Coastguard Worker    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2328*a67afe4dSAndroid Build Coastguard Worker    ;;
2329*a67afe4dSAndroid Build Coastguard Worker  *)
2330*a67afe4dSAndroid Build Coastguard Worker    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2331*a67afe4dSAndroid Build Coastguard Worker    ;;
2332*a67afe4dSAndroid Build Coastguard Worker  esac
2333*a67afe4dSAndroid Build Coastguard Worker  # Ok, now we have the path, separated by spaces, we can step through it
2334*a67afe4dSAndroid Build Coastguard Worker  # and add multilib dir if necessary...
2335*a67afe4dSAndroid Build Coastguard Worker  lt_tmp_lt_search_path_spec=
2336*a67afe4dSAndroid Build Coastguard Worker  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2337*a67afe4dSAndroid Build Coastguard Worker  # ...but if some path component already ends with the multilib dir we assume
2338*a67afe4dSAndroid Build Coastguard Worker  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2339*a67afe4dSAndroid Build Coastguard Worker  case "$lt_multi_os_dir; $lt_search_path_spec " in
2340*a67afe4dSAndroid Build Coastguard Worker  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2341*a67afe4dSAndroid Build Coastguard Worker    lt_multi_os_dir=
2342*a67afe4dSAndroid Build Coastguard Worker    ;;
2343*a67afe4dSAndroid Build Coastguard Worker  esac
2344*a67afe4dSAndroid Build Coastguard Worker  for lt_sys_path in $lt_search_path_spec; do
2345*a67afe4dSAndroid Build Coastguard Worker    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2346*a67afe4dSAndroid Build Coastguard Worker      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2347*a67afe4dSAndroid Build Coastguard Worker    elif test -n "$lt_multi_os_dir"; then
2348*a67afe4dSAndroid Build Coastguard Worker      test -d "$lt_sys_path" && \
2349*a67afe4dSAndroid Build Coastguard Worker	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2350*a67afe4dSAndroid Build Coastguard Worker    fi
2351*a67afe4dSAndroid Build Coastguard Worker  done
2352*a67afe4dSAndroid Build Coastguard Worker  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2353*a67afe4dSAndroid Build Coastguard WorkerBEGIN {RS = " "; FS = "/|\n";} {
2354*a67afe4dSAndroid Build Coastguard Worker  lt_foo = "";
2355*a67afe4dSAndroid Build Coastguard Worker  lt_count = 0;
2356*a67afe4dSAndroid Build Coastguard Worker  for (lt_i = NF; lt_i > 0; lt_i--) {
2357*a67afe4dSAndroid Build Coastguard Worker    if ($lt_i != "" && $lt_i != ".") {
2358*a67afe4dSAndroid Build Coastguard Worker      if ($lt_i == "..") {
2359*a67afe4dSAndroid Build Coastguard Worker        lt_count++;
2360*a67afe4dSAndroid Build Coastguard Worker      } else {
2361*a67afe4dSAndroid Build Coastguard Worker        if (lt_count == 0) {
2362*a67afe4dSAndroid Build Coastguard Worker          lt_foo = "/" $lt_i lt_foo;
2363*a67afe4dSAndroid Build Coastguard Worker        } else {
2364*a67afe4dSAndroid Build Coastguard Worker          lt_count--;
2365*a67afe4dSAndroid Build Coastguard Worker        }
2366*a67afe4dSAndroid Build Coastguard Worker      }
2367*a67afe4dSAndroid Build Coastguard Worker    }
2368*a67afe4dSAndroid Build Coastguard Worker  }
2369*a67afe4dSAndroid Build Coastguard Worker  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2370*a67afe4dSAndroid Build Coastguard Worker  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2371*a67afe4dSAndroid Build Coastguard Worker}'`
2372*a67afe4dSAndroid Build Coastguard Worker  # AWK program above erroneously prepends '/' to C:/dos/paths
2373*a67afe4dSAndroid Build Coastguard Worker  # for these hosts.
2374*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
2375*a67afe4dSAndroid Build Coastguard Worker    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2376*a67afe4dSAndroid Build Coastguard Worker      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2377*a67afe4dSAndroid Build Coastguard Worker  esac
2378*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2379*a67afe4dSAndroid Build Coastguard Workerelse
2380*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2381*a67afe4dSAndroid Build Coastguard Workerfi])
2382*a67afe4dSAndroid Build Coastguard Workerlibrary_names_spec=
2383*a67afe4dSAndroid Build Coastguard Workerlibname_spec='lib$name'
2384*a67afe4dSAndroid Build Coastguard Workersoname_spec=
2385*a67afe4dSAndroid Build Coastguard Workershrext_cmds=.so
2386*a67afe4dSAndroid Build Coastguard Workerpostinstall_cmds=
2387*a67afe4dSAndroid Build Coastguard Workerpostuninstall_cmds=
2388*a67afe4dSAndroid Build Coastguard Workerfinish_cmds=
2389*a67afe4dSAndroid Build Coastguard Workerfinish_eval=
2390*a67afe4dSAndroid Build Coastguard Workershlibpath_var=
2391*a67afe4dSAndroid Build Coastguard Workershlibpath_overrides_runpath=unknown
2392*a67afe4dSAndroid Build Coastguard Workerversion_type=none
2393*a67afe4dSAndroid Build Coastguard Workerdynamic_linker="$host_os ld.so"
2394*a67afe4dSAndroid Build Coastguard Workersys_lib_dlsearch_path_spec="/lib /usr/lib"
2395*a67afe4dSAndroid Build Coastguard Workerneed_lib_prefix=unknown
2396*a67afe4dSAndroid Build Coastguard Workerhardcode_into_libs=no
2397*a67afe4dSAndroid Build Coastguard Worker
2398*a67afe4dSAndroid Build Coastguard Worker# when you set need_version to no, make sure it does not cause -set_version
2399*a67afe4dSAndroid Build Coastguard Worker# flags to be left without arguments
2400*a67afe4dSAndroid Build Coastguard Workerneed_version=unknown
2401*a67afe4dSAndroid Build Coastguard Worker
2402*a67afe4dSAndroid Build Coastguard WorkerAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2403*a67afe4dSAndroid Build Coastguard Worker[User-defined run-time library search path.])
2404*a67afe4dSAndroid Build Coastguard Worker
2405*a67afe4dSAndroid Build Coastguard Workercase $host_os in
2406*a67afe4dSAndroid Build Coastguard Workeraix3*)
2407*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2408*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2409*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LIBPATH
2410*a67afe4dSAndroid Build Coastguard Worker
2411*a67afe4dSAndroid Build Coastguard Worker  # AIX 3 has no versioning support, so we append a major version to the name.
2412*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2413*a67afe4dSAndroid Build Coastguard Worker  ;;
2414*a67afe4dSAndroid Build Coastguard Worker
2415*a67afe4dSAndroid Build Coastguard Workeraix[[4-9]]*)
2416*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2417*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2418*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2419*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2420*a67afe4dSAndroid Build Coastguard Worker  if test ia64 = "$host_cpu"; then
2421*a67afe4dSAndroid Build Coastguard Worker    # AIX 5 supports IA64
2422*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2423*a67afe4dSAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2424*a67afe4dSAndroid Build Coastguard Worker  else
2425*a67afe4dSAndroid Build Coastguard Worker    # With GCC up to 2.95.x, collect2 would create an import file
2426*a67afe4dSAndroid Build Coastguard Worker    # for dependence libraries.  The import file would start with
2427*a67afe4dSAndroid Build Coastguard Worker    # the line '#! .'.  This would cause the generated library to
2428*a67afe4dSAndroid Build Coastguard Worker    # depend on '.', always an invalid library.  This was fixed in
2429*a67afe4dSAndroid Build Coastguard Worker    # development snapshots of GCC prior to 3.0.
2430*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
2431*a67afe4dSAndroid Build Coastguard Worker      aix4 | aix4.[[01]] | aix4.[[01]].*)
2432*a67afe4dSAndroid Build Coastguard Worker      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2433*a67afe4dSAndroid Build Coastguard Worker	   echo ' yes '
2434*a67afe4dSAndroid Build Coastguard Worker	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2435*a67afe4dSAndroid Build Coastguard Worker	:
2436*a67afe4dSAndroid Build Coastguard Worker      else
2437*a67afe4dSAndroid Build Coastguard Worker	can_build_shared=no
2438*a67afe4dSAndroid Build Coastguard Worker      fi
2439*a67afe4dSAndroid Build Coastguard Worker      ;;
2440*a67afe4dSAndroid Build Coastguard Worker    esac
2441*a67afe4dSAndroid Build Coastguard Worker    # Using Import Files as archive members, it is possible to support
2442*a67afe4dSAndroid Build Coastguard Worker    # filename-based versioning of shared library archives on AIX. While
2443*a67afe4dSAndroid Build Coastguard Worker    # this would work for both with and without runtime linking, it will
2444*a67afe4dSAndroid Build Coastguard Worker    # prevent static linking of such archives. So we do filename-based
2445*a67afe4dSAndroid Build Coastguard Worker    # shared library versioning with .so extension only, which is used
2446*a67afe4dSAndroid Build Coastguard Worker    # when both runtime linking and shared linking is enabled.
2447*a67afe4dSAndroid Build Coastguard Worker    # Unfortunately, runtime linking may impact performance, so we do
2448*a67afe4dSAndroid Build Coastguard Worker    # not want this to be the default eventually. Also, we use the
2449*a67afe4dSAndroid Build Coastguard Worker    # versioned .so libs for executables only if there is the -brtl
2450*a67afe4dSAndroid Build Coastguard Worker    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2451*a67afe4dSAndroid Build Coastguard Worker    # To allow for filename-based versioning support, we need to create
2452*a67afe4dSAndroid Build Coastguard Worker    # libNAME.so.V as an archive file, containing:
2453*a67afe4dSAndroid Build Coastguard Worker    # *) an Import File, referring to the versioned filename of the
2454*a67afe4dSAndroid Build Coastguard Worker    #    archive as well as the shared archive member, telling the
2455*a67afe4dSAndroid Build Coastguard Worker    #    bitwidth (32 or 64) of that shared object, and providing the
2456*a67afe4dSAndroid Build Coastguard Worker    #    list of exported symbols of that shared object, eventually
2457*a67afe4dSAndroid Build Coastguard Worker    #    decorated with the 'weak' keyword
2458*a67afe4dSAndroid Build Coastguard Worker    # *) the shared object with the F_LOADONLY flag set, to really avoid
2459*a67afe4dSAndroid Build Coastguard Worker    #    it being seen by the linker.
2460*a67afe4dSAndroid Build Coastguard Worker    # At run time we better use the real file rather than another symlink,
2461*a67afe4dSAndroid Build Coastguard Worker    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2462*a67afe4dSAndroid Build Coastguard Worker
2463*a67afe4dSAndroid Build Coastguard Worker    case $with_aix_soname,$aix_use_runtimelinking in
2464*a67afe4dSAndroid Build Coastguard Worker    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2465*a67afe4dSAndroid Build Coastguard Worker    # soname into executable. Probably we can add versioning support to
2466*a67afe4dSAndroid Build Coastguard Worker    # collect2, so additional links can be useful in future.
2467*a67afe4dSAndroid Build Coastguard Worker    aix,yes) # traditional libtool
2468*a67afe4dSAndroid Build Coastguard Worker      dynamic_linker='AIX unversionable lib.so'
2469*a67afe4dSAndroid Build Coastguard Worker      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2470*a67afe4dSAndroid Build Coastguard Worker      # instead of lib<name>.a to let people know that these are not
2471*a67afe4dSAndroid Build Coastguard Worker      # typical AIX shared libraries.
2472*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2473*a67afe4dSAndroid Build Coastguard Worker      ;;
2474*a67afe4dSAndroid Build Coastguard Worker    aix,no) # traditional AIX only
2475*a67afe4dSAndroid Build Coastguard Worker      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2476*a67afe4dSAndroid Build Coastguard Worker      # We preserve .a as extension for shared libraries through AIX4.2
2477*a67afe4dSAndroid Build Coastguard Worker      # and later when we are not doing run time linking.
2478*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release.a $libname.a'
2479*a67afe4dSAndroid Build Coastguard Worker      soname_spec='$libname$release$shared_ext$major'
2480*a67afe4dSAndroid Build Coastguard Worker      ;;
2481*a67afe4dSAndroid Build Coastguard Worker    svr4,*) # full svr4 only
2482*a67afe4dSAndroid Build Coastguard Worker      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2483*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2484*a67afe4dSAndroid Build Coastguard Worker      # We do not specify a path in Import Files, so LIBPATH fires.
2485*a67afe4dSAndroid Build Coastguard Worker      shlibpath_overrides_runpath=yes
2486*a67afe4dSAndroid Build Coastguard Worker      ;;
2487*a67afe4dSAndroid Build Coastguard Worker    *,yes) # both, prefer svr4
2488*a67afe4dSAndroid Build Coastguard Worker      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2489*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2490*a67afe4dSAndroid Build Coastguard Worker      # unpreferred sharedlib libNAME.a needs extra handling
2491*a67afe4dSAndroid Build Coastguard Worker      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2492*a67afe4dSAndroid Build Coastguard Worker      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2493*a67afe4dSAndroid Build Coastguard Worker      # We do not specify a path in Import Files, so LIBPATH fires.
2494*a67afe4dSAndroid Build Coastguard Worker      shlibpath_overrides_runpath=yes
2495*a67afe4dSAndroid Build Coastguard Worker      ;;
2496*a67afe4dSAndroid Build Coastguard Worker    *,no) # both, prefer aix
2497*a67afe4dSAndroid Build Coastguard Worker      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2498*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release.a $libname.a'
2499*a67afe4dSAndroid Build Coastguard Worker      soname_spec='$libname$release$shared_ext$major'
2500*a67afe4dSAndroid Build Coastguard Worker      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2501*a67afe4dSAndroid Build Coastguard Worker      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2502*a67afe4dSAndroid Build Coastguard Worker      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2503*a67afe4dSAndroid Build Coastguard Worker      ;;
2504*a67afe4dSAndroid Build Coastguard Worker    esac
2505*a67afe4dSAndroid Build Coastguard Worker    shlibpath_var=LIBPATH
2506*a67afe4dSAndroid Build Coastguard Worker  fi
2507*a67afe4dSAndroid Build Coastguard Worker  ;;
2508*a67afe4dSAndroid Build Coastguard Worker
2509*a67afe4dSAndroid Build Coastguard Workeramigaos*)
2510*a67afe4dSAndroid Build Coastguard Worker  case $host_cpu in
2511*a67afe4dSAndroid Build Coastguard Worker  powerpc)
2512*a67afe4dSAndroid Build Coastguard Worker    # Since July 2007 AmigaOS4 officially supports .so libraries.
2513*a67afe4dSAndroid Build Coastguard Worker    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2514*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2515*a67afe4dSAndroid Build Coastguard Worker    ;;
2516*a67afe4dSAndroid Build Coastguard Worker  m68k)
2517*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname.ixlibrary $libname.a'
2518*a67afe4dSAndroid Build Coastguard Worker    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2519*a67afe4dSAndroid Build Coastguard Worker    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2520*a67afe4dSAndroid Build Coastguard Worker    ;;
2521*a67afe4dSAndroid Build Coastguard Worker  esac
2522*a67afe4dSAndroid Build Coastguard Worker  ;;
2523*a67afe4dSAndroid Build Coastguard Worker
2524*a67afe4dSAndroid Build Coastguard Workerbeos*)
2525*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$shared_ext'
2526*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker="$host_os ld.so"
2527*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LIBRARY_PATH
2528*a67afe4dSAndroid Build Coastguard Worker  ;;
2529*a67afe4dSAndroid Build Coastguard Worker
2530*a67afe4dSAndroid Build Coastguard Workerbsdi[[45]]*)
2531*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2532*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2533*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2534*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2535*a67afe4dSAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2536*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2537*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2538*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2539*a67afe4dSAndroid Build Coastguard Worker  # the default ld.so.conf also contains /usr/contrib/lib and
2540*a67afe4dSAndroid Build Coastguard Worker  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2541*a67afe4dSAndroid Build Coastguard Worker  # libtool to hard-code these into programs
2542*a67afe4dSAndroid Build Coastguard Worker  ;;
2543*a67afe4dSAndroid Build Coastguard Worker
2544*a67afe4dSAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
2545*a67afe4dSAndroid Build Coastguard Worker  version_type=windows
2546*a67afe4dSAndroid Build Coastguard Worker  shrext_cmds=.dll
2547*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2548*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2549*a67afe4dSAndroid Build Coastguard Worker
2550*a67afe4dSAndroid Build Coastguard Worker  case $GCC,$cc_basename in
2551*a67afe4dSAndroid Build Coastguard Worker  yes,*)
2552*a67afe4dSAndroid Build Coastguard Worker    # gcc
2553*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname.dll.a'
2554*a67afe4dSAndroid Build Coastguard Worker    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2555*a67afe4dSAndroid Build Coastguard Worker    postinstall_cmds='base_file=`basename \$file`~
2556*a67afe4dSAndroid Build Coastguard Worker      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2557*a67afe4dSAndroid Build Coastguard Worker      dldir=$destdir/`dirname \$dlpath`~
2558*a67afe4dSAndroid Build Coastguard Worker      test -d \$dldir || mkdir -p \$dldir~
2559*a67afe4dSAndroid Build Coastguard Worker      $install_prog $dir/$dlname \$dldir/$dlname~
2560*a67afe4dSAndroid Build Coastguard Worker      chmod a+x \$dldir/$dlname~
2561*a67afe4dSAndroid Build Coastguard Worker      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2562*a67afe4dSAndroid Build Coastguard Worker        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2563*a67afe4dSAndroid Build Coastguard Worker      fi'
2564*a67afe4dSAndroid Build Coastguard Worker    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2565*a67afe4dSAndroid Build Coastguard Worker      dlpath=$dir/\$dldll~
2566*a67afe4dSAndroid Build Coastguard Worker       $RM \$dlpath'
2567*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2568*a67afe4dSAndroid Build Coastguard Worker
2569*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
2570*a67afe4dSAndroid Build Coastguard Worker    cygwin*)
2571*a67afe4dSAndroid Build Coastguard Worker      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2572*a67afe4dSAndroid Build Coastguard Worker      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2573*a67afe4dSAndroid Build Coastguard Workerm4_if([$1], [],[
2574*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2575*a67afe4dSAndroid Build Coastguard Worker      ;;
2576*a67afe4dSAndroid Build Coastguard Worker    mingw* | cegcc*)
2577*a67afe4dSAndroid Build Coastguard Worker      # MinGW DLLs use traditional 'lib' prefix
2578*a67afe4dSAndroid Build Coastguard Worker      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2579*a67afe4dSAndroid Build Coastguard Worker      ;;
2580*a67afe4dSAndroid Build Coastguard Worker    pw32*)
2581*a67afe4dSAndroid Build Coastguard Worker      # pw32 DLLs use 'pw' prefix rather than 'lib'
2582*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2583*a67afe4dSAndroid Build Coastguard Worker      ;;
2584*a67afe4dSAndroid Build Coastguard Worker    esac
2585*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker='Win32 ld.exe'
2586*a67afe4dSAndroid Build Coastguard Worker    ;;
2587*a67afe4dSAndroid Build Coastguard Worker
2588*a67afe4dSAndroid Build Coastguard Worker  *,cl* | *,icl*)
2589*a67afe4dSAndroid Build Coastguard Worker    # Native MSVC or ICC
2590*a67afe4dSAndroid Build Coastguard Worker    libname_spec='$name'
2591*a67afe4dSAndroid Build Coastguard Worker    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2592*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname.dll.lib'
2593*a67afe4dSAndroid Build Coastguard Worker
2594*a67afe4dSAndroid Build Coastguard Worker    case $build_os in
2595*a67afe4dSAndroid Build Coastguard Worker    mingw*)
2596*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec=
2597*a67afe4dSAndroid Build Coastguard Worker      lt_save_ifs=$IFS
2598*a67afe4dSAndroid Build Coastguard Worker      IFS=';'
2599*a67afe4dSAndroid Build Coastguard Worker      for lt_path in $LIB
2600*a67afe4dSAndroid Build Coastguard Worker      do
2601*a67afe4dSAndroid Build Coastguard Worker        IFS=$lt_save_ifs
2602*a67afe4dSAndroid Build Coastguard Worker        # Let DOS variable expansion print the short 8.3 style file name.
2603*a67afe4dSAndroid Build Coastguard Worker        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2604*a67afe4dSAndroid Build Coastguard Worker        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2605*a67afe4dSAndroid Build Coastguard Worker      done
2606*a67afe4dSAndroid Build Coastguard Worker      IFS=$lt_save_ifs
2607*a67afe4dSAndroid Build Coastguard Worker      # Convert to MSYS style.
2608*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2609*a67afe4dSAndroid Build Coastguard Worker      ;;
2610*a67afe4dSAndroid Build Coastguard Worker    cygwin*)
2611*a67afe4dSAndroid Build Coastguard Worker      # Convert to unix form, then to dos form, then back to unix form
2612*a67afe4dSAndroid Build Coastguard Worker      # but this time dos style (no spaces!) so that the unix form looks
2613*a67afe4dSAndroid Build Coastguard Worker      # like /cygdrive/c/PROGRA~1:/cygdr...
2614*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2615*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2616*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2617*a67afe4dSAndroid Build Coastguard Worker      ;;
2618*a67afe4dSAndroid Build Coastguard Worker    *)
2619*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec=$LIB
2620*a67afe4dSAndroid Build Coastguard Worker      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2621*a67afe4dSAndroid Build Coastguard Worker        # It is most probably a Windows format PATH.
2622*a67afe4dSAndroid Build Coastguard Worker        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2623*a67afe4dSAndroid Build Coastguard Worker      else
2624*a67afe4dSAndroid Build Coastguard Worker        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2625*a67afe4dSAndroid Build Coastguard Worker      fi
2626*a67afe4dSAndroid Build Coastguard Worker      # FIXME: find the short name or the path components, as spaces are
2627*a67afe4dSAndroid Build Coastguard Worker      # common. (e.g. "Program Files" -> "PROGRA~1")
2628*a67afe4dSAndroid Build Coastguard Worker      ;;
2629*a67afe4dSAndroid Build Coastguard Worker    esac
2630*a67afe4dSAndroid Build Coastguard Worker
2631*a67afe4dSAndroid Build Coastguard Worker    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2632*a67afe4dSAndroid Build Coastguard Worker    postinstall_cmds='base_file=`basename \$file`~
2633*a67afe4dSAndroid Build Coastguard Worker      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2634*a67afe4dSAndroid Build Coastguard Worker      dldir=$destdir/`dirname \$dlpath`~
2635*a67afe4dSAndroid Build Coastguard Worker      test -d \$dldir || mkdir -p \$dldir~
2636*a67afe4dSAndroid Build Coastguard Worker      $install_prog $dir/$dlname \$dldir/$dlname'
2637*a67afe4dSAndroid Build Coastguard Worker    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2638*a67afe4dSAndroid Build Coastguard Worker      dlpath=$dir/\$dldll~
2639*a67afe4dSAndroid Build Coastguard Worker       $RM \$dlpath'
2640*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2641*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker='Win32 link.exe'
2642*a67afe4dSAndroid Build Coastguard Worker    ;;
2643*a67afe4dSAndroid Build Coastguard Worker
2644*a67afe4dSAndroid Build Coastguard Worker  *)
2645*a67afe4dSAndroid Build Coastguard Worker    # Assume MSVC and ICC wrapper
2646*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2647*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker='Win32 ld.exe'
2648*a67afe4dSAndroid Build Coastguard Worker    ;;
2649*a67afe4dSAndroid Build Coastguard Worker  esac
2650*a67afe4dSAndroid Build Coastguard Worker  # FIXME: first we should search . and the directory the executable is in
2651*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=PATH
2652*a67afe4dSAndroid Build Coastguard Worker  ;;
2653*a67afe4dSAndroid Build Coastguard Worker
2654*a67afe4dSAndroid Build Coastguard Workerdarwin* | rhapsody*)
2655*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker="$host_os dyld"
2656*a67afe4dSAndroid Build Coastguard Worker  version_type=darwin
2657*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2658*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2659*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2660*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$major$shared_ext'
2661*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2662*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=DYLD_LIBRARY_PATH
2663*a67afe4dSAndroid Build Coastguard Worker  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2664*a67afe4dSAndroid Build Coastguard Workerm4_if([$1], [],[
2665*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2666*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2667*a67afe4dSAndroid Build Coastguard Worker  ;;
2668*a67afe4dSAndroid Build Coastguard Worker
2669*a67afe4dSAndroid Build Coastguard Workerdgux*)
2670*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2671*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2672*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2673*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2674*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2675*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2676*a67afe4dSAndroid Build Coastguard Worker  ;;
2677*a67afe4dSAndroid Build Coastguard Worker
2678*a67afe4dSAndroid Build Coastguard Workerfreebsd* | dragonfly* | midnightbsd*)
2679*a67afe4dSAndroid Build Coastguard Worker  # DragonFly does not have aout.  When/if they implement a new
2680*a67afe4dSAndroid Build Coastguard Worker  # versioning mechanism, adjust this.
2681*a67afe4dSAndroid Build Coastguard Worker  if test -x /usr/bin/objformat; then
2682*a67afe4dSAndroid Build Coastguard Worker    objformat=`/usr/bin/objformat`
2683*a67afe4dSAndroid Build Coastguard Worker  else
2684*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
2685*a67afe4dSAndroid Build Coastguard Worker    freebsd[[23]].*) objformat=aout ;;
2686*a67afe4dSAndroid Build Coastguard Worker    *) objformat=elf ;;
2687*a67afe4dSAndroid Build Coastguard Worker    esac
2688*a67afe4dSAndroid Build Coastguard Worker  fi
2689*a67afe4dSAndroid Build Coastguard Worker  version_type=freebsd-$objformat
2690*a67afe4dSAndroid Build Coastguard Worker  case $version_type in
2691*a67afe4dSAndroid Build Coastguard Worker    freebsd-elf*)
2692*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2693*a67afe4dSAndroid Build Coastguard Worker      soname_spec='$libname$release$shared_ext$major'
2694*a67afe4dSAndroid Build Coastguard Worker      need_version=no
2695*a67afe4dSAndroid Build Coastguard Worker      need_lib_prefix=no
2696*a67afe4dSAndroid Build Coastguard Worker      ;;
2697*a67afe4dSAndroid Build Coastguard Worker    freebsd-*)
2698*a67afe4dSAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2699*a67afe4dSAndroid Build Coastguard Worker      need_version=yes
2700*a67afe4dSAndroid Build Coastguard Worker      ;;
2701*a67afe4dSAndroid Build Coastguard Worker  esac
2702*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2703*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
2704*a67afe4dSAndroid Build Coastguard Worker  freebsd2.*)
2705*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2706*a67afe4dSAndroid Build Coastguard Worker    ;;
2707*a67afe4dSAndroid Build Coastguard Worker  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2708*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2709*a67afe4dSAndroid Build Coastguard Worker    hardcode_into_libs=yes
2710*a67afe4dSAndroid Build Coastguard Worker    ;;
2711*a67afe4dSAndroid Build Coastguard Worker  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2712*a67afe4dSAndroid Build Coastguard Worker  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2713*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=no
2714*a67afe4dSAndroid Build Coastguard Worker    hardcode_into_libs=yes
2715*a67afe4dSAndroid Build Coastguard Worker    ;;
2716*a67afe4dSAndroid Build Coastguard Worker  *) # from 4.6 on, and DragonFly
2717*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2718*a67afe4dSAndroid Build Coastguard Worker    hardcode_into_libs=yes
2719*a67afe4dSAndroid Build Coastguard Worker    ;;
2720*a67afe4dSAndroid Build Coastguard Worker  esac
2721*a67afe4dSAndroid Build Coastguard Worker  ;;
2722*a67afe4dSAndroid Build Coastguard Worker
2723*a67afe4dSAndroid Build Coastguard Workerhaiku*)
2724*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2725*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2726*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2727*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker="$host_os runtime_loader"
2728*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2729*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2730*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LIBRARY_PATH
2731*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2732*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2733*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2734*a67afe4dSAndroid Build Coastguard Worker  ;;
2735*a67afe4dSAndroid Build Coastguard Worker
2736*a67afe4dSAndroid Build Coastguard Workerhpux9* | hpux10* | hpux11*)
2737*a67afe4dSAndroid Build Coastguard Worker  # Give a soname corresponding to the major version so that dld.sl refuses to
2738*a67afe4dSAndroid Build Coastguard Worker  # link against other versions.
2739*a67afe4dSAndroid Build Coastguard Worker  version_type=sunos
2740*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2741*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2742*a67afe4dSAndroid Build Coastguard Worker  case $host_cpu in
2743*a67afe4dSAndroid Build Coastguard Worker  ia64*)
2744*a67afe4dSAndroid Build Coastguard Worker    shrext_cmds='.so'
2745*a67afe4dSAndroid Build Coastguard Worker    hardcode_into_libs=yes
2746*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.so"
2747*a67afe4dSAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2748*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2749*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2750*a67afe4dSAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2751*a67afe4dSAndroid Build Coastguard Worker    if test 32 = "$HPUX_IA64_MODE"; then
2752*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2753*a67afe4dSAndroid Build Coastguard Worker      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2754*a67afe4dSAndroid Build Coastguard Worker    else
2755*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2756*a67afe4dSAndroid Build Coastguard Worker      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2757*a67afe4dSAndroid Build Coastguard Worker    fi
2758*a67afe4dSAndroid Build Coastguard Worker    ;;
2759*a67afe4dSAndroid Build Coastguard Worker  hppa*64*)
2760*a67afe4dSAndroid Build Coastguard Worker    shrext_cmds='.sl'
2761*a67afe4dSAndroid Build Coastguard Worker    hardcode_into_libs=yes
2762*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.sl"
2763*a67afe4dSAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2764*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2765*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2766*a67afe4dSAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2767*a67afe4dSAndroid Build Coastguard Worker    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2768*a67afe4dSAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2769*a67afe4dSAndroid Build Coastguard Worker    ;;
2770*a67afe4dSAndroid Build Coastguard Worker  *)
2771*a67afe4dSAndroid Build Coastguard Worker    shrext_cmds='.sl'
2772*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.sl"
2773*a67afe4dSAndroid Build Coastguard Worker    shlibpath_var=SHLIB_PATH
2774*a67afe4dSAndroid Build Coastguard Worker    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2775*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2776*a67afe4dSAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2777*a67afe4dSAndroid Build Coastguard Worker    ;;
2778*a67afe4dSAndroid Build Coastguard Worker  esac
2779*a67afe4dSAndroid Build Coastguard Worker  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2780*a67afe4dSAndroid Build Coastguard Worker  postinstall_cmds='chmod 555 $lib'
2781*a67afe4dSAndroid Build Coastguard Worker  # or fails outright, so override atomically:
2782*a67afe4dSAndroid Build Coastguard Worker  install_override_mode=555
2783*a67afe4dSAndroid Build Coastguard Worker  ;;
2784*a67afe4dSAndroid Build Coastguard Worker
2785*a67afe4dSAndroid Build Coastguard Workerinterix[[3-9]]*)
2786*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2787*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2788*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2789*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2790*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2791*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2792*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2793*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2794*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2795*a67afe4dSAndroid Build Coastguard Worker  ;;
2796*a67afe4dSAndroid Build Coastguard Worker
2797*a67afe4dSAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*)
2798*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
2799*a67afe4dSAndroid Build Coastguard Worker    nonstopux*) version_type=nonstopux ;;
2800*a67afe4dSAndroid Build Coastguard Worker    *)
2801*a67afe4dSAndroid Build Coastguard Worker	if test yes = "$lt_cv_prog_gnu_ld"; then
2802*a67afe4dSAndroid Build Coastguard Worker		version_type=linux # correct to gnu/linux during the next big refactor
2803*a67afe4dSAndroid Build Coastguard Worker	else
2804*a67afe4dSAndroid Build Coastguard Worker		version_type=irix
2805*a67afe4dSAndroid Build Coastguard Worker	fi ;;
2806*a67afe4dSAndroid Build Coastguard Worker  esac
2807*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2808*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2809*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2810*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2811*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
2812*a67afe4dSAndroid Build Coastguard Worker  irix5* | nonstopux*)
2813*a67afe4dSAndroid Build Coastguard Worker    libsuff= shlibsuff=
2814*a67afe4dSAndroid Build Coastguard Worker    ;;
2815*a67afe4dSAndroid Build Coastguard Worker  *)
2816*a67afe4dSAndroid Build Coastguard Worker    case $LD in # libtool.m4 will add one of these switches to LD
2817*a67afe4dSAndroid Build Coastguard Worker    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2818*a67afe4dSAndroid Build Coastguard Worker      libsuff= shlibsuff= libmagic=32-bit;;
2819*a67afe4dSAndroid Build Coastguard Worker    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2820*a67afe4dSAndroid Build Coastguard Worker      libsuff=32 shlibsuff=N32 libmagic=N32;;
2821*a67afe4dSAndroid Build Coastguard Worker    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2822*a67afe4dSAndroid Build Coastguard Worker      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2823*a67afe4dSAndroid Build Coastguard Worker    *) libsuff= shlibsuff= libmagic=never-match;;
2824*a67afe4dSAndroid Build Coastguard Worker    esac
2825*a67afe4dSAndroid Build Coastguard Worker    ;;
2826*a67afe4dSAndroid Build Coastguard Worker  esac
2827*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2828*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2829*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2830*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2831*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2832*a67afe4dSAndroid Build Coastguard Worker  ;;
2833*a67afe4dSAndroid Build Coastguard Worker
2834*a67afe4dSAndroid Build Coastguard Worker# No shared lib support for Linux oldld, aout, or coff.
2835*a67afe4dSAndroid Build Coastguard Workerlinux*oldld* | linux*aout* | linux*coff*)
2836*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker=no
2837*a67afe4dSAndroid Build Coastguard Worker  ;;
2838*a67afe4dSAndroid Build Coastguard Worker
2839*a67afe4dSAndroid Build Coastguard Workerlinux*android*)
2840*a67afe4dSAndroid Build Coastguard Worker  version_type=none # Android doesn't support versioned libraries.
2841*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2842*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2843*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext'
2844*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext'
2845*a67afe4dSAndroid Build Coastguard Worker  finish_cmds=
2846*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2847*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2848*a67afe4dSAndroid Build Coastguard Worker
2849*a67afe4dSAndroid Build Coastguard Worker  # This implies no fast_install, which is unacceptable.
2850*a67afe4dSAndroid Build Coastguard Worker  # Some rework will be needed to allow for fast_install
2851*a67afe4dSAndroid Build Coastguard Worker  # before this can be enabled.
2852*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2853*a67afe4dSAndroid Build Coastguard Worker
2854*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker='Android linker'
2855*a67afe4dSAndroid Build Coastguard Worker  # Don't embed -rpath directories since the linker doesn't support them.
2856*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2857*a67afe4dSAndroid Build Coastguard Worker  ;;
2858*a67afe4dSAndroid Build Coastguard Worker
2859*a67afe4dSAndroid Build Coastguard Worker# This must be glibc/ELF.
2860*a67afe4dSAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2861*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2862*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2863*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2864*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2865*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2866*a67afe4dSAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2867*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2868*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2869*a67afe4dSAndroid Build Coastguard Worker
2870*a67afe4dSAndroid Build Coastguard Worker  # Some binutils ld are patched to set DT_RUNPATH
2871*a67afe4dSAndroid Build Coastguard Worker  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2872*a67afe4dSAndroid Build Coastguard Worker    [lt_cv_shlibpath_overrides_runpath=no
2873*a67afe4dSAndroid Build Coastguard Worker    save_LDFLAGS=$LDFLAGS
2874*a67afe4dSAndroid Build Coastguard Worker    save_libdir=$libdir
2875*a67afe4dSAndroid Build Coastguard Worker    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2876*a67afe4dSAndroid Build Coastguard Worker	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2877*a67afe4dSAndroid Build Coastguard Worker    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2878*a67afe4dSAndroid Build Coastguard Worker      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2879*a67afe4dSAndroid Build Coastguard Worker	 [lt_cv_shlibpath_overrides_runpath=yes])])
2880*a67afe4dSAndroid Build Coastguard Worker    LDFLAGS=$save_LDFLAGS
2881*a67afe4dSAndroid Build Coastguard Worker    libdir=$save_libdir
2882*a67afe4dSAndroid Build Coastguard Worker    ])
2883*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2884*a67afe4dSAndroid Build Coastguard Worker
2885*a67afe4dSAndroid Build Coastguard Worker  # This implies no fast_install, which is unacceptable.
2886*a67afe4dSAndroid Build Coastguard Worker  # Some rework will be needed to allow for fast_install
2887*a67afe4dSAndroid Build Coastguard Worker  # before this can be enabled.
2888*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2889*a67afe4dSAndroid Build Coastguard Worker
2890*a67afe4dSAndroid Build Coastguard Worker  # Ideally, we could use ldconfig to report *all* directores which are
2891*a67afe4dSAndroid Build Coastguard Worker  # searched for libraries, however this is still not possible.  Aside from not
2892*a67afe4dSAndroid Build Coastguard Worker  # being certain /sbin/ldconfig is available, command
2893*a67afe4dSAndroid Build Coastguard Worker  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2894*a67afe4dSAndroid Build Coastguard Worker  # even though it is searched at run-time.  Try to do the best guess by
2895*a67afe4dSAndroid Build Coastguard Worker  # appending ld.so.conf contents (and includes) to the search path.
2896*a67afe4dSAndroid Build Coastguard Worker  if test -f /etc/ld.so.conf; then
2897*a67afe4dSAndroid Build Coastguard Worker    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2898*a67afe4dSAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2899*a67afe4dSAndroid Build Coastguard Worker  fi
2900*a67afe4dSAndroid Build Coastguard Worker
2901*a67afe4dSAndroid Build Coastguard Worker  # We used to test for /lib/ld.so.1 and disable shared libraries on
2902*a67afe4dSAndroid Build Coastguard Worker  # powerpc, because MkLinux only supported shared libraries with the
2903*a67afe4dSAndroid Build Coastguard Worker  # GNU dynamic linker.  Since this was broken with cross compilers,
2904*a67afe4dSAndroid Build Coastguard Worker  # most powerpc-linux boxes support dynamic linking these days and
2905*a67afe4dSAndroid Build Coastguard Worker  # people can always --disable-shared, the test was removed, and we
2906*a67afe4dSAndroid Build Coastguard Worker  # assume the GNU/Linux dynamic linker is in use.
2907*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker='GNU/Linux ld.so'
2908*a67afe4dSAndroid Build Coastguard Worker  ;;
2909*a67afe4dSAndroid Build Coastguard Worker
2910*a67afe4dSAndroid Build Coastguard Workernetbsd*)
2911*a67afe4dSAndroid Build Coastguard Worker  version_type=sunos
2912*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2913*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2914*a67afe4dSAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2915*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2916*a67afe4dSAndroid Build Coastguard Worker    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2917*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker='NetBSD (a.out) ld.so'
2918*a67afe4dSAndroid Build Coastguard Worker  else
2919*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2920*a67afe4dSAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2921*a67afe4dSAndroid Build Coastguard Worker    dynamic_linker='NetBSD ld.elf_so'
2922*a67afe4dSAndroid Build Coastguard Worker  fi
2923*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2924*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2925*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2926*a67afe4dSAndroid Build Coastguard Worker  ;;
2927*a67afe4dSAndroid Build Coastguard Worker
2928*a67afe4dSAndroid Build Coastguard Workernewsos6)
2929*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2930*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2932*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2933*a67afe4dSAndroid Build Coastguard Worker  ;;
2934*a67afe4dSAndroid Build Coastguard Worker
2935*a67afe4dSAndroid Build Coastguard Worker*nto* | *qnx*)
2936*a67afe4dSAndroid Build Coastguard Worker  version_type=qnx
2937*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2938*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2939*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2940*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2941*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2942*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2943*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
2944*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker='ldqnx.so'
2945*a67afe4dSAndroid Build Coastguard Worker  ;;
2946*a67afe4dSAndroid Build Coastguard Worker
2947*a67afe4dSAndroid Build Coastguard Workeropenbsd* | bitrig*)
2948*a67afe4dSAndroid Build Coastguard Worker  version_type=sunos
2949*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=/usr/lib
2950*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2951*a67afe4dSAndroid Build Coastguard Worker  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2952*a67afe4dSAndroid Build Coastguard Worker    need_version=no
2953*a67afe4dSAndroid Build Coastguard Worker  else
2954*a67afe4dSAndroid Build Coastguard Worker    need_version=yes
2955*a67afe4dSAndroid Build Coastguard Worker  fi
2956*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2957*a67afe4dSAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2958*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2959*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2960*a67afe4dSAndroid Build Coastguard Worker  ;;
2961*a67afe4dSAndroid Build Coastguard Worker
2962*a67afe4dSAndroid Build Coastguard Workeros2*)
2963*a67afe4dSAndroid Build Coastguard Worker  libname_spec='$name'
2964*a67afe4dSAndroid Build Coastguard Worker  version_type=windows
2965*a67afe4dSAndroid Build Coastguard Worker  shrext_cmds=.dll
2966*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2967*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2968*a67afe4dSAndroid Build Coastguard Worker  # OS/2 can only load a DLL with a base name of 8 characters or less.
2969*a67afe4dSAndroid Build Coastguard Worker  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2970*a67afe4dSAndroid Build Coastguard Worker    v=$($ECHO $release$versuffix | tr -d .-);
2971*a67afe4dSAndroid Build Coastguard Worker    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2972*a67afe4dSAndroid Build Coastguard Worker    $ECHO $n$v`$shared_ext'
2973*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='${libname}_dll.$libext'
2974*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker='OS/2 ld.exe'
2975*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=BEGINLIBPATH
2976*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2977*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2978*a67afe4dSAndroid Build Coastguard Worker  postinstall_cmds='base_file=`basename \$file`~
2979*a67afe4dSAndroid Build Coastguard Worker    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2980*a67afe4dSAndroid Build Coastguard Worker    dldir=$destdir/`dirname \$dlpath`~
2981*a67afe4dSAndroid Build Coastguard Worker    test -d \$dldir || mkdir -p \$dldir~
2982*a67afe4dSAndroid Build Coastguard Worker    $install_prog $dir/$dlname \$dldir/$dlname~
2983*a67afe4dSAndroid Build Coastguard Worker    chmod a+x \$dldir/$dlname~
2984*a67afe4dSAndroid Build Coastguard Worker    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2985*a67afe4dSAndroid Build Coastguard Worker      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2986*a67afe4dSAndroid Build Coastguard Worker    fi'
2987*a67afe4dSAndroid Build Coastguard Worker  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2988*a67afe4dSAndroid Build Coastguard Worker    dlpath=$dir/\$dldll~
2989*a67afe4dSAndroid Build Coastguard Worker    $RM \$dlpath'
2990*a67afe4dSAndroid Build Coastguard Worker  ;;
2991*a67afe4dSAndroid Build Coastguard Worker
2992*a67afe4dSAndroid Build Coastguard Workerosf3* | osf4* | osf5*)
2993*a67afe4dSAndroid Build Coastguard Worker  version_type=osf
2994*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
2995*a67afe4dSAndroid Build Coastguard Worker  need_version=no
2996*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2997*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2998*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2999*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3000*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3001*a67afe4dSAndroid Build Coastguard Worker  ;;
3002*a67afe4dSAndroid Build Coastguard Worker
3003*a67afe4dSAndroid Build Coastguard Workerrdos*)
3004*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker=no
3005*a67afe4dSAndroid Build Coastguard Worker  ;;
3006*a67afe4dSAndroid Build Coastguard Worker
3007*a67afe4dSAndroid Build Coastguard Workersolaris*)
3008*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3009*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
3010*a67afe4dSAndroid Build Coastguard Worker  need_version=no
3011*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3012*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3013*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3014*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
3015*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
3016*a67afe4dSAndroid Build Coastguard Worker  # ldd complains unless libraries are executable
3017*a67afe4dSAndroid Build Coastguard Worker  postinstall_cmds='chmod +x $lib'
3018*a67afe4dSAndroid Build Coastguard Worker  ;;
3019*a67afe4dSAndroid Build Coastguard Worker
3020*a67afe4dSAndroid Build Coastguard Workersunos4*)
3021*a67afe4dSAndroid Build Coastguard Worker  version_type=sunos
3022*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3023*a67afe4dSAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3024*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3025*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
3026*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$with_gnu_ld"; then
3027*a67afe4dSAndroid Build Coastguard Worker    need_lib_prefix=no
3028*a67afe4dSAndroid Build Coastguard Worker  fi
3029*a67afe4dSAndroid Build Coastguard Worker  need_version=yes
3030*a67afe4dSAndroid Build Coastguard Worker  ;;
3031*a67afe4dSAndroid Build Coastguard Worker
3032*a67afe4dSAndroid Build Coastguard Workersysv4 | sysv4.3*)
3033*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3034*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3035*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3036*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3037*a67afe4dSAndroid Build Coastguard Worker  case $host_vendor in
3038*a67afe4dSAndroid Build Coastguard Worker    sni)
3039*a67afe4dSAndroid Build Coastguard Worker      shlibpath_overrides_runpath=no
3040*a67afe4dSAndroid Build Coastguard Worker      need_lib_prefix=no
3041*a67afe4dSAndroid Build Coastguard Worker      runpath_var=LD_RUN_PATH
3042*a67afe4dSAndroid Build Coastguard Worker      ;;
3043*a67afe4dSAndroid Build Coastguard Worker    siemens)
3044*a67afe4dSAndroid Build Coastguard Worker      need_lib_prefix=no
3045*a67afe4dSAndroid Build Coastguard Worker      ;;
3046*a67afe4dSAndroid Build Coastguard Worker    motorola)
3047*a67afe4dSAndroid Build Coastguard Worker      need_lib_prefix=no
3048*a67afe4dSAndroid Build Coastguard Worker      need_version=no
3049*a67afe4dSAndroid Build Coastguard Worker      shlibpath_overrides_runpath=no
3050*a67afe4dSAndroid Build Coastguard Worker      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3051*a67afe4dSAndroid Build Coastguard Worker      ;;
3052*a67afe4dSAndroid Build Coastguard Worker  esac
3053*a67afe4dSAndroid Build Coastguard Worker  ;;
3054*a67afe4dSAndroid Build Coastguard Worker
3055*a67afe4dSAndroid Build Coastguard Workersysv4*MP*)
3056*a67afe4dSAndroid Build Coastguard Worker  if test -d /usr/nec; then
3057*a67afe4dSAndroid Build Coastguard Worker    version_type=linux # correct to gnu/linux during the next big refactor
3058*a67afe4dSAndroid Build Coastguard Worker    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3059*a67afe4dSAndroid Build Coastguard Worker    soname_spec='$libname$shared_ext.$major'
3060*a67afe4dSAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
3061*a67afe4dSAndroid Build Coastguard Worker  fi
3062*a67afe4dSAndroid Build Coastguard Worker  ;;
3063*a67afe4dSAndroid Build Coastguard Worker
3064*a67afe4dSAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3065*a67afe4dSAndroid Build Coastguard Worker  version_type=sco
3066*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
3067*a67afe4dSAndroid Build Coastguard Worker  need_version=no
3068*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3069*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3070*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3071*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
3072*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
3073*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$with_gnu_ld"; then
3074*a67afe4dSAndroid Build Coastguard Worker    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3075*a67afe4dSAndroid Build Coastguard Worker  else
3076*a67afe4dSAndroid Build Coastguard Worker    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3077*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
3078*a67afe4dSAndroid Build Coastguard Worker      sco3.2v5*)
3079*a67afe4dSAndroid Build Coastguard Worker        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3080*a67afe4dSAndroid Build Coastguard Worker	;;
3081*a67afe4dSAndroid Build Coastguard Worker    esac
3082*a67afe4dSAndroid Build Coastguard Worker  fi
3083*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/usr/lib'
3084*a67afe4dSAndroid Build Coastguard Worker  ;;
3085*a67afe4dSAndroid Build Coastguard Worker
3086*a67afe4dSAndroid Build Coastguard Workertpf*)
3087*a67afe4dSAndroid Build Coastguard Worker  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3088*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3089*a67afe4dSAndroid Build Coastguard Worker  need_lib_prefix=no
3090*a67afe4dSAndroid Build Coastguard Worker  need_version=no
3091*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3092*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3093*a67afe4dSAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
3094*a67afe4dSAndroid Build Coastguard Worker  hardcode_into_libs=yes
3095*a67afe4dSAndroid Build Coastguard Worker  ;;
3096*a67afe4dSAndroid Build Coastguard Worker
3097*a67afe4dSAndroid Build Coastguard Workeruts4*)
3098*a67afe4dSAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3099*a67afe4dSAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3100*a67afe4dSAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3101*a67afe4dSAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3102*a67afe4dSAndroid Build Coastguard Worker  ;;
3103*a67afe4dSAndroid Build Coastguard Worker
3104*a67afe4dSAndroid Build Coastguard Worker*)
3105*a67afe4dSAndroid Build Coastguard Worker  dynamic_linker=no
3106*a67afe4dSAndroid Build Coastguard Worker  ;;
3107*a67afe4dSAndroid Build Coastguard Workeresac
3108*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_RESULT([$dynamic_linker])
3109*a67afe4dSAndroid Build Coastguard Workertest no = "$dynamic_linker" && can_build_shared=no
3110*a67afe4dSAndroid Build Coastguard Worker
3111*a67afe4dSAndroid Build Coastguard Workervariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3112*a67afe4dSAndroid Build Coastguard Workerif test yes = "$GCC"; then
3113*a67afe4dSAndroid Build Coastguard Worker  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3114*a67afe4dSAndroid Build Coastguard Workerfi
3115*a67afe4dSAndroid Build Coastguard Worker
3116*a67afe4dSAndroid Build Coastguard Workerif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3117*a67afe4dSAndroid Build Coastguard Worker  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3118*a67afe4dSAndroid Build Coastguard Workerfi
3119*a67afe4dSAndroid Build Coastguard Worker
3120*a67afe4dSAndroid Build Coastguard Workerif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3121*a67afe4dSAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3122*a67afe4dSAndroid Build Coastguard Workerfi
3123*a67afe4dSAndroid Build Coastguard Worker
3124*a67afe4dSAndroid Build Coastguard Worker# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3125*a67afe4dSAndroid Build Coastguard Workerconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3126*a67afe4dSAndroid Build Coastguard Worker
3127*a67afe4dSAndroid Build Coastguard Worker# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3128*a67afe4dSAndroid Build Coastguard Workerfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3129*a67afe4dSAndroid Build Coastguard Worker
3130*a67afe4dSAndroid Build Coastguard Worker# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3131*a67afe4dSAndroid Build Coastguard Workerconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3132*a67afe4dSAndroid Build Coastguard Worker
3133*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [variables_saved_for_relink], [1],
3134*a67afe4dSAndroid Build Coastguard Worker    [Variables whose values should be saved in libtool wrapper scripts and
3135*a67afe4dSAndroid Build Coastguard Worker    restored at link time])
3136*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [need_lib_prefix], [0],
3137*a67afe4dSAndroid Build Coastguard Worker    [Do we need the "lib" prefix for modules?])
3138*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3139*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [version_type], [0], [Library versioning type])
3140*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3141*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3142*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_overrides_runpath], [0],
3143*a67afe4dSAndroid Build Coastguard Worker    [Is shlibpath searched before the hard-coded library search path?])
3144*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3145*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [library_names_spec], [1],
3146*a67afe4dSAndroid Build Coastguard Worker    [[List of archive names.  First name is the real one, the rest are links.
3147*a67afe4dSAndroid Build Coastguard Worker    The last name is the one that the linker finds with -lNAME]])
3148*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [soname_spec], [1],
3149*a67afe4dSAndroid Build Coastguard Worker    [[The coded name of the library, if different from the real name]])
3150*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [install_override_mode], [1],
3151*a67afe4dSAndroid Build Coastguard Worker    [Permission mode override for installation of shared libraries])
3152*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [postinstall_cmds], [2],
3153*a67afe4dSAndroid Build Coastguard Worker    [Command to use after installation of a shared archive])
3154*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [postuninstall_cmds], [2],
3155*a67afe4dSAndroid Build Coastguard Worker    [Command to use after uninstallation of a shared archive])
3156*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [finish_cmds], [2],
3157*a67afe4dSAndroid Build Coastguard Worker    [Commands used to finish a libtool library installation in a directory])
3158*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [finish_eval], [1],
3159*a67afe4dSAndroid Build Coastguard Worker    [[As "finish_cmds", except a single script fragment to be evaled but
3160*a67afe4dSAndroid Build Coastguard Worker    not shown]])
3161*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [hardcode_into_libs], [0],
3162*a67afe4dSAndroid Build Coastguard Worker    [Whether we should hardcode library paths into libraries])
3163*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [sys_lib_search_path_spec], [2],
3164*a67afe4dSAndroid Build Coastguard Worker    [Compile-time system search path for libraries])
3165*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3166*a67afe4dSAndroid Build Coastguard Worker    [Detected run-time system search path for libraries])
3167*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3168*a67afe4dSAndroid Build Coastguard Worker    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3169*a67afe4dSAndroid Build Coastguard Worker])# _LT_SYS_DYNAMIC_LINKER
3170*a67afe4dSAndroid Build Coastguard Worker
3171*a67afe4dSAndroid Build Coastguard Worker
3172*a67afe4dSAndroid Build Coastguard Worker# _LT_PATH_TOOL_PREFIX(TOOL)
3173*a67afe4dSAndroid Build Coastguard Worker# --------------------------
3174*a67afe4dSAndroid Build Coastguard Worker# find a file program that can recognize shared library
3175*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([_LT_PATH_TOOL_PREFIX],
3176*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl
3177*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([for $1])
3178*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3179*a67afe4dSAndroid Build Coastguard Worker[case $MAGIC_CMD in
3180*a67afe4dSAndroid Build Coastguard Worker[[\\/*] |  ?:[\\/]*])
3181*a67afe4dSAndroid Build Coastguard Worker  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3182*a67afe4dSAndroid Build Coastguard Worker  ;;
3183*a67afe4dSAndroid Build Coastguard Worker*)
3184*a67afe4dSAndroid Build Coastguard Worker  lt_save_MAGIC_CMD=$MAGIC_CMD
3185*a67afe4dSAndroid Build Coastguard Worker  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3186*a67afe4dSAndroid Build Coastguard Workerdnl $ac_dummy forces splitting on constant user-supplied paths.
3187*a67afe4dSAndroid Build Coastguard Workerdnl POSIX.2 word splitting is done only on the output of word expansions,
3188*a67afe4dSAndroid Build Coastguard Workerdnl not every word.  This closes a longstanding sh security hole.
3189*a67afe4dSAndroid Build Coastguard Worker  ac_dummy="m4_if([$2], , $PATH, [$2])"
3190*a67afe4dSAndroid Build Coastguard Worker  for ac_dir in $ac_dummy; do
3191*a67afe4dSAndroid Build Coastguard Worker    IFS=$lt_save_ifs
3192*a67afe4dSAndroid Build Coastguard Worker    test -z "$ac_dir" && ac_dir=.
3193*a67afe4dSAndroid Build Coastguard Worker    if test -f "$ac_dir/$1"; then
3194*a67afe4dSAndroid Build Coastguard Worker      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3195*a67afe4dSAndroid Build Coastguard Worker      if test -n "$file_magic_test_file"; then
3196*a67afe4dSAndroid Build Coastguard Worker	case $deplibs_check_method in
3197*a67afe4dSAndroid Build Coastguard Worker	"file_magic "*)
3198*a67afe4dSAndroid Build Coastguard Worker	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3199*a67afe4dSAndroid Build Coastguard Worker	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3200*a67afe4dSAndroid Build Coastguard Worker	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3201*a67afe4dSAndroid Build Coastguard Worker	    $EGREP "$file_magic_regex" > /dev/null; then
3202*a67afe4dSAndroid Build Coastguard Worker	    :
3203*a67afe4dSAndroid Build Coastguard Worker	  else
3204*a67afe4dSAndroid Build Coastguard Worker	    cat <<_LT_EOF 1>&2
3205*a67afe4dSAndroid Build Coastguard Worker
3206*a67afe4dSAndroid Build Coastguard Worker*** Warning: the command libtool uses to detect shared libraries,
3207*a67afe4dSAndroid Build Coastguard Worker*** $file_magic_cmd, produces output that libtool cannot recognize.
3208*a67afe4dSAndroid Build Coastguard Worker*** The result is that libtool may fail to recognize shared libraries
3209*a67afe4dSAndroid Build Coastguard Worker*** as such.  This will affect the creation of libtool libraries that
3210*a67afe4dSAndroid Build Coastguard Worker*** depend on shared libraries, but programs linked with such libtool
3211*a67afe4dSAndroid Build Coastguard Worker*** libraries will work regardless of this problem.  Nevertheless, you
3212*a67afe4dSAndroid Build Coastguard Worker*** may want to report the problem to your system manager and/or to
3213*a67afe4dSAndroid Build Coastguard Worker*** [email protected]
3214*a67afe4dSAndroid Build Coastguard Worker
3215*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
3216*a67afe4dSAndroid Build Coastguard Worker	  fi ;;
3217*a67afe4dSAndroid Build Coastguard Worker	esac
3218*a67afe4dSAndroid Build Coastguard Worker      fi
3219*a67afe4dSAndroid Build Coastguard Worker      break
3220*a67afe4dSAndroid Build Coastguard Worker    fi
3221*a67afe4dSAndroid Build Coastguard Worker  done
3222*a67afe4dSAndroid Build Coastguard Worker  IFS=$lt_save_ifs
3223*a67afe4dSAndroid Build Coastguard Worker  MAGIC_CMD=$lt_save_MAGIC_CMD
3224*a67afe4dSAndroid Build Coastguard Worker  ;;
3225*a67afe4dSAndroid Build Coastguard Workeresac])
3226*a67afe4dSAndroid Build Coastguard WorkerMAGIC_CMD=$lt_cv_path_MAGIC_CMD
3227*a67afe4dSAndroid Build Coastguard Workerif test -n "$MAGIC_CMD"; then
3228*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT($MAGIC_CMD)
3229*a67afe4dSAndroid Build Coastguard Workerelse
3230*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT(no)
3231*a67afe4dSAndroid Build Coastguard Workerfi
3232*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [MAGIC_CMD], [0],
3233*a67afe4dSAndroid Build Coastguard Worker	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3234*a67afe4dSAndroid Build Coastguard Worker])# _LT_PATH_TOOL_PREFIX
3235*a67afe4dSAndroid Build Coastguard Worker
3236*a67afe4dSAndroid Build Coastguard Worker# Old name:
3237*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3238*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3239*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3240*a67afe4dSAndroid Build Coastguard Worker
3241*a67afe4dSAndroid Build Coastguard Worker
3242*a67afe4dSAndroid Build Coastguard Worker# _LT_PATH_MAGIC
3243*a67afe4dSAndroid Build Coastguard Worker# --------------
3244*a67afe4dSAndroid Build Coastguard Worker# find a file program that can recognize a shared library
3245*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PATH_MAGIC],
3246*a67afe4dSAndroid Build Coastguard Worker[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3247*a67afe4dSAndroid Build Coastguard Workerif test -z "$lt_cv_path_MAGIC_CMD"; then
3248*a67afe4dSAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
3249*a67afe4dSAndroid Build Coastguard Worker    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3250*a67afe4dSAndroid Build Coastguard Worker  else
3251*a67afe4dSAndroid Build Coastguard Worker    MAGIC_CMD=:
3252*a67afe4dSAndroid Build Coastguard Worker  fi
3253*a67afe4dSAndroid Build Coastguard Workerfi
3254*a67afe4dSAndroid Build Coastguard Worker])# _LT_PATH_MAGIC
3255*a67afe4dSAndroid Build Coastguard Worker
3256*a67afe4dSAndroid Build Coastguard Worker
3257*a67afe4dSAndroid Build Coastguard Worker# LT_PATH_LD
3258*a67afe4dSAndroid Build Coastguard Worker# ----------
3259*a67afe4dSAndroid Build Coastguard Worker# find the pathname to the GNU or non-GNU linker
3260*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_LD],
3261*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
3262*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_HOST])dnl
3263*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3264*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
3265*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
3266*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3267*a67afe4dSAndroid Build Coastguard Worker
3268*a67afe4dSAndroid Build Coastguard WorkerAC_ARG_WITH([gnu-ld],
3269*a67afe4dSAndroid Build Coastguard Worker    [AS_HELP_STRING([--with-gnu-ld],
3270*a67afe4dSAndroid Build Coastguard Worker	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3271*a67afe4dSAndroid Build Coastguard Worker    [test no = "$withval" || with_gnu_ld=yes],
3272*a67afe4dSAndroid Build Coastguard Worker    [with_gnu_ld=no])dnl
3273*a67afe4dSAndroid Build Coastguard Worker
3274*a67afe4dSAndroid Build Coastguard Workerac_prog=ld
3275*a67afe4dSAndroid Build Coastguard Workerif test yes = "$GCC"; then
3276*a67afe4dSAndroid Build Coastguard Worker  # Check if gcc -print-prog-name=ld gives a path.
3277*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([for ld used by $CC])
3278*a67afe4dSAndroid Build Coastguard Worker  case $host in
3279*a67afe4dSAndroid Build Coastguard Worker  *-*-mingw*)
3280*a67afe4dSAndroid Build Coastguard Worker    # gcc leaves a trailing carriage return, which upsets mingw
3281*a67afe4dSAndroid Build Coastguard Worker    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3282*a67afe4dSAndroid Build Coastguard Worker  *)
3283*a67afe4dSAndroid Build Coastguard Worker    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3284*a67afe4dSAndroid Build Coastguard Worker  esac
3285*a67afe4dSAndroid Build Coastguard Worker  case $ac_prog in
3286*a67afe4dSAndroid Build Coastguard Worker    # Accept absolute paths.
3287*a67afe4dSAndroid Build Coastguard Worker    [[\\/]]* | ?:[[\\/]]*)
3288*a67afe4dSAndroid Build Coastguard Worker      re_direlt='/[[^/]][[^/]]*/\.\./'
3289*a67afe4dSAndroid Build Coastguard Worker      # Canonicalize the pathname of ld
3290*a67afe4dSAndroid Build Coastguard Worker      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3291*a67afe4dSAndroid Build Coastguard Worker      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3292*a67afe4dSAndroid Build Coastguard Worker	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3293*a67afe4dSAndroid Build Coastguard Worker      done
3294*a67afe4dSAndroid Build Coastguard Worker      test -z "$LD" && LD=$ac_prog
3295*a67afe4dSAndroid Build Coastguard Worker      ;;
3296*a67afe4dSAndroid Build Coastguard Worker  "")
3297*a67afe4dSAndroid Build Coastguard Worker    # If it fails, then pretend we aren't using GCC.
3298*a67afe4dSAndroid Build Coastguard Worker    ac_prog=ld
3299*a67afe4dSAndroid Build Coastguard Worker    ;;
3300*a67afe4dSAndroid Build Coastguard Worker  *)
3301*a67afe4dSAndroid Build Coastguard Worker    # If it is relative, then search for the first ld in PATH.
3302*a67afe4dSAndroid Build Coastguard Worker    with_gnu_ld=unknown
3303*a67afe4dSAndroid Build Coastguard Worker    ;;
3304*a67afe4dSAndroid Build Coastguard Worker  esac
3305*a67afe4dSAndroid Build Coastguard Workerelif test yes = "$with_gnu_ld"; then
3306*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([for GNU ld])
3307*a67afe4dSAndroid Build Coastguard Workerelse
3308*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([for non-GNU ld])
3309*a67afe4dSAndroid Build Coastguard Workerfi
3310*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_LD,
3311*a67afe4dSAndroid Build Coastguard Worker[if test -z "$LD"; then
3312*a67afe4dSAndroid Build Coastguard Worker  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3313*a67afe4dSAndroid Build Coastguard Worker  for ac_dir in $PATH; do
3314*a67afe4dSAndroid Build Coastguard Worker    IFS=$lt_save_ifs
3315*a67afe4dSAndroid Build Coastguard Worker    test -z "$ac_dir" && ac_dir=.
3316*a67afe4dSAndroid Build Coastguard Worker    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3317*a67afe4dSAndroid Build Coastguard Worker      lt_cv_path_LD=$ac_dir/$ac_prog
3318*a67afe4dSAndroid Build Coastguard Worker      # Check to see if the program is GNU ld.  I'd rather use --version,
3319*a67afe4dSAndroid Build Coastguard Worker      # but apparently some variants of GNU ld only accept -v.
3320*a67afe4dSAndroid Build Coastguard Worker      # Break only if it was the GNU/non-GNU ld that we prefer.
3321*a67afe4dSAndroid Build Coastguard Worker      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3322*a67afe4dSAndroid Build Coastguard Worker      *GNU* | *'with BFD'*)
3323*a67afe4dSAndroid Build Coastguard Worker	test no != "$with_gnu_ld" && break
3324*a67afe4dSAndroid Build Coastguard Worker	;;
3325*a67afe4dSAndroid Build Coastguard Worker      *)
3326*a67afe4dSAndroid Build Coastguard Worker	test yes != "$with_gnu_ld" && break
3327*a67afe4dSAndroid Build Coastguard Worker	;;
3328*a67afe4dSAndroid Build Coastguard Worker      esac
3329*a67afe4dSAndroid Build Coastguard Worker    fi
3330*a67afe4dSAndroid Build Coastguard Worker  done
3331*a67afe4dSAndroid Build Coastguard Worker  IFS=$lt_save_ifs
3332*a67afe4dSAndroid Build Coastguard Workerelse
3333*a67afe4dSAndroid Build Coastguard Worker  lt_cv_path_LD=$LD # Let the user override the test with a path.
3334*a67afe4dSAndroid Build Coastguard Workerfi])
3335*a67afe4dSAndroid Build Coastguard WorkerLD=$lt_cv_path_LD
3336*a67afe4dSAndroid Build Coastguard Workerif test -n "$LD"; then
3337*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT($LD)
3338*a67afe4dSAndroid Build Coastguard Workerelse
3339*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT(no)
3340*a67afe4dSAndroid Build Coastguard Workerfi
3341*a67afe4dSAndroid Build Coastguard Workertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3342*a67afe4dSAndroid Build Coastguard Worker_LT_PATH_LD_GNU
3343*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([LD])
3344*a67afe4dSAndroid Build Coastguard Worker
3345*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3346*a67afe4dSAndroid Build Coastguard Worker])# LT_PATH_LD
3347*a67afe4dSAndroid Build Coastguard Worker
3348*a67afe4dSAndroid Build Coastguard Worker# Old names:
3349*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3350*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3351*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3352*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LD], [])
3353*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LD], [])
3354*a67afe4dSAndroid Build Coastguard Worker
3355*a67afe4dSAndroid Build Coastguard Worker
3356*a67afe4dSAndroid Build Coastguard Worker# _LT_PATH_LD_GNU
3357*a67afe4dSAndroid Build Coastguard Worker#- --------------
3358*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PATH_LD_GNU],
3359*a67afe4dSAndroid Build Coastguard Worker[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3360*a67afe4dSAndroid Build Coastguard Worker[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3361*a67afe4dSAndroid Build Coastguard Workercase `$LD -v 2>&1 </dev/null` in
3362*a67afe4dSAndroid Build Coastguard Worker*GNU* | *'with BFD'*)
3363*a67afe4dSAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=yes
3364*a67afe4dSAndroid Build Coastguard Worker  ;;
3365*a67afe4dSAndroid Build Coastguard Worker*)
3366*a67afe4dSAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=no
3367*a67afe4dSAndroid Build Coastguard Worker  ;;
3368*a67afe4dSAndroid Build Coastguard Workeresac])
3369*a67afe4dSAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld
3370*a67afe4dSAndroid Build Coastguard Worker])# _LT_PATH_LD_GNU
3371*a67afe4dSAndroid Build Coastguard Worker
3372*a67afe4dSAndroid Build Coastguard Worker
3373*a67afe4dSAndroid Build Coastguard Worker# _LT_CMD_RELOAD
3374*a67afe4dSAndroid Build Coastguard Worker# --------------
3375*a67afe4dSAndroid Build Coastguard Worker# find reload flag for linker
3376*a67afe4dSAndroid Build Coastguard Worker#   -- PORTME Some linkers may need a different reload flag.
3377*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CMD_RELOAD],
3378*a67afe4dSAndroid Build Coastguard Worker[AC_CACHE_CHECK([for $LD option to reload object files],
3379*a67afe4dSAndroid Build Coastguard Worker  lt_cv_ld_reload_flag,
3380*a67afe4dSAndroid Build Coastguard Worker  [lt_cv_ld_reload_flag='-r'])
3381*a67afe4dSAndroid Build Coastguard Workerreload_flag=$lt_cv_ld_reload_flag
3382*a67afe4dSAndroid Build Coastguard Workercase $reload_flag in
3383*a67afe4dSAndroid Build Coastguard Worker"" | " "*) ;;
3384*a67afe4dSAndroid Build Coastguard Worker*) reload_flag=" $reload_flag" ;;
3385*a67afe4dSAndroid Build Coastguard Workeresac
3386*a67afe4dSAndroid Build Coastguard Workerreload_cmds='$LD$reload_flag -o $output$reload_objs'
3387*a67afe4dSAndroid Build Coastguard Workercase $host_os in
3388*a67afe4dSAndroid Build Coastguard Worker  cygwin* | mingw* | pw32* | cegcc*)
3389*a67afe4dSAndroid Build Coastguard Worker    if test yes != "$GCC"; then
3390*a67afe4dSAndroid Build Coastguard Worker      reload_cmds=false
3391*a67afe4dSAndroid Build Coastguard Worker    fi
3392*a67afe4dSAndroid Build Coastguard Worker    ;;
3393*a67afe4dSAndroid Build Coastguard Worker  darwin*)
3394*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$GCC"; then
3395*a67afe4dSAndroid Build Coastguard Worker      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3396*a67afe4dSAndroid Build Coastguard Worker    else
3397*a67afe4dSAndroid Build Coastguard Worker      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3398*a67afe4dSAndroid Build Coastguard Worker    fi
3399*a67afe4dSAndroid Build Coastguard Worker    ;;
3400*a67afe4dSAndroid Build Coastguard Workeresac
3401*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3402*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_cmds], [2])dnl
3403*a67afe4dSAndroid Build Coastguard Worker])# _LT_CMD_RELOAD
3404*a67afe4dSAndroid Build Coastguard Worker
3405*a67afe4dSAndroid Build Coastguard Worker
3406*a67afe4dSAndroid Build Coastguard Worker# _LT_PATH_DD
3407*a67afe4dSAndroid Build Coastguard Worker# -----------
3408*a67afe4dSAndroid Build Coastguard Worker# find a working dd
3409*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PATH_DD],
3410*a67afe4dSAndroid Build Coastguard Worker[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3411*a67afe4dSAndroid Build Coastguard Worker[printf 0123456789abcdef0123456789abcdef >conftest.i
3412*a67afe4dSAndroid Build Coastguard Workercat conftest.i conftest.i >conftest2.i
3413*a67afe4dSAndroid Build Coastguard Worker: ${lt_DD:=$DD}
3414*a67afe4dSAndroid Build Coastguard WorkerAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3415*a67afe4dSAndroid Build Coastguard Worker[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3416*a67afe4dSAndroid Build Coastguard Worker  cmp -s conftest.i conftest.out \
3417*a67afe4dSAndroid Build Coastguard Worker  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3418*a67afe4dSAndroid Build Coastguard Workerfi])
3419*a67afe4dSAndroid Build Coastguard Workerrm -f conftest.i conftest2.i conftest.out])
3420*a67afe4dSAndroid Build Coastguard Worker])# _LT_PATH_DD
3421*a67afe4dSAndroid Build Coastguard Worker
3422*a67afe4dSAndroid Build Coastguard Worker
3423*a67afe4dSAndroid Build Coastguard Worker# _LT_CMD_TRUNCATE
3424*a67afe4dSAndroid Build Coastguard Worker# ----------------
3425*a67afe4dSAndroid Build Coastguard Worker# find command to truncate a binary pipe
3426*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CMD_TRUNCATE],
3427*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_PATH_DD])
3428*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3429*a67afe4dSAndroid Build Coastguard Worker[printf 0123456789abcdef0123456789abcdef >conftest.i
3430*a67afe4dSAndroid Build Coastguard Workercat conftest.i conftest.i >conftest2.i
3431*a67afe4dSAndroid Build Coastguard Workerlt_cv_truncate_bin=
3432*a67afe4dSAndroid Build Coastguard Workerif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3433*a67afe4dSAndroid Build Coastguard Worker  cmp -s conftest.i conftest.out \
3434*a67afe4dSAndroid Build Coastguard Worker  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3435*a67afe4dSAndroid Build Coastguard Workerfi
3436*a67afe4dSAndroid Build Coastguard Workerrm -f conftest.i conftest2.i conftest.out
3437*a67afe4dSAndroid Build Coastguard Workertest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3438*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3439*a67afe4dSAndroid Build Coastguard Worker  [Command to truncate a binary pipe])
3440*a67afe4dSAndroid Build Coastguard Worker])# _LT_CMD_TRUNCATE
3441*a67afe4dSAndroid Build Coastguard Worker
3442*a67afe4dSAndroid Build Coastguard Worker
3443*a67afe4dSAndroid Build Coastguard Worker# _LT_CHECK_MAGIC_METHOD
3444*a67afe4dSAndroid Build Coastguard Worker# ----------------------
3445*a67afe4dSAndroid Build Coastguard Worker# how to check for library dependencies
3446*a67afe4dSAndroid Build Coastguard Worker#  -- PORTME fill in with the dynamic library characteristics
3447*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_MAGIC_METHOD],
3448*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
3449*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])
3450*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to recognize dependent libraries],
3451*a67afe4dSAndroid Build Coastguard Workerlt_cv_deplibs_check_method,
3452*a67afe4dSAndroid Build Coastguard Worker[lt_cv_file_magic_cmd='$MAGIC_CMD'
3453*a67afe4dSAndroid Build Coastguard Workerlt_cv_file_magic_test_file=
3454*a67afe4dSAndroid Build Coastguard Workerlt_cv_deplibs_check_method='unknown'
3455*a67afe4dSAndroid Build Coastguard Worker# Need to set the preceding variable on all platforms that support
3456*a67afe4dSAndroid Build Coastguard Worker# interlibrary dependencies.
3457*a67afe4dSAndroid Build Coastguard Worker# 'none' -- dependencies not supported.
3458*a67afe4dSAndroid Build Coastguard Worker# 'unknown' -- same as none, but documents that we really don't know.
3459*a67afe4dSAndroid Build Coastguard Worker# 'pass_all' -- all dependencies passed with no checks.
3460*a67afe4dSAndroid Build Coastguard Worker# 'test_compile' -- check by making test program.
3461*a67afe4dSAndroid Build Coastguard Worker# 'file_magic [[regex]]' -- check by looking for files in library path
3462*a67afe4dSAndroid Build Coastguard Worker# that responds to the $file_magic_cmd with a given extended regex.
3463*a67afe4dSAndroid Build Coastguard Worker# If you have 'file' or equivalent on your system and you're not sure
3464*a67afe4dSAndroid Build Coastguard Worker# whether 'pass_all' will *always* work, you probably want this one.
3465*a67afe4dSAndroid Build Coastguard Worker
3466*a67afe4dSAndroid Build Coastguard Workercase $host_os in
3467*a67afe4dSAndroid Build Coastguard Workeraix[[4-9]]*)
3468*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3469*a67afe4dSAndroid Build Coastguard Worker  ;;
3470*a67afe4dSAndroid Build Coastguard Worker
3471*a67afe4dSAndroid Build Coastguard Workerbeos*)
3472*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3473*a67afe4dSAndroid Build Coastguard Worker  ;;
3474*a67afe4dSAndroid Build Coastguard Worker
3475*a67afe4dSAndroid Build Coastguard Workerbsdi[[45]]*)
3476*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3477*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='$FILECMD -L'
3478*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_test_file=/shlib/libc.so
3479*a67afe4dSAndroid Build Coastguard Worker  ;;
3480*a67afe4dSAndroid Build Coastguard Worker
3481*a67afe4dSAndroid Build Coastguard Workercygwin*)
3482*a67afe4dSAndroid Build Coastguard Worker  # func_win32_libid is a shell function defined in ltmain.sh
3483*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3484*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='func_win32_libid'
3485*a67afe4dSAndroid Build Coastguard Worker  ;;
3486*a67afe4dSAndroid Build Coastguard Worker
3487*a67afe4dSAndroid Build Coastguard Workermingw* | pw32*)
3488*a67afe4dSAndroid Build Coastguard Worker  # Base MSYS/MinGW do not provide the 'file' command needed by
3489*a67afe4dSAndroid Build Coastguard Worker  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3490*a67afe4dSAndroid Build Coastguard Worker  # unless we find 'file', for example because we are cross-compiling.
3491*a67afe4dSAndroid Build Coastguard Worker  if ( file / ) >/dev/null 2>&1; then
3492*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3493*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='func_win32_libid'
3494*a67afe4dSAndroid Build Coastguard Worker  else
3495*a67afe4dSAndroid Build Coastguard Worker    # Keep this pattern in sync with the one in func_win32_libid.
3496*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3497*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='$OBJDUMP -f'
3498*a67afe4dSAndroid Build Coastguard Worker  fi
3499*a67afe4dSAndroid Build Coastguard Worker  ;;
3500*a67afe4dSAndroid Build Coastguard Worker
3501*a67afe4dSAndroid Build Coastguard Workercegcc*)
3502*a67afe4dSAndroid Build Coastguard Worker  # use the weaker test based on 'objdump'. See mingw*.
3503*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3504*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='$OBJDUMP -f'
3505*a67afe4dSAndroid Build Coastguard Worker  ;;
3506*a67afe4dSAndroid Build Coastguard Worker
3507*a67afe4dSAndroid Build Coastguard Workerdarwin* | rhapsody*)
3508*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3509*a67afe4dSAndroid Build Coastguard Worker  ;;
3510*a67afe4dSAndroid Build Coastguard Worker
3511*a67afe4dSAndroid Build Coastguard Workerfreebsd* | dragonfly* | midnightbsd*)
3512*a67afe4dSAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3513*a67afe4dSAndroid Build Coastguard Worker    case $host_cpu in
3514*a67afe4dSAndroid Build Coastguard Worker    i*86 )
3515*a67afe4dSAndroid Build Coastguard Worker      # Not sure whether the presence of OpenBSD here was a mistake.
3516*a67afe4dSAndroid Build Coastguard Worker      # Let's accept both of them until this is cleared up.
3517*a67afe4dSAndroid Build Coastguard Worker      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3518*a67afe4dSAndroid Build Coastguard Worker      lt_cv_file_magic_cmd=$FILECMD
3519*a67afe4dSAndroid Build Coastguard Worker      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3520*a67afe4dSAndroid Build Coastguard Worker      ;;
3521*a67afe4dSAndroid Build Coastguard Worker    esac
3522*a67afe4dSAndroid Build Coastguard Worker  else
3523*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3524*a67afe4dSAndroid Build Coastguard Worker  fi
3525*a67afe4dSAndroid Build Coastguard Worker  ;;
3526*a67afe4dSAndroid Build Coastguard Worker
3527*a67afe4dSAndroid Build Coastguard Workerhaiku*)
3528*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3529*a67afe4dSAndroid Build Coastguard Worker  ;;
3530*a67afe4dSAndroid Build Coastguard Worker
3531*a67afe4dSAndroid Build Coastguard Workerhpux10.20* | hpux11*)
3532*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_cmd=$FILECMD
3533*a67afe4dSAndroid Build Coastguard Worker  case $host_cpu in
3534*a67afe4dSAndroid Build Coastguard Worker  ia64*)
3535*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3536*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3537*a67afe4dSAndroid Build Coastguard Worker    ;;
3538*a67afe4dSAndroid Build Coastguard Worker  hppa*64*)
3539*a67afe4dSAndroid Build Coastguard Worker    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3540*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3541*a67afe4dSAndroid Build Coastguard Worker    ;;
3542*a67afe4dSAndroid Build Coastguard Worker  *)
3543*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3544*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3545*a67afe4dSAndroid Build Coastguard Worker    ;;
3546*a67afe4dSAndroid Build Coastguard Worker  esac
3547*a67afe4dSAndroid Build Coastguard Worker  ;;
3548*a67afe4dSAndroid Build Coastguard Worker
3549*a67afe4dSAndroid Build Coastguard Workerinterix[[3-9]]*)
3550*a67afe4dSAndroid Build Coastguard Worker  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3551*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3552*a67afe4dSAndroid Build Coastguard Worker  ;;
3553*a67afe4dSAndroid Build Coastguard Worker
3554*a67afe4dSAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*)
3555*a67afe4dSAndroid Build Coastguard Worker  case $LD in
3556*a67afe4dSAndroid Build Coastguard Worker  *-32|*"-32 ") libmagic=32-bit;;
3557*a67afe4dSAndroid Build Coastguard Worker  *-n32|*"-n32 ") libmagic=N32;;
3558*a67afe4dSAndroid Build Coastguard Worker  *-64|*"-64 ") libmagic=64-bit;;
3559*a67afe4dSAndroid Build Coastguard Worker  *) libmagic=never-match;;
3560*a67afe4dSAndroid Build Coastguard Worker  esac
3561*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3562*a67afe4dSAndroid Build Coastguard Worker  ;;
3563*a67afe4dSAndroid Build Coastguard Worker
3564*a67afe4dSAndroid Build Coastguard Worker# This must be glibc/ELF.
3565*a67afe4dSAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3566*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3567*a67afe4dSAndroid Build Coastguard Worker  ;;
3568*a67afe4dSAndroid Build Coastguard Worker
3569*a67afe4dSAndroid Build Coastguard Workernetbsd*)
3570*a67afe4dSAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3571*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3572*a67afe4dSAndroid Build Coastguard Worker  else
3573*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3574*a67afe4dSAndroid Build Coastguard Worker  fi
3575*a67afe4dSAndroid Build Coastguard Worker  ;;
3576*a67afe4dSAndroid Build Coastguard Worker
3577*a67afe4dSAndroid Build Coastguard Workernewos6*)
3578*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3579*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_cmd=$FILECMD
3580*a67afe4dSAndroid Build Coastguard Worker  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3581*a67afe4dSAndroid Build Coastguard Worker  ;;
3582*a67afe4dSAndroid Build Coastguard Worker
3583*a67afe4dSAndroid Build Coastguard Worker*nto* | *qnx*)
3584*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3585*a67afe4dSAndroid Build Coastguard Worker  ;;
3586*a67afe4dSAndroid Build Coastguard Worker
3587*a67afe4dSAndroid Build Coastguard Workeropenbsd* | bitrig*)
3588*a67afe4dSAndroid Build Coastguard Worker  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3589*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3590*a67afe4dSAndroid Build Coastguard Worker  else
3591*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3592*a67afe4dSAndroid Build Coastguard Worker  fi
3593*a67afe4dSAndroid Build Coastguard Worker  ;;
3594*a67afe4dSAndroid Build Coastguard Worker
3595*a67afe4dSAndroid Build Coastguard Workerosf3* | osf4* | osf5*)
3596*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3597*a67afe4dSAndroid Build Coastguard Worker  ;;
3598*a67afe4dSAndroid Build Coastguard Worker
3599*a67afe4dSAndroid Build Coastguard Workerrdos*)
3600*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3601*a67afe4dSAndroid Build Coastguard Worker  ;;
3602*a67afe4dSAndroid Build Coastguard Worker
3603*a67afe4dSAndroid Build Coastguard Workersolaris*)
3604*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3605*a67afe4dSAndroid Build Coastguard Worker  ;;
3606*a67afe4dSAndroid Build Coastguard Worker
3607*a67afe4dSAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3608*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3609*a67afe4dSAndroid Build Coastguard Worker  ;;
3610*a67afe4dSAndroid Build Coastguard Worker
3611*a67afe4dSAndroid Build Coastguard Workersysv4 | sysv4.3*)
3612*a67afe4dSAndroid Build Coastguard Worker  case $host_vendor in
3613*a67afe4dSAndroid Build Coastguard Worker  motorola)
3614*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3615*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3616*a67afe4dSAndroid Build Coastguard Worker    ;;
3617*a67afe4dSAndroid Build Coastguard Worker  ncr)
3618*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3619*a67afe4dSAndroid Build Coastguard Worker    ;;
3620*a67afe4dSAndroid Build Coastguard Worker  sequent)
3621*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='/bin/file'
3622*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3623*a67afe4dSAndroid Build Coastguard Worker    ;;
3624*a67afe4dSAndroid Build Coastguard Worker  sni)
3625*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='/bin/file'
3626*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3627*a67afe4dSAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/lib/libc.so
3628*a67afe4dSAndroid Build Coastguard Worker    ;;
3629*a67afe4dSAndroid Build Coastguard Worker  siemens)
3630*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3631*a67afe4dSAndroid Build Coastguard Worker    ;;
3632*a67afe4dSAndroid Build Coastguard Worker  pc)
3633*a67afe4dSAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3634*a67afe4dSAndroid Build Coastguard Worker    ;;
3635*a67afe4dSAndroid Build Coastguard Worker  esac
3636*a67afe4dSAndroid Build Coastguard Worker  ;;
3637*a67afe4dSAndroid Build Coastguard Worker
3638*a67afe4dSAndroid Build Coastguard Workertpf*)
3639*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3640*a67afe4dSAndroid Build Coastguard Worker  ;;
3641*a67afe4dSAndroid Build Coastguard Workeros2*)
3642*a67afe4dSAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3643*a67afe4dSAndroid Build Coastguard Worker  ;;
3644*a67afe4dSAndroid Build Coastguard Workeresac
3645*a67afe4dSAndroid Build Coastguard Worker])
3646*a67afe4dSAndroid Build Coastguard Worker
3647*a67afe4dSAndroid Build Coastguard Workerfile_magic_glob=
3648*a67afe4dSAndroid Build Coastguard Workerwant_nocaseglob=no
3649*a67afe4dSAndroid Build Coastguard Workerif test "$build" = "$host"; then
3650*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
3651*a67afe4dSAndroid Build Coastguard Worker  mingw* | pw32*)
3652*a67afe4dSAndroid Build Coastguard Worker    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3653*a67afe4dSAndroid Build Coastguard Worker      want_nocaseglob=yes
3654*a67afe4dSAndroid Build Coastguard Worker    else
3655*a67afe4dSAndroid Build Coastguard Worker      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3656*a67afe4dSAndroid Build Coastguard Worker    fi
3657*a67afe4dSAndroid Build Coastguard Worker    ;;
3658*a67afe4dSAndroid Build Coastguard Worker  esac
3659*a67afe4dSAndroid Build Coastguard Workerfi
3660*a67afe4dSAndroid Build Coastguard Worker
3661*a67afe4dSAndroid Build Coastguard Workerfile_magic_cmd=$lt_cv_file_magic_cmd
3662*a67afe4dSAndroid Build Coastguard Workerdeplibs_check_method=$lt_cv_deplibs_check_method
3663*a67afe4dSAndroid Build Coastguard Workertest -z "$deplibs_check_method" && deplibs_check_method=unknown
3664*a67afe4dSAndroid Build Coastguard Worker
3665*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [deplibs_check_method], [1],
3666*a67afe4dSAndroid Build Coastguard Worker    [Method to check whether dependent libraries are shared objects])
3667*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [file_magic_cmd], [1],
3668*a67afe4dSAndroid Build Coastguard Worker    [Command to use when deplibs_check_method = "file_magic"])
3669*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [file_magic_glob], [1],
3670*a67afe4dSAndroid Build Coastguard Worker    [How to find potential files when deplibs_check_method = "file_magic"])
3671*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [want_nocaseglob], [1],
3672*a67afe4dSAndroid Build Coastguard Worker    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3673*a67afe4dSAndroid Build Coastguard Worker])# _LT_CHECK_MAGIC_METHOD
3674*a67afe4dSAndroid Build Coastguard Worker
3675*a67afe4dSAndroid Build Coastguard Worker
3676*a67afe4dSAndroid Build Coastguard Worker# LT_PATH_NM
3677*a67afe4dSAndroid Build Coastguard Worker# ----------
3678*a67afe4dSAndroid Build Coastguard Worker# find the pathname to a BSD- or MS-compatible name lister
3679*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_NM],
3680*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
3681*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3682*a67afe4dSAndroid Build Coastguard Worker[if test -n "$NM"; then
3683*a67afe4dSAndroid Build Coastguard Worker  # Let the user override the test.
3684*a67afe4dSAndroid Build Coastguard Worker  lt_cv_path_NM=$NM
3685*a67afe4dSAndroid Build Coastguard Workerelse
3686*a67afe4dSAndroid Build Coastguard Worker  lt_nm_to_check=${ac_tool_prefix}nm
3687*a67afe4dSAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3688*a67afe4dSAndroid Build Coastguard Worker    lt_nm_to_check="$lt_nm_to_check nm"
3689*a67afe4dSAndroid Build Coastguard Worker  fi
3690*a67afe4dSAndroid Build Coastguard Worker  for lt_tmp_nm in $lt_nm_to_check; do
3691*a67afe4dSAndroid Build Coastguard Worker    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3692*a67afe4dSAndroid Build Coastguard Worker    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3693*a67afe4dSAndroid Build Coastguard Worker      IFS=$lt_save_ifs
3694*a67afe4dSAndroid Build Coastguard Worker      test -z "$ac_dir" && ac_dir=.
3695*a67afe4dSAndroid Build Coastguard Worker      tmp_nm=$ac_dir/$lt_tmp_nm
3696*a67afe4dSAndroid Build Coastguard Worker      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3697*a67afe4dSAndroid Build Coastguard Worker	# Check to see if the nm accepts a BSD-compat flag.
3698*a67afe4dSAndroid Build Coastguard Worker	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3699*a67afe4dSAndroid Build Coastguard Worker	#   nm: unknown option "B" ignored
3700*a67afe4dSAndroid Build Coastguard Worker	# Tru64's nm complains that /dev/null is an invalid object file
3701*a67afe4dSAndroid Build Coastguard Worker	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3702*a67afe4dSAndroid Build Coastguard Worker	case $build_os in
3703*a67afe4dSAndroid Build Coastguard Worker	mingw*) lt_bad_file=conftest.nm/nofile ;;
3704*a67afe4dSAndroid Build Coastguard Worker	*) lt_bad_file=/dev/null ;;
3705*a67afe4dSAndroid Build Coastguard Worker	esac
3706*a67afe4dSAndroid Build Coastguard Worker	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
3707*a67afe4dSAndroid Build Coastguard Worker	*$lt_bad_file* | *'Invalid file or object type'*)
3708*a67afe4dSAndroid Build Coastguard Worker	  lt_cv_path_NM="$tmp_nm -B"
3709*a67afe4dSAndroid Build Coastguard Worker	  break 2
3710*a67afe4dSAndroid Build Coastguard Worker	  ;;
3711*a67afe4dSAndroid Build Coastguard Worker	*)
3712*a67afe4dSAndroid Build Coastguard Worker	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
3713*a67afe4dSAndroid Build Coastguard Worker	  */dev/null*)
3714*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_path_NM="$tmp_nm -p"
3715*a67afe4dSAndroid Build Coastguard Worker	    break 2
3716*a67afe4dSAndroid Build Coastguard Worker	    ;;
3717*a67afe4dSAndroid Build Coastguard Worker	  *)
3718*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3719*a67afe4dSAndroid Build Coastguard Worker	    continue # so that we can try to find one that supports BSD flags
3720*a67afe4dSAndroid Build Coastguard Worker	    ;;
3721*a67afe4dSAndroid Build Coastguard Worker	  esac
3722*a67afe4dSAndroid Build Coastguard Worker	  ;;
3723*a67afe4dSAndroid Build Coastguard Worker	esac
3724*a67afe4dSAndroid Build Coastguard Worker      fi
3725*a67afe4dSAndroid Build Coastguard Worker    done
3726*a67afe4dSAndroid Build Coastguard Worker    IFS=$lt_save_ifs
3727*a67afe4dSAndroid Build Coastguard Worker  done
3728*a67afe4dSAndroid Build Coastguard Worker  : ${lt_cv_path_NM=no}
3729*a67afe4dSAndroid Build Coastguard Workerfi])
3730*a67afe4dSAndroid Build Coastguard Workerif test no != "$lt_cv_path_NM"; then
3731*a67afe4dSAndroid Build Coastguard Worker  NM=$lt_cv_path_NM
3732*a67afe4dSAndroid Build Coastguard Workerelse
3733*a67afe4dSAndroid Build Coastguard Worker  # Didn't find any BSD compatible name lister, look for dumpbin.
3734*a67afe4dSAndroid Build Coastguard Worker  if test -n "$DUMPBIN"; then :
3735*a67afe4dSAndroid Build Coastguard Worker    # Let the user override the test.
3736*a67afe4dSAndroid Build Coastguard Worker  else
3737*a67afe4dSAndroid Build Coastguard Worker    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3738*a67afe4dSAndroid Build Coastguard Worker    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
3739*a67afe4dSAndroid Build Coastguard Worker    *COFF*)
3740*a67afe4dSAndroid Build Coastguard Worker      DUMPBIN="$DUMPBIN -symbols -headers"
3741*a67afe4dSAndroid Build Coastguard Worker      ;;
3742*a67afe4dSAndroid Build Coastguard Worker    *)
3743*a67afe4dSAndroid Build Coastguard Worker      DUMPBIN=:
3744*a67afe4dSAndroid Build Coastguard Worker      ;;
3745*a67afe4dSAndroid Build Coastguard Worker    esac
3746*a67afe4dSAndroid Build Coastguard Worker  fi
3747*a67afe4dSAndroid Build Coastguard Worker  AC_SUBST([DUMPBIN])
3748*a67afe4dSAndroid Build Coastguard Worker  if test : != "$DUMPBIN"; then
3749*a67afe4dSAndroid Build Coastguard Worker    NM=$DUMPBIN
3750*a67afe4dSAndroid Build Coastguard Worker  fi
3751*a67afe4dSAndroid Build Coastguard Workerfi
3752*a67afe4dSAndroid Build Coastguard Workertest -z "$NM" && NM=nm
3753*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([NM])
3754*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3755*a67afe4dSAndroid Build Coastguard Worker
3756*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3757*a67afe4dSAndroid Build Coastguard Worker  [lt_cv_nm_interface="BSD nm"
3758*a67afe4dSAndroid Build Coastguard Worker  echo "int some_variable = 0;" > conftest.$ac_ext
3759*a67afe4dSAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3760*a67afe4dSAndroid Build Coastguard Worker  (eval "$ac_compile" 2>conftest.err)
3761*a67afe4dSAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3762*a67afe4dSAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3763*a67afe4dSAndroid Build Coastguard Worker  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3764*a67afe4dSAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3765*a67afe4dSAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3766*a67afe4dSAndroid Build Coastguard Worker  cat conftest.out >&AS_MESSAGE_LOG_FD
3767*a67afe4dSAndroid Build Coastguard Worker  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3768*a67afe4dSAndroid Build Coastguard Worker    lt_cv_nm_interface="MS dumpbin"
3769*a67afe4dSAndroid Build Coastguard Worker  fi
3770*a67afe4dSAndroid Build Coastguard Worker  rm -f conftest*])
3771*a67afe4dSAndroid Build Coastguard Worker])# LT_PATH_NM
3772*a67afe4dSAndroid Build Coastguard Worker
3773*a67afe4dSAndroid Build Coastguard Worker# Old names:
3774*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3775*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3776*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3777*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_NM], [])
3778*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_NM], [])
3779*a67afe4dSAndroid Build Coastguard Worker
3780*a67afe4dSAndroid Build Coastguard Worker# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3781*a67afe4dSAndroid Build Coastguard Worker# --------------------------------
3782*a67afe4dSAndroid Build Coastguard Worker# how to determine the name of the shared library
3783*a67afe4dSAndroid Build Coastguard Worker# associated with a specific link library.
3784*a67afe4dSAndroid Build Coastguard Worker#  -- PORTME fill in with the dynamic library characteristics
3785*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3786*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
3787*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])
3788*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_DLLTOOL])
3789*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to associate runtime and link libraries],
3790*a67afe4dSAndroid Build Coastguard Workerlt_cv_sharedlib_from_linklib_cmd,
3791*a67afe4dSAndroid Build Coastguard Worker[lt_cv_sharedlib_from_linklib_cmd='unknown'
3792*a67afe4dSAndroid Build Coastguard Worker
3793*a67afe4dSAndroid Build Coastguard Workercase $host_os in
3794*a67afe4dSAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
3795*a67afe4dSAndroid Build Coastguard Worker  # two different shell functions defined in ltmain.sh;
3796*a67afe4dSAndroid Build Coastguard Worker  # decide which one to use based on capabilities of $DLLTOOL
3797*a67afe4dSAndroid Build Coastguard Worker  case `$DLLTOOL --help 2>&1` in
3798*a67afe4dSAndroid Build Coastguard Worker  *--identify-strict*)
3799*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3800*a67afe4dSAndroid Build Coastguard Worker    ;;
3801*a67afe4dSAndroid Build Coastguard Worker  *)
3802*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3803*a67afe4dSAndroid Build Coastguard Worker    ;;
3804*a67afe4dSAndroid Build Coastguard Worker  esac
3805*a67afe4dSAndroid Build Coastguard Worker  ;;
3806*a67afe4dSAndroid Build Coastguard Worker*)
3807*a67afe4dSAndroid Build Coastguard Worker  # fallback: assume linklib IS sharedlib
3808*a67afe4dSAndroid Build Coastguard Worker  lt_cv_sharedlib_from_linklib_cmd=$ECHO
3809*a67afe4dSAndroid Build Coastguard Worker  ;;
3810*a67afe4dSAndroid Build Coastguard Workeresac
3811*a67afe4dSAndroid Build Coastguard Worker])
3812*a67afe4dSAndroid Build Coastguard Workersharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3813*a67afe4dSAndroid Build Coastguard Workertest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3814*a67afe4dSAndroid Build Coastguard Worker
3815*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3816*a67afe4dSAndroid Build Coastguard Worker    [Command to associate shared and link libraries])
3817*a67afe4dSAndroid Build Coastguard Worker])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3818*a67afe4dSAndroid Build Coastguard Worker
3819*a67afe4dSAndroid Build Coastguard Worker
3820*a67afe4dSAndroid Build Coastguard Worker# _LT_PATH_MANIFEST_TOOL
3821*a67afe4dSAndroid Build Coastguard Worker# ----------------------
3822*a67afe4dSAndroid Build Coastguard Worker# locate the manifest tool
3823*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PATH_MANIFEST_TOOL],
3824*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3825*a67afe4dSAndroid Build Coastguard Workertest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3826*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3827*a67afe4dSAndroid Build Coastguard Worker  [lt_cv_path_mainfest_tool=no
3828*a67afe4dSAndroid Build Coastguard Worker  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3829*a67afe4dSAndroid Build Coastguard Worker  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3830*a67afe4dSAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3831*a67afe4dSAndroid Build Coastguard Worker  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3832*a67afe4dSAndroid Build Coastguard Worker    lt_cv_path_mainfest_tool=yes
3833*a67afe4dSAndroid Build Coastguard Worker  fi
3834*a67afe4dSAndroid Build Coastguard Worker  rm -f conftest*])
3835*a67afe4dSAndroid Build Coastguard Workerif test yes != "$lt_cv_path_mainfest_tool"; then
3836*a67afe4dSAndroid Build Coastguard Worker  MANIFEST_TOOL=:
3837*a67afe4dSAndroid Build Coastguard Workerfi
3838*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3839*a67afe4dSAndroid Build Coastguard Worker])# _LT_PATH_MANIFEST_TOOL
3840*a67afe4dSAndroid Build Coastguard Worker
3841*a67afe4dSAndroid Build Coastguard Worker
3842*a67afe4dSAndroid Build Coastguard Worker# _LT_DLL_DEF_P([FILE])
3843*a67afe4dSAndroid Build Coastguard Worker# ---------------------
3844*a67afe4dSAndroid Build Coastguard Worker# True iff FILE is a Windows DLL '.def' file.
3845*a67afe4dSAndroid Build Coastguard Worker# Keep in sync with func_dll_def_p in the libtool script
3846*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([_LT_DLL_DEF_P],
3847*a67afe4dSAndroid Build Coastguard Worker[dnl
3848*a67afe4dSAndroid Build Coastguard Worker  test DEF = "`$SED -n dnl
3849*a67afe4dSAndroid Build Coastguard Worker    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3850*a67afe4dSAndroid Build Coastguard Worker    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3851*a67afe4dSAndroid Build Coastguard Worker    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3852*a67afe4dSAndroid Build Coastguard Worker    -e q dnl                          Only consider the first "real" line
3853*a67afe4dSAndroid Build Coastguard Worker    $1`" dnl
3854*a67afe4dSAndroid Build Coastguard Worker])# _LT_DLL_DEF_P
3855*a67afe4dSAndroid Build Coastguard Worker
3856*a67afe4dSAndroid Build Coastguard Worker
3857*a67afe4dSAndroid Build Coastguard Worker# LT_LIB_M
3858*a67afe4dSAndroid Build Coastguard Worker# --------
3859*a67afe4dSAndroid Build Coastguard Worker# check for math library
3860*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_LIB_M],
3861*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3862*a67afe4dSAndroid Build Coastguard WorkerLIBM=
3863*a67afe4dSAndroid Build Coastguard Workercase $host in
3864*a67afe4dSAndroid Build Coastguard Worker*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3865*a67afe4dSAndroid Build Coastguard Worker  # These system don't have libm, or don't need it
3866*a67afe4dSAndroid Build Coastguard Worker  ;;
3867*a67afe4dSAndroid Build Coastguard Worker*-ncr-sysv4.3*)
3868*a67afe4dSAndroid Build Coastguard Worker  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3869*a67afe4dSAndroid Build Coastguard Worker  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3870*a67afe4dSAndroid Build Coastguard Worker  ;;
3871*a67afe4dSAndroid Build Coastguard Worker*)
3872*a67afe4dSAndroid Build Coastguard Worker  AC_CHECK_LIB(m, cos, LIBM=-lm)
3873*a67afe4dSAndroid Build Coastguard Worker  ;;
3874*a67afe4dSAndroid Build Coastguard Workeresac
3875*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([LIBM])
3876*a67afe4dSAndroid Build Coastguard Worker])# LT_LIB_M
3877*a67afe4dSAndroid Build Coastguard Worker
3878*a67afe4dSAndroid Build Coastguard Worker# Old name:
3879*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3880*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3881*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_CHECK_LIBM], [])
3882*a67afe4dSAndroid Build Coastguard Worker
3883*a67afe4dSAndroid Build Coastguard Worker
3884*a67afe4dSAndroid Build Coastguard Worker# _LT_COMPILER_NO_RTTI([TAGNAME])
3885*a67afe4dSAndroid Build Coastguard Worker# -------------------------------
3886*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_NO_RTTI],
3887*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl
3888*a67afe4dSAndroid Build Coastguard Worker
3889*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3890*a67afe4dSAndroid Build Coastguard Worker
3891*a67afe4dSAndroid Build Coastguard Workerif test yes = "$GCC"; then
3892*a67afe4dSAndroid Build Coastguard Worker  case $cc_basename in
3893*a67afe4dSAndroid Build Coastguard Worker  nvcc*)
3894*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3895*a67afe4dSAndroid Build Coastguard Worker  *)
3896*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3897*a67afe4dSAndroid Build Coastguard Worker  esac
3898*a67afe4dSAndroid Build Coastguard Worker
3899*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3900*a67afe4dSAndroid Build Coastguard Worker    lt_cv_prog_compiler_rtti_exceptions,
3901*a67afe4dSAndroid Build Coastguard Worker    [-fno-rtti -fno-exceptions], [],
3902*a67afe4dSAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3903*a67afe4dSAndroid Build Coastguard Workerfi
3904*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3905*a67afe4dSAndroid Build Coastguard Worker	[Compiler flag to turn off builtin functions])
3906*a67afe4dSAndroid Build Coastguard Worker])# _LT_COMPILER_NO_RTTI
3907*a67afe4dSAndroid Build Coastguard Worker
3908*a67afe4dSAndroid Build Coastguard Worker
3909*a67afe4dSAndroid Build Coastguard Worker# _LT_CMD_GLOBAL_SYMBOLS
3910*a67afe4dSAndroid Build Coastguard Worker# ----------------------
3911*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3912*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3913*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl
3914*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_AWK])dnl
3915*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
3916*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl
3917*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
3918*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
3919*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
3920*a67afe4dSAndroid Build Coastguard Worker
3921*a67afe4dSAndroid Build Coastguard Worker# Check for command to grab the raw symbol name followed by C symbol from nm.
3922*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3923*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3924*a67afe4dSAndroid Build Coastguard Worker[
3925*a67afe4dSAndroid Build Coastguard Worker# These are sane defaults that work on at least a few old systems.
3926*a67afe4dSAndroid Build Coastguard Worker# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3927*a67afe4dSAndroid Build Coastguard Worker
3928*a67afe4dSAndroid Build Coastguard Worker# Character class describing NM global symbol codes.
3929*a67afe4dSAndroid Build Coastguard Workersymcode='[[BCDEGRST]]'
3930*a67afe4dSAndroid Build Coastguard Worker
3931*a67afe4dSAndroid Build Coastguard Worker# Regexp to match symbols that can be accessed directly from C.
3932*a67afe4dSAndroid Build Coastguard Workersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3933*a67afe4dSAndroid Build Coastguard Worker
3934*a67afe4dSAndroid Build Coastguard Worker# Define system-specific variables.
3935*a67afe4dSAndroid Build Coastguard Workercase $host_os in
3936*a67afe4dSAndroid Build Coastguard Workeraix*)
3937*a67afe4dSAndroid Build Coastguard Worker  symcode='[[BCDT]]'
3938*a67afe4dSAndroid Build Coastguard Worker  ;;
3939*a67afe4dSAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
3940*a67afe4dSAndroid Build Coastguard Worker  symcode='[[ABCDGISTW]]'
3941*a67afe4dSAndroid Build Coastguard Worker  ;;
3942*a67afe4dSAndroid Build Coastguard Workerhpux*)
3943*a67afe4dSAndroid Build Coastguard Worker  if test ia64 = "$host_cpu"; then
3944*a67afe4dSAndroid Build Coastguard Worker    symcode='[[ABCDEGRST]]'
3945*a67afe4dSAndroid Build Coastguard Worker  fi
3946*a67afe4dSAndroid Build Coastguard Worker  ;;
3947*a67afe4dSAndroid Build Coastguard Workeririx* | nonstopux*)
3948*a67afe4dSAndroid Build Coastguard Worker  symcode='[[BCDEGRST]]'
3949*a67afe4dSAndroid Build Coastguard Worker  ;;
3950*a67afe4dSAndroid Build Coastguard Workerosf*)
3951*a67afe4dSAndroid Build Coastguard Worker  symcode='[[BCDEGQRST]]'
3952*a67afe4dSAndroid Build Coastguard Worker  ;;
3953*a67afe4dSAndroid Build Coastguard Workersolaris*)
3954*a67afe4dSAndroid Build Coastguard Worker  symcode='[[BDRT]]'
3955*a67afe4dSAndroid Build Coastguard Worker  ;;
3956*a67afe4dSAndroid Build Coastguard Workersco3.2v5*)
3957*a67afe4dSAndroid Build Coastguard Worker  symcode='[[DT]]'
3958*a67afe4dSAndroid Build Coastguard Worker  ;;
3959*a67afe4dSAndroid Build Coastguard Workersysv4.2uw2*)
3960*a67afe4dSAndroid Build Coastguard Worker  symcode='[[DT]]'
3961*a67afe4dSAndroid Build Coastguard Worker  ;;
3962*a67afe4dSAndroid Build Coastguard Workersysv5* | sco5v6* | unixware* | OpenUNIX*)
3963*a67afe4dSAndroid Build Coastguard Worker  symcode='[[ABDT]]'
3964*a67afe4dSAndroid Build Coastguard Worker  ;;
3965*a67afe4dSAndroid Build Coastguard Workersysv4)
3966*a67afe4dSAndroid Build Coastguard Worker  symcode='[[DFNSTU]]'
3967*a67afe4dSAndroid Build Coastguard Worker  ;;
3968*a67afe4dSAndroid Build Coastguard Workeresac
3969*a67afe4dSAndroid Build Coastguard Worker
3970*a67afe4dSAndroid Build Coastguard Worker# If we're using GNU nm, then use its standard symbol codes.
3971*a67afe4dSAndroid Build Coastguard Workercase `$NM -V 2>&1` in
3972*a67afe4dSAndroid Build Coastguard Worker*GNU* | *'with BFD'*)
3973*a67afe4dSAndroid Build Coastguard Worker  symcode='[[ABCDGIRSTW]]' ;;
3974*a67afe4dSAndroid Build Coastguard Workeresac
3975*a67afe4dSAndroid Build Coastguard Worker
3976*a67afe4dSAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3977*a67afe4dSAndroid Build Coastguard Worker  # Gets list of data symbols to import.
3978*a67afe4dSAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
3979*a67afe4dSAndroid Build Coastguard Worker  # Adjust the below global symbol transforms to fixup imported variables.
3980*a67afe4dSAndroid Build Coastguard Worker  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3981*a67afe4dSAndroid Build Coastguard Worker  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
3982*a67afe4dSAndroid Build Coastguard Worker  lt_c_name_lib_hook="\
3983*a67afe4dSAndroid Build Coastguard Worker  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
3984*a67afe4dSAndroid Build Coastguard Worker  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
3985*a67afe4dSAndroid Build Coastguard Workerelse
3986*a67afe4dSAndroid Build Coastguard Worker  # Disable hooks by default.
3987*a67afe4dSAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_import=
3988*a67afe4dSAndroid Build Coastguard Worker  lt_cdecl_hook=
3989*a67afe4dSAndroid Build Coastguard Worker  lt_c_name_hook=
3990*a67afe4dSAndroid Build Coastguard Worker  lt_c_name_lib_hook=
3991*a67afe4dSAndroid Build Coastguard Workerfi
3992*a67afe4dSAndroid Build Coastguard Worker
3993*a67afe4dSAndroid Build Coastguard Worker# Transform an extracted symbol line into a proper C declaration.
3994*a67afe4dSAndroid Build Coastguard Worker# Some systems (esp. on ia64) link data and code symbols differently,
3995*a67afe4dSAndroid Build Coastguard Worker# so use this general approach.
3996*a67afe4dSAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_cdecl="$SED -n"\
3997*a67afe4dSAndroid Build Coastguard Worker$lt_cdecl_hook\
3998*a67afe4dSAndroid Build Coastguard Worker" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3999*a67afe4dSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4000*a67afe4dSAndroid Build Coastguard Worker
4001*a67afe4dSAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name and symbol address
4002*a67afe4dSAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4003*a67afe4dSAndroid Build Coastguard Worker$lt_c_name_hook\
4004*a67afe4dSAndroid Build Coastguard Worker" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4005*a67afe4dSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4006*a67afe4dSAndroid Build Coastguard Worker
4007*a67afe4dSAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name with lib prefix and
4008*a67afe4dSAndroid Build Coastguard Worker# symbol address.
4009*a67afe4dSAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4010*a67afe4dSAndroid Build Coastguard Worker$lt_c_name_lib_hook\
4011*a67afe4dSAndroid Build Coastguard Worker" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4012*a67afe4dSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4013*a67afe4dSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4014*a67afe4dSAndroid Build Coastguard Worker
4015*a67afe4dSAndroid Build Coastguard Worker# Handle CRLF in mingw tool chain
4016*a67afe4dSAndroid Build Coastguard Workeropt_cr=
4017*a67afe4dSAndroid Build Coastguard Workercase $build_os in
4018*a67afe4dSAndroid Build Coastguard Workermingw*)
4019*a67afe4dSAndroid Build Coastguard Worker  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4020*a67afe4dSAndroid Build Coastguard Worker  ;;
4021*a67afe4dSAndroid Build Coastguard Workeresac
4022*a67afe4dSAndroid Build Coastguard Worker
4023*a67afe4dSAndroid Build Coastguard Worker# Try without a prefix underscore, then with it.
4024*a67afe4dSAndroid Build Coastguard Workerfor ac_symprfx in "" "_"; do
4025*a67afe4dSAndroid Build Coastguard Worker
4026*a67afe4dSAndroid Build Coastguard Worker  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4027*a67afe4dSAndroid Build Coastguard Worker  symxfrm="\\1 $ac_symprfx\\2 \\2"
4028*a67afe4dSAndroid Build Coastguard Worker
4029*a67afe4dSAndroid Build Coastguard Worker  # Write the raw and C identifiers.
4030*a67afe4dSAndroid Build Coastguard Worker  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4031*a67afe4dSAndroid Build Coastguard Worker    # Fake it for dumpbin and say T for any non-static function,
4032*a67afe4dSAndroid Build Coastguard Worker    # D for any global variable and I for any imported variable.
4033*a67afe4dSAndroid Build Coastguard Worker    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4034*a67afe4dSAndroid Build Coastguard Worker    # which start with @ or ?.
4035*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4036*a67afe4dSAndroid Build Coastguard Worker"     {last_section=section; section=\$ 3};"\
4037*a67afe4dSAndroid Build Coastguard Worker"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4038*a67afe4dSAndroid Build Coastguard Worker"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4039*a67afe4dSAndroid Build Coastguard Worker"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4040*a67afe4dSAndroid Build Coastguard Worker"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4041*a67afe4dSAndroid Build Coastguard Worker"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4042*a67afe4dSAndroid Build Coastguard Worker"     \$ 0!~/External *\|/{next};"\
4043*a67afe4dSAndroid Build Coastguard Worker"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4044*a67afe4dSAndroid Build Coastguard Worker"     {if(hide[section]) next};"\
4045*a67afe4dSAndroid Build Coastguard Worker"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4046*a67afe4dSAndroid Build Coastguard Worker"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4047*a67afe4dSAndroid Build Coastguard Worker"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4048*a67afe4dSAndroid Build Coastguard Worker"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4049*a67afe4dSAndroid Build Coastguard Worker"     ' prfx=^$ac_symprfx]"
4050*a67afe4dSAndroid Build Coastguard Worker  else
4051*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4052*a67afe4dSAndroid Build Coastguard Worker  fi
4053*a67afe4dSAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4054*a67afe4dSAndroid Build Coastguard Worker
4055*a67afe4dSAndroid Build Coastguard Worker  # Check to see that the pipe works correctly.
4056*a67afe4dSAndroid Build Coastguard Worker  pipe_works=no
4057*a67afe4dSAndroid Build Coastguard Worker
4058*a67afe4dSAndroid Build Coastguard Worker  rm -f conftest*
4059*a67afe4dSAndroid Build Coastguard Worker  cat > conftest.$ac_ext <<_LT_EOF
4060*a67afe4dSAndroid Build Coastguard Worker#ifdef __cplusplus
4061*a67afe4dSAndroid Build Coastguard Workerextern "C" {
4062*a67afe4dSAndroid Build Coastguard Worker#endif
4063*a67afe4dSAndroid Build Coastguard Workerchar nm_test_var;
4064*a67afe4dSAndroid Build Coastguard Workervoid nm_test_func(void);
4065*a67afe4dSAndroid Build Coastguard Workervoid nm_test_func(void){}
4066*a67afe4dSAndroid Build Coastguard Worker#ifdef __cplusplus
4067*a67afe4dSAndroid Build Coastguard Worker}
4068*a67afe4dSAndroid Build Coastguard Worker#endif
4069*a67afe4dSAndroid Build Coastguard Workerint main(){nm_test_var='a';nm_test_func();return(0);}
4070*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
4071*a67afe4dSAndroid Build Coastguard Worker
4072*a67afe4dSAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
4073*a67afe4dSAndroid Build Coastguard Worker    # Now try to grab the symbols.
4074*a67afe4dSAndroid Build Coastguard Worker    nlist=conftest.nm
4075*a67afe4dSAndroid Build Coastguard Worker    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4076*a67afe4dSAndroid Build Coastguard Worker      # Try sorting and uniquifying the output.
4077*a67afe4dSAndroid Build Coastguard Worker      if sort "$nlist" | uniq > "$nlist"T; then
4078*a67afe4dSAndroid Build Coastguard Worker	mv -f "$nlist"T "$nlist"
4079*a67afe4dSAndroid Build Coastguard Worker      else
4080*a67afe4dSAndroid Build Coastguard Worker	rm -f "$nlist"T
4081*a67afe4dSAndroid Build Coastguard Worker      fi
4082*a67afe4dSAndroid Build Coastguard Worker
4083*a67afe4dSAndroid Build Coastguard Worker      # Make sure that we snagged all the symbols we need.
4084*a67afe4dSAndroid Build Coastguard Worker      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4085*a67afe4dSAndroid Build Coastguard Worker	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4086*a67afe4dSAndroid Build Coastguard Worker	  cat <<_LT_EOF > conftest.$ac_ext
4087*a67afe4dSAndroid Build Coastguard Worker/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4088*a67afe4dSAndroid Build Coastguard Worker#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4089*a67afe4dSAndroid Build Coastguard Worker/* DATA imports from DLLs on WIN32 can't be const, because runtime
4090*a67afe4dSAndroid Build Coastguard Worker   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4091*a67afe4dSAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST
4092*a67afe4dSAndroid Build Coastguard Worker#elif defined __osf__
4093*a67afe4dSAndroid Build Coastguard Worker/* This system does not cope well with relocations in const data.  */
4094*a67afe4dSAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST
4095*a67afe4dSAndroid Build Coastguard Worker#else
4096*a67afe4dSAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST const
4097*a67afe4dSAndroid Build Coastguard Worker#endif
4098*a67afe4dSAndroid Build Coastguard Worker
4099*a67afe4dSAndroid Build Coastguard Worker#ifdef __cplusplus
4100*a67afe4dSAndroid Build Coastguard Workerextern "C" {
4101*a67afe4dSAndroid Build Coastguard Worker#endif
4102*a67afe4dSAndroid Build Coastguard Worker
4103*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
4104*a67afe4dSAndroid Build Coastguard Worker	  # Now generate the symbol file.
4105*a67afe4dSAndroid Build Coastguard Worker	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4106*a67afe4dSAndroid Build Coastguard Worker
4107*a67afe4dSAndroid Build Coastguard Worker	  cat <<_LT_EOF >> conftest.$ac_ext
4108*a67afe4dSAndroid Build Coastguard Worker
4109*a67afe4dSAndroid Build Coastguard Worker/* The mapping between symbol names and symbols.  */
4110*a67afe4dSAndroid Build Coastguard WorkerLT@&t@_DLSYM_CONST struct {
4111*a67afe4dSAndroid Build Coastguard Worker  const char *name;
4112*a67afe4dSAndroid Build Coastguard Worker  void       *address;
4113*a67afe4dSAndroid Build Coastguard Worker}
4114*a67afe4dSAndroid Build Coastguard Workerlt__PROGRAM__LTX_preloaded_symbols[[]] =
4115*a67afe4dSAndroid Build Coastguard Worker{
4116*a67afe4dSAndroid Build Coastguard Worker  { "@PROGRAM@", (void *) 0 },
4117*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
4118*a67afe4dSAndroid Build Coastguard Worker	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4119*a67afe4dSAndroid Build Coastguard Worker	  cat <<\_LT_EOF >> conftest.$ac_ext
4120*a67afe4dSAndroid Build Coastguard Worker  {0, (void *) 0}
4121*a67afe4dSAndroid Build Coastguard Worker};
4122*a67afe4dSAndroid Build Coastguard Worker
4123*a67afe4dSAndroid Build Coastguard Worker/* This works around a problem in FreeBSD linker */
4124*a67afe4dSAndroid Build Coastguard Worker#ifdef FREEBSD_WORKAROUND
4125*a67afe4dSAndroid Build Coastguard Workerstatic const void *lt_preloaded_setup() {
4126*a67afe4dSAndroid Build Coastguard Worker  return lt__PROGRAM__LTX_preloaded_symbols;
4127*a67afe4dSAndroid Build Coastguard Worker}
4128*a67afe4dSAndroid Build Coastguard Worker#endif
4129*a67afe4dSAndroid Build Coastguard Worker
4130*a67afe4dSAndroid Build Coastguard Worker#ifdef __cplusplus
4131*a67afe4dSAndroid Build Coastguard Worker}
4132*a67afe4dSAndroid Build Coastguard Worker#endif
4133*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
4134*a67afe4dSAndroid Build Coastguard Worker	  # Now try linking the two files.
4135*a67afe4dSAndroid Build Coastguard Worker	  mv conftest.$ac_objext conftstm.$ac_objext
4136*a67afe4dSAndroid Build Coastguard Worker	  lt_globsym_save_LIBS=$LIBS
4137*a67afe4dSAndroid Build Coastguard Worker	  lt_globsym_save_CFLAGS=$CFLAGS
4138*a67afe4dSAndroid Build Coastguard Worker	  LIBS=conftstm.$ac_objext
4139*a67afe4dSAndroid Build Coastguard Worker	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4140*a67afe4dSAndroid Build Coastguard Worker	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4141*a67afe4dSAndroid Build Coastguard Worker	    pipe_works=yes
4142*a67afe4dSAndroid Build Coastguard Worker	  fi
4143*a67afe4dSAndroid Build Coastguard Worker	  LIBS=$lt_globsym_save_LIBS
4144*a67afe4dSAndroid Build Coastguard Worker	  CFLAGS=$lt_globsym_save_CFLAGS
4145*a67afe4dSAndroid Build Coastguard Worker	else
4146*a67afe4dSAndroid Build Coastguard Worker	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4147*a67afe4dSAndroid Build Coastguard Worker	fi
4148*a67afe4dSAndroid Build Coastguard Worker      else
4149*a67afe4dSAndroid Build Coastguard Worker	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4150*a67afe4dSAndroid Build Coastguard Worker      fi
4151*a67afe4dSAndroid Build Coastguard Worker    else
4152*a67afe4dSAndroid Build Coastguard Worker      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4153*a67afe4dSAndroid Build Coastguard Worker    fi
4154*a67afe4dSAndroid Build Coastguard Worker  else
4155*a67afe4dSAndroid Build Coastguard Worker    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4156*a67afe4dSAndroid Build Coastguard Worker    cat conftest.$ac_ext >&5
4157*a67afe4dSAndroid Build Coastguard Worker  fi
4158*a67afe4dSAndroid Build Coastguard Worker  rm -rf conftest* conftst*
4159*a67afe4dSAndroid Build Coastguard Worker
4160*a67afe4dSAndroid Build Coastguard Worker  # Do not use the global_symbol_pipe unless it works.
4161*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$pipe_works"; then
4162*a67afe4dSAndroid Build Coastguard Worker    break
4163*a67afe4dSAndroid Build Coastguard Worker  else
4164*a67afe4dSAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe=
4165*a67afe4dSAndroid Build Coastguard Worker  fi
4166*a67afe4dSAndroid Build Coastguard Workerdone
4167*a67afe4dSAndroid Build Coastguard Worker])
4168*a67afe4dSAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe"; then
4169*a67afe4dSAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_cdecl=
4170*a67afe4dSAndroid Build Coastguard Workerfi
4171*a67afe4dSAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4172*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT(failed)
4173*a67afe4dSAndroid Build Coastguard Workerelse
4174*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT(ok)
4175*a67afe4dSAndroid Build Coastguard Workerfi
4176*a67afe4dSAndroid Build Coastguard Worker
4177*a67afe4dSAndroid Build Coastguard Worker# Response file support.
4178*a67afe4dSAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then
4179*a67afe4dSAndroid Build Coastguard Worker  nm_file_list_spec='@'
4180*a67afe4dSAndroid Build Coastguard Workerelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4181*a67afe4dSAndroid Build Coastguard Worker  nm_file_list_spec='@'
4182*a67afe4dSAndroid Build Coastguard Workerfi
4183*a67afe4dSAndroid Build Coastguard Worker
4184*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4185*a67afe4dSAndroid Build Coastguard Worker    [Take the output of nm and produce a listing of raw symbols and C names])
4186*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4187*a67afe4dSAndroid Build Coastguard Worker    [Transform the output of nm in a proper C declaration])
4188*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4189*a67afe4dSAndroid Build Coastguard Worker    [Transform the output of nm into a list of symbols to manually relocate])
4190*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address],
4191*a67afe4dSAndroid Build Coastguard Worker    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4192*a67afe4dSAndroid Build Coastguard Worker    [Transform the output of nm in a C name address pair])
4193*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4194*a67afe4dSAndroid Build Coastguard Worker    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4195*a67afe4dSAndroid Build Coastguard Worker    [Transform the output of nm in a C name address pair when lib prefix is needed])
4196*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4197*a67afe4dSAndroid Build Coastguard Worker    [The name lister interface])
4198*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [nm_file_list_spec], [1],
4199*a67afe4dSAndroid Build Coastguard Worker    [Specify filename containing input files for $NM])
4200*a67afe4dSAndroid Build Coastguard Worker]) # _LT_CMD_GLOBAL_SYMBOLS
4201*a67afe4dSAndroid Build Coastguard Worker
4202*a67afe4dSAndroid Build Coastguard Worker
4203*a67afe4dSAndroid Build Coastguard Worker# _LT_COMPILER_PIC([TAGNAME])
4204*a67afe4dSAndroid Build Coastguard Worker# ---------------------------
4205*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_PIC],
4206*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl
4207*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4208*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4209*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_static, $1)=
4210*a67afe4dSAndroid Build Coastguard Worker
4211*a67afe4dSAndroid Build Coastguard Workerm4_if([$1], [CXX], [
4212*a67afe4dSAndroid Build Coastguard Worker  # C++ specific cases for pic, static, wl, etc.
4213*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$GXX"; then
4214*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4215*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4216*a67afe4dSAndroid Build Coastguard Worker
4217*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
4218*a67afe4dSAndroid Build Coastguard Worker    aix*)
4219*a67afe4dSAndroid Build Coastguard Worker      # All AIX code is PIC.
4220*a67afe4dSAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
4221*a67afe4dSAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4222*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4223*a67afe4dSAndroid Build Coastguard Worker      fi
4224*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4225*a67afe4dSAndroid Build Coastguard Worker      ;;
4226*a67afe4dSAndroid Build Coastguard Worker
4227*a67afe4dSAndroid Build Coastguard Worker    amigaos*)
4228*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
4229*a67afe4dSAndroid Build Coastguard Worker      powerpc)
4230*a67afe4dSAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
4231*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4232*a67afe4dSAndroid Build Coastguard Worker        ;;
4233*a67afe4dSAndroid Build Coastguard Worker      m68k)
4234*a67afe4dSAndroid Build Coastguard Worker            # FIXME: we need at least 68020 code to build shared libraries, but
4235*a67afe4dSAndroid Build Coastguard Worker            # adding the '-m68020' flag to GCC prevents building anything better,
4236*a67afe4dSAndroid Build Coastguard Worker            # like '-m68040'.
4237*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4238*a67afe4dSAndroid Build Coastguard Worker        ;;
4239*a67afe4dSAndroid Build Coastguard Worker      esac
4240*a67afe4dSAndroid Build Coastguard Worker      ;;
4241*a67afe4dSAndroid Build Coastguard Worker
4242*a67afe4dSAndroid Build Coastguard Worker    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4243*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for these OSes.
4244*a67afe4dSAndroid Build Coastguard Worker      ;;
4245*a67afe4dSAndroid Build Coastguard Worker    mingw* | cygwin* | os2* | pw32* | cegcc*)
4246*a67afe4dSAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4247*a67afe4dSAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4248*a67afe4dSAndroid Build Coastguard Worker      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4249*a67afe4dSAndroid Build Coastguard Worker      # (--disable-auto-import) libraries
4250*a67afe4dSAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4251*a67afe4dSAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4252*a67afe4dSAndroid Build Coastguard Worker      case $host_os in
4253*a67afe4dSAndroid Build Coastguard Worker      os2*)
4254*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4255*a67afe4dSAndroid Build Coastguard Worker	;;
4256*a67afe4dSAndroid Build Coastguard Worker      esac
4257*a67afe4dSAndroid Build Coastguard Worker      ;;
4258*a67afe4dSAndroid Build Coastguard Worker    darwin* | rhapsody*)
4259*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default on this platform
4260*a67afe4dSAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4261*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4262*a67afe4dSAndroid Build Coastguard Worker      ;;
4263*a67afe4dSAndroid Build Coastguard Worker    *djgpp*)
4264*a67afe4dSAndroid Build Coastguard Worker      # DJGPP does not support shared libraries at all
4265*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4266*a67afe4dSAndroid Build Coastguard Worker      ;;
4267*a67afe4dSAndroid Build Coastguard Worker    haiku*)
4268*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for Haiku.
4269*a67afe4dSAndroid Build Coastguard Worker      # The "-static" flag exists, but is broken.
4270*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4271*a67afe4dSAndroid Build Coastguard Worker      ;;
4272*a67afe4dSAndroid Build Coastguard Worker    interix[[3-9]]*)
4273*a67afe4dSAndroid Build Coastguard Worker      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4274*a67afe4dSAndroid Build Coastguard Worker      # Instead, we relocate shared libraries at runtime.
4275*a67afe4dSAndroid Build Coastguard Worker      ;;
4276*a67afe4dSAndroid Build Coastguard Worker    sysv4*MP*)
4277*a67afe4dSAndroid Build Coastguard Worker      if test -d /usr/nec; then
4278*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4279*a67afe4dSAndroid Build Coastguard Worker      fi
4280*a67afe4dSAndroid Build Coastguard Worker      ;;
4281*a67afe4dSAndroid Build Coastguard Worker    hpux*)
4282*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4283*a67afe4dSAndroid Build Coastguard Worker      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4284*a67afe4dSAndroid Build Coastguard Worker      # sets the default TLS model and affects inlining.
4285*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
4286*a67afe4dSAndroid Build Coastguard Worker      hppa*64*)
4287*a67afe4dSAndroid Build Coastguard Worker	;;
4288*a67afe4dSAndroid Build Coastguard Worker      *)
4289*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4290*a67afe4dSAndroid Build Coastguard Worker	;;
4291*a67afe4dSAndroid Build Coastguard Worker      esac
4292*a67afe4dSAndroid Build Coastguard Worker      ;;
4293*a67afe4dSAndroid Build Coastguard Worker    *qnx* | *nto*)
4294*a67afe4dSAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4295*a67afe4dSAndroid Build Coastguard Worker      # it will coredump.
4296*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4297*a67afe4dSAndroid Build Coastguard Worker      ;;
4298*a67afe4dSAndroid Build Coastguard Worker    *)
4299*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4300*a67afe4dSAndroid Build Coastguard Worker      ;;
4301*a67afe4dSAndroid Build Coastguard Worker    esac
4302*a67afe4dSAndroid Build Coastguard Worker  else
4303*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
4304*a67afe4dSAndroid Build Coastguard Worker      aix[[4-9]]*)
4305*a67afe4dSAndroid Build Coastguard Worker	# All AIX code is PIC.
4306*a67afe4dSAndroid Build Coastguard Worker	if test ia64 = "$host_cpu"; then
4307*a67afe4dSAndroid Build Coastguard Worker	  # AIX 5 now supports IA64 processor
4308*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4309*a67afe4dSAndroid Build Coastguard Worker	else
4310*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4311*a67afe4dSAndroid Build Coastguard Worker	fi
4312*a67afe4dSAndroid Build Coastguard Worker	;;
4313*a67afe4dSAndroid Build Coastguard Worker      chorus*)
4314*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4315*a67afe4dSAndroid Build Coastguard Worker	cxch68*)
4316*a67afe4dSAndroid Build Coastguard Worker	  # Green Hills C++ Compiler
4317*a67afe4dSAndroid Build Coastguard Worker	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4318*a67afe4dSAndroid Build Coastguard Worker	  ;;
4319*a67afe4dSAndroid Build Coastguard Worker	esac
4320*a67afe4dSAndroid Build Coastguard Worker	;;
4321*a67afe4dSAndroid Build Coastguard Worker      mingw* | cygwin* | os2* | pw32* | cegcc*)
4322*a67afe4dSAndroid Build Coastguard Worker	# This hack is so that the source file can tell whether it is being
4323*a67afe4dSAndroid Build Coastguard Worker	# built for inclusion in a dll (and should export symbols for example).
4324*a67afe4dSAndroid Build Coastguard Worker	m4_if([$1], [GCJ], [],
4325*a67afe4dSAndroid Build Coastguard Worker	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4326*a67afe4dSAndroid Build Coastguard Worker	;;
4327*a67afe4dSAndroid Build Coastguard Worker      dgux*)
4328*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4329*a67afe4dSAndroid Build Coastguard Worker	  ec++*)
4330*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4331*a67afe4dSAndroid Build Coastguard Worker	    ;;
4332*a67afe4dSAndroid Build Coastguard Worker	  ghcx*)
4333*a67afe4dSAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
4334*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4335*a67afe4dSAndroid Build Coastguard Worker	    ;;
4336*a67afe4dSAndroid Build Coastguard Worker	  *)
4337*a67afe4dSAndroid Build Coastguard Worker	    ;;
4338*a67afe4dSAndroid Build Coastguard Worker	esac
4339*a67afe4dSAndroid Build Coastguard Worker	;;
4340*a67afe4dSAndroid Build Coastguard Worker      freebsd* | dragonfly* | midnightbsd*)
4341*a67afe4dSAndroid Build Coastguard Worker	# FreeBSD uses GNU C++
4342*a67afe4dSAndroid Build Coastguard Worker	;;
4343*a67afe4dSAndroid Build Coastguard Worker      hpux9* | hpux10* | hpux11*)
4344*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4345*a67afe4dSAndroid Build Coastguard Worker	  CC*)
4346*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4347*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4348*a67afe4dSAndroid Build Coastguard Worker	    if test ia64 != "$host_cpu"; then
4349*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4350*a67afe4dSAndroid Build Coastguard Worker	    fi
4351*a67afe4dSAndroid Build Coastguard Worker	    ;;
4352*a67afe4dSAndroid Build Coastguard Worker	  aCC*)
4353*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4354*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4355*a67afe4dSAndroid Build Coastguard Worker	    case $host_cpu in
4356*a67afe4dSAndroid Build Coastguard Worker	    hppa*64*|ia64*)
4357*a67afe4dSAndroid Build Coastguard Worker	      # +Z the default
4358*a67afe4dSAndroid Build Coastguard Worker	      ;;
4359*a67afe4dSAndroid Build Coastguard Worker	    *)
4360*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4361*a67afe4dSAndroid Build Coastguard Worker	      ;;
4362*a67afe4dSAndroid Build Coastguard Worker	    esac
4363*a67afe4dSAndroid Build Coastguard Worker	    ;;
4364*a67afe4dSAndroid Build Coastguard Worker	  *)
4365*a67afe4dSAndroid Build Coastguard Worker	    ;;
4366*a67afe4dSAndroid Build Coastguard Worker	esac
4367*a67afe4dSAndroid Build Coastguard Worker	;;
4368*a67afe4dSAndroid Build Coastguard Worker      interix*)
4369*a67afe4dSAndroid Build Coastguard Worker	# This is c89, which is MS Visual C++ (no shared libs)
4370*a67afe4dSAndroid Build Coastguard Worker	# Anyone wants to do a port?
4371*a67afe4dSAndroid Build Coastguard Worker	;;
4372*a67afe4dSAndroid Build Coastguard Worker      irix5* | irix6* | nonstopux*)
4373*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4374*a67afe4dSAndroid Build Coastguard Worker	  CC*)
4375*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4376*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4377*a67afe4dSAndroid Build Coastguard Worker	    # CC pic flag -KPIC is the default.
4378*a67afe4dSAndroid Build Coastguard Worker	    ;;
4379*a67afe4dSAndroid Build Coastguard Worker	  *)
4380*a67afe4dSAndroid Build Coastguard Worker	    ;;
4381*a67afe4dSAndroid Build Coastguard Worker	esac
4382*a67afe4dSAndroid Build Coastguard Worker	;;
4383*a67afe4dSAndroid Build Coastguard Worker      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4384*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4385*a67afe4dSAndroid Build Coastguard Worker	  KCC*)
4386*a67afe4dSAndroid Build Coastguard Worker	    # KAI C++ Compiler
4387*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4388*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4389*a67afe4dSAndroid Build Coastguard Worker	    ;;
4390*a67afe4dSAndroid Build Coastguard Worker	  ecpc* )
4391*a67afe4dSAndroid Build Coastguard Worker	    # old Intel C++ for x86_64, which still supported -KPIC.
4392*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4393*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4394*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4395*a67afe4dSAndroid Build Coastguard Worker	    ;;
4396*a67afe4dSAndroid Build Coastguard Worker	  icpc* )
4397*a67afe4dSAndroid Build Coastguard Worker	    # Intel C++, used to be incompatible with GCC.
4398*a67afe4dSAndroid Build Coastguard Worker	    # ICC 10 doesn't accept -KPIC any more.
4399*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4400*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4401*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4402*a67afe4dSAndroid Build Coastguard Worker	    ;;
4403*a67afe4dSAndroid Build Coastguard Worker	  pgCC* | pgcpp*)
4404*a67afe4dSAndroid Build Coastguard Worker	    # Portland Group C++ compiler
4405*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4407*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4408*a67afe4dSAndroid Build Coastguard Worker	    ;;
4409*a67afe4dSAndroid Build Coastguard Worker	  cxx*)
4410*a67afe4dSAndroid Build Coastguard Worker	    # Compaq C++
4411*a67afe4dSAndroid Build Coastguard Worker	    # Make sure the PIC flag is empty.  It appears that all Alpha
4412*a67afe4dSAndroid Build Coastguard Worker	    # Linux and Compaq Tru64 Unix objects are PIC.
4413*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4414*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4415*a67afe4dSAndroid Build Coastguard Worker	    ;;
4416*a67afe4dSAndroid Build Coastguard Worker	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4417*a67afe4dSAndroid Build Coastguard Worker	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4418*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4419*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4420*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4421*a67afe4dSAndroid Build Coastguard Worker	    ;;
4422*a67afe4dSAndroid Build Coastguard Worker	  *)
4423*a67afe4dSAndroid Build Coastguard Worker	    case `$CC -V 2>&1 | $SED 5q` in
4424*a67afe4dSAndroid Build Coastguard Worker	    *Sun\ C*)
4425*a67afe4dSAndroid Build Coastguard Worker	      # Sun C++ 5.9
4426*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4427*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4428*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4429*a67afe4dSAndroid Build Coastguard Worker	      ;;
4430*a67afe4dSAndroid Build Coastguard Worker	    esac
4431*a67afe4dSAndroid Build Coastguard Worker	    ;;
4432*a67afe4dSAndroid Build Coastguard Worker	esac
4433*a67afe4dSAndroid Build Coastguard Worker	;;
4434*a67afe4dSAndroid Build Coastguard Worker      lynxos*)
4435*a67afe4dSAndroid Build Coastguard Worker	;;
4436*a67afe4dSAndroid Build Coastguard Worker      m88k*)
4437*a67afe4dSAndroid Build Coastguard Worker	;;
4438*a67afe4dSAndroid Build Coastguard Worker      mvs*)
4439*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4440*a67afe4dSAndroid Build Coastguard Worker	  cxx*)
4441*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4442*a67afe4dSAndroid Build Coastguard Worker	    ;;
4443*a67afe4dSAndroid Build Coastguard Worker	  *)
4444*a67afe4dSAndroid Build Coastguard Worker	    ;;
4445*a67afe4dSAndroid Build Coastguard Worker	esac
4446*a67afe4dSAndroid Build Coastguard Worker	;;
4447*a67afe4dSAndroid Build Coastguard Worker      netbsd*)
4448*a67afe4dSAndroid Build Coastguard Worker	;;
4449*a67afe4dSAndroid Build Coastguard Worker      *qnx* | *nto*)
4450*a67afe4dSAndroid Build Coastguard Worker        # QNX uses GNU C++, but need to define -shared option too, otherwise
4451*a67afe4dSAndroid Build Coastguard Worker        # it will coredump.
4452*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4453*a67afe4dSAndroid Build Coastguard Worker        ;;
4454*a67afe4dSAndroid Build Coastguard Worker      osf3* | osf4* | osf5*)
4455*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4456*a67afe4dSAndroid Build Coastguard Worker	  KCC*)
4457*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4458*a67afe4dSAndroid Build Coastguard Worker	    ;;
4459*a67afe4dSAndroid Build Coastguard Worker	  RCC*)
4460*a67afe4dSAndroid Build Coastguard Worker	    # Rational C++ 2.4.1
4461*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4462*a67afe4dSAndroid Build Coastguard Worker	    ;;
4463*a67afe4dSAndroid Build Coastguard Worker	  cxx*)
4464*a67afe4dSAndroid Build Coastguard Worker	    # Digital/Compaq C++
4465*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4466*a67afe4dSAndroid Build Coastguard Worker	    # Make sure the PIC flag is empty.  It appears that all Alpha
4467*a67afe4dSAndroid Build Coastguard Worker	    # Linux and Compaq Tru64 Unix objects are PIC.
4468*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4469*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4470*a67afe4dSAndroid Build Coastguard Worker	    ;;
4471*a67afe4dSAndroid Build Coastguard Worker	  *)
4472*a67afe4dSAndroid Build Coastguard Worker	    ;;
4473*a67afe4dSAndroid Build Coastguard Worker	esac
4474*a67afe4dSAndroid Build Coastguard Worker	;;
4475*a67afe4dSAndroid Build Coastguard Worker      psos*)
4476*a67afe4dSAndroid Build Coastguard Worker	;;
4477*a67afe4dSAndroid Build Coastguard Worker      solaris*)
4478*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4479*a67afe4dSAndroid Build Coastguard Worker	  CC* | sunCC*)
4480*a67afe4dSAndroid Build Coastguard Worker	    # Sun C++ 4.2, 5.x and Centerline C++
4481*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4482*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4483*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4484*a67afe4dSAndroid Build Coastguard Worker	    ;;
4485*a67afe4dSAndroid Build Coastguard Worker	  gcx*)
4486*a67afe4dSAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
4487*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4488*a67afe4dSAndroid Build Coastguard Worker	    ;;
4489*a67afe4dSAndroid Build Coastguard Worker	  *)
4490*a67afe4dSAndroid Build Coastguard Worker	    ;;
4491*a67afe4dSAndroid Build Coastguard Worker	esac
4492*a67afe4dSAndroid Build Coastguard Worker	;;
4493*a67afe4dSAndroid Build Coastguard Worker      sunos4*)
4494*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4495*a67afe4dSAndroid Build Coastguard Worker	  CC*)
4496*a67afe4dSAndroid Build Coastguard Worker	    # Sun C++ 4.x
4497*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4498*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4499*a67afe4dSAndroid Build Coastguard Worker	    ;;
4500*a67afe4dSAndroid Build Coastguard Worker	  lcc*)
4501*a67afe4dSAndroid Build Coastguard Worker	    # Lucid
4502*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4503*a67afe4dSAndroid Build Coastguard Worker	    ;;
4504*a67afe4dSAndroid Build Coastguard Worker	  *)
4505*a67afe4dSAndroid Build Coastguard Worker	    ;;
4506*a67afe4dSAndroid Build Coastguard Worker	esac
4507*a67afe4dSAndroid Build Coastguard Worker	;;
4508*a67afe4dSAndroid Build Coastguard Worker      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4509*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4510*a67afe4dSAndroid Build Coastguard Worker	  CC*)
4511*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4512*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4513*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4514*a67afe4dSAndroid Build Coastguard Worker	    ;;
4515*a67afe4dSAndroid Build Coastguard Worker	esac
4516*a67afe4dSAndroid Build Coastguard Worker	;;
4517*a67afe4dSAndroid Build Coastguard Worker      tandem*)
4518*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
4519*a67afe4dSAndroid Build Coastguard Worker	  NCC*)
4520*a67afe4dSAndroid Build Coastguard Worker	    # NonStop-UX NCC 3.20
4521*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4522*a67afe4dSAndroid Build Coastguard Worker	    ;;
4523*a67afe4dSAndroid Build Coastguard Worker	  *)
4524*a67afe4dSAndroid Build Coastguard Worker	    ;;
4525*a67afe4dSAndroid Build Coastguard Worker	esac
4526*a67afe4dSAndroid Build Coastguard Worker	;;
4527*a67afe4dSAndroid Build Coastguard Worker      vxworks*)
4528*a67afe4dSAndroid Build Coastguard Worker	;;
4529*a67afe4dSAndroid Build Coastguard Worker      *)
4530*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4531*a67afe4dSAndroid Build Coastguard Worker	;;
4532*a67afe4dSAndroid Build Coastguard Worker    esac
4533*a67afe4dSAndroid Build Coastguard Worker  fi
4534*a67afe4dSAndroid Build Coastguard Worker],
4535*a67afe4dSAndroid Build Coastguard Worker[
4536*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$GCC"; then
4537*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4538*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4539*a67afe4dSAndroid Build Coastguard Worker
4540*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
4541*a67afe4dSAndroid Build Coastguard Worker      aix*)
4542*a67afe4dSAndroid Build Coastguard Worker      # All AIX code is PIC.
4543*a67afe4dSAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
4544*a67afe4dSAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4545*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4546*a67afe4dSAndroid Build Coastguard Worker      fi
4547*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4548*a67afe4dSAndroid Build Coastguard Worker      ;;
4549*a67afe4dSAndroid Build Coastguard Worker
4550*a67afe4dSAndroid Build Coastguard Worker    amigaos*)
4551*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
4552*a67afe4dSAndroid Build Coastguard Worker      powerpc)
4553*a67afe4dSAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
4554*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4555*a67afe4dSAndroid Build Coastguard Worker        ;;
4556*a67afe4dSAndroid Build Coastguard Worker      m68k)
4557*a67afe4dSAndroid Build Coastguard Worker            # FIXME: we need at least 68020 code to build shared libraries, but
4558*a67afe4dSAndroid Build Coastguard Worker            # adding the '-m68020' flag to GCC prevents building anything better,
4559*a67afe4dSAndroid Build Coastguard Worker            # like '-m68040'.
4560*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4561*a67afe4dSAndroid Build Coastguard Worker        ;;
4562*a67afe4dSAndroid Build Coastguard Worker      esac
4563*a67afe4dSAndroid Build Coastguard Worker      ;;
4564*a67afe4dSAndroid Build Coastguard Worker
4565*a67afe4dSAndroid Build Coastguard Worker    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4566*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for these OSes.
4567*a67afe4dSAndroid Build Coastguard Worker      ;;
4568*a67afe4dSAndroid Build Coastguard Worker
4569*a67afe4dSAndroid Build Coastguard Worker    mingw* | cygwin* | pw32* | os2* | cegcc*)
4570*a67afe4dSAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4571*a67afe4dSAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4572*a67afe4dSAndroid Build Coastguard Worker      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4573*a67afe4dSAndroid Build Coastguard Worker      # (--disable-auto-import) libraries
4574*a67afe4dSAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4575*a67afe4dSAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4576*a67afe4dSAndroid Build Coastguard Worker      case $host_os in
4577*a67afe4dSAndroid Build Coastguard Worker      os2*)
4578*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4579*a67afe4dSAndroid Build Coastguard Worker	;;
4580*a67afe4dSAndroid Build Coastguard Worker      esac
4581*a67afe4dSAndroid Build Coastguard Worker      ;;
4582*a67afe4dSAndroid Build Coastguard Worker
4583*a67afe4dSAndroid Build Coastguard Worker    darwin* | rhapsody*)
4584*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default on this platform
4585*a67afe4dSAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4586*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4587*a67afe4dSAndroid Build Coastguard Worker      ;;
4588*a67afe4dSAndroid Build Coastguard Worker
4589*a67afe4dSAndroid Build Coastguard Worker    haiku*)
4590*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for Haiku.
4591*a67afe4dSAndroid Build Coastguard Worker      # The "-static" flag exists, but is broken.
4592*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4593*a67afe4dSAndroid Build Coastguard Worker      ;;
4594*a67afe4dSAndroid Build Coastguard Worker
4595*a67afe4dSAndroid Build Coastguard Worker    hpux*)
4596*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4597*a67afe4dSAndroid Build Coastguard Worker      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4598*a67afe4dSAndroid Build Coastguard Worker      # sets the default TLS model and affects inlining.
4599*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
4600*a67afe4dSAndroid Build Coastguard Worker      hppa*64*)
4601*a67afe4dSAndroid Build Coastguard Worker	# +Z the default
4602*a67afe4dSAndroid Build Coastguard Worker	;;
4603*a67afe4dSAndroid Build Coastguard Worker      *)
4604*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4605*a67afe4dSAndroid Build Coastguard Worker	;;
4606*a67afe4dSAndroid Build Coastguard Worker      esac
4607*a67afe4dSAndroid Build Coastguard Worker      ;;
4608*a67afe4dSAndroid Build Coastguard Worker
4609*a67afe4dSAndroid Build Coastguard Worker    interix[[3-9]]*)
4610*a67afe4dSAndroid Build Coastguard Worker      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4611*a67afe4dSAndroid Build Coastguard Worker      # Instead, we relocate shared libraries at runtime.
4612*a67afe4dSAndroid Build Coastguard Worker      ;;
4613*a67afe4dSAndroid Build Coastguard Worker
4614*a67afe4dSAndroid Build Coastguard Worker    msdosdjgpp*)
4615*a67afe4dSAndroid Build Coastguard Worker      # Just because we use GCC doesn't mean we suddenly get shared libraries
4616*a67afe4dSAndroid Build Coastguard Worker      # on systems that don't support them.
4617*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4618*a67afe4dSAndroid Build Coastguard Worker      enable_shared=no
4619*a67afe4dSAndroid Build Coastguard Worker      ;;
4620*a67afe4dSAndroid Build Coastguard Worker
4621*a67afe4dSAndroid Build Coastguard Worker    *nto* | *qnx*)
4622*a67afe4dSAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4623*a67afe4dSAndroid Build Coastguard Worker      # it will coredump.
4624*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4625*a67afe4dSAndroid Build Coastguard Worker      ;;
4626*a67afe4dSAndroid Build Coastguard Worker
4627*a67afe4dSAndroid Build Coastguard Worker    sysv4*MP*)
4628*a67afe4dSAndroid Build Coastguard Worker      if test -d /usr/nec; then
4629*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4630*a67afe4dSAndroid Build Coastguard Worker      fi
4631*a67afe4dSAndroid Build Coastguard Worker      ;;
4632*a67afe4dSAndroid Build Coastguard Worker
4633*a67afe4dSAndroid Build Coastguard Worker    *)
4634*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4635*a67afe4dSAndroid Build Coastguard Worker      ;;
4636*a67afe4dSAndroid Build Coastguard Worker    esac
4637*a67afe4dSAndroid Build Coastguard Worker
4638*a67afe4dSAndroid Build Coastguard Worker    case $cc_basename in
4639*a67afe4dSAndroid Build Coastguard Worker    nvcc*) # Cuda Compiler Driver 2.2
4640*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4641*a67afe4dSAndroid Build Coastguard Worker      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4642*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4643*a67afe4dSAndroid Build Coastguard Worker      fi
4644*a67afe4dSAndroid Build Coastguard Worker      ;;
4645*a67afe4dSAndroid Build Coastguard Worker    esac
4646*a67afe4dSAndroid Build Coastguard Worker  else
4647*a67afe4dSAndroid Build Coastguard Worker    # PORTME Check for flag to pass linker flags through the system compiler.
4648*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
4649*a67afe4dSAndroid Build Coastguard Worker    aix*)
4650*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4651*a67afe4dSAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
4652*a67afe4dSAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4653*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4654*a67afe4dSAndroid Build Coastguard Worker      else
4655*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4656*a67afe4dSAndroid Build Coastguard Worker      fi
4657*a67afe4dSAndroid Build Coastguard Worker      ;;
4658*a67afe4dSAndroid Build Coastguard Worker
4659*a67afe4dSAndroid Build Coastguard Worker    darwin* | rhapsody*)
4660*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default on this platform
4661*a67afe4dSAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4662*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4663*a67afe4dSAndroid Build Coastguard Worker      case $cc_basename in
4664*a67afe4dSAndroid Build Coastguard Worker      nagfor*)
4665*a67afe4dSAndroid Build Coastguard Worker        # NAG Fortran compiler
4666*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4667*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4668*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4669*a67afe4dSAndroid Build Coastguard Worker        ;;
4670*a67afe4dSAndroid Build Coastguard Worker      esac
4671*a67afe4dSAndroid Build Coastguard Worker      ;;
4672*a67afe4dSAndroid Build Coastguard Worker
4673*a67afe4dSAndroid Build Coastguard Worker    mingw* | cygwin* | pw32* | os2* | cegcc*)
4674*a67afe4dSAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4675*a67afe4dSAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4676*a67afe4dSAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4677*a67afe4dSAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4678*a67afe4dSAndroid Build Coastguard Worker      case $host_os in
4679*a67afe4dSAndroid Build Coastguard Worker      os2*)
4680*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4681*a67afe4dSAndroid Build Coastguard Worker	;;
4682*a67afe4dSAndroid Build Coastguard Worker      esac
4683*a67afe4dSAndroid Build Coastguard Worker      ;;
4684*a67afe4dSAndroid Build Coastguard Worker
4685*a67afe4dSAndroid Build Coastguard Worker    hpux9* | hpux10* | hpux11*)
4686*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4687*a67afe4dSAndroid Build Coastguard Worker      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4688*a67afe4dSAndroid Build Coastguard Worker      # not for PA HP-UX.
4689*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
4690*a67afe4dSAndroid Build Coastguard Worker      hppa*64*|ia64*)
4691*a67afe4dSAndroid Build Coastguard Worker	# +Z the default
4692*a67afe4dSAndroid Build Coastguard Worker	;;
4693*a67afe4dSAndroid Build Coastguard Worker      *)
4694*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4695*a67afe4dSAndroid Build Coastguard Worker	;;
4696*a67afe4dSAndroid Build Coastguard Worker      esac
4697*a67afe4dSAndroid Build Coastguard Worker      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4698*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4699*a67afe4dSAndroid Build Coastguard Worker      ;;
4700*a67afe4dSAndroid Build Coastguard Worker
4701*a67afe4dSAndroid Build Coastguard Worker    irix5* | irix6* | nonstopux*)
4702*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4703*a67afe4dSAndroid Build Coastguard Worker      # PIC (with -KPIC) is the default.
4704*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4705*a67afe4dSAndroid Build Coastguard Worker      ;;
4706*a67afe4dSAndroid Build Coastguard Worker
4707*a67afe4dSAndroid Build Coastguard Worker    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4708*a67afe4dSAndroid Build Coastguard Worker      case $cc_basename in
4709*a67afe4dSAndroid Build Coastguard Worker      # old Intel for x86_64, which still supported -KPIC.
4710*a67afe4dSAndroid Build Coastguard Worker      ecc*)
4711*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4712*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4713*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4714*a67afe4dSAndroid Build Coastguard Worker        ;;
4715*a67afe4dSAndroid Build Coastguard Worker      # icc used to be incompatible with GCC.
4716*a67afe4dSAndroid Build Coastguard Worker      # ICC 10 doesn't accept -KPIC any more.
4717*a67afe4dSAndroid Build Coastguard Worker      icc* | ifort*)
4718*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4719*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4720*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4721*a67afe4dSAndroid Build Coastguard Worker        ;;
4722*a67afe4dSAndroid Build Coastguard Worker      # Lahey Fortran 8.1.
4723*a67afe4dSAndroid Build Coastguard Worker      lf95*)
4724*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4725*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4726*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4727*a67afe4dSAndroid Build Coastguard Worker	;;
4728*a67afe4dSAndroid Build Coastguard Worker      nagfor*)
4729*a67afe4dSAndroid Build Coastguard Worker	# NAG Fortran compiler
4730*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4731*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4732*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4733*a67afe4dSAndroid Build Coastguard Worker	;;
4734*a67afe4dSAndroid Build Coastguard Worker      tcc*)
4735*a67afe4dSAndroid Build Coastguard Worker	# Fabrice Bellard et al's Tiny C Compiler
4736*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4737*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4738*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4739*a67afe4dSAndroid Build Coastguard Worker	;;
4740*a67afe4dSAndroid Build Coastguard Worker      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4741*a67afe4dSAndroid Build Coastguard Worker        # Portland Group compilers (*not* the Pentium gcc compiler,
4742*a67afe4dSAndroid Build Coastguard Worker	# which looks to be a dead project)
4743*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4744*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4745*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4746*a67afe4dSAndroid Build Coastguard Worker        ;;
4747*a67afe4dSAndroid Build Coastguard Worker      ccc*)
4748*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4749*a67afe4dSAndroid Build Coastguard Worker        # All Alpha code is PIC.
4750*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4751*a67afe4dSAndroid Build Coastguard Worker        ;;
4752*a67afe4dSAndroid Build Coastguard Worker      xl* | bgxl* | bgf* | mpixl*)
4753*a67afe4dSAndroid Build Coastguard Worker	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4754*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4755*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4756*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4757*a67afe4dSAndroid Build Coastguard Worker	;;
4758*a67afe4dSAndroid Build Coastguard Worker      *)
4759*a67afe4dSAndroid Build Coastguard Worker	case `$CC -V 2>&1 | $SED 5q` in
4760*a67afe4dSAndroid Build Coastguard Worker	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4761*a67afe4dSAndroid Build Coastguard Worker	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4762*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4763*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4764*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4765*a67afe4dSAndroid Build Coastguard Worker	  ;;
4766*a67afe4dSAndroid Build Coastguard Worker	*Sun\ F* | *Sun*Fortran*)
4767*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4768*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4769*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4770*a67afe4dSAndroid Build Coastguard Worker	  ;;
4771*a67afe4dSAndroid Build Coastguard Worker	*Sun\ C*)
4772*a67afe4dSAndroid Build Coastguard Worker	  # Sun C 5.9
4773*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4774*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4775*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776*a67afe4dSAndroid Build Coastguard Worker	  ;;
4777*a67afe4dSAndroid Build Coastguard Worker        *Intel*\ [[CF]]*Compiler*)
4778*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4779*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4780*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4781*a67afe4dSAndroid Build Coastguard Worker	  ;;
4782*a67afe4dSAndroid Build Coastguard Worker	*Portland\ Group*)
4783*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4784*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4785*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4786*a67afe4dSAndroid Build Coastguard Worker	  ;;
4787*a67afe4dSAndroid Build Coastguard Worker	esac
4788*a67afe4dSAndroid Build Coastguard Worker	;;
4789*a67afe4dSAndroid Build Coastguard Worker      esac
4790*a67afe4dSAndroid Build Coastguard Worker      ;;
4791*a67afe4dSAndroid Build Coastguard Worker
4792*a67afe4dSAndroid Build Coastguard Worker    newsos6)
4793*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4794*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4795*a67afe4dSAndroid Build Coastguard Worker      ;;
4796*a67afe4dSAndroid Build Coastguard Worker
4797*a67afe4dSAndroid Build Coastguard Worker    *nto* | *qnx*)
4798*a67afe4dSAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4799*a67afe4dSAndroid Build Coastguard Worker      # it will coredump.
4800*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4801*a67afe4dSAndroid Build Coastguard Worker      ;;
4802*a67afe4dSAndroid Build Coastguard Worker
4803*a67afe4dSAndroid Build Coastguard Worker    osf3* | osf4* | osf5*)
4804*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4805*a67afe4dSAndroid Build Coastguard Worker      # All OSF/1 code is PIC.
4806*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4807*a67afe4dSAndroid Build Coastguard Worker      ;;
4808*a67afe4dSAndroid Build Coastguard Worker
4809*a67afe4dSAndroid Build Coastguard Worker    rdos*)
4810*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4811*a67afe4dSAndroid Build Coastguard Worker      ;;
4812*a67afe4dSAndroid Build Coastguard Worker
4813*a67afe4dSAndroid Build Coastguard Worker    solaris*)
4814*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4815*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4816*a67afe4dSAndroid Build Coastguard Worker      case $cc_basename in
4817*a67afe4dSAndroid Build Coastguard Worker      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4818*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4819*a67afe4dSAndroid Build Coastguard Worker      *)
4820*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4821*a67afe4dSAndroid Build Coastguard Worker      esac
4822*a67afe4dSAndroid Build Coastguard Worker      ;;
4823*a67afe4dSAndroid Build Coastguard Worker
4824*a67afe4dSAndroid Build Coastguard Worker    sunos4*)
4825*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4826*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4827*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4828*a67afe4dSAndroid Build Coastguard Worker      ;;
4829*a67afe4dSAndroid Build Coastguard Worker
4830*a67afe4dSAndroid Build Coastguard Worker    sysv4 | sysv4.2uw2* | sysv4.3*)
4831*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4832*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4833*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4834*a67afe4dSAndroid Build Coastguard Worker      ;;
4835*a67afe4dSAndroid Build Coastguard Worker
4836*a67afe4dSAndroid Build Coastguard Worker    sysv4*MP*)
4837*a67afe4dSAndroid Build Coastguard Worker      if test -d /usr/nec; then
4838*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4839*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4840*a67afe4dSAndroid Build Coastguard Worker      fi
4841*a67afe4dSAndroid Build Coastguard Worker      ;;
4842*a67afe4dSAndroid Build Coastguard Worker
4843*a67afe4dSAndroid Build Coastguard Worker    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4844*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4845*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4846*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4847*a67afe4dSAndroid Build Coastguard Worker      ;;
4848*a67afe4dSAndroid Build Coastguard Worker
4849*a67afe4dSAndroid Build Coastguard Worker    unicos*)
4850*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4851*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4852*a67afe4dSAndroid Build Coastguard Worker      ;;
4853*a67afe4dSAndroid Build Coastguard Worker
4854*a67afe4dSAndroid Build Coastguard Worker    uts4*)
4855*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4856*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4857*a67afe4dSAndroid Build Coastguard Worker      ;;
4858*a67afe4dSAndroid Build Coastguard Worker
4859*a67afe4dSAndroid Build Coastguard Worker    *)
4860*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4861*a67afe4dSAndroid Build Coastguard Worker      ;;
4862*a67afe4dSAndroid Build Coastguard Worker    esac
4863*a67afe4dSAndroid Build Coastguard Worker  fi
4864*a67afe4dSAndroid Build Coastguard Worker])
4865*a67afe4dSAndroid Build Coastguard Workercase $host_os in
4866*a67afe4dSAndroid Build Coastguard Worker  # For platforms that do not support PIC, -DPIC is meaningless:
4867*a67afe4dSAndroid Build Coastguard Worker  *djgpp*)
4868*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4869*a67afe4dSAndroid Build Coastguard Worker    ;;
4870*a67afe4dSAndroid Build Coastguard Worker  *)
4871*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4872*a67afe4dSAndroid Build Coastguard Worker    ;;
4873*a67afe4dSAndroid Build Coastguard Workeresac
4874*a67afe4dSAndroid Build Coastguard Worker
4875*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_CHECK([for $compiler option to produce PIC],
4876*a67afe4dSAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4877*a67afe4dSAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4878*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4879*a67afe4dSAndroid Build Coastguard Worker
4880*a67afe4dSAndroid Build Coastguard Worker#
4881*a67afe4dSAndroid Build Coastguard Worker# Check to make sure the PIC flag actually works.
4882*a67afe4dSAndroid Build Coastguard Worker#
4883*a67afe4dSAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4884*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4885*a67afe4dSAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4886*a67afe4dSAndroid Build Coastguard Worker    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4887*a67afe4dSAndroid Build Coastguard Worker    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4888*a67afe4dSAndroid Build Coastguard Worker     "" | " "*) ;;
4889*a67afe4dSAndroid Build Coastguard Worker     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4890*a67afe4dSAndroid Build Coastguard Worker     esac],
4891*a67afe4dSAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4892*a67afe4dSAndroid Build Coastguard Worker     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4893*a67afe4dSAndroid Build Coastguard Workerfi
4894*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4895*a67afe4dSAndroid Build Coastguard Worker	[Additional compiler flags for building library objects])
4896*a67afe4dSAndroid Build Coastguard Worker
4897*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4898*a67afe4dSAndroid Build Coastguard Worker	[How to pass a linker flag through the compiler])
4899*a67afe4dSAndroid Build Coastguard Worker#
4900*a67afe4dSAndroid Build Coastguard Worker# Check to make sure the static flag actually works.
4901*a67afe4dSAndroid Build Coastguard Worker#
4902*a67afe4dSAndroid Build Coastguard Workerwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4903*a67afe4dSAndroid Build Coastguard Worker_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4904*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4905*a67afe4dSAndroid Build Coastguard Worker  $lt_tmp_static_flag,
4906*a67afe4dSAndroid Build Coastguard Worker  [],
4907*a67afe4dSAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4908*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4909*a67afe4dSAndroid Build Coastguard Worker	[Compiler flag to prevent dynamic linking])
4910*a67afe4dSAndroid Build Coastguard Worker])# _LT_COMPILER_PIC
4911*a67afe4dSAndroid Build Coastguard Worker
4912*a67afe4dSAndroid Build Coastguard Worker
4913*a67afe4dSAndroid Build Coastguard Worker# _LT_LINKER_SHLIBS([TAGNAME])
4914*a67afe4dSAndroid Build Coastguard Worker# ----------------------------
4915*a67afe4dSAndroid Build Coastguard Worker# See if the linker supports building shared libraries.
4916*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LINKER_SHLIBS],
4917*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PATH_LD])dnl
4918*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
4919*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4920*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4921*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
4922*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
4923*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4924*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
4925*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4926*a67afe4dSAndroid Build Coastguard Workerm4_if([$1], [CXX], [
4927*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4928*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4929*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
4930*a67afe4dSAndroid Build Coastguard Worker  aix[[4-9]]*)
4931*a67afe4dSAndroid Build Coastguard Worker    # If we're using GNU nm, then we don't want the "-C" option.
4932*a67afe4dSAndroid Build Coastguard Worker    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4933*a67afe4dSAndroid Build Coastguard Worker    # Without the "-l" option, or with the "-B" option, AIX nm treats
4934*a67afe4dSAndroid Build Coastguard Worker    # weak defined symbols like other global defined symbols, whereas
4935*a67afe4dSAndroid Build Coastguard Worker    # GNU nm marks them as "W".
4936*a67afe4dSAndroid Build Coastguard Worker    # While the 'weak' keyword is ignored in the Export File, we need
4937*a67afe4dSAndroid Build Coastguard Worker    # it in the Import File for the 'aix-soname' feature, so we have
4938*a67afe4dSAndroid Build Coastguard Worker    # to replace the "-B" option with "-P" for AIX nm.
4939*a67afe4dSAndroid Build Coastguard Worker    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4940*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4941*a67afe4dSAndroid Build Coastguard Worker    else
4942*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4943*a67afe4dSAndroid Build Coastguard Worker    fi
4944*a67afe4dSAndroid Build Coastguard Worker    ;;
4945*a67afe4dSAndroid Build Coastguard Worker  pw32*)
4946*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4947*a67afe4dSAndroid Build Coastguard Worker    ;;
4948*a67afe4dSAndroid Build Coastguard Worker  cygwin* | mingw* | cegcc*)
4949*a67afe4dSAndroid Build Coastguard Worker    case $cc_basename in
4950*a67afe4dSAndroid Build Coastguard Worker    cl* | icl*)
4951*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4952*a67afe4dSAndroid Build Coastguard Worker      ;;
4953*a67afe4dSAndroid Build Coastguard Worker    *)
4954*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4955*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4956*a67afe4dSAndroid Build Coastguard Worker      ;;
4957*a67afe4dSAndroid Build Coastguard Worker    esac
4958*a67afe4dSAndroid Build Coastguard Worker    ;;
4959*a67afe4dSAndroid Build Coastguard Worker  *)
4960*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4961*a67afe4dSAndroid Build Coastguard Worker    ;;
4962*a67afe4dSAndroid Build Coastguard Worker  esac
4963*a67afe4dSAndroid Build Coastguard Worker], [
4964*a67afe4dSAndroid Build Coastguard Worker  runpath_var=
4965*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(allow_undefined_flag, $1)=
4966*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(always_export_symbols, $1)=no
4967*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds, $1)=
4968*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(archive_expsym_cmds, $1)=
4969*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(compiler_needs_object, $1)=no
4970*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4971*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4972*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4973*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_automatic, $1)=no
4974*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct, $1)=no
4975*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4976*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4977*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4978*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_minus_L, $1)=no
4979*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4980*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(inherit_rpath, $1)=no
4981*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4982*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(module_cmds, $1)=
4983*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(module_expsym_cmds, $1)=
4984*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4985*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4986*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4987*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4988*a67afe4dSAndroid Build Coastguard Worker  # include_expsyms should be a list of space-separated symbols to be *always*
4989*a67afe4dSAndroid Build Coastguard Worker  # included in the symbol list
4990*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(include_expsyms, $1)=
4991*a67afe4dSAndroid Build Coastguard Worker  # exclude_expsyms can be an extended regexp of symbols to exclude
4992*a67afe4dSAndroid Build Coastguard Worker  # it will be wrapped by ' (' and ')$', so one must not match beginning or
4993*a67afe4dSAndroid Build Coastguard Worker  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4994*a67afe4dSAndroid Build Coastguard Worker  # as well as any symbol that contains 'd'.
4995*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4996*a67afe4dSAndroid Build Coastguard Worker  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4997*a67afe4dSAndroid Build Coastguard Worker  # platforms (ab)use it in PIC code, but their linkers get confused if
4998*a67afe4dSAndroid Build Coastguard Worker  # the symbol is explicitly referenced.  Since portable code cannot
4999*a67afe4dSAndroid Build Coastguard Worker  # rely on this symbol name, it's probably fine to never include it in
5000*a67afe4dSAndroid Build Coastguard Worker  # preloaded symbol tables.
5001*a67afe4dSAndroid Build Coastguard Worker  # Exclude shared library initialization/finalization symbols.
5002*a67afe4dSAndroid Build Coastguard Workerdnl Note also adjust exclude_expsyms for C++ above.
5003*a67afe4dSAndroid Build Coastguard Worker  extract_expsyms_cmds=
5004*a67afe4dSAndroid Build Coastguard Worker
5005*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
5006*a67afe4dSAndroid Build Coastguard Worker  cygwin* | mingw* | pw32* | cegcc*)
5007*a67afe4dSAndroid Build Coastguard Worker    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5008*a67afe4dSAndroid Build Coastguard Worker    # When not using gcc, we currently assume that we are using
5009*a67afe4dSAndroid Build Coastguard Worker    # Microsoft Visual C++ or Intel C++ Compiler.
5010*a67afe4dSAndroid Build Coastguard Worker    if test yes != "$GCC"; then
5011*a67afe4dSAndroid Build Coastguard Worker      with_gnu_ld=no
5012*a67afe4dSAndroid Build Coastguard Worker    fi
5013*a67afe4dSAndroid Build Coastguard Worker    ;;
5014*a67afe4dSAndroid Build Coastguard Worker  interix*)
5015*a67afe4dSAndroid Build Coastguard Worker    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5016*a67afe4dSAndroid Build Coastguard Worker    with_gnu_ld=yes
5017*a67afe4dSAndroid Build Coastguard Worker    ;;
5018*a67afe4dSAndroid Build Coastguard Worker  openbsd* | bitrig*)
5019*a67afe4dSAndroid Build Coastguard Worker    with_gnu_ld=no
5020*a67afe4dSAndroid Build Coastguard Worker    ;;
5021*a67afe4dSAndroid Build Coastguard Worker  esac
5022*a67afe4dSAndroid Build Coastguard Worker
5023*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(ld_shlibs, $1)=yes
5024*a67afe4dSAndroid Build Coastguard Worker
5025*a67afe4dSAndroid Build Coastguard Worker  # On some targets, GNU ld is compatible enough with the native linker
5026*a67afe4dSAndroid Build Coastguard Worker  # that we're better off using the native interface for both.
5027*a67afe4dSAndroid Build Coastguard Worker  lt_use_gnu_ld_interface=no
5028*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$with_gnu_ld"; then
5029*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
5030*a67afe4dSAndroid Build Coastguard Worker      aix*)
5031*a67afe4dSAndroid Build Coastguard Worker	# The AIX port of GNU ld has always aspired to compatibility
5032*a67afe4dSAndroid Build Coastguard Worker	# with the native linker.  However, as the warning in the GNU ld
5033*a67afe4dSAndroid Build Coastguard Worker	# block says, versions before 2.19.5* couldn't really create working
5034*a67afe4dSAndroid Build Coastguard Worker	# shared libraries, regardless of the interface used.
5035*a67afe4dSAndroid Build Coastguard Worker	case `$LD -v 2>&1` in
5036*a67afe4dSAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5037*a67afe4dSAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5038*a67afe4dSAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5039*a67afe4dSAndroid Build Coastguard Worker	  *)
5040*a67afe4dSAndroid Build Coastguard Worker	    lt_use_gnu_ld_interface=yes
5041*a67afe4dSAndroid Build Coastguard Worker	    ;;
5042*a67afe4dSAndroid Build Coastguard Worker	esac
5043*a67afe4dSAndroid Build Coastguard Worker	;;
5044*a67afe4dSAndroid Build Coastguard Worker      *)
5045*a67afe4dSAndroid Build Coastguard Worker	lt_use_gnu_ld_interface=yes
5046*a67afe4dSAndroid Build Coastguard Worker	;;
5047*a67afe4dSAndroid Build Coastguard Worker    esac
5048*a67afe4dSAndroid Build Coastguard Worker  fi
5049*a67afe4dSAndroid Build Coastguard Worker
5050*a67afe4dSAndroid Build Coastguard Worker  if test yes = "$lt_use_gnu_ld_interface"; then
5051*a67afe4dSAndroid Build Coastguard Worker    # If archive_cmds runs LD, not CC, wlarc should be empty
5052*a67afe4dSAndroid Build Coastguard Worker    wlarc='$wl'
5053*a67afe4dSAndroid Build Coastguard Worker
5054*a67afe4dSAndroid Build Coastguard Worker    # Set some defaults for GNU ld with shared library support. These
5055*a67afe4dSAndroid Build Coastguard Worker    # are reset later if shared libraries are not supported. Putting them
5056*a67afe4dSAndroid Build Coastguard Worker    # here allows them to be overridden if necessary.
5057*a67afe4dSAndroid Build Coastguard Worker    runpath_var=LD_RUN_PATH
5058*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5059*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5060*a67afe4dSAndroid Build Coastguard Worker    # ancient GNU ld didn't support --whole-archive et. al.
5061*a67afe4dSAndroid Build Coastguard Worker    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5062*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5063*a67afe4dSAndroid Build Coastguard Worker    else
5064*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5065*a67afe4dSAndroid Build Coastguard Worker    fi
5066*a67afe4dSAndroid Build Coastguard Worker    supports_anon_versioning=no
5067*a67afe4dSAndroid Build Coastguard Worker    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5068*a67afe4dSAndroid Build Coastguard Worker      *GNU\ gold*) supports_anon_versioning=yes ;;
5069*a67afe4dSAndroid Build Coastguard Worker      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5070*a67afe4dSAndroid Build Coastguard Worker      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5071*a67afe4dSAndroid Build Coastguard Worker      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5072*a67afe4dSAndroid Build Coastguard Worker      *\ 2.11.*) ;; # other 2.11 versions
5073*a67afe4dSAndroid Build Coastguard Worker      *) supports_anon_versioning=yes ;;
5074*a67afe4dSAndroid Build Coastguard Worker    esac
5075*a67afe4dSAndroid Build Coastguard Worker
5076*a67afe4dSAndroid Build Coastguard Worker    # See if GNU ld supports shared libraries.
5077*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
5078*a67afe4dSAndroid Build Coastguard Worker    aix[[3-9]]*)
5079*a67afe4dSAndroid Build Coastguard Worker      # On AIX/PPC, the GNU linker is very broken
5080*a67afe4dSAndroid Build Coastguard Worker      if test ia64 != "$host_cpu"; then
5081*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5082*a67afe4dSAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
5083*a67afe4dSAndroid Build Coastguard Worker
5084*a67afe4dSAndroid Build Coastguard Worker*** Warning: the GNU linker, at least up to release 2.19, is reported
5085*a67afe4dSAndroid Build Coastguard Worker*** to be unable to reliably create shared libraries on AIX.
5086*a67afe4dSAndroid Build Coastguard Worker*** Therefore, libtool is disabling shared libraries support.  If you
5087*a67afe4dSAndroid Build Coastguard Worker*** really care for shared libraries, you may want to install binutils
5088*a67afe4dSAndroid Build Coastguard Worker*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5089*a67afe4dSAndroid Build Coastguard Worker*** You will then need to restart the configuration process.
5090*a67afe4dSAndroid Build Coastguard Worker
5091*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
5092*a67afe4dSAndroid Build Coastguard Worker      fi
5093*a67afe4dSAndroid Build Coastguard Worker      ;;
5094*a67afe4dSAndroid Build Coastguard Worker
5095*a67afe4dSAndroid Build Coastguard Worker    amigaos*)
5096*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
5097*a67afe4dSAndroid Build Coastguard Worker      powerpc)
5098*a67afe4dSAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
5099*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5100*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5101*a67afe4dSAndroid Build Coastguard Worker        ;;
5102*a67afe4dSAndroid Build Coastguard Worker      m68k)
5103*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5104*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5105*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5106*a67afe4dSAndroid Build Coastguard Worker        ;;
5107*a67afe4dSAndroid Build Coastguard Worker      esac
5108*a67afe4dSAndroid Build Coastguard Worker      ;;
5109*a67afe4dSAndroid Build Coastguard Worker
5110*a67afe4dSAndroid Build Coastguard Worker    beos*)
5111*a67afe4dSAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5112*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5113*a67afe4dSAndroid Build Coastguard Worker	# Joseph Beckenbach <[email protected]> says some releases of gcc
5114*a67afe4dSAndroid Build Coastguard Worker	# support --undefined.  This deserves some investigation.  FIXME
5115*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5116*a67afe4dSAndroid Build Coastguard Worker      else
5117*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5118*a67afe4dSAndroid Build Coastguard Worker      fi
5119*a67afe4dSAndroid Build Coastguard Worker      ;;
5120*a67afe4dSAndroid Build Coastguard Worker
5121*a67afe4dSAndroid Build Coastguard Worker    cygwin* | mingw* | pw32* | cegcc*)
5122*a67afe4dSAndroid Build Coastguard Worker      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5123*a67afe4dSAndroid Build Coastguard Worker      # as there is no search path for DLLs.
5124*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5125*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5126*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5127*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=no
5128*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5129*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5130*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5131*a67afe4dSAndroid Build Coastguard Worker
5132*a67afe4dSAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5133*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5134*a67afe4dSAndroid Build Coastguard Worker	# If the export-symbols file already is a .def file, use it as
5135*a67afe4dSAndroid Build Coastguard Worker	# is; otherwise, prepend EXPORTS...
5136*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5137*a67afe4dSAndroid Build Coastguard Worker          cp $export_symbols $output_objdir/$soname.def;
5138*a67afe4dSAndroid Build Coastguard Worker        else
5139*a67afe4dSAndroid Build Coastguard Worker          echo EXPORTS > $output_objdir/$soname.def;
5140*a67afe4dSAndroid Build Coastguard Worker          cat $export_symbols >> $output_objdir/$soname.def;
5141*a67afe4dSAndroid Build Coastguard Worker        fi~
5142*a67afe4dSAndroid Build Coastguard Worker        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5143*a67afe4dSAndroid Build Coastguard Worker      else
5144*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5145*a67afe4dSAndroid Build Coastguard Worker      fi
5146*a67afe4dSAndroid Build Coastguard Worker      ;;
5147*a67afe4dSAndroid Build Coastguard Worker
5148*a67afe4dSAndroid Build Coastguard Worker    haiku*)
5149*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5150*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5151*a67afe4dSAndroid Build Coastguard Worker      ;;
5152*a67afe4dSAndroid Build Coastguard Worker
5153*a67afe4dSAndroid Build Coastguard Worker    os2*)
5154*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5155*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5156*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5157*a67afe4dSAndroid Build Coastguard Worker      shrext_cmds=.dll
5158*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5159*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5160*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5161*a67afe4dSAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5162*a67afe4dSAndroid Build Coastguard Worker	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5163*a67afe4dSAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5164*a67afe4dSAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5165*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5166*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5167*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5168*a67afe4dSAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5169*a67afe4dSAndroid Build Coastguard Worker	prefix_cmds="$SED"~
5170*a67afe4dSAndroid Build Coastguard Worker	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5171*a67afe4dSAndroid Build Coastguard Worker	  prefix_cmds="$prefix_cmds -e 1d";
5172*a67afe4dSAndroid Build Coastguard Worker	fi~
5173*a67afe4dSAndroid Build Coastguard Worker	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5174*a67afe4dSAndroid Build Coastguard Worker	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5175*a67afe4dSAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5176*a67afe4dSAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5177*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5178*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5179*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='@'
5180*a67afe4dSAndroid Build Coastguard Worker      ;;
5181*a67afe4dSAndroid Build Coastguard Worker
5182*a67afe4dSAndroid Build Coastguard Worker    interix[[3-9]]*)
5183*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=no
5184*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5185*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5186*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5187*a67afe4dSAndroid Build Coastguard Worker      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5188*a67afe4dSAndroid Build Coastguard Worker      # Instead, shared libraries are loaded at an image base (0x10000000 by
5189*a67afe4dSAndroid Build Coastguard Worker      # default) and relocated if they conflict, which is a slow very memory
5190*a67afe4dSAndroid Build Coastguard Worker      # consuming and fragmenting process.  To avoid this, we pick a random,
5191*a67afe4dSAndroid Build Coastguard Worker      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5192*a67afe4dSAndroid Build Coastguard Worker      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5193*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5194*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5195*a67afe4dSAndroid Build Coastguard Worker      ;;
5196*a67afe4dSAndroid Build Coastguard Worker
5197*a67afe4dSAndroid Build Coastguard Worker    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5198*a67afe4dSAndroid Build Coastguard Worker      tmp_diet=no
5199*a67afe4dSAndroid Build Coastguard Worker      if test linux-dietlibc = "$host_os"; then
5200*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
5201*a67afe4dSAndroid Build Coastguard Worker	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5202*a67afe4dSAndroid Build Coastguard Worker	esac
5203*a67afe4dSAndroid Build Coastguard Worker      fi
5204*a67afe4dSAndroid Build Coastguard Worker      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5205*a67afe4dSAndroid Build Coastguard Worker	 && test no = "$tmp_diet"
5206*a67afe4dSAndroid Build Coastguard Worker      then
5207*a67afe4dSAndroid Build Coastguard Worker	tmp_addflag=' $pic_flag'
5208*a67afe4dSAndroid Build Coastguard Worker	tmp_sharedflag='-shared'
5209*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename,$host_cpu in
5210*a67afe4dSAndroid Build Coastguard Worker        pgcc*)				# Portland Group C compiler
5211*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5212*a67afe4dSAndroid Build Coastguard Worker	  tmp_addflag=' $pic_flag'
5213*a67afe4dSAndroid Build Coastguard Worker	  ;;
5214*a67afe4dSAndroid Build Coastguard Worker	pgf77* | pgf90* | pgf95* | pgfortran*)
5215*a67afe4dSAndroid Build Coastguard Worker					# Portland Group f77 and f90 compilers
5216*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5217*a67afe4dSAndroid Build Coastguard Worker	  tmp_addflag=' $pic_flag -Mnomain' ;;
5218*a67afe4dSAndroid Build Coastguard Worker	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5219*a67afe4dSAndroid Build Coastguard Worker	  tmp_addflag=' -i_dynamic' ;;
5220*a67afe4dSAndroid Build Coastguard Worker	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5221*a67afe4dSAndroid Build Coastguard Worker	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5222*a67afe4dSAndroid Build Coastguard Worker	ifc* | ifort*)			# Intel Fortran compiler
5223*a67afe4dSAndroid Build Coastguard Worker	  tmp_addflag=' -nofor_main' ;;
5224*a67afe4dSAndroid Build Coastguard Worker	lf95*)				# Lahey Fortran 8.1
5225*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5226*a67afe4dSAndroid Build Coastguard Worker	  tmp_sharedflag='--shared' ;;
5227*a67afe4dSAndroid Build Coastguard Worker        nagfor*)                        # NAGFOR 5.3
5228*a67afe4dSAndroid Build Coastguard Worker          tmp_sharedflag='-Wl,-shared' ;;
5229*a67afe4dSAndroid Build Coastguard Worker	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5230*a67afe4dSAndroid Build Coastguard Worker	  tmp_sharedflag='-qmkshrobj'
5231*a67afe4dSAndroid Build Coastguard Worker	  tmp_addflag= ;;
5232*a67afe4dSAndroid Build Coastguard Worker	nvcc*)	# Cuda Compiler Driver 2.2
5233*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5234*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5235*a67afe4dSAndroid Build Coastguard Worker	  ;;
5236*a67afe4dSAndroid Build Coastguard Worker	esac
5237*a67afe4dSAndroid Build Coastguard Worker	case `$CC -V 2>&1 | $SED 5q` in
5238*a67afe4dSAndroid Build Coastguard Worker	*Sun\ C*)			# Sun C 5.9
5239*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5240*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5241*a67afe4dSAndroid Build Coastguard Worker	  tmp_sharedflag='-G' ;;
5242*a67afe4dSAndroid Build Coastguard Worker	*Sun\ F*)			# Sun Fortran 8.3
5243*a67afe4dSAndroid Build Coastguard Worker	  tmp_sharedflag='-G' ;;
5244*a67afe4dSAndroid Build Coastguard Worker	esac
5245*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5246*a67afe4dSAndroid Build Coastguard Worker
5247*a67afe4dSAndroid Build Coastguard Worker        if test yes = "$supports_anon_versioning"; then
5248*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5249*a67afe4dSAndroid Build Coastguard Worker            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5250*a67afe4dSAndroid Build Coastguard Worker            echo "local: *; };" >> $output_objdir/$libname.ver~
5251*a67afe4dSAndroid Build Coastguard Worker            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5252*a67afe4dSAndroid Build Coastguard Worker        fi
5253*a67afe4dSAndroid Build Coastguard Worker
5254*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
5255*a67afe4dSAndroid Build Coastguard Worker	tcc*)
5256*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5257*a67afe4dSAndroid Build Coastguard Worker	  ;;
5258*a67afe4dSAndroid Build Coastguard Worker	xlf* | bgf* | bgxlf* | mpixlf*)
5259*a67afe4dSAndroid Build Coastguard Worker	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5260*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5261*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5262*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5263*a67afe4dSAndroid Build Coastguard Worker	  if test yes = "$supports_anon_versioning"; then
5264*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5265*a67afe4dSAndroid Build Coastguard Worker              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5266*a67afe4dSAndroid Build Coastguard Worker              echo "local: *; };" >> $output_objdir/$libname.ver~
5267*a67afe4dSAndroid Build Coastguard Worker              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5268*a67afe4dSAndroid Build Coastguard Worker	  fi
5269*a67afe4dSAndroid Build Coastguard Worker	  ;;
5270*a67afe4dSAndroid Build Coastguard Worker	esac
5271*a67afe4dSAndroid Build Coastguard Worker      else
5272*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
5273*a67afe4dSAndroid Build Coastguard Worker      fi
5274*a67afe4dSAndroid Build Coastguard Worker      ;;
5275*a67afe4dSAndroid Build Coastguard Worker
5276*a67afe4dSAndroid Build Coastguard Worker    netbsd*)
5277*a67afe4dSAndroid Build Coastguard Worker      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5278*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5279*a67afe4dSAndroid Build Coastguard Worker	wlarc=
5280*a67afe4dSAndroid Build Coastguard Worker      else
5281*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5282*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5283*a67afe4dSAndroid Build Coastguard Worker      fi
5284*a67afe4dSAndroid Build Coastguard Worker      ;;
5285*a67afe4dSAndroid Build Coastguard Worker
5286*a67afe4dSAndroid Build Coastguard Worker    solaris*)
5287*a67afe4dSAndroid Build Coastguard Worker      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5288*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5289*a67afe4dSAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
5290*a67afe4dSAndroid Build Coastguard Worker
5291*a67afe4dSAndroid Build Coastguard Worker*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5292*a67afe4dSAndroid Build Coastguard Worker*** create shared libraries on Solaris systems.  Therefore, libtool
5293*a67afe4dSAndroid Build Coastguard Worker*** is disabling shared libraries support.  We urge you to upgrade GNU
5294*a67afe4dSAndroid Build Coastguard Worker*** binutils to release 2.9.1 or newer.  Another option is to modify
5295*a67afe4dSAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is
5296*a67afe4dSAndroid Build Coastguard Worker*** used, and then restart.
5297*a67afe4dSAndroid Build Coastguard Worker
5298*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
5299*a67afe4dSAndroid Build Coastguard Worker      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5300*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5301*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5302*a67afe4dSAndroid Build Coastguard Worker      else
5303*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5304*a67afe4dSAndroid Build Coastguard Worker      fi
5305*a67afe4dSAndroid Build Coastguard Worker      ;;
5306*a67afe4dSAndroid Build Coastguard Worker
5307*a67afe4dSAndroid Build Coastguard Worker    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5308*a67afe4dSAndroid Build Coastguard Worker      case `$LD -v 2>&1` in
5309*a67afe4dSAndroid Build Coastguard Worker        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5310*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5311*a67afe4dSAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
5312*a67afe4dSAndroid Build Coastguard Worker
5313*a67afe4dSAndroid Build Coastguard Worker*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5314*a67afe4dSAndroid Build Coastguard Worker*** reliably create shared libraries on SCO systems.  Therefore, libtool
5315*a67afe4dSAndroid Build Coastguard Worker*** is disabling shared libraries support.  We urge you to upgrade GNU
5316*a67afe4dSAndroid Build Coastguard Worker*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5317*a67afe4dSAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is
5318*a67afe4dSAndroid Build Coastguard Worker*** used, and then restart.
5319*a67afe4dSAndroid Build Coastguard Worker
5320*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
5321*a67afe4dSAndroid Build Coastguard Worker	;;
5322*a67afe4dSAndroid Build Coastguard Worker	*)
5323*a67afe4dSAndroid Build Coastguard Worker	  # For security reasons, it is highly recommended that you always
5324*a67afe4dSAndroid Build Coastguard Worker	  # use absolute paths for naming shared libraries, and exclude the
5325*a67afe4dSAndroid Build Coastguard Worker	  # DT_RUNPATH tag from executables and libraries.  But doing so
5326*a67afe4dSAndroid Build Coastguard Worker	  # requires that you compile everything twice, which is a pain.
5327*a67afe4dSAndroid Build Coastguard Worker	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5328*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5329*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5330*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5331*a67afe4dSAndroid Build Coastguard Worker	  else
5332*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
5333*a67afe4dSAndroid Build Coastguard Worker	  fi
5334*a67afe4dSAndroid Build Coastguard Worker	;;
5335*a67afe4dSAndroid Build Coastguard Worker      esac
5336*a67afe4dSAndroid Build Coastguard Worker      ;;
5337*a67afe4dSAndroid Build Coastguard Worker
5338*a67afe4dSAndroid Build Coastguard Worker    sunos4*)
5339*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5340*a67afe4dSAndroid Build Coastguard Worker      wlarc=
5341*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5342*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5343*a67afe4dSAndroid Build Coastguard Worker      ;;
5344*a67afe4dSAndroid Build Coastguard Worker
5345*a67afe4dSAndroid Build Coastguard Worker    *)
5346*a67afe4dSAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5347*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5348*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5349*a67afe4dSAndroid Build Coastguard Worker      else
5350*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5351*a67afe4dSAndroid Build Coastguard Worker      fi
5352*a67afe4dSAndroid Build Coastguard Worker      ;;
5353*a67afe4dSAndroid Build Coastguard Worker    esac
5354*a67afe4dSAndroid Build Coastguard Worker
5355*a67afe4dSAndroid Build Coastguard Worker    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5356*a67afe4dSAndroid Build Coastguard Worker      runpath_var=
5357*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5358*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5359*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5360*a67afe4dSAndroid Build Coastguard Worker    fi
5361*a67afe4dSAndroid Build Coastguard Worker  else
5362*a67afe4dSAndroid Build Coastguard Worker    # PORTME fill in a description of your system's linker (not GNU ld)
5363*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
5364*a67afe4dSAndroid Build Coastguard Worker    aix3*)
5365*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5366*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=yes
5367*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5368*a67afe4dSAndroid Build Coastguard Worker      # Note: this linker hardcodes the directories in LIBPATH if there
5369*a67afe4dSAndroid Build Coastguard Worker      # are no directories specified by -L.
5370*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5371*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5372*a67afe4dSAndroid Build Coastguard Worker	# Neither direct hardcoding nor static linking is supported with a
5373*a67afe4dSAndroid Build Coastguard Worker	# broken collect2.
5374*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5375*a67afe4dSAndroid Build Coastguard Worker      fi
5376*a67afe4dSAndroid Build Coastguard Worker      ;;
5377*a67afe4dSAndroid Build Coastguard Worker
5378*a67afe4dSAndroid Build Coastguard Worker    aix[[4-9]]*)
5379*a67afe4dSAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
5380*a67afe4dSAndroid Build Coastguard Worker	# On IA64, the linker does run time linking by default, so we don't
5381*a67afe4dSAndroid Build Coastguard Worker	# have to do anything special.
5382*a67afe4dSAndroid Build Coastguard Worker	aix_use_runtimelinking=no
5383*a67afe4dSAndroid Build Coastguard Worker	exp_sym_flag='-Bexport'
5384*a67afe4dSAndroid Build Coastguard Worker	no_entry_flag=
5385*a67afe4dSAndroid Build Coastguard Worker      else
5386*a67afe4dSAndroid Build Coastguard Worker	# If we're using GNU nm, then we don't want the "-C" option.
5387*a67afe4dSAndroid Build Coastguard Worker	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5388*a67afe4dSAndroid Build Coastguard Worker	# Without the "-l" option, or with the "-B" option, AIX nm treats
5389*a67afe4dSAndroid Build Coastguard Worker	# weak defined symbols like other global defined symbols, whereas
5390*a67afe4dSAndroid Build Coastguard Worker	# GNU nm marks them as "W".
5391*a67afe4dSAndroid Build Coastguard Worker	# While the 'weak' keyword is ignored in the Export File, we need
5392*a67afe4dSAndroid Build Coastguard Worker	# it in the Import File for the 'aix-soname' feature, so we have
5393*a67afe4dSAndroid Build Coastguard Worker	# to replace the "-B" option with "-P" for AIX nm.
5394*a67afe4dSAndroid Build Coastguard Worker	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5395*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5396*a67afe4dSAndroid Build Coastguard Worker	else
5397*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5398*a67afe4dSAndroid Build Coastguard Worker	fi
5399*a67afe4dSAndroid Build Coastguard Worker	aix_use_runtimelinking=no
5400*a67afe4dSAndroid Build Coastguard Worker
5401*a67afe4dSAndroid Build Coastguard Worker	# Test if we are trying to use run time linking or normal
5402*a67afe4dSAndroid Build Coastguard Worker	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5403*a67afe4dSAndroid Build Coastguard Worker	# have runtime linking enabled, and use it for executables.
5404*a67afe4dSAndroid Build Coastguard Worker	# For shared libraries, we enable/disable runtime linking
5405*a67afe4dSAndroid Build Coastguard Worker	# depending on the kind of the shared library created -
5406*a67afe4dSAndroid Build Coastguard Worker	# when "with_aix_soname,aix_use_runtimelinking" is:
5407*a67afe4dSAndroid Build Coastguard Worker	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5408*a67afe4dSAndroid Build Coastguard Worker	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5409*a67afe4dSAndroid Build Coastguard Worker	#            lib.a           static archive
5410*a67afe4dSAndroid Build Coastguard Worker	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5411*a67afe4dSAndroid Build Coastguard Worker	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5412*a67afe4dSAndroid Build Coastguard Worker	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5413*a67afe4dSAndroid Build Coastguard Worker	#            lib.a(lib.so.V) shared, rtl:no
5414*a67afe4dSAndroid Build Coastguard Worker	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5415*a67afe4dSAndroid Build Coastguard Worker	#            lib.a           static archive
5416*a67afe4dSAndroid Build Coastguard Worker	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5417*a67afe4dSAndroid Build Coastguard Worker	  for ld_flag in $LDFLAGS; do
5418*a67afe4dSAndroid Build Coastguard Worker	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5419*a67afe4dSAndroid Build Coastguard Worker	    aix_use_runtimelinking=yes
5420*a67afe4dSAndroid Build Coastguard Worker	    break
5421*a67afe4dSAndroid Build Coastguard Worker	  fi
5422*a67afe4dSAndroid Build Coastguard Worker	  done
5423*a67afe4dSAndroid Build Coastguard Worker	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5424*a67afe4dSAndroid Build Coastguard Worker	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5425*a67afe4dSAndroid Build Coastguard Worker	    # so we don't have lib.a shared libs to link our executables.
5426*a67afe4dSAndroid Build Coastguard Worker	    # We have to force runtime linking in this case.
5427*a67afe4dSAndroid Build Coastguard Worker	    aix_use_runtimelinking=yes
5428*a67afe4dSAndroid Build Coastguard Worker	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5429*a67afe4dSAndroid Build Coastguard Worker	  fi
5430*a67afe4dSAndroid Build Coastguard Worker	  ;;
5431*a67afe4dSAndroid Build Coastguard Worker	esac
5432*a67afe4dSAndroid Build Coastguard Worker
5433*a67afe4dSAndroid Build Coastguard Worker	exp_sym_flag='-bexport'
5434*a67afe4dSAndroid Build Coastguard Worker	no_entry_flag='-bnoentry'
5435*a67afe4dSAndroid Build Coastguard Worker      fi
5436*a67afe4dSAndroid Build Coastguard Worker
5437*a67afe4dSAndroid Build Coastguard Worker      # When large executables or shared objects are built, AIX ld can
5438*a67afe4dSAndroid Build Coastguard Worker      # have problems creating the table of contents.  If linking a library
5439*a67afe4dSAndroid Build Coastguard Worker      # or program results in "error TOC overflow" add -mminimal-toc to
5440*a67afe4dSAndroid Build Coastguard Worker      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5441*a67afe4dSAndroid Build Coastguard Worker      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5442*a67afe4dSAndroid Build Coastguard Worker
5443*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)=''
5444*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5445*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5446*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5447*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5448*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5449*a67afe4dSAndroid Build Coastguard Worker      case $with_aix_soname,$aix_use_runtimelinking in
5450*a67afe4dSAndroid Build Coastguard Worker      aix,*) ;; # traditional, no import file
5451*a67afe4dSAndroid Build Coastguard Worker      svr4,* | *,yes) # use import file
5452*a67afe4dSAndroid Build Coastguard Worker	# The Import File defines what to hardcode.
5453*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=no
5454*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5455*a67afe4dSAndroid Build Coastguard Worker	;;
5456*a67afe4dSAndroid Build Coastguard Worker      esac
5457*a67afe4dSAndroid Build Coastguard Worker
5458*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5459*a67afe4dSAndroid Build Coastguard Worker	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5460*a67afe4dSAndroid Build Coastguard Worker	# We only want to do this on AIX 4.2 and lower, the check
5461*a67afe4dSAndroid Build Coastguard Worker	# below for broken collect2 doesn't work under 4.3+
5462*a67afe4dSAndroid Build Coastguard Worker	  collect2name=`$CC -print-prog-name=collect2`
5463*a67afe4dSAndroid Build Coastguard Worker	  if test -f "$collect2name" &&
5464*a67afe4dSAndroid Build Coastguard Worker	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5465*a67afe4dSAndroid Build Coastguard Worker	  then
5466*a67afe4dSAndroid Build Coastguard Worker	  # We have reworked collect2
5467*a67afe4dSAndroid Build Coastguard Worker	  :
5468*a67afe4dSAndroid Build Coastguard Worker	  else
5469*a67afe4dSAndroid Build Coastguard Worker	  # We have old collect2
5470*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5471*a67afe4dSAndroid Build Coastguard Worker	  # It fails to find uninstalled libraries when the uninstalled
5472*a67afe4dSAndroid Build Coastguard Worker	  # path is not listed in the libpath.  Setting hardcode_minus_L
5473*a67afe4dSAndroid Build Coastguard Worker	  # to unsupported forces relinking
5474*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5475*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5476*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5477*a67afe4dSAndroid Build Coastguard Worker	  fi
5478*a67afe4dSAndroid Build Coastguard Worker	  ;;
5479*a67afe4dSAndroid Build Coastguard Worker	esac
5480*a67afe4dSAndroid Build Coastguard Worker	shared_flag='-shared'
5481*a67afe4dSAndroid Build Coastguard Worker	if test yes = "$aix_use_runtimelinking"; then
5482*a67afe4dSAndroid Build Coastguard Worker	  shared_flag="$shared_flag "'$wl-G'
5483*a67afe4dSAndroid Build Coastguard Worker	fi
5484*a67afe4dSAndroid Build Coastguard Worker	# Need to ensure runtime linking is disabled for the traditional
5485*a67afe4dSAndroid Build Coastguard Worker	# shared library, or the linker may eventually find shared libraries
5486*a67afe4dSAndroid Build Coastguard Worker	# /with/ Import File - we do not want to mix them.
5487*a67afe4dSAndroid Build Coastguard Worker	shared_flag_aix='-shared'
5488*a67afe4dSAndroid Build Coastguard Worker	shared_flag_svr4='-shared $wl-G'
5489*a67afe4dSAndroid Build Coastguard Worker      else
5490*a67afe4dSAndroid Build Coastguard Worker	# not using gcc
5491*a67afe4dSAndroid Build Coastguard Worker	if test ia64 = "$host_cpu"; then
5492*a67afe4dSAndroid Build Coastguard Worker	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5493*a67afe4dSAndroid Build Coastguard Worker	# chokes on -Wl,-G. The following line is correct:
5494*a67afe4dSAndroid Build Coastguard Worker	  shared_flag='-G'
5495*a67afe4dSAndroid Build Coastguard Worker	else
5496*a67afe4dSAndroid Build Coastguard Worker	  if test yes = "$aix_use_runtimelinking"; then
5497*a67afe4dSAndroid Build Coastguard Worker	    shared_flag='$wl-G'
5498*a67afe4dSAndroid Build Coastguard Worker	  else
5499*a67afe4dSAndroid Build Coastguard Worker	    shared_flag='$wl-bM:SRE'
5500*a67afe4dSAndroid Build Coastguard Worker	  fi
5501*a67afe4dSAndroid Build Coastguard Worker	  shared_flag_aix='$wl-bM:SRE'
5502*a67afe4dSAndroid Build Coastguard Worker	  shared_flag_svr4='$wl-G'
5503*a67afe4dSAndroid Build Coastguard Worker	fi
5504*a67afe4dSAndroid Build Coastguard Worker      fi
5505*a67afe4dSAndroid Build Coastguard Worker
5506*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5507*a67afe4dSAndroid Build Coastguard Worker      # It seems that -bexpall does not export symbols beginning with
5508*a67afe4dSAndroid Build Coastguard Worker      # underscore (_), so it is better to generate a list of symbols to export.
5509*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=yes
5510*a67afe4dSAndroid Build Coastguard Worker      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5511*a67afe4dSAndroid Build Coastguard Worker	# Warning - without using the other runtime loading flags (-brtl),
5512*a67afe4dSAndroid Build Coastguard Worker	# -berok will link without error, but may produce a broken library.
5513*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5514*a67afe4dSAndroid Build Coastguard Worker        # Determine the default libpath from the value encoded in an
5515*a67afe4dSAndroid Build Coastguard Worker        # empty executable.
5516*a67afe4dSAndroid Build Coastguard Worker        _LT_SYS_MODULE_PATH_AIX([$1])
5517*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5518*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5519*a67afe4dSAndroid Build Coastguard Worker      else
5520*a67afe4dSAndroid Build Coastguard Worker	if test ia64 = "$host_cpu"; then
5521*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5522*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5523*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
5524*a67afe4dSAndroid Build Coastguard Worker	else
5525*a67afe4dSAndroid Build Coastguard Worker	 # Determine the default libpath from the value encoded in an
5526*a67afe4dSAndroid Build Coastguard Worker	 # empty executable.
5527*a67afe4dSAndroid Build Coastguard Worker	 _LT_SYS_MODULE_PATH_AIX([$1])
5528*a67afe4dSAndroid Build Coastguard Worker	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5529*a67afe4dSAndroid Build Coastguard Worker	  # Warning - without using the other run time loading flags,
5530*a67afe4dSAndroid Build Coastguard Worker	  # -berok will link without error, but may produce a broken library.
5531*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5532*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5533*a67afe4dSAndroid Build Coastguard Worker	  if test yes = "$with_gnu_ld"; then
5534*a67afe4dSAndroid Build Coastguard Worker	    # We only use this code for GNU lds that support --whole-archive.
5535*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5536*a67afe4dSAndroid Build Coastguard Worker	  else
5537*a67afe4dSAndroid Build Coastguard Worker	    # Exported symbols can be pulled into shared objects from archives
5538*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5539*a67afe4dSAndroid Build Coastguard Worker	  fi
5540*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5541*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5542*a67afe4dSAndroid Build Coastguard Worker	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5543*a67afe4dSAndroid Build Coastguard Worker	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5544*a67afe4dSAndroid Build Coastguard Worker	  if test svr4 != "$with_aix_soname"; then
5545*a67afe4dSAndroid Build Coastguard Worker	    # This is similar to how AIX traditionally builds its shared libraries.
5546*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5547*a67afe4dSAndroid Build Coastguard Worker	  fi
5548*a67afe4dSAndroid Build Coastguard Worker	  if test aix != "$with_aix_soname"; then
5549*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5550*a67afe4dSAndroid Build Coastguard Worker	  else
5551*a67afe4dSAndroid Build Coastguard Worker	    # used by -dlpreopen to get the symbols
5552*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5553*a67afe4dSAndroid Build Coastguard Worker	  fi
5554*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5555*a67afe4dSAndroid Build Coastguard Worker	fi
5556*a67afe4dSAndroid Build Coastguard Worker      fi
5557*a67afe4dSAndroid Build Coastguard Worker      ;;
5558*a67afe4dSAndroid Build Coastguard Worker
5559*a67afe4dSAndroid Build Coastguard Worker    amigaos*)
5560*a67afe4dSAndroid Build Coastguard Worker      case $host_cpu in
5561*a67afe4dSAndroid Build Coastguard Worker      powerpc)
5562*a67afe4dSAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
5563*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5564*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5565*a67afe4dSAndroid Build Coastguard Worker        ;;
5566*a67afe4dSAndroid Build Coastguard Worker      m68k)
5567*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5568*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5569*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5570*a67afe4dSAndroid Build Coastguard Worker        ;;
5571*a67afe4dSAndroid Build Coastguard Worker      esac
5572*a67afe4dSAndroid Build Coastguard Worker      ;;
5573*a67afe4dSAndroid Build Coastguard Worker
5574*a67afe4dSAndroid Build Coastguard Worker    bsdi[[45]]*)
5575*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5576*a67afe4dSAndroid Build Coastguard Worker      ;;
5577*a67afe4dSAndroid Build Coastguard Worker
5578*a67afe4dSAndroid Build Coastguard Worker    cygwin* | mingw* | pw32* | cegcc*)
5579*a67afe4dSAndroid Build Coastguard Worker      # When not using gcc, we currently assume that we are using
5580*a67afe4dSAndroid Build Coastguard Worker      # Microsoft Visual C++ or Intel C++ Compiler.
5581*a67afe4dSAndroid Build Coastguard Worker      # hardcode_libdir_flag_spec is actually meaningless, as there is
5582*a67afe4dSAndroid Build Coastguard Worker      # no search path for DLLs.
5583*a67afe4dSAndroid Build Coastguard Worker      case $cc_basename in
5584*a67afe4dSAndroid Build Coastguard Worker      cl* | icl*)
5585*a67afe4dSAndroid Build Coastguard Worker	# Native MSVC or ICC
5586*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5587*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5588*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(always_export_symbols, $1)=yes
5589*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(file_list_spec, $1)='@'
5590*a67afe4dSAndroid Build Coastguard Worker	# Tell ltmain to make .lib files, not .a files.
5591*a67afe4dSAndroid Build Coastguard Worker	libext=lib
5592*a67afe4dSAndroid Build Coastguard Worker	# Tell ltmain to make .dll files, not .so files.
5593*a67afe4dSAndroid Build Coastguard Worker	shrext_cmds=.dll
5594*a67afe4dSAndroid Build Coastguard Worker	# FIXME: Setting linknames here is a bad hack.
5595*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5596*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5597*a67afe4dSAndroid Build Coastguard Worker            cp "$export_symbols" "$output_objdir/$soname.def";
5598*a67afe4dSAndroid Build Coastguard Worker            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5599*a67afe4dSAndroid Build Coastguard Worker          else
5600*a67afe4dSAndroid Build Coastguard Worker            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5601*a67afe4dSAndroid Build Coastguard Worker          fi~
5602*a67afe4dSAndroid Build Coastguard Worker          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5603*a67afe4dSAndroid Build Coastguard Worker          linknames='
5604*a67afe4dSAndroid Build Coastguard Worker	# The linker will not automatically build a static lib if we build a DLL.
5605*a67afe4dSAndroid Build Coastguard Worker	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5606*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5607*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5608*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5609*a67afe4dSAndroid Build Coastguard Worker	# Don't use ranlib
5610*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5611*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5612*a67afe4dSAndroid Build Coastguard Worker          lt_tool_outputfile="@TOOL_OUTPUT@"~
5613*a67afe4dSAndroid Build Coastguard Worker          case $lt_outputfile in
5614*a67afe4dSAndroid Build Coastguard Worker            *.exe|*.EXE) ;;
5615*a67afe4dSAndroid Build Coastguard Worker            *)
5616*a67afe4dSAndroid Build Coastguard Worker              lt_outputfile=$lt_outputfile.exe
5617*a67afe4dSAndroid Build Coastguard Worker              lt_tool_outputfile=$lt_tool_outputfile.exe
5618*a67afe4dSAndroid Build Coastguard Worker              ;;
5619*a67afe4dSAndroid Build Coastguard Worker          esac~
5620*a67afe4dSAndroid Build Coastguard Worker          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5621*a67afe4dSAndroid Build Coastguard Worker            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5622*a67afe4dSAndroid Build Coastguard Worker            $RM "$lt_outputfile.manifest";
5623*a67afe4dSAndroid Build Coastguard Worker          fi'
5624*a67afe4dSAndroid Build Coastguard Worker	;;
5625*a67afe4dSAndroid Build Coastguard Worker      *)
5626*a67afe4dSAndroid Build Coastguard Worker	# Assume MSVC and ICC wrapper
5627*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5628*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5629*a67afe4dSAndroid Build Coastguard Worker	# Tell ltmain to make .lib files, not .a files.
5630*a67afe4dSAndroid Build Coastguard Worker	libext=lib
5631*a67afe4dSAndroid Build Coastguard Worker	# Tell ltmain to make .dll files, not .so files.
5632*a67afe4dSAndroid Build Coastguard Worker	shrext_cmds=.dll
5633*a67afe4dSAndroid Build Coastguard Worker	# FIXME: Setting linknames here is a bad hack.
5634*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5635*a67afe4dSAndroid Build Coastguard Worker	# The linker will automatically build a .lib file if we build a DLL.
5636*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5637*a67afe4dSAndroid Build Coastguard Worker	# FIXME: Should let the user specify the lib program.
5638*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5639*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5640*a67afe4dSAndroid Build Coastguard Worker	;;
5641*a67afe4dSAndroid Build Coastguard Worker      esac
5642*a67afe4dSAndroid Build Coastguard Worker      ;;
5643*a67afe4dSAndroid Build Coastguard Worker
5644*a67afe4dSAndroid Build Coastguard Worker    darwin* | rhapsody*)
5645*a67afe4dSAndroid Build Coastguard Worker      _LT_DARWIN_LINKER_FEATURES($1)
5646*a67afe4dSAndroid Build Coastguard Worker      ;;
5647*a67afe4dSAndroid Build Coastguard Worker
5648*a67afe4dSAndroid Build Coastguard Worker    dgux*)
5649*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5650*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5651*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5652*a67afe4dSAndroid Build Coastguard Worker      ;;
5653*a67afe4dSAndroid Build Coastguard Worker
5654*a67afe4dSAndroid Build Coastguard Worker    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5655*a67afe4dSAndroid Build Coastguard Worker    # support.  Future versions do this automatically, but an explicit c++rt0.o
5656*a67afe4dSAndroid Build Coastguard Worker    # does not break anything, and helps significantly (at the cost of a little
5657*a67afe4dSAndroid Build Coastguard Worker    # extra space).
5658*a67afe4dSAndroid Build Coastguard Worker    freebsd2.2*)
5659*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5660*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5661*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5662*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5663*a67afe4dSAndroid Build Coastguard Worker      ;;
5664*a67afe4dSAndroid Build Coastguard Worker
5665*a67afe4dSAndroid Build Coastguard Worker    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5666*a67afe4dSAndroid Build Coastguard Worker    freebsd2.*)
5667*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5668*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5669*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5670*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5671*a67afe4dSAndroid Build Coastguard Worker      ;;
5672*a67afe4dSAndroid Build Coastguard Worker
5673*a67afe4dSAndroid Build Coastguard Worker    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5674*a67afe4dSAndroid Build Coastguard Worker    freebsd* | dragonfly* | midnightbsd*)
5675*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5676*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5677*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5678*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5679*a67afe4dSAndroid Build Coastguard Worker      ;;
5680*a67afe4dSAndroid Build Coastguard Worker
5681*a67afe4dSAndroid Build Coastguard Worker    hpux9*)
5682*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5683*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5684*a67afe4dSAndroid Build Coastguard Worker      else
5685*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5686*a67afe4dSAndroid Build Coastguard Worker      fi
5687*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5688*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5689*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5690*a67afe4dSAndroid Build Coastguard Worker
5691*a67afe4dSAndroid Build Coastguard Worker      # hardcode_minus_L: Not really in the search PATH,
5692*a67afe4dSAndroid Build Coastguard Worker      # but as the default location of the library.
5693*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5694*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5695*a67afe4dSAndroid Build Coastguard Worker      ;;
5696*a67afe4dSAndroid Build Coastguard Worker
5697*a67afe4dSAndroid Build Coastguard Worker    hpux10*)
5698*a67afe4dSAndroid Build Coastguard Worker      if test yes,no = "$GCC,$with_gnu_ld"; then
5699*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5700*a67afe4dSAndroid Build Coastguard Worker      else
5701*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5702*a67afe4dSAndroid Build Coastguard Worker      fi
5703*a67afe4dSAndroid Build Coastguard Worker      if test no = "$with_gnu_ld"; then
5704*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5705*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5706*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=yes
5707*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5708*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5709*a67afe4dSAndroid Build Coastguard Worker	# hardcode_minus_L: Not really in the search PATH,
5710*a67afe4dSAndroid Build Coastguard Worker	# but as the default location of the library.
5711*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5712*a67afe4dSAndroid Build Coastguard Worker      fi
5713*a67afe4dSAndroid Build Coastguard Worker      ;;
5714*a67afe4dSAndroid Build Coastguard Worker
5715*a67afe4dSAndroid Build Coastguard Worker    hpux11*)
5716*a67afe4dSAndroid Build Coastguard Worker      if test yes,no = "$GCC,$with_gnu_ld"; then
5717*a67afe4dSAndroid Build Coastguard Worker	case $host_cpu in
5718*a67afe4dSAndroid Build Coastguard Worker	hppa*64*)
5719*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5720*a67afe4dSAndroid Build Coastguard Worker	  ;;
5721*a67afe4dSAndroid Build Coastguard Worker	ia64*)
5722*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5723*a67afe4dSAndroid Build Coastguard Worker	  ;;
5724*a67afe4dSAndroid Build Coastguard Worker	*)
5725*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5726*a67afe4dSAndroid Build Coastguard Worker	  ;;
5727*a67afe4dSAndroid Build Coastguard Worker	esac
5728*a67afe4dSAndroid Build Coastguard Worker      else
5729*a67afe4dSAndroid Build Coastguard Worker	case $host_cpu in
5730*a67afe4dSAndroid Build Coastguard Worker	hppa*64*)
5731*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5732*a67afe4dSAndroid Build Coastguard Worker	  ;;
5733*a67afe4dSAndroid Build Coastguard Worker	ia64*)
5734*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5735*a67afe4dSAndroid Build Coastguard Worker	  ;;
5736*a67afe4dSAndroid Build Coastguard Worker	*)
5737*a67afe4dSAndroid Build Coastguard Worker	m4_if($1, [], [
5738*a67afe4dSAndroid Build Coastguard Worker	  # Older versions of the 11.00 compiler do not understand -b yet
5739*a67afe4dSAndroid Build Coastguard Worker	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5740*a67afe4dSAndroid Build Coastguard Worker	  _LT_LINKER_OPTION([if $CC understands -b],
5741*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5742*a67afe4dSAndroid Build Coastguard Worker	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5743*a67afe4dSAndroid Build Coastguard Worker	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5744*a67afe4dSAndroid Build Coastguard Worker	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5745*a67afe4dSAndroid Build Coastguard Worker	  ;;
5746*a67afe4dSAndroid Build Coastguard Worker	esac
5747*a67afe4dSAndroid Build Coastguard Worker      fi
5748*a67afe4dSAndroid Build Coastguard Worker      if test no = "$with_gnu_ld"; then
5749*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5750*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5751*a67afe4dSAndroid Build Coastguard Worker
5752*a67afe4dSAndroid Build Coastguard Worker	case $host_cpu in
5753*a67afe4dSAndroid Build Coastguard Worker	hppa*64*|ia64*)
5754*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no
5755*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5756*a67afe4dSAndroid Build Coastguard Worker	  ;;
5757*a67afe4dSAndroid Build Coastguard Worker	*)
5758*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
5759*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5761*a67afe4dSAndroid Build Coastguard Worker
5762*a67afe4dSAndroid Build Coastguard Worker	  # hardcode_minus_L: Not really in the search PATH,
5763*a67afe4dSAndroid Build Coastguard Worker	  # but as the default location of the library.
5764*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5765*a67afe4dSAndroid Build Coastguard Worker	  ;;
5766*a67afe4dSAndroid Build Coastguard Worker	esac
5767*a67afe4dSAndroid Build Coastguard Worker      fi
5768*a67afe4dSAndroid Build Coastguard Worker      ;;
5769*a67afe4dSAndroid Build Coastguard Worker
5770*a67afe4dSAndroid Build Coastguard Worker    irix5* | irix6* | nonstopux*)
5771*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5772*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5773*a67afe4dSAndroid Build Coastguard Worker	# Try to use the -exported_symbol ld option, if it does not
5774*a67afe4dSAndroid Build Coastguard Worker	# work, assume that -exports_file does not work either and
5775*a67afe4dSAndroid Build Coastguard Worker	# implicitly export all symbols.
5776*a67afe4dSAndroid Build Coastguard Worker	# This should be the same for all languages, so no per-tag cache variable.
5777*a67afe4dSAndroid Build Coastguard Worker	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5778*a67afe4dSAndroid Build Coastguard Worker	  [lt_cv_irix_exported_symbol],
5779*a67afe4dSAndroid Build Coastguard Worker	  [save_LDFLAGS=$LDFLAGS
5780*a67afe4dSAndroid Build Coastguard Worker	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5781*a67afe4dSAndroid Build Coastguard Worker	   AC_LINK_IFELSE(
5782*a67afe4dSAndroid Build Coastguard Worker	     [AC_LANG_SOURCE(
5783*a67afe4dSAndroid Build Coastguard Worker	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5784*a67afe4dSAndroid Build Coastguard Worker			      [C++], [[int foo (void) { return 0; }]],
5785*a67afe4dSAndroid Build Coastguard Worker			      [Fortran 77], [[
5786*a67afe4dSAndroid Build Coastguard Worker      subroutine foo
5787*a67afe4dSAndroid Build Coastguard Worker      end]],
5788*a67afe4dSAndroid Build Coastguard Worker			      [Fortran], [[
5789*a67afe4dSAndroid Build Coastguard Worker      subroutine foo
5790*a67afe4dSAndroid Build Coastguard Worker      end]])])],
5791*a67afe4dSAndroid Build Coastguard Worker	      [lt_cv_irix_exported_symbol=yes],
5792*a67afe4dSAndroid Build Coastguard Worker	      [lt_cv_irix_exported_symbol=no])
5793*a67afe4dSAndroid Build Coastguard Worker           LDFLAGS=$save_LDFLAGS])
5794*a67afe4dSAndroid Build Coastguard Worker	if test yes = "$lt_cv_irix_exported_symbol"; then
5795*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
5796*a67afe4dSAndroid Build Coastguard Worker	fi
5797*a67afe4dSAndroid Build Coastguard Worker      else
5798*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5799*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
5800*a67afe4dSAndroid Build Coastguard Worker      fi
5801*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5802*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5803*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5804*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(inherit_rpath, $1)=yes
5805*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5806*a67afe4dSAndroid Build Coastguard Worker      ;;
5807*a67afe4dSAndroid Build Coastguard Worker
5808*a67afe4dSAndroid Build Coastguard Worker    linux*)
5809*a67afe4dSAndroid Build Coastguard Worker      case $cc_basename in
5810*a67afe4dSAndroid Build Coastguard Worker      tcc*)
5811*a67afe4dSAndroid Build Coastguard Worker	# Fabrice Bellard et al's Tiny C Compiler
5812*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=yes
5813*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5814*a67afe4dSAndroid Build Coastguard Worker	;;
5815*a67afe4dSAndroid Build Coastguard Worker      esac
5816*a67afe4dSAndroid Build Coastguard Worker      ;;
5817*a67afe4dSAndroid Build Coastguard Worker
5818*a67afe4dSAndroid Build Coastguard Worker    netbsd*)
5819*a67afe4dSAndroid Build Coastguard Worker      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5820*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5821*a67afe4dSAndroid Build Coastguard Worker      else
5822*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5823*a67afe4dSAndroid Build Coastguard Worker      fi
5824*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5825*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5826*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5827*a67afe4dSAndroid Build Coastguard Worker      ;;
5828*a67afe4dSAndroid Build Coastguard Worker
5829*a67afe4dSAndroid Build Coastguard Worker    newsos6)
5830*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5831*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5832*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5833*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5834*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5835*a67afe4dSAndroid Build Coastguard Worker      ;;
5836*a67afe4dSAndroid Build Coastguard Worker
5837*a67afe4dSAndroid Build Coastguard Worker    *nto* | *qnx*)
5838*a67afe4dSAndroid Build Coastguard Worker      ;;
5839*a67afe4dSAndroid Build Coastguard Worker
5840*a67afe4dSAndroid Build Coastguard Worker    openbsd* | bitrig*)
5841*a67afe4dSAndroid Build Coastguard Worker      if test -f /usr/libexec/ld.so; then
5842*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=yes
5843*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5844*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5845*a67afe4dSAndroid Build Coastguard Worker	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5846*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5847*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5848*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5849*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5850*a67afe4dSAndroid Build Coastguard Worker	else
5851*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5852*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5853*a67afe4dSAndroid Build Coastguard Worker	fi
5854*a67afe4dSAndroid Build Coastguard Worker      else
5855*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5856*a67afe4dSAndroid Build Coastguard Worker      fi
5857*a67afe4dSAndroid Build Coastguard Worker      ;;
5858*a67afe4dSAndroid Build Coastguard Worker
5859*a67afe4dSAndroid Build Coastguard Worker    os2*)
5860*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5861*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5862*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5863*a67afe4dSAndroid Build Coastguard Worker      shrext_cmds=.dll
5864*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5865*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5866*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5867*a67afe4dSAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5868*a67afe4dSAndroid Build Coastguard Worker	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5869*a67afe4dSAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5870*a67afe4dSAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5871*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5872*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5873*a67afe4dSAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5874*a67afe4dSAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5875*a67afe4dSAndroid Build Coastguard Worker	prefix_cmds="$SED"~
5876*a67afe4dSAndroid Build Coastguard Worker	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5877*a67afe4dSAndroid Build Coastguard Worker	  prefix_cmds="$prefix_cmds -e 1d";
5878*a67afe4dSAndroid Build Coastguard Worker	fi~
5879*a67afe4dSAndroid Build Coastguard Worker	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5880*a67afe4dSAndroid Build Coastguard Worker	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5881*a67afe4dSAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5882*a67afe4dSAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5883*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5884*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5885*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='@'
5886*a67afe4dSAndroid Build Coastguard Worker      ;;
5887*a67afe4dSAndroid Build Coastguard Worker
5888*a67afe4dSAndroid Build Coastguard Worker    osf3*)
5889*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5890*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5891*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5892*a67afe4dSAndroid Build Coastguard Worker      else
5893*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5894*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5895*a67afe4dSAndroid Build Coastguard Worker      fi
5896*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5897*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5898*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5899*a67afe4dSAndroid Build Coastguard Worker      ;;
5900*a67afe4dSAndroid Build Coastguard Worker
5901*a67afe4dSAndroid Build Coastguard Worker    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5902*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5903*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5904*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5905*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5906*a67afe4dSAndroid Build Coastguard Worker      else
5907*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5908*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5909*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5910*a67afe4dSAndroid Build Coastguard Worker          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
5911*a67afe4dSAndroid Build Coastguard Worker
5912*a67afe4dSAndroid Build Coastguard Worker	# Both c and cxx compiler support -rpath directly
5913*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5914*a67afe4dSAndroid Build Coastguard Worker      fi
5915*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5916*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5917*a67afe4dSAndroid Build Coastguard Worker      ;;
5918*a67afe4dSAndroid Build Coastguard Worker
5919*a67afe4dSAndroid Build Coastguard Worker    solaris*)
5920*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5921*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5922*a67afe4dSAndroid Build Coastguard Worker	wlarc='$wl'
5923*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5924*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5925*a67afe4dSAndroid Build Coastguard Worker          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5926*a67afe4dSAndroid Build Coastguard Worker      else
5927*a67afe4dSAndroid Build Coastguard Worker	case `$CC -V 2>&1` in
5928*a67afe4dSAndroid Build Coastguard Worker	*"Compilers 5.0"*)
5929*a67afe4dSAndroid Build Coastguard Worker	  wlarc=''
5930*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5932*a67afe4dSAndroid Build Coastguard Worker            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5933*a67afe4dSAndroid Build Coastguard Worker	  ;;
5934*a67afe4dSAndroid Build Coastguard Worker	*)
5935*a67afe4dSAndroid Build Coastguard Worker	  wlarc='$wl'
5936*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5937*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5938*a67afe4dSAndroid Build Coastguard Worker            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5939*a67afe4dSAndroid Build Coastguard Worker	  ;;
5940*a67afe4dSAndroid Build Coastguard Worker	esac
5941*a67afe4dSAndroid Build Coastguard Worker      fi
5942*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5943*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5944*a67afe4dSAndroid Build Coastguard Worker      case $host_os in
5945*a67afe4dSAndroid Build Coastguard Worker      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5946*a67afe4dSAndroid Build Coastguard Worker      *)
5947*a67afe4dSAndroid Build Coastguard Worker	# The compiler driver will combine and reorder linker options,
5948*a67afe4dSAndroid Build Coastguard Worker	# but understands '-z linker_flag'.  GCC discards it without '$wl',
5949*a67afe4dSAndroid Build Coastguard Worker	# but is careful enough not to reorder.
5950*a67afe4dSAndroid Build Coastguard Worker	# Supported since Solaris 2.6 (maybe 2.5.1?)
5951*a67afe4dSAndroid Build Coastguard Worker	if test yes = "$GCC"; then
5952*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5953*a67afe4dSAndroid Build Coastguard Worker	else
5954*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5955*a67afe4dSAndroid Build Coastguard Worker	fi
5956*a67afe4dSAndroid Build Coastguard Worker	;;
5957*a67afe4dSAndroid Build Coastguard Worker      esac
5958*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5959*a67afe4dSAndroid Build Coastguard Worker      ;;
5960*a67afe4dSAndroid Build Coastguard Worker
5961*a67afe4dSAndroid Build Coastguard Worker    sunos4*)
5962*a67afe4dSAndroid Build Coastguard Worker      if test sequent = "$host_vendor"; then
5963*a67afe4dSAndroid Build Coastguard Worker	# Use $CC to link under sequent, because it throws in some extra .o
5964*a67afe4dSAndroid Build Coastguard Worker	# files that make .init and .fini sections work.
5965*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5966*a67afe4dSAndroid Build Coastguard Worker      else
5967*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5968*a67afe4dSAndroid Build Coastguard Worker      fi
5969*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5970*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5971*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5972*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5973*a67afe4dSAndroid Build Coastguard Worker      ;;
5974*a67afe4dSAndroid Build Coastguard Worker
5975*a67afe4dSAndroid Build Coastguard Worker    sysv4)
5976*a67afe4dSAndroid Build Coastguard Worker      case $host_vendor in
5977*a67afe4dSAndroid Build Coastguard Worker	sni)
5978*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5980*a67afe4dSAndroid Build Coastguard Worker	;;
5981*a67afe4dSAndroid Build Coastguard Worker	siemens)
5982*a67afe4dSAndroid Build Coastguard Worker	  ## LD is ld it makes a PLAMLIB
5983*a67afe4dSAndroid Build Coastguard Worker	  ## CC just makes a GrossModule.
5984*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5985*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5986*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no
5987*a67afe4dSAndroid Build Coastguard Worker        ;;
5988*a67afe4dSAndroid Build Coastguard Worker	motorola)
5989*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5991*a67afe4dSAndroid Build Coastguard Worker	;;
5992*a67afe4dSAndroid Build Coastguard Worker      esac
5993*a67afe4dSAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
5994*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5995*a67afe4dSAndroid Build Coastguard Worker      ;;
5996*a67afe4dSAndroid Build Coastguard Worker
5997*a67afe4dSAndroid Build Coastguard Worker    sysv4.3*)
5998*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6000*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6001*a67afe4dSAndroid Build Coastguard Worker      ;;
6002*a67afe4dSAndroid Build Coastguard Worker
6003*a67afe4dSAndroid Build Coastguard Worker    sysv4*MP*)
6004*a67afe4dSAndroid Build Coastguard Worker      if test -d /usr/nec; then
6005*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6006*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6007*a67afe4dSAndroid Build Coastguard Worker	runpath_var=LD_RUN_PATH
6008*a67afe4dSAndroid Build Coastguard Worker	hardcode_runpath_var=yes
6009*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=yes
6010*a67afe4dSAndroid Build Coastguard Worker      fi
6011*a67afe4dSAndroid Build Coastguard Worker      ;;
6012*a67afe4dSAndroid Build Coastguard Worker
6013*a67afe4dSAndroid Build Coastguard Worker    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6014*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6015*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6016*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6017*a67afe4dSAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
6018*a67afe4dSAndroid Build Coastguard Worker
6019*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
6020*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6021*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6022*a67afe4dSAndroid Build Coastguard Worker      else
6023*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6024*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6025*a67afe4dSAndroid Build Coastguard Worker      fi
6026*a67afe4dSAndroid Build Coastguard Worker      ;;
6027*a67afe4dSAndroid Build Coastguard Worker
6028*a67afe4dSAndroid Build Coastguard Worker    sysv5* | sco3.2v5* | sco5v6*)
6029*a67afe4dSAndroid Build Coastguard Worker      # Note: We CANNOT use -z defs as we might desire, because we do not
6030*a67afe4dSAndroid Build Coastguard Worker      # link with -lc, and that would cause any symbols used from libc to
6031*a67afe4dSAndroid Build Coastguard Worker      # always be unresolved, which means just about no library would
6032*a67afe4dSAndroid Build Coastguard Worker      # ever link correctly.  If we're not using GNU ld we use -z text
6033*a67afe4dSAndroid Build Coastguard Worker      # though, which does catch some bad symbols but isn't as heavy-handed
6034*a67afe4dSAndroid Build Coastguard Worker      # as -z defs.
6035*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6036*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6037*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6038*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6039*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6040*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6041*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
6042*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6043*a67afe4dSAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
6044*a67afe4dSAndroid Build Coastguard Worker
6045*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$GCC"; then
6046*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6047*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6048*a67afe4dSAndroid Build Coastguard Worker      else
6049*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6050*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6051*a67afe4dSAndroid Build Coastguard Worker      fi
6052*a67afe4dSAndroid Build Coastguard Worker      ;;
6053*a67afe4dSAndroid Build Coastguard Worker
6054*a67afe4dSAndroid Build Coastguard Worker    uts4*)
6055*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6056*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6057*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6058*a67afe4dSAndroid Build Coastguard Worker      ;;
6059*a67afe4dSAndroid Build Coastguard Worker
6060*a67afe4dSAndroid Build Coastguard Worker    *)
6061*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(ld_shlibs, $1)=no
6062*a67afe4dSAndroid Build Coastguard Worker      ;;
6063*a67afe4dSAndroid Build Coastguard Worker    esac
6064*a67afe4dSAndroid Build Coastguard Worker
6065*a67afe4dSAndroid Build Coastguard Worker    if test sni = "$host_vendor"; then
6066*a67afe4dSAndroid Build Coastguard Worker      case $host in
6067*a67afe4dSAndroid Build Coastguard Worker      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6068*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6069*a67afe4dSAndroid Build Coastguard Worker	;;
6070*a67afe4dSAndroid Build Coastguard Worker      esac
6071*a67afe4dSAndroid Build Coastguard Worker    fi
6072*a67afe4dSAndroid Build Coastguard Worker  fi
6073*a67afe4dSAndroid Build Coastguard Worker])
6074*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6075*a67afe4dSAndroid Build Coastguard Workertest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6076*a67afe4dSAndroid Build Coastguard Worker
6077*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6078*a67afe4dSAndroid Build Coastguard Worker
6079*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6080*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6081*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [extract_expsyms_cmds], [2],
6082*a67afe4dSAndroid Build Coastguard Worker    [The commands to extract the exported symbol list from a shared archive])
6083*a67afe4dSAndroid Build Coastguard Worker
6084*a67afe4dSAndroid Build Coastguard Worker#
6085*a67afe4dSAndroid Build Coastguard Worker# Do we need to explicitly link libc?
6086*a67afe4dSAndroid Build Coastguard Worker#
6087*a67afe4dSAndroid Build Coastguard Workercase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6088*a67afe4dSAndroid Build Coastguard Workerx|xyes)
6089*a67afe4dSAndroid Build Coastguard Worker  # Assume -lc should be added
6090*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6091*a67afe4dSAndroid Build Coastguard Worker
6092*a67afe4dSAndroid Build Coastguard Worker  if test yes,yes = "$GCC,$enable_shared"; then
6093*a67afe4dSAndroid Build Coastguard Worker    case $_LT_TAGVAR(archive_cmds, $1) in
6094*a67afe4dSAndroid Build Coastguard Worker    *'~'*)
6095*a67afe4dSAndroid Build Coastguard Worker      # FIXME: we may have to deal with multi-command sequences.
6096*a67afe4dSAndroid Build Coastguard Worker      ;;
6097*a67afe4dSAndroid Build Coastguard Worker    '$CC '*)
6098*a67afe4dSAndroid Build Coastguard Worker      # Test whether the compiler implicitly links with -lc since on some
6099*a67afe4dSAndroid Build Coastguard Worker      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6100*a67afe4dSAndroid Build Coastguard Worker      # to ld, don't add -lc before -lgcc.
6101*a67afe4dSAndroid Build Coastguard Worker      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6102*a67afe4dSAndroid Build Coastguard Worker	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6103*a67afe4dSAndroid Build Coastguard Worker	[$RM conftest*
6104*a67afe4dSAndroid Build Coastguard Worker	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6105*a67afe4dSAndroid Build Coastguard Worker
6106*a67afe4dSAndroid Build Coastguard Worker	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6107*a67afe4dSAndroid Build Coastguard Worker	  soname=conftest
6108*a67afe4dSAndroid Build Coastguard Worker	  lib=conftest
6109*a67afe4dSAndroid Build Coastguard Worker	  libobjs=conftest.$ac_objext
6110*a67afe4dSAndroid Build Coastguard Worker	  deplibs=
6111*a67afe4dSAndroid Build Coastguard Worker	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6112*a67afe4dSAndroid Build Coastguard Worker	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6113*a67afe4dSAndroid Build Coastguard Worker	  compiler_flags=-v
6114*a67afe4dSAndroid Build Coastguard Worker	  linker_flags=-v
6115*a67afe4dSAndroid Build Coastguard Worker	  verstring=
6116*a67afe4dSAndroid Build Coastguard Worker	  output_objdir=.
6117*a67afe4dSAndroid Build Coastguard Worker	  libname=conftest
6118*a67afe4dSAndroid Build Coastguard Worker	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6119*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=
6120*a67afe4dSAndroid Build Coastguard Worker	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6121*a67afe4dSAndroid Build Coastguard Worker	  then
6122*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6123*a67afe4dSAndroid Build Coastguard Worker	  else
6124*a67afe4dSAndroid Build Coastguard Worker	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6125*a67afe4dSAndroid Build Coastguard Worker	  fi
6126*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6127*a67afe4dSAndroid Build Coastguard Worker	else
6128*a67afe4dSAndroid Build Coastguard Worker	  cat conftest.err 1>&5
6129*a67afe4dSAndroid Build Coastguard Worker	fi
6130*a67afe4dSAndroid Build Coastguard Worker	$RM conftest*
6131*a67afe4dSAndroid Build Coastguard Worker	])
6132*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6133*a67afe4dSAndroid Build Coastguard Worker      ;;
6134*a67afe4dSAndroid Build Coastguard Worker    esac
6135*a67afe4dSAndroid Build Coastguard Worker  fi
6136*a67afe4dSAndroid Build Coastguard Worker  ;;
6137*a67afe4dSAndroid Build Coastguard Workeresac
6138*a67afe4dSAndroid Build Coastguard Worker
6139*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6140*a67afe4dSAndroid Build Coastguard Worker    [Whether or not to add -lc for building shared libraries])
6141*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6142*a67afe4dSAndroid Build Coastguard Worker    [enable_shared_with_static_runtimes], [0],
6143*a67afe4dSAndroid Build Coastguard Worker    [Whether or not to disallow shared libs when runtime libs are static])
6144*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6145*a67afe4dSAndroid Build Coastguard Worker    [Compiler flag to allow reflexive dlopens])
6146*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6147*a67afe4dSAndroid Build Coastguard Worker    [Compiler flag to generate shared objects directly from archives])
6148*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_needs_object], [1],
6149*a67afe4dSAndroid Build Coastguard Worker    [Whether the compiler copes with passing no objects directly])
6150*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6151*a67afe4dSAndroid Build Coastguard Worker    [Create an old-style archive from a shared archive])
6152*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6153*a67afe4dSAndroid Build Coastguard Worker    [Create a temporary old-style archive to link instead of a shared archive])
6154*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6155*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_expsym_cmds], [2])
6156*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [module_cmds], [2],
6157*a67afe4dSAndroid Build Coastguard Worker    [Commands used to build a loadable module if different from building
6158*a67afe4dSAndroid Build Coastguard Worker    a shared archive.])
6159*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [module_expsym_cmds], [2])
6160*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [with_gnu_ld], [1],
6161*a67afe4dSAndroid Build Coastguard Worker    [Whether we are building with GNU ld or not])
6162*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [allow_undefined_flag], [1],
6163*a67afe4dSAndroid Build Coastguard Worker    [Flag that allows shared libraries with undefined symbols to be built])
6164*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [no_undefined_flag], [1],
6165*a67afe4dSAndroid Build Coastguard Worker    [Flag that enforces no undefined symbols])
6166*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6167*a67afe4dSAndroid Build Coastguard Worker    [Flag to hardcode $libdir into a binary during linking.
6168*a67afe4dSAndroid Build Coastguard Worker    This must work even if $libdir does not exist])
6169*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6170*a67afe4dSAndroid Build Coastguard Worker    [Whether we need a single "-rpath" flag with a separated argument])
6171*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct], [0],
6172*a67afe4dSAndroid Build Coastguard Worker    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6173*a67afe4dSAndroid Build Coastguard Worker    DIR into the resulting binary])
6174*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6175*a67afe4dSAndroid Build Coastguard Worker    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6176*a67afe4dSAndroid Build Coastguard Worker    DIR into the resulting binary and the resulting library dependency is
6177*a67afe4dSAndroid Build Coastguard Worker    "absolute", i.e impossible to change by setting $shlibpath_var if the
6178*a67afe4dSAndroid Build Coastguard Worker    library is relocated])
6179*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_minus_L], [0],
6180*a67afe4dSAndroid Build Coastguard Worker    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6181*a67afe4dSAndroid Build Coastguard Worker    into the resulting binary])
6182*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6183*a67afe4dSAndroid Build Coastguard Worker    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6184*a67afe4dSAndroid Build Coastguard Worker    into the resulting binary])
6185*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_automatic], [0],
6186*a67afe4dSAndroid Build Coastguard Worker    [Set to "yes" if building a shared library automatically hardcodes DIR
6187*a67afe4dSAndroid Build Coastguard Worker    into the library and all subsequent libraries and executables linked
6188*a67afe4dSAndroid Build Coastguard Worker    against it])
6189*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [inherit_rpath], [0],
6190*a67afe4dSAndroid Build Coastguard Worker    [Set to yes if linker adds runtime paths of dependent libraries
6191*a67afe4dSAndroid Build Coastguard Worker    to runtime path list])
6192*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [link_all_deplibs], [0],
6193*a67afe4dSAndroid Build Coastguard Worker    [Whether libtool must link a program against all its dependency libraries])
6194*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [always_export_symbols], [0],
6195*a67afe4dSAndroid Build Coastguard Worker    [Set to "yes" if exported symbols are required])
6196*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [export_symbols_cmds], [2],
6197*a67afe4dSAndroid Build Coastguard Worker    [The commands to list exported symbols])
6198*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [exclude_expsyms], [1],
6199*a67afe4dSAndroid Build Coastguard Worker    [Symbols that should not be listed in the preloaded symbols])
6200*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [include_expsyms], [1],
6201*a67afe4dSAndroid Build Coastguard Worker    [Symbols that must always be exported])
6202*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [prelink_cmds], [2],
6203*a67afe4dSAndroid Build Coastguard Worker    [Commands necessary for linking programs (against libraries) with templates])
6204*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [postlink_cmds], [2],
6205*a67afe4dSAndroid Build Coastguard Worker    [Commands necessary for finishing linking programs])
6206*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [file_list_spec], [1],
6207*a67afe4dSAndroid Build Coastguard Worker    [Specify filename containing input files])
6208*a67afe4dSAndroid Build Coastguard Workerdnl FIXME: Not yet implemented
6209*a67afe4dSAndroid Build Coastguard Workerdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6210*a67afe4dSAndroid Build Coastguard Workerdnl    [Compiler flag to generate thread safe objects])
6211*a67afe4dSAndroid Build Coastguard Worker])# _LT_LINKER_SHLIBS
6212*a67afe4dSAndroid Build Coastguard Worker
6213*a67afe4dSAndroid Build Coastguard Worker
6214*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_C_CONFIG([TAG])
6215*a67afe4dSAndroid Build Coastguard Worker# ------------------------
6216*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for a C compiler are suitably
6217*a67afe4dSAndroid Build Coastguard Worker# defined.  These variables are subsequently used by _LT_CONFIG to write
6218*a67afe4dSAndroid Build Coastguard Worker# the compiler configuration to 'libtool'.
6219*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_C_CONFIG],
6220*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl
6221*a67afe4dSAndroid Build Coastguard Workerlt_save_CC=$CC
6222*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_PUSH(C)
6223*a67afe4dSAndroid Build Coastguard Worker
6224*a67afe4dSAndroid Build Coastguard Worker# Source file extension for C test sources.
6225*a67afe4dSAndroid Build Coastguard Workerac_ext=c
6226*a67afe4dSAndroid Build Coastguard Worker
6227*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled C test sources.
6228*a67afe4dSAndroid Build Coastguard Workerobjext=o
6229*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
6230*a67afe4dSAndroid Build Coastguard Worker
6231*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple compile tests
6232*a67afe4dSAndroid Build Coastguard Workerlt_simple_compile_test_code="int some_variable = 0;"
6233*a67afe4dSAndroid Build Coastguard Worker
6234*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple link tests
6235*a67afe4dSAndroid Build Coastguard Workerlt_simple_link_test_code='int main(){return(0);}'
6236*a67afe4dSAndroid Build Coastguard Worker
6237*a67afe4dSAndroid Build Coastguard Worker_LT_TAG_COMPILER
6238*a67afe4dSAndroid Build Coastguard Worker# Save the default compiler, since it gets overwritten when the other
6239*a67afe4dSAndroid Build Coastguard Worker# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6240*a67afe4dSAndroid Build Coastguard Workercompiler_DEFAULT=$CC
6241*a67afe4dSAndroid Build Coastguard Worker
6242*a67afe4dSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
6243*a67afe4dSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
6244*a67afe4dSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
6245*a67afe4dSAndroid Build Coastguard Worker
6246*a67afe4dSAndroid Build Coastguard Worker## CAVEAT EMPTOR:
6247*a67afe4dSAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
6248*a67afe4dSAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
6249*a67afe4dSAndroid Build Coastguard Worker## what you are doing...
6250*a67afe4dSAndroid Build Coastguard Workerif test -n "$compiler"; then
6251*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
6252*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
6253*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
6254*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
6255*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
6256*a67afe4dSAndroid Build Coastguard Worker  _LT_SYS_DYNAMIC_LINKER($1)
6257*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
6258*a67afe4dSAndroid Build Coastguard Worker  LT_SYS_DLOPEN_SELF
6259*a67afe4dSAndroid Build Coastguard Worker  _LT_CMD_STRIPLIB
6260*a67afe4dSAndroid Build Coastguard Worker
6261*a67afe4dSAndroid Build Coastguard Worker  # Report what library types will actually be built
6262*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([if libtool supports shared libraries])
6263*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT([$can_build_shared])
6264*a67afe4dSAndroid Build Coastguard Worker
6265*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([whether to build shared libraries])
6266*a67afe4dSAndroid Build Coastguard Worker  test no = "$can_build_shared" && enable_shared=no
6267*a67afe4dSAndroid Build Coastguard Worker
6268*a67afe4dSAndroid Build Coastguard Worker  # On AIX, shared libraries and static libraries use the same namespace, and
6269*a67afe4dSAndroid Build Coastguard Worker  # are all built from PIC.
6270*a67afe4dSAndroid Build Coastguard Worker  case $host_os in
6271*a67afe4dSAndroid Build Coastguard Worker  aix3*)
6272*a67afe4dSAndroid Build Coastguard Worker    test yes = "$enable_shared" && enable_static=no
6273*a67afe4dSAndroid Build Coastguard Worker    if test -n "$RANLIB"; then
6274*a67afe4dSAndroid Build Coastguard Worker      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6275*a67afe4dSAndroid Build Coastguard Worker      postinstall_cmds='$RANLIB $lib'
6276*a67afe4dSAndroid Build Coastguard Worker    fi
6277*a67afe4dSAndroid Build Coastguard Worker    ;;
6278*a67afe4dSAndroid Build Coastguard Worker
6279*a67afe4dSAndroid Build Coastguard Worker  aix[[4-9]]*)
6280*a67afe4dSAndroid Build Coastguard Worker    if test ia64 != "$host_cpu"; then
6281*a67afe4dSAndroid Build Coastguard Worker      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6282*a67afe4dSAndroid Build Coastguard Worker      yes,aix,yes) ;;			# shared object as lib.so file only
6283*a67afe4dSAndroid Build Coastguard Worker      yes,svr4,*) ;;			# shared object as lib.so archive member only
6284*a67afe4dSAndroid Build Coastguard Worker      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6285*a67afe4dSAndroid Build Coastguard Worker      esac
6286*a67afe4dSAndroid Build Coastguard Worker    fi
6287*a67afe4dSAndroid Build Coastguard Worker    ;;
6288*a67afe4dSAndroid Build Coastguard Worker  esac
6289*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT([$enable_shared])
6290*a67afe4dSAndroid Build Coastguard Worker
6291*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_CHECKING([whether to build static libraries])
6292*a67afe4dSAndroid Build Coastguard Worker  # Make sure either enable_shared or enable_static is yes.
6293*a67afe4dSAndroid Build Coastguard Worker  test yes = "$enable_shared" || enable_static=yes
6294*a67afe4dSAndroid Build Coastguard Worker  AC_MSG_RESULT([$enable_static])
6295*a67afe4dSAndroid Build Coastguard Worker
6296*a67afe4dSAndroid Build Coastguard Worker  _LT_CONFIG($1)
6297*a67afe4dSAndroid Build Coastguard Workerfi
6298*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_POP
6299*a67afe4dSAndroid Build Coastguard WorkerCC=$lt_save_CC
6300*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_C_CONFIG
6301*a67afe4dSAndroid Build Coastguard Worker
6302*a67afe4dSAndroid Build Coastguard Worker
6303*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_CXX_CONFIG([TAG])
6304*a67afe4dSAndroid Build Coastguard Worker# --------------------------
6305*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for a C++ compiler are suitably
6306*a67afe4dSAndroid Build Coastguard Worker# defined.  These variables are subsequently used by _LT_CONFIG to write
6307*a67afe4dSAndroid Build Coastguard Worker# the compiler configuration to 'libtool'.
6308*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_CXX_CONFIG],
6309*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6310*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
6311*a67afe4dSAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6312*a67afe4dSAndroid Build Coastguard Workerif test -n "$CXX" && ( test no != "$CXX" &&
6313*a67afe4dSAndroid Build Coastguard Worker    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6314*a67afe4dSAndroid Build Coastguard Worker    (test g++ != "$CXX"))); then
6315*a67afe4dSAndroid Build Coastguard Worker  AC_PROG_CXXCPP
6316*a67afe4dSAndroid Build Coastguard Workerelse
6317*a67afe4dSAndroid Build Coastguard Worker  _lt_caught_CXX_error=yes
6318*a67afe4dSAndroid Build Coastguard Workerfi
6319*a67afe4dSAndroid Build Coastguard Worker
6320*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_PUSH(C++)
6321*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6322*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
6323*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
6324*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
6325*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(compiler_needs_object, $1)=no
6326*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6327*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
6328*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6329*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6330*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
6331*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
6332*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6333*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
6334*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
6335*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
6336*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
6337*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
6338*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6339*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
6340*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6341*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
6342*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
6343*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6344*a67afe4dSAndroid Build Coastguard Worker
6345*a67afe4dSAndroid Build Coastguard Worker# Source file extension for C++ test sources.
6346*a67afe4dSAndroid Build Coastguard Workerac_ext=cpp
6347*a67afe4dSAndroid Build Coastguard Worker
6348*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled C++ test sources.
6349*a67afe4dSAndroid Build Coastguard Workerobjext=o
6350*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
6351*a67afe4dSAndroid Build Coastguard Worker
6352*a67afe4dSAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
6353*a67afe4dSAndroid Build Coastguard Worker# the CXX compiler isn't working.  Some variables (like enable_shared)
6354*a67afe4dSAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
6355*a67afe4dSAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
6356*a67afe4dSAndroid Build Coastguard Workerif test yes != "$_lt_caught_CXX_error"; then
6357*a67afe4dSAndroid Build Coastguard Worker  # Code to be used in simple compile tests
6358*a67afe4dSAndroid Build Coastguard Worker  lt_simple_compile_test_code="int some_variable = 0;"
6359*a67afe4dSAndroid Build Coastguard Worker
6360*a67afe4dSAndroid Build Coastguard Worker  # Code to be used in simple link tests
6361*a67afe4dSAndroid Build Coastguard Worker  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6362*a67afe4dSAndroid Build Coastguard Worker
6363*a67afe4dSAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6364*a67afe4dSAndroid Build Coastguard Worker  _LT_TAG_COMPILER
6365*a67afe4dSAndroid Build Coastguard Worker
6366*a67afe4dSAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
6367*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
6368*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
6369*a67afe4dSAndroid Build Coastguard Worker
6370*a67afe4dSAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
6371*a67afe4dSAndroid Build Coastguard Worker  lt_save_CC=$CC
6372*a67afe4dSAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
6373*a67afe4dSAndroid Build Coastguard Worker  lt_save_LD=$LD
6374*a67afe4dSAndroid Build Coastguard Worker  lt_save_GCC=$GCC
6375*a67afe4dSAndroid Build Coastguard Worker  GCC=$GXX
6376*a67afe4dSAndroid Build Coastguard Worker  lt_save_with_gnu_ld=$with_gnu_ld
6377*a67afe4dSAndroid Build Coastguard Worker  lt_save_path_LD=$lt_cv_path_LD
6378*a67afe4dSAndroid Build Coastguard Worker  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6379*a67afe4dSAndroid Build Coastguard Worker    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6380*a67afe4dSAndroid Build Coastguard Worker  else
6381*a67afe4dSAndroid Build Coastguard Worker    $as_unset lt_cv_prog_gnu_ld
6382*a67afe4dSAndroid Build Coastguard Worker  fi
6383*a67afe4dSAndroid Build Coastguard Worker  if test -n "${lt_cv_path_LDCXX+set}"; then
6384*a67afe4dSAndroid Build Coastguard Worker    lt_cv_path_LD=$lt_cv_path_LDCXX
6385*a67afe4dSAndroid Build Coastguard Worker  else
6386*a67afe4dSAndroid Build Coastguard Worker    $as_unset lt_cv_path_LD
6387*a67afe4dSAndroid Build Coastguard Worker  fi
6388*a67afe4dSAndroid Build Coastguard Worker  test -z "${LDCXX+set}" || LD=$LDCXX
6389*a67afe4dSAndroid Build Coastguard Worker  CC=${CXX-"c++"}
6390*a67afe4dSAndroid Build Coastguard Worker  CFLAGS=$CXXFLAGS
6391*a67afe4dSAndroid Build Coastguard Worker  compiler=$CC
6392*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
6393*a67afe4dSAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
6394*a67afe4dSAndroid Build Coastguard Worker
6395*a67afe4dSAndroid Build Coastguard Worker  if test -n "$compiler"; then
6396*a67afe4dSAndroid Build Coastguard Worker    # We don't want -fno-exception when compiling C++ code, so set the
6397*a67afe4dSAndroid Build Coastguard Worker    # no_builtin_flag separately
6398*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$GXX"; then
6399*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6400*a67afe4dSAndroid Build Coastguard Worker    else
6401*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6402*a67afe4dSAndroid Build Coastguard Worker    fi
6403*a67afe4dSAndroid Build Coastguard Worker
6404*a67afe4dSAndroid Build Coastguard Worker    if test yes = "$GXX"; then
6405*a67afe4dSAndroid Build Coastguard Worker      # Set up default GNU C++ configuration
6406*a67afe4dSAndroid Build Coastguard Worker
6407*a67afe4dSAndroid Build Coastguard Worker      LT_PATH_LD
6408*a67afe4dSAndroid Build Coastguard Worker
6409*a67afe4dSAndroid Build Coastguard Worker      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6410*a67afe4dSAndroid Build Coastguard Worker      # archiving commands below assume that GNU ld is being used.
6411*a67afe4dSAndroid Build Coastguard Worker      if test yes = "$with_gnu_ld"; then
6412*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6413*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6414*a67afe4dSAndroid Build Coastguard Worker
6415*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6416*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6417*a67afe4dSAndroid Build Coastguard Worker
6418*a67afe4dSAndroid Build Coastguard Worker        # If archive_cmds runs LD, not CC, wlarc should be empty
6419*a67afe4dSAndroid Build Coastguard Worker        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6420*a67afe4dSAndroid Build Coastguard Worker        #     investigate it a little bit more. (MM)
6421*a67afe4dSAndroid Build Coastguard Worker        wlarc='$wl'
6422*a67afe4dSAndroid Build Coastguard Worker
6423*a67afe4dSAndroid Build Coastguard Worker        # ancient GNU ld didn't support --whole-archive et. al.
6424*a67afe4dSAndroid Build Coastguard Worker        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6425*a67afe4dSAndroid Build Coastguard Worker	  $GREP 'no-whole-archive' > /dev/null; then
6426*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6427*a67afe4dSAndroid Build Coastguard Worker        else
6428*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6429*a67afe4dSAndroid Build Coastguard Worker        fi
6430*a67afe4dSAndroid Build Coastguard Worker      else
6431*a67afe4dSAndroid Build Coastguard Worker        with_gnu_ld=no
6432*a67afe4dSAndroid Build Coastguard Worker        wlarc=
6433*a67afe4dSAndroid Build Coastguard Worker
6434*a67afe4dSAndroid Build Coastguard Worker        # A generic and very simple default shared library creation
6435*a67afe4dSAndroid Build Coastguard Worker        # command for GNU C++ for the case where it uses the native
6436*a67afe4dSAndroid Build Coastguard Worker        # linker, instead of GNU ld.  If possible, this setting should
6437*a67afe4dSAndroid Build Coastguard Worker        # overridden to take advantage of the native linker features on
6438*a67afe4dSAndroid Build Coastguard Worker        # the platform it is being used on.
6439*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6440*a67afe4dSAndroid Build Coastguard Worker      fi
6441*a67afe4dSAndroid Build Coastguard Worker
6442*a67afe4dSAndroid Build Coastguard Worker      # Commands to make compiler produce verbose output that lists
6443*a67afe4dSAndroid Build Coastguard Worker      # what "hidden" libraries, object files and flags are used when
6444*a67afe4dSAndroid Build Coastguard Worker      # linking a shared library.
6445*a67afe4dSAndroid Build Coastguard Worker      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6446*a67afe4dSAndroid Build Coastguard Worker
6447*a67afe4dSAndroid Build Coastguard Worker    else
6448*a67afe4dSAndroid Build Coastguard Worker      GXX=no
6449*a67afe4dSAndroid Build Coastguard Worker      with_gnu_ld=no
6450*a67afe4dSAndroid Build Coastguard Worker      wlarc=
6451*a67afe4dSAndroid Build Coastguard Worker    fi
6452*a67afe4dSAndroid Build Coastguard Worker
6453*a67afe4dSAndroid Build Coastguard Worker    # PORTME: fill in a description of your system's C++ link characteristics
6454*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6455*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(ld_shlibs, $1)=yes
6456*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
6457*a67afe4dSAndroid Build Coastguard Worker      aix3*)
6458*a67afe4dSAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6459*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6460*a67afe4dSAndroid Build Coastguard Worker        ;;
6461*a67afe4dSAndroid Build Coastguard Worker      aix[[4-9]]*)
6462*a67afe4dSAndroid Build Coastguard Worker        if test ia64 = "$host_cpu"; then
6463*a67afe4dSAndroid Build Coastguard Worker          # On IA64, the linker does run time linking by default, so we don't
6464*a67afe4dSAndroid Build Coastguard Worker          # have to do anything special.
6465*a67afe4dSAndroid Build Coastguard Worker          aix_use_runtimelinking=no
6466*a67afe4dSAndroid Build Coastguard Worker          exp_sym_flag='-Bexport'
6467*a67afe4dSAndroid Build Coastguard Worker          no_entry_flag=
6468*a67afe4dSAndroid Build Coastguard Worker        else
6469*a67afe4dSAndroid Build Coastguard Worker          aix_use_runtimelinking=no
6470*a67afe4dSAndroid Build Coastguard Worker
6471*a67afe4dSAndroid Build Coastguard Worker          # Test if we are trying to use run time linking or normal
6472*a67afe4dSAndroid Build Coastguard Worker          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6473*a67afe4dSAndroid Build Coastguard Worker          # have runtime linking enabled, and use it for executables.
6474*a67afe4dSAndroid Build Coastguard Worker          # For shared libraries, we enable/disable runtime linking
6475*a67afe4dSAndroid Build Coastguard Worker          # depending on the kind of the shared library created -
6476*a67afe4dSAndroid Build Coastguard Worker          # when "with_aix_soname,aix_use_runtimelinking" is:
6477*a67afe4dSAndroid Build Coastguard Worker          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6478*a67afe4dSAndroid Build Coastguard Worker          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6479*a67afe4dSAndroid Build Coastguard Worker          #            lib.a           static archive
6480*a67afe4dSAndroid Build Coastguard Worker          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6481*a67afe4dSAndroid Build Coastguard Worker          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6482*a67afe4dSAndroid Build Coastguard Worker          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6483*a67afe4dSAndroid Build Coastguard Worker          #            lib.a(lib.so.V) shared, rtl:no
6484*a67afe4dSAndroid Build Coastguard Worker          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6485*a67afe4dSAndroid Build Coastguard Worker          #            lib.a           static archive
6486*a67afe4dSAndroid Build Coastguard Worker          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6487*a67afe4dSAndroid Build Coastguard Worker	    for ld_flag in $LDFLAGS; do
6488*a67afe4dSAndroid Build Coastguard Worker	      case $ld_flag in
6489*a67afe4dSAndroid Build Coastguard Worker	      *-brtl*)
6490*a67afe4dSAndroid Build Coastguard Worker	        aix_use_runtimelinking=yes
6491*a67afe4dSAndroid Build Coastguard Worker	        break
6492*a67afe4dSAndroid Build Coastguard Worker	        ;;
6493*a67afe4dSAndroid Build Coastguard Worker	      esac
6494*a67afe4dSAndroid Build Coastguard Worker	    done
6495*a67afe4dSAndroid Build Coastguard Worker	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6496*a67afe4dSAndroid Build Coastguard Worker	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6497*a67afe4dSAndroid Build Coastguard Worker	      # so we don't have lib.a shared libs to link our executables.
6498*a67afe4dSAndroid Build Coastguard Worker	      # We have to force runtime linking in this case.
6499*a67afe4dSAndroid Build Coastguard Worker	      aix_use_runtimelinking=yes
6500*a67afe4dSAndroid Build Coastguard Worker	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6501*a67afe4dSAndroid Build Coastguard Worker	    fi
6502*a67afe4dSAndroid Build Coastguard Worker	    ;;
6503*a67afe4dSAndroid Build Coastguard Worker          esac
6504*a67afe4dSAndroid Build Coastguard Worker
6505*a67afe4dSAndroid Build Coastguard Worker          exp_sym_flag='-bexport'
6506*a67afe4dSAndroid Build Coastguard Worker          no_entry_flag='-bnoentry'
6507*a67afe4dSAndroid Build Coastguard Worker        fi
6508*a67afe4dSAndroid Build Coastguard Worker
6509*a67afe4dSAndroid Build Coastguard Worker        # When large executables or shared objects are built, AIX ld can
6510*a67afe4dSAndroid Build Coastguard Worker        # have problems creating the table of contents.  If linking a library
6511*a67afe4dSAndroid Build Coastguard Worker        # or program results in "error TOC overflow" add -mminimal-toc to
6512*a67afe4dSAndroid Build Coastguard Worker        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6513*a67afe4dSAndroid Build Coastguard Worker        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6514*a67afe4dSAndroid Build Coastguard Worker
6515*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)=''
6516*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct, $1)=yes
6517*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6518*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6519*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(link_all_deplibs, $1)=yes
6520*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6521*a67afe4dSAndroid Build Coastguard Worker        case $with_aix_soname,$aix_use_runtimelinking in
6522*a67afe4dSAndroid Build Coastguard Worker        aix,*) ;;	# no import file
6523*a67afe4dSAndroid Build Coastguard Worker        svr4,* | *,yes) # use import file
6524*a67afe4dSAndroid Build Coastguard Worker          # The Import File defines what to hardcode.
6525*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_direct, $1)=no
6526*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6527*a67afe4dSAndroid Build Coastguard Worker          ;;
6528*a67afe4dSAndroid Build Coastguard Worker        esac
6529*a67afe4dSAndroid Build Coastguard Worker
6530*a67afe4dSAndroid Build Coastguard Worker        if test yes = "$GXX"; then
6531*a67afe4dSAndroid Build Coastguard Worker          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6532*a67afe4dSAndroid Build Coastguard Worker          # We only want to do this on AIX 4.2 and lower, the check
6533*a67afe4dSAndroid Build Coastguard Worker          # below for broken collect2 doesn't work under 4.3+
6534*a67afe4dSAndroid Build Coastguard Worker	  collect2name=`$CC -print-prog-name=collect2`
6535*a67afe4dSAndroid Build Coastguard Worker	  if test -f "$collect2name" &&
6536*a67afe4dSAndroid Build Coastguard Worker	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6537*a67afe4dSAndroid Build Coastguard Worker	  then
6538*a67afe4dSAndroid Build Coastguard Worker	    # We have reworked collect2
6539*a67afe4dSAndroid Build Coastguard Worker	    :
6540*a67afe4dSAndroid Build Coastguard Worker	  else
6541*a67afe4dSAndroid Build Coastguard Worker	    # We have old collect2
6542*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6543*a67afe4dSAndroid Build Coastguard Worker	    # It fails to find uninstalled libraries when the uninstalled
6544*a67afe4dSAndroid Build Coastguard Worker	    # path is not listed in the libpath.  Setting hardcode_minus_L
6545*a67afe4dSAndroid Build Coastguard Worker	    # to unsupported forces relinking
6546*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6547*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6548*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6549*a67afe4dSAndroid Build Coastguard Worker	  fi
6550*a67afe4dSAndroid Build Coastguard Worker          esac
6551*a67afe4dSAndroid Build Coastguard Worker          shared_flag='-shared'
6552*a67afe4dSAndroid Build Coastguard Worker	  if test yes = "$aix_use_runtimelinking"; then
6553*a67afe4dSAndroid Build Coastguard Worker	    shared_flag=$shared_flag' $wl-G'
6554*a67afe4dSAndroid Build Coastguard Worker	  fi
6555*a67afe4dSAndroid Build Coastguard Worker	  # Need to ensure runtime linking is disabled for the traditional
6556*a67afe4dSAndroid Build Coastguard Worker	  # shared library, or the linker may eventually find shared libraries
6557*a67afe4dSAndroid Build Coastguard Worker	  # /with/ Import File - we do not want to mix them.
6558*a67afe4dSAndroid Build Coastguard Worker	  shared_flag_aix='-shared'
6559*a67afe4dSAndroid Build Coastguard Worker	  shared_flag_svr4='-shared $wl-G'
6560*a67afe4dSAndroid Build Coastguard Worker        else
6561*a67afe4dSAndroid Build Coastguard Worker          # not using gcc
6562*a67afe4dSAndroid Build Coastguard Worker          if test ia64 = "$host_cpu"; then
6563*a67afe4dSAndroid Build Coastguard Worker	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6564*a67afe4dSAndroid Build Coastguard Worker	  # chokes on -Wl,-G. The following line is correct:
6565*a67afe4dSAndroid Build Coastguard Worker	  shared_flag='-G'
6566*a67afe4dSAndroid Build Coastguard Worker          else
6567*a67afe4dSAndroid Build Coastguard Worker	    if test yes = "$aix_use_runtimelinking"; then
6568*a67afe4dSAndroid Build Coastguard Worker	      shared_flag='$wl-G'
6569*a67afe4dSAndroid Build Coastguard Worker	    else
6570*a67afe4dSAndroid Build Coastguard Worker	      shared_flag='$wl-bM:SRE'
6571*a67afe4dSAndroid Build Coastguard Worker	    fi
6572*a67afe4dSAndroid Build Coastguard Worker	    shared_flag_aix='$wl-bM:SRE'
6573*a67afe4dSAndroid Build Coastguard Worker	    shared_flag_svr4='$wl-G'
6574*a67afe4dSAndroid Build Coastguard Worker          fi
6575*a67afe4dSAndroid Build Coastguard Worker        fi
6576*a67afe4dSAndroid Build Coastguard Worker
6577*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6578*a67afe4dSAndroid Build Coastguard Worker        # It seems that -bexpall does not export symbols beginning with
6579*a67afe4dSAndroid Build Coastguard Worker        # underscore (_), so it is better to generate a list of symbols to
6580*a67afe4dSAndroid Build Coastguard Worker	# export.
6581*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(always_export_symbols, $1)=yes
6582*a67afe4dSAndroid Build Coastguard Worker	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6583*a67afe4dSAndroid Build Coastguard Worker          # Warning - without using the other runtime loading flags (-brtl),
6584*a67afe4dSAndroid Build Coastguard Worker          # -berok will link without error, but may produce a broken library.
6585*a67afe4dSAndroid Build Coastguard Worker          # The "-G" linker flag allows undefined symbols.
6586*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6587*a67afe4dSAndroid Build Coastguard Worker          # Determine the default libpath from the value encoded in an empty
6588*a67afe4dSAndroid Build Coastguard Worker          # executable.
6589*a67afe4dSAndroid Build Coastguard Worker          _LT_SYS_MODULE_PATH_AIX([$1])
6590*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6591*a67afe4dSAndroid Build Coastguard Worker
6592*a67afe4dSAndroid Build Coastguard Worker          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6593*a67afe4dSAndroid Build Coastguard Worker        else
6594*a67afe4dSAndroid Build Coastguard Worker          if test ia64 = "$host_cpu"; then
6595*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6596*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6597*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
6598*a67afe4dSAndroid Build Coastguard Worker          else
6599*a67afe4dSAndroid Build Coastguard Worker	    # Determine the default libpath from the value encoded in an
6600*a67afe4dSAndroid Build Coastguard Worker	    # empty executable.
6601*a67afe4dSAndroid Build Coastguard Worker	    _LT_SYS_MODULE_PATH_AIX([$1])
6602*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6603*a67afe4dSAndroid Build Coastguard Worker	    # Warning - without using the other run time loading flags,
6604*a67afe4dSAndroid Build Coastguard Worker	    # -berok will link without error, but may produce a broken library.
6605*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6606*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6607*a67afe4dSAndroid Build Coastguard Worker	    if test yes = "$with_gnu_ld"; then
6608*a67afe4dSAndroid Build Coastguard Worker	      # We only use this code for GNU lds that support --whole-archive.
6609*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6610*a67afe4dSAndroid Build Coastguard Worker	    else
6611*a67afe4dSAndroid Build Coastguard Worker	      # Exported symbols can be pulled into shared objects from archives
6612*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6613*a67afe4dSAndroid Build Coastguard Worker	    fi
6614*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6615*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6616*a67afe4dSAndroid Build Coastguard Worker	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6617*a67afe4dSAndroid Build Coastguard Worker	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6618*a67afe4dSAndroid Build Coastguard Worker	    if test svr4 != "$with_aix_soname"; then
6619*a67afe4dSAndroid Build Coastguard Worker	      # This is similar to how AIX traditionally builds its shared
6620*a67afe4dSAndroid Build Coastguard Worker	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6621*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6622*a67afe4dSAndroid Build Coastguard Worker	    fi
6623*a67afe4dSAndroid Build Coastguard Worker	    if test aix != "$with_aix_soname"; then
6624*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6625*a67afe4dSAndroid Build Coastguard Worker	    else
6626*a67afe4dSAndroid Build Coastguard Worker	      # used by -dlpreopen to get the symbols
6627*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6628*a67afe4dSAndroid Build Coastguard Worker	    fi
6629*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6630*a67afe4dSAndroid Build Coastguard Worker          fi
6631*a67afe4dSAndroid Build Coastguard Worker        fi
6632*a67afe4dSAndroid Build Coastguard Worker        ;;
6633*a67afe4dSAndroid Build Coastguard Worker
6634*a67afe4dSAndroid Build Coastguard Worker      beos*)
6635*a67afe4dSAndroid Build Coastguard Worker	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6636*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6637*a67afe4dSAndroid Build Coastguard Worker	  # Joseph Beckenbach <[email protected]> says some releases of gcc
6638*a67afe4dSAndroid Build Coastguard Worker	  # support --undefined.  This deserves some investigation.  FIXME
6639*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6640*a67afe4dSAndroid Build Coastguard Worker	else
6641*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6642*a67afe4dSAndroid Build Coastguard Worker	fi
6643*a67afe4dSAndroid Build Coastguard Worker	;;
6644*a67afe4dSAndroid Build Coastguard Worker
6645*a67afe4dSAndroid Build Coastguard Worker      chorus*)
6646*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
6647*a67afe4dSAndroid Build Coastguard Worker          *)
6648*a67afe4dSAndroid Build Coastguard Worker	  # FIXME: insert proper C++ library support
6649*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6650*a67afe4dSAndroid Build Coastguard Worker	  ;;
6651*a67afe4dSAndroid Build Coastguard Worker        esac
6652*a67afe4dSAndroid Build Coastguard Worker        ;;
6653*a67afe4dSAndroid Build Coastguard Worker
6654*a67afe4dSAndroid Build Coastguard Worker      cygwin* | mingw* | pw32* | cegcc*)
6655*a67afe4dSAndroid Build Coastguard Worker	case $GXX,$cc_basename in
6656*a67afe4dSAndroid Build Coastguard Worker	,cl* | no,cl* | ,icl* | no,icl*)
6657*a67afe4dSAndroid Build Coastguard Worker	  # Native MSVC or ICC
6658*a67afe4dSAndroid Build Coastguard Worker	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6659*a67afe4dSAndroid Build Coastguard Worker	  # no search path for DLLs.
6660*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6661*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6662*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(always_export_symbols, $1)=yes
6663*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(file_list_spec, $1)='@'
6664*a67afe4dSAndroid Build Coastguard Worker	  # Tell ltmain to make .lib files, not .a files.
6665*a67afe4dSAndroid Build Coastguard Worker	  libext=lib
6666*a67afe4dSAndroid Build Coastguard Worker	  # Tell ltmain to make .dll files, not .so files.
6667*a67afe4dSAndroid Build Coastguard Worker	  shrext_cmds=.dll
6668*a67afe4dSAndroid Build Coastguard Worker	  # FIXME: Setting linknames here is a bad hack.
6669*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6670*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6671*a67afe4dSAndroid Build Coastguard Worker              cp "$export_symbols" "$output_objdir/$soname.def";
6672*a67afe4dSAndroid Build Coastguard Worker              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6673*a67afe4dSAndroid Build Coastguard Worker            else
6674*a67afe4dSAndroid Build Coastguard Worker              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6675*a67afe4dSAndroid Build Coastguard Worker            fi~
6676*a67afe4dSAndroid Build Coastguard Worker            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6677*a67afe4dSAndroid Build Coastguard Worker            linknames='
6678*a67afe4dSAndroid Build Coastguard Worker	  # The linker will not automatically build a static lib if we build a DLL.
6679*a67afe4dSAndroid Build Coastguard Worker	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6680*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6681*a67afe4dSAndroid Build Coastguard Worker	  # Don't use ranlib
6682*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6683*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6684*a67afe4dSAndroid Build Coastguard Worker            lt_tool_outputfile="@TOOL_OUTPUT@"~
6685*a67afe4dSAndroid Build Coastguard Worker            case $lt_outputfile in
6686*a67afe4dSAndroid Build Coastguard Worker              *.exe|*.EXE) ;;
6687*a67afe4dSAndroid Build Coastguard Worker              *)
6688*a67afe4dSAndroid Build Coastguard Worker                lt_outputfile=$lt_outputfile.exe
6689*a67afe4dSAndroid Build Coastguard Worker                lt_tool_outputfile=$lt_tool_outputfile.exe
6690*a67afe4dSAndroid Build Coastguard Worker                ;;
6691*a67afe4dSAndroid Build Coastguard Worker            esac~
6692*a67afe4dSAndroid Build Coastguard Worker            func_to_tool_file "$lt_outputfile"~
6693*a67afe4dSAndroid Build Coastguard Worker            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6694*a67afe4dSAndroid Build Coastguard Worker              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6695*a67afe4dSAndroid Build Coastguard Worker              $RM "$lt_outputfile.manifest";
6696*a67afe4dSAndroid Build Coastguard Worker            fi'
6697*a67afe4dSAndroid Build Coastguard Worker	  ;;
6698*a67afe4dSAndroid Build Coastguard Worker	*)
6699*a67afe4dSAndroid Build Coastguard Worker	  # g++
6700*a67afe4dSAndroid Build Coastguard Worker	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6701*a67afe4dSAndroid Build Coastguard Worker	  # as there is no search path for DLLs.
6702*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6703*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6704*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6705*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(always_export_symbols, $1)=no
6706*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6707*a67afe4dSAndroid Build Coastguard Worker
6708*a67afe4dSAndroid Build Coastguard Worker	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6709*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6710*a67afe4dSAndroid Build Coastguard Worker	    # If the export-symbols file already is a .def file, use it as
6711*a67afe4dSAndroid Build Coastguard Worker	    # is; otherwise, prepend EXPORTS...
6712*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6713*a67afe4dSAndroid Build Coastguard Worker              cp $export_symbols $output_objdir/$soname.def;
6714*a67afe4dSAndroid Build Coastguard Worker            else
6715*a67afe4dSAndroid Build Coastguard Worker              echo EXPORTS > $output_objdir/$soname.def;
6716*a67afe4dSAndroid Build Coastguard Worker              cat $export_symbols >> $output_objdir/$soname.def;
6717*a67afe4dSAndroid Build Coastguard Worker            fi~
6718*a67afe4dSAndroid Build Coastguard Worker            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6719*a67afe4dSAndroid Build Coastguard Worker	  else
6720*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6721*a67afe4dSAndroid Build Coastguard Worker	  fi
6722*a67afe4dSAndroid Build Coastguard Worker	  ;;
6723*a67afe4dSAndroid Build Coastguard Worker	esac
6724*a67afe4dSAndroid Build Coastguard Worker	;;
6725*a67afe4dSAndroid Build Coastguard Worker      darwin* | rhapsody*)
6726*a67afe4dSAndroid Build Coastguard Worker        _LT_DARWIN_LINKER_FEATURES($1)
6727*a67afe4dSAndroid Build Coastguard Worker	;;
6728*a67afe4dSAndroid Build Coastguard Worker
6729*a67afe4dSAndroid Build Coastguard Worker      os2*)
6730*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6731*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6732*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6733*a67afe4dSAndroid Build Coastguard Worker	shrext_cmds=.dll
6734*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6735*a67afe4dSAndroid Build Coastguard Worker	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6736*a67afe4dSAndroid Build Coastguard Worker	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6737*a67afe4dSAndroid Build Coastguard Worker	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6738*a67afe4dSAndroid Build Coastguard Worker	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6739*a67afe4dSAndroid Build Coastguard Worker	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6740*a67afe4dSAndroid Build Coastguard Worker	  emximp -o $lib $output_objdir/$libname.def'
6741*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6742*a67afe4dSAndroid Build Coastguard Worker	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6743*a67afe4dSAndroid Build Coastguard Worker	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6744*a67afe4dSAndroid Build Coastguard Worker	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6745*a67afe4dSAndroid Build Coastguard Worker	  prefix_cmds="$SED"~
6746*a67afe4dSAndroid Build Coastguard Worker	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6747*a67afe4dSAndroid Build Coastguard Worker	    prefix_cmds="$prefix_cmds -e 1d";
6748*a67afe4dSAndroid Build Coastguard Worker	  fi~
6749*a67afe4dSAndroid Build Coastguard Worker	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6750*a67afe4dSAndroid Build Coastguard Worker	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6751*a67afe4dSAndroid Build Coastguard Worker	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6752*a67afe4dSAndroid Build Coastguard Worker	  emximp -o $lib $output_objdir/$libname.def'
6753*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6754*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6755*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(file_list_spec, $1)='@'
6756*a67afe4dSAndroid Build Coastguard Worker	;;
6757*a67afe4dSAndroid Build Coastguard Worker
6758*a67afe4dSAndroid Build Coastguard Worker      dgux*)
6759*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
6760*a67afe4dSAndroid Build Coastguard Worker          ec++*)
6761*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6762*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6763*a67afe4dSAndroid Build Coastguard Worker	    ;;
6764*a67afe4dSAndroid Build Coastguard Worker          ghcx*)
6765*a67afe4dSAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
6766*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6767*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6768*a67afe4dSAndroid Build Coastguard Worker	    ;;
6769*a67afe4dSAndroid Build Coastguard Worker          *)
6770*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6771*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6772*a67afe4dSAndroid Build Coastguard Worker	    ;;
6773*a67afe4dSAndroid Build Coastguard Worker        esac
6774*a67afe4dSAndroid Build Coastguard Worker        ;;
6775*a67afe4dSAndroid Build Coastguard Worker
6776*a67afe4dSAndroid Build Coastguard Worker      freebsd2.*)
6777*a67afe4dSAndroid Build Coastguard Worker        # C++ shared libraries reported to be fairly broken before
6778*a67afe4dSAndroid Build Coastguard Worker	# switch to ELF
6779*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6780*a67afe4dSAndroid Build Coastguard Worker        ;;
6781*a67afe4dSAndroid Build Coastguard Worker
6782*a67afe4dSAndroid Build Coastguard Worker      freebsd-elf*)
6783*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6784*a67afe4dSAndroid Build Coastguard Worker        ;;
6785*a67afe4dSAndroid Build Coastguard Worker
6786*a67afe4dSAndroid Build Coastguard Worker      freebsd* | dragonfly* | midnightbsd*)
6787*a67afe4dSAndroid Build Coastguard Worker        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6788*a67afe4dSAndroid Build Coastguard Worker        # conventions
6789*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=yes
6790*a67afe4dSAndroid Build Coastguard Worker        ;;
6791*a67afe4dSAndroid Build Coastguard Worker
6792*a67afe4dSAndroid Build Coastguard Worker      haiku*)
6793*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6794*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(link_all_deplibs, $1)=yes
6795*a67afe4dSAndroid Build Coastguard Worker        ;;
6796*a67afe4dSAndroid Build Coastguard Worker
6797*a67afe4dSAndroid Build Coastguard Worker      hpux9*)
6798*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6799*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6800*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6801*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct, $1)=yes
6802*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6803*a67afe4dSAndroid Build Coastguard Worker				             # but as the default
6804*a67afe4dSAndroid Build Coastguard Worker				             # location of the library.
6805*a67afe4dSAndroid Build Coastguard Worker
6806*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
6807*a67afe4dSAndroid Build Coastguard Worker          CC*)
6808*a67afe4dSAndroid Build Coastguard Worker            # FIXME: insert proper C++ library support
6809*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(ld_shlibs, $1)=no
6810*a67afe4dSAndroid Build Coastguard Worker            ;;
6811*a67afe4dSAndroid Build Coastguard Worker          aCC*)
6812*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6813*a67afe4dSAndroid Build Coastguard Worker            # Commands to make compiler produce verbose output that lists
6814*a67afe4dSAndroid Build Coastguard Worker            # what "hidden" libraries, object files and flags are used when
6815*a67afe4dSAndroid Build Coastguard Worker            # linking a shared library.
6816*a67afe4dSAndroid Build Coastguard Worker            #
6817*a67afe4dSAndroid Build Coastguard Worker            # There doesn't appear to be a way to prevent this compiler from
6818*a67afe4dSAndroid Build Coastguard Worker            # explicitly linking system object files so we need to strip them
6819*a67afe4dSAndroid Build Coastguard Worker            # from the output so that they don't get included in the library
6820*a67afe4dSAndroid Build Coastguard Worker            # dependencies.
6821*a67afe4dSAndroid Build Coastguard Worker            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6822*a67afe4dSAndroid Build Coastguard Worker            ;;
6823*a67afe4dSAndroid Build Coastguard Worker          *)
6824*a67afe4dSAndroid Build Coastguard Worker            if test yes = "$GXX"; then
6825*a67afe4dSAndroid Build Coastguard Worker              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6826*a67afe4dSAndroid Build Coastguard Worker            else
6827*a67afe4dSAndroid Build Coastguard Worker              # FIXME: insert proper C++ library support
6828*a67afe4dSAndroid Build Coastguard Worker              _LT_TAGVAR(ld_shlibs, $1)=no
6829*a67afe4dSAndroid Build Coastguard Worker            fi
6830*a67afe4dSAndroid Build Coastguard Worker            ;;
6831*a67afe4dSAndroid Build Coastguard Worker        esac
6832*a67afe4dSAndroid Build Coastguard Worker        ;;
6833*a67afe4dSAndroid Build Coastguard Worker
6834*a67afe4dSAndroid Build Coastguard Worker      hpux10*|hpux11*)
6835*a67afe4dSAndroid Build Coastguard Worker        if test no = "$with_gnu_ld"; then
6836*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6837*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6838*a67afe4dSAndroid Build Coastguard Worker
6839*a67afe4dSAndroid Build Coastguard Worker          case $host_cpu in
6840*a67afe4dSAndroid Build Coastguard Worker            hppa*64*|ia64*)
6841*a67afe4dSAndroid Build Coastguard Worker              ;;
6842*a67afe4dSAndroid Build Coastguard Worker            *)
6843*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6844*a67afe4dSAndroid Build Coastguard Worker              ;;
6845*a67afe4dSAndroid Build Coastguard Worker          esac
6846*a67afe4dSAndroid Build Coastguard Worker        fi
6847*a67afe4dSAndroid Build Coastguard Worker        case $host_cpu in
6848*a67afe4dSAndroid Build Coastguard Worker          hppa*64*|ia64*)
6849*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct, $1)=no
6850*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6851*a67afe4dSAndroid Build Coastguard Worker            ;;
6852*a67afe4dSAndroid Build Coastguard Worker          *)
6853*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct, $1)=yes
6854*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6855*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6856*a67afe4dSAndroid Build Coastguard Worker					         # but as the default
6857*a67afe4dSAndroid Build Coastguard Worker					         # location of the library.
6858*a67afe4dSAndroid Build Coastguard Worker            ;;
6859*a67afe4dSAndroid Build Coastguard Worker        esac
6860*a67afe4dSAndroid Build Coastguard Worker
6861*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
6862*a67afe4dSAndroid Build Coastguard Worker          CC*)
6863*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6864*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6865*a67afe4dSAndroid Build Coastguard Worker	    ;;
6866*a67afe4dSAndroid Build Coastguard Worker          aCC*)
6867*a67afe4dSAndroid Build Coastguard Worker	    case $host_cpu in
6868*a67afe4dSAndroid Build Coastguard Worker	      hppa*64*)
6869*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6870*a67afe4dSAndroid Build Coastguard Worker	        ;;
6871*a67afe4dSAndroid Build Coastguard Worker	      ia64*)
6872*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6873*a67afe4dSAndroid Build Coastguard Worker	        ;;
6874*a67afe4dSAndroid Build Coastguard Worker	      *)
6875*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6876*a67afe4dSAndroid Build Coastguard Worker	        ;;
6877*a67afe4dSAndroid Build Coastguard Worker	    esac
6878*a67afe4dSAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6879*a67afe4dSAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6880*a67afe4dSAndroid Build Coastguard Worker	    # linking a shared library.
6881*a67afe4dSAndroid Build Coastguard Worker	    #
6882*a67afe4dSAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6883*a67afe4dSAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6884*a67afe4dSAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6885*a67afe4dSAndroid Build Coastguard Worker	    # dependencies.
6886*a67afe4dSAndroid Build Coastguard Worker	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6887*a67afe4dSAndroid Build Coastguard Worker	    ;;
6888*a67afe4dSAndroid Build Coastguard Worker          *)
6889*a67afe4dSAndroid Build Coastguard Worker	    if test yes = "$GXX"; then
6890*a67afe4dSAndroid Build Coastguard Worker	      if test no = "$with_gnu_ld"; then
6891*a67afe4dSAndroid Build Coastguard Worker	        case $host_cpu in
6892*a67afe4dSAndroid Build Coastguard Worker	          hppa*64*)
6893*a67afe4dSAndroid Build Coastguard Worker	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6894*a67afe4dSAndroid Build Coastguard Worker	            ;;
6895*a67afe4dSAndroid Build Coastguard Worker	          ia64*)
6896*a67afe4dSAndroid Build Coastguard Worker	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6897*a67afe4dSAndroid Build Coastguard Worker	            ;;
6898*a67afe4dSAndroid Build Coastguard Worker	          *)
6899*a67afe4dSAndroid Build Coastguard Worker	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6900*a67afe4dSAndroid Build Coastguard Worker	            ;;
6901*a67afe4dSAndroid Build Coastguard Worker	        esac
6902*a67afe4dSAndroid Build Coastguard Worker	      fi
6903*a67afe4dSAndroid Build Coastguard Worker	    else
6904*a67afe4dSAndroid Build Coastguard Worker	      # FIXME: insert proper C++ library support
6905*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(ld_shlibs, $1)=no
6906*a67afe4dSAndroid Build Coastguard Worker	    fi
6907*a67afe4dSAndroid Build Coastguard Worker	    ;;
6908*a67afe4dSAndroid Build Coastguard Worker        esac
6909*a67afe4dSAndroid Build Coastguard Worker        ;;
6910*a67afe4dSAndroid Build Coastguard Worker
6911*a67afe4dSAndroid Build Coastguard Worker      interix[[3-9]]*)
6912*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=no
6913*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6914*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6915*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6916*a67afe4dSAndroid Build Coastguard Worker	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6917*a67afe4dSAndroid Build Coastguard Worker	# Instead, shared libraries are loaded at an image base (0x10000000 by
6918*a67afe4dSAndroid Build Coastguard Worker	# default) and relocated if they conflict, which is a slow very memory
6919*a67afe4dSAndroid Build Coastguard Worker	# consuming and fragmenting process.  To avoid this, we pick a random,
6920*a67afe4dSAndroid Build Coastguard Worker	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6921*a67afe4dSAndroid Build Coastguard Worker	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6922*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6923*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6924*a67afe4dSAndroid Build Coastguard Worker	;;
6925*a67afe4dSAndroid Build Coastguard Worker      irix5* | irix6*)
6926*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
6927*a67afe4dSAndroid Build Coastguard Worker          CC*)
6928*a67afe4dSAndroid Build Coastguard Worker	    # SGI C++
6929*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
6930*a67afe4dSAndroid Build Coastguard Worker
6931*a67afe4dSAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6932*a67afe4dSAndroid Build Coastguard Worker	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6933*a67afe4dSAndroid Build Coastguard Worker	    # necessary to make sure instantiated templates are included
6934*a67afe4dSAndroid Build Coastguard Worker	    # in the archive.
6935*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6936*a67afe4dSAndroid Build Coastguard Worker	    ;;
6937*a67afe4dSAndroid Build Coastguard Worker          *)
6938*a67afe4dSAndroid Build Coastguard Worker	    if test yes = "$GXX"; then
6939*a67afe4dSAndroid Build Coastguard Worker	      if test no = "$with_gnu_ld"; then
6940*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
6941*a67afe4dSAndroid Build Coastguard Worker	      else
6942*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
6943*a67afe4dSAndroid Build Coastguard Worker	      fi
6944*a67afe4dSAndroid Build Coastguard Worker	    fi
6945*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6946*a67afe4dSAndroid Build Coastguard Worker	    ;;
6947*a67afe4dSAndroid Build Coastguard Worker        esac
6948*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6949*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6950*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(inherit_rpath, $1)=yes
6951*a67afe4dSAndroid Build Coastguard Worker        ;;
6952*a67afe4dSAndroid Build Coastguard Worker
6953*a67afe4dSAndroid Build Coastguard Worker      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6954*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
6955*a67afe4dSAndroid Build Coastguard Worker          KCC*)
6956*a67afe4dSAndroid Build Coastguard Worker	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6957*a67afe4dSAndroid Build Coastguard Worker
6958*a67afe4dSAndroid Build Coastguard Worker	    # KCC will only create a shared library if the output file
6959*a67afe4dSAndroid Build Coastguard Worker	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6960*a67afe4dSAndroid Build Coastguard Worker	    # to its proper name (with version) after linking.
6961*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6962*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
6963*a67afe4dSAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6964*a67afe4dSAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6965*a67afe4dSAndroid Build Coastguard Worker	    # linking a shared library.
6966*a67afe4dSAndroid Build Coastguard Worker	    #
6967*a67afe4dSAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6968*a67afe4dSAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6969*a67afe4dSAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6970*a67afe4dSAndroid Build Coastguard Worker	    # dependencies.
6971*a67afe4dSAndroid Build Coastguard Worker	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6972*a67afe4dSAndroid Build Coastguard Worker
6973*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6974*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6975*a67afe4dSAndroid Build Coastguard Worker
6976*a67afe4dSAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6977*a67afe4dSAndroid Build Coastguard Worker	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6978*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6979*a67afe4dSAndroid Build Coastguard Worker	    ;;
6980*a67afe4dSAndroid Build Coastguard Worker	  icpc* | ecpc* )
6981*a67afe4dSAndroid Build Coastguard Worker	    # Intel C++
6982*a67afe4dSAndroid Build Coastguard Worker	    with_gnu_ld=yes
6983*a67afe4dSAndroid Build Coastguard Worker	    # version 8.0 and above of icpc choke on multiply defined symbols
6984*a67afe4dSAndroid Build Coastguard Worker	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6985*a67afe4dSAndroid Build Coastguard Worker	    # earlier do not add the objects themselves.
6986*a67afe4dSAndroid Build Coastguard Worker	    case `$CC -V 2>&1` in
6987*a67afe4dSAndroid Build Coastguard Worker	      *"Version 7."*)
6988*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6989*a67afe4dSAndroid Build Coastguard Worker		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6990*a67afe4dSAndroid Build Coastguard Worker		;;
6991*a67afe4dSAndroid Build Coastguard Worker	      *)  # Version 8.0 or newer
6992*a67afe4dSAndroid Build Coastguard Worker	        tmp_idyn=
6993*a67afe4dSAndroid Build Coastguard Worker	        case $host_cpu in
6994*a67afe4dSAndroid Build Coastguard Worker		  ia64*) tmp_idyn=' -i_dynamic';;
6995*a67afe4dSAndroid Build Coastguard Worker		esac
6996*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6997*a67afe4dSAndroid Build Coastguard Worker		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6998*a67afe4dSAndroid Build Coastguard Worker		;;
6999*a67afe4dSAndroid Build Coastguard Worker	    esac
7000*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7001*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7002*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7003*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7004*a67afe4dSAndroid Build Coastguard Worker	    ;;
7005*a67afe4dSAndroid Build Coastguard Worker          pgCC* | pgcpp*)
7006*a67afe4dSAndroid Build Coastguard Worker            # Portland Group C++ compiler
7007*a67afe4dSAndroid Build Coastguard Worker	    case `$CC -V` in
7008*a67afe4dSAndroid Build Coastguard Worker	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7009*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7010*a67afe4dSAndroid Build Coastguard Worker               rm -rf $tpldir~
7011*a67afe4dSAndroid Build Coastguard Worker               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7012*a67afe4dSAndroid Build Coastguard Worker               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7013*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7014*a67afe4dSAndroid Build Coastguard Worker                rm -rf $tpldir~
7015*a67afe4dSAndroid Build Coastguard Worker                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7016*a67afe4dSAndroid Build Coastguard Worker                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7017*a67afe4dSAndroid Build Coastguard Worker                $RANLIB $oldlib'
7018*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7019*a67afe4dSAndroid Build Coastguard Worker                rm -rf $tpldir~
7020*a67afe4dSAndroid Build Coastguard Worker                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7021*a67afe4dSAndroid Build Coastguard Worker                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7022*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7023*a67afe4dSAndroid Build Coastguard Worker                rm -rf $tpldir~
7024*a67afe4dSAndroid Build Coastguard Worker                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7025*a67afe4dSAndroid Build Coastguard Worker                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7026*a67afe4dSAndroid Build Coastguard Worker	      ;;
7027*a67afe4dSAndroid Build Coastguard Worker	    *) # Version 6 and above use weak symbols
7028*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7029*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7030*a67afe4dSAndroid Build Coastguard Worker	      ;;
7031*a67afe4dSAndroid Build Coastguard Worker	    esac
7032*a67afe4dSAndroid Build Coastguard Worker
7033*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7034*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7035*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7036*a67afe4dSAndroid Build Coastguard Worker            ;;
7037*a67afe4dSAndroid Build Coastguard Worker	  cxx*)
7038*a67afe4dSAndroid Build Coastguard Worker	    # Compaq C++
7039*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7040*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
7041*a67afe4dSAndroid Build Coastguard Worker
7042*a67afe4dSAndroid Build Coastguard Worker	    runpath_var=LD_RUN_PATH
7043*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7044*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7045*a67afe4dSAndroid Build Coastguard Worker
7046*a67afe4dSAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
7047*a67afe4dSAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
7048*a67afe4dSAndroid Build Coastguard Worker	    # linking a shared library.
7049*a67afe4dSAndroid Build Coastguard Worker	    #
7050*a67afe4dSAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
7051*a67afe4dSAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
7052*a67afe4dSAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
7053*a67afe4dSAndroid Build Coastguard Worker	    # dependencies.
7054*a67afe4dSAndroid Build Coastguard Worker	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7055*a67afe4dSAndroid Build Coastguard Worker	    ;;
7056*a67afe4dSAndroid Build Coastguard Worker	  xl* | mpixl* | bgxl*)
7057*a67afe4dSAndroid Build Coastguard Worker	    # IBM XL 8.0 on PPC, with GNU ld
7058*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7059*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7060*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7061*a67afe4dSAndroid Build Coastguard Worker	    if test yes = "$supports_anon_versioning"; then
7062*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7063*a67afe4dSAndroid Build Coastguard Worker                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7064*a67afe4dSAndroid Build Coastguard Worker                echo "local: *; };" >> $output_objdir/$libname.ver~
7065*a67afe4dSAndroid Build Coastguard Worker                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7066*a67afe4dSAndroid Build Coastguard Worker	    fi
7067*a67afe4dSAndroid Build Coastguard Worker	    ;;
7068*a67afe4dSAndroid Build Coastguard Worker	  *)
7069*a67afe4dSAndroid Build Coastguard Worker	    case `$CC -V 2>&1 | $SED 5q` in
7070*a67afe4dSAndroid Build Coastguard Worker	    *Sun\ C*)
7071*a67afe4dSAndroid Build Coastguard Worker	      # Sun C++ 5.9
7072*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7073*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7074*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
7075*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7076*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7077*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7078*a67afe4dSAndroid Build Coastguard Worker
7079*a67afe4dSAndroid Build Coastguard Worker	      # Not sure whether something based on
7080*a67afe4dSAndroid Build Coastguard Worker	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7081*a67afe4dSAndroid Build Coastguard Worker	      # would be better.
7082*a67afe4dSAndroid Build Coastguard Worker	      output_verbose_link_cmd='func_echo_all'
7083*a67afe4dSAndroid Build Coastguard Worker
7084*a67afe4dSAndroid Build Coastguard Worker	      # Archives containing C++ object files must be created using
7085*a67afe4dSAndroid Build Coastguard Worker	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7086*a67afe4dSAndroid Build Coastguard Worker	      # necessary to make sure instantiated templates are included
7087*a67afe4dSAndroid Build Coastguard Worker	      # in the archive.
7088*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7089*a67afe4dSAndroid Build Coastguard Worker	      ;;
7090*a67afe4dSAndroid Build Coastguard Worker	    esac
7091*a67afe4dSAndroid Build Coastguard Worker	    ;;
7092*a67afe4dSAndroid Build Coastguard Worker	esac
7093*a67afe4dSAndroid Build Coastguard Worker	;;
7094*a67afe4dSAndroid Build Coastguard Worker
7095*a67afe4dSAndroid Build Coastguard Worker      lynxos*)
7096*a67afe4dSAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7097*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
7098*a67afe4dSAndroid Build Coastguard Worker	;;
7099*a67afe4dSAndroid Build Coastguard Worker
7100*a67afe4dSAndroid Build Coastguard Worker      m88k*)
7101*a67afe4dSAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7102*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7103*a67afe4dSAndroid Build Coastguard Worker	;;
7104*a67afe4dSAndroid Build Coastguard Worker
7105*a67afe4dSAndroid Build Coastguard Worker      mvs*)
7106*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
7107*a67afe4dSAndroid Build Coastguard Worker          cxx*)
7108*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7109*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7110*a67afe4dSAndroid Build Coastguard Worker	    ;;
7111*a67afe4dSAndroid Build Coastguard Worker	  *)
7112*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7113*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7114*a67afe4dSAndroid Build Coastguard Worker	    ;;
7115*a67afe4dSAndroid Build Coastguard Worker	esac
7116*a67afe4dSAndroid Build Coastguard Worker	;;
7117*a67afe4dSAndroid Build Coastguard Worker
7118*a67afe4dSAndroid Build Coastguard Worker      netbsd*)
7119*a67afe4dSAndroid Build Coastguard Worker        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7120*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7121*a67afe4dSAndroid Build Coastguard Worker	  wlarc=
7122*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7123*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
7124*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7125*a67afe4dSAndroid Build Coastguard Worker	fi
7126*a67afe4dSAndroid Build Coastguard Worker	# Workaround some broken pre-1.5 toolchains
7127*a67afe4dSAndroid Build Coastguard Worker	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7128*a67afe4dSAndroid Build Coastguard Worker	;;
7129*a67afe4dSAndroid Build Coastguard Worker
7130*a67afe4dSAndroid Build Coastguard Worker      *nto* | *qnx*)
7131*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=yes
7132*a67afe4dSAndroid Build Coastguard Worker	;;
7133*a67afe4dSAndroid Build Coastguard Worker
7134*a67afe4dSAndroid Build Coastguard Worker      openbsd* | bitrig*)
7135*a67afe4dSAndroid Build Coastguard Worker	if test -f /usr/libexec/ld.so; then
7136*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
7137*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7138*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7139*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7140*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7141*a67afe4dSAndroid Build Coastguard Worker	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7142*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
7143*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7144*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7145*a67afe4dSAndroid Build Coastguard Worker	  fi
7146*a67afe4dSAndroid Build Coastguard Worker	  output_verbose_link_cmd=func_echo_all
7147*a67afe4dSAndroid Build Coastguard Worker	else
7148*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
7149*a67afe4dSAndroid Build Coastguard Worker	fi
7150*a67afe4dSAndroid Build Coastguard Worker	;;
7151*a67afe4dSAndroid Build Coastguard Worker
7152*a67afe4dSAndroid Build Coastguard Worker      osf3* | osf4* | osf5*)
7153*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
7154*a67afe4dSAndroid Build Coastguard Worker          KCC*)
7155*a67afe4dSAndroid Build Coastguard Worker	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7156*a67afe4dSAndroid Build Coastguard Worker
7157*a67afe4dSAndroid Build Coastguard Worker	    # KCC will only create a shared library if the output file
7158*a67afe4dSAndroid Build Coastguard Worker	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7159*a67afe4dSAndroid Build Coastguard Worker	    # to its proper name (with version) after linking.
7160*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7161*a67afe4dSAndroid Build Coastguard Worker
7162*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7163*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7164*a67afe4dSAndroid Build Coastguard Worker
7165*a67afe4dSAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
7166*a67afe4dSAndroid Build Coastguard Worker	    # the KAI C++ compiler.
7167*a67afe4dSAndroid Build Coastguard Worker	    case $host in
7168*a67afe4dSAndroid Build Coastguard Worker	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7169*a67afe4dSAndroid Build Coastguard Worker	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7170*a67afe4dSAndroid Build Coastguard Worker	    esac
7171*a67afe4dSAndroid Build Coastguard Worker	    ;;
7172*a67afe4dSAndroid Build Coastguard Worker          RCC*)
7173*a67afe4dSAndroid Build Coastguard Worker	    # Rational C++ 2.4.1
7174*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7175*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7176*a67afe4dSAndroid Build Coastguard Worker	    ;;
7177*a67afe4dSAndroid Build Coastguard Worker          cxx*)
7178*a67afe4dSAndroid Build Coastguard Worker	    case $host in
7179*a67afe4dSAndroid Build Coastguard Worker	      osf3*)
7180*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7181*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7182*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7183*a67afe4dSAndroid Build Coastguard Worker		;;
7184*a67afe4dSAndroid Build Coastguard Worker	      *)
7185*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7186*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7187*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7188*a67afe4dSAndroid Build Coastguard Worker                  echo "-hidden">> $lib.exp~
7189*a67afe4dSAndroid Build Coastguard Worker                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7190*a67afe4dSAndroid Build Coastguard Worker                  $RM $lib.exp'
7191*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7192*a67afe4dSAndroid Build Coastguard Worker		;;
7193*a67afe4dSAndroid Build Coastguard Worker	    esac
7194*a67afe4dSAndroid Build Coastguard Worker
7195*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7196*a67afe4dSAndroid Build Coastguard Worker
7197*a67afe4dSAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
7198*a67afe4dSAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
7199*a67afe4dSAndroid Build Coastguard Worker	    # linking a shared library.
7200*a67afe4dSAndroid Build Coastguard Worker	    #
7201*a67afe4dSAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
7202*a67afe4dSAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
7203*a67afe4dSAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
7204*a67afe4dSAndroid Build Coastguard Worker	    # dependencies.
7205*a67afe4dSAndroid Build Coastguard Worker	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7206*a67afe4dSAndroid Build Coastguard Worker	    ;;
7207*a67afe4dSAndroid Build Coastguard Worker	  *)
7208*a67afe4dSAndroid Build Coastguard Worker	    if test yes,no = "$GXX,$with_gnu_ld"; then
7209*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7210*a67afe4dSAndroid Build Coastguard Worker	      case $host in
7211*a67afe4dSAndroid Build Coastguard Worker	        osf3*)
7212*a67afe4dSAndroid Build Coastguard Worker	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7213*a67afe4dSAndroid Build Coastguard Worker		  ;;
7214*a67afe4dSAndroid Build Coastguard Worker	        *)
7215*a67afe4dSAndroid Build Coastguard Worker	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7216*a67afe4dSAndroid Build Coastguard Worker		  ;;
7217*a67afe4dSAndroid Build Coastguard Worker	      esac
7218*a67afe4dSAndroid Build Coastguard Worker
7219*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7220*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7221*a67afe4dSAndroid Build Coastguard Worker
7222*a67afe4dSAndroid Build Coastguard Worker	      # Commands to make compiler produce verbose output that lists
7223*a67afe4dSAndroid Build Coastguard Worker	      # what "hidden" libraries, object files and flags are used when
7224*a67afe4dSAndroid Build Coastguard Worker	      # linking a shared library.
7225*a67afe4dSAndroid Build Coastguard Worker	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7226*a67afe4dSAndroid Build Coastguard Worker
7227*a67afe4dSAndroid Build Coastguard Worker	    else
7228*a67afe4dSAndroid Build Coastguard Worker	      # FIXME: insert proper C++ library support
7229*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(ld_shlibs, $1)=no
7230*a67afe4dSAndroid Build Coastguard Worker	    fi
7231*a67afe4dSAndroid Build Coastguard Worker	    ;;
7232*a67afe4dSAndroid Build Coastguard Worker        esac
7233*a67afe4dSAndroid Build Coastguard Worker        ;;
7234*a67afe4dSAndroid Build Coastguard Worker
7235*a67afe4dSAndroid Build Coastguard Worker      psos*)
7236*a67afe4dSAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7237*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7238*a67afe4dSAndroid Build Coastguard Worker        ;;
7239*a67afe4dSAndroid Build Coastguard Worker
7240*a67afe4dSAndroid Build Coastguard Worker      sunos4*)
7241*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
7242*a67afe4dSAndroid Build Coastguard Worker          CC*)
7243*a67afe4dSAndroid Build Coastguard Worker	    # Sun C++ 4.x
7244*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7245*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7246*a67afe4dSAndroid Build Coastguard Worker	    ;;
7247*a67afe4dSAndroid Build Coastguard Worker          lcc*)
7248*a67afe4dSAndroid Build Coastguard Worker	    # Lucid
7249*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7250*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7251*a67afe4dSAndroid Build Coastguard Worker	    ;;
7252*a67afe4dSAndroid Build Coastguard Worker          *)
7253*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7254*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7255*a67afe4dSAndroid Build Coastguard Worker	    ;;
7256*a67afe4dSAndroid Build Coastguard Worker        esac
7257*a67afe4dSAndroid Build Coastguard Worker        ;;
7258*a67afe4dSAndroid Build Coastguard Worker
7259*a67afe4dSAndroid Build Coastguard Worker      solaris*)
7260*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
7261*a67afe4dSAndroid Build Coastguard Worker          CC* | sunCC*)
7262*a67afe4dSAndroid Build Coastguard Worker	    # Sun C++ 4.2, 5.x and Centerline C++
7263*a67afe4dSAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7264*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7265*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7266*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7267*a67afe4dSAndroid Build Coastguard Worker              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7268*a67afe4dSAndroid Build Coastguard Worker
7269*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7270*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7271*a67afe4dSAndroid Build Coastguard Worker	    case $host_os in
7272*a67afe4dSAndroid Build Coastguard Worker	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7273*a67afe4dSAndroid Build Coastguard Worker	      *)
7274*a67afe4dSAndroid Build Coastguard Worker		# The compiler driver will combine and reorder linker options,
7275*a67afe4dSAndroid Build Coastguard Worker		# but understands '-z linker_flag'.
7276*a67afe4dSAndroid Build Coastguard Worker	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7277*a67afe4dSAndroid Build Coastguard Worker		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7278*a67afe4dSAndroid Build Coastguard Worker	        ;;
7279*a67afe4dSAndroid Build Coastguard Worker	    esac
7280*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7281*a67afe4dSAndroid Build Coastguard Worker
7282*a67afe4dSAndroid Build Coastguard Worker	    output_verbose_link_cmd='func_echo_all'
7283*a67afe4dSAndroid Build Coastguard Worker
7284*a67afe4dSAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
7285*a67afe4dSAndroid Build Coastguard Worker	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7286*a67afe4dSAndroid Build Coastguard Worker	    # necessary to make sure instantiated templates are included
7287*a67afe4dSAndroid Build Coastguard Worker	    # in the archive.
7288*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7289*a67afe4dSAndroid Build Coastguard Worker	    ;;
7290*a67afe4dSAndroid Build Coastguard Worker          gcx*)
7291*a67afe4dSAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
7292*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7293*a67afe4dSAndroid Build Coastguard Worker
7294*a67afe4dSAndroid Build Coastguard Worker	    # The C++ compiler must be used to create the archive.
7295*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7296*a67afe4dSAndroid Build Coastguard Worker	    ;;
7297*a67afe4dSAndroid Build Coastguard Worker          *)
7298*a67afe4dSAndroid Build Coastguard Worker	    # GNU C++ compiler with Solaris linker
7299*a67afe4dSAndroid Build Coastguard Worker	    if test yes,no = "$GXX,$with_gnu_ld"; then
7300*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7301*a67afe4dSAndroid Build Coastguard Worker	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7302*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7303*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7304*a67afe4dSAndroid Build Coastguard Worker                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7305*a67afe4dSAndroid Build Coastguard Worker
7306*a67afe4dSAndroid Build Coastguard Worker	        # Commands to make compiler produce verbose output that lists
7307*a67afe4dSAndroid Build Coastguard Worker	        # what "hidden" libraries, object files and flags are used when
7308*a67afe4dSAndroid Build Coastguard Worker	        # linking a shared library.
7309*a67afe4dSAndroid Build Coastguard Worker	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7310*a67afe4dSAndroid Build Coastguard Worker	      else
7311*a67afe4dSAndroid Build Coastguard Worker	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7312*a67afe4dSAndroid Build Coastguard Worker	        # platform.
7313*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7314*a67afe4dSAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7315*a67afe4dSAndroid Build Coastguard Worker                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7316*a67afe4dSAndroid Build Coastguard Worker
7317*a67afe4dSAndroid Build Coastguard Worker	        # Commands to make compiler produce verbose output that lists
7318*a67afe4dSAndroid Build Coastguard Worker	        # what "hidden" libraries, object files and flags are used when
7319*a67afe4dSAndroid Build Coastguard Worker	        # linking a shared library.
7320*a67afe4dSAndroid Build Coastguard Worker	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7321*a67afe4dSAndroid Build Coastguard Worker	      fi
7322*a67afe4dSAndroid Build Coastguard Worker
7323*a67afe4dSAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7324*a67afe4dSAndroid Build Coastguard Worker	      case $host_os in
7325*a67afe4dSAndroid Build Coastguard Worker		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7326*a67afe4dSAndroid Build Coastguard Worker		*)
7327*a67afe4dSAndroid Build Coastguard Worker		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7328*a67afe4dSAndroid Build Coastguard Worker		  ;;
7329*a67afe4dSAndroid Build Coastguard Worker	      esac
7330*a67afe4dSAndroid Build Coastguard Worker	    fi
7331*a67afe4dSAndroid Build Coastguard Worker	    ;;
7332*a67afe4dSAndroid Build Coastguard Worker        esac
7333*a67afe4dSAndroid Build Coastguard Worker        ;;
7334*a67afe4dSAndroid Build Coastguard Worker
7335*a67afe4dSAndroid Build Coastguard Worker    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7336*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7337*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7338*a67afe4dSAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7339*a67afe4dSAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
7340*a67afe4dSAndroid Build Coastguard Worker
7341*a67afe4dSAndroid Build Coastguard Worker      case $cc_basename in
7342*a67afe4dSAndroid Build Coastguard Worker        CC*)
7343*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7344*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7345*a67afe4dSAndroid Build Coastguard Worker	  ;;
7346*a67afe4dSAndroid Build Coastguard Worker	*)
7347*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7348*a67afe4dSAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7349*a67afe4dSAndroid Build Coastguard Worker	  ;;
7350*a67afe4dSAndroid Build Coastguard Worker      esac
7351*a67afe4dSAndroid Build Coastguard Worker      ;;
7352*a67afe4dSAndroid Build Coastguard Worker
7353*a67afe4dSAndroid Build Coastguard Worker      sysv5* | sco3.2v5* | sco5v6*)
7354*a67afe4dSAndroid Build Coastguard Worker	# Note: We CANNOT use -z defs as we might desire, because we do not
7355*a67afe4dSAndroid Build Coastguard Worker	# link with -lc, and that would cause any symbols used from libc to
7356*a67afe4dSAndroid Build Coastguard Worker	# always be unresolved, which means just about no library would
7357*a67afe4dSAndroid Build Coastguard Worker	# ever link correctly.  If we're not using GNU ld we use -z text
7358*a67afe4dSAndroid Build Coastguard Worker	# though, which does catch some bad symbols but isn't as heavy-handed
7359*a67afe4dSAndroid Build Coastguard Worker	# as -z defs.
7360*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7361*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7362*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7363*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7364*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7365*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7366*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(link_all_deplibs, $1)=yes
7367*a67afe4dSAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7368*a67afe4dSAndroid Build Coastguard Worker	runpath_var='LD_RUN_PATH'
7369*a67afe4dSAndroid Build Coastguard Worker
7370*a67afe4dSAndroid Build Coastguard Worker	case $cc_basename in
7371*a67afe4dSAndroid Build Coastguard Worker          CC*)
7372*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7373*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7374*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7375*a67afe4dSAndroid Build Coastguard Worker              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7376*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7377*a67afe4dSAndroid Build Coastguard Worker              '"$_LT_TAGVAR(reload_cmds, $1)"
7378*a67afe4dSAndroid Build Coastguard Worker	    ;;
7379*a67afe4dSAndroid Build Coastguard Worker	  *)
7380*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7381*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7382*a67afe4dSAndroid Build Coastguard Worker	    ;;
7383*a67afe4dSAndroid Build Coastguard Worker	esac
7384*a67afe4dSAndroid Build Coastguard Worker      ;;
7385*a67afe4dSAndroid Build Coastguard Worker
7386*a67afe4dSAndroid Build Coastguard Worker      tandem*)
7387*a67afe4dSAndroid Build Coastguard Worker        case $cc_basename in
7388*a67afe4dSAndroid Build Coastguard Worker          NCC*)
7389*a67afe4dSAndroid Build Coastguard Worker	    # NonStop-UX NCC 3.20
7390*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7391*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7392*a67afe4dSAndroid Build Coastguard Worker	    ;;
7393*a67afe4dSAndroid Build Coastguard Worker          *)
7394*a67afe4dSAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7395*a67afe4dSAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7396*a67afe4dSAndroid Build Coastguard Worker	    ;;
7397*a67afe4dSAndroid Build Coastguard Worker        esac
7398*a67afe4dSAndroid Build Coastguard Worker        ;;
7399*a67afe4dSAndroid Build Coastguard Worker
7400*a67afe4dSAndroid Build Coastguard Worker      vxworks*)
7401*a67afe4dSAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7402*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7403*a67afe4dSAndroid Build Coastguard Worker        ;;
7404*a67afe4dSAndroid Build Coastguard Worker
7405*a67afe4dSAndroid Build Coastguard Worker      *)
7406*a67afe4dSAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7407*a67afe4dSAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7408*a67afe4dSAndroid Build Coastguard Worker        ;;
7409*a67afe4dSAndroid Build Coastguard Worker    esac
7410*a67afe4dSAndroid Build Coastguard Worker
7411*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7412*a67afe4dSAndroid Build Coastguard Worker    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7413*a67afe4dSAndroid Build Coastguard Worker
7414*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)=$GXX
7415*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)=$LD
7416*a67afe4dSAndroid Build Coastguard Worker
7417*a67afe4dSAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7418*a67afe4dSAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7419*a67afe4dSAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7420*a67afe4dSAndroid Build Coastguard Worker    ## what you are doing...
7421*a67afe4dSAndroid Build Coastguard Worker    _LT_SYS_HIDDEN_LIBDEPS($1)
7422*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7423*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7424*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7425*a67afe4dSAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7426*a67afe4dSAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7427*a67afe4dSAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7428*a67afe4dSAndroid Build Coastguard Worker
7429*a67afe4dSAndroid Build Coastguard Worker    _LT_CONFIG($1)
7430*a67afe4dSAndroid Build Coastguard Worker  fi # test -n "$compiler"
7431*a67afe4dSAndroid Build Coastguard Worker
7432*a67afe4dSAndroid Build Coastguard Worker  CC=$lt_save_CC
7433*a67afe4dSAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7434*a67afe4dSAndroid Build Coastguard Worker  LDCXX=$LD
7435*a67afe4dSAndroid Build Coastguard Worker  LD=$lt_save_LD
7436*a67afe4dSAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7437*a67afe4dSAndroid Build Coastguard Worker  with_gnu_ld=$lt_save_with_gnu_ld
7438*a67afe4dSAndroid Build Coastguard Worker  lt_cv_path_LDCXX=$lt_cv_path_LD
7439*a67afe4dSAndroid Build Coastguard Worker  lt_cv_path_LD=$lt_save_path_LD
7440*a67afe4dSAndroid Build Coastguard Worker  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7441*a67afe4dSAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7442*a67afe4dSAndroid Build Coastguard Workerfi # test yes != "$_lt_caught_CXX_error"
7443*a67afe4dSAndroid Build Coastguard Worker
7444*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_POP
7445*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_CXX_CONFIG
7446*a67afe4dSAndroid Build Coastguard Worker
7447*a67afe4dSAndroid Build Coastguard Worker
7448*a67afe4dSAndroid Build Coastguard Worker# _LT_FUNC_STRIPNAME_CNF
7449*a67afe4dSAndroid Build Coastguard Worker# ----------------------
7450*a67afe4dSAndroid Build Coastguard Worker# func_stripname_cnf prefix suffix name
7451*a67afe4dSAndroid Build Coastguard Worker# strip PREFIX and SUFFIX off of NAME.
7452*a67afe4dSAndroid Build Coastguard Worker# PREFIX and SUFFIX must not contain globbing or regex special
7453*a67afe4dSAndroid Build Coastguard Worker# characters, hashes, percent signs, but SUFFIX may contain a leading
7454*a67afe4dSAndroid Build Coastguard Worker# dot (in which case that matches only a dot).
7455*a67afe4dSAndroid Build Coastguard Worker#
7456*a67afe4dSAndroid Build Coastguard Worker# This function is identical to the (non-XSI) version of func_stripname,
7457*a67afe4dSAndroid Build Coastguard Worker# except this one can be used by m4 code that may be executed by configure,
7458*a67afe4dSAndroid Build Coastguard Worker# rather than the libtool script.
7459*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7460*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED])
7461*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7462*a67afe4dSAndroid Build Coastguard Workerfunc_stripname_cnf ()
7463*a67afe4dSAndroid Build Coastguard Worker{
7464*a67afe4dSAndroid Build Coastguard Worker  case @S|@2 in
7465*a67afe4dSAndroid Build Coastguard Worker  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7466*a67afe4dSAndroid Build Coastguard Worker  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7467*a67afe4dSAndroid Build Coastguard Worker  esac
7468*a67afe4dSAndroid Build Coastguard Worker} # func_stripname_cnf
7469*a67afe4dSAndroid Build Coastguard Worker])# _LT_FUNC_STRIPNAME_CNF
7470*a67afe4dSAndroid Build Coastguard Worker
7471*a67afe4dSAndroid Build Coastguard Worker
7472*a67afe4dSAndroid Build Coastguard Worker# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7473*a67afe4dSAndroid Build Coastguard Worker# ---------------------------------
7474*a67afe4dSAndroid Build Coastguard Worker# Figure out "hidden" library dependencies from verbose
7475*a67afe4dSAndroid Build Coastguard Worker# compiler output when linking a shared library.
7476*a67afe4dSAndroid Build Coastguard Worker# Parse the compiler output and extract the necessary
7477*a67afe4dSAndroid Build Coastguard Worker# objects, libraries and library flags.
7478*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7479*a67afe4dSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7480*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7481*a67afe4dSAndroid Build Coastguard Worker# Dependencies to place before and after the object being linked:
7482*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(predep_objects, $1)=
7483*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(postdep_objects, $1)=
7484*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(predeps, $1)=
7485*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(postdeps, $1)=
7486*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(compiler_lib_search_path, $1)=
7487*a67afe4dSAndroid Build Coastguard Worker
7488*a67afe4dSAndroid Build Coastguard Workerdnl we can't use the lt_simple_compile_test_code here,
7489*a67afe4dSAndroid Build Coastguard Workerdnl because it contains code intended for an executable,
7490*a67afe4dSAndroid Build Coastguard Workerdnl not a library.  It's possible we should let each
7491*a67afe4dSAndroid Build Coastguard Workerdnl tag define a new lt_????_link_test_code variable,
7492*a67afe4dSAndroid Build Coastguard Workerdnl but it's only used here...
7493*a67afe4dSAndroid Build Coastguard Workerm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7494*a67afe4dSAndroid Build Coastguard Workerint a;
7495*a67afe4dSAndroid Build Coastguard Workervoid foo (void) { a = 0; }
7496*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
7497*a67afe4dSAndroid Build Coastguard Worker], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7498*a67afe4dSAndroid Build Coastguard Workerclass Foo
7499*a67afe4dSAndroid Build Coastguard Worker{
7500*a67afe4dSAndroid Build Coastguard Workerpublic:
7501*a67afe4dSAndroid Build Coastguard Worker  Foo (void) { a = 0; }
7502*a67afe4dSAndroid Build Coastguard Workerprivate:
7503*a67afe4dSAndroid Build Coastguard Worker  int a;
7504*a67afe4dSAndroid Build Coastguard Worker};
7505*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
7506*a67afe4dSAndroid Build Coastguard Worker], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7507*a67afe4dSAndroid Build Coastguard Worker      subroutine foo
7508*a67afe4dSAndroid Build Coastguard Worker      implicit none
7509*a67afe4dSAndroid Build Coastguard Worker      integer*4 a
7510*a67afe4dSAndroid Build Coastguard Worker      a=0
7511*a67afe4dSAndroid Build Coastguard Worker      return
7512*a67afe4dSAndroid Build Coastguard Worker      end
7513*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
7514*a67afe4dSAndroid Build Coastguard Worker], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7515*a67afe4dSAndroid Build Coastguard Worker      subroutine foo
7516*a67afe4dSAndroid Build Coastguard Worker      implicit none
7517*a67afe4dSAndroid Build Coastguard Worker      integer a
7518*a67afe4dSAndroid Build Coastguard Worker      a=0
7519*a67afe4dSAndroid Build Coastguard Worker      return
7520*a67afe4dSAndroid Build Coastguard Worker      end
7521*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
7522*a67afe4dSAndroid Build Coastguard Worker], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7523*a67afe4dSAndroid Build Coastguard Workerpublic class foo {
7524*a67afe4dSAndroid Build Coastguard Worker  private int a;
7525*a67afe4dSAndroid Build Coastguard Worker  public void bar (void) {
7526*a67afe4dSAndroid Build Coastguard Worker    a = 0;
7527*a67afe4dSAndroid Build Coastguard Worker  }
7528*a67afe4dSAndroid Build Coastguard Worker};
7529*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
7530*a67afe4dSAndroid Build Coastguard Worker], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7531*a67afe4dSAndroid Build Coastguard Workerpackage foo
7532*a67afe4dSAndroid Build Coastguard Workerfunc foo() {
7533*a67afe4dSAndroid Build Coastguard Worker}
7534*a67afe4dSAndroid Build Coastguard Worker_LT_EOF
7535*a67afe4dSAndroid Build Coastguard Worker])
7536*a67afe4dSAndroid Build Coastguard Worker
7537*a67afe4dSAndroid Build Coastguard Worker_lt_libdeps_save_CFLAGS=$CFLAGS
7538*a67afe4dSAndroid Build Coastguard Workercase "$CC $CFLAGS " in #(
7539*a67afe4dSAndroid Build Coastguard Worker*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7540*a67afe4dSAndroid Build Coastguard Worker*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7541*a67afe4dSAndroid Build Coastguard Worker*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7542*a67afe4dSAndroid Build Coastguard Workeresac
7543*a67afe4dSAndroid Build Coastguard Worker
7544*a67afe4dSAndroid Build Coastguard Workerdnl Parse the compiler output and extract the necessary
7545*a67afe4dSAndroid Build Coastguard Workerdnl objects, libraries and library flags.
7546*a67afe4dSAndroid Build Coastguard Workerif AC_TRY_EVAL(ac_compile); then
7547*a67afe4dSAndroid Build Coastguard Worker  # Parse the compiler output and extract the necessary
7548*a67afe4dSAndroid Build Coastguard Worker  # objects, libraries and library flags.
7549*a67afe4dSAndroid Build Coastguard Worker
7550*a67afe4dSAndroid Build Coastguard Worker  # Sentinel used to keep track of whether or not we are before
7551*a67afe4dSAndroid Build Coastguard Worker  # the conftest object file.
7552*a67afe4dSAndroid Build Coastguard Worker  pre_test_object_deps_done=no
7553*a67afe4dSAndroid Build Coastguard Worker
7554*a67afe4dSAndroid Build Coastguard Worker  for p in `eval "$output_verbose_link_cmd"`; do
7555*a67afe4dSAndroid Build Coastguard Worker    case $prev$p in
7556*a67afe4dSAndroid Build Coastguard Worker
7557*a67afe4dSAndroid Build Coastguard Worker    -L* | -R* | -l*)
7558*a67afe4dSAndroid Build Coastguard Worker       # Some compilers place space between "-{L,R}" and the path.
7559*a67afe4dSAndroid Build Coastguard Worker       # Remove the space.
7560*a67afe4dSAndroid Build Coastguard Worker       if test x-L = "$p" ||
7561*a67afe4dSAndroid Build Coastguard Worker          test x-R = "$p"; then
7562*a67afe4dSAndroid Build Coastguard Worker	 prev=$p
7563*a67afe4dSAndroid Build Coastguard Worker	 continue
7564*a67afe4dSAndroid Build Coastguard Worker       fi
7565*a67afe4dSAndroid Build Coastguard Worker
7566*a67afe4dSAndroid Build Coastguard Worker       # Expand the sysroot to ease extracting the directories later.
7567*a67afe4dSAndroid Build Coastguard Worker       if test -z "$prev"; then
7568*a67afe4dSAndroid Build Coastguard Worker         case $p in
7569*a67afe4dSAndroid Build Coastguard Worker         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7570*a67afe4dSAndroid Build Coastguard Worker         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7571*a67afe4dSAndroid Build Coastguard Worker         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7572*a67afe4dSAndroid Build Coastguard Worker         esac
7573*a67afe4dSAndroid Build Coastguard Worker       fi
7574*a67afe4dSAndroid Build Coastguard Worker       case $p in
7575*a67afe4dSAndroid Build Coastguard Worker       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7576*a67afe4dSAndroid Build Coastguard Worker       esac
7577*a67afe4dSAndroid Build Coastguard Worker       if test no = "$pre_test_object_deps_done"; then
7578*a67afe4dSAndroid Build Coastguard Worker	 case $prev in
7579*a67afe4dSAndroid Build Coastguard Worker	 -L | -R)
7580*a67afe4dSAndroid Build Coastguard Worker	   # Internal compiler library paths should come after those
7581*a67afe4dSAndroid Build Coastguard Worker	   # provided the user.  The postdeps already come after the
7582*a67afe4dSAndroid Build Coastguard Worker	   # user supplied libs so there is no need to process them.
7583*a67afe4dSAndroid Build Coastguard Worker	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7584*a67afe4dSAndroid Build Coastguard Worker	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7585*a67afe4dSAndroid Build Coastguard Worker	   else
7586*a67afe4dSAndroid Build Coastguard Worker	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7587*a67afe4dSAndroid Build Coastguard Worker	   fi
7588*a67afe4dSAndroid Build Coastguard Worker	   ;;
7589*a67afe4dSAndroid Build Coastguard Worker	 # The "-l" case would never come before the object being
7590*a67afe4dSAndroid Build Coastguard Worker	 # linked, so don't bother handling this case.
7591*a67afe4dSAndroid Build Coastguard Worker	 esac
7592*a67afe4dSAndroid Build Coastguard Worker       else
7593*a67afe4dSAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7594*a67afe4dSAndroid Build Coastguard Worker	   _LT_TAGVAR(postdeps, $1)=$prev$p
7595*a67afe4dSAndroid Build Coastguard Worker	 else
7596*a67afe4dSAndroid Build Coastguard Worker	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7597*a67afe4dSAndroid Build Coastguard Worker	 fi
7598*a67afe4dSAndroid Build Coastguard Worker       fi
7599*a67afe4dSAndroid Build Coastguard Worker       prev=
7600*a67afe4dSAndroid Build Coastguard Worker       ;;
7601*a67afe4dSAndroid Build Coastguard Worker
7602*a67afe4dSAndroid Build Coastguard Worker    *.lto.$objext) ;; # Ignore GCC LTO objects
7603*a67afe4dSAndroid Build Coastguard Worker    *.$objext)
7604*a67afe4dSAndroid Build Coastguard Worker       # This assumes that the test object file only shows up
7605*a67afe4dSAndroid Build Coastguard Worker       # once in the compiler output.
7606*a67afe4dSAndroid Build Coastguard Worker       if test "$p" = "conftest.$objext"; then
7607*a67afe4dSAndroid Build Coastguard Worker	 pre_test_object_deps_done=yes
7608*a67afe4dSAndroid Build Coastguard Worker	 continue
7609*a67afe4dSAndroid Build Coastguard Worker       fi
7610*a67afe4dSAndroid Build Coastguard Worker
7611*a67afe4dSAndroid Build Coastguard Worker       if test no = "$pre_test_object_deps_done"; then
7612*a67afe4dSAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7613*a67afe4dSAndroid Build Coastguard Worker	   _LT_TAGVAR(predep_objects, $1)=$p
7614*a67afe4dSAndroid Build Coastguard Worker	 else
7615*a67afe4dSAndroid Build Coastguard Worker	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7616*a67afe4dSAndroid Build Coastguard Worker	 fi
7617*a67afe4dSAndroid Build Coastguard Worker       else
7618*a67afe4dSAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7619*a67afe4dSAndroid Build Coastguard Worker	   _LT_TAGVAR(postdep_objects, $1)=$p
7620*a67afe4dSAndroid Build Coastguard Worker	 else
7621*a67afe4dSAndroid Build Coastguard Worker	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7622*a67afe4dSAndroid Build Coastguard Worker	 fi
7623*a67afe4dSAndroid Build Coastguard Worker       fi
7624*a67afe4dSAndroid Build Coastguard Worker       ;;
7625*a67afe4dSAndroid Build Coastguard Worker
7626*a67afe4dSAndroid Build Coastguard Worker    *) ;; # Ignore the rest.
7627*a67afe4dSAndroid Build Coastguard Worker
7628*a67afe4dSAndroid Build Coastguard Worker    esac
7629*a67afe4dSAndroid Build Coastguard Worker  done
7630*a67afe4dSAndroid Build Coastguard Worker
7631*a67afe4dSAndroid Build Coastguard Worker  # Clean up.
7632*a67afe4dSAndroid Build Coastguard Worker  rm -f a.out a.exe
7633*a67afe4dSAndroid Build Coastguard Workerelse
7634*a67afe4dSAndroid Build Coastguard Worker  echo "libtool.m4: error: problem compiling $1 test program"
7635*a67afe4dSAndroid Build Coastguard Workerfi
7636*a67afe4dSAndroid Build Coastguard Worker
7637*a67afe4dSAndroid Build Coastguard Worker$RM -f confest.$objext
7638*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=$_lt_libdeps_save_CFLAGS
7639*a67afe4dSAndroid Build Coastguard Worker
7640*a67afe4dSAndroid Build Coastguard Worker# PORTME: override above test on systems where it is broken
7641*a67afe4dSAndroid Build Coastguard Workerm4_if([$1], [CXX],
7642*a67afe4dSAndroid Build Coastguard Worker[case $host_os in
7643*a67afe4dSAndroid Build Coastguard Workerinterix[[3-9]]*)
7644*a67afe4dSAndroid Build Coastguard Worker  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7645*a67afe4dSAndroid Build Coastguard Worker  # hack all around it, let's just trust "g++" to DTRT.
7646*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(predep_objects,$1)=
7647*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(postdep_objects,$1)=
7648*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(postdeps,$1)=
7649*a67afe4dSAndroid Build Coastguard Worker  ;;
7650*a67afe4dSAndroid Build Coastguard Workeresac
7651*a67afe4dSAndroid Build Coastguard Worker])
7652*a67afe4dSAndroid Build Coastguard Worker
7653*a67afe4dSAndroid Build Coastguard Workercase " $_LT_TAGVAR(postdeps, $1) " in
7654*a67afe4dSAndroid Build Coastguard Worker*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7655*a67afe4dSAndroid Build Coastguard Workeresac
7656*a67afe4dSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7657*a67afe4dSAndroid Build Coastguard Workerif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7658*a67afe4dSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7659*a67afe4dSAndroid Build Coastguard Workerfi
7660*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7661*a67afe4dSAndroid Build Coastguard Worker    [The directories searched by this compiler when creating a shared library])
7662*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [predep_objects], [1],
7663*a67afe4dSAndroid Build Coastguard Worker    [Dependencies to place before and after the objects being linked to
7664*a67afe4dSAndroid Build Coastguard Worker    create a shared library])
7665*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [postdep_objects], [1])
7666*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [predeps], [1])
7667*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [postdeps], [1])
7668*a67afe4dSAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_path], [1],
7669*a67afe4dSAndroid Build Coastguard Worker    [The library search path used internally by the compiler when linking
7670*a67afe4dSAndroid Build Coastguard Worker    a shared library])
7671*a67afe4dSAndroid Build Coastguard Worker])# _LT_SYS_HIDDEN_LIBDEPS
7672*a67afe4dSAndroid Build Coastguard Worker
7673*a67afe4dSAndroid Build Coastguard Worker
7674*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_F77_CONFIG([TAG])
7675*a67afe4dSAndroid Build Coastguard Worker# --------------------------
7676*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran 77 compiler are
7677*a67afe4dSAndroid Build Coastguard Worker# suitably defined.  These variables are subsequently used by _LT_CONFIG
7678*a67afe4dSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
7679*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_F77_CONFIG],
7680*a67afe4dSAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran 77)
7681*a67afe4dSAndroid Build Coastguard Workerif test -z "$F77" || test no = "$F77"; then
7682*a67afe4dSAndroid Build Coastguard Worker  _lt_disable_F77=yes
7683*a67afe4dSAndroid Build Coastguard Workerfi
7684*a67afe4dSAndroid Build Coastguard Worker
7685*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7686*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
7687*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
7688*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
7689*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7690*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
7691*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7692*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7693*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
7694*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
7695*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
7696*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
7697*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
7698*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
7699*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
7700*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7701*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7702*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7703*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
7704*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
7705*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7706*a67afe4dSAndroid Build Coastguard Worker
7707*a67afe4dSAndroid Build Coastguard Worker# Source file extension for f77 test sources.
7708*a67afe4dSAndroid Build Coastguard Workerac_ext=f
7709*a67afe4dSAndroid Build Coastguard Worker
7710*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled f77 test sources.
7711*a67afe4dSAndroid Build Coastguard Workerobjext=o
7712*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7713*a67afe4dSAndroid Build Coastguard Worker
7714*a67afe4dSAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
7715*a67afe4dSAndroid Build Coastguard Worker# the F77 compiler isn't working.  Some variables (like enable_shared)
7716*a67afe4dSAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
7717*a67afe4dSAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
7718*a67afe4dSAndroid Build Coastguard Workerif test yes != "$_lt_disable_F77"; then
7719*a67afe4dSAndroid Build Coastguard Worker  # Code to be used in simple compile tests
7720*a67afe4dSAndroid Build Coastguard Worker  lt_simple_compile_test_code="\
7721*a67afe4dSAndroid Build Coastguard Worker      subroutine t
7722*a67afe4dSAndroid Build Coastguard Worker      return
7723*a67afe4dSAndroid Build Coastguard Worker      end
7724*a67afe4dSAndroid Build Coastguard Worker"
7725*a67afe4dSAndroid Build Coastguard Worker
7726*a67afe4dSAndroid Build Coastguard Worker  # Code to be used in simple link tests
7727*a67afe4dSAndroid Build Coastguard Worker  lt_simple_link_test_code="\
7728*a67afe4dSAndroid Build Coastguard Worker      program t
7729*a67afe4dSAndroid Build Coastguard Worker      end
7730*a67afe4dSAndroid Build Coastguard Worker"
7731*a67afe4dSAndroid Build Coastguard Worker
7732*a67afe4dSAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7733*a67afe4dSAndroid Build Coastguard Worker  _LT_TAG_COMPILER
7734*a67afe4dSAndroid Build Coastguard Worker
7735*a67afe4dSAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
7736*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
7737*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
7738*a67afe4dSAndroid Build Coastguard Worker
7739*a67afe4dSAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
7740*a67afe4dSAndroid Build Coastguard Worker  lt_save_CC=$CC
7741*a67afe4dSAndroid Build Coastguard Worker  lt_save_GCC=$GCC
7742*a67afe4dSAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
7743*a67afe4dSAndroid Build Coastguard Worker  CC=${F77-"f77"}
7744*a67afe4dSAndroid Build Coastguard Worker  CFLAGS=$FFLAGS
7745*a67afe4dSAndroid Build Coastguard Worker  compiler=$CC
7746*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
7747*a67afe4dSAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
7748*a67afe4dSAndroid Build Coastguard Worker  GCC=$G77
7749*a67afe4dSAndroid Build Coastguard Worker  if test -n "$compiler"; then
7750*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([if libtool supports shared libraries])
7751*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$can_build_shared])
7752*a67afe4dSAndroid Build Coastguard Worker
7753*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build shared libraries])
7754*a67afe4dSAndroid Build Coastguard Worker    test no = "$can_build_shared" && enable_shared=no
7755*a67afe4dSAndroid Build Coastguard Worker
7756*a67afe4dSAndroid Build Coastguard Worker    # On AIX, shared libraries and static libraries use the same namespace, and
7757*a67afe4dSAndroid Build Coastguard Worker    # are all built from PIC.
7758*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
7759*a67afe4dSAndroid Build Coastguard Worker      aix3*)
7760*a67afe4dSAndroid Build Coastguard Worker        test yes = "$enable_shared" && enable_static=no
7761*a67afe4dSAndroid Build Coastguard Worker        if test -n "$RANLIB"; then
7762*a67afe4dSAndroid Build Coastguard Worker          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7763*a67afe4dSAndroid Build Coastguard Worker          postinstall_cmds='$RANLIB $lib'
7764*a67afe4dSAndroid Build Coastguard Worker        fi
7765*a67afe4dSAndroid Build Coastguard Worker        ;;
7766*a67afe4dSAndroid Build Coastguard Worker      aix[[4-9]]*)
7767*a67afe4dSAndroid Build Coastguard Worker	if test ia64 != "$host_cpu"; then
7768*a67afe4dSAndroid Build Coastguard Worker	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7769*a67afe4dSAndroid Build Coastguard Worker	  yes,aix,yes) ;;		# shared object as lib.so file only
7770*a67afe4dSAndroid Build Coastguard Worker	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7771*a67afe4dSAndroid Build Coastguard Worker	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7772*a67afe4dSAndroid Build Coastguard Worker	  esac
7773*a67afe4dSAndroid Build Coastguard Worker	fi
7774*a67afe4dSAndroid Build Coastguard Worker        ;;
7775*a67afe4dSAndroid Build Coastguard Worker    esac
7776*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_shared])
7777*a67afe4dSAndroid Build Coastguard Worker
7778*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build static libraries])
7779*a67afe4dSAndroid Build Coastguard Worker    # Make sure either enable_shared or enable_static is yes.
7780*a67afe4dSAndroid Build Coastguard Worker    test yes = "$enable_shared" || enable_static=yes
7781*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_static])
7782*a67afe4dSAndroid Build Coastguard Worker
7783*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)=$G77
7784*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)=$LD
7785*a67afe4dSAndroid Build Coastguard Worker
7786*a67afe4dSAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7787*a67afe4dSAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7788*a67afe4dSAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7789*a67afe4dSAndroid Build Coastguard Worker    ## what you are doing...
7790*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7791*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7792*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7793*a67afe4dSAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7794*a67afe4dSAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7795*a67afe4dSAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7796*a67afe4dSAndroid Build Coastguard Worker
7797*a67afe4dSAndroid Build Coastguard Worker    _LT_CONFIG($1)
7798*a67afe4dSAndroid Build Coastguard Worker  fi # test -n "$compiler"
7799*a67afe4dSAndroid Build Coastguard Worker
7800*a67afe4dSAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7801*a67afe4dSAndroid Build Coastguard Worker  CC=$lt_save_CC
7802*a67afe4dSAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7803*a67afe4dSAndroid Build Coastguard Workerfi # test yes != "$_lt_disable_F77"
7804*a67afe4dSAndroid Build Coastguard Worker
7805*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_POP
7806*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_F77_CONFIG
7807*a67afe4dSAndroid Build Coastguard Worker
7808*a67afe4dSAndroid Build Coastguard Worker
7809*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_FC_CONFIG([TAG])
7810*a67afe4dSAndroid Build Coastguard Worker# -------------------------
7811*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran compiler are
7812*a67afe4dSAndroid Build Coastguard Worker# suitably defined.  These variables are subsequently used by _LT_CONFIG
7813*a67afe4dSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
7814*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_FC_CONFIG],
7815*a67afe4dSAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran)
7816*a67afe4dSAndroid Build Coastguard Worker
7817*a67afe4dSAndroid Build Coastguard Workerif test -z "$FC" || test no = "$FC"; then
7818*a67afe4dSAndroid Build Coastguard Worker  _lt_disable_FC=yes
7819*a67afe4dSAndroid Build Coastguard Workerfi
7820*a67afe4dSAndroid Build Coastguard Worker
7821*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7822*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
7823*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
7824*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
7825*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7826*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
7827*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7828*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7829*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
7830*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
7831*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
7832*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
7833*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
7834*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
7835*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
7836*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7837*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7838*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7839*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
7840*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
7841*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7842*a67afe4dSAndroid Build Coastguard Worker
7843*a67afe4dSAndroid Build Coastguard Worker# Source file extension for fc test sources.
7844*a67afe4dSAndroid Build Coastguard Workerac_ext=${ac_fc_srcext-f}
7845*a67afe4dSAndroid Build Coastguard Worker
7846*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled fc test sources.
7847*a67afe4dSAndroid Build Coastguard Workerobjext=o
7848*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7849*a67afe4dSAndroid Build Coastguard Worker
7850*a67afe4dSAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
7851*a67afe4dSAndroid Build Coastguard Worker# the FC compiler isn't working.  Some variables (like enable_shared)
7852*a67afe4dSAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
7853*a67afe4dSAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
7854*a67afe4dSAndroid Build Coastguard Workerif test yes != "$_lt_disable_FC"; then
7855*a67afe4dSAndroid Build Coastguard Worker  # Code to be used in simple compile tests
7856*a67afe4dSAndroid Build Coastguard Worker  lt_simple_compile_test_code="\
7857*a67afe4dSAndroid Build Coastguard Worker      subroutine t
7858*a67afe4dSAndroid Build Coastguard Worker      return
7859*a67afe4dSAndroid Build Coastguard Worker      end
7860*a67afe4dSAndroid Build Coastguard Worker"
7861*a67afe4dSAndroid Build Coastguard Worker
7862*a67afe4dSAndroid Build Coastguard Worker  # Code to be used in simple link tests
7863*a67afe4dSAndroid Build Coastguard Worker  lt_simple_link_test_code="\
7864*a67afe4dSAndroid Build Coastguard Worker      program t
7865*a67afe4dSAndroid Build Coastguard Worker      end
7866*a67afe4dSAndroid Build Coastguard Worker"
7867*a67afe4dSAndroid Build Coastguard Worker
7868*a67afe4dSAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7869*a67afe4dSAndroid Build Coastguard Worker  _LT_TAG_COMPILER
7870*a67afe4dSAndroid Build Coastguard Worker
7871*a67afe4dSAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
7872*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
7873*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
7874*a67afe4dSAndroid Build Coastguard Worker
7875*a67afe4dSAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
7876*a67afe4dSAndroid Build Coastguard Worker  lt_save_CC=$CC
7877*a67afe4dSAndroid Build Coastguard Worker  lt_save_GCC=$GCC
7878*a67afe4dSAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
7879*a67afe4dSAndroid Build Coastguard Worker  CC=${FC-"f95"}
7880*a67afe4dSAndroid Build Coastguard Worker  CFLAGS=$FCFLAGS
7881*a67afe4dSAndroid Build Coastguard Worker  compiler=$CC
7882*a67afe4dSAndroid Build Coastguard Worker  GCC=$ac_cv_fc_compiler_gnu
7883*a67afe4dSAndroid Build Coastguard Worker
7884*a67afe4dSAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
7885*a67afe4dSAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
7886*a67afe4dSAndroid Build Coastguard Worker
7887*a67afe4dSAndroid Build Coastguard Worker  if test -n "$compiler"; then
7888*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([if libtool supports shared libraries])
7889*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$can_build_shared])
7890*a67afe4dSAndroid Build Coastguard Worker
7891*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build shared libraries])
7892*a67afe4dSAndroid Build Coastguard Worker    test no = "$can_build_shared" && enable_shared=no
7893*a67afe4dSAndroid Build Coastguard Worker
7894*a67afe4dSAndroid Build Coastguard Worker    # On AIX, shared libraries and static libraries use the same namespace, and
7895*a67afe4dSAndroid Build Coastguard Worker    # are all built from PIC.
7896*a67afe4dSAndroid Build Coastguard Worker    case $host_os in
7897*a67afe4dSAndroid Build Coastguard Worker      aix3*)
7898*a67afe4dSAndroid Build Coastguard Worker        test yes = "$enable_shared" && enable_static=no
7899*a67afe4dSAndroid Build Coastguard Worker        if test -n "$RANLIB"; then
7900*a67afe4dSAndroid Build Coastguard Worker          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7901*a67afe4dSAndroid Build Coastguard Worker          postinstall_cmds='$RANLIB $lib'
7902*a67afe4dSAndroid Build Coastguard Worker        fi
7903*a67afe4dSAndroid Build Coastguard Worker        ;;
7904*a67afe4dSAndroid Build Coastguard Worker      aix[[4-9]]*)
7905*a67afe4dSAndroid Build Coastguard Worker	if test ia64 != "$host_cpu"; then
7906*a67afe4dSAndroid Build Coastguard Worker	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7907*a67afe4dSAndroid Build Coastguard Worker	  yes,aix,yes) ;;		# shared object as lib.so file only
7908*a67afe4dSAndroid Build Coastguard Worker	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7909*a67afe4dSAndroid Build Coastguard Worker	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7910*a67afe4dSAndroid Build Coastguard Worker	  esac
7911*a67afe4dSAndroid Build Coastguard Worker	fi
7912*a67afe4dSAndroid Build Coastguard Worker        ;;
7913*a67afe4dSAndroid Build Coastguard Worker    esac
7914*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_shared])
7915*a67afe4dSAndroid Build Coastguard Worker
7916*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build static libraries])
7917*a67afe4dSAndroid Build Coastguard Worker    # Make sure either enable_shared or enable_static is yes.
7918*a67afe4dSAndroid Build Coastguard Worker    test yes = "$enable_shared" || enable_static=yes
7919*a67afe4dSAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_static])
7920*a67afe4dSAndroid Build Coastguard Worker
7921*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7922*a67afe4dSAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)=$LD
7923*a67afe4dSAndroid Build Coastguard Worker
7924*a67afe4dSAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7925*a67afe4dSAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7926*a67afe4dSAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7927*a67afe4dSAndroid Build Coastguard Worker    ## what you are doing...
7928*a67afe4dSAndroid Build Coastguard Worker    _LT_SYS_HIDDEN_LIBDEPS($1)
7929*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7930*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7931*a67afe4dSAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7932*a67afe4dSAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7933*a67afe4dSAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7934*a67afe4dSAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7935*a67afe4dSAndroid Build Coastguard Worker
7936*a67afe4dSAndroid Build Coastguard Worker    _LT_CONFIG($1)
7937*a67afe4dSAndroid Build Coastguard Worker  fi # test -n "$compiler"
7938*a67afe4dSAndroid Build Coastguard Worker
7939*a67afe4dSAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7940*a67afe4dSAndroid Build Coastguard Worker  CC=$lt_save_CC
7941*a67afe4dSAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7942*a67afe4dSAndroid Build Coastguard Workerfi # test yes != "$_lt_disable_FC"
7943*a67afe4dSAndroid Build Coastguard Worker
7944*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_POP
7945*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_FC_CONFIG
7946*a67afe4dSAndroid Build Coastguard Worker
7947*a67afe4dSAndroid Build Coastguard Worker
7948*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_GCJ_CONFIG([TAG])
7949*a67afe4dSAndroid Build Coastguard Worker# --------------------------
7950*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Java Compiler compiler
7951*a67afe4dSAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7952*a67afe4dSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
7953*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_GCJ_CONFIG],
7954*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GCJ])dnl
7955*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_SAVE
7956*a67afe4dSAndroid Build Coastguard Worker
7957*a67afe4dSAndroid Build Coastguard Worker# Source file extension for Java test sources.
7958*a67afe4dSAndroid Build Coastguard Workerac_ext=java
7959*a67afe4dSAndroid Build Coastguard Worker
7960*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled Java test sources.
7961*a67afe4dSAndroid Build Coastguard Workerobjext=o
7962*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7963*a67afe4dSAndroid Build Coastguard Worker
7964*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple compile tests
7965*a67afe4dSAndroid Build Coastguard Workerlt_simple_compile_test_code="class foo {}"
7966*a67afe4dSAndroid Build Coastguard Worker
7967*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple link tests
7968*a67afe4dSAndroid Build Coastguard Workerlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7969*a67afe4dSAndroid Build Coastguard Worker
7970*a67afe4dSAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7971*a67afe4dSAndroid Build Coastguard Worker_LT_TAG_COMPILER
7972*a67afe4dSAndroid Build Coastguard Worker
7973*a67afe4dSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
7974*a67afe4dSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
7975*a67afe4dSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
7976*a67afe4dSAndroid Build Coastguard Worker
7977*a67afe4dSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
7978*a67afe4dSAndroid Build Coastguard Workerlt_save_CC=$CC
7979*a67afe4dSAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
7980*a67afe4dSAndroid Build Coastguard Workerlt_save_GCC=$GCC
7981*a67afe4dSAndroid Build Coastguard WorkerGCC=yes
7982*a67afe4dSAndroid Build Coastguard WorkerCC=${GCJ-"gcj"}
7983*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=$GCJFLAGS
7984*a67afe4dSAndroid Build Coastguard Workercompiler=$CC
7985*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
7986*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)=$LD
7987*a67afe4dSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
7988*a67afe4dSAndroid Build Coastguard Worker
7989*a67afe4dSAndroid Build Coastguard Worker# GCJ did not exist at the time GCC didn't implicitly link libc in.
7990*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7991*a67afe4dSAndroid Build Coastguard Worker
7992*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7993*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7994*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7995*a67afe4dSAndroid Build Coastguard Worker
7996*a67afe4dSAndroid Build Coastguard Worker## CAVEAT EMPTOR:
7997*a67afe4dSAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
7998*a67afe4dSAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
7999*a67afe4dSAndroid Build Coastguard Worker## what you are doing...
8000*a67afe4dSAndroid Build Coastguard Workerif test -n "$compiler"; then
8001*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
8002*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
8003*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
8004*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
8005*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
8006*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
8007*a67afe4dSAndroid Build Coastguard Worker
8008*a67afe4dSAndroid Build Coastguard Worker  _LT_CONFIG($1)
8009*a67afe4dSAndroid Build Coastguard Workerfi
8010*a67afe4dSAndroid Build Coastguard Worker
8011*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_RESTORE
8012*a67afe4dSAndroid Build Coastguard Worker
8013*a67afe4dSAndroid Build Coastguard WorkerGCC=$lt_save_GCC
8014*a67afe4dSAndroid Build Coastguard WorkerCC=$lt_save_CC
8015*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
8016*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_GCJ_CONFIG
8017*a67afe4dSAndroid Build Coastguard Worker
8018*a67afe4dSAndroid Build Coastguard Worker
8019*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_GO_CONFIG([TAG])
8020*a67afe4dSAndroid Build Coastguard Worker# --------------------------
8021*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Go compiler
8022*a67afe4dSAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8023*a67afe4dSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
8024*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_GO_CONFIG],
8025*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GO])dnl
8026*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_SAVE
8027*a67afe4dSAndroid Build Coastguard Worker
8028*a67afe4dSAndroid Build Coastguard Worker# Source file extension for Go test sources.
8029*a67afe4dSAndroid Build Coastguard Workerac_ext=go
8030*a67afe4dSAndroid Build Coastguard Worker
8031*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled Go test sources.
8032*a67afe4dSAndroid Build Coastguard Workerobjext=o
8033*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
8034*a67afe4dSAndroid Build Coastguard Worker
8035*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple compile tests
8036*a67afe4dSAndroid Build Coastguard Workerlt_simple_compile_test_code="package main; func main() { }"
8037*a67afe4dSAndroid Build Coastguard Worker
8038*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple link tests
8039*a67afe4dSAndroid Build Coastguard Workerlt_simple_link_test_code='package main; func main() { }'
8040*a67afe4dSAndroid Build Coastguard Worker
8041*a67afe4dSAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8042*a67afe4dSAndroid Build Coastguard Worker_LT_TAG_COMPILER
8043*a67afe4dSAndroid Build Coastguard Worker
8044*a67afe4dSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
8045*a67afe4dSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
8046*a67afe4dSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
8047*a67afe4dSAndroid Build Coastguard Worker
8048*a67afe4dSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
8049*a67afe4dSAndroid Build Coastguard Workerlt_save_CC=$CC
8050*a67afe4dSAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
8051*a67afe4dSAndroid Build Coastguard Workerlt_save_GCC=$GCC
8052*a67afe4dSAndroid Build Coastguard WorkerGCC=yes
8053*a67afe4dSAndroid Build Coastguard WorkerCC=${GOC-"gccgo"}
8054*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=$GOFLAGS
8055*a67afe4dSAndroid Build Coastguard Workercompiler=$CC
8056*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
8057*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)=$LD
8058*a67afe4dSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
8059*a67afe4dSAndroid Build Coastguard Worker
8060*a67afe4dSAndroid Build Coastguard Worker# Go did not exist at the time GCC didn't implicitly link libc in.
8061*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8062*a67afe4dSAndroid Build Coastguard Worker
8063*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8064*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
8065*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8066*a67afe4dSAndroid Build Coastguard Worker
8067*a67afe4dSAndroid Build Coastguard Worker## CAVEAT EMPTOR:
8068*a67afe4dSAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
8069*a67afe4dSAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
8070*a67afe4dSAndroid Build Coastguard Worker## what you are doing...
8071*a67afe4dSAndroid Build Coastguard Workerif test -n "$compiler"; then
8072*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
8073*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
8074*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
8075*a67afe4dSAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
8076*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
8077*a67afe4dSAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
8078*a67afe4dSAndroid Build Coastguard Worker
8079*a67afe4dSAndroid Build Coastguard Worker  _LT_CONFIG($1)
8080*a67afe4dSAndroid Build Coastguard Workerfi
8081*a67afe4dSAndroid Build Coastguard Worker
8082*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_RESTORE
8083*a67afe4dSAndroid Build Coastguard Worker
8084*a67afe4dSAndroid Build Coastguard WorkerGCC=$lt_save_GCC
8085*a67afe4dSAndroid Build Coastguard WorkerCC=$lt_save_CC
8086*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
8087*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_GO_CONFIG
8088*a67afe4dSAndroid Build Coastguard Worker
8089*a67afe4dSAndroid Build Coastguard Worker
8090*a67afe4dSAndroid Build Coastguard Worker# _LT_LANG_RC_CONFIG([TAG])
8091*a67afe4dSAndroid Build Coastguard Worker# -------------------------
8092*a67afe4dSAndroid Build Coastguard Worker# Ensure that the configuration variables for the Windows resource compiler
8093*a67afe4dSAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8094*a67afe4dSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
8095*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_LANG_RC_CONFIG],
8096*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_RC])dnl
8097*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_SAVE
8098*a67afe4dSAndroid Build Coastguard Worker
8099*a67afe4dSAndroid Build Coastguard Worker# Source file extension for RC test sources.
8100*a67afe4dSAndroid Build Coastguard Workerac_ext=rc
8101*a67afe4dSAndroid Build Coastguard Worker
8102*a67afe4dSAndroid Build Coastguard Worker# Object file extension for compiled RC test sources.
8103*a67afe4dSAndroid Build Coastguard Workerobjext=o
8104*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
8105*a67afe4dSAndroid Build Coastguard Worker
8106*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple compile tests
8107*a67afe4dSAndroid Build Coastguard Workerlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8108*a67afe4dSAndroid Build Coastguard Worker
8109*a67afe4dSAndroid Build Coastguard Worker# Code to be used in simple link tests
8110*a67afe4dSAndroid Build Coastguard Workerlt_simple_link_test_code=$lt_simple_compile_test_code
8111*a67afe4dSAndroid Build Coastguard Worker
8112*a67afe4dSAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8113*a67afe4dSAndroid Build Coastguard Worker_LT_TAG_COMPILER
8114*a67afe4dSAndroid Build Coastguard Worker
8115*a67afe4dSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
8116*a67afe4dSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
8117*a67afe4dSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
8118*a67afe4dSAndroid Build Coastguard Worker
8119*a67afe4dSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
8120*a67afe4dSAndroid Build Coastguard Workerlt_save_CC=$CC
8121*a67afe4dSAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
8122*a67afe4dSAndroid Build Coastguard Workerlt_save_GCC=$GCC
8123*a67afe4dSAndroid Build Coastguard WorkerGCC=
8124*a67afe4dSAndroid Build Coastguard WorkerCC=${RC-"windres"}
8125*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=
8126*a67afe4dSAndroid Build Coastguard Workercompiler=$CC
8127*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
8128*a67afe4dSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
8129*a67afe4dSAndroid Build Coastguard Worker_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8130*a67afe4dSAndroid Build Coastguard Worker
8131*a67afe4dSAndroid Build Coastguard Workerif test -n "$compiler"; then
8132*a67afe4dSAndroid Build Coastguard Worker  :
8133*a67afe4dSAndroid Build Coastguard Worker  _LT_CONFIG($1)
8134*a67afe4dSAndroid Build Coastguard Workerfi
8135*a67afe4dSAndroid Build Coastguard Worker
8136*a67afe4dSAndroid Build Coastguard WorkerGCC=$lt_save_GCC
8137*a67afe4dSAndroid Build Coastguard WorkerAC_LANG_RESTORE
8138*a67afe4dSAndroid Build Coastguard WorkerCC=$lt_save_CC
8139*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
8140*a67afe4dSAndroid Build Coastguard Worker])# _LT_LANG_RC_CONFIG
8141*a67afe4dSAndroid Build Coastguard Worker
8142*a67afe4dSAndroid Build Coastguard Worker
8143*a67afe4dSAndroid Build Coastguard Worker# LT_PROG_GCJ
8144*a67afe4dSAndroid Build Coastguard Worker# -----------
8145*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GCJ],
8146*a67afe4dSAndroid Build Coastguard Worker[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8147*a67afe4dSAndroid Build Coastguard Worker  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8148*a67afe4dSAndroid Build Coastguard Worker    [AC_CHECK_TOOL(GCJ, gcj,)
8149*a67afe4dSAndroid Build Coastguard Worker      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8150*a67afe4dSAndroid Build Coastguard Worker      AC_SUBST(GCJFLAGS)])])[]dnl
8151*a67afe4dSAndroid Build Coastguard Worker])
8152*a67afe4dSAndroid Build Coastguard Worker
8153*a67afe4dSAndroid Build Coastguard Worker# Old name:
8154*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8155*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
8156*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8157*a67afe4dSAndroid Build Coastguard Worker
8158*a67afe4dSAndroid Build Coastguard Worker
8159*a67afe4dSAndroid Build Coastguard Worker# LT_PROG_GO
8160*a67afe4dSAndroid Build Coastguard Worker# ----------
8161*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GO],
8162*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOL(GOC, gccgo,)
8163*a67afe4dSAndroid Build Coastguard Worker])
8164*a67afe4dSAndroid Build Coastguard Worker
8165*a67afe4dSAndroid Build Coastguard Worker
8166*a67afe4dSAndroid Build Coastguard Worker# LT_PROG_RC
8167*a67afe4dSAndroid Build Coastguard Worker# ----------
8168*a67afe4dSAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_RC],
8169*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOL(RC, windres,)
8170*a67afe4dSAndroid Build Coastguard Worker])
8171*a67afe4dSAndroid Build Coastguard Worker
8172*a67afe4dSAndroid Build Coastguard Worker# Old name:
8173*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8174*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
8175*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_RC], [])
8176*a67afe4dSAndroid Build Coastguard Worker
8177*a67afe4dSAndroid Build Coastguard Worker
8178*a67afe4dSAndroid Build Coastguard Worker# _LT_DECL_EGREP
8179*a67afe4dSAndroid Build Coastguard Worker# --------------
8180*a67afe4dSAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best grep
8181*a67afe4dSAndroid Build Coastguard Worker# available, choose the one first in the user's PATH.
8182*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_DECL_EGREP],
8183*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_EGREP])dnl
8184*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_FGREP])dnl
8185*a67afe4dSAndroid Build Coastguard Workertest -z "$GREP" && GREP=grep
8186*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8187*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [EGREP], [1], [An ERE matcher])
8188*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [FGREP], [1], [A literal string matcher])
8189*a67afe4dSAndroid Build Coastguard Workerdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8190*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([GREP])
8191*a67afe4dSAndroid Build Coastguard Worker])
8192*a67afe4dSAndroid Build Coastguard Worker
8193*a67afe4dSAndroid Build Coastguard Worker
8194*a67afe4dSAndroid Build Coastguard Worker# _LT_DECL_OBJDUMP
8195*a67afe4dSAndroid Build Coastguard Worker# --------------
8196*a67afe4dSAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best objdump
8197*a67afe4dSAndroid Build Coastguard Worker# available, choose the one first in the user's PATH.
8198*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_DECL_OBJDUMP],
8199*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8200*a67afe4dSAndroid Build Coastguard Workertest -z "$OBJDUMP" && OBJDUMP=objdump
8201*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8202*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([OBJDUMP])
8203*a67afe4dSAndroid Build Coastguard Worker])
8204*a67afe4dSAndroid Build Coastguard Worker
8205*a67afe4dSAndroid Build Coastguard Worker# _LT_DECL_DLLTOOL
8206*a67afe4dSAndroid Build Coastguard Worker# ----------------
8207*a67afe4dSAndroid Build Coastguard Worker# Ensure DLLTOOL variable is set.
8208*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_DECL_DLLTOOL],
8209*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8210*a67afe4dSAndroid Build Coastguard Workertest -z "$DLLTOOL" && DLLTOOL=dlltool
8211*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8212*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([DLLTOOL])
8213*a67afe4dSAndroid Build Coastguard Worker])
8214*a67afe4dSAndroid Build Coastguard Worker
8215*a67afe4dSAndroid Build Coastguard Worker# _LT_DECL_FILECMD
8216*a67afe4dSAndroid Build Coastguard Worker# ----------------
8217*a67afe4dSAndroid Build Coastguard Worker# Check for a file(cmd) program that can be used to detect file type and magic
8218*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_DECL_FILECMD],
8219*a67afe4dSAndroid Build Coastguard Worker[AC_CHECK_TOOL([FILECMD], [file], [:])
8220*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8221*a67afe4dSAndroid Build Coastguard Worker])# _LD_DECL_FILECMD
8222*a67afe4dSAndroid Build Coastguard Worker
8223*a67afe4dSAndroid Build Coastguard Worker# _LT_DECL_SED
8224*a67afe4dSAndroid Build Coastguard Worker# ------------
8225*a67afe4dSAndroid Build Coastguard Worker# Check for a fully-functional sed program, that truncates
8226*a67afe4dSAndroid Build Coastguard Worker# as few characters as possible.  Prefer GNU sed if found.
8227*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_DECL_SED],
8228*a67afe4dSAndroid Build Coastguard Worker[AC_PROG_SED
8229*a67afe4dSAndroid Build Coastguard Workertest -z "$SED" && SED=sed
8230*a67afe4dSAndroid Build Coastguard WorkerXsed="$SED -e 1s/^X//"
8231*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8232*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8233*a67afe4dSAndroid Build Coastguard Worker    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8234*a67afe4dSAndroid Build Coastguard Worker])# _LT_DECL_SED
8235*a67afe4dSAndroid Build Coastguard Worker
8236*a67afe4dSAndroid Build Coastguard Workerm4_ifndef([AC_PROG_SED], [
8237*a67afe4dSAndroid Build Coastguard Worker############################################################
8238*a67afe4dSAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into   #
8239*a67afe4dSAndroid Build Coastguard Worker#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8240*a67afe4dSAndroid Build Coastguard Worker#  a released version of Autoconf we should remove this    #
8241*a67afe4dSAndroid Build Coastguard Worker#  macro and use it instead.                               #
8242*a67afe4dSAndroid Build Coastguard Worker############################################################
8243*a67afe4dSAndroid Build Coastguard Worker
8244*a67afe4dSAndroid Build Coastguard Workerm4_defun([AC_PROG_SED],
8245*a67afe4dSAndroid Build Coastguard Worker[AC_MSG_CHECKING([for a sed that does not truncate output])
8246*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_SED,
8247*a67afe4dSAndroid Build Coastguard Worker[# Loop through the user's path and test for sed and gsed.
8248*a67afe4dSAndroid Build Coastguard Worker# Then use that list of sed's as ones to test for truncation.
8249*a67afe4dSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8250*a67afe4dSAndroid Build Coastguard Workerfor as_dir in $PATH
8251*a67afe4dSAndroid Build Coastguard Workerdo
8252*a67afe4dSAndroid Build Coastguard Worker  IFS=$as_save_IFS
8253*a67afe4dSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
8254*a67afe4dSAndroid Build Coastguard Worker  for lt_ac_prog in sed gsed; do
8255*a67afe4dSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
8256*a67afe4dSAndroid Build Coastguard Worker      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8257*a67afe4dSAndroid Build Coastguard Worker        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8258*a67afe4dSAndroid Build Coastguard Worker      fi
8259*a67afe4dSAndroid Build Coastguard Worker    done
8260*a67afe4dSAndroid Build Coastguard Worker  done
8261*a67afe4dSAndroid Build Coastguard Workerdone
8262*a67afe4dSAndroid Build Coastguard WorkerIFS=$as_save_IFS
8263*a67afe4dSAndroid Build Coastguard Workerlt_ac_max=0
8264*a67afe4dSAndroid Build Coastguard Workerlt_ac_count=0
8265*a67afe4dSAndroid Build Coastguard Worker# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8266*a67afe4dSAndroid Build Coastguard Worker# along with /bin/sed that truncates output.
8267*a67afe4dSAndroid Build Coastguard Workerfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8268*a67afe4dSAndroid Build Coastguard Worker  test ! -f "$lt_ac_sed" && continue
8269*a67afe4dSAndroid Build Coastguard Worker  cat /dev/null > conftest.in
8270*a67afe4dSAndroid Build Coastguard Worker  lt_ac_count=0
8271*a67afe4dSAndroid Build Coastguard Worker  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8272*a67afe4dSAndroid Build Coastguard Worker  # Check for GNU sed and select it if it is found.
8273*a67afe4dSAndroid Build Coastguard Worker  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8274*a67afe4dSAndroid Build Coastguard Worker    lt_cv_path_SED=$lt_ac_sed
8275*a67afe4dSAndroid Build Coastguard Worker    break
8276*a67afe4dSAndroid Build Coastguard Worker  fi
8277*a67afe4dSAndroid Build Coastguard Worker  while true; do
8278*a67afe4dSAndroid Build Coastguard Worker    cat conftest.in conftest.in >conftest.tmp
8279*a67afe4dSAndroid Build Coastguard Worker    mv conftest.tmp conftest.in
8280*a67afe4dSAndroid Build Coastguard Worker    cp conftest.in conftest.nl
8281*a67afe4dSAndroid Build Coastguard Worker    echo >>conftest.nl
8282*a67afe4dSAndroid Build Coastguard Worker    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8283*a67afe4dSAndroid Build Coastguard Worker    cmp -s conftest.out conftest.nl || break
8284*a67afe4dSAndroid Build Coastguard Worker    # 10000 chars as input seems more than enough
8285*a67afe4dSAndroid Build Coastguard Worker    test 10 -lt "$lt_ac_count" && break
8286*a67afe4dSAndroid Build Coastguard Worker    lt_ac_count=`expr $lt_ac_count + 1`
8287*a67afe4dSAndroid Build Coastguard Worker    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8288*a67afe4dSAndroid Build Coastguard Worker      lt_ac_max=$lt_ac_count
8289*a67afe4dSAndroid Build Coastguard Worker      lt_cv_path_SED=$lt_ac_sed
8290*a67afe4dSAndroid Build Coastguard Worker    fi
8291*a67afe4dSAndroid Build Coastguard Worker  done
8292*a67afe4dSAndroid Build Coastguard Workerdone
8293*a67afe4dSAndroid Build Coastguard Worker])
8294*a67afe4dSAndroid Build Coastguard WorkerSED=$lt_cv_path_SED
8295*a67afe4dSAndroid Build Coastguard WorkerAC_SUBST([SED])
8296*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_RESULT([$SED])
8297*a67afe4dSAndroid Build Coastguard Worker])#AC_PROG_SED
8298*a67afe4dSAndroid Build Coastguard Worker])#m4_ifndef
8299*a67afe4dSAndroid Build Coastguard Worker
8300*a67afe4dSAndroid Build Coastguard Worker# Old name:
8301*a67afe4dSAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8302*a67afe4dSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
8303*a67afe4dSAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_SED], [])
8304*a67afe4dSAndroid Build Coastguard Worker
8305*a67afe4dSAndroid Build Coastguard Worker
8306*a67afe4dSAndroid Build Coastguard Worker# _LT_CHECK_SHELL_FEATURES
8307*a67afe4dSAndroid Build Coastguard Worker# ------------------------
8308*a67afe4dSAndroid Build Coastguard Worker# Find out whether the shell is Bourne or XSI compatible,
8309*a67afe4dSAndroid Build Coastguard Worker# or has some other useful features.
8310*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHELL_FEATURES],
8311*a67afe4dSAndroid Build Coastguard Worker[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8312*a67afe4dSAndroid Build Coastguard Worker  lt_unset=unset
8313*a67afe4dSAndroid Build Coastguard Workerelse
8314*a67afe4dSAndroid Build Coastguard Worker  lt_unset=false
8315*a67afe4dSAndroid Build Coastguard Workerfi
8316*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8317*a67afe4dSAndroid Build Coastguard Worker
8318*a67afe4dSAndroid Build Coastguard Worker# test EBCDIC or ASCII
8319*a67afe4dSAndroid Build Coastguard Workercase `echo X|tr X '\101'` in
8320*a67afe4dSAndroid Build Coastguard Worker A) # ASCII based system
8321*a67afe4dSAndroid Build Coastguard Worker    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8322*a67afe4dSAndroid Build Coastguard Worker  lt_SP2NL='tr \040 \012'
8323*a67afe4dSAndroid Build Coastguard Worker  lt_NL2SP='tr \015\012 \040\040'
8324*a67afe4dSAndroid Build Coastguard Worker  ;;
8325*a67afe4dSAndroid Build Coastguard Worker *) # EBCDIC based system
8326*a67afe4dSAndroid Build Coastguard Worker  lt_SP2NL='tr \100 \n'
8327*a67afe4dSAndroid Build Coastguard Worker  lt_NL2SP='tr \r\n \100\100'
8328*a67afe4dSAndroid Build Coastguard Worker  ;;
8329*a67afe4dSAndroid Build Coastguard Workeresac
8330*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8331*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8332*a67afe4dSAndroid Build Coastguard Worker])# _LT_CHECK_SHELL_FEATURES
8333*a67afe4dSAndroid Build Coastguard Worker
8334*a67afe4dSAndroid Build Coastguard Worker
8335*a67afe4dSAndroid Build Coastguard Worker# _LT_PATH_CONVERSION_FUNCTIONS
8336*a67afe4dSAndroid Build Coastguard Worker# -----------------------------
8337*a67afe4dSAndroid Build Coastguard Worker# Determine what file name conversion functions should be used by
8338*a67afe4dSAndroid Build Coastguard Worker# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8339*a67afe4dSAndroid Build Coastguard Worker# for certain cross-compile configurations and native mingw.
8340*a67afe4dSAndroid Build Coastguard Workerm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8341*a67afe4dSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8342*a67afe4dSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
8343*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to $host format])
8344*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_host_file_cmd,
8345*a67afe4dSAndroid Build Coastguard Worker[case $host in
8346*a67afe4dSAndroid Build Coastguard Worker  *-*-mingw* )
8347*a67afe4dSAndroid Build Coastguard Worker    case $build in
8348*a67afe4dSAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
8349*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8350*a67afe4dSAndroid Build Coastguard Worker        ;;
8351*a67afe4dSAndroid Build Coastguard Worker      *-*-cygwin* )
8352*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8353*a67afe4dSAndroid Build Coastguard Worker        ;;
8354*a67afe4dSAndroid Build Coastguard Worker      * ) # otherwise, assume *nix
8355*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8356*a67afe4dSAndroid Build Coastguard Worker        ;;
8357*a67afe4dSAndroid Build Coastguard Worker    esac
8358*a67afe4dSAndroid Build Coastguard Worker    ;;
8359*a67afe4dSAndroid Build Coastguard Worker  *-*-cygwin* )
8360*a67afe4dSAndroid Build Coastguard Worker    case $build in
8361*a67afe4dSAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
8362*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8363*a67afe4dSAndroid Build Coastguard Worker        ;;
8364*a67afe4dSAndroid Build Coastguard Worker      *-*-cygwin* )
8365*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_noop
8366*a67afe4dSAndroid Build Coastguard Worker        ;;
8367*a67afe4dSAndroid Build Coastguard Worker      * ) # otherwise, assume *nix
8368*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8369*a67afe4dSAndroid Build Coastguard Worker        ;;
8370*a67afe4dSAndroid Build Coastguard Worker    esac
8371*a67afe4dSAndroid Build Coastguard Worker    ;;
8372*a67afe4dSAndroid Build Coastguard Worker  * ) # unhandled hosts (and "normal" native builds)
8373*a67afe4dSAndroid Build Coastguard Worker    lt_cv_to_host_file_cmd=func_convert_file_noop
8374*a67afe4dSAndroid Build Coastguard Worker    ;;
8375*a67afe4dSAndroid Build Coastguard Workeresac
8376*a67afe4dSAndroid Build Coastguard Worker])
8377*a67afe4dSAndroid Build Coastguard Workerto_host_file_cmd=$lt_cv_to_host_file_cmd
8378*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8379*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8380*a67afe4dSAndroid Build Coastguard Worker         [0], [convert $build file names to $host format])dnl
8381*a67afe4dSAndroid Build Coastguard Worker
8382*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to toolchain format])
8383*a67afe4dSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8384*a67afe4dSAndroid Build Coastguard Worker[#assume ordinary cross tools, or native build.
8385*a67afe4dSAndroid Build Coastguard Workerlt_cv_to_tool_file_cmd=func_convert_file_noop
8386*a67afe4dSAndroid Build Coastguard Workercase $host in
8387*a67afe4dSAndroid Build Coastguard Worker  *-*-mingw* )
8388*a67afe4dSAndroid Build Coastguard Worker    case $build in
8389*a67afe4dSAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
8390*a67afe4dSAndroid Build Coastguard Worker        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8391*a67afe4dSAndroid Build Coastguard Worker        ;;
8392*a67afe4dSAndroid Build Coastguard Worker    esac
8393*a67afe4dSAndroid Build Coastguard Worker    ;;
8394*a67afe4dSAndroid Build Coastguard Workeresac
8395*a67afe4dSAndroid Build Coastguard Worker])
8396*a67afe4dSAndroid Build Coastguard Workerto_tool_file_cmd=$lt_cv_to_tool_file_cmd
8397*a67afe4dSAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8398*a67afe4dSAndroid Build Coastguard Worker_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8399*a67afe4dSAndroid Build Coastguard Worker         [0], [convert $build files to toolchain format])dnl
8400*a67afe4dSAndroid Build Coastguard Worker])# _LT_PATH_CONVERSION_FUNCTIONS
8401