xref: /aosp_15_r20/external/curl/m4/libtool.m4 (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2*6236dae4SAndroid Build Coastguard Worker#
3*6236dae4SAndroid Build Coastguard Worker#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
4*6236dae4SAndroid Build Coastguard Worker#   Foundation, Inc.
5*6236dae4SAndroid Build Coastguard Worker#   Written by Gordon Matzigkeit, 1996
6*6236dae4SAndroid Build Coastguard Worker#
7*6236dae4SAndroid Build Coastguard Worker# This file is free software; the Free Software Foundation gives
8*6236dae4SAndroid Build Coastguard Worker# unlimited permission to copy and/or distribute it, with or without
9*6236dae4SAndroid Build Coastguard Worker# modifications, as long as this notice is preserved.
10*6236dae4SAndroid Build Coastguard Worker
11*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_COPYING], [dnl
12*6236dae4SAndroid Build Coastguard Worker# Copyright (C) 2014 Free Software Foundation, Inc.
13*6236dae4SAndroid Build Coastguard Worker# This is free software; see the source for copying conditions.  There is NO
14*6236dae4SAndroid Build Coastguard Worker# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15*6236dae4SAndroid Build Coastguard Worker
16*6236dae4SAndroid Build Coastguard Worker# GNU Libtool is free software; you can redistribute it and/or modify
17*6236dae4SAndroid Build Coastguard Worker# it under the terms of the GNU General Public License as published by
18*6236dae4SAndroid Build Coastguard Worker# the Free Software Foundation; either version 2 of of the License, or
19*6236dae4SAndroid Build Coastguard Worker# (at your option) any later version.
20*6236dae4SAndroid Build Coastguard Worker#
21*6236dae4SAndroid Build Coastguard Worker# As a special exception to the GNU General Public License, if you
22*6236dae4SAndroid Build Coastguard Worker# distribute this file as part of a program or library that is built
23*6236dae4SAndroid Build Coastguard Worker# using GNU Libtool, you may include this file under the  same
24*6236dae4SAndroid Build Coastguard Worker# distribution terms that you use for the rest of that program.
25*6236dae4SAndroid Build Coastguard Worker#
26*6236dae4SAndroid Build Coastguard Worker# GNU Libtool is distributed in the hope that it will be useful, but
27*6236dae4SAndroid Build Coastguard Worker# WITHOUT ANY WARRANTY; without even the implied warranty of
28*6236dae4SAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29*6236dae4SAndroid Build Coastguard Worker# GNU General Public License for more details.
30*6236dae4SAndroid Build Coastguard Worker#
31*6236dae4SAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License
32*6236dae4SAndroid Build Coastguard Worker# along with this program.  If not, see <http://www.gnu.org/licenses/>.
33*6236dae4SAndroid Build Coastguard Worker])
34*6236dae4SAndroid Build Coastguard Worker
35*6236dae4SAndroid Build Coastguard Worker# serial 59 LT_INIT
36*6236dae4SAndroid Build Coastguard Worker
37*6236dae4SAndroid Build Coastguard Worker
38*6236dae4SAndroid Build Coastguard Worker# LT_PREREQ(VERSION)
39*6236dae4SAndroid Build Coastguard Worker# ------------------
40*6236dae4SAndroid Build Coastguard Worker# Complain and exit if this libtool version is less that VERSION.
41*6236dae4SAndroid Build Coastguard Workerm4_defun([LT_PREREQ],
42*6236dae4SAndroid Build Coastguard Worker[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
43*6236dae4SAndroid Build Coastguard Worker       [m4_default([$3],
44*6236dae4SAndroid Build Coastguard Worker		   [m4_fatal([Libtool version $1 or higher is required],
45*6236dae4SAndroid Build Coastguard Worker		             63)])],
46*6236dae4SAndroid Build Coastguard Worker       [$2])])
47*6236dae4SAndroid Build Coastguard Worker
48*6236dae4SAndroid Build Coastguard Worker
49*6236dae4SAndroid Build Coastguard Worker# _LT_CHECK_BUILDDIR
50*6236dae4SAndroid Build Coastguard Worker# ------------------
51*6236dae4SAndroid Build Coastguard Worker# Complain if the absolute build directory name contains unusual characters
52*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_BUILDDIR],
53*6236dae4SAndroid Build Coastguard Worker[case `pwd` in
54*6236dae4SAndroid Build Coastguard Worker  *\ * | *\	*)
55*6236dae4SAndroid Build Coastguard Worker    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
56*6236dae4SAndroid Build Coastguard Workeresac
57*6236dae4SAndroid Build Coastguard Worker])
58*6236dae4SAndroid Build Coastguard Worker
59*6236dae4SAndroid Build Coastguard Worker
60*6236dae4SAndroid Build Coastguard Worker# LT_INIT([OPTIONS])
61*6236dae4SAndroid Build Coastguard Worker# ------------------
62*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_INIT],
63*6236dae4SAndroid Build Coastguard Worker[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
64*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
65*6236dae4SAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_LANG])dnl
66*6236dae4SAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_OUTPUT])dnl
67*6236dae4SAndroid Build Coastguard WorkerAC_BEFORE([$0], [LTDL_INIT])dnl
68*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CHECK_BUILDDIR])dnl
69*6236dae4SAndroid Build Coastguard Worker
70*6236dae4SAndroid Build Coastguard Workerdnl Autoconf doesn't catch unexpanded LT_ macros by default:
71*6236dae4SAndroid Build Coastguard Workerm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
72*6236dae4SAndroid Build Coastguard Workerm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
73*6236dae4SAndroid Build Coastguard Workerdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
74*6236dae4SAndroid Build Coastguard Workerdnl unless we require an AC_DEFUNed macro:
75*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LTOPTIONS_VERSION])dnl
76*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LTSUGAR_VERSION])dnl
77*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LTVERSION_VERSION])dnl
78*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LTOBSOLETE_VERSION])dnl
79*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_PROG_LTMAIN])dnl
80*6236dae4SAndroid Build Coastguard Worker
81*6236dae4SAndroid Build Coastguard Worker_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
82*6236dae4SAndroid Build Coastguard Worker
83*6236dae4SAndroid Build Coastguard Workerdnl Parse OPTIONS
84*6236dae4SAndroid Build Coastguard Worker_LT_SET_OPTIONS([$0], [$1])
85*6236dae4SAndroid Build Coastguard Worker
86*6236dae4SAndroid Build Coastguard Worker# This can be used to rebuild libtool when needed
87*6236dae4SAndroid Build Coastguard WorkerLIBTOOL_DEPS=$ltmain
88*6236dae4SAndroid Build Coastguard Worker
89*6236dae4SAndroid Build Coastguard Worker# Always use our own libtool.
90*6236dae4SAndroid Build Coastguard WorkerLIBTOOL='$(SHELL) $(top_builddir)/libtool'
91*6236dae4SAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL)dnl
92*6236dae4SAndroid Build Coastguard Worker
93*6236dae4SAndroid Build Coastguard Worker_LT_SETUP
94*6236dae4SAndroid Build Coastguard Worker
95*6236dae4SAndroid Build Coastguard Worker# Only expand once:
96*6236dae4SAndroid Build Coastguard Workerm4_define([LT_INIT])
97*6236dae4SAndroid Build Coastguard Worker])# LT_INIT
98*6236dae4SAndroid Build Coastguard Worker
99*6236dae4SAndroid Build Coastguard Worker# Old names:
100*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
101*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
102*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
103*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
104*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
105*6236dae4SAndroid Build Coastguard Worker
106*6236dae4SAndroid Build Coastguard Worker
107*6236dae4SAndroid Build Coastguard Worker# _LT_PREPARE_CC_BASENAME
108*6236dae4SAndroid Build Coastguard Worker# -----------------------
109*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_CC_BASENAME], [
110*6236dae4SAndroid Build Coastguard Worker# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
111*6236dae4SAndroid Build Coastguard Workerfunc_cc_basename ()
112*6236dae4SAndroid Build Coastguard Worker{
113*6236dae4SAndroid Build Coastguard Worker    for cc_temp in @S|@*""; do
114*6236dae4SAndroid Build Coastguard Worker      case $cc_temp in
115*6236dae4SAndroid Build Coastguard Worker        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116*6236dae4SAndroid Build Coastguard Worker        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
117*6236dae4SAndroid Build Coastguard Worker        \-*) ;;
118*6236dae4SAndroid Build Coastguard Worker        *) break;;
119*6236dae4SAndroid Build Coastguard Worker      esac
120*6236dae4SAndroid Build Coastguard Worker    done
121*6236dae4SAndroid Build Coastguard Worker    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
122*6236dae4SAndroid Build Coastguard Worker}
123*6236dae4SAndroid Build Coastguard Worker])# _LT_PREPARE_CC_BASENAME
124*6236dae4SAndroid Build Coastguard Worker
125*6236dae4SAndroid Build Coastguard Worker
126*6236dae4SAndroid Build Coastguard Worker# _LT_CC_BASENAME(CC)
127*6236dae4SAndroid Build Coastguard Worker# -------------------
128*6236dae4SAndroid Build Coastguard Worker# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
129*6236dae4SAndroid Build Coastguard Worker# but that macro is also expanded into generated libtool script, which
130*6236dae4SAndroid Build Coastguard Worker# arranges for $SED and $ECHO to be set by different means.
131*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CC_BASENAME],
132*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_PREPARE_CC_BASENAME])dnl
133*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED])dnl
134*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
135*6236dae4SAndroid Build Coastguard Workerfunc_cc_basename $1
136*6236dae4SAndroid Build Coastguard Workercc_basename=$func_cc_basename_result
137*6236dae4SAndroid Build Coastguard Worker])
138*6236dae4SAndroid Build Coastguard Worker
139*6236dae4SAndroid Build Coastguard Worker
140*6236dae4SAndroid Build Coastguard Worker# _LT_FILEUTILS_DEFAULTS
141*6236dae4SAndroid Build Coastguard Worker# ----------------------
142*6236dae4SAndroid Build Coastguard Worker# It is okay to use these file commands and assume they have been set
143*6236dae4SAndroid Build Coastguard Worker# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
144*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_FILEUTILS_DEFAULTS],
145*6236dae4SAndroid Build Coastguard Worker[: ${CP="cp -f"}
146*6236dae4SAndroid Build Coastguard Worker: ${MV="mv -f"}
147*6236dae4SAndroid Build Coastguard Worker: ${RM="rm -f"}
148*6236dae4SAndroid Build Coastguard Worker])# _LT_FILEUTILS_DEFAULTS
149*6236dae4SAndroid Build Coastguard Worker
150*6236dae4SAndroid Build Coastguard Worker
151*6236dae4SAndroid Build Coastguard Worker# _LT_SETUP
152*6236dae4SAndroid Build Coastguard Worker# ---------
153*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_SETUP],
154*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
155*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
156*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
157*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
158*6236dae4SAndroid Build Coastguard Worker
159*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
160*6236dae4SAndroid Build Coastguard Workerdnl
161*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [host_alias], [0], [The host system])dnl
162*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [host], [0])dnl
163*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [host_os], [0])dnl
164*6236dae4SAndroid Build Coastguard Workerdnl
165*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [build_alias], [0], [The build system])dnl
166*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [build], [0])dnl
167*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [build_os], [0])dnl
168*6236dae4SAndroid Build Coastguard Workerdnl
169*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl
170*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl
171*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
172*6236dae4SAndroid Build Coastguard Workerdnl
173*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_LN_S])dnl
174*6236dae4SAndroid Build Coastguard Workertest -z "$LN_S" && LN_S="ln -s"
175*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176*6236dae4SAndroid Build Coastguard Workerdnl
177*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LT_CMD_MAX_LEN])dnl
178*6236dae4SAndroid Build Coastguard Worker_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180*6236dae4SAndroid Build Coastguard Workerdnl
181*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
182*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl
183*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
184*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CMD_RELOAD])dnl
185*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_FILECMD])dnl
186*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CHECK_MAGIC_METHOD])dnl
187*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
188*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CMD_OLD_ARCHIVE])dnl
189*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
190*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_WITH_SYSROOT])dnl
191*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CMD_TRUNCATE])dnl
192*6236dae4SAndroid Build Coastguard Worker
193*6236dae4SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([
194*6236dae4SAndroid Build Coastguard Worker# See if we are running on zsh, and set the options that allow our
195*6236dae4SAndroid Build Coastguard Worker# commands through without removal of \ escapes INIT.
196*6236dae4SAndroid Build Coastguard Workerif test -n "\${ZSH_VERSION+set}"; then
197*6236dae4SAndroid Build Coastguard Worker   setopt NO_GLOB_SUBST
198*6236dae4SAndroid Build Coastguard Workerfi
199*6236dae4SAndroid Build Coastguard Worker])
200*6236dae4SAndroid Build Coastguard Workerif test -n "${ZSH_VERSION+set}"; then
201*6236dae4SAndroid Build Coastguard Worker   setopt NO_GLOB_SUBST
202*6236dae4SAndroid Build Coastguard Workerfi
203*6236dae4SAndroid Build Coastguard Worker
204*6236dae4SAndroid Build Coastguard Worker_LT_CHECK_OBJDIR
205*6236dae4SAndroid Build Coastguard Worker
206*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
207*6236dae4SAndroid Build Coastguard Worker
208*6236dae4SAndroid Build Coastguard Workercase $host_os in
209*6236dae4SAndroid Build Coastguard Workeraix3*)
210*6236dae4SAndroid Build Coastguard Worker  # AIX sometimes has problems with the GCC collect2 program.  For some
211*6236dae4SAndroid Build Coastguard Worker  # reason, if we set the COLLECT_NAMES environment variable, the problems
212*6236dae4SAndroid Build Coastguard Worker  # vanish in a puff of smoke.
213*6236dae4SAndroid Build Coastguard Worker  if test set != "${COLLECT_NAMES+set}"; then
214*6236dae4SAndroid Build Coastguard Worker    COLLECT_NAMES=
215*6236dae4SAndroid Build Coastguard Worker    export COLLECT_NAMES
216*6236dae4SAndroid Build Coastguard Worker  fi
217*6236dae4SAndroid Build Coastguard Worker  ;;
218*6236dae4SAndroid Build Coastguard Workeresac
219*6236dae4SAndroid Build Coastguard Worker
220*6236dae4SAndroid Build Coastguard Worker# Global variables:
221*6236dae4SAndroid Build Coastguard Workerofile=libtool
222*6236dae4SAndroid Build Coastguard Workercan_build_shared=yes
223*6236dae4SAndroid Build Coastguard Worker
224*6236dae4SAndroid Build Coastguard Worker# All known linkers require a '.a' archive for static linking (except MSVC and
225*6236dae4SAndroid Build Coastguard Worker# ICC, which need '.lib').
226*6236dae4SAndroid Build Coastguard Workerlibext=a
227*6236dae4SAndroid Build Coastguard Worker
228*6236dae4SAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld
229*6236dae4SAndroid Build Coastguard Worker
230*6236dae4SAndroid Build Coastguard Workerold_CC=$CC
231*6236dae4SAndroid Build Coastguard Workerold_CFLAGS=$CFLAGS
232*6236dae4SAndroid Build Coastguard Worker
233*6236dae4SAndroid Build Coastguard Worker# Set sane defaults for various variables
234*6236dae4SAndroid Build Coastguard Workertest -z "$CC" && CC=cc
235*6236dae4SAndroid Build Coastguard Workertest -z "$LTCC" && LTCC=$CC
236*6236dae4SAndroid Build Coastguard Workertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
237*6236dae4SAndroid Build Coastguard Workertest -z "$LD" && LD=ld
238*6236dae4SAndroid Build Coastguard Workertest -z "$ac_objext" && ac_objext=o
239*6236dae4SAndroid Build Coastguard Worker
240*6236dae4SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
241*6236dae4SAndroid Build Coastguard Worker
242*6236dae4SAndroid Build Coastguard Worker# Only perform the check for file, if the check method requires it
243*6236dae4SAndroid Build Coastguard Workertest -z "$MAGIC_CMD" && MAGIC_CMD=file
244*6236dae4SAndroid Build Coastguard Workercase $deplibs_check_method in
245*6236dae4SAndroid Build Coastguard Workerfile_magic*)
246*6236dae4SAndroid Build Coastguard Worker  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
247*6236dae4SAndroid Build Coastguard Worker    _LT_PATH_MAGIC
248*6236dae4SAndroid Build Coastguard Worker  fi
249*6236dae4SAndroid Build Coastguard Worker  ;;
250*6236dae4SAndroid Build Coastguard Workeresac
251*6236dae4SAndroid Build Coastguard Worker
252*6236dae4SAndroid Build Coastguard Worker# Use C for the default configuration in the libtool script
253*6236dae4SAndroid Build Coastguard WorkerLT_SUPPORTED_TAG([CC])
254*6236dae4SAndroid Build Coastguard Worker_LT_LANG_C_CONFIG
255*6236dae4SAndroid Build Coastguard Worker_LT_LANG_DEFAULT_CONFIG
256*6236dae4SAndroid Build Coastguard Worker_LT_CONFIG_COMMANDS
257*6236dae4SAndroid Build Coastguard Worker])# _LT_SETUP
258*6236dae4SAndroid Build Coastguard Worker
259*6236dae4SAndroid Build Coastguard Worker
260*6236dae4SAndroid Build Coastguard Worker# _LT_PREPARE_SED_QUOTE_VARS
261*6236dae4SAndroid Build Coastguard Worker# --------------------------
262*6236dae4SAndroid Build Coastguard Worker# Define a few sed substitution that help us do robust quoting.
263*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
264*6236dae4SAndroid Build Coastguard Worker[# Backslashify metacharacters that are still active within
265*6236dae4SAndroid Build Coastguard Worker# double-quoted strings.
266*6236dae4SAndroid Build Coastguard Workersed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
267*6236dae4SAndroid Build Coastguard Worker
268*6236dae4SAndroid Build Coastguard Worker# Same as above, but do not quote variable references.
269*6236dae4SAndroid Build Coastguard Workerdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
270*6236dae4SAndroid Build Coastguard Worker
271*6236dae4SAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped shell variable in a
272*6236dae4SAndroid Build Coastguard Worker# double_quote_subst'ed string.
273*6236dae4SAndroid Build Coastguard Workerdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
274*6236dae4SAndroid Build Coastguard Worker
275*6236dae4SAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped single quote.
276*6236dae4SAndroid Build Coastguard Workerdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
277*6236dae4SAndroid Build Coastguard Worker
278*6236dae4SAndroid Build Coastguard Worker# Sed substitution to avoid accidental globbing in evaled expressions
279*6236dae4SAndroid Build Coastguard Workerno_glob_subst='s/\*/\\\*/g'
280*6236dae4SAndroid Build Coastguard Worker])
281*6236dae4SAndroid Build Coastguard Worker
282*6236dae4SAndroid Build Coastguard Worker# _LT_PROG_LTMAIN
283*6236dae4SAndroid Build Coastguard Worker# ---------------
284*6236dae4SAndroid Build Coastguard Worker# Note that this code is called both from 'configure', and 'config.status'
285*6236dae4SAndroid Build Coastguard Worker# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
286*6236dae4SAndroid Build Coastguard Worker# 'config.status' has no value for ac_aux_dir unless we are using Automake,
287*6236dae4SAndroid Build Coastguard Worker# so we pass a copy along to make sure it has a sensible value anyway.
288*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PROG_LTMAIN],
289*6236dae4SAndroid Build Coastguard Worker[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
290*6236dae4SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
291*6236dae4SAndroid Build Coastguard Workerltmain=$ac_aux_dir/ltmain.sh
292*6236dae4SAndroid Build Coastguard Worker])# _LT_PROG_LTMAIN
293*6236dae4SAndroid Build Coastguard Worker
294*6236dae4SAndroid Build Coastguard Worker
295*6236dae4SAndroid Build Coastguard Worker## ------------------------------------- ##
296*6236dae4SAndroid Build Coastguard Worker## Accumulate code for creating libtool. ##
297*6236dae4SAndroid Build Coastguard Worker## ------------------------------------- ##
298*6236dae4SAndroid Build Coastguard Worker
299*6236dae4SAndroid Build Coastguard Worker# So that we can recreate a full libtool script including additional
300*6236dae4SAndroid Build Coastguard Worker# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
301*6236dae4SAndroid Build Coastguard Worker# in macros and then make a single call at the end using the 'libtool'
302*6236dae4SAndroid Build Coastguard Worker# label.
303*6236dae4SAndroid Build Coastguard Worker
304*6236dae4SAndroid Build Coastguard Worker
305*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
306*6236dae4SAndroid Build Coastguard Worker# ----------------------------------------
307*6236dae4SAndroid Build Coastguard Worker# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL_INIT],
309*6236dae4SAndroid Build Coastguard Worker[m4_ifval([$1],
310*6236dae4SAndroid Build Coastguard Worker          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
311*6236dae4SAndroid Build Coastguard Worker                     [$1
312*6236dae4SAndroid Build Coastguard Worker])])])
313*6236dae4SAndroid Build Coastguard Worker
314*6236dae4SAndroid Build Coastguard Worker# Initialize.
315*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_INIT])
316*6236dae4SAndroid Build Coastguard Worker
317*6236dae4SAndroid Build Coastguard Worker
318*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL([COMMANDS])
319*6236dae4SAndroid Build Coastguard Worker# ------------------------------
320*6236dae4SAndroid Build Coastguard Worker# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
321*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL],
322*6236dae4SAndroid Build Coastguard Worker[m4_ifval([$1],
323*6236dae4SAndroid Build Coastguard Worker          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
324*6236dae4SAndroid Build Coastguard Worker                     [$1
325*6236dae4SAndroid Build Coastguard Worker])])])
326*6236dae4SAndroid Build Coastguard Worker
327*6236dae4SAndroid Build Coastguard Worker# Initialize.
328*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
329*6236dae4SAndroid Build Coastguard Worker
330*6236dae4SAndroid Build Coastguard Worker
331*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
332*6236dae4SAndroid Build Coastguard Worker# -----------------------------------------------------
333*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_SAVE_COMMANDS],
334*6236dae4SAndroid Build Coastguard Worker[_LT_CONFIG_LIBTOOL([$1])
335*6236dae4SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([$2])
336*6236dae4SAndroid Build Coastguard Worker])
337*6236dae4SAndroid Build Coastguard Worker
338*6236dae4SAndroid Build Coastguard Worker
339*6236dae4SAndroid Build Coastguard Worker# _LT_FORMAT_COMMENT([COMMENT])
340*6236dae4SAndroid Build Coastguard Worker# -----------------------------
341*6236dae4SAndroid Build Coastguard Worker# Add leading comment marks to the start of each line, and a trailing
342*6236dae4SAndroid Build Coastguard Worker# full-stop to the whole comment if one is not present already.
343*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_FORMAT_COMMENT],
344*6236dae4SAndroid Build Coastguard Worker[m4_ifval([$1], [
345*6236dae4SAndroid Build Coastguard Workerm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
346*6236dae4SAndroid Build Coastguard Worker              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
347*6236dae4SAndroid Build Coastguard Worker)])
348*6236dae4SAndroid Build Coastguard Worker
349*6236dae4SAndroid Build Coastguard Worker
350*6236dae4SAndroid Build Coastguard Worker
351*6236dae4SAndroid Build Coastguard Worker## ------------------------ ##
352*6236dae4SAndroid Build Coastguard Worker## FIXME: Eliminate VARNAME ##
353*6236dae4SAndroid Build Coastguard Worker## ------------------------ ##
354*6236dae4SAndroid Build Coastguard Worker
355*6236dae4SAndroid Build Coastguard Worker
356*6236dae4SAndroid Build Coastguard Worker# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
357*6236dae4SAndroid Build Coastguard Worker# -------------------------------------------------------------------
358*6236dae4SAndroid Build Coastguard Worker# CONFIGNAME is the name given to the value in the libtool script.
359*6236dae4SAndroid Build Coastguard Worker# VARNAME is the (base) name used in the configure script.
360*6236dae4SAndroid Build Coastguard Worker# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
361*6236dae4SAndroid Build Coastguard Worker# VARNAME.  Any other value will be used directly.
362*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_DECL],
363*6236dae4SAndroid Build Coastguard Worker[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
364*6236dae4SAndroid Build Coastguard Worker    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
365*6236dae4SAndroid Build Coastguard Worker	[m4_ifval([$1], [$1], [$2])])
366*6236dae4SAndroid Build Coastguard Worker    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
367*6236dae4SAndroid Build Coastguard Worker    m4_ifval([$4],
368*6236dae4SAndroid Build Coastguard Worker	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
369*6236dae4SAndroid Build Coastguard Worker    lt_dict_add_subkey([lt_decl_dict], [$2],
370*6236dae4SAndroid Build Coastguard Worker	[tagged?], [m4_ifval([$5], [yes], [no])])])
371*6236dae4SAndroid Build Coastguard Worker])
372*6236dae4SAndroid Build Coastguard Worker
373*6236dae4SAndroid Build Coastguard Worker
374*6236dae4SAndroid Build Coastguard Worker# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
375*6236dae4SAndroid Build Coastguard Worker# --------------------------------------------------------
376*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
377*6236dae4SAndroid Build Coastguard Worker
378*6236dae4SAndroid Build Coastguard Worker
379*6236dae4SAndroid Build Coastguard Worker# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
380*6236dae4SAndroid Build Coastguard Worker# ------------------------------------------------
381*6236dae4SAndroid Build Coastguard Workerm4_define([lt_decl_tag_varnames],
382*6236dae4SAndroid Build Coastguard Worker[_lt_decl_filter([tagged?], [yes], $@)])
383*6236dae4SAndroid Build Coastguard Worker
384*6236dae4SAndroid Build Coastguard Worker
385*6236dae4SAndroid Build Coastguard Worker# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
386*6236dae4SAndroid Build Coastguard Worker# ---------------------------------------------------------
387*6236dae4SAndroid Build Coastguard Workerm4_define([_lt_decl_filter],
388*6236dae4SAndroid Build Coastguard Worker[m4_case([$#],
389*6236dae4SAndroid Build Coastguard Worker  [0], [m4_fatal([$0: too few arguments: $#])],
390*6236dae4SAndroid Build Coastguard Worker  [1], [m4_fatal([$0: too few arguments: $#: $1])],
391*6236dae4SAndroid Build Coastguard Worker  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
392*6236dae4SAndroid Build Coastguard Worker  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
393*6236dae4SAndroid Build Coastguard Worker  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
394*6236dae4SAndroid Build Coastguard Worker])
395*6236dae4SAndroid Build Coastguard Worker
396*6236dae4SAndroid Build Coastguard Worker
397*6236dae4SAndroid Build Coastguard Worker# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
398*6236dae4SAndroid Build Coastguard Worker# --------------------------------------------------
399*6236dae4SAndroid Build Coastguard Workerm4_define([lt_decl_quote_varnames],
400*6236dae4SAndroid Build Coastguard Worker[_lt_decl_filter([value], [1], $@)])
401*6236dae4SAndroid Build Coastguard Worker
402*6236dae4SAndroid Build Coastguard Worker
403*6236dae4SAndroid Build Coastguard Worker# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
404*6236dae4SAndroid Build Coastguard Worker# ---------------------------------------------------
405*6236dae4SAndroid Build Coastguard Workerm4_define([lt_decl_dquote_varnames],
406*6236dae4SAndroid Build Coastguard Worker[_lt_decl_filter([value], [2], $@)])
407*6236dae4SAndroid Build Coastguard Worker
408*6236dae4SAndroid Build Coastguard Worker
409*6236dae4SAndroid Build Coastguard Worker# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
410*6236dae4SAndroid Build Coastguard Worker# ---------------------------------------------------
411*6236dae4SAndroid Build Coastguard Workerm4_define([lt_decl_varnames_tagged],
412*6236dae4SAndroid Build Coastguard Worker[m4_assert([$# <= 2])dnl
413*6236dae4SAndroid Build Coastguard Worker_$0(m4_quote(m4_default([$1], [[, ]])),
414*6236dae4SAndroid Build Coastguard Worker    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
415*6236dae4SAndroid Build Coastguard Worker    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
416*6236dae4SAndroid Build Coastguard Workerm4_define([_lt_decl_varnames_tagged],
417*6236dae4SAndroid Build Coastguard Worker[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
418*6236dae4SAndroid Build Coastguard Worker
419*6236dae4SAndroid Build Coastguard Worker
420*6236dae4SAndroid Build Coastguard Worker# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
421*6236dae4SAndroid Build Coastguard Worker# ------------------------------------------------
422*6236dae4SAndroid Build Coastguard Workerm4_define([lt_decl_all_varnames],
423*6236dae4SAndroid Build Coastguard Worker[_$0(m4_quote(m4_default([$1], [[, ]])),
424*6236dae4SAndroid Build Coastguard Worker     m4_if([$2], [],
425*6236dae4SAndroid Build Coastguard Worker	   m4_quote(lt_decl_varnames),
426*6236dae4SAndroid Build Coastguard Worker	m4_quote(m4_shift($@))))[]dnl
427*6236dae4SAndroid Build Coastguard Worker])
428*6236dae4SAndroid Build Coastguard Workerm4_define([_lt_decl_all_varnames],
429*6236dae4SAndroid Build Coastguard Worker[lt_join($@, lt_decl_varnames_tagged([$1],
430*6236dae4SAndroid Build Coastguard Worker			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
431*6236dae4SAndroid Build Coastguard Worker])
432*6236dae4SAndroid Build Coastguard Worker
433*6236dae4SAndroid Build Coastguard Worker
434*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARE([VARNAME])
435*6236dae4SAndroid Build Coastguard Worker# ------------------------------------
436*6236dae4SAndroid Build Coastguard Worker# Quote a variable value, and forward it to 'config.status' so that its
437*6236dae4SAndroid Build Coastguard Worker# declaration there will have the same value as in 'configure'.  VARNAME
438*6236dae4SAndroid Build Coastguard Worker# must have a single quote delimited value for this to work.
439*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_CONFIG_STATUS_DECLARE],
440*6236dae4SAndroid Build Coastguard Worker[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
441*6236dae4SAndroid Build Coastguard Worker
442*6236dae4SAndroid Build Coastguard Worker
443*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARATIONS
444*6236dae4SAndroid Build Coastguard Worker# ------------------------------
445*6236dae4SAndroid Build Coastguard Worker# We delimit libtool config variables with single quotes, so when
446*6236dae4SAndroid Build Coastguard Worker# we write them to config.status, we have to be sure to quote all
447*6236dae4SAndroid Build Coastguard Worker# embedded single quotes properly.  In configure, this macro expands
448*6236dae4SAndroid Build Coastguard Worker# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
449*6236dae4SAndroid Build Coastguard Worker#
450*6236dae4SAndroid Build Coastguard Worker#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
451*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
452*6236dae4SAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
453*6236dae4SAndroid Build Coastguard Worker    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
454*6236dae4SAndroid Build Coastguard Worker
455*6236dae4SAndroid Build Coastguard Worker
456*6236dae4SAndroid Build Coastguard Worker# _LT_LIBTOOL_TAGS
457*6236dae4SAndroid Build Coastguard Worker# ----------------
458*6236dae4SAndroid Build Coastguard Worker# Output comment and list of tags supported by the script
459*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_TAGS],
460*6236dae4SAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
461*6236dae4SAndroid Build Coastguard Workeravailable_tags='_LT_TAGS'dnl
462*6236dae4SAndroid Build Coastguard Worker])
463*6236dae4SAndroid Build Coastguard Worker
464*6236dae4SAndroid Build Coastguard Worker
465*6236dae4SAndroid Build Coastguard Worker# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
466*6236dae4SAndroid Build Coastguard Worker# -----------------------------------
467*6236dae4SAndroid Build Coastguard Worker# Extract the dictionary values for VARNAME (optionally with TAG) and
468*6236dae4SAndroid Build Coastguard Worker# expand to a commented shell variable setting:
469*6236dae4SAndroid Build Coastguard Worker#
470*6236dae4SAndroid Build Coastguard Worker#    # Some comment about what VAR is for.
471*6236dae4SAndroid Build Coastguard Worker#    visible_name=$lt_internal_name
472*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_DECLARE],
473*6236dae4SAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
474*6236dae4SAndroid Build Coastguard Worker					   [description])))[]dnl
475*6236dae4SAndroid Build Coastguard Workerm4_pushdef([_libtool_name],
476*6236dae4SAndroid Build Coastguard Worker    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
477*6236dae4SAndroid Build Coastguard Workerm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
478*6236dae4SAndroid Build Coastguard Worker    [0], [_libtool_name=[$]$1],
479*6236dae4SAndroid Build Coastguard Worker    [1], [_libtool_name=$lt_[]$1],
480*6236dae4SAndroid Build Coastguard Worker    [2], [_libtool_name=$lt_[]$1],
481*6236dae4SAndroid Build Coastguard Worker    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
482*6236dae4SAndroid Build Coastguard Workerm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
483*6236dae4SAndroid Build Coastguard Worker])
484*6236dae4SAndroid Build Coastguard Worker
485*6236dae4SAndroid Build Coastguard Worker
486*6236dae4SAndroid Build Coastguard Worker# _LT_LIBTOOL_CONFIG_VARS
487*6236dae4SAndroid Build Coastguard Worker# -----------------------
488*6236dae4SAndroid Build Coastguard Worker# Produce commented declarations of non-tagged libtool config variables
489*6236dae4SAndroid Build Coastguard Worker# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
490*6236dae4SAndroid Build Coastguard Worker# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
491*6236dae4SAndroid Build Coastguard Worker# section) are produced by _LT_LIBTOOL_TAG_VARS.
492*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_CONFIG_VARS],
493*6236dae4SAndroid Build Coastguard Worker[m4_foreach([_lt_var],
494*6236dae4SAndroid Build Coastguard Worker    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
495*6236dae4SAndroid Build Coastguard Worker    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
496*6236dae4SAndroid Build Coastguard Worker
497*6236dae4SAndroid Build Coastguard Worker
498*6236dae4SAndroid Build Coastguard Worker# _LT_LIBTOOL_TAG_VARS(TAG)
499*6236dae4SAndroid Build Coastguard Worker# -------------------------
500*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_TAG_VARS],
501*6236dae4SAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
502*6236dae4SAndroid Build Coastguard Worker    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
503*6236dae4SAndroid Build Coastguard Worker
504*6236dae4SAndroid Build Coastguard Worker
505*6236dae4SAndroid Build Coastguard Worker# _LT_TAGVAR(VARNAME, [TAGNAME])
506*6236dae4SAndroid Build Coastguard Worker# ------------------------------
507*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
508*6236dae4SAndroid Build Coastguard Worker
509*6236dae4SAndroid Build Coastguard Worker
510*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG_COMMANDS
511*6236dae4SAndroid Build Coastguard Worker# -------------------
512*6236dae4SAndroid Build Coastguard Worker# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
513*6236dae4SAndroid Build Coastguard Worker# variables for single and double quote escaping we saved from calls
514*6236dae4SAndroid Build Coastguard Worker# to _LT_DECL, we can put quote escaped variables declarations
515*6236dae4SAndroid Build Coastguard Worker# into 'config.status', and then the shell code to quote escape them in
516*6236dae4SAndroid Build Coastguard Worker# for loops in 'config.status'.  Finally, any additional code accumulated
517*6236dae4SAndroid Build Coastguard Worker# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
518*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_COMMANDS],
519*6236dae4SAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([LT_OUTPUT],
520*6236dae4SAndroid Build Coastguard Worker	dnl If the libtool generation code has been placed in $CONFIG_LT,
521*6236dae4SAndroid Build Coastguard Worker	dnl instead of duplicating it all over again into config.status,
522*6236dae4SAndroid Build Coastguard Worker	dnl then we will have config.status run $CONFIG_LT later, so it
523*6236dae4SAndroid Build Coastguard Worker	dnl needs to know what name is stored there:
524*6236dae4SAndroid Build Coastguard Worker        [AC_CONFIG_COMMANDS([libtool],
525*6236dae4SAndroid Build Coastguard Worker            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
526*6236dae4SAndroid Build Coastguard Worker    dnl If the libtool generation code is destined for config.status,
527*6236dae4SAndroid Build Coastguard Worker    dnl expand the accumulated commands and init code now:
528*6236dae4SAndroid Build Coastguard Worker    [AC_CONFIG_COMMANDS([libtool],
529*6236dae4SAndroid Build Coastguard Worker        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
530*6236dae4SAndroid Build Coastguard Worker])#_LT_CONFIG_COMMANDS
531*6236dae4SAndroid Build Coastguard Worker
532*6236dae4SAndroid Build Coastguard Worker
533*6236dae4SAndroid Build Coastguard Worker# Initialize.
534*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
535*6236dae4SAndroid Build Coastguard Worker[
536*6236dae4SAndroid Build Coastguard Worker
537*6236dae4SAndroid Build Coastguard Worker# The HP-UX ksh and POSIX shell print the target directory to stdout
538*6236dae4SAndroid Build Coastguard Worker# if CDPATH is set.
539*6236dae4SAndroid Build Coastguard Worker(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
540*6236dae4SAndroid Build Coastguard Worker
541*6236dae4SAndroid Build Coastguard Workersed_quote_subst='$sed_quote_subst'
542*6236dae4SAndroid Build Coastguard Workerdouble_quote_subst='$double_quote_subst'
543*6236dae4SAndroid Build Coastguard Workerdelay_variable_subst='$delay_variable_subst'
544*6236dae4SAndroid Build Coastguard Worker_LT_CONFIG_STATUS_DECLARATIONS
545*6236dae4SAndroid Build Coastguard WorkerLTCC='$LTCC'
546*6236dae4SAndroid Build Coastguard WorkerLTCFLAGS='$LTCFLAGS'
547*6236dae4SAndroid Build Coastguard Workercompiler='$compiler_DEFAULT'
548*6236dae4SAndroid Build Coastguard Worker
549*6236dae4SAndroid Build Coastguard Worker# A function that is used when there is no print builtin or printf.
550*6236dae4SAndroid Build Coastguard Workerfunc_fallback_echo ()
551*6236dae4SAndroid Build Coastguard Worker{
552*6236dae4SAndroid Build Coastguard Worker  eval 'cat <<_LTECHO_EOF
553*6236dae4SAndroid Build Coastguard Worker\$[]1
554*6236dae4SAndroid Build Coastguard Worker_LTECHO_EOF'
555*6236dae4SAndroid Build Coastguard Worker}
556*6236dae4SAndroid Build Coastguard Worker
557*6236dae4SAndroid Build Coastguard Worker# Quote evaled strings.
558*6236dae4SAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \
559*6236dae4SAndroid Build Coastguard Worker]], lt_decl_quote_varnames); do
560*6236dae4SAndroid Build Coastguard Worker    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561*6236dae4SAndroid Build Coastguard Worker    *[[\\\\\\\`\\"\\\$]]*)
562*6236dae4SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563*6236dae4SAndroid Build Coastguard Worker      ;;
564*6236dae4SAndroid Build Coastguard Worker    *)
565*6236dae4SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566*6236dae4SAndroid Build Coastguard Worker      ;;
567*6236dae4SAndroid Build Coastguard Worker    esac
568*6236dae4SAndroid Build Coastguard Workerdone
569*6236dae4SAndroid Build Coastguard Worker
570*6236dae4SAndroid Build Coastguard Worker# Double-quote double-evaled strings.
571*6236dae4SAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \
572*6236dae4SAndroid Build Coastguard Worker]], lt_decl_dquote_varnames); do
573*6236dae4SAndroid Build Coastguard Worker    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
574*6236dae4SAndroid Build Coastguard Worker    *[[\\\\\\\`\\"\\\$]]*)
575*6236dae4SAndroid 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*6236dae4SAndroid Build Coastguard Worker      ;;
577*6236dae4SAndroid Build Coastguard Worker    *)
578*6236dae4SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
579*6236dae4SAndroid Build Coastguard Worker      ;;
580*6236dae4SAndroid Build Coastguard Worker    esac
581*6236dae4SAndroid Build Coastguard Workerdone
582*6236dae4SAndroid Build Coastguard Worker
583*6236dae4SAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_INIT
584*6236dae4SAndroid Build Coastguard Worker])
585*6236dae4SAndroid Build Coastguard Worker
586*6236dae4SAndroid Build Coastguard Worker# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
587*6236dae4SAndroid Build Coastguard Worker# ------------------------------------
588*6236dae4SAndroid Build Coastguard Worker# Generate a child script FILE with all initialization necessary to
589*6236dae4SAndroid Build Coastguard Worker# reuse the environment learned by the parent script, and make the
590*6236dae4SAndroid Build Coastguard Worker# file executable.  If COMMENT is supplied, it is inserted after the
591*6236dae4SAndroid Build Coastguard Worker# '#!' sequence but before initialization text begins.  After this
592*6236dae4SAndroid Build Coastguard Worker# macro, additional text can be appended to FILE to form the body of
593*6236dae4SAndroid Build Coastguard Worker# the child script.  The macro ends with non-zero status if the
594*6236dae4SAndroid Build Coastguard Worker# file could not be fully written (such as if the disk is full).
595*6236dae4SAndroid Build Coastguard Workerm4_ifdef([AS_INIT_GENERATED],
596*6236dae4SAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
597*6236dae4SAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],
598*6236dae4SAndroid Build Coastguard Worker[m4_require([AS_PREPARE])]dnl
599*6236dae4SAndroid Build Coastguard Worker[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
600*6236dae4SAndroid Build Coastguard Worker[lt_write_fail=0
601*6236dae4SAndroid Build Coastguard Workercat >$1 <<_ASEOF || lt_write_fail=1
602*6236dae4SAndroid Build Coastguard Worker#! $SHELL
603*6236dae4SAndroid Build Coastguard Worker# Generated by $as_me.
604*6236dae4SAndroid Build Coastguard Worker$2
605*6236dae4SAndroid Build Coastguard WorkerSHELL=\${CONFIG_SHELL-$SHELL}
606*6236dae4SAndroid Build Coastguard Workerexport SHELL
607*6236dae4SAndroid Build Coastguard Worker_ASEOF
608*6236dae4SAndroid Build Coastguard Workercat >>$1 <<\_ASEOF || lt_write_fail=1
609*6236dae4SAndroid Build Coastguard WorkerAS_SHELL_SANITIZE
610*6236dae4SAndroid Build Coastguard Worker_AS_PREPARE
611*6236dae4SAndroid Build Coastguard Workerexec AS_MESSAGE_FD>&1
612*6236dae4SAndroid Build Coastguard Worker_ASEOF
613*6236dae4SAndroid Build Coastguard Workertest 0 = "$lt_write_fail" && chmod +x $1[]dnl
614*6236dae4SAndroid Build Coastguard Workerm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
615*6236dae4SAndroid Build Coastguard Worker
616*6236dae4SAndroid Build Coastguard Worker# LT_OUTPUT
617*6236dae4SAndroid Build Coastguard Worker# ---------
618*6236dae4SAndroid Build Coastguard Worker# This macro allows early generation of the libtool script (before
619*6236dae4SAndroid Build Coastguard Worker# AC_OUTPUT is called), incase it is used in configure for compilation
620*6236dae4SAndroid Build Coastguard Worker# tests.
621*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_OUTPUT],
622*6236dae4SAndroid Build Coastguard Worker[: ${CONFIG_LT=./config.lt}
623*6236dae4SAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $CONFIG_LT])
624*6236dae4SAndroid Build Coastguard Worker_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
625*6236dae4SAndroid Build Coastguard Worker[# Run this file to recreate a libtool stub with the current configuration.])
626*6236dae4SAndroid Build Coastguard Worker
627*6236dae4SAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF
628*6236dae4SAndroid Build Coastguard Workerlt_cl_silent=false
629*6236dae4SAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log
630*6236dae4SAndroid Build Coastguard Worker{
631*6236dae4SAndroid Build Coastguard Worker  echo
632*6236dae4SAndroid Build Coastguard Worker  AS_BOX([Running $as_me.])
633*6236dae4SAndroid Build Coastguard Worker} >&AS_MESSAGE_LOG_FD
634*6236dae4SAndroid Build Coastguard Worker
635*6236dae4SAndroid Build Coastguard Workerlt_cl_help="\
636*6236dae4SAndroid Build Coastguard Worker'$as_me' creates a local libtool stub from the current configuration,
637*6236dae4SAndroid Build Coastguard Workerfor use in further configure time tests before the real libtool is
638*6236dae4SAndroid Build Coastguard Workergenerated.
639*6236dae4SAndroid Build Coastguard Worker
640*6236dae4SAndroid Build Coastguard WorkerUsage: $[0] [[OPTIONS]]
641*6236dae4SAndroid Build Coastguard Worker
642*6236dae4SAndroid Build Coastguard Worker  -h, --help      print this help, then exit
643*6236dae4SAndroid Build Coastguard Worker  -V, --version   print version number, then exit
644*6236dae4SAndroid Build Coastguard Worker  -q, --quiet     do not print progress messages
645*6236dae4SAndroid Build Coastguard Worker  -d, --debug     don't remove temporary files
646*6236dae4SAndroid Build Coastguard Worker
647*6236dae4SAndroid Build Coastguard WorkerReport bugs to <[email protected]>."
648*6236dae4SAndroid Build Coastguard Worker
649*6236dae4SAndroid Build Coastguard Workerlt_cl_version="\
650*6236dae4SAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
651*6236dae4SAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
652*6236dae4SAndroid Build Coastguard Workerconfigured by $[0], generated by m4_PACKAGE_STRING.
653*6236dae4SAndroid Build Coastguard Worker
654*6236dae4SAndroid Build Coastguard WorkerCopyright (C) 2011 Free Software Foundation, Inc.
655*6236dae4SAndroid Build Coastguard WorkerThis config.lt script is free software; the Free Software Foundation
656*6236dae4SAndroid Build Coastguard Workergives unlimited permision to copy, distribute and modify it."
657*6236dae4SAndroid Build Coastguard Worker
658*6236dae4SAndroid Build Coastguard Workerwhile test 0 != $[#]
659*6236dae4SAndroid Build Coastguard Workerdo
660*6236dae4SAndroid Build Coastguard Worker  case $[1] in
661*6236dae4SAndroid Build Coastguard Worker    --version | --v* | -V )
662*6236dae4SAndroid Build Coastguard Worker      echo "$lt_cl_version"; exit 0 ;;
663*6236dae4SAndroid Build Coastguard Worker    --help | --h* | -h )
664*6236dae4SAndroid Build Coastguard Worker      echo "$lt_cl_help"; exit 0 ;;
665*6236dae4SAndroid Build Coastguard Worker    --debug | --d* | -d )
666*6236dae4SAndroid Build Coastguard Worker      debug=: ;;
667*6236dae4SAndroid Build Coastguard Worker    --quiet | --q* | --silent | --s* | -q )
668*6236dae4SAndroid Build Coastguard Worker      lt_cl_silent=: ;;
669*6236dae4SAndroid Build Coastguard Worker
670*6236dae4SAndroid Build Coastguard Worker    -*) AC_MSG_ERROR([unrecognized option: $[1]
671*6236dae4SAndroid Build Coastguard WorkerTry '$[0] --help' for more information.]) ;;
672*6236dae4SAndroid Build Coastguard Worker
673*6236dae4SAndroid Build Coastguard Worker    *) AC_MSG_ERROR([unrecognized argument: $[1]
674*6236dae4SAndroid Build Coastguard WorkerTry '$[0] --help' for more information.]) ;;
675*6236dae4SAndroid Build Coastguard Worker  esac
676*6236dae4SAndroid Build Coastguard Worker  shift
677*6236dae4SAndroid Build Coastguard Workerdone
678*6236dae4SAndroid Build Coastguard Worker
679*6236dae4SAndroid Build Coastguard Workerif $lt_cl_silent; then
680*6236dae4SAndroid Build Coastguard Worker  exec AS_MESSAGE_FD>/dev/null
681*6236dae4SAndroid Build Coastguard Workerfi
682*6236dae4SAndroid Build Coastguard Worker_LTEOF
683*6236dae4SAndroid Build Coastguard Worker
684*6236dae4SAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<_LTEOF
685*6236dae4SAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
686*6236dae4SAndroid Build Coastguard Worker_LTEOF
687*6236dae4SAndroid Build Coastguard Worker
688*6236dae4SAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF
689*6236dae4SAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $ofile])
690*6236dae4SAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS
691*6236dae4SAndroid Build Coastguard WorkerAS_EXIT(0)
692*6236dae4SAndroid Build Coastguard Worker_LTEOF
693*6236dae4SAndroid Build Coastguard Workerchmod +x "$CONFIG_LT"
694*6236dae4SAndroid Build Coastguard Worker
695*6236dae4SAndroid Build Coastguard Worker# configure is writing to config.log, but config.lt does its own redirection,
696*6236dae4SAndroid Build Coastguard Worker# appending to config.log, which fails on DOS, as config.log is still kept
697*6236dae4SAndroid Build Coastguard Worker# open by configure.  Here we exec the FD to /dev/null, effectively closing
698*6236dae4SAndroid Build Coastguard Worker# config.log, so it can be properly (re)opened and appended to by config.lt.
699*6236dae4SAndroid Build Coastguard Workerlt_cl_success=:
700*6236dae4SAndroid Build Coastguard Workertest yes = "$silent" &&
701*6236dae4SAndroid Build Coastguard Worker  lt_config_lt_args="$lt_config_lt_args --quiet"
702*6236dae4SAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>/dev/null
703*6236dae4SAndroid Build Coastguard Worker$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704*6236dae4SAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log
705*6236dae4SAndroid Build Coastguard Worker$lt_cl_success || AS_EXIT(1)
706*6236dae4SAndroid Build Coastguard Worker])# LT_OUTPUT
707*6236dae4SAndroid Build Coastguard Worker
708*6236dae4SAndroid Build Coastguard Worker
709*6236dae4SAndroid Build Coastguard Worker# _LT_CONFIG(TAG)
710*6236dae4SAndroid Build Coastguard Worker# ---------------
711*6236dae4SAndroid Build Coastguard Worker# If TAG is the built-in tag, create an initial libtool script with a
712*6236dae4SAndroid Build Coastguard Worker# default configuration from the untagged config vars.  Otherwise add code
713*6236dae4SAndroid Build Coastguard Worker# to config.status for appending the configuration named by TAG from the
714*6236dae4SAndroid Build Coastguard Worker# matching tagged config vars.
715*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG],
716*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
717*6236dae4SAndroid Build Coastguard Worker_LT_CONFIG_SAVE_COMMANDS([
718*6236dae4SAndroid Build Coastguard Worker  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
719*6236dae4SAndroid Build Coastguard Worker  m4_if(_LT_TAG, [C], [
720*6236dae4SAndroid Build Coastguard Worker    # See if we are running on zsh, and set the options that allow our
721*6236dae4SAndroid Build Coastguard Worker    # commands through without removal of \ escapes.
722*6236dae4SAndroid Build Coastguard Worker    if test -n "${ZSH_VERSION+set}"; then
723*6236dae4SAndroid Build Coastguard Worker      setopt NO_GLOB_SUBST
724*6236dae4SAndroid Build Coastguard Worker    fi
725*6236dae4SAndroid Build Coastguard Worker
726*6236dae4SAndroid Build Coastguard Worker    cfgfile=${ofile}T
727*6236dae4SAndroid Build Coastguard Worker    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
728*6236dae4SAndroid Build Coastguard Worker    $RM "$cfgfile"
729*6236dae4SAndroid Build Coastguard Worker
730*6236dae4SAndroid Build Coastguard Worker    cat <<_LT_EOF >> "$cfgfile"
731*6236dae4SAndroid Build Coastguard Worker#! $SHELL
732*6236dae4SAndroid Build Coastguard Worker# Generated automatically by $as_me ($PACKAGE) $VERSION
733*6236dae4SAndroid Build Coastguard Worker# NOTE: Changes made to this file will be lost: look at ltmain.sh.
734*6236dae4SAndroid Build Coastguard Worker
735*6236dae4SAndroid Build Coastguard Worker# Provide generalized library-building support services.
736*6236dae4SAndroid Build Coastguard Worker# Written by Gordon Matzigkeit, 1996
737*6236dae4SAndroid Build Coastguard Worker
738*6236dae4SAndroid Build Coastguard Worker_LT_COPYING
739*6236dae4SAndroid Build Coastguard Worker_LT_LIBTOOL_TAGS
740*6236dae4SAndroid Build Coastguard Worker
741*6236dae4SAndroid Build Coastguard Worker# Configured defaults for sys_lib_dlsearch_path munging.
742*6236dae4SAndroid Build Coastguard Worker: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
743*6236dae4SAndroid Build Coastguard Worker
744*6236dae4SAndroid Build Coastguard Worker# ### BEGIN LIBTOOL CONFIG
745*6236dae4SAndroid Build Coastguard Worker_LT_LIBTOOL_CONFIG_VARS
746*6236dae4SAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS
747*6236dae4SAndroid Build Coastguard Worker# ### END LIBTOOL CONFIG
748*6236dae4SAndroid Build Coastguard Worker
749*6236dae4SAndroid Build Coastguard Worker_LT_EOF
750*6236dae4SAndroid Build Coastguard Worker
751*6236dae4SAndroid Build Coastguard Worker    cat <<'_LT_EOF' >> "$cfgfile"
752*6236dae4SAndroid Build Coastguard Worker
753*6236dae4SAndroid Build Coastguard Worker# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
754*6236dae4SAndroid Build Coastguard Worker
755*6236dae4SAndroid Build Coastguard Worker_LT_PREPARE_MUNGE_PATH_LIST
756*6236dae4SAndroid Build Coastguard Worker_LT_PREPARE_CC_BASENAME
757*6236dae4SAndroid Build Coastguard Worker
758*6236dae4SAndroid Build Coastguard Worker# ### END FUNCTIONS SHARED WITH CONFIGURE
759*6236dae4SAndroid Build Coastguard Worker
760*6236dae4SAndroid Build Coastguard Worker_LT_EOF
761*6236dae4SAndroid Build Coastguard Worker
762*6236dae4SAndroid Build Coastguard Worker  case $host_os in
763*6236dae4SAndroid Build Coastguard Worker  aix3*)
764*6236dae4SAndroid Build Coastguard Worker    cat <<\_LT_EOF >> "$cfgfile"
765*6236dae4SAndroid Build Coastguard Worker# AIX sometimes has problems with the GCC collect2 program.  For some
766*6236dae4SAndroid Build Coastguard Worker# reason, if we set the COLLECT_NAMES environment variable, the problems
767*6236dae4SAndroid Build Coastguard Worker# vanish in a puff of smoke.
768*6236dae4SAndroid Build Coastguard Workerif test set != "${COLLECT_NAMES+set}"; then
769*6236dae4SAndroid Build Coastguard Worker  COLLECT_NAMES=
770*6236dae4SAndroid Build Coastguard Worker  export COLLECT_NAMES
771*6236dae4SAndroid Build Coastguard Workerfi
772*6236dae4SAndroid Build Coastguard Worker_LT_EOF
773*6236dae4SAndroid Build Coastguard Worker    ;;
774*6236dae4SAndroid Build Coastguard Worker  esac
775*6236dae4SAndroid Build Coastguard Worker
776*6236dae4SAndroid Build Coastguard Worker  _LT_PROG_LTMAIN
777*6236dae4SAndroid Build Coastguard Worker
778*6236dae4SAndroid Build Coastguard Worker  # We use sed instead of cat because bash on DJGPP gets confused if
779*6236dae4SAndroid Build Coastguard Worker  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
780*6236dae4SAndroid Build Coastguard Worker  # text mode, it properly converts lines to CR/LF.  This bash problem
781*6236dae4SAndroid Build Coastguard Worker  # is reportedly fixed, but why not run on old versions too?
782*6236dae4SAndroid Build Coastguard Worker  $SED '$q' "$ltmain" >> "$cfgfile" \
783*6236dae4SAndroid Build Coastguard Worker     || (rm -f "$cfgfile"; exit 1)
784*6236dae4SAndroid Build Coastguard Worker
785*6236dae4SAndroid Build Coastguard Worker   mv -f "$cfgfile" "$ofile" ||
786*6236dae4SAndroid Build Coastguard Worker    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
787*6236dae4SAndroid Build Coastguard Worker  chmod +x "$ofile"
788*6236dae4SAndroid Build Coastguard Worker],
789*6236dae4SAndroid Build Coastguard Worker[cat <<_LT_EOF >> "$ofile"
790*6236dae4SAndroid Build Coastguard Worker
791*6236dae4SAndroid Build Coastguard Workerdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
792*6236dae4SAndroid Build Coastguard Workerdnl in a comment (ie after a #).
793*6236dae4SAndroid Build Coastguard Worker# ### BEGIN LIBTOOL TAG CONFIG: $1
794*6236dae4SAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS(_LT_TAG)
795*6236dae4SAndroid Build Coastguard Worker# ### END LIBTOOL TAG CONFIG: $1
796*6236dae4SAndroid Build Coastguard Worker_LT_EOF
797*6236dae4SAndroid Build Coastguard Worker])dnl /m4_if
798*6236dae4SAndroid Build Coastguard Worker],
799*6236dae4SAndroid Build Coastguard Worker[m4_if([$1], [], [
800*6236dae4SAndroid Build Coastguard Worker    PACKAGE='$PACKAGE'
801*6236dae4SAndroid Build Coastguard Worker    VERSION='$VERSION'
802*6236dae4SAndroid Build Coastguard Worker    RM='$RM'
803*6236dae4SAndroid Build Coastguard Worker    ofile='$ofile'], [])
804*6236dae4SAndroid Build Coastguard Worker])dnl /_LT_CONFIG_SAVE_COMMANDS
805*6236dae4SAndroid Build Coastguard Worker])# _LT_CONFIG
806*6236dae4SAndroid Build Coastguard Worker
807*6236dae4SAndroid Build Coastguard Worker
808*6236dae4SAndroid Build Coastguard Worker# LT_SUPPORTED_TAG(TAG)
809*6236dae4SAndroid Build Coastguard Worker# ---------------------
810*6236dae4SAndroid Build Coastguard Worker# Trace this macro to discover what tags are supported by the libtool
811*6236dae4SAndroid Build Coastguard Worker# --tag option, using:
812*6236dae4SAndroid Build Coastguard Worker#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
813*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_SUPPORTED_TAG], [])
814*6236dae4SAndroid Build Coastguard Worker
815*6236dae4SAndroid Build Coastguard Worker
816*6236dae4SAndroid Build Coastguard Worker# C support is built-in for now
817*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_LANG_C_enabled], [])
818*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_TAGS], [])
819*6236dae4SAndroid Build Coastguard Worker
820*6236dae4SAndroid Build Coastguard Worker
821*6236dae4SAndroid Build Coastguard Worker# LT_LANG(LANG)
822*6236dae4SAndroid Build Coastguard Worker# -------------
823*6236dae4SAndroid Build Coastguard Worker# Enable libtool support for the given language if not already enabled.
824*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_LANG],
825*6236dae4SAndroid Build Coastguard Worker[AC_BEFORE([$0], [LT_OUTPUT])dnl
826*6236dae4SAndroid Build Coastguard Workerm4_case([$1],
827*6236dae4SAndroid Build Coastguard Worker  [C],			[_LT_LANG(C)],
828*6236dae4SAndroid Build Coastguard Worker  [C++],		[_LT_LANG(CXX)],
829*6236dae4SAndroid Build Coastguard Worker  [Go],			[_LT_LANG(GO)],
830*6236dae4SAndroid Build Coastguard Worker  [Java],		[_LT_LANG(GCJ)],
831*6236dae4SAndroid Build Coastguard Worker  [Fortran 77],		[_LT_LANG(F77)],
832*6236dae4SAndroid Build Coastguard Worker  [Fortran],		[_LT_LANG(FC)],
833*6236dae4SAndroid Build Coastguard Worker  [Windows Resource],	[_LT_LANG(RC)],
834*6236dae4SAndroid Build Coastguard Worker  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
835*6236dae4SAndroid Build Coastguard Worker    [_LT_LANG($1)],
836*6236dae4SAndroid Build Coastguard Worker    [m4_fatal([$0: unsupported language: "$1"])])])dnl
837*6236dae4SAndroid Build Coastguard Worker])# LT_LANG
838*6236dae4SAndroid Build Coastguard Worker
839*6236dae4SAndroid Build Coastguard Worker
840*6236dae4SAndroid Build Coastguard Worker# _LT_LANG(LANGNAME)
841*6236dae4SAndroid Build Coastguard Worker# ------------------
842*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG],
843*6236dae4SAndroid Build Coastguard Worker[m4_ifdef([_LT_LANG_]$1[_enabled], [],
844*6236dae4SAndroid Build Coastguard Worker  [LT_SUPPORTED_TAG([$1])dnl
845*6236dae4SAndroid Build Coastguard Worker  m4_append([_LT_TAGS], [$1 ])dnl
846*6236dae4SAndroid Build Coastguard Worker  m4_define([_LT_LANG_]$1[_enabled], [])dnl
847*6236dae4SAndroid Build Coastguard Worker  _LT_LANG_$1_CONFIG($1)])dnl
848*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG
849*6236dae4SAndroid Build Coastguard Worker
850*6236dae4SAndroid Build Coastguard Worker
851*6236dae4SAndroid Build Coastguard Workerm4_ifndef([AC_PROG_GO], [
852*6236dae4SAndroid Build Coastguard Worker############################################################
853*6236dae4SAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into   #
854*6236dae4SAndroid Build Coastguard Worker#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
855*6236dae4SAndroid Build Coastguard Worker#  a released version of Autoconf we should remove this    #
856*6236dae4SAndroid Build Coastguard Worker#  macro and use it instead.                               #
857*6236dae4SAndroid Build Coastguard Worker############################################################
858*6236dae4SAndroid Build Coastguard Workerm4_defun([AC_PROG_GO],
859*6236dae4SAndroid Build Coastguard Worker[AC_LANG_PUSH(Go)dnl
860*6236dae4SAndroid Build Coastguard WorkerAC_ARG_VAR([GOC],     [Go compiler command])dnl
861*6236dae4SAndroid Build Coastguard WorkerAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
862*6236dae4SAndroid Build Coastguard Worker_AC_ARG_VAR_LDFLAGS()dnl
863*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TOOL(GOC, gccgo)
864*6236dae4SAndroid Build Coastguard Workerif test -z "$GOC"; then
865*6236dae4SAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
866*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
867*6236dae4SAndroid Build Coastguard Worker  fi
868*6236dae4SAndroid Build Coastguard Workerfi
869*6236dae4SAndroid Build Coastguard Workerif test -z "$GOC"; then
870*6236dae4SAndroid Build Coastguard Worker  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
871*6236dae4SAndroid Build Coastguard Workerfi
872*6236dae4SAndroid Build Coastguard Worker])#m4_defun
873*6236dae4SAndroid Build Coastguard Worker])#m4_ifndef
874*6236dae4SAndroid Build Coastguard Worker
875*6236dae4SAndroid Build Coastguard Worker
876*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_DEFAULT_CONFIG
877*6236dae4SAndroid Build Coastguard Worker# -----------------------
878*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_DEFAULT_CONFIG],
879*6236dae4SAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([AC_PROG_CXX],
880*6236dae4SAndroid Build Coastguard Worker  [LT_LANG(CXX)],
881*6236dae4SAndroid Build Coastguard Worker  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
882*6236dae4SAndroid Build Coastguard Worker
883*6236dae4SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_F77],
884*6236dae4SAndroid Build Coastguard Worker  [LT_LANG(F77)],
885*6236dae4SAndroid Build Coastguard Worker  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
886*6236dae4SAndroid Build Coastguard Worker
887*6236dae4SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_FC],
888*6236dae4SAndroid Build Coastguard Worker  [LT_LANG(FC)],
889*6236dae4SAndroid Build Coastguard Worker  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
890*6236dae4SAndroid Build Coastguard Worker
891*6236dae4SAndroid Build Coastguard Workerdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
892*6236dae4SAndroid Build Coastguard Workerdnl pulling things in needlessly.
893*6236dae4SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GCJ],
894*6236dae4SAndroid Build Coastguard Worker  [LT_LANG(GCJ)],
895*6236dae4SAndroid Build Coastguard Worker  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
896*6236dae4SAndroid Build Coastguard Worker    [LT_LANG(GCJ)],
897*6236dae4SAndroid Build Coastguard Worker    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
898*6236dae4SAndroid Build Coastguard Worker      [LT_LANG(GCJ)],
899*6236dae4SAndroid Build Coastguard Worker      [m4_ifdef([AC_PROG_GCJ],
900*6236dae4SAndroid Build Coastguard Worker	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
901*6236dae4SAndroid Build Coastguard Worker       m4_ifdef([A][M_PROG_GCJ],
902*6236dae4SAndroid Build Coastguard Worker	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
903*6236dae4SAndroid Build Coastguard Worker       m4_ifdef([LT_PROG_GCJ],
904*6236dae4SAndroid Build Coastguard Worker	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
905*6236dae4SAndroid Build Coastguard Worker
906*6236dae4SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GO],
907*6236dae4SAndroid Build Coastguard Worker  [LT_LANG(GO)],
908*6236dae4SAndroid Build Coastguard Worker  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
909*6236dae4SAndroid Build Coastguard Worker
910*6236dae4SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([LT_PROG_RC],
911*6236dae4SAndroid Build Coastguard Worker  [LT_LANG(RC)],
912*6236dae4SAndroid Build Coastguard Worker  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
913*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_DEFAULT_CONFIG
914*6236dae4SAndroid Build Coastguard Worker
915*6236dae4SAndroid Build Coastguard Worker# Obsolete macros:
916*6236dae4SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
917*6236dae4SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
918*6236dae4SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
919*6236dae4SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
920*6236dae4SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
921*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
922*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
923*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_F77], [])
924*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_FC], [])
925*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
926*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_RC], [])
927*6236dae4SAndroid Build Coastguard Worker
928*6236dae4SAndroid Build Coastguard Worker
929*6236dae4SAndroid Build Coastguard Worker# _LT_TAG_COMPILER
930*6236dae4SAndroid Build Coastguard Worker# ----------------
931*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_TAG_COMPILER],
932*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
933*6236dae4SAndroid Build Coastguard Worker
934*6236dae4SAndroid Build Coastguard Worker_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
935*6236dae4SAndroid Build Coastguard Worker_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
936*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
937*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
938*6236dae4SAndroid Build Coastguard Worker
939*6236dae4SAndroid Build Coastguard Worker# If no C compiler was specified, use CC.
940*6236dae4SAndroid Build Coastguard WorkerLTCC=${LTCC-"$CC"}
941*6236dae4SAndroid Build Coastguard Worker
942*6236dae4SAndroid Build Coastguard Worker# If no C compiler flags were specified, use CFLAGS.
943*6236dae4SAndroid Build Coastguard WorkerLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
944*6236dae4SAndroid Build Coastguard Worker
945*6236dae4SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
946*6236dae4SAndroid Build Coastguard Workercompiler=$CC
947*6236dae4SAndroid Build Coastguard Worker])# _LT_TAG_COMPILER
948*6236dae4SAndroid Build Coastguard Worker
949*6236dae4SAndroid Build Coastguard Worker
950*6236dae4SAndroid Build Coastguard Worker# _LT_COMPILER_BOILERPLATE
951*6236dae4SAndroid Build Coastguard Worker# ------------------------
952*6236dae4SAndroid Build Coastguard Worker# Check for compiler boilerplate output or warnings with
953*6236dae4SAndroid Build Coastguard Worker# the simple compiler test code.
954*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_BOILERPLATE],
955*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
956*6236dae4SAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext
957*6236dae4SAndroid Build Coastguard Workerecho "$lt_simple_compile_test_code" >conftest.$ac_ext
958*6236dae4SAndroid Build Coastguard Workereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
959*6236dae4SAndroid Build Coastguard Worker_lt_compiler_boilerplate=`cat conftest.err`
960*6236dae4SAndroid Build Coastguard Worker$RM conftest*
961*6236dae4SAndroid Build Coastguard Worker])# _LT_COMPILER_BOILERPLATE
962*6236dae4SAndroid Build Coastguard Worker
963*6236dae4SAndroid Build Coastguard Worker
964*6236dae4SAndroid Build Coastguard Worker# _LT_LINKER_BOILERPLATE
965*6236dae4SAndroid Build Coastguard Worker# ----------------------
966*6236dae4SAndroid Build Coastguard Worker# Check for linker boilerplate output or warnings with
967*6236dae4SAndroid Build Coastguard Worker# the simple link test code.
968*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LINKER_BOILERPLATE],
969*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
970*6236dae4SAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext
971*6236dae4SAndroid Build Coastguard Workerecho "$lt_simple_link_test_code" >conftest.$ac_ext
972*6236dae4SAndroid Build Coastguard Workereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
973*6236dae4SAndroid Build Coastguard Worker_lt_linker_boilerplate=`cat conftest.err`
974*6236dae4SAndroid Build Coastguard Worker$RM -r conftest*
975*6236dae4SAndroid Build Coastguard Worker])# _LT_LINKER_BOILERPLATE
976*6236dae4SAndroid Build Coastguard Worker
977*6236dae4SAndroid Build Coastguard Worker# _LT_REQUIRED_DARWIN_CHECKS
978*6236dae4SAndroid Build Coastguard Worker# -------------------------
979*6236dae4SAndroid Build Coastguard Workerm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
980*6236dae4SAndroid Build Coastguard Worker  case $host_os in
981*6236dae4SAndroid Build Coastguard Worker    rhapsody* | darwin*)
982*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
983*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
984*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_TOOL([LIPO], [lipo], [:])
985*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_TOOL([OTOOL], [otool], [:])
986*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
987*6236dae4SAndroid Build Coastguard Worker    _LT_DECL([], [DSYMUTIL], [1],
988*6236dae4SAndroid Build Coastguard Worker      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
989*6236dae4SAndroid Build Coastguard Worker    _LT_DECL([], [NMEDIT], [1],
990*6236dae4SAndroid Build Coastguard Worker      [Tool to change global to local symbols on Mac OS X])
991*6236dae4SAndroid Build Coastguard Worker    _LT_DECL([], [LIPO], [1],
992*6236dae4SAndroid Build Coastguard Worker      [Tool to manipulate fat objects and archives on Mac OS X])
993*6236dae4SAndroid Build Coastguard Worker    _LT_DECL([], [OTOOL], [1],
994*6236dae4SAndroid Build Coastguard Worker      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
995*6236dae4SAndroid Build Coastguard Worker    _LT_DECL([], [OTOOL64], [1],
996*6236dae4SAndroid Build Coastguard Worker      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
997*6236dae4SAndroid Build Coastguard Worker
998*6236dae4SAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
999*6236dae4SAndroid Build Coastguard Worker      [lt_cv_apple_cc_single_mod=no
1000*6236dae4SAndroid Build Coastguard Worker      if test -z "$LT_MULTI_MODULE"; then
1001*6236dae4SAndroid Build Coastguard Worker	# By default we will add the -single_module flag. You can override
1002*6236dae4SAndroid Build Coastguard Worker	# by either setting the environment variable LT_MULTI_MODULE
1003*6236dae4SAndroid Build Coastguard Worker	# non-empty at configure time, or by adding -multi_module to the
1004*6236dae4SAndroid Build Coastguard Worker	# link flags.
1005*6236dae4SAndroid Build Coastguard Worker	rm -rf libconftest.dylib*
1006*6236dae4SAndroid Build Coastguard Worker	echo "int foo(void){return 1;}" > conftest.c
1007*6236dae4SAndroid Build Coastguard Worker	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1008*6236dae4SAndroid Build Coastguard Worker-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1009*6236dae4SAndroid Build Coastguard Worker	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1010*6236dae4SAndroid Build Coastguard Worker	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1011*6236dae4SAndroid Build Coastguard Worker        _lt_result=$?
1012*6236dae4SAndroid Build Coastguard Worker	# If there is a non-empty error log, and "single_module"
1013*6236dae4SAndroid Build Coastguard Worker	# appears in it, assume the flag caused a linker warning
1014*6236dae4SAndroid Build Coastguard Worker        if test -s conftest.err && $GREP single_module conftest.err; then
1015*6236dae4SAndroid Build Coastguard Worker	  cat conftest.err >&AS_MESSAGE_LOG_FD
1016*6236dae4SAndroid Build Coastguard Worker	# Otherwise, if the output was created with a 0 exit code from
1017*6236dae4SAndroid Build Coastguard Worker	# the compiler, it worked.
1018*6236dae4SAndroid Build Coastguard Worker	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1019*6236dae4SAndroid Build Coastguard Worker	  lt_cv_apple_cc_single_mod=yes
1020*6236dae4SAndroid Build Coastguard Worker	else
1021*6236dae4SAndroid Build Coastguard Worker	  cat conftest.err >&AS_MESSAGE_LOG_FD
1022*6236dae4SAndroid Build Coastguard Worker	fi
1023*6236dae4SAndroid Build Coastguard Worker	rm -rf libconftest.dylib*
1024*6236dae4SAndroid Build Coastguard Worker	rm -f conftest.*
1025*6236dae4SAndroid Build Coastguard Worker      fi])
1026*6236dae4SAndroid Build Coastguard Worker
1027*6236dae4SAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1028*6236dae4SAndroid Build Coastguard Worker      [lt_cv_ld_exported_symbols_list],
1029*6236dae4SAndroid Build Coastguard Worker      [lt_cv_ld_exported_symbols_list=no
1030*6236dae4SAndroid Build Coastguard Worker      save_LDFLAGS=$LDFLAGS
1031*6236dae4SAndroid Build Coastguard Worker      echo "_main" > conftest.sym
1032*6236dae4SAndroid Build Coastguard Worker      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1033*6236dae4SAndroid Build Coastguard Worker      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1034*6236dae4SAndroid Build Coastguard Worker	[lt_cv_ld_exported_symbols_list=yes],
1035*6236dae4SAndroid Build Coastguard Worker	[lt_cv_ld_exported_symbols_list=no])
1036*6236dae4SAndroid Build Coastguard Worker	LDFLAGS=$save_LDFLAGS
1037*6236dae4SAndroid Build Coastguard Worker    ])
1038*6236dae4SAndroid Build Coastguard Worker
1039*6236dae4SAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1040*6236dae4SAndroid Build Coastguard Worker      [lt_cv_ld_force_load=no
1041*6236dae4SAndroid Build Coastguard Worker      cat > conftest.c << _LT_EOF
1042*6236dae4SAndroid Build Coastguard Workerint forced_loaded() { return 2;}
1043*6236dae4SAndroid Build Coastguard Worker_LT_EOF
1044*6236dae4SAndroid Build Coastguard Worker      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1045*6236dae4SAndroid Build Coastguard Worker      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1046*6236dae4SAndroid Build Coastguard Worker      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1047*6236dae4SAndroid Build Coastguard Worker      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1048*6236dae4SAndroid Build Coastguard Worker      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1049*6236dae4SAndroid Build Coastguard Worker      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1050*6236dae4SAndroid Build Coastguard Worker      cat > conftest.c << _LT_EOF
1051*6236dae4SAndroid Build Coastguard Workerint main() { return 0;}
1052*6236dae4SAndroid Build Coastguard Worker_LT_EOF
1053*6236dae4SAndroid Build Coastguard Worker      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1054*6236dae4SAndroid Build Coastguard Worker      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1055*6236dae4SAndroid Build Coastguard Worker      _lt_result=$?
1056*6236dae4SAndroid Build Coastguard Worker      if test -s conftest.err && $GREP force_load conftest.err; then
1057*6236dae4SAndroid Build Coastguard Worker	cat conftest.err >&AS_MESSAGE_LOG_FD
1058*6236dae4SAndroid Build Coastguard Worker      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1059*6236dae4SAndroid Build Coastguard Worker	lt_cv_ld_force_load=yes
1060*6236dae4SAndroid Build Coastguard Worker      else
1061*6236dae4SAndroid Build Coastguard Worker	cat conftest.err >&AS_MESSAGE_LOG_FD
1062*6236dae4SAndroid Build Coastguard Worker      fi
1063*6236dae4SAndroid Build Coastguard Worker        rm -f conftest.err libconftest.a conftest conftest.c
1064*6236dae4SAndroid Build Coastguard Worker        rm -rf conftest.dSYM
1065*6236dae4SAndroid Build Coastguard Worker    ])
1066*6236dae4SAndroid Build Coastguard Worker    case $host_os in
1067*6236dae4SAndroid Build Coastguard Worker    rhapsody* | darwin1.[[012]])
1068*6236dae4SAndroid Build Coastguard Worker      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1069*6236dae4SAndroid Build Coastguard Worker    darwin1.*)
1070*6236dae4SAndroid Build Coastguard Worker      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1071*6236dae4SAndroid Build Coastguard Worker    darwin*)
1072*6236dae4SAndroid Build Coastguard Worker      case $MACOSX_DEPLOYMENT_TARGET,$host in
1073*6236dae4SAndroid Build Coastguard Worker        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1074*6236dae4SAndroid Build Coastguard Worker          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1075*6236dae4SAndroid Build Coastguard Worker        *)
1076*6236dae4SAndroid Build Coastguard Worker          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1077*6236dae4SAndroid Build Coastguard Worker      esac
1078*6236dae4SAndroid Build Coastguard Worker    ;;
1079*6236dae4SAndroid Build Coastguard Worker  esac
1080*6236dae4SAndroid Build Coastguard Worker    if test yes = "$lt_cv_apple_cc_single_mod"; then
1081*6236dae4SAndroid Build Coastguard Worker      _lt_dar_single_mod='$single_module'
1082*6236dae4SAndroid Build Coastguard Worker    fi
1083*6236dae4SAndroid Build Coastguard Worker    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1084*6236dae4SAndroid Build Coastguard Worker      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1085*6236dae4SAndroid Build Coastguard Worker    else
1086*6236dae4SAndroid Build Coastguard Worker      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1087*6236dae4SAndroid Build Coastguard Worker    fi
1088*6236dae4SAndroid Build Coastguard Worker    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1089*6236dae4SAndroid Build Coastguard Worker      _lt_dsymutil='~$DSYMUTIL $lib || :'
1090*6236dae4SAndroid Build Coastguard Worker    else
1091*6236dae4SAndroid Build Coastguard Worker      _lt_dsymutil=
1092*6236dae4SAndroid Build Coastguard Worker    fi
1093*6236dae4SAndroid Build Coastguard Worker    ;;
1094*6236dae4SAndroid Build Coastguard Worker  esac
1095*6236dae4SAndroid Build Coastguard Worker])
1096*6236dae4SAndroid Build Coastguard Worker
1097*6236dae4SAndroid Build Coastguard Worker
1098*6236dae4SAndroid Build Coastguard Worker# _LT_DARWIN_LINKER_FEATURES([TAG])
1099*6236dae4SAndroid Build Coastguard Worker# ---------------------------------
1100*6236dae4SAndroid Build Coastguard Worker# Checks for linker and compiler features on darwin
1101*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_DARWIN_LINKER_FEATURES],
1102*6236dae4SAndroid Build Coastguard Worker[
1103*6236dae4SAndroid Build Coastguard Worker  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1104*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1105*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct, $1)=no
1106*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_automatic, $1)=yes
1107*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1108*6236dae4SAndroid Build Coastguard Worker  if test yes = "$lt_cv_ld_force_load"; then
1109*6236dae4SAndroid 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\"`'
1110*6236dae4SAndroid Build Coastguard Worker    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1111*6236dae4SAndroid Build Coastguard Worker                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1112*6236dae4SAndroid Build Coastguard Worker  else
1113*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1114*6236dae4SAndroid Build Coastguard Worker  fi
1115*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(link_all_deplibs, $1)=yes
1116*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1117*6236dae4SAndroid Build Coastguard Worker  case $cc_basename in
1118*6236dae4SAndroid Build Coastguard Worker     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1119*6236dae4SAndroid Build Coastguard Worker     *) _lt_dar_can_shared=$GCC ;;
1120*6236dae4SAndroid Build Coastguard Worker  esac
1121*6236dae4SAndroid Build Coastguard Worker  if test yes = "$_lt_dar_can_shared"; then
1122*6236dae4SAndroid Build Coastguard Worker    output_verbose_link_cmd=func_echo_all
1123*6236dae4SAndroid 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"
1124*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1125*6236dae4SAndroid 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"
1126*6236dae4SAndroid 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"
1127*6236dae4SAndroid Build Coastguard Worker    m4_if([$1], [CXX],
1128*6236dae4SAndroid Build Coastguard Worker[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1129*6236dae4SAndroid 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"
1130*6236dae4SAndroid 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"
1131*6236dae4SAndroid Build Coastguard Worker    fi
1132*6236dae4SAndroid Build Coastguard Worker],[])
1133*6236dae4SAndroid Build Coastguard Worker  else
1134*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(ld_shlibs, $1)=no
1135*6236dae4SAndroid Build Coastguard Worker  fi
1136*6236dae4SAndroid Build Coastguard Worker])
1137*6236dae4SAndroid Build Coastguard Worker
1138*6236dae4SAndroid Build Coastguard Worker# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1139*6236dae4SAndroid Build Coastguard Worker# ----------------------------------
1140*6236dae4SAndroid Build Coastguard Worker# Links a minimal program and checks the executable
1141*6236dae4SAndroid Build Coastguard Worker# for the system default hardcoded library path. In most cases,
1142*6236dae4SAndroid Build Coastguard Worker# this is /usr/lib:/lib, but when the MPI compilers are used
1143*6236dae4SAndroid Build Coastguard Worker# the location of the communication and MPI libs are included too.
1144*6236dae4SAndroid Build Coastguard Worker# If we don't find anything, use the default library path according
1145*6236dae4SAndroid Build Coastguard Worker# to the aix ld manual.
1146*6236dae4SAndroid Build Coastguard Worker# Store the results from the different compilers for each TAGNAME.
1147*6236dae4SAndroid Build Coastguard Worker# Allow to override them for all tags through lt_cv_aix_libpath.
1148*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_SYS_MODULE_PATH_AIX],
1149*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
1150*6236dae4SAndroid Build Coastguard Workerif test set = "${lt_cv_aix_libpath+set}"; then
1151*6236dae4SAndroid Build Coastguard Worker  aix_libpath=$lt_cv_aix_libpath
1152*6236dae4SAndroid Build Coastguard Workerelse
1153*6236dae4SAndroid Build Coastguard Worker  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1154*6236dae4SAndroid Build Coastguard Worker  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1155*6236dae4SAndroid Build Coastguard Worker  lt_aix_libpath_sed='[
1156*6236dae4SAndroid Build Coastguard Worker      /Import File Strings/,/^$/ {
1157*6236dae4SAndroid Build Coastguard Worker	  /^0/ {
1158*6236dae4SAndroid Build Coastguard Worker	      s/^0  *\([^ ]*\) *$/\1/
1159*6236dae4SAndroid Build Coastguard Worker	      p
1160*6236dae4SAndroid Build Coastguard Worker	  }
1161*6236dae4SAndroid Build Coastguard Worker      }]'
1162*6236dae4SAndroid 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"`
1163*6236dae4SAndroid Build Coastguard Worker  # Check for a 64-bit object if we didn't find anything.
1164*6236dae4SAndroid Build Coastguard Worker  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1165*6236dae4SAndroid 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"`
1166*6236dae4SAndroid Build Coastguard Worker  fi],[])
1167*6236dae4SAndroid Build Coastguard Worker  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1168*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1169*6236dae4SAndroid Build Coastguard Worker  fi
1170*6236dae4SAndroid Build Coastguard Worker  ])
1171*6236dae4SAndroid Build Coastguard Worker  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1172*6236dae4SAndroid Build Coastguard Workerfi
1173*6236dae4SAndroid Build Coastguard Worker])# _LT_SYS_MODULE_PATH_AIX
1174*6236dae4SAndroid Build Coastguard Worker
1175*6236dae4SAndroid Build Coastguard Worker
1176*6236dae4SAndroid Build Coastguard Worker# _LT_SHELL_INIT(ARG)
1177*6236dae4SAndroid Build Coastguard Worker# -------------------
1178*6236dae4SAndroid Build Coastguard Workerm4_define([_LT_SHELL_INIT],
1179*6236dae4SAndroid Build Coastguard Worker[m4_divert_text([M4SH-INIT], [$1
1180*6236dae4SAndroid Build Coastguard Worker])])# _LT_SHELL_INIT
1181*6236dae4SAndroid Build Coastguard Worker
1182*6236dae4SAndroid Build Coastguard Worker
1183*6236dae4SAndroid Build Coastguard Worker
1184*6236dae4SAndroid Build Coastguard Worker# _LT_PROG_ECHO_BACKSLASH
1185*6236dae4SAndroid Build Coastguard Worker# -----------------------
1186*6236dae4SAndroid Build Coastguard Worker# Find how we can fake an echo command that does not interpret backslash.
1187*6236dae4SAndroid Build Coastguard Worker# In particular, with Autoconf 2.60 or later we add some code to the start
1188*6236dae4SAndroid Build Coastguard Worker# of the generated configure script that will find a shell with a builtin
1189*6236dae4SAndroid Build Coastguard Worker# printf (that we can use as an echo command).
1190*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PROG_ECHO_BACKSLASH],
1191*6236dae4SAndroid Build Coastguard Worker[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1192*6236dae4SAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1193*6236dae4SAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1194*6236dae4SAndroid Build Coastguard Worker
1195*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to print strings])
1196*6236dae4SAndroid Build Coastguard Worker# Test print first, because it will be a builtin if present.
1197*6236dae4SAndroid Build Coastguard Workerif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1198*6236dae4SAndroid Build Coastguard Worker   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1199*6236dae4SAndroid Build Coastguard Worker  ECHO='print -r --'
1200*6236dae4SAndroid Build Coastguard Workerelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1201*6236dae4SAndroid Build Coastguard Worker  ECHO='printf %s\n'
1202*6236dae4SAndroid Build Coastguard Workerelse
1203*6236dae4SAndroid Build Coastguard Worker  # Use this function as a fallback that always works.
1204*6236dae4SAndroid Build Coastguard Worker  func_fallback_echo ()
1205*6236dae4SAndroid Build Coastguard Worker  {
1206*6236dae4SAndroid Build Coastguard Worker    eval 'cat <<_LTECHO_EOF
1207*6236dae4SAndroid Build Coastguard Worker$[]1
1208*6236dae4SAndroid Build Coastguard Worker_LTECHO_EOF'
1209*6236dae4SAndroid Build Coastguard Worker  }
1210*6236dae4SAndroid Build Coastguard Worker  ECHO='func_fallback_echo'
1211*6236dae4SAndroid Build Coastguard Workerfi
1212*6236dae4SAndroid Build Coastguard Worker
1213*6236dae4SAndroid Build Coastguard Worker# func_echo_all arg...
1214*6236dae4SAndroid Build Coastguard Worker# Invoke $ECHO with all args, space-separated.
1215*6236dae4SAndroid Build Coastguard Workerfunc_echo_all ()
1216*6236dae4SAndroid Build Coastguard Worker{
1217*6236dae4SAndroid Build Coastguard Worker    $ECHO "$*"
1218*6236dae4SAndroid Build Coastguard Worker}
1219*6236dae4SAndroid Build Coastguard Worker
1220*6236dae4SAndroid Build Coastguard Workercase $ECHO in
1221*6236dae4SAndroid Build Coastguard Worker  printf*) AC_MSG_RESULT([printf]) ;;
1222*6236dae4SAndroid Build Coastguard Worker  print*) AC_MSG_RESULT([print -r]) ;;
1223*6236dae4SAndroid Build Coastguard Worker  *) AC_MSG_RESULT([cat]) ;;
1224*6236dae4SAndroid Build Coastguard Workeresac
1225*6236dae4SAndroid Build Coastguard Worker
1226*6236dae4SAndroid Build Coastguard Workerm4_ifdef([_AS_DETECT_SUGGESTED],
1227*6236dae4SAndroid Build Coastguard Worker[_AS_DETECT_SUGGESTED([
1228*6236dae4SAndroid Build Coastguard Worker  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1229*6236dae4SAndroid Build Coastguard Worker    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1230*6236dae4SAndroid Build Coastguard Worker    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1231*6236dae4SAndroid Build Coastguard Worker    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1232*6236dae4SAndroid Build Coastguard Worker    PATH=/empty FPATH=/empty; export PATH FPATH
1233*6236dae4SAndroid Build Coastguard Worker    test "X`printf %s $ECHO`" = "X$ECHO" \
1234*6236dae4SAndroid Build Coastguard Worker      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1235*6236dae4SAndroid Build Coastguard Worker
1236*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1237*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1238*6236dae4SAndroid Build Coastguard Worker])# _LT_PROG_ECHO_BACKSLASH
1239*6236dae4SAndroid Build Coastguard Worker
1240*6236dae4SAndroid Build Coastguard Worker
1241*6236dae4SAndroid Build Coastguard Worker# _LT_WITH_SYSROOT
1242*6236dae4SAndroid Build Coastguard Worker# ----------------
1243*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([_LT_WITH_SYSROOT],
1244*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
1245*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([for sysroot])
1246*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH([sysroot],
1247*6236dae4SAndroid Build Coastguard Worker[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1248*6236dae4SAndroid Build Coastguard Worker  [Search for dependent libraries within DIR (or the compiler's sysroot
1249*6236dae4SAndroid Build Coastguard Worker   if not specified).])],
1250*6236dae4SAndroid Build Coastguard Worker[], [with_sysroot=no])
1251*6236dae4SAndroid Build Coastguard Worker
1252*6236dae4SAndroid Build Coastguard Workerdnl lt_sysroot will always be passed unquoted.  We quote it here
1253*6236dae4SAndroid Build Coastguard Workerdnl in case the user passed a directory name.
1254*6236dae4SAndroid Build Coastguard Workerlt_sysroot=
1255*6236dae4SAndroid Build Coastguard Workercase $with_sysroot in #(
1256*6236dae4SAndroid Build Coastguard Worker yes)
1257*6236dae4SAndroid Build Coastguard Worker   if test yes = "$GCC"; then
1258*6236dae4SAndroid Build Coastguard Worker     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1259*6236dae4SAndroid Build Coastguard Worker   fi
1260*6236dae4SAndroid Build Coastguard Worker   ;; #(
1261*6236dae4SAndroid Build Coastguard Worker /*)
1262*6236dae4SAndroid Build Coastguard Worker   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1263*6236dae4SAndroid Build Coastguard Worker   ;; #(
1264*6236dae4SAndroid Build Coastguard Worker no|'')
1265*6236dae4SAndroid Build Coastguard Worker   ;; #(
1266*6236dae4SAndroid Build Coastguard Worker *)
1267*6236dae4SAndroid Build Coastguard Worker   AC_MSG_RESULT([$with_sysroot])
1268*6236dae4SAndroid Build Coastguard Worker   AC_MSG_ERROR([The sysroot must be an absolute path.])
1269*6236dae4SAndroid Build Coastguard Worker   ;;
1270*6236dae4SAndroid Build Coastguard Workeresac
1271*6236dae4SAndroid Build Coastguard Worker
1272*6236dae4SAndroid Build Coastguard Worker AC_MSG_RESULT([${lt_sysroot:-no}])
1273*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1274*6236dae4SAndroid Build Coastguard Worker[dependent libraries, and where our libraries should be installed.])])
1275*6236dae4SAndroid Build Coastguard Worker
1276*6236dae4SAndroid Build Coastguard Worker# _LT_ENABLE_LOCK
1277*6236dae4SAndroid Build Coastguard Worker# ---------------
1278*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_ENABLE_LOCK],
1279*6236dae4SAndroid Build Coastguard Worker[AC_ARG_ENABLE([libtool-lock],
1280*6236dae4SAndroid Build Coastguard Worker  [AS_HELP_STRING([--disable-libtool-lock],
1281*6236dae4SAndroid Build Coastguard Worker    [avoid locking (might break parallel builds)])])
1282*6236dae4SAndroid Build Coastguard Workertest no = "$enable_libtool_lock" || enable_libtool_lock=yes
1283*6236dae4SAndroid Build Coastguard Worker
1284*6236dae4SAndroid Build Coastguard Worker# Some flags need to be propagated to the compiler or linker for good
1285*6236dae4SAndroid Build Coastguard Worker# libtool support.
1286*6236dae4SAndroid Build Coastguard Workercase $host in
1287*6236dae4SAndroid Build Coastguard Workeria64-*-hpux*)
1288*6236dae4SAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set mode
1289*6236dae4SAndroid Build Coastguard Worker  # options accordingly.
1290*6236dae4SAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1291*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1292*6236dae4SAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1293*6236dae4SAndroid Build Coastguard Worker      *ELF-32*)
1294*6236dae4SAndroid Build Coastguard Worker	HPUX_IA64_MODE=32
1295*6236dae4SAndroid Build Coastguard Worker	;;
1296*6236dae4SAndroid Build Coastguard Worker      *ELF-64*)
1297*6236dae4SAndroid Build Coastguard Worker	HPUX_IA64_MODE=64
1298*6236dae4SAndroid Build Coastguard Worker	;;
1299*6236dae4SAndroid Build Coastguard Worker    esac
1300*6236dae4SAndroid Build Coastguard Worker  fi
1301*6236dae4SAndroid Build Coastguard Worker  rm -rf conftest*
1302*6236dae4SAndroid Build Coastguard Worker  ;;
1303*6236dae4SAndroid Build Coastguard Worker*-*-irix6*)
1304*6236dae4SAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1305*6236dae4SAndroid Build Coastguard Worker  # options accordingly.
1306*6236dae4SAndroid Build Coastguard Worker  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1307*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1308*6236dae4SAndroid Build Coastguard Worker    if test yes = "$lt_cv_prog_gnu_ld"; then
1309*6236dae4SAndroid Build Coastguard Worker      case `$FILECMD conftest.$ac_objext` in
1310*6236dae4SAndroid Build Coastguard Worker	*32-bit*)
1311*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -melf32bsmip"
1312*6236dae4SAndroid Build Coastguard Worker	  ;;
1313*6236dae4SAndroid Build Coastguard Worker	*N32*)
1314*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -melf32bmipn32"
1315*6236dae4SAndroid Build Coastguard Worker	  ;;
1316*6236dae4SAndroid Build Coastguard Worker	*64-bit*)
1317*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -melf64bmip"
1318*6236dae4SAndroid Build Coastguard Worker	;;
1319*6236dae4SAndroid Build Coastguard Worker      esac
1320*6236dae4SAndroid Build Coastguard Worker    else
1321*6236dae4SAndroid Build Coastguard Worker      case `$FILECMD conftest.$ac_objext` in
1322*6236dae4SAndroid Build Coastguard Worker	*32-bit*)
1323*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -32"
1324*6236dae4SAndroid Build Coastguard Worker	  ;;
1325*6236dae4SAndroid Build Coastguard Worker	*N32*)
1326*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -n32"
1327*6236dae4SAndroid Build Coastguard Worker	  ;;
1328*6236dae4SAndroid Build Coastguard Worker	*64-bit*)
1329*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -64"
1330*6236dae4SAndroid Build Coastguard Worker	  ;;
1331*6236dae4SAndroid Build Coastguard Worker      esac
1332*6236dae4SAndroid Build Coastguard Worker    fi
1333*6236dae4SAndroid Build Coastguard Worker  fi
1334*6236dae4SAndroid Build Coastguard Worker  rm -rf conftest*
1335*6236dae4SAndroid Build Coastguard Worker  ;;
1336*6236dae4SAndroid Build Coastguard Worker
1337*6236dae4SAndroid Build Coastguard Workermips64*-*linux*)
1338*6236dae4SAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1339*6236dae4SAndroid Build Coastguard Worker  # options accordingly.
1340*6236dae4SAndroid Build Coastguard Worker  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1341*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1342*6236dae4SAndroid Build Coastguard Worker    emul=elf
1343*6236dae4SAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1344*6236dae4SAndroid Build Coastguard Worker      *32-bit*)
1345*6236dae4SAndroid Build Coastguard Worker	emul="${emul}32"
1346*6236dae4SAndroid Build Coastguard Worker	;;
1347*6236dae4SAndroid Build Coastguard Worker      *64-bit*)
1348*6236dae4SAndroid Build Coastguard Worker	emul="${emul}64"
1349*6236dae4SAndroid Build Coastguard Worker	;;
1350*6236dae4SAndroid Build Coastguard Worker    esac
1351*6236dae4SAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1352*6236dae4SAndroid Build Coastguard Worker      *MSB*)
1353*6236dae4SAndroid Build Coastguard Worker	emul="${emul}btsmip"
1354*6236dae4SAndroid Build Coastguard Worker	;;
1355*6236dae4SAndroid Build Coastguard Worker      *LSB*)
1356*6236dae4SAndroid Build Coastguard Worker	emul="${emul}ltsmip"
1357*6236dae4SAndroid Build Coastguard Worker	;;
1358*6236dae4SAndroid Build Coastguard Worker    esac
1359*6236dae4SAndroid Build Coastguard Worker    case `$FILECMD conftest.$ac_objext` in
1360*6236dae4SAndroid Build Coastguard Worker      *N32*)
1361*6236dae4SAndroid Build Coastguard Worker	emul="${emul}n32"
1362*6236dae4SAndroid Build Coastguard Worker	;;
1363*6236dae4SAndroid Build Coastguard Worker    esac
1364*6236dae4SAndroid Build Coastguard Worker    LD="${LD-ld} -m $emul"
1365*6236dae4SAndroid Build Coastguard Worker  fi
1366*6236dae4SAndroid Build Coastguard Worker  rm -rf conftest*
1367*6236dae4SAndroid Build Coastguard Worker  ;;
1368*6236dae4SAndroid Build Coastguard Worker
1369*6236dae4SAndroid Build Coastguard Workerx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1370*6236dae4SAndroid Build Coastguard Workers390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1371*6236dae4SAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1372*6236dae4SAndroid Build Coastguard Worker  # options accordingly.  Note that the listed cases only cover the
1373*6236dae4SAndroid Build Coastguard Worker  # situations where additional linker options are needed (such as when
1374*6236dae4SAndroid Build Coastguard Worker  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1375*6236dae4SAndroid Build Coastguard Worker  # vice versa); the common cases where no linker options are needed do
1376*6236dae4SAndroid Build Coastguard Worker  # not appear in the list.
1377*6236dae4SAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1378*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1379*6236dae4SAndroid Build Coastguard Worker    case `$FILECMD conftest.o` in
1380*6236dae4SAndroid Build Coastguard Worker      *32-bit*)
1381*6236dae4SAndroid Build Coastguard Worker	case $host in
1382*6236dae4SAndroid Build Coastguard Worker	  x86_64-*kfreebsd*-gnu)
1383*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_i386_fbsd"
1384*6236dae4SAndroid Build Coastguard Worker	    ;;
1385*6236dae4SAndroid Build Coastguard Worker	  x86_64-*linux*)
1386*6236dae4SAndroid Build Coastguard Worker	    case `$FILECMD conftest.o` in
1387*6236dae4SAndroid Build Coastguard Worker	      *x86-64*)
1388*6236dae4SAndroid Build Coastguard Worker		LD="${LD-ld} -m elf32_x86_64"
1389*6236dae4SAndroid Build Coastguard Worker		;;
1390*6236dae4SAndroid Build Coastguard Worker	      *)
1391*6236dae4SAndroid Build Coastguard Worker		LD="${LD-ld} -m elf_i386"
1392*6236dae4SAndroid Build Coastguard Worker		;;
1393*6236dae4SAndroid Build Coastguard Worker	    esac
1394*6236dae4SAndroid Build Coastguard Worker	    ;;
1395*6236dae4SAndroid Build Coastguard Worker	  powerpc64le-*linux*)
1396*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32lppclinux"
1397*6236dae4SAndroid Build Coastguard Worker	    ;;
1398*6236dae4SAndroid Build Coastguard Worker	  powerpc64-*linux*)
1399*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32ppclinux"
1400*6236dae4SAndroid Build Coastguard Worker	    ;;
1401*6236dae4SAndroid Build Coastguard Worker	  s390x-*linux*)
1402*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_s390"
1403*6236dae4SAndroid Build Coastguard Worker	    ;;
1404*6236dae4SAndroid Build Coastguard Worker	  sparc64-*linux*)
1405*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32_sparc"
1406*6236dae4SAndroid Build Coastguard Worker	    ;;
1407*6236dae4SAndroid Build Coastguard Worker	esac
1408*6236dae4SAndroid Build Coastguard Worker	;;
1409*6236dae4SAndroid Build Coastguard Worker      *64-bit*)
1410*6236dae4SAndroid Build Coastguard Worker	case $host in
1411*6236dae4SAndroid Build Coastguard Worker	  x86_64-*kfreebsd*-gnu)
1412*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_x86_64_fbsd"
1413*6236dae4SAndroid Build Coastguard Worker	    ;;
1414*6236dae4SAndroid Build Coastguard Worker	  x86_64-*linux*)
1415*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_x86_64"
1416*6236dae4SAndroid Build Coastguard Worker	    ;;
1417*6236dae4SAndroid Build Coastguard Worker	  powerpcle-*linux*)
1418*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64lppc"
1419*6236dae4SAndroid Build Coastguard Worker	    ;;
1420*6236dae4SAndroid Build Coastguard Worker	  powerpc-*linux*)
1421*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64ppc"
1422*6236dae4SAndroid Build Coastguard Worker	    ;;
1423*6236dae4SAndroid Build Coastguard Worker	  s390*-*linux*|s390*-*tpf*)
1424*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64_s390"
1425*6236dae4SAndroid Build Coastguard Worker	    ;;
1426*6236dae4SAndroid Build Coastguard Worker	  sparc*-*linux*)
1427*6236dae4SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64_sparc"
1428*6236dae4SAndroid Build Coastguard Worker	    ;;
1429*6236dae4SAndroid Build Coastguard Worker	esac
1430*6236dae4SAndroid Build Coastguard Worker	;;
1431*6236dae4SAndroid Build Coastguard Worker    esac
1432*6236dae4SAndroid Build Coastguard Worker  fi
1433*6236dae4SAndroid Build Coastguard Worker  rm -rf conftest*
1434*6236dae4SAndroid Build Coastguard Worker  ;;
1435*6236dae4SAndroid Build Coastguard Worker
1436*6236dae4SAndroid Build Coastguard Worker*-*-sco3.2v5*)
1437*6236dae4SAndroid Build Coastguard Worker  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1438*6236dae4SAndroid Build Coastguard Worker  SAVE_CFLAGS=$CFLAGS
1439*6236dae4SAndroid Build Coastguard Worker  CFLAGS="$CFLAGS -belf"
1440*6236dae4SAndroid Build Coastguard Worker  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1441*6236dae4SAndroid Build Coastguard Worker    [AC_LANG_PUSH(C)
1442*6236dae4SAndroid Build Coastguard Worker     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1443*6236dae4SAndroid Build Coastguard Worker     AC_LANG_POP])
1444*6236dae4SAndroid Build Coastguard Worker  if test yes != "$lt_cv_cc_needs_belf"; then
1445*6236dae4SAndroid Build Coastguard Worker    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1446*6236dae4SAndroid Build Coastguard Worker    CFLAGS=$SAVE_CFLAGS
1447*6236dae4SAndroid Build Coastguard Worker  fi
1448*6236dae4SAndroid Build Coastguard Worker  ;;
1449*6236dae4SAndroid Build Coastguard Worker*-*solaris*)
1450*6236dae4SAndroid Build Coastguard Worker  # Find out what ABI is being produced by ac_compile, and set linker
1451*6236dae4SAndroid Build Coastguard Worker  # options accordingly.
1452*6236dae4SAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1453*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1454*6236dae4SAndroid Build Coastguard Worker    case `$FILECMD conftest.o` in
1455*6236dae4SAndroid Build Coastguard Worker    *64-bit*)
1456*6236dae4SAndroid Build Coastguard Worker      case $lt_cv_prog_gnu_ld in
1457*6236dae4SAndroid Build Coastguard Worker      yes*)
1458*6236dae4SAndroid Build Coastguard Worker        case $host in
1459*6236dae4SAndroid Build Coastguard Worker        i?86-*-solaris*|x86_64-*-solaris*)
1460*6236dae4SAndroid Build Coastguard Worker          LD="${LD-ld} -m elf_x86_64"
1461*6236dae4SAndroid Build Coastguard Worker          ;;
1462*6236dae4SAndroid Build Coastguard Worker        sparc*-*-solaris*)
1463*6236dae4SAndroid Build Coastguard Worker          LD="${LD-ld} -m elf64_sparc"
1464*6236dae4SAndroid Build Coastguard Worker          ;;
1465*6236dae4SAndroid Build Coastguard Worker        esac
1466*6236dae4SAndroid Build Coastguard Worker        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1467*6236dae4SAndroid Build Coastguard Worker        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1468*6236dae4SAndroid Build Coastguard Worker          LD=${LD-ld}_sol2
1469*6236dae4SAndroid Build Coastguard Worker        fi
1470*6236dae4SAndroid Build Coastguard Worker        ;;
1471*6236dae4SAndroid Build Coastguard Worker      *)
1472*6236dae4SAndroid Build Coastguard Worker	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1473*6236dae4SAndroid Build Coastguard Worker	  LD="${LD-ld} -64"
1474*6236dae4SAndroid Build Coastguard Worker	fi
1475*6236dae4SAndroid Build Coastguard Worker	;;
1476*6236dae4SAndroid Build Coastguard Worker      esac
1477*6236dae4SAndroid Build Coastguard Worker      ;;
1478*6236dae4SAndroid Build Coastguard Worker    esac
1479*6236dae4SAndroid Build Coastguard Worker  fi
1480*6236dae4SAndroid Build Coastguard Worker  rm -rf conftest*
1481*6236dae4SAndroid Build Coastguard Worker  ;;
1482*6236dae4SAndroid Build Coastguard Workeresac
1483*6236dae4SAndroid Build Coastguard Worker
1484*6236dae4SAndroid Build Coastguard Workerneed_locks=$enable_libtool_lock
1485*6236dae4SAndroid Build Coastguard Worker])# _LT_ENABLE_LOCK
1486*6236dae4SAndroid Build Coastguard Worker
1487*6236dae4SAndroid Build Coastguard Worker
1488*6236dae4SAndroid Build Coastguard Worker# _LT_PROG_AR
1489*6236dae4SAndroid Build Coastguard Worker# -----------
1490*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PROG_AR],
1491*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOLS(AR, [ar], false)
1492*6236dae4SAndroid Build Coastguard Worker: ${AR=ar}
1493*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [AR], [1], [The archiver])
1494*6236dae4SAndroid Build Coastguard Worker
1495*6236dae4SAndroid Build Coastguard Worker# Use ARFLAGS variable as AR's operation code to sync the variable naming with
1496*6236dae4SAndroid Build Coastguard Worker# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1497*6236dae4SAndroid Build Coastguard Worker# higher priority because thats what people were doing historically (setting
1498*6236dae4SAndroid Build Coastguard Worker# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
1499*6236dae4SAndroid Build Coastguard Worker# variable obsoleted/removed.
1500*6236dae4SAndroid Build Coastguard Worker
1501*6236dae4SAndroid Build Coastguard Workertest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1502*6236dae4SAndroid Build Coastguard Workerlt_ar_flags=$AR_FLAGS
1503*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1504*6236dae4SAndroid Build Coastguard Worker
1505*6236dae4SAndroid Build Coastguard Worker# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
1506*6236dae4SAndroid Build Coastguard Worker# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1507*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1508*6236dae4SAndroid Build Coastguard Worker         [Flags to create an archive])
1509*6236dae4SAndroid Build Coastguard Worker
1510*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1511*6236dae4SAndroid Build Coastguard Worker  [lt_cv_ar_at_file=no
1512*6236dae4SAndroid Build Coastguard Worker   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1513*6236dae4SAndroid Build Coastguard Worker     [echo conftest.$ac_objext > conftest.lst
1514*6236dae4SAndroid Build Coastguard Worker      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1515*6236dae4SAndroid Build Coastguard Worker      AC_TRY_EVAL([lt_ar_try])
1516*6236dae4SAndroid Build Coastguard Worker      if test 0 -eq "$ac_status"; then
1517*6236dae4SAndroid Build Coastguard Worker	# Ensure the archiver fails upon bogus file names.
1518*6236dae4SAndroid Build Coastguard Worker	rm -f conftest.$ac_objext libconftest.a
1519*6236dae4SAndroid Build Coastguard Worker	AC_TRY_EVAL([lt_ar_try])
1520*6236dae4SAndroid Build Coastguard Worker	if test 0 -ne "$ac_status"; then
1521*6236dae4SAndroid Build Coastguard Worker          lt_cv_ar_at_file=@
1522*6236dae4SAndroid Build Coastguard Worker        fi
1523*6236dae4SAndroid Build Coastguard Worker      fi
1524*6236dae4SAndroid Build Coastguard Worker      rm -f conftest.* libconftest.a
1525*6236dae4SAndroid Build Coastguard Worker     ])
1526*6236dae4SAndroid Build Coastguard Worker  ])
1527*6236dae4SAndroid Build Coastguard Worker
1528*6236dae4SAndroid Build Coastguard Workerif test no = "$lt_cv_ar_at_file"; then
1529*6236dae4SAndroid Build Coastguard Worker  archiver_list_spec=
1530*6236dae4SAndroid Build Coastguard Workerelse
1531*6236dae4SAndroid Build Coastguard Worker  archiver_list_spec=$lt_cv_ar_at_file
1532*6236dae4SAndroid Build Coastguard Workerfi
1533*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [archiver_list_spec], [1],
1534*6236dae4SAndroid Build Coastguard Worker  [How to feed a file listing to the archiver])
1535*6236dae4SAndroid Build Coastguard Worker])# _LT_PROG_AR
1536*6236dae4SAndroid Build Coastguard Worker
1537*6236dae4SAndroid Build Coastguard Worker
1538*6236dae4SAndroid Build Coastguard Worker# _LT_CMD_OLD_ARCHIVE
1539*6236dae4SAndroid Build Coastguard Worker# -------------------
1540*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CMD_OLD_ARCHIVE],
1541*6236dae4SAndroid Build Coastguard Worker[_LT_PROG_AR
1542*6236dae4SAndroid Build Coastguard Worker
1543*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TOOL(STRIP, strip, :)
1544*6236dae4SAndroid Build Coastguard Workertest -z "$STRIP" && STRIP=:
1545*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1546*6236dae4SAndroid Build Coastguard Worker
1547*6236dae4SAndroid Build Coastguard WorkerAC_CHECK_TOOL(RANLIB, ranlib, :)
1548*6236dae4SAndroid Build Coastguard Workertest -z "$RANLIB" && RANLIB=:
1549*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [RANLIB], [1],
1550*6236dae4SAndroid Build Coastguard Worker    [Commands used to install an old-style archive])
1551*6236dae4SAndroid Build Coastguard Worker
1552*6236dae4SAndroid Build Coastguard Worker# Determine commands to create old-style static archives.
1553*6236dae4SAndroid Build Coastguard Workerold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1554*6236dae4SAndroid Build Coastguard Workerold_postinstall_cmds='chmod 644 $oldlib'
1555*6236dae4SAndroid Build Coastguard Workerold_postuninstall_cmds=
1556*6236dae4SAndroid Build Coastguard Worker
1557*6236dae4SAndroid Build Coastguard Workerif test -n "$RANLIB"; then
1558*6236dae4SAndroid Build Coastguard Worker  case $host_os in
1559*6236dae4SAndroid Build Coastguard Worker  bitrig* | openbsd*)
1560*6236dae4SAndroid Build Coastguard Worker    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1561*6236dae4SAndroid Build Coastguard Worker    ;;
1562*6236dae4SAndroid Build Coastguard Worker  *)
1563*6236dae4SAndroid Build Coastguard Worker    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1564*6236dae4SAndroid Build Coastguard Worker    ;;
1565*6236dae4SAndroid Build Coastguard Worker  esac
1566*6236dae4SAndroid Build Coastguard Worker  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1567*6236dae4SAndroid Build Coastguard Workerfi
1568*6236dae4SAndroid Build Coastguard Worker
1569*6236dae4SAndroid Build Coastguard Workercase $host_os in
1570*6236dae4SAndroid Build Coastguard Worker  darwin*)
1571*6236dae4SAndroid Build Coastguard Worker    lock_old_archive_extraction=yes ;;
1572*6236dae4SAndroid Build Coastguard Worker  *)
1573*6236dae4SAndroid Build Coastguard Worker    lock_old_archive_extraction=no ;;
1574*6236dae4SAndroid Build Coastguard Workeresac
1575*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [old_postinstall_cmds], [2])
1576*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [old_postuninstall_cmds], [2])
1577*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_cmds], [2],
1578*6236dae4SAndroid Build Coastguard Worker    [Commands used to build an old-style archive])
1579*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [lock_old_archive_extraction], [0],
1580*6236dae4SAndroid Build Coastguard Worker    [Whether to use a lock for old archive extraction])
1581*6236dae4SAndroid Build Coastguard Worker])# _LT_CMD_OLD_ARCHIVE
1582*6236dae4SAndroid Build Coastguard Worker
1583*6236dae4SAndroid Build Coastguard Worker
1584*6236dae4SAndroid Build Coastguard Worker# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1585*6236dae4SAndroid Build Coastguard Worker#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1586*6236dae4SAndroid Build Coastguard Worker# ----------------------------------------------------------------
1587*6236dae4SAndroid Build Coastguard Worker# Check whether the given compiler option works
1588*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([_LT_COMPILER_OPTION],
1589*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1590*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
1591*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2],
1592*6236dae4SAndroid Build Coastguard Worker  [$2=no
1593*6236dae4SAndroid Build Coastguard Worker   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1594*6236dae4SAndroid Build Coastguard Worker   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1595*6236dae4SAndroid Build Coastguard Worker   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1596*6236dae4SAndroid Build Coastguard Worker   # Insert the option either (1) after the last *FLAGS variable, or
1597*6236dae4SAndroid Build Coastguard Worker   # (2) before a word containing "conftest.", or (3) at the end.
1598*6236dae4SAndroid Build Coastguard Worker   # Note that $ac_compile itself does not contain backslashes and begins
1599*6236dae4SAndroid Build Coastguard Worker   # with a dollar sign (not a hyphen), so the echo should work correctly.
1600*6236dae4SAndroid Build Coastguard Worker   # The option is referenced via a variable to avoid confusing sed.
1601*6236dae4SAndroid Build Coastguard Worker   lt_compile=`echo "$ac_compile" | $SED \
1602*6236dae4SAndroid Build Coastguard Worker   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1603*6236dae4SAndroid Build Coastguard Worker   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1604*6236dae4SAndroid Build Coastguard Worker   -e 's:$: $lt_compiler_flag:'`
1605*6236dae4SAndroid Build Coastguard Worker   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1606*6236dae4SAndroid Build Coastguard Worker   (eval "$lt_compile" 2>conftest.err)
1607*6236dae4SAndroid Build Coastguard Worker   ac_status=$?
1608*6236dae4SAndroid Build Coastguard Worker   cat conftest.err >&AS_MESSAGE_LOG_FD
1609*6236dae4SAndroid Build Coastguard Worker   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1610*6236dae4SAndroid Build Coastguard Worker   if (exit $ac_status) && test -s "$ac_outfile"; then
1611*6236dae4SAndroid Build Coastguard Worker     # The compiler can only warn and ignore the option if not recognized
1612*6236dae4SAndroid Build Coastguard Worker     # So say no if there are warnings other than the usual output.
1613*6236dae4SAndroid Build Coastguard Worker     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1614*6236dae4SAndroid Build Coastguard Worker     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1615*6236dae4SAndroid Build Coastguard Worker     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1616*6236dae4SAndroid Build Coastguard Worker       $2=yes
1617*6236dae4SAndroid Build Coastguard Worker     fi
1618*6236dae4SAndroid Build Coastguard Worker   fi
1619*6236dae4SAndroid Build Coastguard Worker   $RM conftest*
1620*6236dae4SAndroid Build Coastguard Worker])
1621*6236dae4SAndroid Build Coastguard Worker
1622*6236dae4SAndroid Build Coastguard Workerif test yes = "[$]$2"; then
1623*6236dae4SAndroid Build Coastguard Worker    m4_if([$5], , :, [$5])
1624*6236dae4SAndroid Build Coastguard Workerelse
1625*6236dae4SAndroid Build Coastguard Worker    m4_if([$6], , :, [$6])
1626*6236dae4SAndroid Build Coastguard Workerfi
1627*6236dae4SAndroid Build Coastguard Worker])# _LT_COMPILER_OPTION
1628*6236dae4SAndroid Build Coastguard Worker
1629*6236dae4SAndroid Build Coastguard Worker# Old name:
1630*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1631*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1632*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1633*6236dae4SAndroid Build Coastguard Worker
1634*6236dae4SAndroid Build Coastguard Worker
1635*6236dae4SAndroid Build Coastguard Worker# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1636*6236dae4SAndroid Build Coastguard Worker#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1637*6236dae4SAndroid Build Coastguard Worker# ----------------------------------------------------
1638*6236dae4SAndroid Build Coastguard Worker# Check whether the given linker option works
1639*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([_LT_LINKER_OPTION],
1640*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1641*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
1642*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2],
1643*6236dae4SAndroid Build Coastguard Worker  [$2=no
1644*6236dae4SAndroid Build Coastguard Worker   save_LDFLAGS=$LDFLAGS
1645*6236dae4SAndroid Build Coastguard Worker   LDFLAGS="$LDFLAGS $3"
1646*6236dae4SAndroid Build Coastguard Worker   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1647*6236dae4SAndroid Build Coastguard Worker   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1648*6236dae4SAndroid Build Coastguard Worker     # The linker can only warn and ignore the option if not recognized
1649*6236dae4SAndroid Build Coastguard Worker     # So say no if there are warnings
1650*6236dae4SAndroid Build Coastguard Worker     if test -s conftest.err; then
1651*6236dae4SAndroid Build Coastguard Worker       # Append any errors to the config.log.
1652*6236dae4SAndroid Build Coastguard Worker       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1653*6236dae4SAndroid Build Coastguard Worker       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1654*6236dae4SAndroid Build Coastguard Worker       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1655*6236dae4SAndroid Build Coastguard Worker       if diff conftest.exp conftest.er2 >/dev/null; then
1656*6236dae4SAndroid Build Coastguard Worker         $2=yes
1657*6236dae4SAndroid Build Coastguard Worker       fi
1658*6236dae4SAndroid Build Coastguard Worker     else
1659*6236dae4SAndroid Build Coastguard Worker       $2=yes
1660*6236dae4SAndroid Build Coastguard Worker     fi
1661*6236dae4SAndroid Build Coastguard Worker   fi
1662*6236dae4SAndroid Build Coastguard Worker   $RM -r conftest*
1663*6236dae4SAndroid Build Coastguard Worker   LDFLAGS=$save_LDFLAGS
1664*6236dae4SAndroid Build Coastguard Worker])
1665*6236dae4SAndroid Build Coastguard Worker
1666*6236dae4SAndroid Build Coastguard Workerif test yes = "[$]$2"; then
1667*6236dae4SAndroid Build Coastguard Worker    m4_if([$4], , :, [$4])
1668*6236dae4SAndroid Build Coastguard Workerelse
1669*6236dae4SAndroid Build Coastguard Worker    m4_if([$5], , :, [$5])
1670*6236dae4SAndroid Build Coastguard Workerfi
1671*6236dae4SAndroid Build Coastguard Worker])# _LT_LINKER_OPTION
1672*6236dae4SAndroid Build Coastguard Worker
1673*6236dae4SAndroid Build Coastguard Worker# Old name:
1674*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1675*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1676*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1677*6236dae4SAndroid Build Coastguard Worker
1678*6236dae4SAndroid Build Coastguard Worker
1679*6236dae4SAndroid Build Coastguard Worker# LT_CMD_MAX_LEN
1680*6236dae4SAndroid Build Coastguard Worker#---------------
1681*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_CMD_MAX_LEN],
1682*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1683*6236dae4SAndroid Build Coastguard Worker# find the maximum length of command line arguments
1684*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([the maximum length of command line arguments])
1685*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1686*6236dae4SAndroid Build Coastguard Worker  i=0
1687*6236dae4SAndroid Build Coastguard Worker  teststring=ABCD
1688*6236dae4SAndroid Build Coastguard Worker
1689*6236dae4SAndroid Build Coastguard Worker  case $build_os in
1690*6236dae4SAndroid Build Coastguard Worker  msdosdjgpp*)
1691*6236dae4SAndroid Build Coastguard Worker    # On DJGPP, this test can blow up pretty badly due to problems in libc
1692*6236dae4SAndroid Build Coastguard Worker    # (any single argument exceeding 2000 bytes causes a buffer overrun
1693*6236dae4SAndroid Build Coastguard Worker    # during glob expansion).  Even if it were fixed, the result of this
1694*6236dae4SAndroid Build Coastguard Worker    # check would be larger than it should be.
1695*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1696*6236dae4SAndroid Build Coastguard Worker    ;;
1697*6236dae4SAndroid Build Coastguard Worker
1698*6236dae4SAndroid Build Coastguard Worker  gnu*)
1699*6236dae4SAndroid Build Coastguard Worker    # Under GNU Hurd, this test is not required because there is
1700*6236dae4SAndroid Build Coastguard Worker    # no limit to the length of command line arguments.
1701*6236dae4SAndroid Build Coastguard Worker    # Libtool will interpret -1 as no limit whatsoever
1702*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=-1;
1703*6236dae4SAndroid Build Coastguard Worker    ;;
1704*6236dae4SAndroid Build Coastguard Worker
1705*6236dae4SAndroid Build Coastguard Worker  cygwin* | mingw* | cegcc*)
1706*6236dae4SAndroid Build Coastguard Worker    # On Win9x/ME, this test blows up -- it succeeds, but takes
1707*6236dae4SAndroid Build Coastguard Worker    # about 5 minutes as the teststring grows exponentially.
1708*6236dae4SAndroid Build Coastguard Worker    # Worse, since 9x/ME are not pre-emptively multitasking,
1709*6236dae4SAndroid Build Coastguard Worker    # you end up with a "frozen" computer, even though with patience
1710*6236dae4SAndroid Build Coastguard Worker    # the test eventually succeeds (with a max line length of 256k).
1711*6236dae4SAndroid Build Coastguard Worker    # Instead, let's just punt: use the minimum linelength reported by
1712*6236dae4SAndroid Build Coastguard Worker    # all of the supported platforms: 8192 (on NT/2K/XP).
1713*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1714*6236dae4SAndroid Build Coastguard Worker    ;;
1715*6236dae4SAndroid Build Coastguard Worker
1716*6236dae4SAndroid Build Coastguard Worker  mint*)
1717*6236dae4SAndroid Build Coastguard Worker    # On MiNT this can take a long time and run out of memory.
1718*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1719*6236dae4SAndroid Build Coastguard Worker    ;;
1720*6236dae4SAndroid Build Coastguard Worker
1721*6236dae4SAndroid Build Coastguard Worker  amigaos*)
1722*6236dae4SAndroid Build Coastguard Worker    # On AmigaOS with pdksh, this test takes hours, literally.
1723*6236dae4SAndroid Build Coastguard Worker    # So we just punt and use a minimum line length of 8192.
1724*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1725*6236dae4SAndroid Build Coastguard Worker    ;;
1726*6236dae4SAndroid Build Coastguard Worker
1727*6236dae4SAndroid Build Coastguard Worker  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1728*6236dae4SAndroid Build Coastguard Worker    # This has been around since 386BSD, at least.  Likely further.
1729*6236dae4SAndroid Build Coastguard Worker    if test -x /sbin/sysctl; then
1730*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1731*6236dae4SAndroid Build Coastguard Worker    elif test -x /usr/sbin/sysctl; then
1732*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1733*6236dae4SAndroid Build Coastguard Worker    else
1734*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1735*6236dae4SAndroid Build Coastguard Worker    fi
1736*6236dae4SAndroid Build Coastguard Worker    # And add a safety zone
1737*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1738*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1739*6236dae4SAndroid Build Coastguard Worker    ;;
1740*6236dae4SAndroid Build Coastguard Worker
1741*6236dae4SAndroid Build Coastguard Worker  interix*)
1742*6236dae4SAndroid Build Coastguard Worker    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1743*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=196608
1744*6236dae4SAndroid Build Coastguard Worker    ;;
1745*6236dae4SAndroid Build Coastguard Worker
1746*6236dae4SAndroid Build Coastguard Worker  os2*)
1747*6236dae4SAndroid Build Coastguard Worker    # The test takes a long time on OS/2.
1748*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192
1749*6236dae4SAndroid Build Coastguard Worker    ;;
1750*6236dae4SAndroid Build Coastguard Worker
1751*6236dae4SAndroid Build Coastguard Worker  osf*)
1752*6236dae4SAndroid Build Coastguard Worker    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1753*6236dae4SAndroid Build Coastguard Worker    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1754*6236dae4SAndroid Build Coastguard Worker    # nice to cause kernel panics so lets avoid the loop below.
1755*6236dae4SAndroid Build Coastguard Worker    # First set a reasonable default.
1756*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=16384
1757*6236dae4SAndroid Build Coastguard Worker    #
1758*6236dae4SAndroid Build Coastguard Worker    if test -x /sbin/sysconfig; then
1759*6236dae4SAndroid Build Coastguard Worker      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1760*6236dae4SAndroid Build Coastguard Worker        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1761*6236dae4SAndroid Build Coastguard Worker      esac
1762*6236dae4SAndroid Build Coastguard Worker    fi
1763*6236dae4SAndroid Build Coastguard Worker    ;;
1764*6236dae4SAndroid Build Coastguard Worker  sco3.2v5*)
1765*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=102400
1766*6236dae4SAndroid Build Coastguard Worker    ;;
1767*6236dae4SAndroid Build Coastguard Worker  sysv5* | sco5v6* | sysv4.2uw2*)
1768*6236dae4SAndroid Build Coastguard Worker    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1769*6236dae4SAndroid Build Coastguard Worker    if test -n "$kargmax"; then
1770*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
1771*6236dae4SAndroid Build Coastguard Worker    else
1772*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=32768
1773*6236dae4SAndroid Build Coastguard Worker    fi
1774*6236dae4SAndroid Build Coastguard Worker    ;;
1775*6236dae4SAndroid Build Coastguard Worker  *)
1776*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1777*6236dae4SAndroid Build Coastguard Worker    if test -n "$lt_cv_sys_max_cmd_len" && \
1778*6236dae4SAndroid Build Coastguard Worker       test undefined != "$lt_cv_sys_max_cmd_len"; then
1779*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1780*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1781*6236dae4SAndroid Build Coastguard Worker    else
1782*6236dae4SAndroid Build Coastguard Worker      # Make teststring a little bigger before we do anything with it.
1783*6236dae4SAndroid Build Coastguard Worker      # a 1K string should be a reasonable start.
1784*6236dae4SAndroid Build Coastguard Worker      for i in 1 2 3 4 5 6 7 8; do
1785*6236dae4SAndroid Build Coastguard Worker        teststring=$teststring$teststring
1786*6236dae4SAndroid Build Coastguard Worker      done
1787*6236dae4SAndroid Build Coastguard Worker      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1788*6236dae4SAndroid Build Coastguard Worker      # If test is not a shell built-in, we'll probably end up computing a
1789*6236dae4SAndroid Build Coastguard Worker      # maximum length that is only half of the actual maximum length, but
1790*6236dae4SAndroid Build Coastguard Worker      # we can't tell.
1791*6236dae4SAndroid Build Coastguard Worker      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1792*6236dae4SAndroid Build Coastguard Worker	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1793*6236dae4SAndroid Build Coastguard Worker	      test 17 != "$i" # 1/2 MB should be enough
1794*6236dae4SAndroid Build Coastguard Worker      do
1795*6236dae4SAndroid Build Coastguard Worker        i=`expr $i + 1`
1796*6236dae4SAndroid Build Coastguard Worker        teststring=$teststring$teststring
1797*6236dae4SAndroid Build Coastguard Worker      done
1798*6236dae4SAndroid Build Coastguard Worker      # Only check the string length outside the loop.
1799*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1800*6236dae4SAndroid Build Coastguard Worker      teststring=
1801*6236dae4SAndroid Build Coastguard Worker      # Add a significant safety factor because C++ compilers can tack on
1802*6236dae4SAndroid Build Coastguard Worker      # massive amounts of additional arguments before passing them to the
1803*6236dae4SAndroid Build Coastguard Worker      # linker.  It appears as though 1/2 is a usable value.
1804*6236dae4SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1805*6236dae4SAndroid Build Coastguard Worker    fi
1806*6236dae4SAndroid Build Coastguard Worker    ;;
1807*6236dae4SAndroid Build Coastguard Worker  esac
1808*6236dae4SAndroid Build Coastguard Worker])
1809*6236dae4SAndroid Build Coastguard Workerif test -n "$lt_cv_sys_max_cmd_len"; then
1810*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1811*6236dae4SAndroid Build Coastguard Workerelse
1812*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT(none)
1813*6236dae4SAndroid Build Coastguard Workerfi
1814*6236dae4SAndroid Build Coastguard Workermax_cmd_len=$lt_cv_sys_max_cmd_len
1815*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [max_cmd_len], [0],
1816*6236dae4SAndroid Build Coastguard Worker    [What is the maximum length of a command?])
1817*6236dae4SAndroid Build Coastguard Worker])# LT_CMD_MAX_LEN
1818*6236dae4SAndroid Build Coastguard Worker
1819*6236dae4SAndroid Build Coastguard Worker# Old name:
1820*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1821*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1822*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1823*6236dae4SAndroid Build Coastguard Worker
1824*6236dae4SAndroid Build Coastguard Worker
1825*6236dae4SAndroid Build Coastguard Worker# _LT_HEADER_DLFCN
1826*6236dae4SAndroid Build Coastguard Worker# ----------------
1827*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_HEADER_DLFCN],
1828*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1829*6236dae4SAndroid Build Coastguard Worker])# _LT_HEADER_DLFCN
1830*6236dae4SAndroid Build Coastguard Worker
1831*6236dae4SAndroid Build Coastguard Worker
1832*6236dae4SAndroid Build Coastguard Worker# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1833*6236dae4SAndroid Build Coastguard Worker#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1834*6236dae4SAndroid Build Coastguard Worker# ----------------------------------------------------------------
1835*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_TRY_DLOPEN_SELF],
1836*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl
1837*6236dae4SAndroid Build Coastguard Workerif test yes = "$cross_compiling"; then :
1838*6236dae4SAndroid Build Coastguard Worker  [$4]
1839*6236dae4SAndroid Build Coastguard Workerelse
1840*6236dae4SAndroid Build Coastguard Worker  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1841*6236dae4SAndroid Build Coastguard Worker  lt_status=$lt_dlunknown
1842*6236dae4SAndroid Build Coastguard Worker  cat > conftest.$ac_ext <<_LT_EOF
1843*6236dae4SAndroid Build Coastguard Worker[#line $LINENO "configure"
1844*6236dae4SAndroid Build Coastguard Worker#include "confdefs.h"
1845*6236dae4SAndroid Build Coastguard Worker
1846*6236dae4SAndroid Build Coastguard Worker#if HAVE_DLFCN_H
1847*6236dae4SAndroid Build Coastguard Worker#include <dlfcn.h>
1848*6236dae4SAndroid Build Coastguard Worker#endif
1849*6236dae4SAndroid Build Coastguard Worker
1850*6236dae4SAndroid Build Coastguard Worker#include <stdio.h>
1851*6236dae4SAndroid Build Coastguard Worker
1852*6236dae4SAndroid Build Coastguard Worker#ifdef RTLD_GLOBAL
1853*6236dae4SAndroid Build Coastguard Worker#  define LT_DLGLOBAL		RTLD_GLOBAL
1854*6236dae4SAndroid Build Coastguard Worker#else
1855*6236dae4SAndroid Build Coastguard Worker#  ifdef DL_GLOBAL
1856*6236dae4SAndroid Build Coastguard Worker#    define LT_DLGLOBAL		DL_GLOBAL
1857*6236dae4SAndroid Build Coastguard Worker#  else
1858*6236dae4SAndroid Build Coastguard Worker#    define LT_DLGLOBAL		0
1859*6236dae4SAndroid Build Coastguard Worker#  endif
1860*6236dae4SAndroid Build Coastguard Worker#endif
1861*6236dae4SAndroid Build Coastguard Worker
1862*6236dae4SAndroid Build Coastguard Worker/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1863*6236dae4SAndroid Build Coastguard Worker   find out it does not work in some platform. */
1864*6236dae4SAndroid Build Coastguard Worker#ifndef LT_DLLAZY_OR_NOW
1865*6236dae4SAndroid Build Coastguard Worker#  ifdef RTLD_LAZY
1866*6236dae4SAndroid Build Coastguard Worker#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1867*6236dae4SAndroid Build Coastguard Worker#  else
1868*6236dae4SAndroid Build Coastguard Worker#    ifdef DL_LAZY
1869*6236dae4SAndroid Build Coastguard Worker#      define LT_DLLAZY_OR_NOW		DL_LAZY
1870*6236dae4SAndroid Build Coastguard Worker#    else
1871*6236dae4SAndroid Build Coastguard Worker#      ifdef RTLD_NOW
1872*6236dae4SAndroid Build Coastguard Worker#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1873*6236dae4SAndroid Build Coastguard Worker#      else
1874*6236dae4SAndroid Build Coastguard Worker#        ifdef DL_NOW
1875*6236dae4SAndroid Build Coastguard Worker#          define LT_DLLAZY_OR_NOW	DL_NOW
1876*6236dae4SAndroid Build Coastguard Worker#        else
1877*6236dae4SAndroid Build Coastguard Worker#          define LT_DLLAZY_OR_NOW	0
1878*6236dae4SAndroid Build Coastguard Worker#        endif
1879*6236dae4SAndroid Build Coastguard Worker#      endif
1880*6236dae4SAndroid Build Coastguard Worker#    endif
1881*6236dae4SAndroid Build Coastguard Worker#  endif
1882*6236dae4SAndroid Build Coastguard Worker#endif
1883*6236dae4SAndroid Build Coastguard Worker
1884*6236dae4SAndroid Build Coastguard Worker/* When -fvisibility=hidden is used, assume the code has been annotated
1885*6236dae4SAndroid Build Coastguard Worker   correspondingly for the symbols needed.  */
1886*6236dae4SAndroid Build Coastguard Worker#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1887*6236dae4SAndroid Build Coastguard Workerint fnord () __attribute__((visibility("default")));
1888*6236dae4SAndroid Build Coastguard Worker#endif
1889*6236dae4SAndroid Build Coastguard Worker
1890*6236dae4SAndroid Build Coastguard Workerint fnord () { return 42; }
1891*6236dae4SAndroid Build Coastguard Workerint main ()
1892*6236dae4SAndroid Build Coastguard Worker{
1893*6236dae4SAndroid Build Coastguard Worker  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1894*6236dae4SAndroid Build Coastguard Worker  int status = $lt_dlunknown;
1895*6236dae4SAndroid Build Coastguard Worker
1896*6236dae4SAndroid Build Coastguard Worker  if (self)
1897*6236dae4SAndroid Build Coastguard Worker    {
1898*6236dae4SAndroid Build Coastguard Worker      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1899*6236dae4SAndroid Build Coastguard Worker      else
1900*6236dae4SAndroid Build Coastguard Worker        {
1901*6236dae4SAndroid Build Coastguard Worker	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1902*6236dae4SAndroid Build Coastguard Worker          else puts (dlerror ());
1903*6236dae4SAndroid Build Coastguard Worker	}
1904*6236dae4SAndroid Build Coastguard Worker      /* dlclose (self); */
1905*6236dae4SAndroid Build Coastguard Worker    }
1906*6236dae4SAndroid Build Coastguard Worker  else
1907*6236dae4SAndroid Build Coastguard Worker    puts (dlerror ());
1908*6236dae4SAndroid Build Coastguard Worker
1909*6236dae4SAndroid Build Coastguard Worker  return status;
1910*6236dae4SAndroid Build Coastguard Worker}]
1911*6236dae4SAndroid Build Coastguard Worker_LT_EOF
1912*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1913*6236dae4SAndroid Build Coastguard Worker    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1914*6236dae4SAndroid Build Coastguard Worker    lt_status=$?
1915*6236dae4SAndroid Build Coastguard Worker    case x$lt_status in
1916*6236dae4SAndroid Build Coastguard Worker      x$lt_dlno_uscore) $1 ;;
1917*6236dae4SAndroid Build Coastguard Worker      x$lt_dlneed_uscore) $2 ;;
1918*6236dae4SAndroid Build Coastguard Worker      x$lt_dlunknown|x*) $3 ;;
1919*6236dae4SAndroid Build Coastguard Worker    esac
1920*6236dae4SAndroid Build Coastguard Worker  else :
1921*6236dae4SAndroid Build Coastguard Worker    # compilation failed
1922*6236dae4SAndroid Build Coastguard Worker    $3
1923*6236dae4SAndroid Build Coastguard Worker  fi
1924*6236dae4SAndroid Build Coastguard Workerfi
1925*6236dae4SAndroid Build Coastguard Workerrm -fr conftest*
1926*6236dae4SAndroid Build Coastguard Worker])# _LT_TRY_DLOPEN_SELF
1927*6236dae4SAndroid Build Coastguard Worker
1928*6236dae4SAndroid Build Coastguard Worker
1929*6236dae4SAndroid Build Coastguard Worker# LT_SYS_DLOPEN_SELF
1930*6236dae4SAndroid Build Coastguard Worker# ------------------
1931*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_SYS_DLOPEN_SELF],
1932*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl
1933*6236dae4SAndroid Build Coastguard Workerif test yes != "$enable_dlopen"; then
1934*6236dae4SAndroid Build Coastguard Worker  enable_dlopen=unknown
1935*6236dae4SAndroid Build Coastguard Worker  enable_dlopen_self=unknown
1936*6236dae4SAndroid Build Coastguard Worker  enable_dlopen_self_static=unknown
1937*6236dae4SAndroid Build Coastguard Workerelse
1938*6236dae4SAndroid Build Coastguard Worker  lt_cv_dlopen=no
1939*6236dae4SAndroid Build Coastguard Worker  lt_cv_dlopen_libs=
1940*6236dae4SAndroid Build Coastguard Worker
1941*6236dae4SAndroid Build Coastguard Worker  case $host_os in
1942*6236dae4SAndroid Build Coastguard Worker  beos*)
1943*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen=load_add_on
1944*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1945*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_self=yes
1946*6236dae4SAndroid Build Coastguard Worker    ;;
1947*6236dae4SAndroid Build Coastguard Worker
1948*6236dae4SAndroid Build Coastguard Worker  mingw* | pw32* | cegcc*)
1949*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen=LoadLibrary
1950*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1951*6236dae4SAndroid Build Coastguard Worker    ;;
1952*6236dae4SAndroid Build Coastguard Worker
1953*6236dae4SAndroid Build Coastguard Worker  cygwin*)
1954*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen=dlopen
1955*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1956*6236dae4SAndroid Build Coastguard Worker    ;;
1957*6236dae4SAndroid Build Coastguard Worker
1958*6236dae4SAndroid Build Coastguard Worker  darwin*)
1959*6236dae4SAndroid Build Coastguard Worker    # if libdl is installed we need to link against it
1960*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_LIB([dl], [dlopen],
1961*6236dae4SAndroid Build Coastguard Worker		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1962*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen=dyld
1963*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1964*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_self=yes
1965*6236dae4SAndroid Build Coastguard Worker    ])
1966*6236dae4SAndroid Build Coastguard Worker    ;;
1967*6236dae4SAndroid Build Coastguard Worker
1968*6236dae4SAndroid Build Coastguard Worker  tpf*)
1969*6236dae4SAndroid Build Coastguard Worker    # Don't try to run any link tests for TPF.  We know it's impossible
1970*6236dae4SAndroid Build Coastguard Worker    # because TPF is a cross-compiler, and we know how we open DSOs.
1971*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen=dlopen
1972*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1973*6236dae4SAndroid Build Coastguard Worker    lt_cv_dlopen_self=no
1974*6236dae4SAndroid Build Coastguard Worker    ;;
1975*6236dae4SAndroid Build Coastguard Worker
1976*6236dae4SAndroid Build Coastguard Worker  *)
1977*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_FUNC([shl_load],
1978*6236dae4SAndroid Build Coastguard Worker	  [lt_cv_dlopen=shl_load],
1979*6236dae4SAndroid Build Coastguard Worker      [AC_CHECK_LIB([dld], [shl_load],
1980*6236dae4SAndroid Build Coastguard Worker	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1981*6236dae4SAndroid Build Coastguard Worker	[AC_CHECK_FUNC([dlopen],
1982*6236dae4SAndroid Build Coastguard Worker	      [lt_cv_dlopen=dlopen],
1983*6236dae4SAndroid Build Coastguard Worker	  [AC_CHECK_LIB([dl], [dlopen],
1984*6236dae4SAndroid Build Coastguard Worker		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1985*6236dae4SAndroid Build Coastguard Worker	    [AC_CHECK_LIB([svld], [dlopen],
1986*6236dae4SAndroid Build Coastguard Worker		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1987*6236dae4SAndroid Build Coastguard Worker	      [AC_CHECK_LIB([dld], [dld_link],
1988*6236dae4SAndroid Build Coastguard Worker		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1989*6236dae4SAndroid Build Coastguard Worker	      ])
1990*6236dae4SAndroid Build Coastguard Worker	    ])
1991*6236dae4SAndroid Build Coastguard Worker	  ])
1992*6236dae4SAndroid Build Coastguard Worker	])
1993*6236dae4SAndroid Build Coastguard Worker      ])
1994*6236dae4SAndroid Build Coastguard Worker    ;;
1995*6236dae4SAndroid Build Coastguard Worker  esac
1996*6236dae4SAndroid Build Coastguard Worker
1997*6236dae4SAndroid Build Coastguard Worker  if test no = "$lt_cv_dlopen"; then
1998*6236dae4SAndroid Build Coastguard Worker    enable_dlopen=no
1999*6236dae4SAndroid Build Coastguard Worker  else
2000*6236dae4SAndroid Build Coastguard Worker    enable_dlopen=yes
2001*6236dae4SAndroid Build Coastguard Worker  fi
2002*6236dae4SAndroid Build Coastguard Worker
2003*6236dae4SAndroid Build Coastguard Worker  case $lt_cv_dlopen in
2004*6236dae4SAndroid Build Coastguard Worker  dlopen)
2005*6236dae4SAndroid Build Coastguard Worker    save_CPPFLAGS=$CPPFLAGS
2006*6236dae4SAndroid Build Coastguard Worker    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2007*6236dae4SAndroid Build Coastguard Worker
2008*6236dae4SAndroid Build Coastguard Worker    save_LDFLAGS=$LDFLAGS
2009*6236dae4SAndroid Build Coastguard Worker    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2010*6236dae4SAndroid Build Coastguard Worker
2011*6236dae4SAndroid Build Coastguard Worker    save_LIBS=$LIBS
2012*6236dae4SAndroid Build Coastguard Worker    LIBS="$lt_cv_dlopen_libs $LIBS"
2013*6236dae4SAndroid Build Coastguard Worker
2014*6236dae4SAndroid Build Coastguard Worker    AC_CACHE_CHECK([whether a program can dlopen itself],
2015*6236dae4SAndroid Build Coastguard Worker	  lt_cv_dlopen_self, [dnl
2016*6236dae4SAndroid Build Coastguard Worker	  _LT_TRY_DLOPEN_SELF(
2017*6236dae4SAndroid Build Coastguard Worker	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2018*6236dae4SAndroid Build Coastguard Worker	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2019*6236dae4SAndroid Build Coastguard Worker    ])
2020*6236dae4SAndroid Build Coastguard Worker
2021*6236dae4SAndroid Build Coastguard Worker    if test yes = "$lt_cv_dlopen_self"; then
2022*6236dae4SAndroid Build Coastguard Worker      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2023*6236dae4SAndroid Build Coastguard Worker      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2024*6236dae4SAndroid Build Coastguard Worker	  lt_cv_dlopen_self_static, [dnl
2025*6236dae4SAndroid Build Coastguard Worker	  _LT_TRY_DLOPEN_SELF(
2026*6236dae4SAndroid Build Coastguard Worker	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2027*6236dae4SAndroid Build Coastguard Worker	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2028*6236dae4SAndroid Build Coastguard Worker      ])
2029*6236dae4SAndroid Build Coastguard Worker    fi
2030*6236dae4SAndroid Build Coastguard Worker
2031*6236dae4SAndroid Build Coastguard Worker    CPPFLAGS=$save_CPPFLAGS
2032*6236dae4SAndroid Build Coastguard Worker    LDFLAGS=$save_LDFLAGS
2033*6236dae4SAndroid Build Coastguard Worker    LIBS=$save_LIBS
2034*6236dae4SAndroid Build Coastguard Worker    ;;
2035*6236dae4SAndroid Build Coastguard Worker  esac
2036*6236dae4SAndroid Build Coastguard Worker
2037*6236dae4SAndroid Build Coastguard Worker  case $lt_cv_dlopen_self in
2038*6236dae4SAndroid Build Coastguard Worker  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2039*6236dae4SAndroid Build Coastguard Worker  *) enable_dlopen_self=unknown ;;
2040*6236dae4SAndroid Build Coastguard Worker  esac
2041*6236dae4SAndroid Build Coastguard Worker
2042*6236dae4SAndroid Build Coastguard Worker  case $lt_cv_dlopen_self_static in
2043*6236dae4SAndroid Build Coastguard Worker  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2044*6236dae4SAndroid Build Coastguard Worker  *) enable_dlopen_self_static=unknown ;;
2045*6236dae4SAndroid Build Coastguard Worker  esac
2046*6236dae4SAndroid Build Coastguard Workerfi
2047*6236dae4SAndroid Build Coastguard Worker_LT_DECL([dlopen_support], [enable_dlopen], [0],
2048*6236dae4SAndroid Build Coastguard Worker	 [Whether dlopen is supported])
2049*6236dae4SAndroid Build Coastguard Worker_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2050*6236dae4SAndroid Build Coastguard Worker	 [Whether dlopen of programs is supported])
2051*6236dae4SAndroid Build Coastguard Worker_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2052*6236dae4SAndroid Build Coastguard Worker	 [Whether dlopen of statically linked programs is supported])
2053*6236dae4SAndroid Build Coastguard Worker])# LT_SYS_DLOPEN_SELF
2054*6236dae4SAndroid Build Coastguard Worker
2055*6236dae4SAndroid Build Coastguard Worker# Old name:
2056*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2057*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
2058*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2059*6236dae4SAndroid Build Coastguard Worker
2060*6236dae4SAndroid Build Coastguard Worker
2061*6236dae4SAndroid Build Coastguard Worker# _LT_COMPILER_C_O([TAGNAME])
2062*6236dae4SAndroid Build Coastguard Worker# ---------------------------
2063*6236dae4SAndroid Build Coastguard Worker# Check to see if options -c and -o are simultaneously supported by compiler.
2064*6236dae4SAndroid Build Coastguard Worker# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2065*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_C_O],
2066*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
2067*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2068*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
2069*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2070*6236dae4SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2071*6236dae4SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2072*6236dae4SAndroid Build Coastguard Worker   $RM -r conftest 2>/dev/null
2073*6236dae4SAndroid Build Coastguard Worker   mkdir conftest
2074*6236dae4SAndroid Build Coastguard Worker   cd conftest
2075*6236dae4SAndroid Build Coastguard Worker   mkdir out
2076*6236dae4SAndroid Build Coastguard Worker   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2077*6236dae4SAndroid Build Coastguard Worker
2078*6236dae4SAndroid Build Coastguard Worker   lt_compiler_flag="-o out/conftest2.$ac_objext"
2079*6236dae4SAndroid Build Coastguard Worker   # Insert the option either (1) after the last *FLAGS variable, or
2080*6236dae4SAndroid Build Coastguard Worker   # (2) before a word containing "conftest.", or (3) at the end.
2081*6236dae4SAndroid Build Coastguard Worker   # Note that $ac_compile itself does not contain backslashes and begins
2082*6236dae4SAndroid Build Coastguard Worker   # with a dollar sign (not a hyphen), so the echo should work correctly.
2083*6236dae4SAndroid Build Coastguard Worker   lt_compile=`echo "$ac_compile" | $SED \
2084*6236dae4SAndroid Build Coastguard Worker   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2085*6236dae4SAndroid Build Coastguard Worker   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2086*6236dae4SAndroid Build Coastguard Worker   -e 's:$: $lt_compiler_flag:'`
2087*6236dae4SAndroid Build Coastguard Worker   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2088*6236dae4SAndroid Build Coastguard Worker   (eval "$lt_compile" 2>out/conftest.err)
2089*6236dae4SAndroid Build Coastguard Worker   ac_status=$?
2090*6236dae4SAndroid Build Coastguard Worker   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2091*6236dae4SAndroid Build Coastguard Worker   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2092*6236dae4SAndroid Build Coastguard Worker   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2093*6236dae4SAndroid Build Coastguard Worker   then
2094*6236dae4SAndroid Build Coastguard Worker     # The compiler can only warn and ignore the option if not recognized
2095*6236dae4SAndroid Build Coastguard Worker     # So say no if there are warnings
2096*6236dae4SAndroid Build Coastguard Worker     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2097*6236dae4SAndroid Build Coastguard Worker     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2098*6236dae4SAndroid Build Coastguard Worker     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2099*6236dae4SAndroid Build Coastguard Worker       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2100*6236dae4SAndroid Build Coastguard Worker     fi
2101*6236dae4SAndroid Build Coastguard Worker   fi
2102*6236dae4SAndroid Build Coastguard Worker   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2103*6236dae4SAndroid Build Coastguard Worker   $RM conftest*
2104*6236dae4SAndroid Build Coastguard Worker   # SGI C++ compiler will create directory out/ii_files/ for
2105*6236dae4SAndroid Build Coastguard Worker   # template instantiation
2106*6236dae4SAndroid Build Coastguard Worker   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2107*6236dae4SAndroid Build Coastguard Worker   $RM out/* && rmdir out
2108*6236dae4SAndroid Build Coastguard Worker   cd ..
2109*6236dae4SAndroid Build Coastguard Worker   $RM -r conftest
2110*6236dae4SAndroid Build Coastguard Worker   $RM conftest*
2111*6236dae4SAndroid Build Coastguard Worker])
2112*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2113*6236dae4SAndroid Build Coastguard Worker	[Does compiler simultaneously support -c and -o options?])
2114*6236dae4SAndroid Build Coastguard Worker])# _LT_COMPILER_C_O
2115*6236dae4SAndroid Build Coastguard Worker
2116*6236dae4SAndroid Build Coastguard Worker
2117*6236dae4SAndroid Build Coastguard Worker# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2118*6236dae4SAndroid Build Coastguard Worker# ----------------------------------
2119*6236dae4SAndroid Build Coastguard Worker# Check to see if we can do hard links to lock some files if needed
2120*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_FILE_LOCKS],
2121*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_ENABLE_LOCK])dnl
2122*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2123*6236dae4SAndroid Build Coastguard Worker_LT_COMPILER_C_O([$1])
2124*6236dae4SAndroid Build Coastguard Worker
2125*6236dae4SAndroid Build Coastguard Workerhard_links=nottested
2126*6236dae4SAndroid Build Coastguard Workerif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2127*6236dae4SAndroid Build Coastguard Worker  # do not overwrite the value of need_locks provided by the user
2128*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([if we can lock with hard links])
2129*6236dae4SAndroid Build Coastguard Worker  hard_links=yes
2130*6236dae4SAndroid Build Coastguard Worker  $RM conftest*
2131*6236dae4SAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2132*6236dae4SAndroid Build Coastguard Worker  touch conftest.a
2133*6236dae4SAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>&5 || hard_links=no
2134*6236dae4SAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2135*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT([$hard_links])
2136*6236dae4SAndroid Build Coastguard Worker  if test no = "$hard_links"; then
2137*6236dae4SAndroid Build Coastguard Worker    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2138*6236dae4SAndroid Build Coastguard Worker    need_locks=warn
2139*6236dae4SAndroid Build Coastguard Worker  fi
2140*6236dae4SAndroid Build Coastguard Workerelse
2141*6236dae4SAndroid Build Coastguard Worker  need_locks=no
2142*6236dae4SAndroid Build Coastguard Workerfi
2143*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2144*6236dae4SAndroid Build Coastguard Worker])# _LT_COMPILER_FILE_LOCKS
2145*6236dae4SAndroid Build Coastguard Worker
2146*6236dae4SAndroid Build Coastguard Worker
2147*6236dae4SAndroid Build Coastguard Worker# _LT_CHECK_OBJDIR
2148*6236dae4SAndroid Build Coastguard Worker# ----------------
2149*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_OBJDIR],
2150*6236dae4SAndroid Build Coastguard Worker[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2151*6236dae4SAndroid Build Coastguard Worker[rm -f .libs 2>/dev/null
2152*6236dae4SAndroid Build Coastguard Workermkdir .libs 2>/dev/null
2153*6236dae4SAndroid Build Coastguard Workerif test -d .libs; then
2154*6236dae4SAndroid Build Coastguard Worker  lt_cv_objdir=.libs
2155*6236dae4SAndroid Build Coastguard Workerelse
2156*6236dae4SAndroid Build Coastguard Worker  # MS-DOS does not allow filenames that begin with a dot.
2157*6236dae4SAndroid Build Coastguard Worker  lt_cv_objdir=_libs
2158*6236dae4SAndroid Build Coastguard Workerfi
2159*6236dae4SAndroid Build Coastguard Workerrmdir .libs 2>/dev/null])
2160*6236dae4SAndroid Build Coastguard Workerobjdir=$lt_cv_objdir
2161*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [objdir], [0],
2162*6236dae4SAndroid Build Coastguard Worker         [The name of the directory that contains temporary libtool files])dnl
2163*6236dae4SAndroid Build Coastguard Workerm4_pattern_allow([LT_OBJDIR])dnl
2164*6236dae4SAndroid Build Coastguard WorkerAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2165*6236dae4SAndroid Build Coastguard Worker  [Define to the sub-directory where libtool stores uninstalled libraries.])
2166*6236dae4SAndroid Build Coastguard Worker])# _LT_CHECK_OBJDIR
2167*6236dae4SAndroid Build Coastguard Worker
2168*6236dae4SAndroid Build Coastguard Worker
2169*6236dae4SAndroid Build Coastguard Worker# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2170*6236dae4SAndroid Build Coastguard Worker# --------------------------------------
2171*6236dae4SAndroid Build Coastguard Worker# Check hardcoding attributes.
2172*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2173*6236dae4SAndroid Build Coastguard Worker[AC_MSG_CHECKING([how to hardcode library paths into programs])
2174*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_action, $1)=
2175*6236dae4SAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2176*6236dae4SAndroid Build Coastguard Worker   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2177*6236dae4SAndroid Build Coastguard Worker   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2178*6236dae4SAndroid Build Coastguard Worker
2179*6236dae4SAndroid Build Coastguard Worker  # We can hardcode non-existent directories.
2180*6236dae4SAndroid Build Coastguard Worker  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2181*6236dae4SAndroid Build Coastguard Worker     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2182*6236dae4SAndroid Build Coastguard Worker     # have to relink, otherwise we might link with an installed library
2183*6236dae4SAndroid Build Coastguard Worker     # when we should be linking with a yet-to-be-installed one
2184*6236dae4SAndroid Build Coastguard Worker     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2185*6236dae4SAndroid Build Coastguard Worker     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2186*6236dae4SAndroid Build Coastguard Worker    # Linking always hardcodes the temporary library directory.
2187*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_action, $1)=relink
2188*6236dae4SAndroid Build Coastguard Worker  else
2189*6236dae4SAndroid Build Coastguard Worker    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2190*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_action, $1)=immediate
2191*6236dae4SAndroid Build Coastguard Worker  fi
2192*6236dae4SAndroid Build Coastguard Workerelse
2193*6236dae4SAndroid Build Coastguard Worker  # We cannot hardcode anything, or else we can only hardcode existing
2194*6236dae4SAndroid Build Coastguard Worker  # directories.
2195*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_action, $1)=unsupported
2196*6236dae4SAndroid Build Coastguard Workerfi
2197*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2198*6236dae4SAndroid Build Coastguard Worker
2199*6236dae4SAndroid Build Coastguard Workerif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2200*6236dae4SAndroid Build Coastguard Worker   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2201*6236dae4SAndroid Build Coastguard Worker  # Fast installation is not supported
2202*6236dae4SAndroid Build Coastguard Worker  enable_fast_install=no
2203*6236dae4SAndroid Build Coastguard Workerelif test yes = "$shlibpath_overrides_runpath" ||
2204*6236dae4SAndroid Build Coastguard Worker     test no = "$enable_shared"; then
2205*6236dae4SAndroid Build Coastguard Worker  # Fast installation is not necessary
2206*6236dae4SAndroid Build Coastguard Worker  enable_fast_install=needless
2207*6236dae4SAndroid Build Coastguard Workerfi
2208*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_action], [0],
2209*6236dae4SAndroid Build Coastguard Worker    [How to hardcode a shared library path into an executable])
2210*6236dae4SAndroid Build Coastguard Worker])# _LT_LINKER_HARDCODE_LIBPATH
2211*6236dae4SAndroid Build Coastguard Worker
2212*6236dae4SAndroid Build Coastguard Worker
2213*6236dae4SAndroid Build Coastguard Worker# _LT_CMD_STRIPLIB
2214*6236dae4SAndroid Build Coastguard Worker# ----------------
2215*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CMD_STRIPLIB],
2216*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
2217*6236dae4SAndroid Build Coastguard Workerstriplib=
2218*6236dae4SAndroid Build Coastguard Workerold_striplib=
2219*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether stripping libraries is possible])
2220*6236dae4SAndroid Build Coastguard Workerif test -z "$STRIP"; then
2221*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT([no])
2222*6236dae4SAndroid Build Coastguard Workerelse
2223*6236dae4SAndroid Build Coastguard Worker  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2224*6236dae4SAndroid Build Coastguard Worker    old_striplib="$STRIP --strip-debug"
2225*6236dae4SAndroid Build Coastguard Worker    striplib="$STRIP --strip-unneeded"
2226*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([yes])
2227*6236dae4SAndroid Build Coastguard Worker  else
2228*6236dae4SAndroid Build Coastguard Worker    case $host_os in
2229*6236dae4SAndroid Build Coastguard Worker    darwin*)
2230*6236dae4SAndroid Build Coastguard Worker      # FIXME - insert some real tests, host_os isn't really good enough
2231*6236dae4SAndroid Build Coastguard Worker      striplib="$STRIP -x"
2232*6236dae4SAndroid Build Coastguard Worker      old_striplib="$STRIP -S"
2233*6236dae4SAndroid Build Coastguard Worker      AC_MSG_RESULT([yes])
2234*6236dae4SAndroid Build Coastguard Worker      ;;
2235*6236dae4SAndroid Build Coastguard Worker    freebsd*)
2236*6236dae4SAndroid Build Coastguard Worker      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2237*6236dae4SAndroid Build Coastguard Worker        old_striplib="$STRIP --strip-debug"
2238*6236dae4SAndroid Build Coastguard Worker        striplib="$STRIP --strip-unneeded"
2239*6236dae4SAndroid Build Coastguard Worker        AC_MSG_RESULT([yes])
2240*6236dae4SAndroid Build Coastguard Worker      else
2241*6236dae4SAndroid Build Coastguard Worker        AC_MSG_RESULT([no])
2242*6236dae4SAndroid Build Coastguard Worker      fi
2243*6236dae4SAndroid Build Coastguard Worker      ;;
2244*6236dae4SAndroid Build Coastguard Worker    *)
2245*6236dae4SAndroid Build Coastguard Worker      AC_MSG_RESULT([no])
2246*6236dae4SAndroid Build Coastguard Worker      ;;
2247*6236dae4SAndroid Build Coastguard Worker    esac
2248*6236dae4SAndroid Build Coastguard Worker  fi
2249*6236dae4SAndroid Build Coastguard Workerfi
2250*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2251*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [striplib], [1])
2252*6236dae4SAndroid Build Coastguard Worker])# _LT_CMD_STRIPLIB
2253*6236dae4SAndroid Build Coastguard Worker
2254*6236dae4SAndroid Build Coastguard Worker
2255*6236dae4SAndroid Build Coastguard Worker# _LT_PREPARE_MUNGE_PATH_LIST
2256*6236dae4SAndroid Build Coastguard Worker# ---------------------------
2257*6236dae4SAndroid Build Coastguard Worker# Make sure func_munge_path_list() is defined correctly.
2258*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2259*6236dae4SAndroid Build Coastguard Worker[[# func_munge_path_list VARIABLE PATH
2260*6236dae4SAndroid Build Coastguard Worker# -----------------------------------
2261*6236dae4SAndroid Build Coastguard Worker# VARIABLE is name of variable containing _space_ separated list of
2262*6236dae4SAndroid Build Coastguard Worker# directories to be munged by the contents of PATH, which is string
2263*6236dae4SAndroid Build Coastguard Worker# having a format:
2264*6236dae4SAndroid Build Coastguard Worker# "DIR[:DIR]:"
2265*6236dae4SAndroid Build Coastguard Worker#       string "DIR[ DIR]" will be prepended to VARIABLE
2266*6236dae4SAndroid Build Coastguard Worker# ":DIR[:DIR]"
2267*6236dae4SAndroid Build Coastguard Worker#       string "DIR[ DIR]" will be appended to VARIABLE
2268*6236dae4SAndroid Build Coastguard Worker# "DIRP[:DIRP]::[DIRA:]DIRA"
2269*6236dae4SAndroid Build Coastguard Worker#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2270*6236dae4SAndroid Build Coastguard Worker#       "DIRA[ DIRA]" will be appended to VARIABLE
2271*6236dae4SAndroid Build Coastguard Worker# "DIR[:DIR]"
2272*6236dae4SAndroid Build Coastguard Worker#       VARIABLE will be replaced by "DIR[ DIR]"
2273*6236dae4SAndroid Build Coastguard Workerfunc_munge_path_list ()
2274*6236dae4SAndroid Build Coastguard Worker{
2275*6236dae4SAndroid Build Coastguard Worker    case x@S|@2 in
2276*6236dae4SAndroid Build Coastguard Worker    x)
2277*6236dae4SAndroid Build Coastguard Worker        ;;
2278*6236dae4SAndroid Build Coastguard Worker    *:)
2279*6236dae4SAndroid Build Coastguard Worker        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2280*6236dae4SAndroid Build Coastguard Worker        ;;
2281*6236dae4SAndroid Build Coastguard Worker    x:*)
2282*6236dae4SAndroid Build Coastguard Worker        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2283*6236dae4SAndroid Build Coastguard Worker        ;;
2284*6236dae4SAndroid Build Coastguard Worker    *::*)
2285*6236dae4SAndroid Build Coastguard Worker        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2286*6236dae4SAndroid Build Coastguard Worker        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2287*6236dae4SAndroid Build Coastguard Worker        ;;
2288*6236dae4SAndroid Build Coastguard Worker    *)
2289*6236dae4SAndroid Build Coastguard Worker        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2290*6236dae4SAndroid Build Coastguard Worker        ;;
2291*6236dae4SAndroid Build Coastguard Worker    esac
2292*6236dae4SAndroid Build Coastguard Worker}
2293*6236dae4SAndroid Build Coastguard Worker]])# _LT_PREPARE_PATH_LIST
2294*6236dae4SAndroid Build Coastguard Worker
2295*6236dae4SAndroid Build Coastguard Worker
2296*6236dae4SAndroid Build Coastguard Worker# _LT_SYS_DYNAMIC_LINKER([TAG])
2297*6236dae4SAndroid Build Coastguard Worker# -----------------------------
2298*6236dae4SAndroid Build Coastguard Worker# PORTME Fill in your ld.so characteristics
2299*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_SYS_DYNAMIC_LINKER],
2300*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2301*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
2302*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2303*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])dnl
2304*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
2305*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2306*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2307*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([dynamic linker characteristics])
2308*6236dae4SAndroid Build Coastguard Workerm4_if([$1],
2309*6236dae4SAndroid Build Coastguard Worker	[], [
2310*6236dae4SAndroid Build Coastguard Workerif test yes = "$GCC"; then
2311*6236dae4SAndroid Build Coastguard Worker  case $host_os in
2312*6236dae4SAndroid Build Coastguard Worker    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2313*6236dae4SAndroid Build Coastguard Worker    *) lt_awk_arg='/^libraries:/' ;;
2314*6236dae4SAndroid Build Coastguard Worker  esac
2315*6236dae4SAndroid Build Coastguard Worker  case $host_os in
2316*6236dae4SAndroid Build Coastguard Worker    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2317*6236dae4SAndroid Build Coastguard Worker    *) lt_sed_strip_eq='s|=/|/|g' ;;
2318*6236dae4SAndroid Build Coastguard Worker  esac
2319*6236dae4SAndroid Build Coastguard Worker  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2320*6236dae4SAndroid Build Coastguard Worker  case $lt_search_path_spec in
2321*6236dae4SAndroid Build Coastguard Worker  *\;*)
2322*6236dae4SAndroid Build Coastguard Worker    # if the path contains ";" then we assume it to be the separator
2323*6236dae4SAndroid Build Coastguard Worker    # otherwise default to the standard path separator (i.e. ":") - it is
2324*6236dae4SAndroid Build Coastguard Worker    # assumed that no part of a normal pathname contains ";" but that should
2325*6236dae4SAndroid Build Coastguard Worker    # okay in the real world where ";" in dirpaths is itself problematic.
2326*6236dae4SAndroid Build Coastguard Worker    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2327*6236dae4SAndroid Build Coastguard Worker    ;;
2328*6236dae4SAndroid Build Coastguard Worker  *)
2329*6236dae4SAndroid Build Coastguard Worker    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2330*6236dae4SAndroid Build Coastguard Worker    ;;
2331*6236dae4SAndroid Build Coastguard Worker  esac
2332*6236dae4SAndroid Build Coastguard Worker  # Ok, now we have the path, separated by spaces, we can step through it
2333*6236dae4SAndroid Build Coastguard Worker  # and add multilib dir if necessary...
2334*6236dae4SAndroid Build Coastguard Worker  lt_tmp_lt_search_path_spec=
2335*6236dae4SAndroid Build Coastguard Worker  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2336*6236dae4SAndroid Build Coastguard Worker  # ...but if some path component already ends with the multilib dir we assume
2337*6236dae4SAndroid Build Coastguard Worker  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2338*6236dae4SAndroid Build Coastguard Worker  case "$lt_multi_os_dir; $lt_search_path_spec " in
2339*6236dae4SAndroid Build Coastguard Worker  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2340*6236dae4SAndroid Build Coastguard Worker    lt_multi_os_dir=
2341*6236dae4SAndroid Build Coastguard Worker    ;;
2342*6236dae4SAndroid Build Coastguard Worker  esac
2343*6236dae4SAndroid Build Coastguard Worker  for lt_sys_path in $lt_search_path_spec; do
2344*6236dae4SAndroid Build Coastguard Worker    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2345*6236dae4SAndroid Build Coastguard Worker      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2346*6236dae4SAndroid Build Coastguard Worker    elif test -n "$lt_multi_os_dir"; then
2347*6236dae4SAndroid Build Coastguard Worker      test -d "$lt_sys_path" && \
2348*6236dae4SAndroid Build Coastguard Worker	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2349*6236dae4SAndroid Build Coastguard Worker    fi
2350*6236dae4SAndroid Build Coastguard Worker  done
2351*6236dae4SAndroid Build Coastguard Worker  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2352*6236dae4SAndroid Build Coastguard WorkerBEGIN {RS = " "; FS = "/|\n";} {
2353*6236dae4SAndroid Build Coastguard Worker  lt_foo = "";
2354*6236dae4SAndroid Build Coastguard Worker  lt_count = 0;
2355*6236dae4SAndroid Build Coastguard Worker  for (lt_i = NF; lt_i > 0; lt_i--) {
2356*6236dae4SAndroid Build Coastguard Worker    if ($lt_i != "" && $lt_i != ".") {
2357*6236dae4SAndroid Build Coastguard Worker      if ($lt_i == "..") {
2358*6236dae4SAndroid Build Coastguard Worker        lt_count++;
2359*6236dae4SAndroid Build Coastguard Worker      } else {
2360*6236dae4SAndroid Build Coastguard Worker        if (lt_count == 0) {
2361*6236dae4SAndroid Build Coastguard Worker          lt_foo = "/" $lt_i lt_foo;
2362*6236dae4SAndroid Build Coastguard Worker        } else {
2363*6236dae4SAndroid Build Coastguard Worker          lt_count--;
2364*6236dae4SAndroid Build Coastguard Worker        }
2365*6236dae4SAndroid Build Coastguard Worker      }
2366*6236dae4SAndroid Build Coastguard Worker    }
2367*6236dae4SAndroid Build Coastguard Worker  }
2368*6236dae4SAndroid Build Coastguard Worker  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2369*6236dae4SAndroid Build Coastguard Worker  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2370*6236dae4SAndroid Build Coastguard Worker}'`
2371*6236dae4SAndroid Build Coastguard Worker  # AWK program above erroneously prepends '/' to C:/dos/paths
2372*6236dae4SAndroid Build Coastguard Worker  # for these hosts.
2373*6236dae4SAndroid Build Coastguard Worker  case $host_os in
2374*6236dae4SAndroid Build Coastguard Worker    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2375*6236dae4SAndroid Build Coastguard Worker      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2376*6236dae4SAndroid Build Coastguard Worker  esac
2377*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2378*6236dae4SAndroid Build Coastguard Workerelse
2379*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2380*6236dae4SAndroid Build Coastguard Workerfi])
2381*6236dae4SAndroid Build Coastguard Workerlibrary_names_spec=
2382*6236dae4SAndroid Build Coastguard Workerlibname_spec='lib$name'
2383*6236dae4SAndroid Build Coastguard Workersoname_spec=
2384*6236dae4SAndroid Build Coastguard Workershrext_cmds=.so
2385*6236dae4SAndroid Build Coastguard Workerpostinstall_cmds=
2386*6236dae4SAndroid Build Coastguard Workerpostuninstall_cmds=
2387*6236dae4SAndroid Build Coastguard Workerfinish_cmds=
2388*6236dae4SAndroid Build Coastguard Workerfinish_eval=
2389*6236dae4SAndroid Build Coastguard Workershlibpath_var=
2390*6236dae4SAndroid Build Coastguard Workershlibpath_overrides_runpath=unknown
2391*6236dae4SAndroid Build Coastguard Workerversion_type=none
2392*6236dae4SAndroid Build Coastguard Workerdynamic_linker="$host_os ld.so"
2393*6236dae4SAndroid Build Coastguard Workersys_lib_dlsearch_path_spec="/lib /usr/lib"
2394*6236dae4SAndroid Build Coastguard Workerneed_lib_prefix=unknown
2395*6236dae4SAndroid Build Coastguard Workerhardcode_into_libs=no
2396*6236dae4SAndroid Build Coastguard Worker
2397*6236dae4SAndroid Build Coastguard Worker# when you set need_version to no, make sure it does not cause -set_version
2398*6236dae4SAndroid Build Coastguard Worker# flags to be left without arguments
2399*6236dae4SAndroid Build Coastguard Workerneed_version=unknown
2400*6236dae4SAndroid Build Coastguard Worker
2401*6236dae4SAndroid Build Coastguard WorkerAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2402*6236dae4SAndroid Build Coastguard Worker[User-defined run-time library search path.])
2403*6236dae4SAndroid Build Coastguard Worker
2404*6236dae4SAndroid Build Coastguard Workercase $host_os in
2405*6236dae4SAndroid Build Coastguard Workeraix3*)
2406*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2407*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2408*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LIBPATH
2409*6236dae4SAndroid Build Coastguard Worker
2410*6236dae4SAndroid Build Coastguard Worker  # AIX 3 has no versioning support, so we append a major version to the name.
2411*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2412*6236dae4SAndroid Build Coastguard Worker  ;;
2413*6236dae4SAndroid Build Coastguard Worker
2414*6236dae4SAndroid Build Coastguard Workeraix[[4-9]]*)
2415*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2416*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2417*6236dae4SAndroid Build Coastguard Worker  need_version=no
2418*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2419*6236dae4SAndroid Build Coastguard Worker  if test ia64 = "$host_cpu"; then
2420*6236dae4SAndroid Build Coastguard Worker    # AIX 5 supports IA64
2421*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2422*6236dae4SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2423*6236dae4SAndroid Build Coastguard Worker  else
2424*6236dae4SAndroid Build Coastguard Worker    # With GCC up to 2.95.x, collect2 would create an import file
2425*6236dae4SAndroid Build Coastguard Worker    # for dependence libraries.  The import file would start with
2426*6236dae4SAndroid Build Coastguard Worker    # the line '#! .'.  This would cause the generated library to
2427*6236dae4SAndroid Build Coastguard Worker    # depend on '.', always an invalid library.  This was fixed in
2428*6236dae4SAndroid Build Coastguard Worker    # development snapshots of GCC prior to 3.0.
2429*6236dae4SAndroid Build Coastguard Worker    case $host_os in
2430*6236dae4SAndroid Build Coastguard Worker      aix4 | aix4.[[01]] | aix4.[[01]].*)
2431*6236dae4SAndroid Build Coastguard Worker      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2432*6236dae4SAndroid Build Coastguard Worker	   echo ' yes '
2433*6236dae4SAndroid Build Coastguard Worker	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2434*6236dae4SAndroid Build Coastguard Worker	:
2435*6236dae4SAndroid Build Coastguard Worker      else
2436*6236dae4SAndroid Build Coastguard Worker	can_build_shared=no
2437*6236dae4SAndroid Build Coastguard Worker      fi
2438*6236dae4SAndroid Build Coastguard Worker      ;;
2439*6236dae4SAndroid Build Coastguard Worker    esac
2440*6236dae4SAndroid Build Coastguard Worker    # Using Import Files as archive members, it is possible to support
2441*6236dae4SAndroid Build Coastguard Worker    # filename-based versioning of shared library archives on AIX. While
2442*6236dae4SAndroid Build Coastguard Worker    # this would work for both with and without runtime linking, it will
2443*6236dae4SAndroid Build Coastguard Worker    # prevent static linking of such archives. So we do filename-based
2444*6236dae4SAndroid Build Coastguard Worker    # shared library versioning with .so extension only, which is used
2445*6236dae4SAndroid Build Coastguard Worker    # when both runtime linking and shared linking is enabled.
2446*6236dae4SAndroid Build Coastguard Worker    # Unfortunately, runtime linking may impact performance, so we do
2447*6236dae4SAndroid Build Coastguard Worker    # not want this to be the default eventually. Also, we use the
2448*6236dae4SAndroid Build Coastguard Worker    # versioned .so libs for executables only if there is the -brtl
2449*6236dae4SAndroid Build Coastguard Worker    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2450*6236dae4SAndroid Build Coastguard Worker    # To allow for filename-based versioning support, we need to create
2451*6236dae4SAndroid Build Coastguard Worker    # libNAME.so.V as an archive file, containing:
2452*6236dae4SAndroid Build Coastguard Worker    # *) an Import File, referring to the versioned filename of the
2453*6236dae4SAndroid Build Coastguard Worker    #    archive as well as the shared archive member, telling the
2454*6236dae4SAndroid Build Coastguard Worker    #    bitwidth (32 or 64) of that shared object, and providing the
2455*6236dae4SAndroid Build Coastguard Worker    #    list of exported symbols of that shared object, eventually
2456*6236dae4SAndroid Build Coastguard Worker    #    decorated with the 'weak' keyword
2457*6236dae4SAndroid Build Coastguard Worker    # *) the shared object with the F_LOADONLY flag set, to really avoid
2458*6236dae4SAndroid Build Coastguard Worker    #    it being seen by the linker.
2459*6236dae4SAndroid Build Coastguard Worker    # At run time we better use the real file rather than another symlink,
2460*6236dae4SAndroid Build Coastguard Worker    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2461*6236dae4SAndroid Build Coastguard Worker
2462*6236dae4SAndroid Build Coastguard Worker    case $with_aix_soname,$aix_use_runtimelinking in
2463*6236dae4SAndroid Build Coastguard Worker    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2464*6236dae4SAndroid Build Coastguard Worker    # soname into executable. Probably we can add versioning support to
2465*6236dae4SAndroid Build Coastguard Worker    # collect2, so additional links can be useful in future.
2466*6236dae4SAndroid Build Coastguard Worker    aix,yes) # traditional libtool
2467*6236dae4SAndroid Build Coastguard Worker      dynamic_linker='AIX unversionable lib.so'
2468*6236dae4SAndroid Build Coastguard Worker      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2469*6236dae4SAndroid Build Coastguard Worker      # instead of lib<name>.a to let people know that these are not
2470*6236dae4SAndroid Build Coastguard Worker      # typical AIX shared libraries.
2471*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2472*6236dae4SAndroid Build Coastguard Worker      ;;
2473*6236dae4SAndroid Build Coastguard Worker    aix,no) # traditional AIX only
2474*6236dae4SAndroid Build Coastguard Worker      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2475*6236dae4SAndroid Build Coastguard Worker      # We preserve .a as extension for shared libraries through AIX4.2
2476*6236dae4SAndroid Build Coastguard Worker      # and later when we are not doing run time linking.
2477*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release.a $libname.a'
2478*6236dae4SAndroid Build Coastguard Worker      soname_spec='$libname$release$shared_ext$major'
2479*6236dae4SAndroid Build Coastguard Worker      ;;
2480*6236dae4SAndroid Build Coastguard Worker    svr4,*) # full svr4 only
2481*6236dae4SAndroid Build Coastguard Worker      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2482*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2483*6236dae4SAndroid Build Coastguard Worker      # We do not specify a path in Import Files, so LIBPATH fires.
2484*6236dae4SAndroid Build Coastguard Worker      shlibpath_overrides_runpath=yes
2485*6236dae4SAndroid Build Coastguard Worker      ;;
2486*6236dae4SAndroid Build Coastguard Worker    *,yes) # both, prefer svr4
2487*6236dae4SAndroid Build Coastguard Worker      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2488*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2489*6236dae4SAndroid Build Coastguard Worker      # unpreferred sharedlib libNAME.a needs extra handling
2490*6236dae4SAndroid 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"'
2491*6236dae4SAndroid 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"'
2492*6236dae4SAndroid Build Coastguard Worker      # We do not specify a path in Import Files, so LIBPATH fires.
2493*6236dae4SAndroid Build Coastguard Worker      shlibpath_overrides_runpath=yes
2494*6236dae4SAndroid Build Coastguard Worker      ;;
2495*6236dae4SAndroid Build Coastguard Worker    *,no) # both, prefer aix
2496*6236dae4SAndroid Build Coastguard Worker      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2497*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release.a $libname.a'
2498*6236dae4SAndroid Build Coastguard Worker      soname_spec='$libname$release$shared_ext$major'
2499*6236dae4SAndroid Build Coastguard Worker      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2500*6236dae4SAndroid 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)'
2501*6236dae4SAndroid 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"'
2502*6236dae4SAndroid Build Coastguard Worker      ;;
2503*6236dae4SAndroid Build Coastguard Worker    esac
2504*6236dae4SAndroid Build Coastguard Worker    shlibpath_var=LIBPATH
2505*6236dae4SAndroid Build Coastguard Worker  fi
2506*6236dae4SAndroid Build Coastguard Worker  ;;
2507*6236dae4SAndroid Build Coastguard Worker
2508*6236dae4SAndroid Build Coastguard Workeramigaos*)
2509*6236dae4SAndroid Build Coastguard Worker  case $host_cpu in
2510*6236dae4SAndroid Build Coastguard Worker  powerpc)
2511*6236dae4SAndroid Build Coastguard Worker    # Since July 2007 AmigaOS4 officially supports .so libraries.
2512*6236dae4SAndroid Build Coastguard Worker    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2513*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2514*6236dae4SAndroid Build Coastguard Worker    ;;
2515*6236dae4SAndroid Build Coastguard Worker  m68k)
2516*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname.ixlibrary $libname.a'
2517*6236dae4SAndroid Build Coastguard Worker    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2518*6236dae4SAndroid 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'
2519*6236dae4SAndroid Build Coastguard Worker    ;;
2520*6236dae4SAndroid Build Coastguard Worker  esac
2521*6236dae4SAndroid Build Coastguard Worker  ;;
2522*6236dae4SAndroid Build Coastguard Worker
2523*6236dae4SAndroid Build Coastguard Workerbeos*)
2524*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$shared_ext'
2525*6236dae4SAndroid Build Coastguard Worker  dynamic_linker="$host_os ld.so"
2526*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LIBRARY_PATH
2527*6236dae4SAndroid Build Coastguard Worker  ;;
2528*6236dae4SAndroid Build Coastguard Worker
2529*6236dae4SAndroid Build Coastguard Workerbsdi[[45]]*)
2530*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2531*6236dae4SAndroid Build Coastguard Worker  need_version=no
2532*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2533*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2534*6236dae4SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2535*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2536*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2537*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2538*6236dae4SAndroid Build Coastguard Worker  # the default ld.so.conf also contains /usr/contrib/lib and
2539*6236dae4SAndroid Build Coastguard Worker  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2540*6236dae4SAndroid Build Coastguard Worker  # libtool to hard-code these into programs
2541*6236dae4SAndroid Build Coastguard Worker  ;;
2542*6236dae4SAndroid Build Coastguard Worker
2543*6236dae4SAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
2544*6236dae4SAndroid Build Coastguard Worker  version_type=windows
2545*6236dae4SAndroid Build Coastguard Worker  shrext_cmds=.dll
2546*6236dae4SAndroid Build Coastguard Worker  need_version=no
2547*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2548*6236dae4SAndroid Build Coastguard Worker
2549*6236dae4SAndroid Build Coastguard Worker  case $GCC,$cc_basename in
2550*6236dae4SAndroid Build Coastguard Worker  yes,*)
2551*6236dae4SAndroid Build Coastguard Worker    # gcc
2552*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname.dll.a'
2553*6236dae4SAndroid Build Coastguard Worker    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2554*6236dae4SAndroid Build Coastguard Worker    postinstall_cmds='base_file=`basename \$file`~
2555*6236dae4SAndroid Build Coastguard Worker      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2556*6236dae4SAndroid Build Coastguard Worker      dldir=$destdir/`dirname \$dlpath`~
2557*6236dae4SAndroid Build Coastguard Worker      test -d \$dldir || mkdir -p \$dldir~
2558*6236dae4SAndroid Build Coastguard Worker      $install_prog $dir/$dlname \$dldir/$dlname~
2559*6236dae4SAndroid Build Coastguard Worker      chmod a+x \$dldir/$dlname~
2560*6236dae4SAndroid Build Coastguard Worker      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2561*6236dae4SAndroid Build Coastguard Worker        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2562*6236dae4SAndroid Build Coastguard Worker      fi'
2563*6236dae4SAndroid Build Coastguard Worker    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2564*6236dae4SAndroid Build Coastguard Worker      dlpath=$dir/\$dldll~
2565*6236dae4SAndroid Build Coastguard Worker       $RM \$dlpath'
2566*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2567*6236dae4SAndroid Build Coastguard Worker
2568*6236dae4SAndroid Build Coastguard Worker    case $host_os in
2569*6236dae4SAndroid Build Coastguard Worker    cygwin*)
2570*6236dae4SAndroid Build Coastguard Worker      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2571*6236dae4SAndroid Build Coastguard Worker      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572*6236dae4SAndroid Build Coastguard Workerm4_if([$1], [],[
2573*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2574*6236dae4SAndroid Build Coastguard Worker      ;;
2575*6236dae4SAndroid Build Coastguard Worker    mingw* | cegcc*)
2576*6236dae4SAndroid Build Coastguard Worker      # MinGW DLLs use traditional 'lib' prefix
2577*6236dae4SAndroid Build Coastguard Worker      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2578*6236dae4SAndroid Build Coastguard Worker      ;;
2579*6236dae4SAndroid Build Coastguard Worker    pw32*)
2580*6236dae4SAndroid Build Coastguard Worker      # pw32 DLLs use 'pw' prefix rather than 'lib'
2581*6236dae4SAndroid Build Coastguard Worker      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2582*6236dae4SAndroid Build Coastguard Worker      ;;
2583*6236dae4SAndroid Build Coastguard Worker    esac
2584*6236dae4SAndroid Build Coastguard Worker    dynamic_linker='Win32 ld.exe'
2585*6236dae4SAndroid Build Coastguard Worker    ;;
2586*6236dae4SAndroid Build Coastguard Worker
2587*6236dae4SAndroid Build Coastguard Worker  *,cl* | *,icl*)
2588*6236dae4SAndroid Build Coastguard Worker    # Native MSVC or ICC
2589*6236dae4SAndroid Build Coastguard Worker    libname_spec='$name'
2590*6236dae4SAndroid Build Coastguard Worker    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2591*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname.dll.lib'
2592*6236dae4SAndroid Build Coastguard Worker
2593*6236dae4SAndroid Build Coastguard Worker    case $build_os in
2594*6236dae4SAndroid Build Coastguard Worker    mingw*)
2595*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec=
2596*6236dae4SAndroid Build Coastguard Worker      lt_save_ifs=$IFS
2597*6236dae4SAndroid Build Coastguard Worker      IFS=';'
2598*6236dae4SAndroid Build Coastguard Worker      for lt_path in $LIB
2599*6236dae4SAndroid Build Coastguard Worker      do
2600*6236dae4SAndroid Build Coastguard Worker        IFS=$lt_save_ifs
2601*6236dae4SAndroid Build Coastguard Worker        # Let DOS variable expansion print the short 8.3 style file name.
2602*6236dae4SAndroid Build Coastguard Worker        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2603*6236dae4SAndroid Build Coastguard Worker        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2604*6236dae4SAndroid Build Coastguard Worker      done
2605*6236dae4SAndroid Build Coastguard Worker      IFS=$lt_save_ifs
2606*6236dae4SAndroid Build Coastguard Worker      # Convert to MSYS style.
2607*6236dae4SAndroid 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|^ ||'`
2608*6236dae4SAndroid Build Coastguard Worker      ;;
2609*6236dae4SAndroid Build Coastguard Worker    cygwin*)
2610*6236dae4SAndroid Build Coastguard Worker      # Convert to unix form, then to dos form, then back to unix form
2611*6236dae4SAndroid Build Coastguard Worker      # but this time dos style (no spaces!) so that the unix form looks
2612*6236dae4SAndroid Build Coastguard Worker      # like /cygdrive/c/PROGRA~1:/cygdr...
2613*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2614*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2615*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2616*6236dae4SAndroid Build Coastguard Worker      ;;
2617*6236dae4SAndroid Build Coastguard Worker    *)
2618*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec=$LIB
2619*6236dae4SAndroid Build Coastguard Worker      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2620*6236dae4SAndroid Build Coastguard Worker        # It is most probably a Windows format PATH.
2621*6236dae4SAndroid Build Coastguard Worker        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2622*6236dae4SAndroid Build Coastguard Worker      else
2623*6236dae4SAndroid Build Coastguard Worker        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2624*6236dae4SAndroid Build Coastguard Worker      fi
2625*6236dae4SAndroid Build Coastguard Worker      # FIXME: find the short name or the path components, as spaces are
2626*6236dae4SAndroid Build Coastguard Worker      # common. (e.g. "Program Files" -> "PROGRA~1")
2627*6236dae4SAndroid Build Coastguard Worker      ;;
2628*6236dae4SAndroid Build Coastguard Worker    esac
2629*6236dae4SAndroid Build Coastguard Worker
2630*6236dae4SAndroid Build Coastguard Worker    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2631*6236dae4SAndroid Build Coastguard Worker    postinstall_cmds='base_file=`basename \$file`~
2632*6236dae4SAndroid Build Coastguard Worker      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2633*6236dae4SAndroid Build Coastguard Worker      dldir=$destdir/`dirname \$dlpath`~
2634*6236dae4SAndroid Build Coastguard Worker      test -d \$dldir || mkdir -p \$dldir~
2635*6236dae4SAndroid Build Coastguard Worker      $install_prog $dir/$dlname \$dldir/$dlname'
2636*6236dae4SAndroid Build Coastguard Worker    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2637*6236dae4SAndroid Build Coastguard Worker      dlpath=$dir/\$dldll~
2638*6236dae4SAndroid Build Coastguard Worker       $RM \$dlpath'
2639*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2640*6236dae4SAndroid Build Coastguard Worker    dynamic_linker='Win32 link.exe'
2641*6236dae4SAndroid Build Coastguard Worker    ;;
2642*6236dae4SAndroid Build Coastguard Worker
2643*6236dae4SAndroid Build Coastguard Worker  *)
2644*6236dae4SAndroid Build Coastguard Worker    # Assume MSVC and ICC wrapper
2645*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2646*6236dae4SAndroid Build Coastguard Worker    dynamic_linker='Win32 ld.exe'
2647*6236dae4SAndroid Build Coastguard Worker    ;;
2648*6236dae4SAndroid Build Coastguard Worker  esac
2649*6236dae4SAndroid Build Coastguard Worker  # FIXME: first we should search . and the directory the executable is in
2650*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=PATH
2651*6236dae4SAndroid Build Coastguard Worker  ;;
2652*6236dae4SAndroid Build Coastguard Worker
2653*6236dae4SAndroid Build Coastguard Workerdarwin* | rhapsody*)
2654*6236dae4SAndroid Build Coastguard Worker  dynamic_linker="$host_os dyld"
2655*6236dae4SAndroid Build Coastguard Worker  version_type=darwin
2656*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2657*6236dae4SAndroid Build Coastguard Worker  need_version=no
2658*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2659*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$major$shared_ext'
2660*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2661*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=DYLD_LIBRARY_PATH
2662*6236dae4SAndroid Build Coastguard Worker  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2663*6236dae4SAndroid Build Coastguard Workerm4_if([$1], [],[
2664*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2665*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2666*6236dae4SAndroid Build Coastguard Worker  ;;
2667*6236dae4SAndroid Build Coastguard Worker
2668*6236dae4SAndroid Build Coastguard Workerdgux*)
2669*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2670*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2671*6236dae4SAndroid Build Coastguard Worker  need_version=no
2672*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2673*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2674*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2675*6236dae4SAndroid Build Coastguard Worker  ;;
2676*6236dae4SAndroid Build Coastguard Worker
2677*6236dae4SAndroid Build Coastguard Workerfreebsd* | dragonfly* | midnightbsd*)
2678*6236dae4SAndroid Build Coastguard Worker  # DragonFly does not have aout.  When/if they implement a new
2679*6236dae4SAndroid Build Coastguard Worker  # versioning mechanism, adjust this.
2680*6236dae4SAndroid Build Coastguard Worker  if test -x /usr/bin/objformat; then
2681*6236dae4SAndroid Build Coastguard Worker    objformat=`/usr/bin/objformat`
2682*6236dae4SAndroid Build Coastguard Worker  else
2683*6236dae4SAndroid Build Coastguard Worker    case $host_os in
2684*6236dae4SAndroid Build Coastguard Worker    freebsd[[23]].*) objformat=aout ;;
2685*6236dae4SAndroid Build Coastguard Worker    *) objformat=elf ;;
2686*6236dae4SAndroid Build Coastguard Worker    esac
2687*6236dae4SAndroid Build Coastguard Worker  fi
2688*6236dae4SAndroid Build Coastguard Worker  version_type=freebsd-$objformat
2689*6236dae4SAndroid Build Coastguard Worker  case $version_type in
2690*6236dae4SAndroid Build Coastguard Worker    freebsd-elf*)
2691*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2692*6236dae4SAndroid Build Coastguard Worker      soname_spec='$libname$release$shared_ext$major'
2693*6236dae4SAndroid Build Coastguard Worker      need_version=no
2694*6236dae4SAndroid Build Coastguard Worker      need_lib_prefix=no
2695*6236dae4SAndroid Build Coastguard Worker      ;;
2696*6236dae4SAndroid Build Coastguard Worker    freebsd-*)
2697*6236dae4SAndroid Build Coastguard Worker      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2698*6236dae4SAndroid Build Coastguard Worker      need_version=yes
2699*6236dae4SAndroid Build Coastguard Worker      ;;
2700*6236dae4SAndroid Build Coastguard Worker  esac
2701*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2702*6236dae4SAndroid Build Coastguard Worker  case $host_os in
2703*6236dae4SAndroid Build Coastguard Worker  freebsd2.*)
2704*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2705*6236dae4SAndroid Build Coastguard Worker    ;;
2706*6236dae4SAndroid Build Coastguard Worker  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2707*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2708*6236dae4SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2709*6236dae4SAndroid Build Coastguard Worker    ;;
2710*6236dae4SAndroid Build Coastguard Worker  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2711*6236dae4SAndroid Build Coastguard Worker  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2712*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=no
2713*6236dae4SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2714*6236dae4SAndroid Build Coastguard Worker    ;;
2715*6236dae4SAndroid Build Coastguard Worker  *) # from 4.6 on, and DragonFly
2716*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2717*6236dae4SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2718*6236dae4SAndroid Build Coastguard Worker    ;;
2719*6236dae4SAndroid Build Coastguard Worker  esac
2720*6236dae4SAndroid Build Coastguard Worker  ;;
2721*6236dae4SAndroid Build Coastguard Worker
2722*6236dae4SAndroid Build Coastguard Workerhaiku*)
2723*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2724*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2725*6236dae4SAndroid Build Coastguard Worker  need_version=no
2726*6236dae4SAndroid Build Coastguard Worker  dynamic_linker="$host_os runtime_loader"
2727*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2728*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2729*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LIBRARY_PATH
2730*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2731*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2732*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2733*6236dae4SAndroid Build Coastguard Worker  ;;
2734*6236dae4SAndroid Build Coastguard Worker
2735*6236dae4SAndroid Build Coastguard Workerhpux9* | hpux10* | hpux11*)
2736*6236dae4SAndroid Build Coastguard Worker  # Give a soname corresponding to the major version so that dld.sl refuses to
2737*6236dae4SAndroid Build Coastguard Worker  # link against other versions.
2738*6236dae4SAndroid Build Coastguard Worker  version_type=sunos
2739*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2740*6236dae4SAndroid Build Coastguard Worker  need_version=no
2741*6236dae4SAndroid Build Coastguard Worker  case $host_cpu in
2742*6236dae4SAndroid Build Coastguard Worker  ia64*)
2743*6236dae4SAndroid Build Coastguard Worker    shrext_cmds='.so'
2744*6236dae4SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2745*6236dae4SAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.so"
2746*6236dae4SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2747*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2748*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2749*6236dae4SAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2750*6236dae4SAndroid Build Coastguard Worker    if test 32 = "$HPUX_IA64_MODE"; then
2751*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2752*6236dae4SAndroid Build Coastguard Worker      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2753*6236dae4SAndroid Build Coastguard Worker    else
2754*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2755*6236dae4SAndroid Build Coastguard Worker      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2756*6236dae4SAndroid Build Coastguard Worker    fi
2757*6236dae4SAndroid Build Coastguard Worker    ;;
2758*6236dae4SAndroid Build Coastguard Worker  hppa*64*)
2759*6236dae4SAndroid Build Coastguard Worker    shrext_cmds='.sl'
2760*6236dae4SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2761*6236dae4SAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.sl"
2762*6236dae4SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2763*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2764*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2765*6236dae4SAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2766*6236dae4SAndroid Build Coastguard Worker    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2767*6236dae4SAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2768*6236dae4SAndroid Build Coastguard Worker    ;;
2769*6236dae4SAndroid Build Coastguard Worker  *)
2770*6236dae4SAndroid Build Coastguard Worker    shrext_cmds='.sl'
2771*6236dae4SAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.sl"
2772*6236dae4SAndroid Build Coastguard Worker    shlibpath_var=SHLIB_PATH
2773*6236dae4SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2774*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2775*6236dae4SAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2776*6236dae4SAndroid Build Coastguard Worker    ;;
2777*6236dae4SAndroid Build Coastguard Worker  esac
2778*6236dae4SAndroid Build Coastguard Worker  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2779*6236dae4SAndroid Build Coastguard Worker  postinstall_cmds='chmod 555 $lib'
2780*6236dae4SAndroid Build Coastguard Worker  # or fails outright, so override atomically:
2781*6236dae4SAndroid Build Coastguard Worker  install_override_mode=555
2782*6236dae4SAndroid Build Coastguard Worker  ;;
2783*6236dae4SAndroid Build Coastguard Worker
2784*6236dae4SAndroid Build Coastguard Workerinterix[[3-9]]*)
2785*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2786*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2787*6236dae4SAndroid Build Coastguard Worker  need_version=no
2788*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2789*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2790*6236dae4SAndroid Build Coastguard Worker  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2791*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2792*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2793*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2794*6236dae4SAndroid Build Coastguard Worker  ;;
2795*6236dae4SAndroid Build Coastguard Worker
2796*6236dae4SAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*)
2797*6236dae4SAndroid Build Coastguard Worker  case $host_os in
2798*6236dae4SAndroid Build Coastguard Worker    nonstopux*) version_type=nonstopux ;;
2799*6236dae4SAndroid Build Coastguard Worker    *)
2800*6236dae4SAndroid Build Coastguard Worker	if test yes = "$lt_cv_prog_gnu_ld"; then
2801*6236dae4SAndroid Build Coastguard Worker		version_type=linux # correct to gnu/linux during the next big refactor
2802*6236dae4SAndroid Build Coastguard Worker	else
2803*6236dae4SAndroid Build Coastguard Worker		version_type=irix
2804*6236dae4SAndroid Build Coastguard Worker	fi ;;
2805*6236dae4SAndroid Build Coastguard Worker  esac
2806*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2807*6236dae4SAndroid Build Coastguard Worker  need_version=no
2808*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2809*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2810*6236dae4SAndroid Build Coastguard Worker  case $host_os in
2811*6236dae4SAndroid Build Coastguard Worker  irix5* | nonstopux*)
2812*6236dae4SAndroid Build Coastguard Worker    libsuff= shlibsuff=
2813*6236dae4SAndroid Build Coastguard Worker    ;;
2814*6236dae4SAndroid Build Coastguard Worker  *)
2815*6236dae4SAndroid Build Coastguard Worker    case $LD in # libtool.m4 will add one of these switches to LD
2816*6236dae4SAndroid Build Coastguard Worker    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2817*6236dae4SAndroid Build Coastguard Worker      libsuff= shlibsuff= libmagic=32-bit;;
2818*6236dae4SAndroid Build Coastguard Worker    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2819*6236dae4SAndroid Build Coastguard Worker      libsuff=32 shlibsuff=N32 libmagic=N32;;
2820*6236dae4SAndroid Build Coastguard Worker    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2821*6236dae4SAndroid Build Coastguard Worker      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2822*6236dae4SAndroid Build Coastguard Worker    *) libsuff= shlibsuff= libmagic=never-match;;
2823*6236dae4SAndroid Build Coastguard Worker    esac
2824*6236dae4SAndroid Build Coastguard Worker    ;;
2825*6236dae4SAndroid Build Coastguard Worker  esac
2826*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2827*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2828*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2829*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2830*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2831*6236dae4SAndroid Build Coastguard Worker  ;;
2832*6236dae4SAndroid Build Coastguard Worker
2833*6236dae4SAndroid Build Coastguard Worker# No shared lib support for Linux oldld, aout, or coff.
2834*6236dae4SAndroid Build Coastguard Workerlinux*oldld* | linux*aout* | linux*coff*)
2835*6236dae4SAndroid Build Coastguard Worker  dynamic_linker=no
2836*6236dae4SAndroid Build Coastguard Worker  ;;
2837*6236dae4SAndroid Build Coastguard Worker
2838*6236dae4SAndroid Build Coastguard Workerlinux*android*)
2839*6236dae4SAndroid Build Coastguard Worker  version_type=none # Android doesn't support versioned libraries.
2840*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2841*6236dae4SAndroid Build Coastguard Worker  need_version=no
2842*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext'
2843*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext'
2844*6236dae4SAndroid Build Coastguard Worker  finish_cmds=
2845*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2846*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2847*6236dae4SAndroid Build Coastguard Worker
2848*6236dae4SAndroid Build Coastguard Worker  # This implies no fast_install, which is unacceptable.
2849*6236dae4SAndroid Build Coastguard Worker  # Some rework will be needed to allow for fast_install
2850*6236dae4SAndroid Build Coastguard Worker  # before this can be enabled.
2851*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2852*6236dae4SAndroid Build Coastguard Worker
2853*6236dae4SAndroid Build Coastguard Worker  dynamic_linker='Android linker'
2854*6236dae4SAndroid Build Coastguard Worker  # Don't embed -rpath directories since the linker doesn't support them.
2855*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2856*6236dae4SAndroid Build Coastguard Worker  ;;
2857*6236dae4SAndroid Build Coastguard Worker
2858*6236dae4SAndroid Build Coastguard Worker# This must be glibc/ELF.
2859*6236dae4SAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2860*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2861*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2862*6236dae4SAndroid Build Coastguard Worker  need_version=no
2863*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2864*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2865*6236dae4SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2866*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2867*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2868*6236dae4SAndroid Build Coastguard Worker
2869*6236dae4SAndroid Build Coastguard Worker  # Some binutils ld are patched to set DT_RUNPATH
2870*6236dae4SAndroid Build Coastguard Worker  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2871*6236dae4SAndroid Build Coastguard Worker    [lt_cv_shlibpath_overrides_runpath=no
2872*6236dae4SAndroid Build Coastguard Worker    save_LDFLAGS=$LDFLAGS
2873*6236dae4SAndroid Build Coastguard Worker    save_libdir=$libdir
2874*6236dae4SAndroid Build Coastguard Worker    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2875*6236dae4SAndroid Build Coastguard Worker	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2876*6236dae4SAndroid Build Coastguard Worker    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2877*6236dae4SAndroid Build Coastguard Worker      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2878*6236dae4SAndroid Build Coastguard Worker	 [lt_cv_shlibpath_overrides_runpath=yes])])
2879*6236dae4SAndroid Build Coastguard Worker    LDFLAGS=$save_LDFLAGS
2880*6236dae4SAndroid Build Coastguard Worker    libdir=$save_libdir
2881*6236dae4SAndroid Build Coastguard Worker    ])
2882*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2883*6236dae4SAndroid Build Coastguard Worker
2884*6236dae4SAndroid Build Coastguard Worker  # This implies no fast_install, which is unacceptable.
2885*6236dae4SAndroid Build Coastguard Worker  # Some rework will be needed to allow for fast_install
2886*6236dae4SAndroid Build Coastguard Worker  # before this can be enabled.
2887*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2888*6236dae4SAndroid Build Coastguard Worker
2889*6236dae4SAndroid Build Coastguard Worker  # Ideally, we could use ldconfig to report *all* directores which are
2890*6236dae4SAndroid Build Coastguard Worker  # searched for libraries, however this is still not possible.  Aside from not
2891*6236dae4SAndroid Build Coastguard Worker  # being certain /sbin/ldconfig is available, command
2892*6236dae4SAndroid Build Coastguard Worker  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2893*6236dae4SAndroid Build Coastguard Worker  # even though it is searched at run-time.  Try to do the best guess by
2894*6236dae4SAndroid Build Coastguard Worker  # appending ld.so.conf contents (and includes) to the search path.
2895*6236dae4SAndroid Build Coastguard Worker  if test -f /etc/ld.so.conf; then
2896*6236dae4SAndroid 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' ' '`
2897*6236dae4SAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2898*6236dae4SAndroid Build Coastguard Worker  fi
2899*6236dae4SAndroid Build Coastguard Worker
2900*6236dae4SAndroid Build Coastguard Worker  # We used to test for /lib/ld.so.1 and disable shared libraries on
2901*6236dae4SAndroid Build Coastguard Worker  # powerpc, because MkLinux only supported shared libraries with the
2902*6236dae4SAndroid Build Coastguard Worker  # GNU dynamic linker.  Since this was broken with cross compilers,
2903*6236dae4SAndroid Build Coastguard Worker  # most powerpc-linux boxes support dynamic linking these days and
2904*6236dae4SAndroid Build Coastguard Worker  # people can always --disable-shared, the test was removed, and we
2905*6236dae4SAndroid Build Coastguard Worker  # assume the GNU/Linux dynamic linker is in use.
2906*6236dae4SAndroid Build Coastguard Worker  dynamic_linker='GNU/Linux ld.so'
2907*6236dae4SAndroid Build Coastguard Worker  ;;
2908*6236dae4SAndroid Build Coastguard Worker
2909*6236dae4SAndroid Build Coastguard Workernetbsdelf*-gnu)
2910*6236dae4SAndroid Build Coastguard Worker  version_type=linux
2911*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2912*6236dae4SAndroid Build Coastguard Worker  need_version=no
2913*6236dae4SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2914*6236dae4SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2915*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2916*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2917*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2918*6236dae4SAndroid Build Coastguard Worker  dynamic_linker='NetBSD ld.elf_so'
2919*6236dae4SAndroid Build Coastguard Worker  ;;
2920*6236dae4SAndroid Build Coastguard Worker
2921*6236dae4SAndroid Build Coastguard Workernetbsd*)
2922*6236dae4SAndroid Build Coastguard Worker  version_type=sunos
2923*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2924*6236dae4SAndroid Build Coastguard Worker  need_version=no
2925*6236dae4SAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2926*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2927*6236dae4SAndroid Build Coastguard Worker    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2928*6236dae4SAndroid Build Coastguard Worker    dynamic_linker='NetBSD (a.out) ld.so'
2929*6236dae4SAndroid Build Coastguard Worker  else
2930*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931*6236dae4SAndroid Build Coastguard Worker    soname_spec='$libname$release$shared_ext$major'
2932*6236dae4SAndroid Build Coastguard Worker    dynamic_linker='NetBSD ld.elf_so'
2933*6236dae4SAndroid Build Coastguard Worker  fi
2934*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2935*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2936*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2937*6236dae4SAndroid Build Coastguard Worker  ;;
2938*6236dae4SAndroid Build Coastguard Worker
2939*6236dae4SAndroid Build Coastguard Workernewsos6)
2940*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2941*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2942*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2943*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2944*6236dae4SAndroid Build Coastguard Worker  ;;
2945*6236dae4SAndroid Build Coastguard Worker
2946*6236dae4SAndroid Build Coastguard Worker*nto* | *qnx*)
2947*6236dae4SAndroid Build Coastguard Worker  version_type=qnx
2948*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2949*6236dae4SAndroid Build Coastguard Worker  need_version=no
2950*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2951*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
2952*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2953*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2954*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2955*6236dae4SAndroid Build Coastguard Worker  dynamic_linker='ldqnx.so'
2956*6236dae4SAndroid Build Coastguard Worker  ;;
2957*6236dae4SAndroid Build Coastguard Worker
2958*6236dae4SAndroid Build Coastguard Workeropenbsd* | bitrig*)
2959*6236dae4SAndroid Build Coastguard Worker  version_type=sunos
2960*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=/usr/lib
2961*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2962*6236dae4SAndroid Build Coastguard Worker  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2963*6236dae4SAndroid Build Coastguard Worker    need_version=no
2964*6236dae4SAndroid Build Coastguard Worker  else
2965*6236dae4SAndroid Build Coastguard Worker    need_version=yes
2966*6236dae4SAndroid Build Coastguard Worker  fi
2967*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2968*6236dae4SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2969*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2970*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2971*6236dae4SAndroid Build Coastguard Worker  ;;
2972*6236dae4SAndroid Build Coastguard Worker
2973*6236dae4SAndroid Build Coastguard Workeros2*)
2974*6236dae4SAndroid Build Coastguard Worker  libname_spec='$name'
2975*6236dae4SAndroid Build Coastguard Worker  version_type=windows
2976*6236dae4SAndroid Build Coastguard Worker  shrext_cmds=.dll
2977*6236dae4SAndroid Build Coastguard Worker  need_version=no
2978*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
2979*6236dae4SAndroid Build Coastguard Worker  # OS/2 can only load a DLL with a base name of 8 characters or less.
2980*6236dae4SAndroid Build Coastguard Worker  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2981*6236dae4SAndroid Build Coastguard Worker    v=$($ECHO $release$versuffix | tr -d .-);
2982*6236dae4SAndroid Build Coastguard Worker    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2983*6236dae4SAndroid Build Coastguard Worker    $ECHO $n$v`$shared_ext'
2984*6236dae4SAndroid Build Coastguard Worker  library_names_spec='${libname}_dll.$libext'
2985*6236dae4SAndroid Build Coastguard Worker  dynamic_linker='OS/2 ld.exe'
2986*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=BEGINLIBPATH
2987*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2988*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2989*6236dae4SAndroid Build Coastguard Worker  postinstall_cmds='base_file=`basename \$file`~
2990*6236dae4SAndroid Build Coastguard Worker    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2991*6236dae4SAndroid Build Coastguard Worker    dldir=$destdir/`dirname \$dlpath`~
2992*6236dae4SAndroid Build Coastguard Worker    test -d \$dldir || mkdir -p \$dldir~
2993*6236dae4SAndroid Build Coastguard Worker    $install_prog $dir/$dlname \$dldir/$dlname~
2994*6236dae4SAndroid Build Coastguard Worker    chmod a+x \$dldir/$dlname~
2995*6236dae4SAndroid Build Coastguard Worker    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2996*6236dae4SAndroid Build Coastguard Worker      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2997*6236dae4SAndroid Build Coastguard Worker    fi'
2998*6236dae4SAndroid Build Coastguard Worker  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2999*6236dae4SAndroid Build Coastguard Worker    dlpath=$dir/\$dldll~
3000*6236dae4SAndroid Build Coastguard Worker    $RM \$dlpath'
3001*6236dae4SAndroid Build Coastguard Worker  ;;
3002*6236dae4SAndroid Build Coastguard Worker
3003*6236dae4SAndroid Build Coastguard Workerosf3* | osf4* | osf5*)
3004*6236dae4SAndroid Build Coastguard Worker  version_type=osf
3005*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
3006*6236dae4SAndroid Build Coastguard Worker  need_version=no
3007*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3008*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3009*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3010*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3011*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3012*6236dae4SAndroid Build Coastguard Worker  ;;
3013*6236dae4SAndroid Build Coastguard Worker
3014*6236dae4SAndroid Build Coastguard Workerrdos*)
3015*6236dae4SAndroid Build Coastguard Worker  dynamic_linker=no
3016*6236dae4SAndroid Build Coastguard Worker  ;;
3017*6236dae4SAndroid Build Coastguard Worker
3018*6236dae4SAndroid Build Coastguard Workersolaris*)
3019*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3020*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
3021*6236dae4SAndroid Build Coastguard Worker  need_version=no
3022*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3023*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3024*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3025*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
3026*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
3027*6236dae4SAndroid Build Coastguard Worker  # ldd complains unless libraries are executable
3028*6236dae4SAndroid Build Coastguard Worker  postinstall_cmds='chmod +x $lib'
3029*6236dae4SAndroid Build Coastguard Worker  ;;
3030*6236dae4SAndroid Build Coastguard Worker
3031*6236dae4SAndroid Build Coastguard Workersunos4*)
3032*6236dae4SAndroid Build Coastguard Worker  version_type=sunos
3033*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3034*6236dae4SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3035*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3036*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
3037*6236dae4SAndroid Build Coastguard Worker  if test yes = "$with_gnu_ld"; then
3038*6236dae4SAndroid Build Coastguard Worker    need_lib_prefix=no
3039*6236dae4SAndroid Build Coastguard Worker  fi
3040*6236dae4SAndroid Build Coastguard Worker  need_version=yes
3041*6236dae4SAndroid Build Coastguard Worker  ;;
3042*6236dae4SAndroid Build Coastguard Worker
3043*6236dae4SAndroid Build Coastguard Workersysv4 | sysv4.3*)
3044*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3045*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3046*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3047*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3048*6236dae4SAndroid Build Coastguard Worker  case $host_vendor in
3049*6236dae4SAndroid Build Coastguard Worker    sni)
3050*6236dae4SAndroid Build Coastguard Worker      shlibpath_overrides_runpath=no
3051*6236dae4SAndroid Build Coastguard Worker      need_lib_prefix=no
3052*6236dae4SAndroid Build Coastguard Worker      runpath_var=LD_RUN_PATH
3053*6236dae4SAndroid Build Coastguard Worker      ;;
3054*6236dae4SAndroid Build Coastguard Worker    siemens)
3055*6236dae4SAndroid Build Coastguard Worker      need_lib_prefix=no
3056*6236dae4SAndroid Build Coastguard Worker      ;;
3057*6236dae4SAndroid Build Coastguard Worker    motorola)
3058*6236dae4SAndroid Build Coastguard Worker      need_lib_prefix=no
3059*6236dae4SAndroid Build Coastguard Worker      need_version=no
3060*6236dae4SAndroid Build Coastguard Worker      shlibpath_overrides_runpath=no
3061*6236dae4SAndroid Build Coastguard Worker      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3062*6236dae4SAndroid Build Coastguard Worker      ;;
3063*6236dae4SAndroid Build Coastguard Worker  esac
3064*6236dae4SAndroid Build Coastguard Worker  ;;
3065*6236dae4SAndroid Build Coastguard Worker
3066*6236dae4SAndroid Build Coastguard Workersysv4*MP*)
3067*6236dae4SAndroid Build Coastguard Worker  if test -d /usr/nec; then
3068*6236dae4SAndroid Build Coastguard Worker    version_type=linux # correct to gnu/linux during the next big refactor
3069*6236dae4SAndroid Build Coastguard Worker    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3070*6236dae4SAndroid Build Coastguard Worker    soname_spec='$libname$shared_ext.$major'
3071*6236dae4SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
3072*6236dae4SAndroid Build Coastguard Worker  fi
3073*6236dae4SAndroid Build Coastguard Worker  ;;
3074*6236dae4SAndroid Build Coastguard Worker
3075*6236dae4SAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3076*6236dae4SAndroid Build Coastguard Worker  version_type=sco
3077*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
3078*6236dae4SAndroid Build Coastguard Worker  need_version=no
3079*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3080*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3081*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3082*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
3083*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
3084*6236dae4SAndroid Build Coastguard Worker  if test yes = "$with_gnu_ld"; then
3085*6236dae4SAndroid Build Coastguard Worker    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3086*6236dae4SAndroid Build Coastguard Worker  else
3087*6236dae4SAndroid Build Coastguard Worker    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3088*6236dae4SAndroid Build Coastguard Worker    case $host_os in
3089*6236dae4SAndroid Build Coastguard Worker      sco3.2v5*)
3090*6236dae4SAndroid Build Coastguard Worker        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3091*6236dae4SAndroid Build Coastguard Worker	;;
3092*6236dae4SAndroid Build Coastguard Worker    esac
3093*6236dae4SAndroid Build Coastguard Worker  fi
3094*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/usr/lib'
3095*6236dae4SAndroid Build Coastguard Worker  ;;
3096*6236dae4SAndroid Build Coastguard Worker
3097*6236dae4SAndroid Build Coastguard Workertpf*)
3098*6236dae4SAndroid Build Coastguard Worker  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3099*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3100*6236dae4SAndroid Build Coastguard Worker  need_lib_prefix=no
3101*6236dae4SAndroid Build Coastguard Worker  need_version=no
3102*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3103*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3104*6236dae4SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
3105*6236dae4SAndroid Build Coastguard Worker  hardcode_into_libs=yes
3106*6236dae4SAndroid Build Coastguard Worker  ;;
3107*6236dae4SAndroid Build Coastguard Worker
3108*6236dae4SAndroid Build Coastguard Workeruts4*)
3109*6236dae4SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
3110*6236dae4SAndroid Build Coastguard Worker  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3111*6236dae4SAndroid Build Coastguard Worker  soname_spec='$libname$release$shared_ext$major'
3112*6236dae4SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
3113*6236dae4SAndroid Build Coastguard Worker  ;;
3114*6236dae4SAndroid Build Coastguard Worker
3115*6236dae4SAndroid Build Coastguard Worker*)
3116*6236dae4SAndroid Build Coastguard Worker  dynamic_linker=no
3117*6236dae4SAndroid Build Coastguard Worker  ;;
3118*6236dae4SAndroid Build Coastguard Workeresac
3119*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT([$dynamic_linker])
3120*6236dae4SAndroid Build Coastguard Workertest no = "$dynamic_linker" && can_build_shared=no
3121*6236dae4SAndroid Build Coastguard Worker
3122*6236dae4SAndroid Build Coastguard Workervariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3123*6236dae4SAndroid Build Coastguard Workerif test yes = "$GCC"; then
3124*6236dae4SAndroid Build Coastguard Worker  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3125*6236dae4SAndroid Build Coastguard Workerfi
3126*6236dae4SAndroid Build Coastguard Worker
3127*6236dae4SAndroid Build Coastguard Workerif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3128*6236dae4SAndroid Build Coastguard Worker  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3129*6236dae4SAndroid Build Coastguard Workerfi
3130*6236dae4SAndroid Build Coastguard Worker
3131*6236dae4SAndroid Build Coastguard Workerif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3132*6236dae4SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3133*6236dae4SAndroid Build Coastguard Workerfi
3134*6236dae4SAndroid Build Coastguard Worker
3135*6236dae4SAndroid Build Coastguard Worker# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3136*6236dae4SAndroid Build Coastguard Workerconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3137*6236dae4SAndroid Build Coastguard Worker
3138*6236dae4SAndroid Build Coastguard Worker# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3139*6236dae4SAndroid Build Coastguard Workerfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3140*6236dae4SAndroid Build Coastguard Worker
3141*6236dae4SAndroid Build Coastguard Worker# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3142*6236dae4SAndroid Build Coastguard Workerconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3143*6236dae4SAndroid Build Coastguard Worker
3144*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [variables_saved_for_relink], [1],
3145*6236dae4SAndroid Build Coastguard Worker    [Variables whose values should be saved in libtool wrapper scripts and
3146*6236dae4SAndroid Build Coastguard Worker    restored at link time])
3147*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [need_lib_prefix], [0],
3148*6236dae4SAndroid Build Coastguard Worker    [Do we need the "lib" prefix for modules?])
3149*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3150*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [version_type], [0], [Library versioning type])
3151*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3152*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3153*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_overrides_runpath], [0],
3154*6236dae4SAndroid Build Coastguard Worker    [Is shlibpath searched before the hard-coded library search path?])
3155*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3156*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [library_names_spec], [1],
3157*6236dae4SAndroid Build Coastguard Worker    [[List of archive names.  First name is the real one, the rest are links.
3158*6236dae4SAndroid Build Coastguard Worker    The last name is the one that the linker finds with -lNAME]])
3159*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [soname_spec], [1],
3160*6236dae4SAndroid Build Coastguard Worker    [[The coded name of the library, if different from the real name]])
3161*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [install_override_mode], [1],
3162*6236dae4SAndroid Build Coastguard Worker    [Permission mode override for installation of shared libraries])
3163*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [postinstall_cmds], [2],
3164*6236dae4SAndroid Build Coastguard Worker    [Command to use after installation of a shared archive])
3165*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [postuninstall_cmds], [2],
3166*6236dae4SAndroid Build Coastguard Worker    [Command to use after uninstallation of a shared archive])
3167*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [finish_cmds], [2],
3168*6236dae4SAndroid Build Coastguard Worker    [Commands used to finish a libtool library installation in a directory])
3169*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [finish_eval], [1],
3170*6236dae4SAndroid Build Coastguard Worker    [[As "finish_cmds", except a single script fragment to be evaled but
3171*6236dae4SAndroid Build Coastguard Worker    not shown]])
3172*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [hardcode_into_libs], [0],
3173*6236dae4SAndroid Build Coastguard Worker    [Whether we should hardcode library paths into libraries])
3174*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [sys_lib_search_path_spec], [2],
3175*6236dae4SAndroid Build Coastguard Worker    [Compile-time system search path for libraries])
3176*6236dae4SAndroid Build Coastguard Worker_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3177*6236dae4SAndroid Build Coastguard Worker    [Detected run-time system search path for libraries])
3178*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3179*6236dae4SAndroid Build Coastguard Worker    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3180*6236dae4SAndroid Build Coastguard Worker])# _LT_SYS_DYNAMIC_LINKER
3181*6236dae4SAndroid Build Coastguard Worker
3182*6236dae4SAndroid Build Coastguard Worker
3183*6236dae4SAndroid Build Coastguard Worker# _LT_PATH_TOOL_PREFIX(TOOL)
3184*6236dae4SAndroid Build Coastguard Worker# --------------------------
3185*6236dae4SAndroid Build Coastguard Worker# find a file program that can recognize shared library
3186*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([_LT_PATH_TOOL_PREFIX],
3187*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl
3188*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([for $1])
3189*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3190*6236dae4SAndroid Build Coastguard Worker[case $MAGIC_CMD in
3191*6236dae4SAndroid Build Coastguard Worker[[\\/*] |  ?:[\\/]*])
3192*6236dae4SAndroid Build Coastguard Worker  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3193*6236dae4SAndroid Build Coastguard Worker  ;;
3194*6236dae4SAndroid Build Coastguard Worker*)
3195*6236dae4SAndroid Build Coastguard Worker  lt_save_MAGIC_CMD=$MAGIC_CMD
3196*6236dae4SAndroid Build Coastguard Worker  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3197*6236dae4SAndroid Build Coastguard Workerdnl $ac_dummy forces splitting on constant user-supplied paths.
3198*6236dae4SAndroid Build Coastguard Workerdnl POSIX.2 word splitting is done only on the output of word expansions,
3199*6236dae4SAndroid Build Coastguard Workerdnl not every word.  This closes a longstanding sh security hole.
3200*6236dae4SAndroid Build Coastguard Worker  ac_dummy="m4_if([$2], , $PATH, [$2])"
3201*6236dae4SAndroid Build Coastguard Worker  for ac_dir in $ac_dummy; do
3202*6236dae4SAndroid Build Coastguard Worker    IFS=$lt_save_ifs
3203*6236dae4SAndroid Build Coastguard Worker    test -z "$ac_dir" && ac_dir=.
3204*6236dae4SAndroid Build Coastguard Worker    if test -f "$ac_dir/$1"; then
3205*6236dae4SAndroid Build Coastguard Worker      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3206*6236dae4SAndroid Build Coastguard Worker      if test -n "$file_magic_test_file"; then
3207*6236dae4SAndroid Build Coastguard Worker	case $deplibs_check_method in
3208*6236dae4SAndroid Build Coastguard Worker	"file_magic "*)
3209*6236dae4SAndroid Build Coastguard Worker	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3210*6236dae4SAndroid Build Coastguard Worker	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3211*6236dae4SAndroid Build Coastguard Worker	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3212*6236dae4SAndroid Build Coastguard Worker	    $EGREP "$file_magic_regex" > /dev/null; then
3213*6236dae4SAndroid Build Coastguard Worker	    :
3214*6236dae4SAndroid Build Coastguard Worker	  else
3215*6236dae4SAndroid Build Coastguard Worker	    cat <<_LT_EOF 1>&2
3216*6236dae4SAndroid Build Coastguard Worker
3217*6236dae4SAndroid Build Coastguard Worker*** Warning: the command libtool uses to detect shared libraries,
3218*6236dae4SAndroid Build Coastguard Worker*** $file_magic_cmd, produces output that libtool cannot recognize.
3219*6236dae4SAndroid Build Coastguard Worker*** The result is that libtool may fail to recognize shared libraries
3220*6236dae4SAndroid Build Coastguard Worker*** as such.  This will affect the creation of libtool libraries that
3221*6236dae4SAndroid Build Coastguard Worker*** depend on shared libraries, but programs linked with such libtool
3222*6236dae4SAndroid Build Coastguard Worker*** libraries will work regardless of this problem.  Nevertheless, you
3223*6236dae4SAndroid Build Coastguard Worker*** may want to report the problem to your system manager and/or to
3224*6236dae4SAndroid Build Coastguard Worker*** [email protected]
3225*6236dae4SAndroid Build Coastguard Worker
3226*6236dae4SAndroid Build Coastguard Worker_LT_EOF
3227*6236dae4SAndroid Build Coastguard Worker	  fi ;;
3228*6236dae4SAndroid Build Coastguard Worker	esac
3229*6236dae4SAndroid Build Coastguard Worker      fi
3230*6236dae4SAndroid Build Coastguard Worker      break
3231*6236dae4SAndroid Build Coastguard Worker    fi
3232*6236dae4SAndroid Build Coastguard Worker  done
3233*6236dae4SAndroid Build Coastguard Worker  IFS=$lt_save_ifs
3234*6236dae4SAndroid Build Coastguard Worker  MAGIC_CMD=$lt_save_MAGIC_CMD
3235*6236dae4SAndroid Build Coastguard Worker  ;;
3236*6236dae4SAndroid Build Coastguard Workeresac])
3237*6236dae4SAndroid Build Coastguard WorkerMAGIC_CMD=$lt_cv_path_MAGIC_CMD
3238*6236dae4SAndroid Build Coastguard Workerif test -n "$MAGIC_CMD"; then
3239*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT($MAGIC_CMD)
3240*6236dae4SAndroid Build Coastguard Workerelse
3241*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT(no)
3242*6236dae4SAndroid Build Coastguard Workerfi
3243*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [MAGIC_CMD], [0],
3244*6236dae4SAndroid Build Coastguard Worker	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3245*6236dae4SAndroid Build Coastguard Worker])# _LT_PATH_TOOL_PREFIX
3246*6236dae4SAndroid Build Coastguard Worker
3247*6236dae4SAndroid Build Coastguard Worker# Old name:
3248*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3249*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3250*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3251*6236dae4SAndroid Build Coastguard Worker
3252*6236dae4SAndroid Build Coastguard Worker
3253*6236dae4SAndroid Build Coastguard Worker# _LT_PATH_MAGIC
3254*6236dae4SAndroid Build Coastguard Worker# --------------
3255*6236dae4SAndroid Build Coastguard Worker# find a file program that can recognize a shared library
3256*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PATH_MAGIC],
3257*6236dae4SAndroid Build Coastguard Worker[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3258*6236dae4SAndroid Build Coastguard Workerif test -z "$lt_cv_path_MAGIC_CMD"; then
3259*6236dae4SAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
3260*6236dae4SAndroid Build Coastguard Worker    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3261*6236dae4SAndroid Build Coastguard Worker  else
3262*6236dae4SAndroid Build Coastguard Worker    MAGIC_CMD=:
3263*6236dae4SAndroid Build Coastguard Worker  fi
3264*6236dae4SAndroid Build Coastguard Workerfi
3265*6236dae4SAndroid Build Coastguard Worker])# _LT_PATH_MAGIC
3266*6236dae4SAndroid Build Coastguard Worker
3267*6236dae4SAndroid Build Coastguard Worker
3268*6236dae4SAndroid Build Coastguard Worker# LT_PATH_LD
3269*6236dae4SAndroid Build Coastguard Worker# ----------
3270*6236dae4SAndroid Build Coastguard Worker# find the pathname to the GNU or non-GNU linker
3271*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_LD],
3272*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
3273*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_HOST])dnl
3274*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3275*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
3276*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
3277*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3278*6236dae4SAndroid Build Coastguard Worker
3279*6236dae4SAndroid Build Coastguard WorkerAC_ARG_WITH([gnu-ld],
3280*6236dae4SAndroid Build Coastguard Worker    [AS_HELP_STRING([--with-gnu-ld],
3281*6236dae4SAndroid Build Coastguard Worker	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3282*6236dae4SAndroid Build Coastguard Worker    [test no = "$withval" || with_gnu_ld=yes],
3283*6236dae4SAndroid Build Coastguard Worker    [with_gnu_ld=no])dnl
3284*6236dae4SAndroid Build Coastguard Worker
3285*6236dae4SAndroid Build Coastguard Workerac_prog=ld
3286*6236dae4SAndroid Build Coastguard Workerif test yes = "$GCC"; then
3287*6236dae4SAndroid Build Coastguard Worker  # Check if gcc -print-prog-name=ld gives a path.
3288*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([for ld used by $CC])
3289*6236dae4SAndroid Build Coastguard Worker  case $host in
3290*6236dae4SAndroid Build Coastguard Worker  *-*-mingw*)
3291*6236dae4SAndroid Build Coastguard Worker    # gcc leaves a trailing carriage return, which upsets mingw
3292*6236dae4SAndroid Build Coastguard Worker    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3293*6236dae4SAndroid Build Coastguard Worker  *)
3294*6236dae4SAndroid Build Coastguard Worker    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3295*6236dae4SAndroid Build Coastguard Worker  esac
3296*6236dae4SAndroid Build Coastguard Worker  case $ac_prog in
3297*6236dae4SAndroid Build Coastguard Worker    # Accept absolute paths.
3298*6236dae4SAndroid Build Coastguard Worker    [[\\/]]* | ?:[[\\/]]*)
3299*6236dae4SAndroid Build Coastguard Worker      re_direlt='/[[^/]][[^/]]*/\.\./'
3300*6236dae4SAndroid Build Coastguard Worker      # Canonicalize the pathname of ld
3301*6236dae4SAndroid Build Coastguard Worker      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3302*6236dae4SAndroid Build Coastguard Worker      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3303*6236dae4SAndroid Build Coastguard Worker	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3304*6236dae4SAndroid Build Coastguard Worker      done
3305*6236dae4SAndroid Build Coastguard Worker      test -z "$LD" && LD=$ac_prog
3306*6236dae4SAndroid Build Coastguard Worker      ;;
3307*6236dae4SAndroid Build Coastguard Worker  "")
3308*6236dae4SAndroid Build Coastguard Worker    # If it fails, then pretend we aren't using GCC.
3309*6236dae4SAndroid Build Coastguard Worker    ac_prog=ld
3310*6236dae4SAndroid Build Coastguard Worker    ;;
3311*6236dae4SAndroid Build Coastguard Worker  *)
3312*6236dae4SAndroid Build Coastguard Worker    # If it is relative, then search for the first ld in PATH.
3313*6236dae4SAndroid Build Coastguard Worker    with_gnu_ld=unknown
3314*6236dae4SAndroid Build Coastguard Worker    ;;
3315*6236dae4SAndroid Build Coastguard Worker  esac
3316*6236dae4SAndroid Build Coastguard Workerelif test yes = "$with_gnu_ld"; then
3317*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([for GNU ld])
3318*6236dae4SAndroid Build Coastguard Workerelse
3319*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([for non-GNU ld])
3320*6236dae4SAndroid Build Coastguard Workerfi
3321*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_LD,
3322*6236dae4SAndroid Build Coastguard Worker[if test -z "$LD"; then
3323*6236dae4SAndroid Build Coastguard Worker  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3324*6236dae4SAndroid Build Coastguard Worker  for ac_dir in $PATH; do
3325*6236dae4SAndroid Build Coastguard Worker    IFS=$lt_save_ifs
3326*6236dae4SAndroid Build Coastguard Worker    test -z "$ac_dir" && ac_dir=.
3327*6236dae4SAndroid Build Coastguard Worker    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3328*6236dae4SAndroid Build Coastguard Worker      lt_cv_path_LD=$ac_dir/$ac_prog
3329*6236dae4SAndroid Build Coastguard Worker      # Check to see if the program is GNU ld.  I'd rather use --version,
3330*6236dae4SAndroid Build Coastguard Worker      # but apparently some variants of GNU ld only accept -v.
3331*6236dae4SAndroid Build Coastguard Worker      # Break only if it was the GNU/non-GNU ld that we prefer.
3332*6236dae4SAndroid Build Coastguard Worker      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3333*6236dae4SAndroid Build Coastguard Worker      *GNU* | *'with BFD'*)
3334*6236dae4SAndroid Build Coastguard Worker	test no != "$with_gnu_ld" && break
3335*6236dae4SAndroid Build Coastguard Worker	;;
3336*6236dae4SAndroid Build Coastguard Worker      *)
3337*6236dae4SAndroid Build Coastguard Worker	test yes != "$with_gnu_ld" && break
3338*6236dae4SAndroid Build Coastguard Worker	;;
3339*6236dae4SAndroid Build Coastguard Worker      esac
3340*6236dae4SAndroid Build Coastguard Worker    fi
3341*6236dae4SAndroid Build Coastguard Worker  done
3342*6236dae4SAndroid Build Coastguard Worker  IFS=$lt_save_ifs
3343*6236dae4SAndroid Build Coastguard Workerelse
3344*6236dae4SAndroid Build Coastguard Worker  lt_cv_path_LD=$LD # Let the user override the test with a path.
3345*6236dae4SAndroid Build Coastguard Workerfi])
3346*6236dae4SAndroid Build Coastguard WorkerLD=$lt_cv_path_LD
3347*6236dae4SAndroid Build Coastguard Workerif test -n "$LD"; then
3348*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT($LD)
3349*6236dae4SAndroid Build Coastguard Workerelse
3350*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT(no)
3351*6236dae4SAndroid Build Coastguard Workerfi
3352*6236dae4SAndroid Build Coastguard Workertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3353*6236dae4SAndroid Build Coastguard Worker_LT_PATH_LD_GNU
3354*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([LD])
3355*6236dae4SAndroid Build Coastguard Worker
3356*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3357*6236dae4SAndroid Build Coastguard Worker])# LT_PATH_LD
3358*6236dae4SAndroid Build Coastguard Worker
3359*6236dae4SAndroid Build Coastguard Worker# Old names:
3360*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3361*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3362*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3363*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LD], [])
3364*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LD], [])
3365*6236dae4SAndroid Build Coastguard Worker
3366*6236dae4SAndroid Build Coastguard Worker
3367*6236dae4SAndroid Build Coastguard Worker# _LT_PATH_LD_GNU
3368*6236dae4SAndroid Build Coastguard Worker#- --------------
3369*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PATH_LD_GNU],
3370*6236dae4SAndroid Build Coastguard Worker[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3371*6236dae4SAndroid Build Coastguard Worker[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3372*6236dae4SAndroid Build Coastguard Workercase `$LD -v 2>&1 </dev/null` in
3373*6236dae4SAndroid Build Coastguard Worker*GNU* | *'with BFD'*)
3374*6236dae4SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=yes
3375*6236dae4SAndroid Build Coastguard Worker  ;;
3376*6236dae4SAndroid Build Coastguard Worker*)
3377*6236dae4SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=no
3378*6236dae4SAndroid Build Coastguard Worker  ;;
3379*6236dae4SAndroid Build Coastguard Workeresac])
3380*6236dae4SAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld
3381*6236dae4SAndroid Build Coastguard Worker])# _LT_PATH_LD_GNU
3382*6236dae4SAndroid Build Coastguard Worker
3383*6236dae4SAndroid Build Coastguard Worker
3384*6236dae4SAndroid Build Coastguard Worker# _LT_CMD_RELOAD
3385*6236dae4SAndroid Build Coastguard Worker# --------------
3386*6236dae4SAndroid Build Coastguard Worker# find reload flag for linker
3387*6236dae4SAndroid Build Coastguard Worker#   -- PORTME Some linkers may need a different reload flag.
3388*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CMD_RELOAD],
3389*6236dae4SAndroid Build Coastguard Worker[AC_CACHE_CHECK([for $LD option to reload object files],
3390*6236dae4SAndroid Build Coastguard Worker  lt_cv_ld_reload_flag,
3391*6236dae4SAndroid Build Coastguard Worker  [lt_cv_ld_reload_flag='-r'])
3392*6236dae4SAndroid Build Coastguard Workerreload_flag=$lt_cv_ld_reload_flag
3393*6236dae4SAndroid Build Coastguard Workercase $reload_flag in
3394*6236dae4SAndroid Build Coastguard Worker"" | " "*) ;;
3395*6236dae4SAndroid Build Coastguard Worker*) reload_flag=" $reload_flag" ;;
3396*6236dae4SAndroid Build Coastguard Workeresac
3397*6236dae4SAndroid Build Coastguard Workerreload_cmds='$LD$reload_flag -o $output$reload_objs'
3398*6236dae4SAndroid Build Coastguard Workercase $host_os in
3399*6236dae4SAndroid Build Coastguard Worker  cygwin* | mingw* | pw32* | cegcc*)
3400*6236dae4SAndroid Build Coastguard Worker    if test yes != "$GCC"; then
3401*6236dae4SAndroid Build Coastguard Worker      reload_cmds=false
3402*6236dae4SAndroid Build Coastguard Worker    fi
3403*6236dae4SAndroid Build Coastguard Worker    ;;
3404*6236dae4SAndroid Build Coastguard Worker  darwin*)
3405*6236dae4SAndroid Build Coastguard Worker    if test yes = "$GCC"; then
3406*6236dae4SAndroid Build Coastguard Worker      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3407*6236dae4SAndroid Build Coastguard Worker    else
3408*6236dae4SAndroid Build Coastguard Worker      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3409*6236dae4SAndroid Build Coastguard Worker    fi
3410*6236dae4SAndroid Build Coastguard Worker    ;;
3411*6236dae4SAndroid Build Coastguard Workeresac
3412*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3413*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_cmds], [2])dnl
3414*6236dae4SAndroid Build Coastguard Worker])# _LT_CMD_RELOAD
3415*6236dae4SAndroid Build Coastguard Worker
3416*6236dae4SAndroid Build Coastguard Worker
3417*6236dae4SAndroid Build Coastguard Worker# _LT_PATH_DD
3418*6236dae4SAndroid Build Coastguard Worker# -----------
3419*6236dae4SAndroid Build Coastguard Worker# find a working dd
3420*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PATH_DD],
3421*6236dae4SAndroid Build Coastguard Worker[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3422*6236dae4SAndroid Build Coastguard Worker[printf 0123456789abcdef0123456789abcdef >conftest.i
3423*6236dae4SAndroid Build Coastguard Workercat conftest.i conftest.i >conftest2.i
3424*6236dae4SAndroid Build Coastguard Worker: ${lt_DD:=$DD}
3425*6236dae4SAndroid Build Coastguard WorkerAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3426*6236dae4SAndroid Build Coastguard Worker[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3427*6236dae4SAndroid Build Coastguard Worker  cmp -s conftest.i conftest.out \
3428*6236dae4SAndroid Build Coastguard Worker  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3429*6236dae4SAndroid Build Coastguard Workerfi])
3430*6236dae4SAndroid Build Coastguard Workerrm -f conftest.i conftest2.i conftest.out])
3431*6236dae4SAndroid Build Coastguard Worker])# _LT_PATH_DD
3432*6236dae4SAndroid Build Coastguard Worker
3433*6236dae4SAndroid Build Coastguard Worker
3434*6236dae4SAndroid Build Coastguard Worker# _LT_CMD_TRUNCATE
3435*6236dae4SAndroid Build Coastguard Worker# ----------------
3436*6236dae4SAndroid Build Coastguard Worker# find command to truncate a binary pipe
3437*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CMD_TRUNCATE],
3438*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_PATH_DD])
3439*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3440*6236dae4SAndroid Build Coastguard Worker[printf 0123456789abcdef0123456789abcdef >conftest.i
3441*6236dae4SAndroid Build Coastguard Workercat conftest.i conftest.i >conftest2.i
3442*6236dae4SAndroid Build Coastguard Workerlt_cv_truncate_bin=
3443*6236dae4SAndroid Build Coastguard Workerif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3444*6236dae4SAndroid Build Coastguard Worker  cmp -s conftest.i conftest.out \
3445*6236dae4SAndroid Build Coastguard Worker  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3446*6236dae4SAndroid Build Coastguard Workerfi
3447*6236dae4SAndroid Build Coastguard Workerrm -f conftest.i conftest2.i conftest.out
3448*6236dae4SAndroid Build Coastguard Workertest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3449*6236dae4SAndroid Build Coastguard Worker_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3450*6236dae4SAndroid Build Coastguard Worker  [Command to truncate a binary pipe])
3451*6236dae4SAndroid Build Coastguard Worker])# _LT_CMD_TRUNCATE
3452*6236dae4SAndroid Build Coastguard Worker
3453*6236dae4SAndroid Build Coastguard Worker
3454*6236dae4SAndroid Build Coastguard Worker# _LT_CHECK_MAGIC_METHOD
3455*6236dae4SAndroid Build Coastguard Worker# ----------------------
3456*6236dae4SAndroid Build Coastguard Worker# how to check for library dependencies
3457*6236dae4SAndroid Build Coastguard Worker#  -- PORTME fill in with the dynamic library characteristics
3458*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_MAGIC_METHOD],
3459*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
3460*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])
3461*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to recognize dependent libraries],
3462*6236dae4SAndroid Build Coastguard Workerlt_cv_deplibs_check_method,
3463*6236dae4SAndroid Build Coastguard Worker[lt_cv_file_magic_cmd='$MAGIC_CMD'
3464*6236dae4SAndroid Build Coastguard Workerlt_cv_file_magic_test_file=
3465*6236dae4SAndroid Build Coastguard Workerlt_cv_deplibs_check_method='unknown'
3466*6236dae4SAndroid Build Coastguard Worker# Need to set the preceding variable on all platforms that support
3467*6236dae4SAndroid Build Coastguard Worker# interlibrary dependencies.
3468*6236dae4SAndroid Build Coastguard Worker# 'none' -- dependencies not supported.
3469*6236dae4SAndroid Build Coastguard Worker# 'unknown' -- same as none, but documents that we really don't know.
3470*6236dae4SAndroid Build Coastguard Worker# 'pass_all' -- all dependencies passed with no checks.
3471*6236dae4SAndroid Build Coastguard Worker# 'test_compile' -- check by making test program.
3472*6236dae4SAndroid Build Coastguard Worker# 'file_magic [[regex]]' -- check by looking for files in library path
3473*6236dae4SAndroid Build Coastguard Worker# that responds to the $file_magic_cmd with a given extended regex.
3474*6236dae4SAndroid Build Coastguard Worker# If you have 'file' or equivalent on your system and you're not sure
3475*6236dae4SAndroid Build Coastguard Worker# whether 'pass_all' will *always* work, you probably want this one.
3476*6236dae4SAndroid Build Coastguard Worker
3477*6236dae4SAndroid Build Coastguard Workercase $host_os in
3478*6236dae4SAndroid Build Coastguard Workeraix[[4-9]]*)
3479*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3480*6236dae4SAndroid Build Coastguard Worker  ;;
3481*6236dae4SAndroid Build Coastguard Worker
3482*6236dae4SAndroid Build Coastguard Workerbeos*)
3483*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3484*6236dae4SAndroid Build Coastguard Worker  ;;
3485*6236dae4SAndroid Build Coastguard Worker
3486*6236dae4SAndroid Build Coastguard Workerbsdi[[45]]*)
3487*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3488*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='$FILECMD -L'
3489*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_test_file=/shlib/libc.so
3490*6236dae4SAndroid Build Coastguard Worker  ;;
3491*6236dae4SAndroid Build Coastguard Worker
3492*6236dae4SAndroid Build Coastguard Workercygwin*)
3493*6236dae4SAndroid Build Coastguard Worker  # func_win32_libid is a shell function defined in ltmain.sh
3494*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3495*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='func_win32_libid'
3496*6236dae4SAndroid Build Coastguard Worker  ;;
3497*6236dae4SAndroid Build Coastguard Worker
3498*6236dae4SAndroid Build Coastguard Workermingw* | pw32*)
3499*6236dae4SAndroid Build Coastguard Worker  # Base MSYS/MinGW do not provide the 'file' command needed by
3500*6236dae4SAndroid Build Coastguard Worker  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3501*6236dae4SAndroid Build Coastguard Worker  # unless we find 'file', for example because we are cross-compiling.
3502*6236dae4SAndroid Build Coastguard Worker  if ( file / ) >/dev/null 2>&1; then
3503*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3504*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='func_win32_libid'
3505*6236dae4SAndroid Build Coastguard Worker  else
3506*6236dae4SAndroid Build Coastguard Worker    # Keep this pattern in sync with the one in func_win32_libid.
3507*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3508*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='$OBJDUMP -f'
3509*6236dae4SAndroid Build Coastguard Worker  fi
3510*6236dae4SAndroid Build Coastguard Worker  ;;
3511*6236dae4SAndroid Build Coastguard Worker
3512*6236dae4SAndroid Build Coastguard Workercegcc*)
3513*6236dae4SAndroid Build Coastguard Worker  # use the weaker test based on 'objdump'. See mingw*.
3514*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3515*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='$OBJDUMP -f'
3516*6236dae4SAndroid Build Coastguard Worker  ;;
3517*6236dae4SAndroid Build Coastguard Worker
3518*6236dae4SAndroid Build Coastguard Workerdarwin* | rhapsody*)
3519*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3520*6236dae4SAndroid Build Coastguard Worker  ;;
3521*6236dae4SAndroid Build Coastguard Worker
3522*6236dae4SAndroid Build Coastguard Workerfreebsd* | dragonfly* | midnightbsd*)
3523*6236dae4SAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3524*6236dae4SAndroid Build Coastguard Worker    case $host_cpu in
3525*6236dae4SAndroid Build Coastguard Worker    i*86 )
3526*6236dae4SAndroid Build Coastguard Worker      # Not sure whether the presence of OpenBSD here was a mistake.
3527*6236dae4SAndroid Build Coastguard Worker      # Let's accept both of them until this is cleared up.
3528*6236dae4SAndroid Build Coastguard Worker      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3529*6236dae4SAndroid Build Coastguard Worker      lt_cv_file_magic_cmd=$FILECMD
3530*6236dae4SAndroid Build Coastguard Worker      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3531*6236dae4SAndroid Build Coastguard Worker      ;;
3532*6236dae4SAndroid Build Coastguard Worker    esac
3533*6236dae4SAndroid Build Coastguard Worker  else
3534*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3535*6236dae4SAndroid Build Coastguard Worker  fi
3536*6236dae4SAndroid Build Coastguard Worker  ;;
3537*6236dae4SAndroid Build Coastguard Worker
3538*6236dae4SAndroid Build Coastguard Workerhaiku*)
3539*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3540*6236dae4SAndroid Build Coastguard Worker  ;;
3541*6236dae4SAndroid Build Coastguard Worker
3542*6236dae4SAndroid Build Coastguard Workerhpux10.20* | hpux11*)
3543*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd=$FILECMD
3544*6236dae4SAndroid Build Coastguard Worker  case $host_cpu in
3545*6236dae4SAndroid Build Coastguard Worker  ia64*)
3546*6236dae4SAndroid 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'
3547*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3548*6236dae4SAndroid Build Coastguard Worker    ;;
3549*6236dae4SAndroid Build Coastguard Worker  hppa*64*)
3550*6236dae4SAndroid 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]']
3551*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3552*6236dae4SAndroid Build Coastguard Worker    ;;
3553*6236dae4SAndroid Build Coastguard Worker  *)
3554*6236dae4SAndroid 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'
3555*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3556*6236dae4SAndroid Build Coastguard Worker    ;;
3557*6236dae4SAndroid Build Coastguard Worker  esac
3558*6236dae4SAndroid Build Coastguard Worker  ;;
3559*6236dae4SAndroid Build Coastguard Worker
3560*6236dae4SAndroid Build Coastguard Workerinterix[[3-9]]*)
3561*6236dae4SAndroid Build Coastguard Worker  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3562*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3563*6236dae4SAndroid Build Coastguard Worker  ;;
3564*6236dae4SAndroid Build Coastguard Worker
3565*6236dae4SAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*)
3566*6236dae4SAndroid Build Coastguard Worker  case $LD in
3567*6236dae4SAndroid Build Coastguard Worker  *-32|*"-32 ") libmagic=32-bit;;
3568*6236dae4SAndroid Build Coastguard Worker  *-n32|*"-n32 ") libmagic=N32;;
3569*6236dae4SAndroid Build Coastguard Worker  *-64|*"-64 ") libmagic=64-bit;;
3570*6236dae4SAndroid Build Coastguard Worker  *) libmagic=never-match;;
3571*6236dae4SAndroid Build Coastguard Worker  esac
3572*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3573*6236dae4SAndroid Build Coastguard Worker  ;;
3574*6236dae4SAndroid Build Coastguard Worker
3575*6236dae4SAndroid Build Coastguard Worker# This must be glibc/ELF.
3576*6236dae4SAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3577*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3578*6236dae4SAndroid Build Coastguard Worker  ;;
3579*6236dae4SAndroid Build Coastguard Worker
3580*6236dae4SAndroid Build Coastguard Workernetbsd* | netbsdelf*-gnu)
3581*6236dae4SAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3582*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3583*6236dae4SAndroid Build Coastguard Worker  else
3584*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3585*6236dae4SAndroid Build Coastguard Worker  fi
3586*6236dae4SAndroid Build Coastguard Worker  ;;
3587*6236dae4SAndroid Build Coastguard Worker
3588*6236dae4SAndroid Build Coastguard Workernewos6*)
3589*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3590*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd=$FILECMD
3591*6236dae4SAndroid Build Coastguard Worker  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3592*6236dae4SAndroid Build Coastguard Worker  ;;
3593*6236dae4SAndroid Build Coastguard Worker
3594*6236dae4SAndroid Build Coastguard Worker*nto* | *qnx*)
3595*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3596*6236dae4SAndroid Build Coastguard Worker  ;;
3597*6236dae4SAndroid Build Coastguard Worker
3598*6236dae4SAndroid Build Coastguard Workeropenbsd* | bitrig*)
3599*6236dae4SAndroid Build Coastguard Worker  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3600*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3601*6236dae4SAndroid Build Coastguard Worker  else
3602*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3603*6236dae4SAndroid Build Coastguard Worker  fi
3604*6236dae4SAndroid Build Coastguard Worker  ;;
3605*6236dae4SAndroid Build Coastguard Worker
3606*6236dae4SAndroid Build Coastguard Workerosf3* | osf4* | osf5*)
3607*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3608*6236dae4SAndroid Build Coastguard Worker  ;;
3609*6236dae4SAndroid Build Coastguard Worker
3610*6236dae4SAndroid Build Coastguard Workerrdos*)
3611*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3612*6236dae4SAndroid Build Coastguard Worker  ;;
3613*6236dae4SAndroid Build Coastguard Worker
3614*6236dae4SAndroid Build Coastguard Workersolaris*)
3615*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3616*6236dae4SAndroid Build Coastguard Worker  ;;
3617*6236dae4SAndroid Build Coastguard Worker
3618*6236dae4SAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3619*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3620*6236dae4SAndroid Build Coastguard Worker  ;;
3621*6236dae4SAndroid Build Coastguard Worker
3622*6236dae4SAndroid Build Coastguard Workersysv4 | sysv4.3*)
3623*6236dae4SAndroid Build Coastguard Worker  case $host_vendor in
3624*6236dae4SAndroid Build Coastguard Worker  motorola)
3625*6236dae4SAndroid 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]]'
3626*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3627*6236dae4SAndroid Build Coastguard Worker    ;;
3628*6236dae4SAndroid Build Coastguard Worker  ncr)
3629*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3630*6236dae4SAndroid Build Coastguard Worker    ;;
3631*6236dae4SAndroid Build Coastguard Worker  sequent)
3632*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='/bin/file'
3633*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3634*6236dae4SAndroid Build Coastguard Worker    ;;
3635*6236dae4SAndroid Build Coastguard Worker  sni)
3636*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='/bin/file'
3637*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3638*6236dae4SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/lib/libc.so
3639*6236dae4SAndroid Build Coastguard Worker    ;;
3640*6236dae4SAndroid Build Coastguard Worker  siemens)
3641*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3642*6236dae4SAndroid Build Coastguard Worker    ;;
3643*6236dae4SAndroid Build Coastguard Worker  pc)
3644*6236dae4SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3645*6236dae4SAndroid Build Coastguard Worker    ;;
3646*6236dae4SAndroid Build Coastguard Worker  esac
3647*6236dae4SAndroid Build Coastguard Worker  ;;
3648*6236dae4SAndroid Build Coastguard Worker
3649*6236dae4SAndroid Build Coastguard Workertpf*)
3650*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3651*6236dae4SAndroid Build Coastguard Worker  ;;
3652*6236dae4SAndroid Build Coastguard Workeros2*)
3653*6236dae4SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3654*6236dae4SAndroid Build Coastguard Worker  ;;
3655*6236dae4SAndroid Build Coastguard Workeresac
3656*6236dae4SAndroid Build Coastguard Worker])
3657*6236dae4SAndroid Build Coastguard Worker
3658*6236dae4SAndroid Build Coastguard Workerfile_magic_glob=
3659*6236dae4SAndroid Build Coastguard Workerwant_nocaseglob=no
3660*6236dae4SAndroid Build Coastguard Workerif test "$build" = "$host"; then
3661*6236dae4SAndroid Build Coastguard Worker  case $host_os in
3662*6236dae4SAndroid Build Coastguard Worker  mingw* | pw32*)
3663*6236dae4SAndroid Build Coastguard Worker    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3664*6236dae4SAndroid Build Coastguard Worker      want_nocaseglob=yes
3665*6236dae4SAndroid Build Coastguard Worker    else
3666*6236dae4SAndroid Build Coastguard Worker      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3667*6236dae4SAndroid Build Coastguard Worker    fi
3668*6236dae4SAndroid Build Coastguard Worker    ;;
3669*6236dae4SAndroid Build Coastguard Worker  esac
3670*6236dae4SAndroid Build Coastguard Workerfi
3671*6236dae4SAndroid Build Coastguard Worker
3672*6236dae4SAndroid Build Coastguard Workerfile_magic_cmd=$lt_cv_file_magic_cmd
3673*6236dae4SAndroid Build Coastguard Workerdeplibs_check_method=$lt_cv_deplibs_check_method
3674*6236dae4SAndroid Build Coastguard Workertest -z "$deplibs_check_method" && deplibs_check_method=unknown
3675*6236dae4SAndroid Build Coastguard Worker
3676*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [deplibs_check_method], [1],
3677*6236dae4SAndroid Build Coastguard Worker    [Method to check whether dependent libraries are shared objects])
3678*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [file_magic_cmd], [1],
3679*6236dae4SAndroid Build Coastguard Worker    [Command to use when deplibs_check_method = "file_magic"])
3680*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [file_magic_glob], [1],
3681*6236dae4SAndroid Build Coastguard Worker    [How to find potential files when deplibs_check_method = "file_magic"])
3682*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [want_nocaseglob], [1],
3683*6236dae4SAndroid Build Coastguard Worker    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3684*6236dae4SAndroid Build Coastguard Worker])# _LT_CHECK_MAGIC_METHOD
3685*6236dae4SAndroid Build Coastguard Worker
3686*6236dae4SAndroid Build Coastguard Worker
3687*6236dae4SAndroid Build Coastguard Worker# LT_PATH_NM
3688*6236dae4SAndroid Build Coastguard Worker# ----------
3689*6236dae4SAndroid Build Coastguard Worker# find the pathname to a BSD- or MS-compatible name lister
3690*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_NM],
3691*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
3692*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3693*6236dae4SAndroid Build Coastguard Worker[if test -n "$NM"; then
3694*6236dae4SAndroid Build Coastguard Worker  # Let the user override the test.
3695*6236dae4SAndroid Build Coastguard Worker  lt_cv_path_NM=$NM
3696*6236dae4SAndroid Build Coastguard Workerelse
3697*6236dae4SAndroid Build Coastguard Worker  lt_nm_to_check=${ac_tool_prefix}nm
3698*6236dae4SAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3699*6236dae4SAndroid Build Coastguard Worker    lt_nm_to_check="$lt_nm_to_check nm"
3700*6236dae4SAndroid Build Coastguard Worker  fi
3701*6236dae4SAndroid Build Coastguard Worker  for lt_tmp_nm in $lt_nm_to_check; do
3702*6236dae4SAndroid Build Coastguard Worker    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3703*6236dae4SAndroid Build Coastguard Worker    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3704*6236dae4SAndroid Build Coastguard Worker      IFS=$lt_save_ifs
3705*6236dae4SAndroid Build Coastguard Worker      test -z "$ac_dir" && ac_dir=.
3706*6236dae4SAndroid Build Coastguard Worker      tmp_nm=$ac_dir/$lt_tmp_nm
3707*6236dae4SAndroid Build Coastguard Worker      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3708*6236dae4SAndroid Build Coastguard Worker	# Check to see if the nm accepts a BSD-compat flag.
3709*6236dae4SAndroid Build Coastguard Worker	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3710*6236dae4SAndroid Build Coastguard Worker	#   nm: unknown option "B" ignored
3711*6236dae4SAndroid Build Coastguard Worker	# Tru64's nm complains that /dev/null is an invalid object file
3712*6236dae4SAndroid Build Coastguard Worker	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3713*6236dae4SAndroid Build Coastguard Worker	case $build_os in
3714*6236dae4SAndroid Build Coastguard Worker	mingw*) lt_bad_file=conftest.nm/nofile ;;
3715*6236dae4SAndroid Build Coastguard Worker	*) lt_bad_file=/dev/null ;;
3716*6236dae4SAndroid Build Coastguard Worker	esac
3717*6236dae4SAndroid Build Coastguard Worker	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
3718*6236dae4SAndroid Build Coastguard Worker	*$lt_bad_file* | *'Invalid file or object type'*)
3719*6236dae4SAndroid Build Coastguard Worker	  lt_cv_path_NM="$tmp_nm -B"
3720*6236dae4SAndroid Build Coastguard Worker	  break 2
3721*6236dae4SAndroid Build Coastguard Worker	  ;;
3722*6236dae4SAndroid Build Coastguard Worker	*)
3723*6236dae4SAndroid Build Coastguard Worker	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
3724*6236dae4SAndroid Build Coastguard Worker	  */dev/null*)
3725*6236dae4SAndroid Build Coastguard Worker	    lt_cv_path_NM="$tmp_nm -p"
3726*6236dae4SAndroid Build Coastguard Worker	    break 2
3727*6236dae4SAndroid Build Coastguard Worker	    ;;
3728*6236dae4SAndroid Build Coastguard Worker	  *)
3729*6236dae4SAndroid Build Coastguard Worker	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3730*6236dae4SAndroid Build Coastguard Worker	    continue # so that we can try to find one that supports BSD flags
3731*6236dae4SAndroid Build Coastguard Worker	    ;;
3732*6236dae4SAndroid Build Coastguard Worker	  esac
3733*6236dae4SAndroid Build Coastguard Worker	  ;;
3734*6236dae4SAndroid Build Coastguard Worker	esac
3735*6236dae4SAndroid Build Coastguard Worker      fi
3736*6236dae4SAndroid Build Coastguard Worker    done
3737*6236dae4SAndroid Build Coastguard Worker    IFS=$lt_save_ifs
3738*6236dae4SAndroid Build Coastguard Worker  done
3739*6236dae4SAndroid Build Coastguard Worker  : ${lt_cv_path_NM=no}
3740*6236dae4SAndroid Build Coastguard Workerfi])
3741*6236dae4SAndroid Build Coastguard Workerif test no != "$lt_cv_path_NM"; then
3742*6236dae4SAndroid Build Coastguard Worker  NM=$lt_cv_path_NM
3743*6236dae4SAndroid Build Coastguard Workerelse
3744*6236dae4SAndroid Build Coastguard Worker  # Didn't find any BSD compatible name lister, look for dumpbin.
3745*6236dae4SAndroid Build Coastguard Worker  if test -n "$DUMPBIN"; then :
3746*6236dae4SAndroid Build Coastguard Worker    # Let the user override the test.
3747*6236dae4SAndroid Build Coastguard Worker  else
3748*6236dae4SAndroid Build Coastguard Worker    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3749*6236dae4SAndroid Build Coastguard Worker    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
3750*6236dae4SAndroid Build Coastguard Worker    *COFF*)
3751*6236dae4SAndroid Build Coastguard Worker      DUMPBIN="$DUMPBIN -symbols -headers"
3752*6236dae4SAndroid Build Coastguard Worker      ;;
3753*6236dae4SAndroid Build Coastguard Worker    *)
3754*6236dae4SAndroid Build Coastguard Worker      DUMPBIN=:
3755*6236dae4SAndroid Build Coastguard Worker      ;;
3756*6236dae4SAndroid Build Coastguard Worker    esac
3757*6236dae4SAndroid Build Coastguard Worker  fi
3758*6236dae4SAndroid Build Coastguard Worker  AC_SUBST([DUMPBIN])
3759*6236dae4SAndroid Build Coastguard Worker  if test : != "$DUMPBIN"; then
3760*6236dae4SAndroid Build Coastguard Worker    NM=$DUMPBIN
3761*6236dae4SAndroid Build Coastguard Worker  fi
3762*6236dae4SAndroid Build Coastguard Workerfi
3763*6236dae4SAndroid Build Coastguard Workertest -z "$NM" && NM=nm
3764*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([NM])
3765*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3766*6236dae4SAndroid Build Coastguard Worker
3767*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3768*6236dae4SAndroid Build Coastguard Worker  [lt_cv_nm_interface="BSD nm"
3769*6236dae4SAndroid Build Coastguard Worker  echo "int some_variable = 0;" > conftest.$ac_ext
3770*6236dae4SAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3771*6236dae4SAndroid Build Coastguard Worker  (eval "$ac_compile" 2>conftest.err)
3772*6236dae4SAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3773*6236dae4SAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3774*6236dae4SAndroid Build Coastguard Worker  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3775*6236dae4SAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3776*6236dae4SAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3777*6236dae4SAndroid Build Coastguard Worker  cat conftest.out >&AS_MESSAGE_LOG_FD
3778*6236dae4SAndroid Build Coastguard Worker  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3779*6236dae4SAndroid Build Coastguard Worker    lt_cv_nm_interface="MS dumpbin"
3780*6236dae4SAndroid Build Coastguard Worker  fi
3781*6236dae4SAndroid Build Coastguard Worker  rm -f conftest*])
3782*6236dae4SAndroid Build Coastguard Worker])# LT_PATH_NM
3783*6236dae4SAndroid Build Coastguard Worker
3784*6236dae4SAndroid Build Coastguard Worker# Old names:
3785*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3786*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3787*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3788*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_NM], [])
3789*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_NM], [])
3790*6236dae4SAndroid Build Coastguard Worker
3791*6236dae4SAndroid Build Coastguard Worker# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3792*6236dae4SAndroid Build Coastguard Worker# --------------------------------
3793*6236dae4SAndroid Build Coastguard Worker# how to determine the name of the shared library
3794*6236dae4SAndroid Build Coastguard Worker# associated with a specific link library.
3795*6236dae4SAndroid Build Coastguard Worker#  -- PORTME fill in with the dynamic library characteristics
3796*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3797*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
3798*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])
3799*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_DLLTOOL])
3800*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to associate runtime and link libraries],
3801*6236dae4SAndroid Build Coastguard Workerlt_cv_sharedlib_from_linklib_cmd,
3802*6236dae4SAndroid Build Coastguard Worker[lt_cv_sharedlib_from_linklib_cmd='unknown'
3803*6236dae4SAndroid Build Coastguard Worker
3804*6236dae4SAndroid Build Coastguard Workercase $host_os in
3805*6236dae4SAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
3806*6236dae4SAndroid Build Coastguard Worker  # two different shell functions defined in ltmain.sh;
3807*6236dae4SAndroid Build Coastguard Worker  # decide which one to use based on capabilities of $DLLTOOL
3808*6236dae4SAndroid Build Coastguard Worker  case `$DLLTOOL --help 2>&1` in
3809*6236dae4SAndroid Build Coastguard Worker  *--identify-strict*)
3810*6236dae4SAndroid Build Coastguard Worker    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3811*6236dae4SAndroid Build Coastguard Worker    ;;
3812*6236dae4SAndroid Build Coastguard Worker  *)
3813*6236dae4SAndroid Build Coastguard Worker    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3814*6236dae4SAndroid Build Coastguard Worker    ;;
3815*6236dae4SAndroid Build Coastguard Worker  esac
3816*6236dae4SAndroid Build Coastguard Worker  ;;
3817*6236dae4SAndroid Build Coastguard Worker*)
3818*6236dae4SAndroid Build Coastguard Worker  # fallback: assume linklib IS sharedlib
3819*6236dae4SAndroid Build Coastguard Worker  lt_cv_sharedlib_from_linklib_cmd=$ECHO
3820*6236dae4SAndroid Build Coastguard Worker  ;;
3821*6236dae4SAndroid Build Coastguard Workeresac
3822*6236dae4SAndroid Build Coastguard Worker])
3823*6236dae4SAndroid Build Coastguard Workersharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3824*6236dae4SAndroid Build Coastguard Workertest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3825*6236dae4SAndroid Build Coastguard Worker
3826*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3827*6236dae4SAndroid Build Coastguard Worker    [Command to associate shared and link libraries])
3828*6236dae4SAndroid Build Coastguard Worker])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3829*6236dae4SAndroid Build Coastguard Worker
3830*6236dae4SAndroid Build Coastguard Worker
3831*6236dae4SAndroid Build Coastguard Worker# _LT_PATH_MANIFEST_TOOL
3832*6236dae4SAndroid Build Coastguard Worker# ----------------------
3833*6236dae4SAndroid Build Coastguard Worker# locate the manifest tool
3834*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PATH_MANIFEST_TOOL],
3835*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3836*6236dae4SAndroid Build Coastguard Workertest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3837*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3838*6236dae4SAndroid Build Coastguard Worker  [lt_cv_path_mainfest_tool=no
3839*6236dae4SAndroid Build Coastguard Worker  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3840*6236dae4SAndroid Build Coastguard Worker  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3841*6236dae4SAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3842*6236dae4SAndroid Build Coastguard Worker  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3843*6236dae4SAndroid Build Coastguard Worker    lt_cv_path_mainfest_tool=yes
3844*6236dae4SAndroid Build Coastguard Worker  fi
3845*6236dae4SAndroid Build Coastguard Worker  rm -f conftest*])
3846*6236dae4SAndroid Build Coastguard Workerif test yes != "$lt_cv_path_mainfest_tool"; then
3847*6236dae4SAndroid Build Coastguard Worker  MANIFEST_TOOL=:
3848*6236dae4SAndroid Build Coastguard Workerfi
3849*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3850*6236dae4SAndroid Build Coastguard Worker])# _LT_PATH_MANIFEST_TOOL
3851*6236dae4SAndroid Build Coastguard Worker
3852*6236dae4SAndroid Build Coastguard Worker
3853*6236dae4SAndroid Build Coastguard Worker# _LT_DLL_DEF_P([FILE])
3854*6236dae4SAndroid Build Coastguard Worker# ---------------------
3855*6236dae4SAndroid Build Coastguard Worker# True iff FILE is a Windows DLL '.def' file.
3856*6236dae4SAndroid Build Coastguard Worker# Keep in sync with func_dll_def_p in the libtool script
3857*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([_LT_DLL_DEF_P],
3858*6236dae4SAndroid Build Coastguard Worker[dnl
3859*6236dae4SAndroid Build Coastguard Worker  test DEF = "`$SED -n dnl
3860*6236dae4SAndroid Build Coastguard Worker    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3861*6236dae4SAndroid Build Coastguard Worker    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3862*6236dae4SAndroid Build Coastguard Worker    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3863*6236dae4SAndroid Build Coastguard Worker    -e q dnl                          Only consider the first "real" line
3864*6236dae4SAndroid Build Coastguard Worker    $1`" dnl
3865*6236dae4SAndroid Build Coastguard Worker])# _LT_DLL_DEF_P
3866*6236dae4SAndroid Build Coastguard Worker
3867*6236dae4SAndroid Build Coastguard Worker
3868*6236dae4SAndroid Build Coastguard Worker# LT_LIB_M
3869*6236dae4SAndroid Build Coastguard Worker# --------
3870*6236dae4SAndroid Build Coastguard Worker# check for math library
3871*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_LIB_M],
3872*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3873*6236dae4SAndroid Build Coastguard WorkerLIBM=
3874*6236dae4SAndroid Build Coastguard Workercase $host in
3875*6236dae4SAndroid Build Coastguard Worker*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3876*6236dae4SAndroid Build Coastguard Worker  # These system don't have libm, or don't need it
3877*6236dae4SAndroid Build Coastguard Worker  ;;
3878*6236dae4SAndroid Build Coastguard Worker*-ncr-sysv4.3*)
3879*6236dae4SAndroid Build Coastguard Worker  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3880*6236dae4SAndroid Build Coastguard Worker  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3881*6236dae4SAndroid Build Coastguard Worker  ;;
3882*6236dae4SAndroid Build Coastguard Worker*)
3883*6236dae4SAndroid Build Coastguard Worker  AC_CHECK_LIB(m, cos, LIBM=-lm)
3884*6236dae4SAndroid Build Coastguard Worker  ;;
3885*6236dae4SAndroid Build Coastguard Workeresac
3886*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([LIBM])
3887*6236dae4SAndroid Build Coastguard Worker])# LT_LIB_M
3888*6236dae4SAndroid Build Coastguard Worker
3889*6236dae4SAndroid Build Coastguard Worker# Old name:
3890*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3891*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3892*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_CHECK_LIBM], [])
3893*6236dae4SAndroid Build Coastguard Worker
3894*6236dae4SAndroid Build Coastguard Worker
3895*6236dae4SAndroid Build Coastguard Worker# _LT_COMPILER_NO_RTTI([TAGNAME])
3896*6236dae4SAndroid Build Coastguard Worker# -------------------------------
3897*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_NO_RTTI],
3898*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl
3899*6236dae4SAndroid Build Coastguard Worker
3900*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3901*6236dae4SAndroid Build Coastguard Worker
3902*6236dae4SAndroid Build Coastguard Workerif test yes = "$GCC"; then
3903*6236dae4SAndroid Build Coastguard Worker  case $cc_basename in
3904*6236dae4SAndroid Build Coastguard Worker  nvcc*)
3905*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3906*6236dae4SAndroid Build Coastguard Worker  *)
3907*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3908*6236dae4SAndroid Build Coastguard Worker  esac
3909*6236dae4SAndroid Build Coastguard Worker
3910*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3911*6236dae4SAndroid Build Coastguard Worker    lt_cv_prog_compiler_rtti_exceptions,
3912*6236dae4SAndroid Build Coastguard Worker    [-fno-rtti -fno-exceptions], [],
3913*6236dae4SAndroid 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"])
3914*6236dae4SAndroid Build Coastguard Workerfi
3915*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3916*6236dae4SAndroid Build Coastguard Worker	[Compiler flag to turn off builtin functions])
3917*6236dae4SAndroid Build Coastguard Worker])# _LT_COMPILER_NO_RTTI
3918*6236dae4SAndroid Build Coastguard Worker
3919*6236dae4SAndroid Build Coastguard Worker
3920*6236dae4SAndroid Build Coastguard Worker# _LT_CMD_GLOBAL_SYMBOLS
3921*6236dae4SAndroid Build Coastguard Worker# ----------------------
3922*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3923*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3924*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl
3925*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_AWK])dnl
3926*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
3927*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl
3928*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
3929*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
3930*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
3931*6236dae4SAndroid Build Coastguard Worker
3932*6236dae4SAndroid Build Coastguard Worker# Check for command to grab the raw symbol name followed by C symbol from nm.
3933*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3934*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3935*6236dae4SAndroid Build Coastguard Worker[
3936*6236dae4SAndroid Build Coastguard Worker# These are sane defaults that work on at least a few old systems.
3937*6236dae4SAndroid Build Coastguard Worker# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3938*6236dae4SAndroid Build Coastguard Worker
3939*6236dae4SAndroid Build Coastguard Worker# Character class describing NM global symbol codes.
3940*6236dae4SAndroid Build Coastguard Workersymcode='[[BCDEGRST]]'
3941*6236dae4SAndroid Build Coastguard Worker
3942*6236dae4SAndroid Build Coastguard Worker# Regexp to match symbols that can be accessed directly from C.
3943*6236dae4SAndroid Build Coastguard Workersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3944*6236dae4SAndroid Build Coastguard Worker
3945*6236dae4SAndroid Build Coastguard Worker# Define system-specific variables.
3946*6236dae4SAndroid Build Coastguard Workercase $host_os in
3947*6236dae4SAndroid Build Coastguard Workeraix*)
3948*6236dae4SAndroid Build Coastguard Worker  symcode='[[BCDT]]'
3949*6236dae4SAndroid Build Coastguard Worker  ;;
3950*6236dae4SAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
3951*6236dae4SAndroid Build Coastguard Worker  symcode='[[ABCDGISTW]]'
3952*6236dae4SAndroid Build Coastguard Worker  ;;
3953*6236dae4SAndroid Build Coastguard Workerhpux*)
3954*6236dae4SAndroid Build Coastguard Worker  if test ia64 = "$host_cpu"; then
3955*6236dae4SAndroid Build Coastguard Worker    symcode='[[ABCDEGRST]]'
3956*6236dae4SAndroid Build Coastguard Worker  fi
3957*6236dae4SAndroid Build Coastguard Worker  ;;
3958*6236dae4SAndroid Build Coastguard Workeririx* | nonstopux*)
3959*6236dae4SAndroid Build Coastguard Worker  symcode='[[BCDEGRST]]'
3960*6236dae4SAndroid Build Coastguard Worker  ;;
3961*6236dae4SAndroid Build Coastguard Workerosf*)
3962*6236dae4SAndroid Build Coastguard Worker  symcode='[[BCDEGQRST]]'
3963*6236dae4SAndroid Build Coastguard Worker  ;;
3964*6236dae4SAndroid Build Coastguard Workersolaris*)
3965*6236dae4SAndroid Build Coastguard Worker  symcode='[[BDRT]]'
3966*6236dae4SAndroid Build Coastguard Worker  ;;
3967*6236dae4SAndroid Build Coastguard Workersco3.2v5*)
3968*6236dae4SAndroid Build Coastguard Worker  symcode='[[DT]]'
3969*6236dae4SAndroid Build Coastguard Worker  ;;
3970*6236dae4SAndroid Build Coastguard Workersysv4.2uw2*)
3971*6236dae4SAndroid Build Coastguard Worker  symcode='[[DT]]'
3972*6236dae4SAndroid Build Coastguard Worker  ;;
3973*6236dae4SAndroid Build Coastguard Workersysv5* | sco5v6* | unixware* | OpenUNIX*)
3974*6236dae4SAndroid Build Coastguard Worker  symcode='[[ABDT]]'
3975*6236dae4SAndroid Build Coastguard Worker  ;;
3976*6236dae4SAndroid Build Coastguard Workersysv4)
3977*6236dae4SAndroid Build Coastguard Worker  symcode='[[DFNSTU]]'
3978*6236dae4SAndroid Build Coastguard Worker  ;;
3979*6236dae4SAndroid Build Coastguard Workeresac
3980*6236dae4SAndroid Build Coastguard Worker
3981*6236dae4SAndroid Build Coastguard Worker# If we're using GNU nm, then use its standard symbol codes.
3982*6236dae4SAndroid Build Coastguard Workercase `$NM -V 2>&1` in
3983*6236dae4SAndroid Build Coastguard Worker*GNU* | *'with BFD'*)
3984*6236dae4SAndroid Build Coastguard Worker  symcode='[[ABCDGIRSTW]]' ;;
3985*6236dae4SAndroid Build Coastguard Workeresac
3986*6236dae4SAndroid Build Coastguard Worker
3987*6236dae4SAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3988*6236dae4SAndroid Build Coastguard Worker  # Gets list of data symbols to import.
3989*6236dae4SAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
3990*6236dae4SAndroid Build Coastguard Worker  # Adjust the below global symbol transforms to fixup imported variables.
3991*6236dae4SAndroid Build Coastguard Worker  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3992*6236dae4SAndroid Build Coastguard Worker  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
3993*6236dae4SAndroid Build Coastguard Worker  lt_c_name_lib_hook="\
3994*6236dae4SAndroid Build Coastguard Worker  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
3995*6236dae4SAndroid Build Coastguard Worker  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
3996*6236dae4SAndroid Build Coastguard Workerelse
3997*6236dae4SAndroid Build Coastguard Worker  # Disable hooks by default.
3998*6236dae4SAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_import=
3999*6236dae4SAndroid Build Coastguard Worker  lt_cdecl_hook=
4000*6236dae4SAndroid Build Coastguard Worker  lt_c_name_hook=
4001*6236dae4SAndroid Build Coastguard Worker  lt_c_name_lib_hook=
4002*6236dae4SAndroid Build Coastguard Workerfi
4003*6236dae4SAndroid Build Coastguard Worker
4004*6236dae4SAndroid Build Coastguard Worker# Transform an extracted symbol line into a proper C declaration.
4005*6236dae4SAndroid Build Coastguard Worker# Some systems (esp. on ia64) link data and code symbols differently,
4006*6236dae4SAndroid Build Coastguard Worker# so use this general approach.
4007*6236dae4SAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_cdecl="$SED -n"\
4008*6236dae4SAndroid Build Coastguard Worker$lt_cdecl_hook\
4009*6236dae4SAndroid Build Coastguard Worker" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4010*6236dae4SAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4011*6236dae4SAndroid Build Coastguard Worker
4012*6236dae4SAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name and symbol address
4013*6236dae4SAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4014*6236dae4SAndroid Build Coastguard Worker$lt_c_name_hook\
4015*6236dae4SAndroid Build Coastguard Worker" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4016*6236dae4SAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4017*6236dae4SAndroid Build Coastguard Worker
4018*6236dae4SAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name with lib prefix and
4019*6236dae4SAndroid Build Coastguard Worker# symbol address.
4020*6236dae4SAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4021*6236dae4SAndroid Build Coastguard Worker$lt_c_name_lib_hook\
4022*6236dae4SAndroid Build Coastguard Worker" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4023*6236dae4SAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4024*6236dae4SAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4025*6236dae4SAndroid Build Coastguard Worker
4026*6236dae4SAndroid Build Coastguard Worker# Handle CRLF in mingw tool chain
4027*6236dae4SAndroid Build Coastguard Workeropt_cr=
4028*6236dae4SAndroid Build Coastguard Workercase $build_os in
4029*6236dae4SAndroid Build Coastguard Workermingw*)
4030*6236dae4SAndroid Build Coastguard Worker  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4031*6236dae4SAndroid Build Coastguard Worker  ;;
4032*6236dae4SAndroid Build Coastguard Workeresac
4033*6236dae4SAndroid Build Coastguard Worker
4034*6236dae4SAndroid Build Coastguard Worker# Try without a prefix underscore, then with it.
4035*6236dae4SAndroid Build Coastguard Workerfor ac_symprfx in "" "_"; do
4036*6236dae4SAndroid Build Coastguard Worker
4037*6236dae4SAndroid Build Coastguard Worker  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4038*6236dae4SAndroid Build Coastguard Worker  symxfrm="\\1 $ac_symprfx\\2 \\2"
4039*6236dae4SAndroid Build Coastguard Worker
4040*6236dae4SAndroid Build Coastguard Worker  # Write the raw and C identifiers.
4041*6236dae4SAndroid Build Coastguard Worker  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4042*6236dae4SAndroid Build Coastguard Worker    # Fake it for dumpbin and say T for any non-static function,
4043*6236dae4SAndroid Build Coastguard Worker    # D for any global variable and I for any imported variable.
4044*6236dae4SAndroid Build Coastguard Worker    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4045*6236dae4SAndroid Build Coastguard Worker    # which start with @ or ?.
4046*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4047*6236dae4SAndroid Build Coastguard Worker"     {last_section=section; section=\$ 3};"\
4048*6236dae4SAndroid Build Coastguard Worker"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4049*6236dae4SAndroid Build Coastguard Worker"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4050*6236dae4SAndroid Build Coastguard Worker"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4051*6236dae4SAndroid Build Coastguard Worker"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4052*6236dae4SAndroid Build Coastguard Worker"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4053*6236dae4SAndroid Build Coastguard Worker"     \$ 0!~/External *\|/{next};"\
4054*6236dae4SAndroid Build Coastguard Worker"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4055*6236dae4SAndroid Build Coastguard Worker"     {if(hide[section]) next};"\
4056*6236dae4SAndroid Build Coastguard Worker"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4057*6236dae4SAndroid Build Coastguard Worker"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4058*6236dae4SAndroid Build Coastguard Worker"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4059*6236dae4SAndroid Build Coastguard Worker"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4060*6236dae4SAndroid Build Coastguard Worker"     ' prfx=^$ac_symprfx]"
4061*6236dae4SAndroid Build Coastguard Worker  else
4062*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4063*6236dae4SAndroid Build Coastguard Worker  fi
4064*6236dae4SAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4065*6236dae4SAndroid Build Coastguard Worker
4066*6236dae4SAndroid Build Coastguard Worker  # Check to see that the pipe works correctly.
4067*6236dae4SAndroid Build Coastguard Worker  pipe_works=no
4068*6236dae4SAndroid Build Coastguard Worker
4069*6236dae4SAndroid Build Coastguard Worker  rm -f conftest*
4070*6236dae4SAndroid Build Coastguard Worker  cat > conftest.$ac_ext <<_LT_EOF
4071*6236dae4SAndroid Build Coastguard Worker#ifdef __cplusplus
4072*6236dae4SAndroid Build Coastguard Workerextern "C" {
4073*6236dae4SAndroid Build Coastguard Worker#endif
4074*6236dae4SAndroid Build Coastguard Workerchar nm_test_var;
4075*6236dae4SAndroid Build Coastguard Workervoid nm_test_func(void);
4076*6236dae4SAndroid Build Coastguard Workervoid nm_test_func(void){}
4077*6236dae4SAndroid Build Coastguard Worker#ifdef __cplusplus
4078*6236dae4SAndroid Build Coastguard Worker}
4079*6236dae4SAndroid Build Coastguard Worker#endif
4080*6236dae4SAndroid Build Coastguard Workerint main(){nm_test_var='a';nm_test_func();return(0);}
4081*6236dae4SAndroid Build Coastguard Worker_LT_EOF
4082*6236dae4SAndroid Build Coastguard Worker
4083*6236dae4SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
4084*6236dae4SAndroid Build Coastguard Worker    # Now try to grab the symbols.
4085*6236dae4SAndroid Build Coastguard Worker    nlist=conftest.nm
4086*6236dae4SAndroid Build Coastguard Worker    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4087*6236dae4SAndroid Build Coastguard Worker    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
4088*6236dae4SAndroid Build Coastguard Worker      # Try sorting and uniquifying the output.
4089*6236dae4SAndroid Build Coastguard Worker      if sort "$nlist" | uniq > "$nlist"T; then
4090*6236dae4SAndroid Build Coastguard Worker	mv -f "$nlist"T "$nlist"
4091*6236dae4SAndroid Build Coastguard Worker      else
4092*6236dae4SAndroid Build Coastguard Worker	rm -f "$nlist"T
4093*6236dae4SAndroid Build Coastguard Worker      fi
4094*6236dae4SAndroid Build Coastguard Worker
4095*6236dae4SAndroid Build Coastguard Worker      # Make sure that we snagged all the symbols we need.
4096*6236dae4SAndroid Build Coastguard Worker      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4097*6236dae4SAndroid Build Coastguard Worker	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4098*6236dae4SAndroid Build Coastguard Worker	  cat <<_LT_EOF > conftest.$ac_ext
4099*6236dae4SAndroid Build Coastguard Worker/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4100*6236dae4SAndroid Build Coastguard Worker#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4101*6236dae4SAndroid Build Coastguard Worker/* DATA imports from DLLs on WIN32 can't be const, because runtime
4102*6236dae4SAndroid Build Coastguard Worker   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4103*6236dae4SAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST
4104*6236dae4SAndroid Build Coastguard Worker#elif defined __osf__
4105*6236dae4SAndroid Build Coastguard Worker/* This system does not cope well with relocations in const data.  */
4106*6236dae4SAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST
4107*6236dae4SAndroid Build Coastguard Worker#else
4108*6236dae4SAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST const
4109*6236dae4SAndroid Build Coastguard Worker#endif
4110*6236dae4SAndroid Build Coastguard Worker
4111*6236dae4SAndroid Build Coastguard Worker#ifdef __cplusplus
4112*6236dae4SAndroid Build Coastguard Workerextern "C" {
4113*6236dae4SAndroid Build Coastguard Worker#endif
4114*6236dae4SAndroid Build Coastguard Worker
4115*6236dae4SAndroid Build Coastguard Worker_LT_EOF
4116*6236dae4SAndroid Build Coastguard Worker	  # Now generate the symbol file.
4117*6236dae4SAndroid Build Coastguard Worker	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4118*6236dae4SAndroid Build Coastguard Worker
4119*6236dae4SAndroid Build Coastguard Worker	  cat <<_LT_EOF >> conftest.$ac_ext
4120*6236dae4SAndroid Build Coastguard Worker
4121*6236dae4SAndroid Build Coastguard Worker/* The mapping between symbol names and symbols.  */
4122*6236dae4SAndroid Build Coastguard WorkerLT@&t@_DLSYM_CONST struct {
4123*6236dae4SAndroid Build Coastguard Worker  const char *name;
4124*6236dae4SAndroid Build Coastguard Worker  void       *address;
4125*6236dae4SAndroid Build Coastguard Worker}
4126*6236dae4SAndroid Build Coastguard Workerlt__PROGRAM__LTX_preloaded_symbols[[]] =
4127*6236dae4SAndroid Build Coastguard Worker{
4128*6236dae4SAndroid Build Coastguard Worker  { "@PROGRAM@", (void *) 0 },
4129*6236dae4SAndroid Build Coastguard Worker_LT_EOF
4130*6236dae4SAndroid Build Coastguard Worker	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4131*6236dae4SAndroid Build Coastguard Worker	  cat <<\_LT_EOF >> conftest.$ac_ext
4132*6236dae4SAndroid Build Coastguard Worker  {0, (void *) 0}
4133*6236dae4SAndroid Build Coastguard Worker};
4134*6236dae4SAndroid Build Coastguard Worker
4135*6236dae4SAndroid Build Coastguard Worker/* This works around a problem in FreeBSD linker */
4136*6236dae4SAndroid Build Coastguard Worker#ifdef FREEBSD_WORKAROUND
4137*6236dae4SAndroid Build Coastguard Workerstatic const void *lt_preloaded_setup() {
4138*6236dae4SAndroid Build Coastguard Worker  return lt__PROGRAM__LTX_preloaded_symbols;
4139*6236dae4SAndroid Build Coastguard Worker}
4140*6236dae4SAndroid Build Coastguard Worker#endif
4141*6236dae4SAndroid Build Coastguard Worker
4142*6236dae4SAndroid Build Coastguard Worker#ifdef __cplusplus
4143*6236dae4SAndroid Build Coastguard Worker}
4144*6236dae4SAndroid Build Coastguard Worker#endif
4145*6236dae4SAndroid Build Coastguard Worker_LT_EOF
4146*6236dae4SAndroid Build Coastguard Worker	  # Now try linking the two files.
4147*6236dae4SAndroid Build Coastguard Worker	  mv conftest.$ac_objext conftstm.$ac_objext
4148*6236dae4SAndroid Build Coastguard Worker	  lt_globsym_save_LIBS=$LIBS
4149*6236dae4SAndroid Build Coastguard Worker	  lt_globsym_save_CFLAGS=$CFLAGS
4150*6236dae4SAndroid Build Coastguard Worker	  LIBS=conftstm.$ac_objext
4151*6236dae4SAndroid Build Coastguard Worker	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4152*6236dae4SAndroid Build Coastguard Worker	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4153*6236dae4SAndroid Build Coastguard Worker	    pipe_works=yes
4154*6236dae4SAndroid Build Coastguard Worker	  fi
4155*6236dae4SAndroid Build Coastguard Worker	  LIBS=$lt_globsym_save_LIBS
4156*6236dae4SAndroid Build Coastguard Worker	  CFLAGS=$lt_globsym_save_CFLAGS
4157*6236dae4SAndroid Build Coastguard Worker	else
4158*6236dae4SAndroid Build Coastguard Worker	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4159*6236dae4SAndroid Build Coastguard Worker	fi
4160*6236dae4SAndroid Build Coastguard Worker      else
4161*6236dae4SAndroid Build Coastguard Worker	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4162*6236dae4SAndroid Build Coastguard Worker      fi
4163*6236dae4SAndroid Build Coastguard Worker    else
4164*6236dae4SAndroid Build Coastguard Worker      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4165*6236dae4SAndroid Build Coastguard Worker    fi
4166*6236dae4SAndroid Build Coastguard Worker  else
4167*6236dae4SAndroid Build Coastguard Worker    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4168*6236dae4SAndroid Build Coastguard Worker    cat conftest.$ac_ext >&5
4169*6236dae4SAndroid Build Coastguard Worker  fi
4170*6236dae4SAndroid Build Coastguard Worker  rm -rf conftest* conftst*
4171*6236dae4SAndroid Build Coastguard Worker
4172*6236dae4SAndroid Build Coastguard Worker  # Do not use the global_symbol_pipe unless it works.
4173*6236dae4SAndroid Build Coastguard Worker  if test yes = "$pipe_works"; then
4174*6236dae4SAndroid Build Coastguard Worker    break
4175*6236dae4SAndroid Build Coastguard Worker  else
4176*6236dae4SAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe=
4177*6236dae4SAndroid Build Coastguard Worker  fi
4178*6236dae4SAndroid Build Coastguard Workerdone
4179*6236dae4SAndroid Build Coastguard Worker])
4180*6236dae4SAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe"; then
4181*6236dae4SAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_cdecl=
4182*6236dae4SAndroid Build Coastguard Workerfi
4183*6236dae4SAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4184*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT(failed)
4185*6236dae4SAndroid Build Coastguard Workerelse
4186*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT(ok)
4187*6236dae4SAndroid Build Coastguard Workerfi
4188*6236dae4SAndroid Build Coastguard Worker
4189*6236dae4SAndroid Build Coastguard Worker# Response file support.
4190*6236dae4SAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then
4191*6236dae4SAndroid Build Coastguard Worker  nm_file_list_spec='@'
4192*6236dae4SAndroid Build Coastguard Workerelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4193*6236dae4SAndroid Build Coastguard Worker  nm_file_list_spec='@'
4194*6236dae4SAndroid Build Coastguard Workerfi
4195*6236dae4SAndroid Build Coastguard Worker
4196*6236dae4SAndroid Build Coastguard Worker_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4197*6236dae4SAndroid Build Coastguard Worker    [Take the output of nm and produce a listing of raw symbols and C names])
4198*6236dae4SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4199*6236dae4SAndroid Build Coastguard Worker    [Transform the output of nm in a proper C declaration])
4200*6236dae4SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4201*6236dae4SAndroid Build Coastguard Worker    [Transform the output of nm into a list of symbols to manually relocate])
4202*6236dae4SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address],
4203*6236dae4SAndroid Build Coastguard Worker    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4204*6236dae4SAndroid Build Coastguard Worker    [Transform the output of nm in a C name address pair])
4205*6236dae4SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4206*6236dae4SAndroid Build Coastguard Worker    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4207*6236dae4SAndroid Build Coastguard Worker    [Transform the output of nm in a C name address pair when lib prefix is needed])
4208*6236dae4SAndroid Build Coastguard Worker_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4209*6236dae4SAndroid Build Coastguard Worker    [The name lister interface])
4210*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [nm_file_list_spec], [1],
4211*6236dae4SAndroid Build Coastguard Worker    [Specify filename containing input files for $NM])
4212*6236dae4SAndroid Build Coastguard Worker]) # _LT_CMD_GLOBAL_SYMBOLS
4213*6236dae4SAndroid Build Coastguard Worker
4214*6236dae4SAndroid Build Coastguard Worker
4215*6236dae4SAndroid Build Coastguard Worker# _LT_COMPILER_PIC([TAGNAME])
4216*6236dae4SAndroid Build Coastguard Worker# ---------------------------
4217*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_PIC],
4218*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl
4219*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4220*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4221*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_static, $1)=
4222*6236dae4SAndroid Build Coastguard Worker
4223*6236dae4SAndroid Build Coastguard Workerm4_if([$1], [CXX], [
4224*6236dae4SAndroid Build Coastguard Worker  # C++ specific cases for pic, static, wl, etc.
4225*6236dae4SAndroid Build Coastguard Worker  if test yes = "$GXX"; then
4226*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4227*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4228*6236dae4SAndroid Build Coastguard Worker
4229*6236dae4SAndroid Build Coastguard Worker    case $host_os in
4230*6236dae4SAndroid Build Coastguard Worker    aix*)
4231*6236dae4SAndroid Build Coastguard Worker      # All AIX code is PIC.
4232*6236dae4SAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
4233*6236dae4SAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4234*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4235*6236dae4SAndroid Build Coastguard Worker      fi
4236*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4237*6236dae4SAndroid Build Coastguard Worker      ;;
4238*6236dae4SAndroid Build Coastguard Worker
4239*6236dae4SAndroid Build Coastguard Worker    amigaos*)
4240*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
4241*6236dae4SAndroid Build Coastguard Worker      powerpc)
4242*6236dae4SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
4243*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4244*6236dae4SAndroid Build Coastguard Worker        ;;
4245*6236dae4SAndroid Build Coastguard Worker      m68k)
4246*6236dae4SAndroid Build Coastguard Worker            # FIXME: we need at least 68020 code to build shared libraries, but
4247*6236dae4SAndroid Build Coastguard Worker            # adding the '-m68020' flag to GCC prevents building anything better,
4248*6236dae4SAndroid Build Coastguard Worker            # like '-m68040'.
4249*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4250*6236dae4SAndroid Build Coastguard Worker        ;;
4251*6236dae4SAndroid Build Coastguard Worker      esac
4252*6236dae4SAndroid Build Coastguard Worker      ;;
4253*6236dae4SAndroid Build Coastguard Worker
4254*6236dae4SAndroid Build Coastguard Worker    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4255*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for these OSes.
4256*6236dae4SAndroid Build Coastguard Worker      ;;
4257*6236dae4SAndroid Build Coastguard Worker    mingw* | cygwin* | os2* | pw32* | cegcc*)
4258*6236dae4SAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4259*6236dae4SAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4260*6236dae4SAndroid Build Coastguard Worker      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4261*6236dae4SAndroid Build Coastguard Worker      # (--disable-auto-import) libraries
4262*6236dae4SAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4263*6236dae4SAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4264*6236dae4SAndroid Build Coastguard Worker      case $host_os in
4265*6236dae4SAndroid Build Coastguard Worker      os2*)
4266*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4267*6236dae4SAndroid Build Coastguard Worker	;;
4268*6236dae4SAndroid Build Coastguard Worker      esac
4269*6236dae4SAndroid Build Coastguard Worker      ;;
4270*6236dae4SAndroid Build Coastguard Worker    darwin* | rhapsody*)
4271*6236dae4SAndroid Build Coastguard Worker      # PIC is the default on this platform
4272*6236dae4SAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4273*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4274*6236dae4SAndroid Build Coastguard Worker      ;;
4275*6236dae4SAndroid Build Coastguard Worker    *djgpp*)
4276*6236dae4SAndroid Build Coastguard Worker      # DJGPP does not support shared libraries at all
4277*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4278*6236dae4SAndroid Build Coastguard Worker      ;;
4279*6236dae4SAndroid Build Coastguard Worker    haiku*)
4280*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for Haiku.
4281*6236dae4SAndroid Build Coastguard Worker      # The "-static" flag exists, but is broken.
4282*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4283*6236dae4SAndroid Build Coastguard Worker      ;;
4284*6236dae4SAndroid Build Coastguard Worker    interix[[3-9]]*)
4285*6236dae4SAndroid Build Coastguard Worker      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4286*6236dae4SAndroid Build Coastguard Worker      # Instead, we relocate shared libraries at runtime.
4287*6236dae4SAndroid Build Coastguard Worker      ;;
4288*6236dae4SAndroid Build Coastguard Worker    sysv4*MP*)
4289*6236dae4SAndroid Build Coastguard Worker      if test -d /usr/nec; then
4290*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4291*6236dae4SAndroid Build Coastguard Worker      fi
4292*6236dae4SAndroid Build Coastguard Worker      ;;
4293*6236dae4SAndroid Build Coastguard Worker    hpux*)
4294*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4295*6236dae4SAndroid Build Coastguard Worker      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4296*6236dae4SAndroid Build Coastguard Worker      # sets the default TLS model and affects inlining.
4297*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
4298*6236dae4SAndroid Build Coastguard Worker      hppa*64*)
4299*6236dae4SAndroid Build Coastguard Worker	;;
4300*6236dae4SAndroid Build Coastguard Worker      *)
4301*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4302*6236dae4SAndroid Build Coastguard Worker	;;
4303*6236dae4SAndroid Build Coastguard Worker      esac
4304*6236dae4SAndroid Build Coastguard Worker      ;;
4305*6236dae4SAndroid Build Coastguard Worker    *qnx* | *nto*)
4306*6236dae4SAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4307*6236dae4SAndroid Build Coastguard Worker      # it will coredump.
4308*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4309*6236dae4SAndroid Build Coastguard Worker      ;;
4310*6236dae4SAndroid Build Coastguard Worker    *)
4311*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4312*6236dae4SAndroid Build Coastguard Worker      ;;
4313*6236dae4SAndroid Build Coastguard Worker    esac
4314*6236dae4SAndroid Build Coastguard Worker  else
4315*6236dae4SAndroid Build Coastguard Worker    case $host_os in
4316*6236dae4SAndroid Build Coastguard Worker      aix[[4-9]]*)
4317*6236dae4SAndroid Build Coastguard Worker	# All AIX code is PIC.
4318*6236dae4SAndroid Build Coastguard Worker	if test ia64 = "$host_cpu"; then
4319*6236dae4SAndroid Build Coastguard Worker	  # AIX 5 now supports IA64 processor
4320*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4321*6236dae4SAndroid Build Coastguard Worker	else
4322*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4323*6236dae4SAndroid Build Coastguard Worker	fi
4324*6236dae4SAndroid Build Coastguard Worker	;;
4325*6236dae4SAndroid Build Coastguard Worker      chorus*)
4326*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4327*6236dae4SAndroid Build Coastguard Worker	cxch68*)
4328*6236dae4SAndroid Build Coastguard Worker	  # Green Hills C++ Compiler
4329*6236dae4SAndroid 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"
4330*6236dae4SAndroid Build Coastguard Worker	  ;;
4331*6236dae4SAndroid Build Coastguard Worker	esac
4332*6236dae4SAndroid Build Coastguard Worker	;;
4333*6236dae4SAndroid Build Coastguard Worker      mingw* | cygwin* | os2* | pw32* | cegcc*)
4334*6236dae4SAndroid Build Coastguard Worker	# This hack is so that the source file can tell whether it is being
4335*6236dae4SAndroid Build Coastguard Worker	# built for inclusion in a dll (and should export symbols for example).
4336*6236dae4SAndroid Build Coastguard Worker	m4_if([$1], [GCJ], [],
4337*6236dae4SAndroid Build Coastguard Worker	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4338*6236dae4SAndroid Build Coastguard Worker	;;
4339*6236dae4SAndroid Build Coastguard Worker      dgux*)
4340*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4341*6236dae4SAndroid Build Coastguard Worker	  ec++*)
4342*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4343*6236dae4SAndroid Build Coastguard Worker	    ;;
4344*6236dae4SAndroid Build Coastguard Worker	  ghcx*)
4345*6236dae4SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
4346*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4347*6236dae4SAndroid Build Coastguard Worker	    ;;
4348*6236dae4SAndroid Build Coastguard Worker	  *)
4349*6236dae4SAndroid Build Coastguard Worker	    ;;
4350*6236dae4SAndroid Build Coastguard Worker	esac
4351*6236dae4SAndroid Build Coastguard Worker	;;
4352*6236dae4SAndroid Build Coastguard Worker      freebsd* | dragonfly* | midnightbsd*)
4353*6236dae4SAndroid Build Coastguard Worker	# FreeBSD uses GNU C++
4354*6236dae4SAndroid Build Coastguard Worker	;;
4355*6236dae4SAndroid Build Coastguard Worker      hpux9* | hpux10* | hpux11*)
4356*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4357*6236dae4SAndroid Build Coastguard Worker	  CC*)
4358*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4359*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4360*6236dae4SAndroid Build Coastguard Worker	    if test ia64 != "$host_cpu"; then
4361*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4362*6236dae4SAndroid Build Coastguard Worker	    fi
4363*6236dae4SAndroid Build Coastguard Worker	    ;;
4364*6236dae4SAndroid Build Coastguard Worker	  aCC*)
4365*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4366*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4367*6236dae4SAndroid Build Coastguard Worker	    case $host_cpu in
4368*6236dae4SAndroid Build Coastguard Worker	    hppa*64*|ia64*)
4369*6236dae4SAndroid Build Coastguard Worker	      # +Z the default
4370*6236dae4SAndroid Build Coastguard Worker	      ;;
4371*6236dae4SAndroid Build Coastguard Worker	    *)
4372*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4373*6236dae4SAndroid Build Coastguard Worker	      ;;
4374*6236dae4SAndroid Build Coastguard Worker	    esac
4375*6236dae4SAndroid Build Coastguard Worker	    ;;
4376*6236dae4SAndroid Build Coastguard Worker	  *)
4377*6236dae4SAndroid Build Coastguard Worker	    ;;
4378*6236dae4SAndroid Build Coastguard Worker	esac
4379*6236dae4SAndroid Build Coastguard Worker	;;
4380*6236dae4SAndroid Build Coastguard Worker      interix*)
4381*6236dae4SAndroid Build Coastguard Worker	# This is c89, which is MS Visual C++ (no shared libs)
4382*6236dae4SAndroid Build Coastguard Worker	# Anyone wants to do a port?
4383*6236dae4SAndroid Build Coastguard Worker	;;
4384*6236dae4SAndroid Build Coastguard Worker      irix5* | irix6* | nonstopux*)
4385*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4386*6236dae4SAndroid Build Coastguard Worker	  CC*)
4387*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4388*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4389*6236dae4SAndroid Build Coastguard Worker	    # CC pic flag -KPIC is the default.
4390*6236dae4SAndroid Build Coastguard Worker	    ;;
4391*6236dae4SAndroid Build Coastguard Worker	  *)
4392*6236dae4SAndroid Build Coastguard Worker	    ;;
4393*6236dae4SAndroid Build Coastguard Worker	esac
4394*6236dae4SAndroid Build Coastguard Worker	;;
4395*6236dae4SAndroid Build Coastguard Worker      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4396*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4397*6236dae4SAndroid Build Coastguard Worker	  KCC*)
4398*6236dae4SAndroid Build Coastguard Worker	    # KAI C++ Compiler
4399*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4400*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4401*6236dae4SAndroid Build Coastguard Worker	    ;;
4402*6236dae4SAndroid Build Coastguard Worker	  ecpc* )
4403*6236dae4SAndroid Build Coastguard Worker	    # old Intel C++ for x86_64, which still supported -KPIC.
4404*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4406*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4407*6236dae4SAndroid Build Coastguard Worker	    ;;
4408*6236dae4SAndroid Build Coastguard Worker	  icpc* )
4409*6236dae4SAndroid Build Coastguard Worker	    # Intel C++, used to be incompatible with GCC.
4410*6236dae4SAndroid Build Coastguard Worker	    # ICC 10 doesn't accept -KPIC any more.
4411*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4412*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4413*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4414*6236dae4SAndroid Build Coastguard Worker	    ;;
4415*6236dae4SAndroid Build Coastguard Worker	  pgCC* | pgcpp*)
4416*6236dae4SAndroid Build Coastguard Worker	    # Portland Group C++ compiler
4417*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4418*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4419*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4420*6236dae4SAndroid Build Coastguard Worker	    ;;
4421*6236dae4SAndroid Build Coastguard Worker	  cxx*)
4422*6236dae4SAndroid Build Coastguard Worker	    # Compaq C++
4423*6236dae4SAndroid Build Coastguard Worker	    # Make sure the PIC flag is empty.  It appears that all Alpha
4424*6236dae4SAndroid Build Coastguard Worker	    # Linux and Compaq Tru64 Unix objects are PIC.
4425*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4426*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4427*6236dae4SAndroid Build Coastguard Worker	    ;;
4428*6236dae4SAndroid Build Coastguard Worker	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4429*6236dae4SAndroid Build Coastguard Worker	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4430*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4431*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4432*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4433*6236dae4SAndroid Build Coastguard Worker	    ;;
4434*6236dae4SAndroid Build Coastguard Worker	  *)
4435*6236dae4SAndroid Build Coastguard Worker	    case `$CC -V 2>&1 | $SED 5q` in
4436*6236dae4SAndroid Build Coastguard Worker	    *Sun\ C*)
4437*6236dae4SAndroid Build Coastguard Worker	      # Sun C++ 5.9
4438*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4439*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4440*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4441*6236dae4SAndroid Build Coastguard Worker	      ;;
4442*6236dae4SAndroid Build Coastguard Worker	    esac
4443*6236dae4SAndroid Build Coastguard Worker	    ;;
4444*6236dae4SAndroid Build Coastguard Worker	esac
4445*6236dae4SAndroid Build Coastguard Worker	;;
4446*6236dae4SAndroid Build Coastguard Worker      lynxos*)
4447*6236dae4SAndroid Build Coastguard Worker	;;
4448*6236dae4SAndroid Build Coastguard Worker      m88k*)
4449*6236dae4SAndroid Build Coastguard Worker	;;
4450*6236dae4SAndroid Build Coastguard Worker      mvs*)
4451*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4452*6236dae4SAndroid Build Coastguard Worker	  cxx*)
4453*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4454*6236dae4SAndroid Build Coastguard Worker	    ;;
4455*6236dae4SAndroid Build Coastguard Worker	  *)
4456*6236dae4SAndroid Build Coastguard Worker	    ;;
4457*6236dae4SAndroid Build Coastguard Worker	esac
4458*6236dae4SAndroid Build Coastguard Worker	;;
4459*6236dae4SAndroid Build Coastguard Worker      netbsd* | netbsdelf*-gnu)
4460*6236dae4SAndroid Build Coastguard Worker	;;
4461*6236dae4SAndroid Build Coastguard Worker      *qnx* | *nto*)
4462*6236dae4SAndroid Build Coastguard Worker        # QNX uses GNU C++, but need to define -shared option too, otherwise
4463*6236dae4SAndroid Build Coastguard Worker        # it will coredump.
4464*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4465*6236dae4SAndroid Build Coastguard Worker        ;;
4466*6236dae4SAndroid Build Coastguard Worker      osf3* | osf4* | osf5*)
4467*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4468*6236dae4SAndroid Build Coastguard Worker	  KCC*)
4469*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4470*6236dae4SAndroid Build Coastguard Worker	    ;;
4471*6236dae4SAndroid Build Coastguard Worker	  RCC*)
4472*6236dae4SAndroid Build Coastguard Worker	    # Rational C++ 2.4.1
4473*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4474*6236dae4SAndroid Build Coastguard Worker	    ;;
4475*6236dae4SAndroid Build Coastguard Worker	  cxx*)
4476*6236dae4SAndroid Build Coastguard Worker	    # Digital/Compaq C++
4477*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4478*6236dae4SAndroid Build Coastguard Worker	    # Make sure the PIC flag is empty.  It appears that all Alpha
4479*6236dae4SAndroid Build Coastguard Worker	    # Linux and Compaq Tru64 Unix objects are PIC.
4480*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4481*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4482*6236dae4SAndroid Build Coastguard Worker	    ;;
4483*6236dae4SAndroid Build Coastguard Worker	  *)
4484*6236dae4SAndroid Build Coastguard Worker	    ;;
4485*6236dae4SAndroid Build Coastguard Worker	esac
4486*6236dae4SAndroid Build Coastguard Worker	;;
4487*6236dae4SAndroid Build Coastguard Worker      psos*)
4488*6236dae4SAndroid Build Coastguard Worker	;;
4489*6236dae4SAndroid Build Coastguard Worker      solaris*)
4490*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4491*6236dae4SAndroid Build Coastguard Worker	  CC* | sunCC*)
4492*6236dae4SAndroid Build Coastguard Worker	    # Sun C++ 4.2, 5.x and Centerline C++
4493*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4494*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4495*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4496*6236dae4SAndroid Build Coastguard Worker	    ;;
4497*6236dae4SAndroid Build Coastguard Worker	  gcx*)
4498*6236dae4SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
4499*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4500*6236dae4SAndroid Build Coastguard Worker	    ;;
4501*6236dae4SAndroid Build Coastguard Worker	  *)
4502*6236dae4SAndroid Build Coastguard Worker	    ;;
4503*6236dae4SAndroid Build Coastguard Worker	esac
4504*6236dae4SAndroid Build Coastguard Worker	;;
4505*6236dae4SAndroid Build Coastguard Worker      sunos4*)
4506*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4507*6236dae4SAndroid Build Coastguard Worker	  CC*)
4508*6236dae4SAndroid Build Coastguard Worker	    # Sun C++ 4.x
4509*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4510*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4511*6236dae4SAndroid Build Coastguard Worker	    ;;
4512*6236dae4SAndroid Build Coastguard Worker	  lcc*)
4513*6236dae4SAndroid Build Coastguard Worker	    # Lucid
4514*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4515*6236dae4SAndroid Build Coastguard Worker	    ;;
4516*6236dae4SAndroid Build Coastguard Worker	  *)
4517*6236dae4SAndroid Build Coastguard Worker	    ;;
4518*6236dae4SAndroid Build Coastguard Worker	esac
4519*6236dae4SAndroid Build Coastguard Worker	;;
4520*6236dae4SAndroid Build Coastguard Worker      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4521*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4522*6236dae4SAndroid Build Coastguard Worker	  CC*)
4523*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4524*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4525*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4526*6236dae4SAndroid Build Coastguard Worker	    ;;
4527*6236dae4SAndroid Build Coastguard Worker	esac
4528*6236dae4SAndroid Build Coastguard Worker	;;
4529*6236dae4SAndroid Build Coastguard Worker      tandem*)
4530*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
4531*6236dae4SAndroid Build Coastguard Worker	  NCC*)
4532*6236dae4SAndroid Build Coastguard Worker	    # NonStop-UX NCC 3.20
4533*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4534*6236dae4SAndroid Build Coastguard Worker	    ;;
4535*6236dae4SAndroid Build Coastguard Worker	  *)
4536*6236dae4SAndroid Build Coastguard Worker	    ;;
4537*6236dae4SAndroid Build Coastguard Worker	esac
4538*6236dae4SAndroid Build Coastguard Worker	;;
4539*6236dae4SAndroid Build Coastguard Worker      vxworks*)
4540*6236dae4SAndroid Build Coastguard Worker	;;
4541*6236dae4SAndroid Build Coastguard Worker      *)
4542*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4543*6236dae4SAndroid Build Coastguard Worker	;;
4544*6236dae4SAndroid Build Coastguard Worker    esac
4545*6236dae4SAndroid Build Coastguard Worker  fi
4546*6236dae4SAndroid Build Coastguard Worker],
4547*6236dae4SAndroid Build Coastguard Worker[
4548*6236dae4SAndroid Build Coastguard Worker  if test yes = "$GCC"; then
4549*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4550*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4551*6236dae4SAndroid Build Coastguard Worker
4552*6236dae4SAndroid Build Coastguard Worker    case $host_os in
4553*6236dae4SAndroid Build Coastguard Worker      aix*)
4554*6236dae4SAndroid Build Coastguard Worker      # All AIX code is PIC.
4555*6236dae4SAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
4556*6236dae4SAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4557*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4558*6236dae4SAndroid Build Coastguard Worker      fi
4559*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4560*6236dae4SAndroid Build Coastguard Worker      ;;
4561*6236dae4SAndroid Build Coastguard Worker
4562*6236dae4SAndroid Build Coastguard Worker    amigaos*)
4563*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
4564*6236dae4SAndroid Build Coastguard Worker      powerpc)
4565*6236dae4SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
4566*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4567*6236dae4SAndroid Build Coastguard Worker        ;;
4568*6236dae4SAndroid Build Coastguard Worker      m68k)
4569*6236dae4SAndroid Build Coastguard Worker            # FIXME: we need at least 68020 code to build shared libraries, but
4570*6236dae4SAndroid Build Coastguard Worker            # adding the '-m68020' flag to GCC prevents building anything better,
4571*6236dae4SAndroid Build Coastguard Worker            # like '-m68040'.
4572*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4573*6236dae4SAndroid Build Coastguard Worker        ;;
4574*6236dae4SAndroid Build Coastguard Worker      esac
4575*6236dae4SAndroid Build Coastguard Worker      ;;
4576*6236dae4SAndroid Build Coastguard Worker
4577*6236dae4SAndroid Build Coastguard Worker    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4578*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for these OSes.
4579*6236dae4SAndroid Build Coastguard Worker      ;;
4580*6236dae4SAndroid Build Coastguard Worker
4581*6236dae4SAndroid Build Coastguard Worker    mingw* | cygwin* | pw32* | os2* | cegcc*)
4582*6236dae4SAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4583*6236dae4SAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4584*6236dae4SAndroid Build Coastguard Worker      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4585*6236dae4SAndroid Build Coastguard Worker      # (--disable-auto-import) libraries
4586*6236dae4SAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4587*6236dae4SAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4588*6236dae4SAndroid Build Coastguard Worker      case $host_os in
4589*6236dae4SAndroid Build Coastguard Worker      os2*)
4590*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4591*6236dae4SAndroid Build Coastguard Worker	;;
4592*6236dae4SAndroid Build Coastguard Worker      esac
4593*6236dae4SAndroid Build Coastguard Worker      ;;
4594*6236dae4SAndroid Build Coastguard Worker
4595*6236dae4SAndroid Build Coastguard Worker    darwin* | rhapsody*)
4596*6236dae4SAndroid Build Coastguard Worker      # PIC is the default on this platform
4597*6236dae4SAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4598*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4599*6236dae4SAndroid Build Coastguard Worker      ;;
4600*6236dae4SAndroid Build Coastguard Worker
4601*6236dae4SAndroid Build Coastguard Worker    haiku*)
4602*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for Haiku.
4603*6236dae4SAndroid Build Coastguard Worker      # The "-static" flag exists, but is broken.
4604*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4605*6236dae4SAndroid Build Coastguard Worker      ;;
4606*6236dae4SAndroid Build Coastguard Worker
4607*6236dae4SAndroid Build Coastguard Worker    hpux*)
4608*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4609*6236dae4SAndroid Build Coastguard Worker      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4610*6236dae4SAndroid Build Coastguard Worker      # sets the default TLS model and affects inlining.
4611*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
4612*6236dae4SAndroid Build Coastguard Worker      hppa*64*)
4613*6236dae4SAndroid Build Coastguard Worker	# +Z the default
4614*6236dae4SAndroid Build Coastguard Worker	;;
4615*6236dae4SAndroid Build Coastguard Worker      *)
4616*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4617*6236dae4SAndroid Build Coastguard Worker	;;
4618*6236dae4SAndroid Build Coastguard Worker      esac
4619*6236dae4SAndroid Build Coastguard Worker      ;;
4620*6236dae4SAndroid Build Coastguard Worker
4621*6236dae4SAndroid Build Coastguard Worker    interix[[3-9]]*)
4622*6236dae4SAndroid Build Coastguard Worker      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4623*6236dae4SAndroid Build Coastguard Worker      # Instead, we relocate shared libraries at runtime.
4624*6236dae4SAndroid Build Coastguard Worker      ;;
4625*6236dae4SAndroid Build Coastguard Worker
4626*6236dae4SAndroid Build Coastguard Worker    msdosdjgpp*)
4627*6236dae4SAndroid Build Coastguard Worker      # Just because we use GCC doesn't mean we suddenly get shared libraries
4628*6236dae4SAndroid Build Coastguard Worker      # on systems that don't support them.
4629*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4630*6236dae4SAndroid Build Coastguard Worker      enable_shared=no
4631*6236dae4SAndroid Build Coastguard Worker      ;;
4632*6236dae4SAndroid Build Coastguard Worker
4633*6236dae4SAndroid Build Coastguard Worker    *nto* | *qnx*)
4634*6236dae4SAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4635*6236dae4SAndroid Build Coastguard Worker      # it will coredump.
4636*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4637*6236dae4SAndroid Build Coastguard Worker      ;;
4638*6236dae4SAndroid Build Coastguard Worker
4639*6236dae4SAndroid Build Coastguard Worker    sysv4*MP*)
4640*6236dae4SAndroid Build Coastguard Worker      if test -d /usr/nec; then
4641*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4642*6236dae4SAndroid Build Coastguard Worker      fi
4643*6236dae4SAndroid Build Coastguard Worker      ;;
4644*6236dae4SAndroid Build Coastguard Worker
4645*6236dae4SAndroid Build Coastguard Worker    *)
4646*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4647*6236dae4SAndroid Build Coastguard Worker      ;;
4648*6236dae4SAndroid Build Coastguard Worker    esac
4649*6236dae4SAndroid Build Coastguard Worker
4650*6236dae4SAndroid Build Coastguard Worker    case $cc_basename in
4651*6236dae4SAndroid Build Coastguard Worker    nvcc*) # Cuda Compiler Driver 2.2
4652*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4653*6236dae4SAndroid Build Coastguard Worker      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4654*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4655*6236dae4SAndroid Build Coastguard Worker      fi
4656*6236dae4SAndroid Build Coastguard Worker      ;;
4657*6236dae4SAndroid Build Coastguard Worker    esac
4658*6236dae4SAndroid Build Coastguard Worker  else
4659*6236dae4SAndroid Build Coastguard Worker    # PORTME Check for flag to pass linker flags through the system compiler.
4660*6236dae4SAndroid Build Coastguard Worker    case $host_os in
4661*6236dae4SAndroid Build Coastguard Worker    aix*)
4662*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4663*6236dae4SAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
4664*6236dae4SAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4665*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4666*6236dae4SAndroid Build Coastguard Worker      else
4667*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4668*6236dae4SAndroid Build Coastguard Worker      fi
4669*6236dae4SAndroid Build Coastguard Worker      ;;
4670*6236dae4SAndroid Build Coastguard Worker
4671*6236dae4SAndroid Build Coastguard Worker    darwin* | rhapsody*)
4672*6236dae4SAndroid Build Coastguard Worker      # PIC is the default on this platform
4673*6236dae4SAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4674*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4675*6236dae4SAndroid Build Coastguard Worker      case $cc_basename in
4676*6236dae4SAndroid Build Coastguard Worker      nagfor*)
4677*6236dae4SAndroid Build Coastguard Worker        # NAG Fortran compiler
4678*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4679*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4680*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4681*6236dae4SAndroid Build Coastguard Worker        ;;
4682*6236dae4SAndroid Build Coastguard Worker      esac
4683*6236dae4SAndroid Build Coastguard Worker      ;;
4684*6236dae4SAndroid Build Coastguard Worker
4685*6236dae4SAndroid Build Coastguard Worker    mingw* | cygwin* | pw32* | os2* | cegcc*)
4686*6236dae4SAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4687*6236dae4SAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4688*6236dae4SAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4689*6236dae4SAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4690*6236dae4SAndroid Build Coastguard Worker      case $host_os in
4691*6236dae4SAndroid Build Coastguard Worker      os2*)
4692*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4693*6236dae4SAndroid Build Coastguard Worker	;;
4694*6236dae4SAndroid Build Coastguard Worker      esac
4695*6236dae4SAndroid Build Coastguard Worker      ;;
4696*6236dae4SAndroid Build Coastguard Worker
4697*6236dae4SAndroid Build Coastguard Worker    hpux9* | hpux10* | hpux11*)
4698*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4699*6236dae4SAndroid Build Coastguard Worker      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4700*6236dae4SAndroid Build Coastguard Worker      # not for PA HP-UX.
4701*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
4702*6236dae4SAndroid Build Coastguard Worker      hppa*64*|ia64*)
4703*6236dae4SAndroid Build Coastguard Worker	# +Z the default
4704*6236dae4SAndroid Build Coastguard Worker	;;
4705*6236dae4SAndroid Build Coastguard Worker      *)
4706*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4707*6236dae4SAndroid Build Coastguard Worker	;;
4708*6236dae4SAndroid Build Coastguard Worker      esac
4709*6236dae4SAndroid Build Coastguard Worker      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4710*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4711*6236dae4SAndroid Build Coastguard Worker      ;;
4712*6236dae4SAndroid Build Coastguard Worker
4713*6236dae4SAndroid Build Coastguard Worker    irix5* | irix6* | nonstopux*)
4714*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4715*6236dae4SAndroid Build Coastguard Worker      # PIC (with -KPIC) is the default.
4716*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4717*6236dae4SAndroid Build Coastguard Worker      ;;
4718*6236dae4SAndroid Build Coastguard Worker
4719*6236dae4SAndroid Build Coastguard Worker    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4720*6236dae4SAndroid Build Coastguard Worker      case $cc_basename in
4721*6236dae4SAndroid Build Coastguard Worker      # old Intel for x86_64, which still supported -KPIC.
4722*6236dae4SAndroid Build Coastguard Worker      ecc*)
4723*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4724*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4725*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4726*6236dae4SAndroid Build Coastguard Worker        ;;
4727*6236dae4SAndroid Build Coastguard Worker      # flang / f18. f95 an alias for gfortran or flang on Debian
4728*6236dae4SAndroid Build Coastguard Worker      flang* | f18* | f95*)
4729*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4730*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4731*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4732*6236dae4SAndroid Build Coastguard Worker        ;;
4733*6236dae4SAndroid Build Coastguard Worker      # icc used to be incompatible with GCC.
4734*6236dae4SAndroid Build Coastguard Worker      # ICC 10 doesn't accept -KPIC any more.
4735*6236dae4SAndroid Build Coastguard Worker      icc* | ifort*)
4736*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4737*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4738*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4739*6236dae4SAndroid Build Coastguard Worker        ;;
4740*6236dae4SAndroid Build Coastguard Worker      # Lahey Fortran 8.1.
4741*6236dae4SAndroid Build Coastguard Worker      lf95*)
4742*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4743*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4744*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4745*6236dae4SAndroid Build Coastguard Worker	;;
4746*6236dae4SAndroid Build Coastguard Worker      nagfor*)
4747*6236dae4SAndroid Build Coastguard Worker	# NAG Fortran compiler
4748*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4749*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4750*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4751*6236dae4SAndroid Build Coastguard Worker	;;
4752*6236dae4SAndroid Build Coastguard Worker      tcc*)
4753*6236dae4SAndroid Build Coastguard Worker	# Fabrice Bellard et al's Tiny C Compiler
4754*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4755*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4756*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4757*6236dae4SAndroid Build Coastguard Worker	;;
4758*6236dae4SAndroid Build Coastguard Worker      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4759*6236dae4SAndroid Build Coastguard Worker        # Portland Group compilers (*not* the Pentium gcc compiler,
4760*6236dae4SAndroid Build Coastguard Worker	# which looks to be a dead project)
4761*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4762*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4763*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4764*6236dae4SAndroid Build Coastguard Worker        ;;
4765*6236dae4SAndroid Build Coastguard Worker      ccc*)
4766*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4767*6236dae4SAndroid Build Coastguard Worker        # All Alpha code is PIC.
4768*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4769*6236dae4SAndroid Build Coastguard Worker        ;;
4770*6236dae4SAndroid Build Coastguard Worker      xl* | bgxl* | bgf* | mpixl*)
4771*6236dae4SAndroid Build Coastguard Worker	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4772*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4774*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4775*6236dae4SAndroid Build Coastguard Worker	;;
4776*6236dae4SAndroid Build Coastguard Worker      *)
4777*6236dae4SAndroid Build Coastguard Worker	case `$CC -V 2>&1 | $SED 5q` in
4778*6236dae4SAndroid Build Coastguard Worker	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4779*6236dae4SAndroid Build Coastguard Worker	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4780*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4781*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4782*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4783*6236dae4SAndroid Build Coastguard Worker	  ;;
4784*6236dae4SAndroid Build Coastguard Worker	*Sun\ F* | *Sun*Fortran*)
4785*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4786*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4787*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4788*6236dae4SAndroid Build Coastguard Worker	  ;;
4789*6236dae4SAndroid Build Coastguard Worker	*Sun\ C*)
4790*6236dae4SAndroid Build Coastguard Worker	  # Sun C 5.9
4791*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4792*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4793*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4794*6236dae4SAndroid Build Coastguard Worker	  ;;
4795*6236dae4SAndroid Build Coastguard Worker        *Intel*\ [[CF]]*Compiler*)
4796*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4797*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4798*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4799*6236dae4SAndroid Build Coastguard Worker	  ;;
4800*6236dae4SAndroid Build Coastguard Worker	*Portland\ Group*)
4801*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4802*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4803*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4804*6236dae4SAndroid Build Coastguard Worker	  ;;
4805*6236dae4SAndroid Build Coastguard Worker	esac
4806*6236dae4SAndroid Build Coastguard Worker	;;
4807*6236dae4SAndroid Build Coastguard Worker      esac
4808*6236dae4SAndroid Build Coastguard Worker      ;;
4809*6236dae4SAndroid Build Coastguard Worker
4810*6236dae4SAndroid Build Coastguard Worker    newsos6)
4811*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4812*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4813*6236dae4SAndroid Build Coastguard Worker      ;;
4814*6236dae4SAndroid Build Coastguard Worker
4815*6236dae4SAndroid Build Coastguard Worker    *nto* | *qnx*)
4816*6236dae4SAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4817*6236dae4SAndroid Build Coastguard Worker      # it will coredump.
4818*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4819*6236dae4SAndroid Build Coastguard Worker      ;;
4820*6236dae4SAndroid Build Coastguard Worker
4821*6236dae4SAndroid Build Coastguard Worker    osf3* | osf4* | osf5*)
4822*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4823*6236dae4SAndroid Build Coastguard Worker      # All OSF/1 code is PIC.
4824*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4825*6236dae4SAndroid Build Coastguard Worker      ;;
4826*6236dae4SAndroid Build Coastguard Worker
4827*6236dae4SAndroid Build Coastguard Worker    rdos*)
4828*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4829*6236dae4SAndroid Build Coastguard Worker      ;;
4830*6236dae4SAndroid Build Coastguard Worker
4831*6236dae4SAndroid Build Coastguard Worker    solaris*)
4832*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4833*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4834*6236dae4SAndroid Build Coastguard Worker      case $cc_basename in
4835*6236dae4SAndroid Build Coastguard Worker      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4836*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4837*6236dae4SAndroid Build Coastguard Worker      *)
4838*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4839*6236dae4SAndroid Build Coastguard Worker      esac
4840*6236dae4SAndroid Build Coastguard Worker      ;;
4841*6236dae4SAndroid Build Coastguard Worker
4842*6236dae4SAndroid Build Coastguard Worker    sunos4*)
4843*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4844*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4845*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4846*6236dae4SAndroid Build Coastguard Worker      ;;
4847*6236dae4SAndroid Build Coastguard Worker
4848*6236dae4SAndroid Build Coastguard Worker    sysv4 | sysv4.2uw2* | sysv4.3*)
4849*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4850*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4851*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4852*6236dae4SAndroid Build Coastguard Worker      ;;
4853*6236dae4SAndroid Build Coastguard Worker
4854*6236dae4SAndroid Build Coastguard Worker    sysv4*MP*)
4855*6236dae4SAndroid Build Coastguard Worker      if test -d /usr/nec; then
4856*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4857*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4858*6236dae4SAndroid Build Coastguard Worker      fi
4859*6236dae4SAndroid Build Coastguard Worker      ;;
4860*6236dae4SAndroid Build Coastguard Worker
4861*6236dae4SAndroid Build Coastguard Worker    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4862*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4863*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4864*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4865*6236dae4SAndroid Build Coastguard Worker      ;;
4866*6236dae4SAndroid Build Coastguard Worker
4867*6236dae4SAndroid Build Coastguard Worker    unicos*)
4868*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4869*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4870*6236dae4SAndroid Build Coastguard Worker      ;;
4871*6236dae4SAndroid Build Coastguard Worker
4872*6236dae4SAndroid Build Coastguard Worker    uts4*)
4873*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4874*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4875*6236dae4SAndroid Build Coastguard Worker      ;;
4876*6236dae4SAndroid Build Coastguard Worker
4877*6236dae4SAndroid Build Coastguard Worker    *)
4878*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4879*6236dae4SAndroid Build Coastguard Worker      ;;
4880*6236dae4SAndroid Build Coastguard Worker    esac
4881*6236dae4SAndroid Build Coastguard Worker  fi
4882*6236dae4SAndroid Build Coastguard Worker])
4883*6236dae4SAndroid Build Coastguard Workercase $host_os in
4884*6236dae4SAndroid Build Coastguard Worker  # For platforms that do not support PIC, -DPIC is meaningless:
4885*6236dae4SAndroid Build Coastguard Worker  *djgpp*)
4886*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4887*6236dae4SAndroid Build Coastguard Worker    ;;
4888*6236dae4SAndroid Build Coastguard Worker  *)
4889*6236dae4SAndroid 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],[])])"
4890*6236dae4SAndroid Build Coastguard Worker    ;;
4891*6236dae4SAndroid Build Coastguard Workeresac
4892*6236dae4SAndroid Build Coastguard Worker
4893*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_CHECK([for $compiler option to produce PIC],
4894*6236dae4SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4895*6236dae4SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4896*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4897*6236dae4SAndroid Build Coastguard Worker
4898*6236dae4SAndroid Build Coastguard Worker#
4899*6236dae4SAndroid Build Coastguard Worker# Check to make sure the PIC flag actually works.
4900*6236dae4SAndroid Build Coastguard Worker#
4901*6236dae4SAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4902*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4903*6236dae4SAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4904*6236dae4SAndroid Build Coastguard Worker    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4905*6236dae4SAndroid Build Coastguard Worker    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4906*6236dae4SAndroid Build Coastguard Worker     "" | " "*) ;;
4907*6236dae4SAndroid Build Coastguard Worker     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4908*6236dae4SAndroid Build Coastguard Worker     esac],
4909*6236dae4SAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4910*6236dae4SAndroid Build Coastguard Worker     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4911*6236dae4SAndroid Build Coastguard Workerfi
4912*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4913*6236dae4SAndroid Build Coastguard Worker	[Additional compiler flags for building library objects])
4914*6236dae4SAndroid Build Coastguard Worker
4915*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4916*6236dae4SAndroid Build Coastguard Worker	[How to pass a linker flag through the compiler])
4917*6236dae4SAndroid Build Coastguard Worker#
4918*6236dae4SAndroid Build Coastguard Worker# Check to make sure the static flag actually works.
4919*6236dae4SAndroid Build Coastguard Worker#
4920*6236dae4SAndroid Build Coastguard Workerwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4921*6236dae4SAndroid Build Coastguard Worker_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4922*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4923*6236dae4SAndroid Build Coastguard Worker  $lt_tmp_static_flag,
4924*6236dae4SAndroid Build Coastguard Worker  [],
4925*6236dae4SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4926*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4927*6236dae4SAndroid Build Coastguard Worker	[Compiler flag to prevent dynamic linking])
4928*6236dae4SAndroid Build Coastguard Worker])# _LT_COMPILER_PIC
4929*6236dae4SAndroid Build Coastguard Worker
4930*6236dae4SAndroid Build Coastguard Worker
4931*6236dae4SAndroid Build Coastguard Worker# _LT_LINKER_SHLIBS([TAGNAME])
4932*6236dae4SAndroid Build Coastguard Worker# ----------------------------
4933*6236dae4SAndroid Build Coastguard Worker# See if the linker supports building shared libraries.
4934*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LINKER_SHLIBS],
4935*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PATH_LD])dnl
4936*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
4937*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4938*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4939*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
4940*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
4941*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4942*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
4943*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4944*6236dae4SAndroid Build Coastguard Workerm4_if([$1], [CXX], [
4945*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4946*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4947*6236dae4SAndroid Build Coastguard Worker  case $host_os in
4948*6236dae4SAndroid Build Coastguard Worker  aix[[4-9]]*)
4949*6236dae4SAndroid Build Coastguard Worker    # If we're using GNU nm, then we don't want the "-C" option.
4950*6236dae4SAndroid Build Coastguard Worker    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4951*6236dae4SAndroid Build Coastguard Worker    # Without the "-l" option, or with the "-B" option, AIX nm treats
4952*6236dae4SAndroid Build Coastguard Worker    # weak defined symbols like other global defined symbols, whereas
4953*6236dae4SAndroid Build Coastguard Worker    # GNU nm marks them as "W".
4954*6236dae4SAndroid Build Coastguard Worker    # While the 'weak' keyword is ignored in the Export File, we need
4955*6236dae4SAndroid Build Coastguard Worker    # it in the Import File for the 'aix-soname' feature, so we have
4956*6236dae4SAndroid Build Coastguard Worker    # to replace the "-B" option with "-P" for AIX nm.
4957*6236dae4SAndroid Build Coastguard Worker    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4958*6236dae4SAndroid 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'
4959*6236dae4SAndroid Build Coastguard Worker    else
4960*6236dae4SAndroid 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'
4961*6236dae4SAndroid Build Coastguard Worker    fi
4962*6236dae4SAndroid Build Coastguard Worker    ;;
4963*6236dae4SAndroid Build Coastguard Worker  pw32*)
4964*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4965*6236dae4SAndroid Build Coastguard Worker    ;;
4966*6236dae4SAndroid Build Coastguard Worker  cygwin* | mingw* | cegcc*)
4967*6236dae4SAndroid Build Coastguard Worker    case $cc_basename in
4968*6236dae4SAndroid Build Coastguard Worker    cl* | icl*)
4969*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4970*6236dae4SAndroid Build Coastguard Worker      ;;
4971*6236dae4SAndroid Build Coastguard Worker    *)
4972*6236dae4SAndroid 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'
4973*6236dae4SAndroid 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']
4974*6236dae4SAndroid Build Coastguard Worker      ;;
4975*6236dae4SAndroid Build Coastguard Worker    esac
4976*6236dae4SAndroid Build Coastguard Worker    ;;
4977*6236dae4SAndroid Build Coastguard Worker  linux* | k*bsd*-gnu | gnu*)
4978*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(link_all_deplibs, $1)=no
4979*6236dae4SAndroid Build Coastguard Worker    ;;
4980*6236dae4SAndroid Build Coastguard Worker  *)
4981*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4982*6236dae4SAndroid Build Coastguard Worker    ;;
4983*6236dae4SAndroid Build Coastguard Worker  esac
4984*6236dae4SAndroid Build Coastguard Worker], [
4985*6236dae4SAndroid Build Coastguard Worker  runpath_var=
4986*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(allow_undefined_flag, $1)=
4987*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(always_export_symbols, $1)=no
4988*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds, $1)=
4989*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_expsym_cmds, $1)=
4990*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler_needs_object, $1)=no
4991*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4992*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4993*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4994*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_automatic, $1)=no
4995*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct, $1)=no
4996*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4997*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4998*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4999*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_minus_L, $1)=no
5000*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5001*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(inherit_rpath, $1)=no
5002*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5003*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(module_cmds, $1)=
5004*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(module_expsym_cmds, $1)=
5005*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5006*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5007*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5008*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5009*6236dae4SAndroid Build Coastguard Worker  # include_expsyms should be a list of space-separated symbols to be *always*
5010*6236dae4SAndroid Build Coastguard Worker  # included in the symbol list
5011*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(include_expsyms, $1)=
5012*6236dae4SAndroid Build Coastguard Worker  # exclude_expsyms can be an extended regexp of symbols to exclude
5013*6236dae4SAndroid Build Coastguard Worker  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5014*6236dae4SAndroid Build Coastguard Worker  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5015*6236dae4SAndroid Build Coastguard Worker  # as well as any symbol that contains 'd'.
5016*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5017*6236dae4SAndroid Build Coastguard Worker  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5018*6236dae4SAndroid Build Coastguard Worker  # platforms (ab)use it in PIC code, but their linkers get confused if
5019*6236dae4SAndroid Build Coastguard Worker  # the symbol is explicitly referenced.  Since portable code cannot
5020*6236dae4SAndroid Build Coastguard Worker  # rely on this symbol name, it's probably fine to never include it in
5021*6236dae4SAndroid Build Coastguard Worker  # preloaded symbol tables.
5022*6236dae4SAndroid Build Coastguard Worker  # Exclude shared library initialization/finalization symbols.
5023*6236dae4SAndroid Build Coastguard Workerdnl Note also adjust exclude_expsyms for C++ above.
5024*6236dae4SAndroid Build Coastguard Worker  extract_expsyms_cmds=
5025*6236dae4SAndroid Build Coastguard Worker
5026*6236dae4SAndroid Build Coastguard Worker  case $host_os in
5027*6236dae4SAndroid Build Coastguard Worker  cygwin* | mingw* | pw32* | cegcc*)
5028*6236dae4SAndroid Build Coastguard Worker    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5029*6236dae4SAndroid Build Coastguard Worker    # When not using gcc, we currently assume that we are using
5030*6236dae4SAndroid Build Coastguard Worker    # Microsoft Visual C++ or Intel C++ Compiler.
5031*6236dae4SAndroid Build Coastguard Worker    if test yes != "$GCC"; then
5032*6236dae4SAndroid Build Coastguard Worker      with_gnu_ld=no
5033*6236dae4SAndroid Build Coastguard Worker    fi
5034*6236dae4SAndroid Build Coastguard Worker    ;;
5035*6236dae4SAndroid Build Coastguard Worker  interix*)
5036*6236dae4SAndroid Build Coastguard Worker    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5037*6236dae4SAndroid Build Coastguard Worker    with_gnu_ld=yes
5038*6236dae4SAndroid Build Coastguard Worker    ;;
5039*6236dae4SAndroid Build Coastguard Worker  openbsd* | bitrig*)
5040*6236dae4SAndroid Build Coastguard Worker    with_gnu_ld=no
5041*6236dae4SAndroid Build Coastguard Worker    ;;
5042*6236dae4SAndroid Build Coastguard Worker  linux* | k*bsd*-gnu | gnu*)
5043*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(link_all_deplibs, $1)=no
5044*6236dae4SAndroid Build Coastguard Worker    ;;
5045*6236dae4SAndroid Build Coastguard Worker  esac
5046*6236dae4SAndroid Build Coastguard Worker
5047*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(ld_shlibs, $1)=yes
5048*6236dae4SAndroid Build Coastguard Worker
5049*6236dae4SAndroid Build Coastguard Worker  # On some targets, GNU ld is compatible enough with the native linker
5050*6236dae4SAndroid Build Coastguard Worker  # that we're better off using the native interface for both.
5051*6236dae4SAndroid Build Coastguard Worker  lt_use_gnu_ld_interface=no
5052*6236dae4SAndroid Build Coastguard Worker  if test yes = "$with_gnu_ld"; then
5053*6236dae4SAndroid Build Coastguard Worker    case $host_os in
5054*6236dae4SAndroid Build Coastguard Worker      aix*)
5055*6236dae4SAndroid Build Coastguard Worker	# The AIX port of GNU ld has always aspired to compatibility
5056*6236dae4SAndroid Build Coastguard Worker	# with the native linker.  However, as the warning in the GNU ld
5057*6236dae4SAndroid Build Coastguard Worker	# block says, versions before 2.19.5* couldn't really create working
5058*6236dae4SAndroid Build Coastguard Worker	# shared libraries, regardless of the interface used.
5059*6236dae4SAndroid Build Coastguard Worker	case `$LD -v 2>&1` in
5060*6236dae4SAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5061*6236dae4SAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5062*6236dae4SAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5063*6236dae4SAndroid Build Coastguard Worker	  *)
5064*6236dae4SAndroid Build Coastguard Worker	    lt_use_gnu_ld_interface=yes
5065*6236dae4SAndroid Build Coastguard Worker	    ;;
5066*6236dae4SAndroid Build Coastguard Worker	esac
5067*6236dae4SAndroid Build Coastguard Worker	;;
5068*6236dae4SAndroid Build Coastguard Worker      *)
5069*6236dae4SAndroid Build Coastguard Worker	lt_use_gnu_ld_interface=yes
5070*6236dae4SAndroid Build Coastguard Worker	;;
5071*6236dae4SAndroid Build Coastguard Worker    esac
5072*6236dae4SAndroid Build Coastguard Worker  fi
5073*6236dae4SAndroid Build Coastguard Worker
5074*6236dae4SAndroid Build Coastguard Worker  if test yes = "$lt_use_gnu_ld_interface"; then
5075*6236dae4SAndroid Build Coastguard Worker    # If archive_cmds runs LD, not CC, wlarc should be empty
5076*6236dae4SAndroid Build Coastguard Worker    wlarc='$wl'
5077*6236dae4SAndroid Build Coastguard Worker
5078*6236dae4SAndroid Build Coastguard Worker    # Set some defaults for GNU ld with shared library support. These
5079*6236dae4SAndroid Build Coastguard Worker    # are reset later if shared libraries are not supported. Putting them
5080*6236dae4SAndroid Build Coastguard Worker    # here allows them to be overridden if necessary.
5081*6236dae4SAndroid Build Coastguard Worker    runpath_var=LD_RUN_PATH
5082*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5083*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5084*6236dae4SAndroid Build Coastguard Worker    # ancient GNU ld didn't support --whole-archive et. al.
5085*6236dae4SAndroid Build Coastguard Worker    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5086*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5087*6236dae4SAndroid Build Coastguard Worker    else
5088*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5089*6236dae4SAndroid Build Coastguard Worker    fi
5090*6236dae4SAndroid Build Coastguard Worker    supports_anon_versioning=no
5091*6236dae4SAndroid Build Coastguard Worker    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5092*6236dae4SAndroid Build Coastguard Worker      *GNU\ gold*) supports_anon_versioning=yes ;;
5093*6236dae4SAndroid Build Coastguard Worker      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5094*6236dae4SAndroid Build Coastguard Worker      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5095*6236dae4SAndroid Build Coastguard Worker      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5096*6236dae4SAndroid Build Coastguard Worker      *\ 2.11.*) ;; # other 2.11 versions
5097*6236dae4SAndroid Build Coastguard Worker      *) supports_anon_versioning=yes ;;
5098*6236dae4SAndroid Build Coastguard Worker    esac
5099*6236dae4SAndroid Build Coastguard Worker
5100*6236dae4SAndroid Build Coastguard Worker    # See if GNU ld supports shared libraries.
5101*6236dae4SAndroid Build Coastguard Worker    case $host_os in
5102*6236dae4SAndroid Build Coastguard Worker    aix[[3-9]]*)
5103*6236dae4SAndroid Build Coastguard Worker      # On AIX/PPC, the GNU linker is very broken
5104*6236dae4SAndroid Build Coastguard Worker      if test ia64 != "$host_cpu"; then
5105*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5106*6236dae4SAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
5107*6236dae4SAndroid Build Coastguard Worker
5108*6236dae4SAndroid Build Coastguard Worker*** Warning: the GNU linker, at least up to release 2.19, is reported
5109*6236dae4SAndroid Build Coastguard Worker*** to be unable to reliably create shared libraries on AIX.
5110*6236dae4SAndroid Build Coastguard Worker*** Therefore, libtool is disabling shared libraries support.  If you
5111*6236dae4SAndroid Build Coastguard Worker*** really care for shared libraries, you may want to install binutils
5112*6236dae4SAndroid Build Coastguard Worker*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5113*6236dae4SAndroid Build Coastguard Worker*** You will then need to restart the configuration process.
5114*6236dae4SAndroid Build Coastguard Worker
5115*6236dae4SAndroid Build Coastguard Worker_LT_EOF
5116*6236dae4SAndroid Build Coastguard Worker      fi
5117*6236dae4SAndroid Build Coastguard Worker      ;;
5118*6236dae4SAndroid Build Coastguard Worker
5119*6236dae4SAndroid Build Coastguard Worker    amigaos*)
5120*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
5121*6236dae4SAndroid Build Coastguard Worker      powerpc)
5122*6236dae4SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
5123*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5124*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5125*6236dae4SAndroid Build Coastguard Worker        ;;
5126*6236dae4SAndroid Build Coastguard Worker      m68k)
5127*6236dae4SAndroid 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)'
5128*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5129*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5130*6236dae4SAndroid Build Coastguard Worker        ;;
5131*6236dae4SAndroid Build Coastguard Worker      esac
5132*6236dae4SAndroid Build Coastguard Worker      ;;
5133*6236dae4SAndroid Build Coastguard Worker
5134*6236dae4SAndroid Build Coastguard Worker    beos*)
5135*6236dae4SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5136*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5137*6236dae4SAndroid Build Coastguard Worker	# Joseph Beckenbach <[email protected]> says some releases of gcc
5138*6236dae4SAndroid Build Coastguard Worker	# support --undefined.  This deserves some investigation.  FIXME
5139*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5140*6236dae4SAndroid Build Coastguard Worker      else
5141*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5142*6236dae4SAndroid Build Coastguard Worker      fi
5143*6236dae4SAndroid Build Coastguard Worker      ;;
5144*6236dae4SAndroid Build Coastguard Worker
5145*6236dae4SAndroid Build Coastguard Worker    cygwin* | mingw* | pw32* | cegcc*)
5146*6236dae4SAndroid Build Coastguard Worker      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5147*6236dae4SAndroid Build Coastguard Worker      # as there is no search path for DLLs.
5148*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5149*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5150*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5151*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=no
5152*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5153*6236dae4SAndroid 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'
5154*6236dae4SAndroid 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']
5155*6236dae4SAndroid Build Coastguard Worker
5156*6236dae4SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5157*6236dae4SAndroid 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'
5158*6236dae4SAndroid Build Coastguard Worker	# If the export-symbols file already is a .def file, use it as
5159*6236dae4SAndroid Build Coastguard Worker	# is; otherwise, prepend EXPORTS...
5160*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5161*6236dae4SAndroid Build Coastguard Worker          cp $export_symbols $output_objdir/$soname.def;
5162*6236dae4SAndroid Build Coastguard Worker        else
5163*6236dae4SAndroid Build Coastguard Worker          echo EXPORTS > $output_objdir/$soname.def;
5164*6236dae4SAndroid Build Coastguard Worker          cat $export_symbols >> $output_objdir/$soname.def;
5165*6236dae4SAndroid Build Coastguard Worker        fi~
5166*6236dae4SAndroid 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'
5167*6236dae4SAndroid Build Coastguard Worker      else
5168*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5169*6236dae4SAndroid Build Coastguard Worker      fi
5170*6236dae4SAndroid Build Coastguard Worker      ;;
5171*6236dae4SAndroid Build Coastguard Worker
5172*6236dae4SAndroid Build Coastguard Worker    haiku*)
5173*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5174*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5175*6236dae4SAndroid Build Coastguard Worker      ;;
5176*6236dae4SAndroid Build Coastguard Worker
5177*6236dae4SAndroid Build Coastguard Worker    os2*)
5178*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5179*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5180*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5181*6236dae4SAndroid Build Coastguard Worker      shrext_cmds=.dll
5182*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5183*6236dae4SAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5184*6236dae4SAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5185*6236dae4SAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5186*6236dae4SAndroid Build Coastguard Worker	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5187*6236dae4SAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5188*6236dae4SAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5189*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5190*6236dae4SAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5191*6236dae4SAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5192*6236dae4SAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5193*6236dae4SAndroid Build Coastguard Worker	prefix_cmds="$SED"~
5194*6236dae4SAndroid Build Coastguard Worker	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5195*6236dae4SAndroid Build Coastguard Worker	  prefix_cmds="$prefix_cmds -e 1d";
5196*6236dae4SAndroid Build Coastguard Worker	fi~
5197*6236dae4SAndroid Build Coastguard Worker	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5198*6236dae4SAndroid Build Coastguard Worker	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5199*6236dae4SAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5200*6236dae4SAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5201*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5202*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5203*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='@'
5204*6236dae4SAndroid Build Coastguard Worker      ;;
5205*6236dae4SAndroid Build Coastguard Worker
5206*6236dae4SAndroid Build Coastguard Worker    interix[[3-9]]*)
5207*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=no
5208*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5209*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5210*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5211*6236dae4SAndroid Build Coastguard Worker      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5212*6236dae4SAndroid Build Coastguard Worker      # Instead, shared libraries are loaded at an image base (0x10000000 by
5213*6236dae4SAndroid Build Coastguard Worker      # default) and relocated if they conflict, which is a slow very memory
5214*6236dae4SAndroid Build Coastguard Worker      # consuming and fragmenting process.  To avoid this, we pick a random,
5215*6236dae4SAndroid Build Coastguard Worker      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5216*6236dae4SAndroid Build Coastguard Worker      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5217*6236dae4SAndroid 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'
5218*6236dae4SAndroid 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'
5219*6236dae4SAndroid Build Coastguard Worker      ;;
5220*6236dae4SAndroid Build Coastguard Worker
5221*6236dae4SAndroid Build Coastguard Worker    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5222*6236dae4SAndroid Build Coastguard Worker      tmp_diet=no
5223*6236dae4SAndroid Build Coastguard Worker      if test linux-dietlibc = "$host_os"; then
5224*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
5225*6236dae4SAndroid Build Coastguard Worker	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5226*6236dae4SAndroid Build Coastguard Worker	esac
5227*6236dae4SAndroid Build Coastguard Worker      fi
5228*6236dae4SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5229*6236dae4SAndroid Build Coastguard Worker	 && test no = "$tmp_diet"
5230*6236dae4SAndroid Build Coastguard Worker      then
5231*6236dae4SAndroid Build Coastguard Worker	tmp_addflag=' $pic_flag'
5232*6236dae4SAndroid Build Coastguard Worker	tmp_sharedflag='-shared'
5233*6236dae4SAndroid Build Coastguard Worker	case $cc_basename,$host_cpu in
5234*6236dae4SAndroid Build Coastguard Worker        pgcc*)				# Portland Group C compiler
5235*6236dae4SAndroid 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'
5236*6236dae4SAndroid Build Coastguard Worker	  tmp_addflag=' $pic_flag'
5237*6236dae4SAndroid Build Coastguard Worker	  ;;
5238*6236dae4SAndroid Build Coastguard Worker	pgf77* | pgf90* | pgf95* | pgfortran*)
5239*6236dae4SAndroid Build Coastguard Worker					# Portland Group f77 and f90 compilers
5240*6236dae4SAndroid 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'
5241*6236dae4SAndroid Build Coastguard Worker	  tmp_addflag=' $pic_flag -Mnomain' ;;
5242*6236dae4SAndroid Build Coastguard Worker	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5243*6236dae4SAndroid Build Coastguard Worker	  tmp_addflag=' -i_dynamic' ;;
5244*6236dae4SAndroid Build Coastguard Worker	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5245*6236dae4SAndroid Build Coastguard Worker	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5246*6236dae4SAndroid Build Coastguard Worker	ifc* | ifort*)			# Intel Fortran compiler
5247*6236dae4SAndroid Build Coastguard Worker	  tmp_addflag=' -nofor_main' ;;
5248*6236dae4SAndroid Build Coastguard Worker	lf95*)				# Lahey Fortran 8.1
5249*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5250*6236dae4SAndroid Build Coastguard Worker	  tmp_sharedflag='--shared' ;;
5251*6236dae4SAndroid Build Coastguard Worker        nagfor*)                        # NAGFOR 5.3
5252*6236dae4SAndroid Build Coastguard Worker          tmp_sharedflag='-Wl,-shared' ;;
5253*6236dae4SAndroid Build Coastguard Worker	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5254*6236dae4SAndroid Build Coastguard Worker	  tmp_sharedflag='-qmkshrobj'
5255*6236dae4SAndroid Build Coastguard Worker	  tmp_addflag= ;;
5256*6236dae4SAndroid Build Coastguard Worker	nvcc*)	# Cuda Compiler Driver 2.2
5257*6236dae4SAndroid 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'
5258*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5259*6236dae4SAndroid Build Coastguard Worker	  ;;
5260*6236dae4SAndroid Build Coastguard Worker	esac
5261*6236dae4SAndroid Build Coastguard Worker	case `$CC -V 2>&1 | $SED 5q` in
5262*6236dae4SAndroid Build Coastguard Worker	*Sun\ C*)			# Sun C 5.9
5263*6236dae4SAndroid 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'
5264*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5265*6236dae4SAndroid Build Coastguard Worker	  tmp_sharedflag='-G' ;;
5266*6236dae4SAndroid Build Coastguard Worker	*Sun\ F*)			# Sun Fortran 8.3
5267*6236dae4SAndroid Build Coastguard Worker	  tmp_sharedflag='-G' ;;
5268*6236dae4SAndroid Build Coastguard Worker	esac
5269*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5270*6236dae4SAndroid Build Coastguard Worker
5271*6236dae4SAndroid Build Coastguard Worker        if test yes = "$supports_anon_versioning"; then
5272*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5273*6236dae4SAndroid Build Coastguard Worker            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5274*6236dae4SAndroid Build Coastguard Worker            echo "local: *; };" >> $output_objdir/$libname.ver~
5275*6236dae4SAndroid 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'
5276*6236dae4SAndroid Build Coastguard Worker        fi
5277*6236dae4SAndroid Build Coastguard Worker
5278*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
5279*6236dae4SAndroid Build Coastguard Worker	tcc*)
5280*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5281*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5282*6236dae4SAndroid Build Coastguard Worker	  ;;
5283*6236dae4SAndroid Build Coastguard Worker	xlf* | bgf* | bgxlf* | mpixlf*)
5284*6236dae4SAndroid Build Coastguard Worker	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5285*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5286*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5287*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5288*6236dae4SAndroid Build Coastguard Worker	  if test yes = "$supports_anon_versioning"; then
5289*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5290*6236dae4SAndroid Build Coastguard Worker              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5291*6236dae4SAndroid Build Coastguard Worker              echo "local: *; };" >> $output_objdir/$libname.ver~
5292*6236dae4SAndroid Build Coastguard Worker              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5293*6236dae4SAndroid Build Coastguard Worker	  fi
5294*6236dae4SAndroid Build Coastguard Worker	  ;;
5295*6236dae4SAndroid Build Coastguard Worker	esac
5296*6236dae4SAndroid Build Coastguard Worker      else
5297*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
5298*6236dae4SAndroid Build Coastguard Worker      fi
5299*6236dae4SAndroid Build Coastguard Worker      ;;
5300*6236dae4SAndroid Build Coastguard Worker
5301*6236dae4SAndroid Build Coastguard Worker    netbsd* | netbsdelf*-gnu)
5302*6236dae4SAndroid Build Coastguard Worker      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5303*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5304*6236dae4SAndroid Build Coastguard Worker	wlarc=
5305*6236dae4SAndroid Build Coastguard Worker      else
5306*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5307*6236dae4SAndroid 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'
5308*6236dae4SAndroid Build Coastguard Worker      fi
5309*6236dae4SAndroid Build Coastguard Worker      ;;
5310*6236dae4SAndroid Build Coastguard Worker
5311*6236dae4SAndroid Build Coastguard Worker    solaris*)
5312*6236dae4SAndroid Build Coastguard Worker      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5313*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5314*6236dae4SAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
5315*6236dae4SAndroid Build Coastguard Worker
5316*6236dae4SAndroid Build Coastguard Worker*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5317*6236dae4SAndroid Build Coastguard Worker*** create shared libraries on Solaris systems.  Therefore, libtool
5318*6236dae4SAndroid Build Coastguard Worker*** is disabling shared libraries support.  We urge you to upgrade GNU
5319*6236dae4SAndroid Build Coastguard Worker*** binutils to release 2.9.1 or newer.  Another option is to modify
5320*6236dae4SAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is
5321*6236dae4SAndroid Build Coastguard Worker*** used, and then restart.
5322*6236dae4SAndroid Build Coastguard Worker
5323*6236dae4SAndroid Build Coastguard Worker_LT_EOF
5324*6236dae4SAndroid Build Coastguard Worker      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5325*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5326*6236dae4SAndroid 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'
5327*6236dae4SAndroid Build Coastguard Worker      else
5328*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5329*6236dae4SAndroid Build Coastguard Worker      fi
5330*6236dae4SAndroid Build Coastguard Worker      ;;
5331*6236dae4SAndroid Build Coastguard Worker
5332*6236dae4SAndroid Build Coastguard Worker    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5333*6236dae4SAndroid Build Coastguard Worker      case `$LD -v 2>&1` in
5334*6236dae4SAndroid Build Coastguard Worker        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5335*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5336*6236dae4SAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
5337*6236dae4SAndroid Build Coastguard Worker
5338*6236dae4SAndroid Build Coastguard Worker*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5339*6236dae4SAndroid Build Coastguard Worker*** reliably create shared libraries on SCO systems.  Therefore, libtool
5340*6236dae4SAndroid Build Coastguard Worker*** is disabling shared libraries support.  We urge you to upgrade GNU
5341*6236dae4SAndroid Build Coastguard Worker*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5342*6236dae4SAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is
5343*6236dae4SAndroid Build Coastguard Worker*** used, and then restart.
5344*6236dae4SAndroid Build Coastguard Worker
5345*6236dae4SAndroid Build Coastguard Worker_LT_EOF
5346*6236dae4SAndroid Build Coastguard Worker	;;
5347*6236dae4SAndroid Build Coastguard Worker	*)
5348*6236dae4SAndroid Build Coastguard Worker	  # For security reasons, it is highly recommended that you always
5349*6236dae4SAndroid Build Coastguard Worker	  # use absolute paths for naming shared libraries, and exclude the
5350*6236dae4SAndroid Build Coastguard Worker	  # DT_RUNPATH tag from executables and libraries.  But doing so
5351*6236dae4SAndroid Build Coastguard Worker	  # requires that you compile everything twice, which is a pain.
5352*6236dae4SAndroid Build Coastguard Worker	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5353*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5354*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5355*6236dae4SAndroid 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'
5356*6236dae4SAndroid Build Coastguard Worker	  else
5357*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
5358*6236dae4SAndroid Build Coastguard Worker	  fi
5359*6236dae4SAndroid Build Coastguard Worker	;;
5360*6236dae4SAndroid Build Coastguard Worker      esac
5361*6236dae4SAndroid Build Coastguard Worker      ;;
5362*6236dae4SAndroid Build Coastguard Worker
5363*6236dae4SAndroid Build Coastguard Worker    sunos4*)
5364*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5365*6236dae4SAndroid Build Coastguard Worker      wlarc=
5366*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5367*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5368*6236dae4SAndroid Build Coastguard Worker      ;;
5369*6236dae4SAndroid Build Coastguard Worker
5370*6236dae4SAndroid Build Coastguard Worker    *)
5371*6236dae4SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5372*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5373*6236dae4SAndroid 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'
5374*6236dae4SAndroid Build Coastguard Worker      else
5375*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5376*6236dae4SAndroid Build Coastguard Worker      fi
5377*6236dae4SAndroid Build Coastguard Worker      ;;
5378*6236dae4SAndroid Build Coastguard Worker    esac
5379*6236dae4SAndroid Build Coastguard Worker
5380*6236dae4SAndroid Build Coastguard Worker    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5381*6236dae4SAndroid Build Coastguard Worker      runpath_var=
5382*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5383*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5384*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5385*6236dae4SAndroid Build Coastguard Worker    fi
5386*6236dae4SAndroid Build Coastguard Worker  else
5387*6236dae4SAndroid Build Coastguard Worker    # PORTME fill in a description of your system's linker (not GNU ld)
5388*6236dae4SAndroid Build Coastguard Worker    case $host_os in
5389*6236dae4SAndroid Build Coastguard Worker    aix3*)
5390*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5391*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=yes
5392*6236dae4SAndroid 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'
5393*6236dae4SAndroid Build Coastguard Worker      # Note: this linker hardcodes the directories in LIBPATH if there
5394*6236dae4SAndroid Build Coastguard Worker      # are no directories specified by -L.
5395*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5396*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5397*6236dae4SAndroid Build Coastguard Worker	# Neither direct hardcoding nor static linking is supported with a
5398*6236dae4SAndroid Build Coastguard Worker	# broken collect2.
5399*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5400*6236dae4SAndroid Build Coastguard Worker      fi
5401*6236dae4SAndroid Build Coastguard Worker      ;;
5402*6236dae4SAndroid Build Coastguard Worker
5403*6236dae4SAndroid Build Coastguard Worker    aix[[4-9]]*)
5404*6236dae4SAndroid Build Coastguard Worker      if test ia64 = "$host_cpu"; then
5405*6236dae4SAndroid Build Coastguard Worker	# On IA64, the linker does run time linking by default, so we don't
5406*6236dae4SAndroid Build Coastguard Worker	# have to do anything special.
5407*6236dae4SAndroid Build Coastguard Worker	aix_use_runtimelinking=no
5408*6236dae4SAndroid Build Coastguard Worker	exp_sym_flag='-Bexport'
5409*6236dae4SAndroid Build Coastguard Worker	no_entry_flag=
5410*6236dae4SAndroid Build Coastguard Worker      else
5411*6236dae4SAndroid Build Coastguard Worker	# If we're using GNU nm, then we don't want the "-C" option.
5412*6236dae4SAndroid Build Coastguard Worker	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5413*6236dae4SAndroid Build Coastguard Worker	# Without the "-l" option, or with the "-B" option, AIX nm treats
5414*6236dae4SAndroid Build Coastguard Worker	# weak defined symbols like other global defined symbols, whereas
5415*6236dae4SAndroid Build Coastguard Worker	# GNU nm marks them as "W".
5416*6236dae4SAndroid Build Coastguard Worker	# While the 'weak' keyword is ignored in the Export File, we need
5417*6236dae4SAndroid Build Coastguard Worker	# it in the Import File for the 'aix-soname' feature, so we have
5418*6236dae4SAndroid Build Coastguard Worker	# to replace the "-B" option with "-P" for AIX nm.
5419*6236dae4SAndroid Build Coastguard Worker	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5420*6236dae4SAndroid 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'
5421*6236dae4SAndroid Build Coastguard Worker	else
5422*6236dae4SAndroid 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'
5423*6236dae4SAndroid Build Coastguard Worker	fi
5424*6236dae4SAndroid Build Coastguard Worker	aix_use_runtimelinking=no
5425*6236dae4SAndroid Build Coastguard Worker
5426*6236dae4SAndroid Build Coastguard Worker	# Test if we are trying to use run time linking or normal
5427*6236dae4SAndroid Build Coastguard Worker	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5428*6236dae4SAndroid Build Coastguard Worker	# have runtime linking enabled, and use it for executables.
5429*6236dae4SAndroid Build Coastguard Worker	# For shared libraries, we enable/disable runtime linking
5430*6236dae4SAndroid Build Coastguard Worker	# depending on the kind of the shared library created -
5431*6236dae4SAndroid Build Coastguard Worker	# when "with_aix_soname,aix_use_runtimelinking" is:
5432*6236dae4SAndroid Build Coastguard Worker	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5433*6236dae4SAndroid Build Coastguard Worker	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5434*6236dae4SAndroid Build Coastguard Worker	#            lib.a           static archive
5435*6236dae4SAndroid Build Coastguard Worker	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5436*6236dae4SAndroid Build Coastguard Worker	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5437*6236dae4SAndroid Build Coastguard Worker	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5438*6236dae4SAndroid Build Coastguard Worker	#            lib.a(lib.so.V) shared, rtl:no
5439*6236dae4SAndroid Build Coastguard Worker	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5440*6236dae4SAndroid Build Coastguard Worker	#            lib.a           static archive
5441*6236dae4SAndroid Build Coastguard Worker	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5442*6236dae4SAndroid Build Coastguard Worker	  for ld_flag in $LDFLAGS; do
5443*6236dae4SAndroid Build Coastguard Worker	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5444*6236dae4SAndroid Build Coastguard Worker	    aix_use_runtimelinking=yes
5445*6236dae4SAndroid Build Coastguard Worker	    break
5446*6236dae4SAndroid Build Coastguard Worker	  fi
5447*6236dae4SAndroid Build Coastguard Worker	  done
5448*6236dae4SAndroid Build Coastguard Worker	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5449*6236dae4SAndroid Build Coastguard Worker	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5450*6236dae4SAndroid Build Coastguard Worker	    # so we don't have lib.a shared libs to link our executables.
5451*6236dae4SAndroid Build Coastguard Worker	    # We have to force runtime linking in this case.
5452*6236dae4SAndroid Build Coastguard Worker	    aix_use_runtimelinking=yes
5453*6236dae4SAndroid Build Coastguard Worker	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5454*6236dae4SAndroid Build Coastguard Worker	  fi
5455*6236dae4SAndroid Build Coastguard Worker	  ;;
5456*6236dae4SAndroid Build Coastguard Worker	esac
5457*6236dae4SAndroid Build Coastguard Worker
5458*6236dae4SAndroid Build Coastguard Worker	exp_sym_flag='-bexport'
5459*6236dae4SAndroid Build Coastguard Worker	no_entry_flag='-bnoentry'
5460*6236dae4SAndroid Build Coastguard Worker      fi
5461*6236dae4SAndroid Build Coastguard Worker
5462*6236dae4SAndroid Build Coastguard Worker      # When large executables or shared objects are built, AIX ld can
5463*6236dae4SAndroid Build Coastguard Worker      # have problems creating the table of contents.  If linking a library
5464*6236dae4SAndroid Build Coastguard Worker      # or program results in "error TOC overflow" add -mminimal-toc to
5465*6236dae4SAndroid Build Coastguard Worker      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5466*6236dae4SAndroid Build Coastguard Worker      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5467*6236dae4SAndroid Build Coastguard Worker
5468*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)=''
5469*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5470*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5471*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5472*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5473*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5474*6236dae4SAndroid Build Coastguard Worker      case $with_aix_soname,$aix_use_runtimelinking in
5475*6236dae4SAndroid Build Coastguard Worker      aix,*) ;; # traditional, no import file
5476*6236dae4SAndroid Build Coastguard Worker      svr4,* | *,yes) # use import file
5477*6236dae4SAndroid Build Coastguard Worker	# The Import File defines what to hardcode.
5478*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=no
5479*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5480*6236dae4SAndroid Build Coastguard Worker	;;
5481*6236dae4SAndroid Build Coastguard Worker      esac
5482*6236dae4SAndroid Build Coastguard Worker
5483*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5484*6236dae4SAndroid Build Coastguard Worker	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5485*6236dae4SAndroid Build Coastguard Worker	# We only want to do this on AIX 4.2 and lower, the check
5486*6236dae4SAndroid Build Coastguard Worker	# below for broken collect2 doesn't work under 4.3+
5487*6236dae4SAndroid Build Coastguard Worker	  collect2name=`$CC -print-prog-name=collect2`
5488*6236dae4SAndroid Build Coastguard Worker	  if test -f "$collect2name" &&
5489*6236dae4SAndroid Build Coastguard Worker	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5490*6236dae4SAndroid Build Coastguard Worker	  then
5491*6236dae4SAndroid Build Coastguard Worker	  # We have reworked collect2
5492*6236dae4SAndroid Build Coastguard Worker	  :
5493*6236dae4SAndroid Build Coastguard Worker	  else
5494*6236dae4SAndroid Build Coastguard Worker	  # We have old collect2
5495*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5496*6236dae4SAndroid Build Coastguard Worker	  # It fails to find uninstalled libraries when the uninstalled
5497*6236dae4SAndroid Build Coastguard Worker	  # path is not listed in the libpath.  Setting hardcode_minus_L
5498*6236dae4SAndroid Build Coastguard Worker	  # to unsupported forces relinking
5499*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5500*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5501*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5502*6236dae4SAndroid Build Coastguard Worker	  fi
5503*6236dae4SAndroid Build Coastguard Worker	  ;;
5504*6236dae4SAndroid Build Coastguard Worker	esac
5505*6236dae4SAndroid Build Coastguard Worker	shared_flag='-shared'
5506*6236dae4SAndroid Build Coastguard Worker	if test yes = "$aix_use_runtimelinking"; then
5507*6236dae4SAndroid Build Coastguard Worker	  shared_flag="$shared_flag "'$wl-G'
5508*6236dae4SAndroid Build Coastguard Worker	fi
5509*6236dae4SAndroid Build Coastguard Worker	# Need to ensure runtime linking is disabled for the traditional
5510*6236dae4SAndroid Build Coastguard Worker	# shared library, or the linker may eventually find shared libraries
5511*6236dae4SAndroid Build Coastguard Worker	# /with/ Import File - we do not want to mix them.
5512*6236dae4SAndroid Build Coastguard Worker	shared_flag_aix='-shared'
5513*6236dae4SAndroid Build Coastguard Worker	shared_flag_svr4='-shared $wl-G'
5514*6236dae4SAndroid Build Coastguard Worker      else
5515*6236dae4SAndroid Build Coastguard Worker	# not using gcc
5516*6236dae4SAndroid Build Coastguard Worker	if test ia64 = "$host_cpu"; then
5517*6236dae4SAndroid Build Coastguard Worker	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5518*6236dae4SAndroid Build Coastguard Worker	# chokes on -Wl,-G. The following line is correct:
5519*6236dae4SAndroid Build Coastguard Worker	  shared_flag='-G'
5520*6236dae4SAndroid Build Coastguard Worker	else
5521*6236dae4SAndroid Build Coastguard Worker	  if test yes = "$aix_use_runtimelinking"; then
5522*6236dae4SAndroid Build Coastguard Worker	    shared_flag='$wl-G'
5523*6236dae4SAndroid Build Coastguard Worker	  else
5524*6236dae4SAndroid Build Coastguard Worker	    shared_flag='$wl-bM:SRE'
5525*6236dae4SAndroid Build Coastguard Worker	  fi
5526*6236dae4SAndroid Build Coastguard Worker	  shared_flag_aix='$wl-bM:SRE'
5527*6236dae4SAndroid Build Coastguard Worker	  shared_flag_svr4='$wl-G'
5528*6236dae4SAndroid Build Coastguard Worker	fi
5529*6236dae4SAndroid Build Coastguard Worker      fi
5530*6236dae4SAndroid Build Coastguard Worker
5531*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5532*6236dae4SAndroid Build Coastguard Worker      # It seems that -bexpall does not export symbols beginning with
5533*6236dae4SAndroid Build Coastguard Worker      # underscore (_), so it is better to generate a list of symbols to export.
5534*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=yes
5535*6236dae4SAndroid Build Coastguard Worker      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5536*6236dae4SAndroid Build Coastguard Worker	# Warning - without using the other runtime loading flags (-brtl),
5537*6236dae4SAndroid Build Coastguard Worker	# -berok will link without error, but may produce a broken library.
5538*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5539*6236dae4SAndroid Build Coastguard Worker        # Determine the default libpath from the value encoded in an
5540*6236dae4SAndroid Build Coastguard Worker        # empty executable.
5541*6236dae4SAndroid Build Coastguard Worker        _LT_SYS_MODULE_PATH_AIX([$1])
5542*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5543*6236dae4SAndroid 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
5544*6236dae4SAndroid Build Coastguard Worker      else
5545*6236dae4SAndroid Build Coastguard Worker	if test ia64 = "$host_cpu"; then
5546*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5547*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5548*6236dae4SAndroid 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"
5549*6236dae4SAndroid Build Coastguard Worker	else
5550*6236dae4SAndroid Build Coastguard Worker	 # Determine the default libpath from the value encoded in an
5551*6236dae4SAndroid Build Coastguard Worker	 # empty executable.
5552*6236dae4SAndroid Build Coastguard Worker	 _LT_SYS_MODULE_PATH_AIX([$1])
5553*6236dae4SAndroid Build Coastguard Worker	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5554*6236dae4SAndroid Build Coastguard Worker	  # Warning - without using the other run time loading flags,
5555*6236dae4SAndroid Build Coastguard Worker	  # -berok will link without error, but may produce a broken library.
5556*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5557*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5558*6236dae4SAndroid Build Coastguard Worker	  if test yes = "$with_gnu_ld"; then
5559*6236dae4SAndroid Build Coastguard Worker	    # We only use this code for GNU lds that support --whole-archive.
5560*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5561*6236dae4SAndroid Build Coastguard Worker	  else
5562*6236dae4SAndroid Build Coastguard Worker	    # Exported symbols can be pulled into shared objects from archives
5563*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5564*6236dae4SAndroid Build Coastguard Worker	  fi
5565*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5566*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5567*6236dae4SAndroid Build Coastguard Worker	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5568*6236dae4SAndroid Build Coastguard Worker	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5569*6236dae4SAndroid Build Coastguard Worker	  if test svr4 != "$with_aix_soname"; then
5570*6236dae4SAndroid Build Coastguard Worker	    # This is similar to how AIX traditionally builds its shared libraries.
5571*6236dae4SAndroid 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'
5572*6236dae4SAndroid Build Coastguard Worker	  fi
5573*6236dae4SAndroid Build Coastguard Worker	  if test aix != "$with_aix_soname"; then
5574*6236dae4SAndroid 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'
5575*6236dae4SAndroid Build Coastguard Worker	  else
5576*6236dae4SAndroid Build Coastguard Worker	    # used by -dlpreopen to get the symbols
5577*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5578*6236dae4SAndroid Build Coastguard Worker	  fi
5579*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5580*6236dae4SAndroid Build Coastguard Worker	fi
5581*6236dae4SAndroid Build Coastguard Worker      fi
5582*6236dae4SAndroid Build Coastguard Worker      ;;
5583*6236dae4SAndroid Build Coastguard Worker
5584*6236dae4SAndroid Build Coastguard Worker    amigaos*)
5585*6236dae4SAndroid Build Coastguard Worker      case $host_cpu in
5586*6236dae4SAndroid Build Coastguard Worker      powerpc)
5587*6236dae4SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
5588*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5589*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5590*6236dae4SAndroid Build Coastguard Worker        ;;
5591*6236dae4SAndroid Build Coastguard Worker      m68k)
5592*6236dae4SAndroid 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)'
5593*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5594*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5595*6236dae4SAndroid Build Coastguard Worker        ;;
5596*6236dae4SAndroid Build Coastguard Worker      esac
5597*6236dae4SAndroid Build Coastguard Worker      ;;
5598*6236dae4SAndroid Build Coastguard Worker
5599*6236dae4SAndroid Build Coastguard Worker    bsdi[[45]]*)
5600*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5601*6236dae4SAndroid Build Coastguard Worker      ;;
5602*6236dae4SAndroid Build Coastguard Worker
5603*6236dae4SAndroid Build Coastguard Worker    cygwin* | mingw* | pw32* | cegcc*)
5604*6236dae4SAndroid Build Coastguard Worker      # When not using gcc, we currently assume that we are using
5605*6236dae4SAndroid Build Coastguard Worker      # Microsoft Visual C++ or Intel C++ Compiler.
5606*6236dae4SAndroid Build Coastguard Worker      # hardcode_libdir_flag_spec is actually meaningless, as there is
5607*6236dae4SAndroid Build Coastguard Worker      # no search path for DLLs.
5608*6236dae4SAndroid Build Coastguard Worker      case $cc_basename in
5609*6236dae4SAndroid Build Coastguard Worker      cl* | icl*)
5610*6236dae4SAndroid Build Coastguard Worker	# Native MSVC or ICC
5611*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5612*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5613*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(always_export_symbols, $1)=yes
5614*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(file_list_spec, $1)='@'
5615*6236dae4SAndroid Build Coastguard Worker	# Tell ltmain to make .lib files, not .a files.
5616*6236dae4SAndroid Build Coastguard Worker	libext=lib
5617*6236dae4SAndroid Build Coastguard Worker	# Tell ltmain to make .dll files, not .so files.
5618*6236dae4SAndroid Build Coastguard Worker	shrext_cmds=.dll
5619*6236dae4SAndroid Build Coastguard Worker	# FIXME: Setting linknames here is a bad hack.
5620*6236dae4SAndroid 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='
5621*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5622*6236dae4SAndroid Build Coastguard Worker            cp "$export_symbols" "$output_objdir/$soname.def";
5623*6236dae4SAndroid Build Coastguard Worker            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5624*6236dae4SAndroid Build Coastguard Worker          else
5625*6236dae4SAndroid Build Coastguard Worker            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5626*6236dae4SAndroid Build Coastguard Worker          fi~
5627*6236dae4SAndroid 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"~
5628*6236dae4SAndroid Build Coastguard Worker          linknames='
5629*6236dae4SAndroid Build Coastguard Worker	# The linker will not automatically build a static lib if we build a DLL.
5630*6236dae4SAndroid Build Coastguard Worker	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5631*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5632*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5633*6236dae4SAndroid 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'
5634*6236dae4SAndroid Build Coastguard Worker	# Don't use ranlib
5635*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5636*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5637*6236dae4SAndroid Build Coastguard Worker          lt_tool_outputfile="@TOOL_OUTPUT@"~
5638*6236dae4SAndroid Build Coastguard Worker          case $lt_outputfile in
5639*6236dae4SAndroid Build Coastguard Worker            *.exe|*.EXE) ;;
5640*6236dae4SAndroid Build Coastguard Worker            *)
5641*6236dae4SAndroid Build Coastguard Worker              lt_outputfile=$lt_outputfile.exe
5642*6236dae4SAndroid Build Coastguard Worker              lt_tool_outputfile=$lt_tool_outputfile.exe
5643*6236dae4SAndroid Build Coastguard Worker              ;;
5644*6236dae4SAndroid Build Coastguard Worker          esac~
5645*6236dae4SAndroid Build Coastguard Worker          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5646*6236dae4SAndroid Build Coastguard Worker            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5647*6236dae4SAndroid Build Coastguard Worker            $RM "$lt_outputfile.manifest";
5648*6236dae4SAndroid Build Coastguard Worker          fi'
5649*6236dae4SAndroid Build Coastguard Worker	;;
5650*6236dae4SAndroid Build Coastguard Worker      *)
5651*6236dae4SAndroid Build Coastguard Worker	# Assume MSVC and ICC wrapper
5652*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5653*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5654*6236dae4SAndroid Build Coastguard Worker	# Tell ltmain to make .lib files, not .a files.
5655*6236dae4SAndroid Build Coastguard Worker	libext=lib
5656*6236dae4SAndroid Build Coastguard Worker	# Tell ltmain to make .dll files, not .so files.
5657*6236dae4SAndroid Build Coastguard Worker	shrext_cmds=.dll
5658*6236dae4SAndroid Build Coastguard Worker	# FIXME: Setting linknames here is a bad hack.
5659*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5660*6236dae4SAndroid Build Coastguard Worker	# The linker will automatically build a .lib file if we build a DLL.
5661*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5662*6236dae4SAndroid Build Coastguard Worker	# FIXME: Should let the user specify the lib program.
5663*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5664*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5665*6236dae4SAndroid Build Coastguard Worker	;;
5666*6236dae4SAndroid Build Coastguard Worker      esac
5667*6236dae4SAndroid Build Coastguard Worker      ;;
5668*6236dae4SAndroid Build Coastguard Worker
5669*6236dae4SAndroid Build Coastguard Worker    darwin* | rhapsody*)
5670*6236dae4SAndroid Build Coastguard Worker      _LT_DARWIN_LINKER_FEATURES($1)
5671*6236dae4SAndroid Build Coastguard Worker      ;;
5672*6236dae4SAndroid Build Coastguard Worker
5673*6236dae4SAndroid Build Coastguard Worker    dgux*)
5674*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5675*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5676*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5677*6236dae4SAndroid Build Coastguard Worker      ;;
5678*6236dae4SAndroid Build Coastguard Worker
5679*6236dae4SAndroid Build Coastguard Worker    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5680*6236dae4SAndroid Build Coastguard Worker    # support.  Future versions do this automatically, but an explicit c++rt0.o
5681*6236dae4SAndroid Build Coastguard Worker    # does not break anything, and helps significantly (at the cost of a little
5682*6236dae4SAndroid Build Coastguard Worker    # extra space).
5683*6236dae4SAndroid Build Coastguard Worker    freebsd2.2*)
5684*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5685*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5686*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5687*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5688*6236dae4SAndroid Build Coastguard Worker      ;;
5689*6236dae4SAndroid Build Coastguard Worker
5690*6236dae4SAndroid Build Coastguard Worker    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5691*6236dae4SAndroid Build Coastguard Worker    freebsd2.*)
5692*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5693*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5694*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5695*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5696*6236dae4SAndroid Build Coastguard Worker      ;;
5697*6236dae4SAndroid Build Coastguard Worker
5698*6236dae4SAndroid Build Coastguard Worker    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5699*6236dae4SAndroid Build Coastguard Worker    freebsd* | dragonfly* | midnightbsd*)
5700*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5701*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5702*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5703*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5704*6236dae4SAndroid Build Coastguard Worker      ;;
5705*6236dae4SAndroid Build Coastguard Worker
5706*6236dae4SAndroid Build Coastguard Worker    hpux9*)
5707*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5708*6236dae4SAndroid 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'
5709*6236dae4SAndroid Build Coastguard Worker      else
5710*6236dae4SAndroid 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'
5711*6236dae4SAndroid Build Coastguard Worker      fi
5712*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5713*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5714*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5715*6236dae4SAndroid Build Coastguard Worker
5716*6236dae4SAndroid Build Coastguard Worker      # hardcode_minus_L: Not really in the search PATH,
5717*6236dae4SAndroid Build Coastguard Worker      # but as the default location of the library.
5718*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5719*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5720*6236dae4SAndroid Build Coastguard Worker      ;;
5721*6236dae4SAndroid Build Coastguard Worker
5722*6236dae4SAndroid Build Coastguard Worker    hpux10*)
5723*6236dae4SAndroid Build Coastguard Worker      if test yes,no = "$GCC,$with_gnu_ld"; then
5724*6236dae4SAndroid 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'
5725*6236dae4SAndroid Build Coastguard Worker      else
5726*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5727*6236dae4SAndroid Build Coastguard Worker      fi
5728*6236dae4SAndroid Build Coastguard Worker      if test no = "$with_gnu_ld"; then
5729*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5730*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5731*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=yes
5732*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5733*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5734*6236dae4SAndroid Build Coastguard Worker	# hardcode_minus_L: Not really in the search PATH,
5735*6236dae4SAndroid Build Coastguard Worker	# but as the default location of the library.
5736*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5737*6236dae4SAndroid Build Coastguard Worker      fi
5738*6236dae4SAndroid Build Coastguard Worker      ;;
5739*6236dae4SAndroid Build Coastguard Worker
5740*6236dae4SAndroid Build Coastguard Worker    hpux11*)
5741*6236dae4SAndroid Build Coastguard Worker      if test yes,no = "$GCC,$with_gnu_ld"; then
5742*6236dae4SAndroid Build Coastguard Worker	case $host_cpu in
5743*6236dae4SAndroid Build Coastguard Worker	hppa*64*)
5744*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5745*6236dae4SAndroid Build Coastguard Worker	  ;;
5746*6236dae4SAndroid Build Coastguard Worker	ia64*)
5747*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5748*6236dae4SAndroid Build Coastguard Worker	  ;;
5749*6236dae4SAndroid Build Coastguard Worker	*)
5750*6236dae4SAndroid 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'
5751*6236dae4SAndroid Build Coastguard Worker	  ;;
5752*6236dae4SAndroid Build Coastguard Worker	esac
5753*6236dae4SAndroid Build Coastguard Worker      else
5754*6236dae4SAndroid Build Coastguard Worker	case $host_cpu in
5755*6236dae4SAndroid Build Coastguard Worker	hppa*64*)
5756*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5757*6236dae4SAndroid Build Coastguard Worker	  ;;
5758*6236dae4SAndroid Build Coastguard Worker	ia64*)
5759*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5760*6236dae4SAndroid Build Coastguard Worker	  ;;
5761*6236dae4SAndroid Build Coastguard Worker	*)
5762*6236dae4SAndroid Build Coastguard Worker	m4_if($1, [], [
5763*6236dae4SAndroid Build Coastguard Worker	  # Older versions of the 11.00 compiler do not understand -b yet
5764*6236dae4SAndroid Build Coastguard Worker	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5765*6236dae4SAndroid Build Coastguard Worker	  _LT_LINKER_OPTION([if $CC understands -b],
5766*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5767*6236dae4SAndroid 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'],
5768*6236dae4SAndroid Build Coastguard Worker	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5769*6236dae4SAndroid 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'])
5770*6236dae4SAndroid Build Coastguard Worker	  ;;
5771*6236dae4SAndroid Build Coastguard Worker	esac
5772*6236dae4SAndroid Build Coastguard Worker      fi
5773*6236dae4SAndroid Build Coastguard Worker      if test no = "$with_gnu_ld"; then
5774*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5775*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5776*6236dae4SAndroid Build Coastguard Worker
5777*6236dae4SAndroid Build Coastguard Worker	case $host_cpu in
5778*6236dae4SAndroid Build Coastguard Worker	hppa*64*|ia64*)
5779*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no
5780*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5781*6236dae4SAndroid Build Coastguard Worker	  ;;
5782*6236dae4SAndroid Build Coastguard Worker	*)
5783*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
5784*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5785*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5786*6236dae4SAndroid Build Coastguard Worker
5787*6236dae4SAndroid Build Coastguard Worker	  # hardcode_minus_L: Not really in the search PATH,
5788*6236dae4SAndroid Build Coastguard Worker	  # but as the default location of the library.
5789*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5790*6236dae4SAndroid Build Coastguard Worker	  ;;
5791*6236dae4SAndroid Build Coastguard Worker	esac
5792*6236dae4SAndroid Build Coastguard Worker      fi
5793*6236dae4SAndroid Build Coastguard Worker      ;;
5794*6236dae4SAndroid Build Coastguard Worker
5795*6236dae4SAndroid Build Coastguard Worker    irix5* | irix6* | nonstopux*)
5796*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5797*6236dae4SAndroid 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'
5798*6236dae4SAndroid Build Coastguard Worker	# Try to use the -exported_symbol ld option, if it does not
5799*6236dae4SAndroid Build Coastguard Worker	# work, assume that -exports_file does not work either and
5800*6236dae4SAndroid Build Coastguard Worker	# implicitly export all symbols.
5801*6236dae4SAndroid Build Coastguard Worker	# This should be the same for all languages, so no per-tag cache variable.
5802*6236dae4SAndroid Build Coastguard Worker	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5803*6236dae4SAndroid Build Coastguard Worker	  [lt_cv_irix_exported_symbol],
5804*6236dae4SAndroid Build Coastguard Worker	  [save_LDFLAGS=$LDFLAGS
5805*6236dae4SAndroid Build Coastguard Worker	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5806*6236dae4SAndroid Build Coastguard Worker	   AC_LINK_IFELSE(
5807*6236dae4SAndroid Build Coastguard Worker	     [AC_LANG_SOURCE(
5808*6236dae4SAndroid Build Coastguard Worker	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5809*6236dae4SAndroid Build Coastguard Worker			      [C++], [[int foo (void) { return 0; }]],
5810*6236dae4SAndroid Build Coastguard Worker			      [Fortran 77], [[
5811*6236dae4SAndroid Build Coastguard Worker      subroutine foo
5812*6236dae4SAndroid Build Coastguard Worker      end]],
5813*6236dae4SAndroid Build Coastguard Worker			      [Fortran], [[
5814*6236dae4SAndroid Build Coastguard Worker      subroutine foo
5815*6236dae4SAndroid Build Coastguard Worker      end]])])],
5816*6236dae4SAndroid Build Coastguard Worker	      [lt_cv_irix_exported_symbol=yes],
5817*6236dae4SAndroid Build Coastguard Worker	      [lt_cv_irix_exported_symbol=no])
5818*6236dae4SAndroid Build Coastguard Worker           LDFLAGS=$save_LDFLAGS])
5819*6236dae4SAndroid Build Coastguard Worker	if test yes = "$lt_cv_irix_exported_symbol"; then
5820*6236dae4SAndroid 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'
5821*6236dae4SAndroid Build Coastguard Worker	fi
5822*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(link_all_deplibs, $1)=no
5823*6236dae4SAndroid Build Coastguard Worker      else
5824*6236dae4SAndroid 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'
5825*6236dae4SAndroid 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'
5826*6236dae4SAndroid Build Coastguard Worker      fi
5827*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5828*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5829*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5830*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(inherit_rpath, $1)=yes
5831*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5832*6236dae4SAndroid Build Coastguard Worker      ;;
5833*6236dae4SAndroid Build Coastguard Worker
5834*6236dae4SAndroid Build Coastguard Worker    linux*)
5835*6236dae4SAndroid Build Coastguard Worker      case $cc_basename in
5836*6236dae4SAndroid Build Coastguard Worker      tcc*)
5837*6236dae4SAndroid Build Coastguard Worker	# Fabrice Bellard et al's Tiny C Compiler
5838*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=yes
5839*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5840*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5841*6236dae4SAndroid Build Coastguard Worker	;;
5842*6236dae4SAndroid Build Coastguard Worker      esac
5843*6236dae4SAndroid Build Coastguard Worker      ;;
5844*6236dae4SAndroid Build Coastguard Worker
5845*6236dae4SAndroid Build Coastguard Worker    netbsd* | netbsdelf*-gnu)
5846*6236dae4SAndroid Build Coastguard Worker      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5847*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5848*6236dae4SAndroid Build Coastguard Worker      else
5849*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5850*6236dae4SAndroid Build Coastguard Worker      fi
5851*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5852*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5853*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5854*6236dae4SAndroid Build Coastguard Worker      ;;
5855*6236dae4SAndroid Build Coastguard Worker
5856*6236dae4SAndroid Build Coastguard Worker    newsos6)
5857*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5858*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5859*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5860*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5861*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5862*6236dae4SAndroid Build Coastguard Worker      ;;
5863*6236dae4SAndroid Build Coastguard Worker
5864*6236dae4SAndroid Build Coastguard Worker    *nto* | *qnx*)
5865*6236dae4SAndroid Build Coastguard Worker      ;;
5866*6236dae4SAndroid Build Coastguard Worker
5867*6236dae4SAndroid Build Coastguard Worker    openbsd* | bitrig*)
5868*6236dae4SAndroid Build Coastguard Worker      if test -f /usr/libexec/ld.so; then
5869*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=yes
5870*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5871*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5872*6236dae4SAndroid Build Coastguard Worker	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5873*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5874*6236dae4SAndroid 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'
5875*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5876*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5877*6236dae4SAndroid Build Coastguard Worker	else
5878*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5879*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5880*6236dae4SAndroid Build Coastguard Worker	fi
5881*6236dae4SAndroid Build Coastguard Worker      else
5882*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5883*6236dae4SAndroid Build Coastguard Worker      fi
5884*6236dae4SAndroid Build Coastguard Worker      ;;
5885*6236dae4SAndroid Build Coastguard Worker
5886*6236dae4SAndroid Build Coastguard Worker    os2*)
5887*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5888*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5889*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5890*6236dae4SAndroid Build Coastguard Worker      shrext_cmds=.dll
5891*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5892*6236dae4SAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5893*6236dae4SAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5894*6236dae4SAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5895*6236dae4SAndroid Build Coastguard Worker	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5896*6236dae4SAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5897*6236dae4SAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5898*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5899*6236dae4SAndroid Build Coastguard Worker	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5900*6236dae4SAndroid Build Coastguard Worker	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5901*6236dae4SAndroid Build Coastguard Worker	$ECHO EXPORTS >> $output_objdir/$libname.def~
5902*6236dae4SAndroid Build Coastguard Worker	prefix_cmds="$SED"~
5903*6236dae4SAndroid Build Coastguard Worker	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5904*6236dae4SAndroid Build Coastguard Worker	  prefix_cmds="$prefix_cmds -e 1d";
5905*6236dae4SAndroid Build Coastguard Worker	fi~
5906*6236dae4SAndroid Build Coastguard Worker	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5907*6236dae4SAndroid Build Coastguard Worker	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5908*6236dae4SAndroid Build Coastguard Worker	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5909*6236dae4SAndroid Build Coastguard Worker	emximp -o $lib $output_objdir/$libname.def'
5910*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5911*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5912*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='@'
5913*6236dae4SAndroid Build Coastguard Worker      ;;
5914*6236dae4SAndroid Build Coastguard Worker
5915*6236dae4SAndroid Build Coastguard Worker    osf3*)
5916*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5917*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5918*6236dae4SAndroid 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'
5919*6236dae4SAndroid Build Coastguard Worker      else
5920*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5921*6236dae4SAndroid 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'
5922*6236dae4SAndroid Build Coastguard Worker      fi
5923*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5924*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5925*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5926*6236dae4SAndroid Build Coastguard Worker      ;;
5927*6236dae4SAndroid Build Coastguard Worker
5928*6236dae4SAndroid Build Coastguard Worker    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5929*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5930*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5931*6236dae4SAndroid 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'
5932*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5933*6236dae4SAndroid Build Coastguard Worker      else
5934*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5935*6236dae4SAndroid 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'
5936*6236dae4SAndroid 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~
5937*6236dae4SAndroid 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'
5938*6236dae4SAndroid Build Coastguard Worker
5939*6236dae4SAndroid Build Coastguard Worker	# Both c and cxx compiler support -rpath directly
5940*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5941*6236dae4SAndroid Build Coastguard Worker      fi
5942*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5943*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5944*6236dae4SAndroid Build Coastguard Worker      ;;
5945*6236dae4SAndroid Build Coastguard Worker
5946*6236dae4SAndroid Build Coastguard Worker    solaris*)
5947*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5948*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
5949*6236dae4SAndroid Build Coastguard Worker	wlarc='$wl'
5950*6236dae4SAndroid 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'
5951*6236dae4SAndroid 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~
5952*6236dae4SAndroid 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'
5953*6236dae4SAndroid Build Coastguard Worker      else
5954*6236dae4SAndroid Build Coastguard Worker	case `$CC -V 2>&1` in
5955*6236dae4SAndroid Build Coastguard Worker	*"Compilers 5.0"*)
5956*6236dae4SAndroid Build Coastguard Worker	  wlarc=''
5957*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5958*6236dae4SAndroid 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~
5959*6236dae4SAndroid Build Coastguard Worker            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5960*6236dae4SAndroid Build Coastguard Worker	  ;;
5961*6236dae4SAndroid Build Coastguard Worker	*)
5962*6236dae4SAndroid Build Coastguard Worker	  wlarc='$wl'
5963*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5964*6236dae4SAndroid 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~
5965*6236dae4SAndroid Build Coastguard Worker            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5966*6236dae4SAndroid Build Coastguard Worker	  ;;
5967*6236dae4SAndroid Build Coastguard Worker	esac
5968*6236dae4SAndroid Build Coastguard Worker      fi
5969*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5970*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5971*6236dae4SAndroid Build Coastguard Worker      case $host_os in
5972*6236dae4SAndroid Build Coastguard Worker      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5973*6236dae4SAndroid Build Coastguard Worker      *)
5974*6236dae4SAndroid Build Coastguard Worker	# The compiler driver will combine and reorder linker options,
5975*6236dae4SAndroid Build Coastguard Worker	# but understands '-z linker_flag'.  GCC discards it without '$wl',
5976*6236dae4SAndroid Build Coastguard Worker	# but is careful enough not to reorder.
5977*6236dae4SAndroid Build Coastguard Worker	# Supported since Solaris 2.6 (maybe 2.5.1?)
5978*6236dae4SAndroid Build Coastguard Worker	if test yes = "$GCC"; then
5979*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5980*6236dae4SAndroid Build Coastguard Worker	else
5981*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5982*6236dae4SAndroid Build Coastguard Worker	fi
5983*6236dae4SAndroid Build Coastguard Worker	;;
5984*6236dae4SAndroid Build Coastguard Worker      esac
5985*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5986*6236dae4SAndroid Build Coastguard Worker      ;;
5987*6236dae4SAndroid Build Coastguard Worker
5988*6236dae4SAndroid Build Coastguard Worker    sunos4*)
5989*6236dae4SAndroid Build Coastguard Worker      if test sequent = "$host_vendor"; then
5990*6236dae4SAndroid Build Coastguard Worker	# Use $CC to link under sequent, because it throws in some extra .o
5991*6236dae4SAndroid Build Coastguard Worker	# files that make .init and .fini sections work.
5992*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5993*6236dae4SAndroid Build Coastguard Worker      else
5994*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5995*6236dae4SAndroid Build Coastguard Worker      fi
5996*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5997*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5998*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5999*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6000*6236dae4SAndroid Build Coastguard Worker      ;;
6001*6236dae4SAndroid Build Coastguard Worker
6002*6236dae4SAndroid Build Coastguard Worker    sysv4)
6003*6236dae4SAndroid Build Coastguard Worker      case $host_vendor in
6004*6236dae4SAndroid Build Coastguard Worker	sni)
6005*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6006*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6007*6236dae4SAndroid Build Coastguard Worker	;;
6008*6236dae4SAndroid Build Coastguard Worker	siemens)
6009*6236dae4SAndroid Build Coastguard Worker	  ## LD is ld it makes a PLAMLIB
6010*6236dae4SAndroid Build Coastguard Worker	  ## CC just makes a GrossModule.
6011*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6012*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6013*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no
6014*6236dae4SAndroid Build Coastguard Worker        ;;
6015*6236dae4SAndroid Build Coastguard Worker	motorola)
6016*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6017*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6018*6236dae4SAndroid Build Coastguard Worker	;;
6019*6236dae4SAndroid Build Coastguard Worker      esac
6020*6236dae4SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
6021*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6022*6236dae4SAndroid Build Coastguard Worker      ;;
6023*6236dae4SAndroid Build Coastguard Worker
6024*6236dae4SAndroid Build Coastguard Worker    sysv4.3*)
6025*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6026*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6027*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6028*6236dae4SAndroid Build Coastguard Worker      ;;
6029*6236dae4SAndroid Build Coastguard Worker
6030*6236dae4SAndroid Build Coastguard Worker    sysv4*MP*)
6031*6236dae4SAndroid Build Coastguard Worker      if test -d /usr/nec; then
6032*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6033*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6034*6236dae4SAndroid Build Coastguard Worker	runpath_var=LD_RUN_PATH
6035*6236dae4SAndroid Build Coastguard Worker	hardcode_runpath_var=yes
6036*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=yes
6037*6236dae4SAndroid Build Coastguard Worker      fi
6038*6236dae4SAndroid Build Coastguard Worker      ;;
6039*6236dae4SAndroid Build Coastguard Worker
6040*6236dae4SAndroid Build Coastguard Worker    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6041*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6042*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6043*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6044*6236dae4SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
6045*6236dae4SAndroid Build Coastguard Worker
6046*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
6047*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6048*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6049*6236dae4SAndroid Build Coastguard Worker      else
6050*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6051*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6052*6236dae4SAndroid Build Coastguard Worker      fi
6053*6236dae4SAndroid Build Coastguard Worker      ;;
6054*6236dae4SAndroid Build Coastguard Worker
6055*6236dae4SAndroid Build Coastguard Worker    sysv5* | sco3.2v5* | sco5v6*)
6056*6236dae4SAndroid Build Coastguard Worker      # Note: We CANNOT use -z defs as we might desire, because we do not
6057*6236dae4SAndroid Build Coastguard Worker      # link with -lc, and that would cause any symbols used from libc to
6058*6236dae4SAndroid Build Coastguard Worker      # always be unresolved, which means just about no library would
6059*6236dae4SAndroid Build Coastguard Worker      # ever link correctly.  If we're not using GNU ld we use -z text
6060*6236dae4SAndroid Build Coastguard Worker      # though, which does catch some bad symbols but isn't as heavy-handed
6061*6236dae4SAndroid Build Coastguard Worker      # as -z defs.
6062*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6063*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6064*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6065*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6066*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6067*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6068*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
6069*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6070*6236dae4SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
6071*6236dae4SAndroid Build Coastguard Worker
6072*6236dae4SAndroid Build Coastguard Worker      if test yes = "$GCC"; then
6073*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6074*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6075*6236dae4SAndroid Build Coastguard Worker      else
6076*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6077*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6078*6236dae4SAndroid Build Coastguard Worker      fi
6079*6236dae4SAndroid Build Coastguard Worker      ;;
6080*6236dae4SAndroid Build Coastguard Worker
6081*6236dae4SAndroid Build Coastguard Worker    uts4*)
6082*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6083*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6084*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6085*6236dae4SAndroid Build Coastguard Worker      ;;
6086*6236dae4SAndroid Build Coastguard Worker
6087*6236dae4SAndroid Build Coastguard Worker    *)
6088*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(ld_shlibs, $1)=no
6089*6236dae4SAndroid Build Coastguard Worker      ;;
6090*6236dae4SAndroid Build Coastguard Worker    esac
6091*6236dae4SAndroid Build Coastguard Worker
6092*6236dae4SAndroid Build Coastguard Worker    if test sni = "$host_vendor"; then
6093*6236dae4SAndroid Build Coastguard Worker      case $host in
6094*6236dae4SAndroid Build Coastguard Worker      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6095*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6096*6236dae4SAndroid Build Coastguard Worker	;;
6097*6236dae4SAndroid Build Coastguard Worker      esac
6098*6236dae4SAndroid Build Coastguard Worker    fi
6099*6236dae4SAndroid Build Coastguard Worker  fi
6100*6236dae4SAndroid Build Coastguard Worker])
6101*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6102*6236dae4SAndroid Build Coastguard Workertest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6103*6236dae4SAndroid Build Coastguard Worker
6104*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6105*6236dae4SAndroid Build Coastguard Worker
6106*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6107*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6108*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [extract_expsyms_cmds], [2],
6109*6236dae4SAndroid Build Coastguard Worker    [The commands to extract the exported symbol list from a shared archive])
6110*6236dae4SAndroid Build Coastguard Worker
6111*6236dae4SAndroid Build Coastguard Worker#
6112*6236dae4SAndroid Build Coastguard Worker# Do we need to explicitly link libc?
6113*6236dae4SAndroid Build Coastguard Worker#
6114*6236dae4SAndroid Build Coastguard Workercase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6115*6236dae4SAndroid Build Coastguard Workerx|xyes)
6116*6236dae4SAndroid Build Coastguard Worker  # Assume -lc should be added
6117*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6118*6236dae4SAndroid Build Coastguard Worker
6119*6236dae4SAndroid Build Coastguard Worker  if test yes,yes = "$GCC,$enable_shared"; then
6120*6236dae4SAndroid Build Coastguard Worker    case $_LT_TAGVAR(archive_cmds, $1) in
6121*6236dae4SAndroid Build Coastguard Worker    *'~'*)
6122*6236dae4SAndroid Build Coastguard Worker      # FIXME: we may have to deal with multi-command sequences.
6123*6236dae4SAndroid Build Coastguard Worker      ;;
6124*6236dae4SAndroid Build Coastguard Worker    '$CC '*)
6125*6236dae4SAndroid Build Coastguard Worker      # Test whether the compiler implicitly links with -lc since on some
6126*6236dae4SAndroid Build Coastguard Worker      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6127*6236dae4SAndroid Build Coastguard Worker      # to ld, don't add -lc before -lgcc.
6128*6236dae4SAndroid Build Coastguard Worker      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6129*6236dae4SAndroid Build Coastguard Worker	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6130*6236dae4SAndroid Build Coastguard Worker	[$RM conftest*
6131*6236dae4SAndroid Build Coastguard Worker	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6132*6236dae4SAndroid Build Coastguard Worker
6133*6236dae4SAndroid Build Coastguard Worker	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6134*6236dae4SAndroid Build Coastguard Worker	  soname=conftest
6135*6236dae4SAndroid Build Coastguard Worker	  lib=conftest
6136*6236dae4SAndroid Build Coastguard Worker	  libobjs=conftest.$ac_objext
6137*6236dae4SAndroid Build Coastguard Worker	  deplibs=
6138*6236dae4SAndroid Build Coastguard Worker	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6139*6236dae4SAndroid Build Coastguard Worker	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6140*6236dae4SAndroid Build Coastguard Worker	  compiler_flags=-v
6141*6236dae4SAndroid Build Coastguard Worker	  linker_flags=-v
6142*6236dae4SAndroid Build Coastguard Worker	  verstring=
6143*6236dae4SAndroid Build Coastguard Worker	  output_objdir=.
6144*6236dae4SAndroid Build Coastguard Worker	  libname=conftest
6145*6236dae4SAndroid Build Coastguard Worker	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6146*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=
6147*6236dae4SAndroid Build Coastguard Worker	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6148*6236dae4SAndroid Build Coastguard Worker	  then
6149*6236dae4SAndroid Build Coastguard Worker	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6150*6236dae4SAndroid Build Coastguard Worker	  else
6151*6236dae4SAndroid Build Coastguard Worker	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6152*6236dae4SAndroid Build Coastguard Worker	  fi
6153*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6154*6236dae4SAndroid Build Coastguard Worker	else
6155*6236dae4SAndroid Build Coastguard Worker	  cat conftest.err 1>&5
6156*6236dae4SAndroid Build Coastguard Worker	fi
6157*6236dae4SAndroid Build Coastguard Worker	$RM conftest*
6158*6236dae4SAndroid Build Coastguard Worker	])
6159*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6160*6236dae4SAndroid Build Coastguard Worker      ;;
6161*6236dae4SAndroid Build Coastguard Worker    esac
6162*6236dae4SAndroid Build Coastguard Worker  fi
6163*6236dae4SAndroid Build Coastguard Worker  ;;
6164*6236dae4SAndroid Build Coastguard Workeresac
6165*6236dae4SAndroid Build Coastguard Worker
6166*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6167*6236dae4SAndroid Build Coastguard Worker    [Whether or not to add -lc for building shared libraries])
6168*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6169*6236dae4SAndroid Build Coastguard Worker    [enable_shared_with_static_runtimes], [0],
6170*6236dae4SAndroid Build Coastguard Worker    [Whether or not to disallow shared libs when runtime libs are static])
6171*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6172*6236dae4SAndroid Build Coastguard Worker    [Compiler flag to allow reflexive dlopens])
6173*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6174*6236dae4SAndroid Build Coastguard Worker    [Compiler flag to generate shared objects directly from archives])
6175*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_needs_object], [1],
6176*6236dae4SAndroid Build Coastguard Worker    [Whether the compiler copes with passing no objects directly])
6177*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6178*6236dae4SAndroid Build Coastguard Worker    [Create an old-style archive from a shared archive])
6179*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6180*6236dae4SAndroid Build Coastguard Worker    [Create a temporary old-style archive to link instead of a shared archive])
6181*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6182*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_expsym_cmds], [2])
6183*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [module_cmds], [2],
6184*6236dae4SAndroid Build Coastguard Worker    [Commands used to build a loadable module if different from building
6185*6236dae4SAndroid Build Coastguard Worker    a shared archive.])
6186*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [module_expsym_cmds], [2])
6187*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [with_gnu_ld], [1],
6188*6236dae4SAndroid Build Coastguard Worker    [Whether we are building with GNU ld or not])
6189*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [allow_undefined_flag], [1],
6190*6236dae4SAndroid Build Coastguard Worker    [Flag that allows shared libraries with undefined symbols to be built])
6191*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [no_undefined_flag], [1],
6192*6236dae4SAndroid Build Coastguard Worker    [Flag that enforces no undefined symbols])
6193*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6194*6236dae4SAndroid Build Coastguard Worker    [Flag to hardcode $libdir into a binary during linking.
6195*6236dae4SAndroid Build Coastguard Worker    This must work even if $libdir does not exist])
6196*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6197*6236dae4SAndroid Build Coastguard Worker    [Whether we need a single "-rpath" flag with a separated argument])
6198*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct], [0],
6199*6236dae4SAndroid Build Coastguard Worker    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6200*6236dae4SAndroid Build Coastguard Worker    DIR into the resulting binary])
6201*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6202*6236dae4SAndroid Build Coastguard Worker    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6203*6236dae4SAndroid Build Coastguard Worker    DIR into the resulting binary and the resulting library dependency is
6204*6236dae4SAndroid Build Coastguard Worker    "absolute", i.e impossible to change by setting $shlibpath_var if the
6205*6236dae4SAndroid Build Coastguard Worker    library is relocated])
6206*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_minus_L], [0],
6207*6236dae4SAndroid Build Coastguard Worker    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6208*6236dae4SAndroid Build Coastguard Worker    into the resulting binary])
6209*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6210*6236dae4SAndroid Build Coastguard Worker    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6211*6236dae4SAndroid Build Coastguard Worker    into the resulting binary])
6212*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_automatic], [0],
6213*6236dae4SAndroid Build Coastguard Worker    [Set to "yes" if building a shared library automatically hardcodes DIR
6214*6236dae4SAndroid Build Coastguard Worker    into the library and all subsequent libraries and executables linked
6215*6236dae4SAndroid Build Coastguard Worker    against it])
6216*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [inherit_rpath], [0],
6217*6236dae4SAndroid Build Coastguard Worker    [Set to yes if linker adds runtime paths of dependent libraries
6218*6236dae4SAndroid Build Coastguard Worker    to runtime path list])
6219*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [link_all_deplibs], [0],
6220*6236dae4SAndroid Build Coastguard Worker    [Whether libtool must link a program against all its dependency libraries])
6221*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [always_export_symbols], [0],
6222*6236dae4SAndroid Build Coastguard Worker    [Set to "yes" if exported symbols are required])
6223*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [export_symbols_cmds], [2],
6224*6236dae4SAndroid Build Coastguard Worker    [The commands to list exported symbols])
6225*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [exclude_expsyms], [1],
6226*6236dae4SAndroid Build Coastguard Worker    [Symbols that should not be listed in the preloaded symbols])
6227*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [include_expsyms], [1],
6228*6236dae4SAndroid Build Coastguard Worker    [Symbols that must always be exported])
6229*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [prelink_cmds], [2],
6230*6236dae4SAndroid Build Coastguard Worker    [Commands necessary for linking programs (against libraries) with templates])
6231*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [postlink_cmds], [2],
6232*6236dae4SAndroid Build Coastguard Worker    [Commands necessary for finishing linking programs])
6233*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [file_list_spec], [1],
6234*6236dae4SAndroid Build Coastguard Worker    [Specify filename containing input files])
6235*6236dae4SAndroid Build Coastguard Workerdnl FIXME: Not yet implemented
6236*6236dae4SAndroid Build Coastguard Workerdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6237*6236dae4SAndroid Build Coastguard Workerdnl    [Compiler flag to generate thread safe objects])
6238*6236dae4SAndroid Build Coastguard Worker])# _LT_LINKER_SHLIBS
6239*6236dae4SAndroid Build Coastguard Worker
6240*6236dae4SAndroid Build Coastguard Worker
6241*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_C_CONFIG([TAG])
6242*6236dae4SAndroid Build Coastguard Worker# ------------------------
6243*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for a C compiler are suitably
6244*6236dae4SAndroid Build Coastguard Worker# defined.  These variables are subsequently used by _LT_CONFIG to write
6245*6236dae4SAndroid Build Coastguard Worker# the compiler configuration to 'libtool'.
6246*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_C_CONFIG],
6247*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl
6248*6236dae4SAndroid Build Coastguard Workerlt_save_CC=$CC
6249*6236dae4SAndroid Build Coastguard WorkerAC_LANG_PUSH(C)
6250*6236dae4SAndroid Build Coastguard Worker
6251*6236dae4SAndroid Build Coastguard Worker# Source file extension for C test sources.
6252*6236dae4SAndroid Build Coastguard Workerac_ext=c
6253*6236dae4SAndroid Build Coastguard Worker
6254*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled C test sources.
6255*6236dae4SAndroid Build Coastguard Workerobjext=o
6256*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
6257*6236dae4SAndroid Build Coastguard Worker
6258*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple compile tests
6259*6236dae4SAndroid Build Coastguard Workerlt_simple_compile_test_code="int some_variable = 0;"
6260*6236dae4SAndroid Build Coastguard Worker
6261*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple link tests
6262*6236dae4SAndroid Build Coastguard Workerlt_simple_link_test_code='int main(){return(0);}'
6263*6236dae4SAndroid Build Coastguard Worker
6264*6236dae4SAndroid Build Coastguard Worker_LT_TAG_COMPILER
6265*6236dae4SAndroid Build Coastguard Worker# Save the default compiler, since it gets overwritten when the other
6266*6236dae4SAndroid Build Coastguard Worker# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6267*6236dae4SAndroid Build Coastguard Workercompiler_DEFAULT=$CC
6268*6236dae4SAndroid Build Coastguard Worker
6269*6236dae4SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
6270*6236dae4SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
6271*6236dae4SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
6272*6236dae4SAndroid Build Coastguard Worker
6273*6236dae4SAndroid Build Coastguard Worker## CAVEAT EMPTOR:
6274*6236dae4SAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
6275*6236dae4SAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
6276*6236dae4SAndroid Build Coastguard Worker## what you are doing...
6277*6236dae4SAndroid Build Coastguard Workerif test -n "$compiler"; then
6278*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
6279*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
6280*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
6281*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
6282*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
6283*6236dae4SAndroid Build Coastguard Worker  _LT_SYS_DYNAMIC_LINKER($1)
6284*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
6285*6236dae4SAndroid Build Coastguard Worker  LT_SYS_DLOPEN_SELF
6286*6236dae4SAndroid Build Coastguard Worker  _LT_CMD_STRIPLIB
6287*6236dae4SAndroid Build Coastguard Worker
6288*6236dae4SAndroid Build Coastguard Worker  # Report what library types will actually be built
6289*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([if libtool supports shared libraries])
6290*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT([$can_build_shared])
6291*6236dae4SAndroid Build Coastguard Worker
6292*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([whether to build shared libraries])
6293*6236dae4SAndroid Build Coastguard Worker  test no = "$can_build_shared" && enable_shared=no
6294*6236dae4SAndroid Build Coastguard Worker
6295*6236dae4SAndroid Build Coastguard Worker  # On AIX, shared libraries and static libraries use the same namespace, and
6296*6236dae4SAndroid Build Coastguard Worker  # are all built from PIC.
6297*6236dae4SAndroid Build Coastguard Worker  case $host_os in
6298*6236dae4SAndroid Build Coastguard Worker  aix3*)
6299*6236dae4SAndroid Build Coastguard Worker    test yes = "$enable_shared" && enable_static=no
6300*6236dae4SAndroid Build Coastguard Worker    if test -n "$RANLIB"; then
6301*6236dae4SAndroid Build Coastguard Worker      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6302*6236dae4SAndroid Build Coastguard Worker      postinstall_cmds='$RANLIB $lib'
6303*6236dae4SAndroid Build Coastguard Worker    fi
6304*6236dae4SAndroid Build Coastguard Worker    ;;
6305*6236dae4SAndroid Build Coastguard Worker
6306*6236dae4SAndroid Build Coastguard Worker  aix[[4-9]]*)
6307*6236dae4SAndroid Build Coastguard Worker    if test ia64 != "$host_cpu"; then
6308*6236dae4SAndroid Build Coastguard Worker      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6309*6236dae4SAndroid Build Coastguard Worker      yes,aix,yes) ;;			# shared object as lib.so file only
6310*6236dae4SAndroid Build Coastguard Worker      yes,svr4,*) ;;			# shared object as lib.so archive member only
6311*6236dae4SAndroid Build Coastguard Worker      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6312*6236dae4SAndroid Build Coastguard Worker      esac
6313*6236dae4SAndroid Build Coastguard Worker    fi
6314*6236dae4SAndroid Build Coastguard Worker    ;;
6315*6236dae4SAndroid Build Coastguard Worker  esac
6316*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT([$enable_shared])
6317*6236dae4SAndroid Build Coastguard Worker
6318*6236dae4SAndroid Build Coastguard Worker  AC_MSG_CHECKING([whether to build static libraries])
6319*6236dae4SAndroid Build Coastguard Worker  # Make sure either enable_shared or enable_static is yes.
6320*6236dae4SAndroid Build Coastguard Worker  test yes = "$enable_shared" || enable_static=yes
6321*6236dae4SAndroid Build Coastguard Worker  AC_MSG_RESULT([$enable_static])
6322*6236dae4SAndroid Build Coastguard Worker
6323*6236dae4SAndroid Build Coastguard Worker  _LT_CONFIG($1)
6324*6236dae4SAndroid Build Coastguard Workerfi
6325*6236dae4SAndroid Build Coastguard WorkerAC_LANG_POP
6326*6236dae4SAndroid Build Coastguard WorkerCC=$lt_save_CC
6327*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_C_CONFIG
6328*6236dae4SAndroid Build Coastguard Worker
6329*6236dae4SAndroid Build Coastguard Worker
6330*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_CXX_CONFIG([TAG])
6331*6236dae4SAndroid Build Coastguard Worker# --------------------------
6332*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for a C++ compiler are suitably
6333*6236dae4SAndroid Build Coastguard Worker# defined.  These variables are subsequently used by _LT_CONFIG to write
6334*6236dae4SAndroid Build Coastguard Worker# the compiler configuration to 'libtool'.
6335*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_CXX_CONFIG],
6336*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6337*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
6338*6236dae4SAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6339*6236dae4SAndroid Build Coastguard Workerif test -n "$CXX" && ( test no != "$CXX" &&
6340*6236dae4SAndroid Build Coastguard Worker    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6341*6236dae4SAndroid Build Coastguard Worker    (test g++ != "$CXX"))); then
6342*6236dae4SAndroid Build Coastguard Worker  AC_PROG_CXXCPP
6343*6236dae4SAndroid Build Coastguard Workerelse
6344*6236dae4SAndroid Build Coastguard Worker  _lt_caught_CXX_error=yes
6345*6236dae4SAndroid Build Coastguard Workerfi
6346*6236dae4SAndroid Build Coastguard Worker
6347*6236dae4SAndroid Build Coastguard WorkerAC_LANG_PUSH(C++)
6348*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6349*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
6350*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
6351*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
6352*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(compiler_needs_object, $1)=no
6353*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6354*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
6355*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6356*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6357*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
6358*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
6359*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6360*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
6361*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
6362*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
6363*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
6364*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
6365*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6366*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
6367*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6368*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
6369*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
6370*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6371*6236dae4SAndroid Build Coastguard Worker
6372*6236dae4SAndroid Build Coastguard Worker# Source file extension for C++ test sources.
6373*6236dae4SAndroid Build Coastguard Workerac_ext=cpp
6374*6236dae4SAndroid Build Coastguard Worker
6375*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled C++ test sources.
6376*6236dae4SAndroid Build Coastguard Workerobjext=o
6377*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
6378*6236dae4SAndroid Build Coastguard Worker
6379*6236dae4SAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
6380*6236dae4SAndroid Build Coastguard Worker# the CXX compiler isn't working.  Some variables (like enable_shared)
6381*6236dae4SAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
6382*6236dae4SAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
6383*6236dae4SAndroid Build Coastguard Workerif test yes != "$_lt_caught_CXX_error"; then
6384*6236dae4SAndroid Build Coastguard Worker  # Code to be used in simple compile tests
6385*6236dae4SAndroid Build Coastguard Worker  lt_simple_compile_test_code="int some_variable = 0;"
6386*6236dae4SAndroid Build Coastguard Worker
6387*6236dae4SAndroid Build Coastguard Worker  # Code to be used in simple link tests
6388*6236dae4SAndroid Build Coastguard Worker  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6389*6236dae4SAndroid Build Coastguard Worker
6390*6236dae4SAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6391*6236dae4SAndroid Build Coastguard Worker  _LT_TAG_COMPILER
6392*6236dae4SAndroid Build Coastguard Worker
6393*6236dae4SAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
6394*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
6395*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
6396*6236dae4SAndroid Build Coastguard Worker
6397*6236dae4SAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
6398*6236dae4SAndroid Build Coastguard Worker  lt_save_CC=$CC
6399*6236dae4SAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
6400*6236dae4SAndroid Build Coastguard Worker  lt_save_LD=$LD
6401*6236dae4SAndroid Build Coastguard Worker  lt_save_GCC=$GCC
6402*6236dae4SAndroid Build Coastguard Worker  GCC=$GXX
6403*6236dae4SAndroid Build Coastguard Worker  lt_save_with_gnu_ld=$with_gnu_ld
6404*6236dae4SAndroid Build Coastguard Worker  lt_save_path_LD=$lt_cv_path_LD
6405*6236dae4SAndroid Build Coastguard Worker  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6406*6236dae4SAndroid Build Coastguard Worker    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6407*6236dae4SAndroid Build Coastguard Worker  else
6408*6236dae4SAndroid Build Coastguard Worker    $as_unset lt_cv_prog_gnu_ld
6409*6236dae4SAndroid Build Coastguard Worker  fi
6410*6236dae4SAndroid Build Coastguard Worker  if test -n "${lt_cv_path_LDCXX+set}"; then
6411*6236dae4SAndroid Build Coastguard Worker    lt_cv_path_LD=$lt_cv_path_LDCXX
6412*6236dae4SAndroid Build Coastguard Worker  else
6413*6236dae4SAndroid Build Coastguard Worker    $as_unset lt_cv_path_LD
6414*6236dae4SAndroid Build Coastguard Worker  fi
6415*6236dae4SAndroid Build Coastguard Worker  test -z "${LDCXX+set}" || LD=$LDCXX
6416*6236dae4SAndroid Build Coastguard Worker  CC=${CXX-"c++"}
6417*6236dae4SAndroid Build Coastguard Worker  CFLAGS=$CXXFLAGS
6418*6236dae4SAndroid Build Coastguard Worker  compiler=$CC
6419*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
6420*6236dae4SAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
6421*6236dae4SAndroid Build Coastguard Worker
6422*6236dae4SAndroid Build Coastguard Worker  if test -n "$compiler"; then
6423*6236dae4SAndroid Build Coastguard Worker    # We don't want -fno-exception when compiling C++ code, so set the
6424*6236dae4SAndroid Build Coastguard Worker    # no_builtin_flag separately
6425*6236dae4SAndroid Build Coastguard Worker    if test yes = "$GXX"; then
6426*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6427*6236dae4SAndroid Build Coastguard Worker    else
6428*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6429*6236dae4SAndroid Build Coastguard Worker    fi
6430*6236dae4SAndroid Build Coastguard Worker
6431*6236dae4SAndroid Build Coastguard Worker    if test yes = "$GXX"; then
6432*6236dae4SAndroid Build Coastguard Worker      # Set up default GNU C++ configuration
6433*6236dae4SAndroid Build Coastguard Worker
6434*6236dae4SAndroid Build Coastguard Worker      LT_PATH_LD
6435*6236dae4SAndroid Build Coastguard Worker
6436*6236dae4SAndroid Build Coastguard Worker      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6437*6236dae4SAndroid Build Coastguard Worker      # archiving commands below assume that GNU ld is being used.
6438*6236dae4SAndroid Build Coastguard Worker      if test yes = "$with_gnu_ld"; then
6439*6236dae4SAndroid 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'
6440*6236dae4SAndroid 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'
6441*6236dae4SAndroid Build Coastguard Worker
6442*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6443*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6444*6236dae4SAndroid Build Coastguard Worker
6445*6236dae4SAndroid Build Coastguard Worker        # If archive_cmds runs LD, not CC, wlarc should be empty
6446*6236dae4SAndroid Build Coastguard Worker        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6447*6236dae4SAndroid Build Coastguard Worker        #     investigate it a little bit more. (MM)
6448*6236dae4SAndroid Build Coastguard Worker        wlarc='$wl'
6449*6236dae4SAndroid Build Coastguard Worker
6450*6236dae4SAndroid Build Coastguard Worker        # ancient GNU ld didn't support --whole-archive et. al.
6451*6236dae4SAndroid Build Coastguard Worker        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6452*6236dae4SAndroid Build Coastguard Worker	  $GREP 'no-whole-archive' > /dev/null; then
6453*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6454*6236dae4SAndroid Build Coastguard Worker        else
6455*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6456*6236dae4SAndroid Build Coastguard Worker        fi
6457*6236dae4SAndroid Build Coastguard Worker      else
6458*6236dae4SAndroid Build Coastguard Worker        with_gnu_ld=no
6459*6236dae4SAndroid Build Coastguard Worker        wlarc=
6460*6236dae4SAndroid Build Coastguard Worker
6461*6236dae4SAndroid Build Coastguard Worker        # A generic and very simple default shared library creation
6462*6236dae4SAndroid Build Coastguard Worker        # command for GNU C++ for the case where it uses the native
6463*6236dae4SAndroid Build Coastguard Worker        # linker, instead of GNU ld.  If possible, this setting should
6464*6236dae4SAndroid Build Coastguard Worker        # overridden to take advantage of the native linker features on
6465*6236dae4SAndroid Build Coastguard Worker        # the platform it is being used on.
6466*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6467*6236dae4SAndroid Build Coastguard Worker      fi
6468*6236dae4SAndroid Build Coastguard Worker
6469*6236dae4SAndroid Build Coastguard Worker      # Commands to make compiler produce verbose output that lists
6470*6236dae4SAndroid Build Coastguard Worker      # what "hidden" libraries, object files and flags are used when
6471*6236dae4SAndroid Build Coastguard Worker      # linking a shared library.
6472*6236dae4SAndroid Build Coastguard Worker      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
6473*6236dae4SAndroid Build Coastguard Worker
6474*6236dae4SAndroid Build Coastguard Worker    else
6475*6236dae4SAndroid Build Coastguard Worker      GXX=no
6476*6236dae4SAndroid Build Coastguard Worker      with_gnu_ld=no
6477*6236dae4SAndroid Build Coastguard Worker      wlarc=
6478*6236dae4SAndroid Build Coastguard Worker    fi
6479*6236dae4SAndroid Build Coastguard Worker
6480*6236dae4SAndroid Build Coastguard Worker    # PORTME: fill in a description of your system's C++ link characteristics
6481*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6482*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(ld_shlibs, $1)=yes
6483*6236dae4SAndroid Build Coastguard Worker    case $host_os in
6484*6236dae4SAndroid Build Coastguard Worker      aix3*)
6485*6236dae4SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6486*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6487*6236dae4SAndroid Build Coastguard Worker        ;;
6488*6236dae4SAndroid Build Coastguard Worker      aix[[4-9]]*)
6489*6236dae4SAndroid Build Coastguard Worker        if test ia64 = "$host_cpu"; then
6490*6236dae4SAndroid Build Coastguard Worker          # On IA64, the linker does run time linking by default, so we don't
6491*6236dae4SAndroid Build Coastguard Worker          # have to do anything special.
6492*6236dae4SAndroid Build Coastguard Worker          aix_use_runtimelinking=no
6493*6236dae4SAndroid Build Coastguard Worker          exp_sym_flag='-Bexport'
6494*6236dae4SAndroid Build Coastguard Worker          no_entry_flag=
6495*6236dae4SAndroid Build Coastguard Worker        else
6496*6236dae4SAndroid Build Coastguard Worker          aix_use_runtimelinking=no
6497*6236dae4SAndroid Build Coastguard Worker
6498*6236dae4SAndroid Build Coastguard Worker          # Test if we are trying to use run time linking or normal
6499*6236dae4SAndroid Build Coastguard Worker          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6500*6236dae4SAndroid Build Coastguard Worker          # have runtime linking enabled, and use it for executables.
6501*6236dae4SAndroid Build Coastguard Worker          # For shared libraries, we enable/disable runtime linking
6502*6236dae4SAndroid Build Coastguard Worker          # depending on the kind of the shared library created -
6503*6236dae4SAndroid Build Coastguard Worker          # when "with_aix_soname,aix_use_runtimelinking" is:
6504*6236dae4SAndroid Build Coastguard Worker          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6505*6236dae4SAndroid Build Coastguard Worker          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6506*6236dae4SAndroid Build Coastguard Worker          #            lib.a           static archive
6507*6236dae4SAndroid Build Coastguard Worker          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6508*6236dae4SAndroid Build Coastguard Worker          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6509*6236dae4SAndroid Build Coastguard Worker          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6510*6236dae4SAndroid Build Coastguard Worker          #            lib.a(lib.so.V) shared, rtl:no
6511*6236dae4SAndroid Build Coastguard Worker          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6512*6236dae4SAndroid Build Coastguard Worker          #            lib.a           static archive
6513*6236dae4SAndroid Build Coastguard Worker          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6514*6236dae4SAndroid Build Coastguard Worker	    for ld_flag in $LDFLAGS; do
6515*6236dae4SAndroid Build Coastguard Worker	      case $ld_flag in
6516*6236dae4SAndroid Build Coastguard Worker	      *-brtl*)
6517*6236dae4SAndroid Build Coastguard Worker	        aix_use_runtimelinking=yes
6518*6236dae4SAndroid Build Coastguard Worker	        break
6519*6236dae4SAndroid Build Coastguard Worker	        ;;
6520*6236dae4SAndroid Build Coastguard Worker	      esac
6521*6236dae4SAndroid Build Coastguard Worker	    done
6522*6236dae4SAndroid Build Coastguard Worker	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6523*6236dae4SAndroid Build Coastguard Worker	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6524*6236dae4SAndroid Build Coastguard Worker	      # so we don't have lib.a shared libs to link our executables.
6525*6236dae4SAndroid Build Coastguard Worker	      # We have to force runtime linking in this case.
6526*6236dae4SAndroid Build Coastguard Worker	      aix_use_runtimelinking=yes
6527*6236dae4SAndroid Build Coastguard Worker	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6528*6236dae4SAndroid Build Coastguard Worker	    fi
6529*6236dae4SAndroid Build Coastguard Worker	    ;;
6530*6236dae4SAndroid Build Coastguard Worker          esac
6531*6236dae4SAndroid Build Coastguard Worker
6532*6236dae4SAndroid Build Coastguard Worker          exp_sym_flag='-bexport'
6533*6236dae4SAndroid Build Coastguard Worker          no_entry_flag='-bnoentry'
6534*6236dae4SAndroid Build Coastguard Worker        fi
6535*6236dae4SAndroid Build Coastguard Worker
6536*6236dae4SAndroid Build Coastguard Worker        # When large executables or shared objects are built, AIX ld can
6537*6236dae4SAndroid Build Coastguard Worker        # have problems creating the table of contents.  If linking a library
6538*6236dae4SAndroid Build Coastguard Worker        # or program results in "error TOC overflow" add -mminimal-toc to
6539*6236dae4SAndroid Build Coastguard Worker        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6540*6236dae4SAndroid Build Coastguard Worker        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6541*6236dae4SAndroid Build Coastguard Worker
6542*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)=''
6543*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct, $1)=yes
6544*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6545*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6546*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(link_all_deplibs, $1)=yes
6547*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6548*6236dae4SAndroid Build Coastguard Worker        case $with_aix_soname,$aix_use_runtimelinking in
6549*6236dae4SAndroid Build Coastguard Worker        aix,*) ;;	# no import file
6550*6236dae4SAndroid Build Coastguard Worker        svr4,* | *,yes) # use import file
6551*6236dae4SAndroid Build Coastguard Worker          # The Import File defines what to hardcode.
6552*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_direct, $1)=no
6553*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6554*6236dae4SAndroid Build Coastguard Worker          ;;
6555*6236dae4SAndroid Build Coastguard Worker        esac
6556*6236dae4SAndroid Build Coastguard Worker
6557*6236dae4SAndroid Build Coastguard Worker        if test yes = "$GXX"; then
6558*6236dae4SAndroid Build Coastguard Worker          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6559*6236dae4SAndroid Build Coastguard Worker          # We only want to do this on AIX 4.2 and lower, the check
6560*6236dae4SAndroid Build Coastguard Worker          # below for broken collect2 doesn't work under 4.3+
6561*6236dae4SAndroid Build Coastguard Worker	  collect2name=`$CC -print-prog-name=collect2`
6562*6236dae4SAndroid Build Coastguard Worker	  if test -f "$collect2name" &&
6563*6236dae4SAndroid Build Coastguard Worker	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6564*6236dae4SAndroid Build Coastguard Worker	  then
6565*6236dae4SAndroid Build Coastguard Worker	    # We have reworked collect2
6566*6236dae4SAndroid Build Coastguard Worker	    :
6567*6236dae4SAndroid Build Coastguard Worker	  else
6568*6236dae4SAndroid Build Coastguard Worker	    # We have old collect2
6569*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6570*6236dae4SAndroid Build Coastguard Worker	    # It fails to find uninstalled libraries when the uninstalled
6571*6236dae4SAndroid Build Coastguard Worker	    # path is not listed in the libpath.  Setting hardcode_minus_L
6572*6236dae4SAndroid Build Coastguard Worker	    # to unsupported forces relinking
6573*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6574*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6575*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6576*6236dae4SAndroid Build Coastguard Worker	  fi
6577*6236dae4SAndroid Build Coastguard Worker          esac
6578*6236dae4SAndroid Build Coastguard Worker          shared_flag='-shared'
6579*6236dae4SAndroid Build Coastguard Worker	  if test yes = "$aix_use_runtimelinking"; then
6580*6236dae4SAndroid Build Coastguard Worker	    shared_flag=$shared_flag' $wl-G'
6581*6236dae4SAndroid Build Coastguard Worker	  fi
6582*6236dae4SAndroid Build Coastguard Worker	  # Need to ensure runtime linking is disabled for the traditional
6583*6236dae4SAndroid Build Coastguard Worker	  # shared library, or the linker may eventually find shared libraries
6584*6236dae4SAndroid Build Coastguard Worker	  # /with/ Import File - we do not want to mix them.
6585*6236dae4SAndroid Build Coastguard Worker	  shared_flag_aix='-shared'
6586*6236dae4SAndroid Build Coastguard Worker	  shared_flag_svr4='-shared $wl-G'
6587*6236dae4SAndroid Build Coastguard Worker        else
6588*6236dae4SAndroid Build Coastguard Worker          # not using gcc
6589*6236dae4SAndroid Build Coastguard Worker          if test ia64 = "$host_cpu"; then
6590*6236dae4SAndroid Build Coastguard Worker	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6591*6236dae4SAndroid Build Coastguard Worker	  # chokes on -Wl,-G. The following line is correct:
6592*6236dae4SAndroid Build Coastguard Worker	  shared_flag='-G'
6593*6236dae4SAndroid Build Coastguard Worker          else
6594*6236dae4SAndroid Build Coastguard Worker	    if test yes = "$aix_use_runtimelinking"; then
6595*6236dae4SAndroid Build Coastguard Worker	      shared_flag='$wl-G'
6596*6236dae4SAndroid Build Coastguard Worker	    else
6597*6236dae4SAndroid Build Coastguard Worker	      shared_flag='$wl-bM:SRE'
6598*6236dae4SAndroid Build Coastguard Worker	    fi
6599*6236dae4SAndroid Build Coastguard Worker	    shared_flag_aix='$wl-bM:SRE'
6600*6236dae4SAndroid Build Coastguard Worker	    shared_flag_svr4='$wl-G'
6601*6236dae4SAndroid Build Coastguard Worker          fi
6602*6236dae4SAndroid Build Coastguard Worker        fi
6603*6236dae4SAndroid Build Coastguard Worker
6604*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6605*6236dae4SAndroid Build Coastguard Worker        # It seems that -bexpall does not export symbols beginning with
6606*6236dae4SAndroid Build Coastguard Worker        # underscore (_), so it is better to generate a list of symbols to
6607*6236dae4SAndroid Build Coastguard Worker	# export.
6608*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(always_export_symbols, $1)=yes
6609*6236dae4SAndroid Build Coastguard Worker	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6610*6236dae4SAndroid Build Coastguard Worker          # Warning - without using the other runtime loading flags (-brtl),
6611*6236dae4SAndroid Build Coastguard Worker          # -berok will link without error, but may produce a broken library.
6612*6236dae4SAndroid Build Coastguard Worker          # The "-G" linker flag allows undefined symbols.
6613*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6614*6236dae4SAndroid Build Coastguard Worker          # Determine the default libpath from the value encoded in an empty
6615*6236dae4SAndroid Build Coastguard Worker          # executable.
6616*6236dae4SAndroid Build Coastguard Worker          _LT_SYS_MODULE_PATH_AIX([$1])
6617*6236dae4SAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6618*6236dae4SAndroid Build Coastguard Worker
6619*6236dae4SAndroid 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
6620*6236dae4SAndroid Build Coastguard Worker        else
6621*6236dae4SAndroid Build Coastguard Worker          if test ia64 = "$host_cpu"; then
6622*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6623*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6624*6236dae4SAndroid 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"
6625*6236dae4SAndroid Build Coastguard Worker          else
6626*6236dae4SAndroid Build Coastguard Worker	    # Determine the default libpath from the value encoded in an
6627*6236dae4SAndroid Build Coastguard Worker	    # empty executable.
6628*6236dae4SAndroid Build Coastguard Worker	    _LT_SYS_MODULE_PATH_AIX([$1])
6629*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6630*6236dae4SAndroid Build Coastguard Worker	    # Warning - without using the other run time loading flags,
6631*6236dae4SAndroid Build Coastguard Worker	    # -berok will link without error, but may produce a broken library.
6632*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6633*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6634*6236dae4SAndroid Build Coastguard Worker	    if test yes = "$with_gnu_ld"; then
6635*6236dae4SAndroid Build Coastguard Worker	      # We only use this code for GNU lds that support --whole-archive.
6636*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6637*6236dae4SAndroid Build Coastguard Worker	    else
6638*6236dae4SAndroid Build Coastguard Worker	      # Exported symbols can be pulled into shared objects from archives
6639*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6640*6236dae4SAndroid Build Coastguard Worker	    fi
6641*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6642*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6643*6236dae4SAndroid Build Coastguard Worker	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6644*6236dae4SAndroid Build Coastguard Worker	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6645*6236dae4SAndroid Build Coastguard Worker	    if test svr4 != "$with_aix_soname"; then
6646*6236dae4SAndroid Build Coastguard Worker	      # This is similar to how AIX traditionally builds its shared
6647*6236dae4SAndroid Build Coastguard Worker	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6648*6236dae4SAndroid 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'
6649*6236dae4SAndroid Build Coastguard Worker	    fi
6650*6236dae4SAndroid Build Coastguard Worker	    if test aix != "$with_aix_soname"; then
6651*6236dae4SAndroid 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'
6652*6236dae4SAndroid Build Coastguard Worker	    else
6653*6236dae4SAndroid Build Coastguard Worker	      # used by -dlpreopen to get the symbols
6654*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6655*6236dae4SAndroid Build Coastguard Worker	    fi
6656*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6657*6236dae4SAndroid Build Coastguard Worker          fi
6658*6236dae4SAndroid Build Coastguard Worker        fi
6659*6236dae4SAndroid Build Coastguard Worker        ;;
6660*6236dae4SAndroid Build Coastguard Worker
6661*6236dae4SAndroid Build Coastguard Worker      beos*)
6662*6236dae4SAndroid Build Coastguard Worker	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6663*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6664*6236dae4SAndroid Build Coastguard Worker	  # Joseph Beckenbach <[email protected]> says some releases of gcc
6665*6236dae4SAndroid Build Coastguard Worker	  # support --undefined.  This deserves some investigation.  FIXME
6666*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6667*6236dae4SAndroid Build Coastguard Worker	else
6668*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6669*6236dae4SAndroid Build Coastguard Worker	fi
6670*6236dae4SAndroid Build Coastguard Worker	;;
6671*6236dae4SAndroid Build Coastguard Worker
6672*6236dae4SAndroid Build Coastguard Worker      chorus*)
6673*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
6674*6236dae4SAndroid Build Coastguard Worker          *)
6675*6236dae4SAndroid Build Coastguard Worker	  # FIXME: insert proper C++ library support
6676*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6677*6236dae4SAndroid Build Coastguard Worker	  ;;
6678*6236dae4SAndroid Build Coastguard Worker        esac
6679*6236dae4SAndroid Build Coastguard Worker        ;;
6680*6236dae4SAndroid Build Coastguard Worker
6681*6236dae4SAndroid Build Coastguard Worker      cygwin* | mingw* | pw32* | cegcc*)
6682*6236dae4SAndroid Build Coastguard Worker	case $GXX,$cc_basename in
6683*6236dae4SAndroid Build Coastguard Worker	,cl* | no,cl* | ,icl* | no,icl*)
6684*6236dae4SAndroid Build Coastguard Worker	  # Native MSVC or ICC
6685*6236dae4SAndroid Build Coastguard Worker	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6686*6236dae4SAndroid Build Coastguard Worker	  # no search path for DLLs.
6687*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6688*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6689*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(always_export_symbols, $1)=yes
6690*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(file_list_spec, $1)='@'
6691*6236dae4SAndroid Build Coastguard Worker	  # Tell ltmain to make .lib files, not .a files.
6692*6236dae4SAndroid Build Coastguard Worker	  libext=lib
6693*6236dae4SAndroid Build Coastguard Worker	  # Tell ltmain to make .dll files, not .so files.
6694*6236dae4SAndroid Build Coastguard Worker	  shrext_cmds=.dll
6695*6236dae4SAndroid Build Coastguard Worker	  # FIXME: Setting linknames here is a bad hack.
6696*6236dae4SAndroid 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='
6697*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6698*6236dae4SAndroid Build Coastguard Worker              cp "$export_symbols" "$output_objdir/$soname.def";
6699*6236dae4SAndroid Build Coastguard Worker              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6700*6236dae4SAndroid Build Coastguard Worker            else
6701*6236dae4SAndroid Build Coastguard Worker              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6702*6236dae4SAndroid Build Coastguard Worker            fi~
6703*6236dae4SAndroid 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"~
6704*6236dae4SAndroid Build Coastguard Worker            linknames='
6705*6236dae4SAndroid Build Coastguard Worker	  # The linker will not automatically build a static lib if we build a DLL.
6706*6236dae4SAndroid Build Coastguard Worker	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6707*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6708*6236dae4SAndroid Build Coastguard Worker	  # Don't use ranlib
6709*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6710*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6711*6236dae4SAndroid Build Coastguard Worker            lt_tool_outputfile="@TOOL_OUTPUT@"~
6712*6236dae4SAndroid Build Coastguard Worker            case $lt_outputfile in
6713*6236dae4SAndroid Build Coastguard Worker              *.exe|*.EXE) ;;
6714*6236dae4SAndroid Build Coastguard Worker              *)
6715*6236dae4SAndroid Build Coastguard Worker                lt_outputfile=$lt_outputfile.exe
6716*6236dae4SAndroid Build Coastguard Worker                lt_tool_outputfile=$lt_tool_outputfile.exe
6717*6236dae4SAndroid Build Coastguard Worker                ;;
6718*6236dae4SAndroid Build Coastguard Worker            esac~
6719*6236dae4SAndroid Build Coastguard Worker            func_to_tool_file "$lt_outputfile"~
6720*6236dae4SAndroid Build Coastguard Worker            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6721*6236dae4SAndroid Build Coastguard Worker              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6722*6236dae4SAndroid Build Coastguard Worker              $RM "$lt_outputfile.manifest";
6723*6236dae4SAndroid Build Coastguard Worker            fi'
6724*6236dae4SAndroid Build Coastguard Worker	  ;;
6725*6236dae4SAndroid Build Coastguard Worker	*)
6726*6236dae4SAndroid Build Coastguard Worker	  # g++
6727*6236dae4SAndroid Build Coastguard Worker	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6728*6236dae4SAndroid Build Coastguard Worker	  # as there is no search path for DLLs.
6729*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6730*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6731*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6732*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(always_export_symbols, $1)=no
6733*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6734*6236dae4SAndroid Build Coastguard Worker
6735*6236dae4SAndroid Build Coastguard Worker	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6736*6236dae4SAndroid 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'
6737*6236dae4SAndroid Build Coastguard Worker	    # If the export-symbols file already is a .def file, use it as
6738*6236dae4SAndroid Build Coastguard Worker	    # is; otherwise, prepend EXPORTS...
6739*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6740*6236dae4SAndroid Build Coastguard Worker              cp $export_symbols $output_objdir/$soname.def;
6741*6236dae4SAndroid Build Coastguard Worker            else
6742*6236dae4SAndroid Build Coastguard Worker              echo EXPORTS > $output_objdir/$soname.def;
6743*6236dae4SAndroid Build Coastguard Worker              cat $export_symbols >> $output_objdir/$soname.def;
6744*6236dae4SAndroid Build Coastguard Worker            fi~
6745*6236dae4SAndroid 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'
6746*6236dae4SAndroid Build Coastguard Worker	  else
6747*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6748*6236dae4SAndroid Build Coastguard Worker	  fi
6749*6236dae4SAndroid Build Coastguard Worker	  ;;
6750*6236dae4SAndroid Build Coastguard Worker	esac
6751*6236dae4SAndroid Build Coastguard Worker	;;
6752*6236dae4SAndroid Build Coastguard Worker      darwin* | rhapsody*)
6753*6236dae4SAndroid Build Coastguard Worker        _LT_DARWIN_LINKER_FEATURES($1)
6754*6236dae4SAndroid Build Coastguard Worker	;;
6755*6236dae4SAndroid Build Coastguard Worker
6756*6236dae4SAndroid Build Coastguard Worker      os2*)
6757*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6758*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6759*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6760*6236dae4SAndroid Build Coastguard Worker	shrext_cmds=.dll
6761*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6762*6236dae4SAndroid Build Coastguard Worker	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6763*6236dae4SAndroid Build Coastguard Worker	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6764*6236dae4SAndroid Build Coastguard Worker	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6765*6236dae4SAndroid Build Coastguard Worker	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6766*6236dae4SAndroid Build Coastguard Worker	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6767*6236dae4SAndroid Build Coastguard Worker	  emximp -o $lib $output_objdir/$libname.def'
6768*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6769*6236dae4SAndroid Build Coastguard Worker	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6770*6236dae4SAndroid Build Coastguard Worker	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6771*6236dae4SAndroid Build Coastguard Worker	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6772*6236dae4SAndroid Build Coastguard Worker	  prefix_cmds="$SED"~
6773*6236dae4SAndroid Build Coastguard Worker	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6774*6236dae4SAndroid Build Coastguard Worker	    prefix_cmds="$prefix_cmds -e 1d";
6775*6236dae4SAndroid Build Coastguard Worker	  fi~
6776*6236dae4SAndroid Build Coastguard Worker	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6777*6236dae4SAndroid Build Coastguard Worker	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6778*6236dae4SAndroid Build Coastguard Worker	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6779*6236dae4SAndroid Build Coastguard Worker	  emximp -o $lib $output_objdir/$libname.def'
6780*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6781*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6782*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(file_list_spec, $1)='@'
6783*6236dae4SAndroid Build Coastguard Worker	;;
6784*6236dae4SAndroid Build Coastguard Worker
6785*6236dae4SAndroid Build Coastguard Worker      dgux*)
6786*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
6787*6236dae4SAndroid Build Coastguard Worker          ec++*)
6788*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6789*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6790*6236dae4SAndroid Build Coastguard Worker	    ;;
6791*6236dae4SAndroid Build Coastguard Worker          ghcx*)
6792*6236dae4SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
6793*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6794*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6795*6236dae4SAndroid Build Coastguard Worker	    ;;
6796*6236dae4SAndroid Build Coastguard Worker          *)
6797*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6798*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6799*6236dae4SAndroid Build Coastguard Worker	    ;;
6800*6236dae4SAndroid Build Coastguard Worker        esac
6801*6236dae4SAndroid Build Coastguard Worker        ;;
6802*6236dae4SAndroid Build Coastguard Worker
6803*6236dae4SAndroid Build Coastguard Worker      freebsd2.*)
6804*6236dae4SAndroid Build Coastguard Worker        # C++ shared libraries reported to be fairly broken before
6805*6236dae4SAndroid Build Coastguard Worker	# switch to ELF
6806*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6807*6236dae4SAndroid Build Coastguard Worker        ;;
6808*6236dae4SAndroid Build Coastguard Worker
6809*6236dae4SAndroid Build Coastguard Worker      freebsd-elf*)
6810*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6811*6236dae4SAndroid Build Coastguard Worker        ;;
6812*6236dae4SAndroid Build Coastguard Worker
6813*6236dae4SAndroid Build Coastguard Worker      freebsd* | dragonfly* | midnightbsd*)
6814*6236dae4SAndroid Build Coastguard Worker        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6815*6236dae4SAndroid Build Coastguard Worker        # conventions
6816*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=yes
6817*6236dae4SAndroid Build Coastguard Worker        ;;
6818*6236dae4SAndroid Build Coastguard Worker
6819*6236dae4SAndroid Build Coastguard Worker      haiku*)
6820*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6821*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(link_all_deplibs, $1)=yes
6822*6236dae4SAndroid Build Coastguard Worker        ;;
6823*6236dae4SAndroid Build Coastguard Worker
6824*6236dae4SAndroid Build Coastguard Worker      hpux9*)
6825*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6826*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6827*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6828*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct, $1)=yes
6829*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6830*6236dae4SAndroid Build Coastguard Worker				             # but as the default
6831*6236dae4SAndroid Build Coastguard Worker				             # location of the library.
6832*6236dae4SAndroid Build Coastguard Worker
6833*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
6834*6236dae4SAndroid Build Coastguard Worker          CC*)
6835*6236dae4SAndroid Build Coastguard Worker            # FIXME: insert proper C++ library support
6836*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(ld_shlibs, $1)=no
6837*6236dae4SAndroid Build Coastguard Worker            ;;
6838*6236dae4SAndroid Build Coastguard Worker          aCC*)
6839*6236dae4SAndroid 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'
6840*6236dae4SAndroid Build Coastguard Worker            # Commands to make compiler produce verbose output that lists
6841*6236dae4SAndroid Build Coastguard Worker            # what "hidden" libraries, object files and flags are used when
6842*6236dae4SAndroid Build Coastguard Worker            # linking a shared library.
6843*6236dae4SAndroid Build Coastguard Worker            #
6844*6236dae4SAndroid Build Coastguard Worker            # There doesn't appear to be a way to prevent this compiler from
6845*6236dae4SAndroid Build Coastguard Worker            # explicitly linking system object files so we need to strip them
6846*6236dae4SAndroid Build Coastguard Worker            # from the output so that they don't get included in the library
6847*6236dae4SAndroid Build Coastguard Worker            # dependencies.
6848*6236dae4SAndroid 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"'
6849*6236dae4SAndroid Build Coastguard Worker            ;;
6850*6236dae4SAndroid Build Coastguard Worker          *)
6851*6236dae4SAndroid Build Coastguard Worker            if test yes = "$GXX"; then
6852*6236dae4SAndroid 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'
6853*6236dae4SAndroid Build Coastguard Worker            else
6854*6236dae4SAndroid Build Coastguard Worker              # FIXME: insert proper C++ library support
6855*6236dae4SAndroid Build Coastguard Worker              _LT_TAGVAR(ld_shlibs, $1)=no
6856*6236dae4SAndroid Build Coastguard Worker            fi
6857*6236dae4SAndroid Build Coastguard Worker            ;;
6858*6236dae4SAndroid Build Coastguard Worker        esac
6859*6236dae4SAndroid Build Coastguard Worker        ;;
6860*6236dae4SAndroid Build Coastguard Worker
6861*6236dae4SAndroid Build Coastguard Worker      hpux10*|hpux11*)
6862*6236dae4SAndroid Build Coastguard Worker        if test no = "$with_gnu_ld"; then
6863*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6864*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6865*6236dae4SAndroid Build Coastguard Worker
6866*6236dae4SAndroid Build Coastguard Worker          case $host_cpu in
6867*6236dae4SAndroid Build Coastguard Worker            hppa*64*|ia64*)
6868*6236dae4SAndroid Build Coastguard Worker              ;;
6869*6236dae4SAndroid Build Coastguard Worker            *)
6870*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6871*6236dae4SAndroid Build Coastguard Worker              ;;
6872*6236dae4SAndroid Build Coastguard Worker          esac
6873*6236dae4SAndroid Build Coastguard Worker        fi
6874*6236dae4SAndroid Build Coastguard Worker        case $host_cpu in
6875*6236dae4SAndroid Build Coastguard Worker          hppa*64*|ia64*)
6876*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct, $1)=no
6877*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6878*6236dae4SAndroid Build Coastguard Worker            ;;
6879*6236dae4SAndroid Build Coastguard Worker          *)
6880*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct, $1)=yes
6881*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6882*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6883*6236dae4SAndroid Build Coastguard Worker					         # but as the default
6884*6236dae4SAndroid Build Coastguard Worker					         # location of the library.
6885*6236dae4SAndroid Build Coastguard Worker            ;;
6886*6236dae4SAndroid Build Coastguard Worker        esac
6887*6236dae4SAndroid Build Coastguard Worker
6888*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
6889*6236dae4SAndroid Build Coastguard Worker          CC*)
6890*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6891*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6892*6236dae4SAndroid Build Coastguard Worker	    ;;
6893*6236dae4SAndroid Build Coastguard Worker          aCC*)
6894*6236dae4SAndroid Build Coastguard Worker	    case $host_cpu in
6895*6236dae4SAndroid Build Coastguard Worker	      hppa*64*)
6896*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6897*6236dae4SAndroid Build Coastguard Worker	        ;;
6898*6236dae4SAndroid Build Coastguard Worker	      ia64*)
6899*6236dae4SAndroid 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'
6900*6236dae4SAndroid Build Coastguard Worker	        ;;
6901*6236dae4SAndroid Build Coastguard Worker	      *)
6902*6236dae4SAndroid 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'
6903*6236dae4SAndroid Build Coastguard Worker	        ;;
6904*6236dae4SAndroid Build Coastguard Worker	    esac
6905*6236dae4SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6906*6236dae4SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6907*6236dae4SAndroid Build Coastguard Worker	    # linking a shared library.
6908*6236dae4SAndroid Build Coastguard Worker	    #
6909*6236dae4SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6910*6236dae4SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6911*6236dae4SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6912*6236dae4SAndroid Build Coastguard Worker	    # dependencies.
6913*6236dae4SAndroid 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"'
6914*6236dae4SAndroid Build Coastguard Worker	    ;;
6915*6236dae4SAndroid Build Coastguard Worker          *)
6916*6236dae4SAndroid Build Coastguard Worker	    if test yes = "$GXX"; then
6917*6236dae4SAndroid Build Coastguard Worker	      if test no = "$with_gnu_ld"; then
6918*6236dae4SAndroid Build Coastguard Worker	        case $host_cpu in
6919*6236dae4SAndroid Build Coastguard Worker	          hppa*64*)
6920*6236dae4SAndroid 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'
6921*6236dae4SAndroid Build Coastguard Worker	            ;;
6922*6236dae4SAndroid Build Coastguard Worker	          ia64*)
6923*6236dae4SAndroid 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'
6924*6236dae4SAndroid Build Coastguard Worker	            ;;
6925*6236dae4SAndroid Build Coastguard Worker	          *)
6926*6236dae4SAndroid 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'
6927*6236dae4SAndroid Build Coastguard Worker	            ;;
6928*6236dae4SAndroid Build Coastguard Worker	        esac
6929*6236dae4SAndroid Build Coastguard Worker	      fi
6930*6236dae4SAndroid Build Coastguard Worker	    else
6931*6236dae4SAndroid Build Coastguard Worker	      # FIXME: insert proper C++ library support
6932*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(ld_shlibs, $1)=no
6933*6236dae4SAndroid Build Coastguard Worker	    fi
6934*6236dae4SAndroid Build Coastguard Worker	    ;;
6935*6236dae4SAndroid Build Coastguard Worker        esac
6936*6236dae4SAndroid Build Coastguard Worker        ;;
6937*6236dae4SAndroid Build Coastguard Worker
6938*6236dae4SAndroid Build Coastguard Worker      interix[[3-9]]*)
6939*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=no
6940*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6941*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6942*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6943*6236dae4SAndroid Build Coastguard Worker	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6944*6236dae4SAndroid Build Coastguard Worker	# Instead, shared libraries are loaded at an image base (0x10000000 by
6945*6236dae4SAndroid Build Coastguard Worker	# default) and relocated if they conflict, which is a slow very memory
6946*6236dae4SAndroid Build Coastguard Worker	# consuming and fragmenting process.  To avoid this, we pick a random,
6947*6236dae4SAndroid Build Coastguard Worker	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6948*6236dae4SAndroid Build Coastguard Worker	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6949*6236dae4SAndroid 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'
6950*6236dae4SAndroid 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'
6951*6236dae4SAndroid Build Coastguard Worker	;;
6952*6236dae4SAndroid Build Coastguard Worker      irix5* | irix6*)
6953*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
6954*6236dae4SAndroid Build Coastguard Worker          CC*)
6955*6236dae4SAndroid Build Coastguard Worker	    # SGI C++
6956*6236dae4SAndroid 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'
6957*6236dae4SAndroid Build Coastguard Worker
6958*6236dae4SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6959*6236dae4SAndroid Build Coastguard Worker	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6960*6236dae4SAndroid Build Coastguard Worker	    # necessary to make sure instantiated templates are included
6961*6236dae4SAndroid Build Coastguard Worker	    # in the archive.
6962*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6963*6236dae4SAndroid Build Coastguard Worker	    ;;
6964*6236dae4SAndroid Build Coastguard Worker          *)
6965*6236dae4SAndroid Build Coastguard Worker	    if test yes = "$GXX"; then
6966*6236dae4SAndroid Build Coastguard Worker	      if test no = "$with_gnu_ld"; then
6967*6236dae4SAndroid 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'
6968*6236dae4SAndroid Build Coastguard Worker	      else
6969*6236dae4SAndroid 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'
6970*6236dae4SAndroid Build Coastguard Worker	      fi
6971*6236dae4SAndroid Build Coastguard Worker	    fi
6972*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6973*6236dae4SAndroid Build Coastguard Worker	    ;;
6974*6236dae4SAndroid Build Coastguard Worker        esac
6975*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6976*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6977*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(inherit_rpath, $1)=yes
6978*6236dae4SAndroid Build Coastguard Worker        ;;
6979*6236dae4SAndroid Build Coastguard Worker
6980*6236dae4SAndroid Build Coastguard Worker      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6981*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
6982*6236dae4SAndroid Build Coastguard Worker          KCC*)
6983*6236dae4SAndroid Build Coastguard Worker	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6984*6236dae4SAndroid Build Coastguard Worker
6985*6236dae4SAndroid Build Coastguard Worker	    # KCC will only create a shared library if the output file
6986*6236dae4SAndroid Build Coastguard Worker	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6987*6236dae4SAndroid Build Coastguard Worker	    # to its proper name (with version) after linking.
6988*6236dae4SAndroid 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'
6989*6236dae4SAndroid 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'
6990*6236dae4SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6991*6236dae4SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6992*6236dae4SAndroid Build Coastguard Worker	    # linking a shared library.
6993*6236dae4SAndroid Build Coastguard Worker	    #
6994*6236dae4SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6995*6236dae4SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6996*6236dae4SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6997*6236dae4SAndroid Build Coastguard Worker	    # dependencies.
6998*6236dae4SAndroid 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"'
6999*6236dae4SAndroid Build Coastguard Worker
7000*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7001*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7002*6236dae4SAndroid Build Coastguard Worker
7003*6236dae4SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
7004*6236dae4SAndroid Build Coastguard Worker	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7005*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7006*6236dae4SAndroid Build Coastguard Worker	    ;;
7007*6236dae4SAndroid Build Coastguard Worker	  icpc* | ecpc* )
7008*6236dae4SAndroid Build Coastguard Worker	    # Intel C++
7009*6236dae4SAndroid Build Coastguard Worker	    with_gnu_ld=yes
7010*6236dae4SAndroid Build Coastguard Worker	    # version 8.0 and above of icpc choke on multiply defined symbols
7011*6236dae4SAndroid Build Coastguard Worker	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7012*6236dae4SAndroid Build Coastguard Worker	    # earlier do not add the objects themselves.
7013*6236dae4SAndroid Build Coastguard Worker	    case `$CC -V 2>&1` in
7014*6236dae4SAndroid Build Coastguard Worker	      *"Version 7."*)
7015*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7016*6236dae4SAndroid 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'
7017*6236dae4SAndroid Build Coastguard Worker		;;
7018*6236dae4SAndroid Build Coastguard Worker	      *)  # Version 8.0 or newer
7019*6236dae4SAndroid Build Coastguard Worker	        tmp_idyn=
7020*6236dae4SAndroid Build Coastguard Worker	        case $host_cpu in
7021*6236dae4SAndroid Build Coastguard Worker		  ia64*) tmp_idyn=' -i_dynamic';;
7022*6236dae4SAndroid Build Coastguard Worker		esac
7023*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7024*6236dae4SAndroid 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'
7025*6236dae4SAndroid Build Coastguard Worker		;;
7026*6236dae4SAndroid Build Coastguard Worker	    esac
7027*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7028*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7029*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7030*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7031*6236dae4SAndroid Build Coastguard Worker	    ;;
7032*6236dae4SAndroid Build Coastguard Worker          pgCC* | pgcpp*)
7033*6236dae4SAndroid Build Coastguard Worker            # Portland Group C++ compiler
7034*6236dae4SAndroid Build Coastguard Worker	    case `$CC -V` in
7035*6236dae4SAndroid Build Coastguard Worker	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7036*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7037*6236dae4SAndroid Build Coastguard Worker               rm -rf $tpldir~
7038*6236dae4SAndroid Build Coastguard Worker               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7039*6236dae4SAndroid Build Coastguard Worker               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7040*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7041*6236dae4SAndroid Build Coastguard Worker                rm -rf $tpldir~
7042*6236dae4SAndroid Build Coastguard Worker                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7043*6236dae4SAndroid Build Coastguard Worker                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7044*6236dae4SAndroid Build Coastguard Worker                $RANLIB $oldlib'
7045*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7046*6236dae4SAndroid Build Coastguard Worker                rm -rf $tpldir~
7047*6236dae4SAndroid Build Coastguard Worker                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7048*6236dae4SAndroid 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'
7049*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7050*6236dae4SAndroid Build Coastguard Worker                rm -rf $tpldir~
7051*6236dae4SAndroid Build Coastguard Worker                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7052*6236dae4SAndroid 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'
7053*6236dae4SAndroid Build Coastguard Worker	      ;;
7054*6236dae4SAndroid Build Coastguard Worker	    *) # Version 6 and above use weak symbols
7055*6236dae4SAndroid 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'
7056*6236dae4SAndroid 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'
7057*6236dae4SAndroid Build Coastguard Worker	      ;;
7058*6236dae4SAndroid Build Coastguard Worker	    esac
7059*6236dae4SAndroid Build Coastguard Worker
7060*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7061*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7062*6236dae4SAndroid 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'
7063*6236dae4SAndroid Build Coastguard Worker            ;;
7064*6236dae4SAndroid Build Coastguard Worker	  cxx*)
7065*6236dae4SAndroid Build Coastguard Worker	    # Compaq C++
7066*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7067*6236dae4SAndroid 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'
7068*6236dae4SAndroid Build Coastguard Worker
7069*6236dae4SAndroid Build Coastguard Worker	    runpath_var=LD_RUN_PATH
7070*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7071*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7072*6236dae4SAndroid Build Coastguard Worker
7073*6236dae4SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
7074*6236dae4SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
7075*6236dae4SAndroid Build Coastguard Worker	    # linking a shared library.
7076*6236dae4SAndroid Build Coastguard Worker	    #
7077*6236dae4SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
7078*6236dae4SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
7079*6236dae4SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
7080*6236dae4SAndroid Build Coastguard Worker	    # dependencies.
7081*6236dae4SAndroid 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'
7082*6236dae4SAndroid Build Coastguard Worker	    ;;
7083*6236dae4SAndroid Build Coastguard Worker	  xl* | mpixl* | bgxl*)
7084*6236dae4SAndroid Build Coastguard Worker	    # IBM XL 8.0 on PPC, with GNU ld
7085*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7086*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7087*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7088*6236dae4SAndroid Build Coastguard Worker	    if test yes = "$supports_anon_versioning"; then
7089*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7090*6236dae4SAndroid Build Coastguard Worker                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7091*6236dae4SAndroid Build Coastguard Worker                echo "local: *; };" >> $output_objdir/$libname.ver~
7092*6236dae4SAndroid Build Coastguard Worker                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7093*6236dae4SAndroid Build Coastguard Worker	    fi
7094*6236dae4SAndroid Build Coastguard Worker	    ;;
7095*6236dae4SAndroid Build Coastguard Worker	  *)
7096*6236dae4SAndroid Build Coastguard Worker	    case `$CC -V 2>&1 | $SED 5q` in
7097*6236dae4SAndroid Build Coastguard Worker	    *Sun\ C*)
7098*6236dae4SAndroid Build Coastguard Worker	      # Sun C++ 5.9
7099*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7100*6236dae4SAndroid 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'
7101*6236dae4SAndroid 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'
7102*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7103*6236dae4SAndroid 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'
7104*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7105*6236dae4SAndroid Build Coastguard Worker
7106*6236dae4SAndroid Build Coastguard Worker	      # Not sure whether something based on
7107*6236dae4SAndroid Build Coastguard Worker	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7108*6236dae4SAndroid Build Coastguard Worker	      # would be better.
7109*6236dae4SAndroid Build Coastguard Worker	      output_verbose_link_cmd='func_echo_all'
7110*6236dae4SAndroid Build Coastguard Worker
7111*6236dae4SAndroid Build Coastguard Worker	      # Archives containing C++ object files must be created using
7112*6236dae4SAndroid Build Coastguard Worker	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7113*6236dae4SAndroid Build Coastguard Worker	      # necessary to make sure instantiated templates are included
7114*6236dae4SAndroid Build Coastguard Worker	      # in the archive.
7115*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7116*6236dae4SAndroid Build Coastguard Worker	      ;;
7117*6236dae4SAndroid Build Coastguard Worker	    esac
7118*6236dae4SAndroid Build Coastguard Worker	    ;;
7119*6236dae4SAndroid Build Coastguard Worker	esac
7120*6236dae4SAndroid Build Coastguard Worker	;;
7121*6236dae4SAndroid Build Coastguard Worker
7122*6236dae4SAndroid Build Coastguard Worker      lynxos*)
7123*6236dae4SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7124*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
7125*6236dae4SAndroid Build Coastguard Worker	;;
7126*6236dae4SAndroid Build Coastguard Worker
7127*6236dae4SAndroid Build Coastguard Worker      m88k*)
7128*6236dae4SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7129*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7130*6236dae4SAndroid Build Coastguard Worker	;;
7131*6236dae4SAndroid Build Coastguard Worker
7132*6236dae4SAndroid Build Coastguard Worker      mvs*)
7133*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
7134*6236dae4SAndroid Build Coastguard Worker          cxx*)
7135*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7136*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7137*6236dae4SAndroid Build Coastguard Worker	    ;;
7138*6236dae4SAndroid Build Coastguard Worker	  *)
7139*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7140*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7141*6236dae4SAndroid Build Coastguard Worker	    ;;
7142*6236dae4SAndroid Build Coastguard Worker	esac
7143*6236dae4SAndroid Build Coastguard Worker	;;
7144*6236dae4SAndroid Build Coastguard Worker
7145*6236dae4SAndroid Build Coastguard Worker      netbsd*)
7146*6236dae4SAndroid Build Coastguard Worker        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7147*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7148*6236dae4SAndroid Build Coastguard Worker	  wlarc=
7149*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7150*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
7151*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7152*6236dae4SAndroid Build Coastguard Worker	fi
7153*6236dae4SAndroid Build Coastguard Worker	# Workaround some broken pre-1.5 toolchains
7154*6236dae4SAndroid Build Coastguard Worker	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7155*6236dae4SAndroid Build Coastguard Worker	;;
7156*6236dae4SAndroid Build Coastguard Worker
7157*6236dae4SAndroid Build Coastguard Worker      *nto* | *qnx*)
7158*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=yes
7159*6236dae4SAndroid Build Coastguard Worker	;;
7160*6236dae4SAndroid Build Coastguard Worker
7161*6236dae4SAndroid Build Coastguard Worker      openbsd* | bitrig*)
7162*6236dae4SAndroid Build Coastguard Worker	if test -f /usr/libexec/ld.so; then
7163*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
7164*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7165*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7166*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7167*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7168*6236dae4SAndroid Build Coastguard Worker	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7169*6236dae4SAndroid 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'
7170*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7171*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7172*6236dae4SAndroid Build Coastguard Worker	  fi
7173*6236dae4SAndroid Build Coastguard Worker	  output_verbose_link_cmd=func_echo_all
7174*6236dae4SAndroid Build Coastguard Worker	else
7175*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
7176*6236dae4SAndroid Build Coastguard Worker	fi
7177*6236dae4SAndroid Build Coastguard Worker	;;
7178*6236dae4SAndroid Build Coastguard Worker
7179*6236dae4SAndroid Build Coastguard Worker      osf3* | osf4* | osf5*)
7180*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
7181*6236dae4SAndroid Build Coastguard Worker          KCC*)
7182*6236dae4SAndroid Build Coastguard Worker	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7183*6236dae4SAndroid Build Coastguard Worker
7184*6236dae4SAndroid Build Coastguard Worker	    # KCC will only create a shared library if the output file
7185*6236dae4SAndroid Build Coastguard Worker	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7186*6236dae4SAndroid Build Coastguard Worker	    # to its proper name (with version) after linking.
7187*6236dae4SAndroid 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'
7188*6236dae4SAndroid Build Coastguard Worker
7189*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7190*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7191*6236dae4SAndroid Build Coastguard Worker
7192*6236dae4SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
7193*6236dae4SAndroid Build Coastguard Worker	    # the KAI C++ compiler.
7194*6236dae4SAndroid Build Coastguard Worker	    case $host in
7195*6236dae4SAndroid Build Coastguard Worker	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7196*6236dae4SAndroid Build Coastguard Worker	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7197*6236dae4SAndroid Build Coastguard Worker	    esac
7198*6236dae4SAndroid Build Coastguard Worker	    ;;
7199*6236dae4SAndroid Build Coastguard Worker          RCC*)
7200*6236dae4SAndroid Build Coastguard Worker	    # Rational C++ 2.4.1
7201*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7202*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7203*6236dae4SAndroid Build Coastguard Worker	    ;;
7204*6236dae4SAndroid Build Coastguard Worker          cxx*)
7205*6236dae4SAndroid Build Coastguard Worker	    case $host in
7206*6236dae4SAndroid Build Coastguard Worker	      osf3*)
7207*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7208*6236dae4SAndroid 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'
7209*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7210*6236dae4SAndroid Build Coastguard Worker		;;
7211*6236dae4SAndroid Build Coastguard Worker	      *)
7212*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7213*6236dae4SAndroid 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'
7214*6236dae4SAndroid 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~
7215*6236dae4SAndroid Build Coastguard Worker                  echo "-hidden">> $lib.exp~
7216*6236dae4SAndroid 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~
7217*6236dae4SAndroid Build Coastguard Worker                  $RM $lib.exp'
7218*6236dae4SAndroid Build Coastguard Worker	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7219*6236dae4SAndroid Build Coastguard Worker		;;
7220*6236dae4SAndroid Build Coastguard Worker	    esac
7221*6236dae4SAndroid Build Coastguard Worker
7222*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7223*6236dae4SAndroid Build Coastguard Worker
7224*6236dae4SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
7225*6236dae4SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
7226*6236dae4SAndroid Build Coastguard Worker	    # linking a shared library.
7227*6236dae4SAndroid Build Coastguard Worker	    #
7228*6236dae4SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
7229*6236dae4SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
7230*6236dae4SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
7231*6236dae4SAndroid Build Coastguard Worker	    # dependencies.
7232*6236dae4SAndroid 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"'
7233*6236dae4SAndroid Build Coastguard Worker	    ;;
7234*6236dae4SAndroid Build Coastguard Worker	  *)
7235*6236dae4SAndroid Build Coastguard Worker	    if test yes,no = "$GXX,$with_gnu_ld"; then
7236*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7237*6236dae4SAndroid Build Coastguard Worker	      case $host in
7238*6236dae4SAndroid Build Coastguard Worker	        osf3*)
7239*6236dae4SAndroid 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'
7240*6236dae4SAndroid Build Coastguard Worker		  ;;
7241*6236dae4SAndroid Build Coastguard Worker	        *)
7242*6236dae4SAndroid 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'
7243*6236dae4SAndroid Build Coastguard Worker		  ;;
7244*6236dae4SAndroid Build Coastguard Worker	      esac
7245*6236dae4SAndroid Build Coastguard Worker
7246*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7247*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7248*6236dae4SAndroid Build Coastguard Worker
7249*6236dae4SAndroid Build Coastguard Worker	      # Commands to make compiler produce verbose output that lists
7250*6236dae4SAndroid Build Coastguard Worker	      # what "hidden" libraries, object files and flags are used when
7251*6236dae4SAndroid Build Coastguard Worker	      # linking a shared library.
7252*6236dae4SAndroid Build Coastguard Worker	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7253*6236dae4SAndroid Build Coastguard Worker
7254*6236dae4SAndroid Build Coastguard Worker	    else
7255*6236dae4SAndroid Build Coastguard Worker	      # FIXME: insert proper C++ library support
7256*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(ld_shlibs, $1)=no
7257*6236dae4SAndroid Build Coastguard Worker	    fi
7258*6236dae4SAndroid Build Coastguard Worker	    ;;
7259*6236dae4SAndroid Build Coastguard Worker        esac
7260*6236dae4SAndroid Build Coastguard Worker        ;;
7261*6236dae4SAndroid Build Coastguard Worker
7262*6236dae4SAndroid Build Coastguard Worker      psos*)
7263*6236dae4SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7264*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7265*6236dae4SAndroid Build Coastguard Worker        ;;
7266*6236dae4SAndroid Build Coastguard Worker
7267*6236dae4SAndroid Build Coastguard Worker      sunos4*)
7268*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
7269*6236dae4SAndroid Build Coastguard Worker          CC*)
7270*6236dae4SAndroid Build Coastguard Worker	    # Sun C++ 4.x
7271*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7272*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7273*6236dae4SAndroid Build Coastguard Worker	    ;;
7274*6236dae4SAndroid Build Coastguard Worker          lcc*)
7275*6236dae4SAndroid Build Coastguard Worker	    # Lucid
7276*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7277*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7278*6236dae4SAndroid Build Coastguard Worker	    ;;
7279*6236dae4SAndroid Build Coastguard Worker          *)
7280*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7281*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7282*6236dae4SAndroid Build Coastguard Worker	    ;;
7283*6236dae4SAndroid Build Coastguard Worker        esac
7284*6236dae4SAndroid Build Coastguard Worker        ;;
7285*6236dae4SAndroid Build Coastguard Worker
7286*6236dae4SAndroid Build Coastguard Worker      solaris*)
7287*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
7288*6236dae4SAndroid Build Coastguard Worker          CC* | sunCC*)
7289*6236dae4SAndroid Build Coastguard Worker	    # Sun C++ 4.2, 5.x and Centerline C++
7290*6236dae4SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7291*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7292*6236dae4SAndroid 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'
7293*6236dae4SAndroid 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~
7294*6236dae4SAndroid 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'
7295*6236dae4SAndroid Build Coastguard Worker
7296*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7297*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7298*6236dae4SAndroid Build Coastguard Worker	    case $host_os in
7299*6236dae4SAndroid Build Coastguard Worker	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7300*6236dae4SAndroid Build Coastguard Worker	      *)
7301*6236dae4SAndroid Build Coastguard Worker		# The compiler driver will combine and reorder linker options,
7302*6236dae4SAndroid Build Coastguard Worker		# but understands '-z linker_flag'.
7303*6236dae4SAndroid Build Coastguard Worker	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7304*6236dae4SAndroid Build Coastguard Worker		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7305*6236dae4SAndroid Build Coastguard Worker	        ;;
7306*6236dae4SAndroid Build Coastguard Worker	    esac
7307*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7308*6236dae4SAndroid Build Coastguard Worker
7309*6236dae4SAndroid Build Coastguard Worker	    output_verbose_link_cmd='func_echo_all'
7310*6236dae4SAndroid Build Coastguard Worker
7311*6236dae4SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
7312*6236dae4SAndroid Build Coastguard Worker	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7313*6236dae4SAndroid Build Coastguard Worker	    # necessary to make sure instantiated templates are included
7314*6236dae4SAndroid Build Coastguard Worker	    # in the archive.
7315*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7316*6236dae4SAndroid Build Coastguard Worker	    ;;
7317*6236dae4SAndroid Build Coastguard Worker          gcx*)
7318*6236dae4SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
7319*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7320*6236dae4SAndroid Build Coastguard Worker
7321*6236dae4SAndroid Build Coastguard Worker	    # The C++ compiler must be used to create the archive.
7322*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7323*6236dae4SAndroid Build Coastguard Worker	    ;;
7324*6236dae4SAndroid Build Coastguard Worker          *)
7325*6236dae4SAndroid Build Coastguard Worker	    # GNU C++ compiler with Solaris linker
7326*6236dae4SAndroid Build Coastguard Worker	    if test yes,no = "$GXX,$with_gnu_ld"; then
7327*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7328*6236dae4SAndroid Build Coastguard Worker	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7329*6236dae4SAndroid 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'
7330*6236dae4SAndroid 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~
7331*6236dae4SAndroid 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'
7332*6236dae4SAndroid Build Coastguard Worker
7333*6236dae4SAndroid Build Coastguard Worker	        # Commands to make compiler produce verbose output that lists
7334*6236dae4SAndroid Build Coastguard Worker	        # what "hidden" libraries, object files and flags are used when
7335*6236dae4SAndroid Build Coastguard Worker	        # linking a shared library.
7336*6236dae4SAndroid Build Coastguard Worker	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7337*6236dae4SAndroid Build Coastguard Worker	      else
7338*6236dae4SAndroid Build Coastguard Worker	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7339*6236dae4SAndroid Build Coastguard Worker	        # platform.
7340*6236dae4SAndroid 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'
7341*6236dae4SAndroid 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~
7342*6236dae4SAndroid 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'
7343*6236dae4SAndroid Build Coastguard Worker
7344*6236dae4SAndroid Build Coastguard Worker	        # Commands to make compiler produce verbose output that lists
7345*6236dae4SAndroid Build Coastguard Worker	        # what "hidden" libraries, object files and flags are used when
7346*6236dae4SAndroid Build Coastguard Worker	        # linking a shared library.
7347*6236dae4SAndroid Build Coastguard Worker	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7348*6236dae4SAndroid Build Coastguard Worker	      fi
7349*6236dae4SAndroid Build Coastguard Worker
7350*6236dae4SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7351*6236dae4SAndroid Build Coastguard Worker	      case $host_os in
7352*6236dae4SAndroid Build Coastguard Worker		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7353*6236dae4SAndroid Build Coastguard Worker		*)
7354*6236dae4SAndroid Build Coastguard Worker		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7355*6236dae4SAndroid Build Coastguard Worker		  ;;
7356*6236dae4SAndroid Build Coastguard Worker	      esac
7357*6236dae4SAndroid Build Coastguard Worker	    fi
7358*6236dae4SAndroid Build Coastguard Worker	    ;;
7359*6236dae4SAndroid Build Coastguard Worker        esac
7360*6236dae4SAndroid Build Coastguard Worker        ;;
7361*6236dae4SAndroid Build Coastguard Worker
7362*6236dae4SAndroid Build Coastguard Worker    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7363*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7364*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7365*6236dae4SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7366*6236dae4SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
7367*6236dae4SAndroid Build Coastguard Worker
7368*6236dae4SAndroid Build Coastguard Worker      case $cc_basename in
7369*6236dae4SAndroid Build Coastguard Worker        CC*)
7370*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7371*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7372*6236dae4SAndroid Build Coastguard Worker	  ;;
7373*6236dae4SAndroid Build Coastguard Worker	*)
7374*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7375*6236dae4SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7376*6236dae4SAndroid Build Coastguard Worker	  ;;
7377*6236dae4SAndroid Build Coastguard Worker      esac
7378*6236dae4SAndroid Build Coastguard Worker      ;;
7379*6236dae4SAndroid Build Coastguard Worker
7380*6236dae4SAndroid Build Coastguard Worker      sysv5* | sco3.2v5* | sco5v6*)
7381*6236dae4SAndroid Build Coastguard Worker	# Note: We CANNOT use -z defs as we might desire, because we do not
7382*6236dae4SAndroid Build Coastguard Worker	# link with -lc, and that would cause any symbols used from libc to
7383*6236dae4SAndroid Build Coastguard Worker	# always be unresolved, which means just about no library would
7384*6236dae4SAndroid Build Coastguard Worker	# ever link correctly.  If we're not using GNU ld we use -z text
7385*6236dae4SAndroid Build Coastguard Worker	# though, which does catch some bad symbols but isn't as heavy-handed
7386*6236dae4SAndroid Build Coastguard Worker	# as -z defs.
7387*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7388*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7389*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7390*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7391*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7392*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7393*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(link_all_deplibs, $1)=yes
7394*6236dae4SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7395*6236dae4SAndroid Build Coastguard Worker	runpath_var='LD_RUN_PATH'
7396*6236dae4SAndroid Build Coastguard Worker
7397*6236dae4SAndroid Build Coastguard Worker	case $cc_basename in
7398*6236dae4SAndroid Build Coastguard Worker          CC*)
7399*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7400*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7401*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7402*6236dae4SAndroid Build Coastguard Worker              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7403*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7404*6236dae4SAndroid Build Coastguard Worker              '"$_LT_TAGVAR(reload_cmds, $1)"
7405*6236dae4SAndroid Build Coastguard Worker	    ;;
7406*6236dae4SAndroid Build Coastguard Worker	  *)
7407*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7408*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7409*6236dae4SAndroid Build Coastguard Worker	    ;;
7410*6236dae4SAndroid Build Coastguard Worker	esac
7411*6236dae4SAndroid Build Coastguard Worker      ;;
7412*6236dae4SAndroid Build Coastguard Worker
7413*6236dae4SAndroid Build Coastguard Worker      tandem*)
7414*6236dae4SAndroid Build Coastguard Worker        case $cc_basename in
7415*6236dae4SAndroid Build Coastguard Worker          NCC*)
7416*6236dae4SAndroid Build Coastguard Worker	    # NonStop-UX NCC 3.20
7417*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7418*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7419*6236dae4SAndroid Build Coastguard Worker	    ;;
7420*6236dae4SAndroid Build Coastguard Worker          *)
7421*6236dae4SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
7422*6236dae4SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
7423*6236dae4SAndroid Build Coastguard Worker	    ;;
7424*6236dae4SAndroid Build Coastguard Worker        esac
7425*6236dae4SAndroid Build Coastguard Worker        ;;
7426*6236dae4SAndroid Build Coastguard Worker
7427*6236dae4SAndroid Build Coastguard Worker      vxworks*)
7428*6236dae4SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7429*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7430*6236dae4SAndroid Build Coastguard Worker        ;;
7431*6236dae4SAndroid Build Coastguard Worker
7432*6236dae4SAndroid Build Coastguard Worker      *)
7433*6236dae4SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
7434*6236dae4SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
7435*6236dae4SAndroid Build Coastguard Worker        ;;
7436*6236dae4SAndroid Build Coastguard Worker    esac
7437*6236dae4SAndroid Build Coastguard Worker
7438*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7439*6236dae4SAndroid Build Coastguard Worker    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7440*6236dae4SAndroid Build Coastguard Worker
7441*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)=$GXX
7442*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)=$LD
7443*6236dae4SAndroid Build Coastguard Worker
7444*6236dae4SAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7445*6236dae4SAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7446*6236dae4SAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7447*6236dae4SAndroid Build Coastguard Worker    ## what you are doing...
7448*6236dae4SAndroid Build Coastguard Worker    _LT_SYS_HIDDEN_LIBDEPS($1)
7449*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7450*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7451*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7452*6236dae4SAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7453*6236dae4SAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7454*6236dae4SAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7455*6236dae4SAndroid Build Coastguard Worker
7456*6236dae4SAndroid Build Coastguard Worker    _LT_CONFIG($1)
7457*6236dae4SAndroid Build Coastguard Worker  fi # test -n "$compiler"
7458*6236dae4SAndroid Build Coastguard Worker
7459*6236dae4SAndroid Build Coastguard Worker  CC=$lt_save_CC
7460*6236dae4SAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7461*6236dae4SAndroid Build Coastguard Worker  LDCXX=$LD
7462*6236dae4SAndroid Build Coastguard Worker  LD=$lt_save_LD
7463*6236dae4SAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7464*6236dae4SAndroid Build Coastguard Worker  with_gnu_ld=$lt_save_with_gnu_ld
7465*6236dae4SAndroid Build Coastguard Worker  lt_cv_path_LDCXX=$lt_cv_path_LD
7466*6236dae4SAndroid Build Coastguard Worker  lt_cv_path_LD=$lt_save_path_LD
7467*6236dae4SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7468*6236dae4SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7469*6236dae4SAndroid Build Coastguard Workerfi # test yes != "$_lt_caught_CXX_error"
7470*6236dae4SAndroid Build Coastguard Worker
7471*6236dae4SAndroid Build Coastguard WorkerAC_LANG_POP
7472*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_CXX_CONFIG
7473*6236dae4SAndroid Build Coastguard Worker
7474*6236dae4SAndroid Build Coastguard Worker
7475*6236dae4SAndroid Build Coastguard Worker# _LT_FUNC_STRIPNAME_CNF
7476*6236dae4SAndroid Build Coastguard Worker# ----------------------
7477*6236dae4SAndroid Build Coastguard Worker# func_stripname_cnf prefix suffix name
7478*6236dae4SAndroid Build Coastguard Worker# strip PREFIX and SUFFIX off of NAME.
7479*6236dae4SAndroid Build Coastguard Worker# PREFIX and SUFFIX must not contain globbing or regex special
7480*6236dae4SAndroid Build Coastguard Worker# characters, hashes, percent signs, but SUFFIX may contain a leading
7481*6236dae4SAndroid Build Coastguard Worker# dot (in which case that matches only a dot).
7482*6236dae4SAndroid Build Coastguard Worker#
7483*6236dae4SAndroid Build Coastguard Worker# This function is identical to the (non-XSI) version of func_stripname,
7484*6236dae4SAndroid Build Coastguard Worker# except this one can be used by m4 code that may be executed by configure,
7485*6236dae4SAndroid Build Coastguard Worker# rather than the libtool script.
7486*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7487*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED])
7488*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7489*6236dae4SAndroid Build Coastguard Workerfunc_stripname_cnf ()
7490*6236dae4SAndroid Build Coastguard Worker{
7491*6236dae4SAndroid Build Coastguard Worker  case @S|@2 in
7492*6236dae4SAndroid Build Coastguard Worker  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7493*6236dae4SAndroid Build Coastguard Worker  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7494*6236dae4SAndroid Build Coastguard Worker  esac
7495*6236dae4SAndroid Build Coastguard Worker} # func_stripname_cnf
7496*6236dae4SAndroid Build Coastguard Worker])# _LT_FUNC_STRIPNAME_CNF
7497*6236dae4SAndroid Build Coastguard Worker
7498*6236dae4SAndroid Build Coastguard Worker
7499*6236dae4SAndroid Build Coastguard Worker# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7500*6236dae4SAndroid Build Coastguard Worker# ---------------------------------
7501*6236dae4SAndroid Build Coastguard Worker# Figure out "hidden" library dependencies from verbose
7502*6236dae4SAndroid Build Coastguard Worker# compiler output when linking a shared library.
7503*6236dae4SAndroid Build Coastguard Worker# Parse the compiler output and extract the necessary
7504*6236dae4SAndroid Build Coastguard Worker# objects, libraries and library flags.
7505*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7506*6236dae4SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7507*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7508*6236dae4SAndroid Build Coastguard Worker# Dependencies to place before and after the object being linked:
7509*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(predep_objects, $1)=
7510*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(postdep_objects, $1)=
7511*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(predeps, $1)=
7512*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(postdeps, $1)=
7513*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(compiler_lib_search_path, $1)=
7514*6236dae4SAndroid Build Coastguard Worker
7515*6236dae4SAndroid Build Coastguard Workerdnl we can't use the lt_simple_compile_test_code here,
7516*6236dae4SAndroid Build Coastguard Workerdnl because it contains code intended for an executable,
7517*6236dae4SAndroid Build Coastguard Workerdnl not a library.  It's possible we should let each
7518*6236dae4SAndroid Build Coastguard Workerdnl tag define a new lt_????_link_test_code variable,
7519*6236dae4SAndroid Build Coastguard Workerdnl but it's only used here...
7520*6236dae4SAndroid Build Coastguard Workerm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7521*6236dae4SAndroid Build Coastguard Workerint a;
7522*6236dae4SAndroid Build Coastguard Workervoid foo (void) { a = 0; }
7523*6236dae4SAndroid Build Coastguard Worker_LT_EOF
7524*6236dae4SAndroid Build Coastguard Worker], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7525*6236dae4SAndroid Build Coastguard Workerclass Foo
7526*6236dae4SAndroid Build Coastguard Worker{
7527*6236dae4SAndroid Build Coastguard Workerpublic:
7528*6236dae4SAndroid Build Coastguard Worker  Foo (void) { a = 0; }
7529*6236dae4SAndroid Build Coastguard Workerprivate:
7530*6236dae4SAndroid Build Coastguard Worker  int a;
7531*6236dae4SAndroid Build Coastguard Worker};
7532*6236dae4SAndroid Build Coastguard Worker_LT_EOF
7533*6236dae4SAndroid Build Coastguard Worker], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7534*6236dae4SAndroid Build Coastguard Worker      subroutine foo
7535*6236dae4SAndroid Build Coastguard Worker      implicit none
7536*6236dae4SAndroid Build Coastguard Worker      integer*4 a
7537*6236dae4SAndroid Build Coastguard Worker      a=0
7538*6236dae4SAndroid Build Coastguard Worker      return
7539*6236dae4SAndroid Build Coastguard Worker      end
7540*6236dae4SAndroid Build Coastguard Worker_LT_EOF
7541*6236dae4SAndroid Build Coastguard Worker], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7542*6236dae4SAndroid Build Coastguard Worker      subroutine foo
7543*6236dae4SAndroid Build Coastguard Worker      implicit none
7544*6236dae4SAndroid Build Coastguard Worker      integer a
7545*6236dae4SAndroid Build Coastguard Worker      a=0
7546*6236dae4SAndroid Build Coastguard Worker      return
7547*6236dae4SAndroid Build Coastguard Worker      end
7548*6236dae4SAndroid Build Coastguard Worker_LT_EOF
7549*6236dae4SAndroid Build Coastguard Worker], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7550*6236dae4SAndroid Build Coastguard Workerpublic class foo {
7551*6236dae4SAndroid Build Coastguard Worker  private int a;
7552*6236dae4SAndroid Build Coastguard Worker  public void bar (void) {
7553*6236dae4SAndroid Build Coastguard Worker    a = 0;
7554*6236dae4SAndroid Build Coastguard Worker  }
7555*6236dae4SAndroid Build Coastguard Worker};
7556*6236dae4SAndroid Build Coastguard Worker_LT_EOF
7557*6236dae4SAndroid Build Coastguard Worker], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7558*6236dae4SAndroid Build Coastguard Workerpackage foo
7559*6236dae4SAndroid Build Coastguard Workerfunc foo() {
7560*6236dae4SAndroid Build Coastguard Worker}
7561*6236dae4SAndroid Build Coastguard Worker_LT_EOF
7562*6236dae4SAndroid Build Coastguard Worker])
7563*6236dae4SAndroid Build Coastguard Worker
7564*6236dae4SAndroid Build Coastguard Worker_lt_libdeps_save_CFLAGS=$CFLAGS
7565*6236dae4SAndroid Build Coastguard Workercase "$CC $CFLAGS " in #(
7566*6236dae4SAndroid Build Coastguard Worker*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7567*6236dae4SAndroid Build Coastguard Worker*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7568*6236dae4SAndroid Build Coastguard Worker*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7569*6236dae4SAndroid Build Coastguard Workeresac
7570*6236dae4SAndroid Build Coastguard Worker
7571*6236dae4SAndroid Build Coastguard Workerdnl Parse the compiler output and extract the necessary
7572*6236dae4SAndroid Build Coastguard Workerdnl objects, libraries and library flags.
7573*6236dae4SAndroid Build Coastguard Workerif AC_TRY_EVAL(ac_compile); then
7574*6236dae4SAndroid Build Coastguard Worker  # Parse the compiler output and extract the necessary
7575*6236dae4SAndroid Build Coastguard Worker  # objects, libraries and library flags.
7576*6236dae4SAndroid Build Coastguard Worker
7577*6236dae4SAndroid Build Coastguard Worker  # Sentinel used to keep track of whether or not we are before
7578*6236dae4SAndroid Build Coastguard Worker  # the conftest object file.
7579*6236dae4SAndroid Build Coastguard Worker  pre_test_object_deps_done=no
7580*6236dae4SAndroid Build Coastguard Worker
7581*6236dae4SAndroid Build Coastguard Worker  for p in `eval "$output_verbose_link_cmd"`; do
7582*6236dae4SAndroid Build Coastguard Worker    case $prev$p in
7583*6236dae4SAndroid Build Coastguard Worker
7584*6236dae4SAndroid Build Coastguard Worker    -L* | -R* | -l*)
7585*6236dae4SAndroid Build Coastguard Worker       # Some compilers place space between "-{L,R}" and the path.
7586*6236dae4SAndroid Build Coastguard Worker       # Remove the space.
7587*6236dae4SAndroid Build Coastguard Worker       if test x-L = "$p" ||
7588*6236dae4SAndroid Build Coastguard Worker          test x-R = "$p"; then
7589*6236dae4SAndroid Build Coastguard Worker	 prev=$p
7590*6236dae4SAndroid Build Coastguard Worker	 continue
7591*6236dae4SAndroid Build Coastguard Worker       fi
7592*6236dae4SAndroid Build Coastguard Worker
7593*6236dae4SAndroid Build Coastguard Worker       # Expand the sysroot to ease extracting the directories later.
7594*6236dae4SAndroid Build Coastguard Worker       if test -z "$prev"; then
7595*6236dae4SAndroid Build Coastguard Worker         case $p in
7596*6236dae4SAndroid Build Coastguard Worker         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7597*6236dae4SAndroid Build Coastguard Worker         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7598*6236dae4SAndroid Build Coastguard Worker         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7599*6236dae4SAndroid Build Coastguard Worker         esac
7600*6236dae4SAndroid Build Coastguard Worker       fi
7601*6236dae4SAndroid Build Coastguard Worker       case $p in
7602*6236dae4SAndroid Build Coastguard Worker       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7603*6236dae4SAndroid Build Coastguard Worker       esac
7604*6236dae4SAndroid Build Coastguard Worker       if test no = "$pre_test_object_deps_done"; then
7605*6236dae4SAndroid Build Coastguard Worker	 case $prev in
7606*6236dae4SAndroid Build Coastguard Worker	 -L | -R)
7607*6236dae4SAndroid Build Coastguard Worker	   # Internal compiler library paths should come after those
7608*6236dae4SAndroid Build Coastguard Worker	   # provided the user.  The postdeps already come after the
7609*6236dae4SAndroid Build Coastguard Worker	   # user supplied libs so there is no need to process them.
7610*6236dae4SAndroid Build Coastguard Worker	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7611*6236dae4SAndroid Build Coastguard Worker	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7612*6236dae4SAndroid Build Coastguard Worker	   else
7613*6236dae4SAndroid Build Coastguard Worker	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7614*6236dae4SAndroid Build Coastguard Worker	   fi
7615*6236dae4SAndroid Build Coastguard Worker	   ;;
7616*6236dae4SAndroid Build Coastguard Worker	 # The "-l" case would never come before the object being
7617*6236dae4SAndroid Build Coastguard Worker	 # linked, so don't bother handling this case.
7618*6236dae4SAndroid Build Coastguard Worker	 esac
7619*6236dae4SAndroid Build Coastguard Worker       else
7620*6236dae4SAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7621*6236dae4SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdeps, $1)=$prev$p
7622*6236dae4SAndroid Build Coastguard Worker	 else
7623*6236dae4SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7624*6236dae4SAndroid Build Coastguard Worker	 fi
7625*6236dae4SAndroid Build Coastguard Worker       fi
7626*6236dae4SAndroid Build Coastguard Worker       prev=
7627*6236dae4SAndroid Build Coastguard Worker       ;;
7628*6236dae4SAndroid Build Coastguard Worker
7629*6236dae4SAndroid Build Coastguard Worker    *.lto.$objext) ;; # Ignore GCC LTO objects
7630*6236dae4SAndroid Build Coastguard Worker    *.$objext)
7631*6236dae4SAndroid Build Coastguard Worker       # This assumes that the test object file only shows up
7632*6236dae4SAndroid Build Coastguard Worker       # once in the compiler output.
7633*6236dae4SAndroid Build Coastguard Worker       if test "$p" = "conftest.$objext"; then
7634*6236dae4SAndroid Build Coastguard Worker	 pre_test_object_deps_done=yes
7635*6236dae4SAndroid Build Coastguard Worker	 continue
7636*6236dae4SAndroid Build Coastguard Worker       fi
7637*6236dae4SAndroid Build Coastguard Worker
7638*6236dae4SAndroid Build Coastguard Worker       if test no = "$pre_test_object_deps_done"; then
7639*6236dae4SAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7640*6236dae4SAndroid Build Coastguard Worker	   _LT_TAGVAR(predep_objects, $1)=$p
7641*6236dae4SAndroid Build Coastguard Worker	 else
7642*6236dae4SAndroid Build Coastguard Worker	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7643*6236dae4SAndroid Build Coastguard Worker	 fi
7644*6236dae4SAndroid Build Coastguard Worker       else
7645*6236dae4SAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7646*6236dae4SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdep_objects, $1)=$p
7647*6236dae4SAndroid Build Coastguard Worker	 else
7648*6236dae4SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7649*6236dae4SAndroid Build Coastguard Worker	 fi
7650*6236dae4SAndroid Build Coastguard Worker       fi
7651*6236dae4SAndroid Build Coastguard Worker       ;;
7652*6236dae4SAndroid Build Coastguard Worker
7653*6236dae4SAndroid Build Coastguard Worker    *) ;; # Ignore the rest.
7654*6236dae4SAndroid Build Coastguard Worker
7655*6236dae4SAndroid Build Coastguard Worker    esac
7656*6236dae4SAndroid Build Coastguard Worker  done
7657*6236dae4SAndroid Build Coastguard Worker
7658*6236dae4SAndroid Build Coastguard Worker  # Clean up.
7659*6236dae4SAndroid Build Coastguard Worker  rm -f a.out a.exe
7660*6236dae4SAndroid Build Coastguard Workerelse
7661*6236dae4SAndroid Build Coastguard Worker  echo "libtool.m4: error: problem compiling $1 test program"
7662*6236dae4SAndroid Build Coastguard Workerfi
7663*6236dae4SAndroid Build Coastguard Worker
7664*6236dae4SAndroid Build Coastguard Worker$RM -f confest.$objext
7665*6236dae4SAndroid Build Coastguard WorkerCFLAGS=$_lt_libdeps_save_CFLAGS
7666*6236dae4SAndroid Build Coastguard Worker
7667*6236dae4SAndroid Build Coastguard Worker# PORTME: override above test on systems where it is broken
7668*6236dae4SAndroid Build Coastguard Workerm4_if([$1], [CXX],
7669*6236dae4SAndroid Build Coastguard Worker[case $host_os in
7670*6236dae4SAndroid Build Coastguard Workerinterix[[3-9]]*)
7671*6236dae4SAndroid Build Coastguard Worker  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7672*6236dae4SAndroid Build Coastguard Worker  # hack all around it, let's just trust "g++" to DTRT.
7673*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(predep_objects,$1)=
7674*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(postdep_objects,$1)=
7675*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(postdeps,$1)=
7676*6236dae4SAndroid Build Coastguard Worker  ;;
7677*6236dae4SAndroid Build Coastguard Workeresac
7678*6236dae4SAndroid Build Coastguard Worker])
7679*6236dae4SAndroid Build Coastguard Worker
7680*6236dae4SAndroid Build Coastguard Workercase " $_LT_TAGVAR(postdeps, $1) " in
7681*6236dae4SAndroid Build Coastguard Worker*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7682*6236dae4SAndroid Build Coastguard Workeresac
7683*6236dae4SAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7684*6236dae4SAndroid Build Coastguard Workerif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7685*6236dae4SAndroid 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!^ !!'`
7686*6236dae4SAndroid Build Coastguard Workerfi
7687*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7688*6236dae4SAndroid Build Coastguard Worker    [The directories searched by this compiler when creating a shared library])
7689*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [predep_objects], [1],
7690*6236dae4SAndroid Build Coastguard Worker    [Dependencies to place before and after the objects being linked to
7691*6236dae4SAndroid Build Coastguard Worker    create a shared library])
7692*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [postdep_objects], [1])
7693*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [predeps], [1])
7694*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [postdeps], [1])
7695*6236dae4SAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_path], [1],
7696*6236dae4SAndroid Build Coastguard Worker    [The library search path used internally by the compiler when linking
7697*6236dae4SAndroid Build Coastguard Worker    a shared library])
7698*6236dae4SAndroid Build Coastguard Worker])# _LT_SYS_HIDDEN_LIBDEPS
7699*6236dae4SAndroid Build Coastguard Worker
7700*6236dae4SAndroid Build Coastguard Worker
7701*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_F77_CONFIG([TAG])
7702*6236dae4SAndroid Build Coastguard Worker# --------------------------
7703*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran 77 compiler are
7704*6236dae4SAndroid Build Coastguard Worker# suitably defined.  These variables are subsequently used by _LT_CONFIG
7705*6236dae4SAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
7706*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_F77_CONFIG],
7707*6236dae4SAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran 77)
7708*6236dae4SAndroid Build Coastguard Workerif test -z "$F77" || test no = "$F77"; then
7709*6236dae4SAndroid Build Coastguard Worker  _lt_disable_F77=yes
7710*6236dae4SAndroid Build Coastguard Workerfi
7711*6236dae4SAndroid Build Coastguard Worker
7712*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7713*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
7714*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
7715*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
7716*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7717*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
7718*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7719*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7720*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
7721*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
7722*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
7723*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
7724*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
7725*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
7726*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
7727*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7728*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7729*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7730*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
7731*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
7732*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7733*6236dae4SAndroid Build Coastguard Worker
7734*6236dae4SAndroid Build Coastguard Worker# Source file extension for f77 test sources.
7735*6236dae4SAndroid Build Coastguard Workerac_ext=f
7736*6236dae4SAndroid Build Coastguard Worker
7737*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled f77 test sources.
7738*6236dae4SAndroid Build Coastguard Workerobjext=o
7739*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7740*6236dae4SAndroid Build Coastguard Worker
7741*6236dae4SAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
7742*6236dae4SAndroid Build Coastguard Worker# the F77 compiler isn't working.  Some variables (like enable_shared)
7743*6236dae4SAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
7744*6236dae4SAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
7745*6236dae4SAndroid Build Coastguard Workerif test yes != "$_lt_disable_F77"; then
7746*6236dae4SAndroid Build Coastguard Worker  # Code to be used in simple compile tests
7747*6236dae4SAndroid Build Coastguard Worker  lt_simple_compile_test_code="\
7748*6236dae4SAndroid Build Coastguard Worker      subroutine t
7749*6236dae4SAndroid Build Coastguard Worker      return
7750*6236dae4SAndroid Build Coastguard Worker      end
7751*6236dae4SAndroid Build Coastguard Worker"
7752*6236dae4SAndroid Build Coastguard Worker
7753*6236dae4SAndroid Build Coastguard Worker  # Code to be used in simple link tests
7754*6236dae4SAndroid Build Coastguard Worker  lt_simple_link_test_code="\
7755*6236dae4SAndroid Build Coastguard Worker      program t
7756*6236dae4SAndroid Build Coastguard Worker      end
7757*6236dae4SAndroid Build Coastguard Worker"
7758*6236dae4SAndroid Build Coastguard Worker
7759*6236dae4SAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7760*6236dae4SAndroid Build Coastguard Worker  _LT_TAG_COMPILER
7761*6236dae4SAndroid Build Coastguard Worker
7762*6236dae4SAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
7763*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
7764*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
7765*6236dae4SAndroid Build Coastguard Worker
7766*6236dae4SAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
7767*6236dae4SAndroid Build Coastguard Worker  lt_save_CC=$CC
7768*6236dae4SAndroid Build Coastguard Worker  lt_save_GCC=$GCC
7769*6236dae4SAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
7770*6236dae4SAndroid Build Coastguard Worker  CC=${F77-"f77"}
7771*6236dae4SAndroid Build Coastguard Worker  CFLAGS=$FFLAGS
7772*6236dae4SAndroid Build Coastguard Worker  compiler=$CC
7773*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
7774*6236dae4SAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
7775*6236dae4SAndroid Build Coastguard Worker  GCC=$G77
7776*6236dae4SAndroid Build Coastguard Worker  if test -n "$compiler"; then
7777*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([if libtool supports shared libraries])
7778*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$can_build_shared])
7779*6236dae4SAndroid Build Coastguard Worker
7780*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build shared libraries])
7781*6236dae4SAndroid Build Coastguard Worker    test no = "$can_build_shared" && enable_shared=no
7782*6236dae4SAndroid Build Coastguard Worker
7783*6236dae4SAndroid Build Coastguard Worker    # On AIX, shared libraries and static libraries use the same namespace, and
7784*6236dae4SAndroid Build Coastguard Worker    # are all built from PIC.
7785*6236dae4SAndroid Build Coastguard Worker    case $host_os in
7786*6236dae4SAndroid Build Coastguard Worker      aix3*)
7787*6236dae4SAndroid Build Coastguard Worker        test yes = "$enable_shared" && enable_static=no
7788*6236dae4SAndroid Build Coastguard Worker        if test -n "$RANLIB"; then
7789*6236dae4SAndroid Build Coastguard Worker          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7790*6236dae4SAndroid Build Coastguard Worker          postinstall_cmds='$RANLIB $lib'
7791*6236dae4SAndroid Build Coastguard Worker        fi
7792*6236dae4SAndroid Build Coastguard Worker        ;;
7793*6236dae4SAndroid Build Coastguard Worker      aix[[4-9]]*)
7794*6236dae4SAndroid Build Coastguard Worker	if test ia64 != "$host_cpu"; then
7795*6236dae4SAndroid Build Coastguard Worker	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7796*6236dae4SAndroid Build Coastguard Worker	  yes,aix,yes) ;;		# shared object as lib.so file only
7797*6236dae4SAndroid Build Coastguard Worker	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7798*6236dae4SAndroid Build Coastguard Worker	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7799*6236dae4SAndroid Build Coastguard Worker	  esac
7800*6236dae4SAndroid Build Coastguard Worker	fi
7801*6236dae4SAndroid Build Coastguard Worker        ;;
7802*6236dae4SAndroid Build Coastguard Worker    esac
7803*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_shared])
7804*6236dae4SAndroid Build Coastguard Worker
7805*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build static libraries])
7806*6236dae4SAndroid Build Coastguard Worker    # Make sure either enable_shared or enable_static is yes.
7807*6236dae4SAndroid Build Coastguard Worker    test yes = "$enable_shared" || enable_static=yes
7808*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_static])
7809*6236dae4SAndroid Build Coastguard Worker
7810*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)=$G77
7811*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)=$LD
7812*6236dae4SAndroid Build Coastguard Worker
7813*6236dae4SAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7814*6236dae4SAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7815*6236dae4SAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7816*6236dae4SAndroid Build Coastguard Worker    ## what you are doing...
7817*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7818*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7819*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7820*6236dae4SAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7821*6236dae4SAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7822*6236dae4SAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7823*6236dae4SAndroid Build Coastguard Worker
7824*6236dae4SAndroid Build Coastguard Worker    _LT_CONFIG($1)
7825*6236dae4SAndroid Build Coastguard Worker  fi # test -n "$compiler"
7826*6236dae4SAndroid Build Coastguard Worker
7827*6236dae4SAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7828*6236dae4SAndroid Build Coastguard Worker  CC=$lt_save_CC
7829*6236dae4SAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7830*6236dae4SAndroid Build Coastguard Workerfi # test yes != "$_lt_disable_F77"
7831*6236dae4SAndroid Build Coastguard Worker
7832*6236dae4SAndroid Build Coastguard WorkerAC_LANG_POP
7833*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_F77_CONFIG
7834*6236dae4SAndroid Build Coastguard Worker
7835*6236dae4SAndroid Build Coastguard Worker
7836*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_FC_CONFIG([TAG])
7837*6236dae4SAndroid Build Coastguard Worker# -------------------------
7838*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran compiler are
7839*6236dae4SAndroid Build Coastguard Worker# suitably defined.  These variables are subsequently used by _LT_CONFIG
7840*6236dae4SAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
7841*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_FC_CONFIG],
7842*6236dae4SAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran)
7843*6236dae4SAndroid Build Coastguard Worker
7844*6236dae4SAndroid Build Coastguard Workerif test -z "$FC" || test no = "$FC"; then
7845*6236dae4SAndroid Build Coastguard Worker  _lt_disable_FC=yes
7846*6236dae4SAndroid Build Coastguard Workerfi
7847*6236dae4SAndroid Build Coastguard Worker
7848*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7849*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
7850*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
7851*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
7852*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7853*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
7854*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7855*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7856*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
7857*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
7858*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
7859*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
7860*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
7861*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
7862*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
7863*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7864*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7865*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7866*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
7867*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
7868*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7869*6236dae4SAndroid Build Coastguard Worker
7870*6236dae4SAndroid Build Coastguard Worker# Source file extension for fc test sources.
7871*6236dae4SAndroid Build Coastguard Workerac_ext=${ac_fc_srcext-f}
7872*6236dae4SAndroid Build Coastguard Worker
7873*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled fc test sources.
7874*6236dae4SAndroid Build Coastguard Workerobjext=o
7875*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7876*6236dae4SAndroid Build Coastguard Worker
7877*6236dae4SAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
7878*6236dae4SAndroid Build Coastguard Worker# the FC compiler isn't working.  Some variables (like enable_shared)
7879*6236dae4SAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
7880*6236dae4SAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
7881*6236dae4SAndroid Build Coastguard Workerif test yes != "$_lt_disable_FC"; then
7882*6236dae4SAndroid Build Coastguard Worker  # Code to be used in simple compile tests
7883*6236dae4SAndroid Build Coastguard Worker  lt_simple_compile_test_code="\
7884*6236dae4SAndroid Build Coastguard Worker      subroutine t
7885*6236dae4SAndroid Build Coastguard Worker      return
7886*6236dae4SAndroid Build Coastguard Worker      end
7887*6236dae4SAndroid Build Coastguard Worker"
7888*6236dae4SAndroid Build Coastguard Worker
7889*6236dae4SAndroid Build Coastguard Worker  # Code to be used in simple link tests
7890*6236dae4SAndroid Build Coastguard Worker  lt_simple_link_test_code="\
7891*6236dae4SAndroid Build Coastguard Worker      program t
7892*6236dae4SAndroid Build Coastguard Worker      end
7893*6236dae4SAndroid Build Coastguard Worker"
7894*6236dae4SAndroid Build Coastguard Worker
7895*6236dae4SAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7896*6236dae4SAndroid Build Coastguard Worker  _LT_TAG_COMPILER
7897*6236dae4SAndroid Build Coastguard Worker
7898*6236dae4SAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
7899*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
7900*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
7901*6236dae4SAndroid Build Coastguard Worker
7902*6236dae4SAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
7903*6236dae4SAndroid Build Coastguard Worker  lt_save_CC=$CC
7904*6236dae4SAndroid Build Coastguard Worker  lt_save_GCC=$GCC
7905*6236dae4SAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
7906*6236dae4SAndroid Build Coastguard Worker  CC=${FC-"f95"}
7907*6236dae4SAndroid Build Coastguard Worker  CFLAGS=$FCFLAGS
7908*6236dae4SAndroid Build Coastguard Worker  compiler=$CC
7909*6236dae4SAndroid Build Coastguard Worker  GCC=$ac_cv_fc_compiler_gnu
7910*6236dae4SAndroid Build Coastguard Worker
7911*6236dae4SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
7912*6236dae4SAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
7913*6236dae4SAndroid Build Coastguard Worker
7914*6236dae4SAndroid Build Coastguard Worker  if test -n "$compiler"; then
7915*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([if libtool supports shared libraries])
7916*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$can_build_shared])
7917*6236dae4SAndroid Build Coastguard Worker
7918*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build shared libraries])
7919*6236dae4SAndroid Build Coastguard Worker    test no = "$can_build_shared" && enable_shared=no
7920*6236dae4SAndroid Build Coastguard Worker
7921*6236dae4SAndroid Build Coastguard Worker    # On AIX, shared libraries and static libraries use the same namespace, and
7922*6236dae4SAndroid Build Coastguard Worker    # are all built from PIC.
7923*6236dae4SAndroid Build Coastguard Worker    case $host_os in
7924*6236dae4SAndroid Build Coastguard Worker      aix3*)
7925*6236dae4SAndroid Build Coastguard Worker        test yes = "$enable_shared" && enable_static=no
7926*6236dae4SAndroid Build Coastguard Worker        if test -n "$RANLIB"; then
7927*6236dae4SAndroid Build Coastguard Worker          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7928*6236dae4SAndroid Build Coastguard Worker          postinstall_cmds='$RANLIB $lib'
7929*6236dae4SAndroid Build Coastguard Worker        fi
7930*6236dae4SAndroid Build Coastguard Worker        ;;
7931*6236dae4SAndroid Build Coastguard Worker      aix[[4-9]]*)
7932*6236dae4SAndroid Build Coastguard Worker	if test ia64 != "$host_cpu"; then
7933*6236dae4SAndroid Build Coastguard Worker	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7934*6236dae4SAndroid Build Coastguard Worker	  yes,aix,yes) ;;		# shared object as lib.so file only
7935*6236dae4SAndroid Build Coastguard Worker	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7936*6236dae4SAndroid Build Coastguard Worker	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7937*6236dae4SAndroid Build Coastguard Worker	  esac
7938*6236dae4SAndroid Build Coastguard Worker	fi
7939*6236dae4SAndroid Build Coastguard Worker        ;;
7940*6236dae4SAndroid Build Coastguard Worker    esac
7941*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_shared])
7942*6236dae4SAndroid Build Coastguard Worker
7943*6236dae4SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build static libraries])
7944*6236dae4SAndroid Build Coastguard Worker    # Make sure either enable_shared or enable_static is yes.
7945*6236dae4SAndroid Build Coastguard Worker    test yes = "$enable_shared" || enable_static=yes
7946*6236dae4SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_static])
7947*6236dae4SAndroid Build Coastguard Worker
7948*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7949*6236dae4SAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)=$LD
7950*6236dae4SAndroid Build Coastguard Worker
7951*6236dae4SAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7952*6236dae4SAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7953*6236dae4SAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7954*6236dae4SAndroid Build Coastguard Worker    ## what you are doing...
7955*6236dae4SAndroid Build Coastguard Worker    _LT_SYS_HIDDEN_LIBDEPS($1)
7956*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7957*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7958*6236dae4SAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7959*6236dae4SAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7960*6236dae4SAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7961*6236dae4SAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7962*6236dae4SAndroid Build Coastguard Worker
7963*6236dae4SAndroid Build Coastguard Worker    _LT_CONFIG($1)
7964*6236dae4SAndroid Build Coastguard Worker  fi # test -n "$compiler"
7965*6236dae4SAndroid Build Coastguard Worker
7966*6236dae4SAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7967*6236dae4SAndroid Build Coastguard Worker  CC=$lt_save_CC
7968*6236dae4SAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7969*6236dae4SAndroid Build Coastguard Workerfi # test yes != "$_lt_disable_FC"
7970*6236dae4SAndroid Build Coastguard Worker
7971*6236dae4SAndroid Build Coastguard WorkerAC_LANG_POP
7972*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_FC_CONFIG
7973*6236dae4SAndroid Build Coastguard Worker
7974*6236dae4SAndroid Build Coastguard Worker
7975*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_GCJ_CONFIG([TAG])
7976*6236dae4SAndroid Build Coastguard Worker# --------------------------
7977*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Java Compiler compiler
7978*6236dae4SAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7979*6236dae4SAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
7980*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_GCJ_CONFIG],
7981*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GCJ])dnl
7982*6236dae4SAndroid Build Coastguard WorkerAC_LANG_SAVE
7983*6236dae4SAndroid Build Coastguard Worker
7984*6236dae4SAndroid Build Coastguard Worker# Source file extension for Java test sources.
7985*6236dae4SAndroid Build Coastguard Workerac_ext=java
7986*6236dae4SAndroid Build Coastguard Worker
7987*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled Java test sources.
7988*6236dae4SAndroid Build Coastguard Workerobjext=o
7989*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7990*6236dae4SAndroid Build Coastguard Worker
7991*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple compile tests
7992*6236dae4SAndroid Build Coastguard Workerlt_simple_compile_test_code="class foo {}"
7993*6236dae4SAndroid Build Coastguard Worker
7994*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple link tests
7995*6236dae4SAndroid Build Coastguard Workerlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7996*6236dae4SAndroid Build Coastguard Worker
7997*6236dae4SAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7998*6236dae4SAndroid Build Coastguard Worker_LT_TAG_COMPILER
7999*6236dae4SAndroid Build Coastguard Worker
8000*6236dae4SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
8001*6236dae4SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
8002*6236dae4SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
8003*6236dae4SAndroid Build Coastguard Worker
8004*6236dae4SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
8005*6236dae4SAndroid Build Coastguard Workerlt_save_CC=$CC
8006*6236dae4SAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
8007*6236dae4SAndroid Build Coastguard Workerlt_save_GCC=$GCC
8008*6236dae4SAndroid Build Coastguard WorkerGCC=yes
8009*6236dae4SAndroid Build Coastguard WorkerCC=${GCJ-"gcj"}
8010*6236dae4SAndroid Build Coastguard WorkerCFLAGS=$GCJFLAGS
8011*6236dae4SAndroid Build Coastguard Workercompiler=$CC
8012*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
8013*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)=$LD
8014*6236dae4SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
8015*6236dae4SAndroid Build Coastguard Worker
8016*6236dae4SAndroid Build Coastguard Worker# GCJ did not exist at the time GCC didn't implicitly link libc in.
8017*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8018*6236dae4SAndroid Build Coastguard Worker
8019*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8020*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
8021*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8022*6236dae4SAndroid Build Coastguard Worker
8023*6236dae4SAndroid Build Coastguard Worker## CAVEAT EMPTOR:
8024*6236dae4SAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
8025*6236dae4SAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
8026*6236dae4SAndroid Build Coastguard Worker## what you are doing...
8027*6236dae4SAndroid Build Coastguard Workerif test -n "$compiler"; then
8028*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
8029*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
8030*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
8031*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
8032*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
8033*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
8034*6236dae4SAndroid Build Coastguard Worker
8035*6236dae4SAndroid Build Coastguard Worker  _LT_CONFIG($1)
8036*6236dae4SAndroid Build Coastguard Workerfi
8037*6236dae4SAndroid Build Coastguard Worker
8038*6236dae4SAndroid Build Coastguard WorkerAC_LANG_RESTORE
8039*6236dae4SAndroid Build Coastguard Worker
8040*6236dae4SAndroid Build Coastguard WorkerGCC=$lt_save_GCC
8041*6236dae4SAndroid Build Coastguard WorkerCC=$lt_save_CC
8042*6236dae4SAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
8043*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_GCJ_CONFIG
8044*6236dae4SAndroid Build Coastguard Worker
8045*6236dae4SAndroid Build Coastguard Worker
8046*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_GO_CONFIG([TAG])
8047*6236dae4SAndroid Build Coastguard Worker# --------------------------
8048*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Go compiler
8049*6236dae4SAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8050*6236dae4SAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
8051*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_GO_CONFIG],
8052*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GO])dnl
8053*6236dae4SAndroid Build Coastguard WorkerAC_LANG_SAVE
8054*6236dae4SAndroid Build Coastguard Worker
8055*6236dae4SAndroid Build Coastguard Worker# Source file extension for Go test sources.
8056*6236dae4SAndroid Build Coastguard Workerac_ext=go
8057*6236dae4SAndroid Build Coastguard Worker
8058*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled Go test sources.
8059*6236dae4SAndroid Build Coastguard Workerobjext=o
8060*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
8061*6236dae4SAndroid Build Coastguard Worker
8062*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple compile tests
8063*6236dae4SAndroid Build Coastguard Workerlt_simple_compile_test_code="package main; func main() { }"
8064*6236dae4SAndroid Build Coastguard Worker
8065*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple link tests
8066*6236dae4SAndroid Build Coastguard Workerlt_simple_link_test_code='package main; func main() { }'
8067*6236dae4SAndroid Build Coastguard Worker
8068*6236dae4SAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8069*6236dae4SAndroid Build Coastguard Worker_LT_TAG_COMPILER
8070*6236dae4SAndroid Build Coastguard Worker
8071*6236dae4SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
8072*6236dae4SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
8073*6236dae4SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
8074*6236dae4SAndroid Build Coastguard Worker
8075*6236dae4SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
8076*6236dae4SAndroid Build Coastguard Workerlt_save_CC=$CC
8077*6236dae4SAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
8078*6236dae4SAndroid Build Coastguard Workerlt_save_GCC=$GCC
8079*6236dae4SAndroid Build Coastguard WorkerGCC=yes
8080*6236dae4SAndroid Build Coastguard WorkerCC=${GOC-"gccgo"}
8081*6236dae4SAndroid Build Coastguard WorkerCFLAGS=$GOFLAGS
8082*6236dae4SAndroid Build Coastguard Workercompiler=$CC
8083*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
8084*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)=$LD
8085*6236dae4SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
8086*6236dae4SAndroid Build Coastguard Worker
8087*6236dae4SAndroid Build Coastguard Worker# Go did not exist at the time GCC didn't implicitly link libc in.
8088*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8089*6236dae4SAndroid Build Coastguard Worker
8090*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8091*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
8092*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8093*6236dae4SAndroid Build Coastguard Worker
8094*6236dae4SAndroid Build Coastguard Worker## CAVEAT EMPTOR:
8095*6236dae4SAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
8096*6236dae4SAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
8097*6236dae4SAndroid Build Coastguard Worker## what you are doing...
8098*6236dae4SAndroid Build Coastguard Workerif test -n "$compiler"; then
8099*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
8100*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
8101*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
8102*6236dae4SAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
8103*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
8104*6236dae4SAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
8105*6236dae4SAndroid Build Coastguard Worker
8106*6236dae4SAndroid Build Coastguard Worker  _LT_CONFIG($1)
8107*6236dae4SAndroid Build Coastguard Workerfi
8108*6236dae4SAndroid Build Coastguard Worker
8109*6236dae4SAndroid Build Coastguard WorkerAC_LANG_RESTORE
8110*6236dae4SAndroid Build Coastguard Worker
8111*6236dae4SAndroid Build Coastguard WorkerGCC=$lt_save_GCC
8112*6236dae4SAndroid Build Coastguard WorkerCC=$lt_save_CC
8113*6236dae4SAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
8114*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_GO_CONFIG
8115*6236dae4SAndroid Build Coastguard Worker
8116*6236dae4SAndroid Build Coastguard Worker
8117*6236dae4SAndroid Build Coastguard Worker# _LT_LANG_RC_CONFIG([TAG])
8118*6236dae4SAndroid Build Coastguard Worker# -------------------------
8119*6236dae4SAndroid Build Coastguard Worker# Ensure that the configuration variables for the Windows resource compiler
8120*6236dae4SAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8121*6236dae4SAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'.
8122*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_LANG_RC_CONFIG],
8123*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_RC])dnl
8124*6236dae4SAndroid Build Coastguard WorkerAC_LANG_SAVE
8125*6236dae4SAndroid Build Coastguard Worker
8126*6236dae4SAndroid Build Coastguard Worker# Source file extension for RC test sources.
8127*6236dae4SAndroid Build Coastguard Workerac_ext=rc
8128*6236dae4SAndroid Build Coastguard Worker
8129*6236dae4SAndroid Build Coastguard Worker# Object file extension for compiled RC test sources.
8130*6236dae4SAndroid Build Coastguard Workerobjext=o
8131*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
8132*6236dae4SAndroid Build Coastguard Worker
8133*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple compile tests
8134*6236dae4SAndroid Build Coastguard Workerlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8135*6236dae4SAndroid Build Coastguard Worker
8136*6236dae4SAndroid Build Coastguard Worker# Code to be used in simple link tests
8137*6236dae4SAndroid Build Coastguard Workerlt_simple_link_test_code=$lt_simple_compile_test_code
8138*6236dae4SAndroid Build Coastguard Worker
8139*6236dae4SAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8140*6236dae4SAndroid Build Coastguard Worker_LT_TAG_COMPILER
8141*6236dae4SAndroid Build Coastguard Worker
8142*6236dae4SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
8143*6236dae4SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
8144*6236dae4SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
8145*6236dae4SAndroid Build Coastguard Worker
8146*6236dae4SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
8147*6236dae4SAndroid Build Coastguard Workerlt_save_CC=$CC
8148*6236dae4SAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
8149*6236dae4SAndroid Build Coastguard Workerlt_save_GCC=$GCC
8150*6236dae4SAndroid Build Coastguard WorkerGCC=
8151*6236dae4SAndroid Build Coastguard WorkerCC=${RC-"windres"}
8152*6236dae4SAndroid Build Coastguard WorkerCFLAGS=
8153*6236dae4SAndroid Build Coastguard Workercompiler=$CC
8154*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
8155*6236dae4SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
8156*6236dae4SAndroid Build Coastguard Worker_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8157*6236dae4SAndroid Build Coastguard Worker
8158*6236dae4SAndroid Build Coastguard Workerif test -n "$compiler"; then
8159*6236dae4SAndroid Build Coastguard Worker  :
8160*6236dae4SAndroid Build Coastguard Worker  _LT_CONFIG($1)
8161*6236dae4SAndroid Build Coastguard Workerfi
8162*6236dae4SAndroid Build Coastguard Worker
8163*6236dae4SAndroid Build Coastguard WorkerGCC=$lt_save_GCC
8164*6236dae4SAndroid Build Coastguard WorkerAC_LANG_RESTORE
8165*6236dae4SAndroid Build Coastguard WorkerCC=$lt_save_CC
8166*6236dae4SAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
8167*6236dae4SAndroid Build Coastguard Worker])# _LT_LANG_RC_CONFIG
8168*6236dae4SAndroid Build Coastguard Worker
8169*6236dae4SAndroid Build Coastguard Worker
8170*6236dae4SAndroid Build Coastguard Worker# LT_PROG_GCJ
8171*6236dae4SAndroid Build Coastguard Worker# -----------
8172*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GCJ],
8173*6236dae4SAndroid Build Coastguard Worker[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8174*6236dae4SAndroid Build Coastguard Worker  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8175*6236dae4SAndroid Build Coastguard Worker    [AC_CHECK_TOOL(GCJ, gcj,)
8176*6236dae4SAndroid Build Coastguard Worker      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8177*6236dae4SAndroid Build Coastguard Worker      AC_SUBST(GCJFLAGS)])])[]dnl
8178*6236dae4SAndroid Build Coastguard Worker])
8179*6236dae4SAndroid Build Coastguard Worker
8180*6236dae4SAndroid Build Coastguard Worker# Old name:
8181*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8182*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
8183*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8184*6236dae4SAndroid Build Coastguard Worker
8185*6236dae4SAndroid Build Coastguard Worker
8186*6236dae4SAndroid Build Coastguard Worker# LT_PROG_GO
8187*6236dae4SAndroid Build Coastguard Worker# ----------
8188*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GO],
8189*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOL(GOC, gccgo,)
8190*6236dae4SAndroid Build Coastguard Worker])
8191*6236dae4SAndroid Build Coastguard Worker
8192*6236dae4SAndroid Build Coastguard Worker
8193*6236dae4SAndroid Build Coastguard Worker# LT_PROG_RC
8194*6236dae4SAndroid Build Coastguard Worker# ----------
8195*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_RC],
8196*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOL(RC, windres,)
8197*6236dae4SAndroid Build Coastguard Worker])
8198*6236dae4SAndroid Build Coastguard Worker
8199*6236dae4SAndroid Build Coastguard Worker# Old name:
8200*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8201*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
8202*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_RC], [])
8203*6236dae4SAndroid Build Coastguard Worker
8204*6236dae4SAndroid Build Coastguard Worker
8205*6236dae4SAndroid Build Coastguard Worker# _LT_DECL_EGREP
8206*6236dae4SAndroid Build Coastguard Worker# --------------
8207*6236dae4SAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best grep
8208*6236dae4SAndroid Build Coastguard Worker# available, choose the one first in the user's PATH.
8209*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_DECL_EGREP],
8210*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_EGREP])dnl
8211*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_FGREP])dnl
8212*6236dae4SAndroid Build Coastguard Workertest -z "$GREP" && GREP=grep
8213*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8214*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [EGREP], [1], [An ERE matcher])
8215*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [FGREP], [1], [A literal string matcher])
8216*6236dae4SAndroid Build Coastguard Workerdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8217*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([GREP])
8218*6236dae4SAndroid Build Coastguard Worker])
8219*6236dae4SAndroid Build Coastguard Worker
8220*6236dae4SAndroid Build Coastguard Worker
8221*6236dae4SAndroid Build Coastguard Worker# _LT_DECL_OBJDUMP
8222*6236dae4SAndroid Build Coastguard Worker# --------------
8223*6236dae4SAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best objdump
8224*6236dae4SAndroid Build Coastguard Worker# available, choose the one first in the user's PATH.
8225*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_DECL_OBJDUMP],
8226*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8227*6236dae4SAndroid Build Coastguard Workertest -z "$OBJDUMP" && OBJDUMP=objdump
8228*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8229*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([OBJDUMP])
8230*6236dae4SAndroid Build Coastguard Worker])
8231*6236dae4SAndroid Build Coastguard Worker
8232*6236dae4SAndroid Build Coastguard Worker# _LT_DECL_DLLTOOL
8233*6236dae4SAndroid Build Coastguard Worker# ----------------
8234*6236dae4SAndroid Build Coastguard Worker# Ensure DLLTOOL variable is set.
8235*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_DECL_DLLTOOL],
8236*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8237*6236dae4SAndroid Build Coastguard Workertest -z "$DLLTOOL" && DLLTOOL=dlltool
8238*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8239*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([DLLTOOL])
8240*6236dae4SAndroid Build Coastguard Worker])
8241*6236dae4SAndroid Build Coastguard Worker
8242*6236dae4SAndroid Build Coastguard Worker# _LT_DECL_FILECMD
8243*6236dae4SAndroid Build Coastguard Worker# ----------------
8244*6236dae4SAndroid Build Coastguard Worker# Check for a file(cmd) program that can be used to detect file type and magic
8245*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_DECL_FILECMD],
8246*6236dae4SAndroid Build Coastguard Worker[AC_CHECK_TOOL([FILECMD], [file], [:])
8247*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8248*6236dae4SAndroid Build Coastguard Worker])# _LD_DECL_FILECMD
8249*6236dae4SAndroid Build Coastguard Worker
8250*6236dae4SAndroid Build Coastguard Worker# _LT_DECL_SED
8251*6236dae4SAndroid Build Coastguard Worker# ------------
8252*6236dae4SAndroid Build Coastguard Worker# Check for a fully-functional sed program, that truncates
8253*6236dae4SAndroid Build Coastguard Worker# as few characters as possible.  Prefer GNU sed if found.
8254*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_DECL_SED],
8255*6236dae4SAndroid Build Coastguard Worker[AC_PROG_SED
8256*6236dae4SAndroid Build Coastguard Workertest -z "$SED" && SED=sed
8257*6236dae4SAndroid Build Coastguard WorkerXsed="$SED -e 1s/^X//"
8258*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8259*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8260*6236dae4SAndroid Build Coastguard Worker    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8261*6236dae4SAndroid Build Coastguard Worker])# _LT_DECL_SED
8262*6236dae4SAndroid Build Coastguard Worker
8263*6236dae4SAndroid Build Coastguard Workerm4_ifndef([AC_PROG_SED], [
8264*6236dae4SAndroid Build Coastguard Worker############################################################
8265*6236dae4SAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into   #
8266*6236dae4SAndroid Build Coastguard Worker#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8267*6236dae4SAndroid Build Coastguard Worker#  a released version of Autoconf we should remove this    #
8268*6236dae4SAndroid Build Coastguard Worker#  macro and use it instead.                               #
8269*6236dae4SAndroid Build Coastguard Worker############################################################
8270*6236dae4SAndroid Build Coastguard Worker
8271*6236dae4SAndroid Build Coastguard Workerm4_defun([AC_PROG_SED],
8272*6236dae4SAndroid Build Coastguard Worker[AC_MSG_CHECKING([for a sed that does not truncate output])
8273*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_SED,
8274*6236dae4SAndroid Build Coastguard Worker[# Loop through the user's path and test for sed and gsed.
8275*6236dae4SAndroid Build Coastguard Worker# Then use that list of sed's as ones to test for truncation.
8276*6236dae4SAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8277*6236dae4SAndroid Build Coastguard Workerfor as_dir in $PATH
8278*6236dae4SAndroid Build Coastguard Workerdo
8279*6236dae4SAndroid Build Coastguard Worker  IFS=$as_save_IFS
8280*6236dae4SAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
8281*6236dae4SAndroid Build Coastguard Worker  for lt_ac_prog in sed gsed; do
8282*6236dae4SAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
8283*6236dae4SAndroid Build Coastguard Worker      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8284*6236dae4SAndroid Build Coastguard Worker        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8285*6236dae4SAndroid Build Coastguard Worker      fi
8286*6236dae4SAndroid Build Coastguard Worker    done
8287*6236dae4SAndroid Build Coastguard Worker  done
8288*6236dae4SAndroid Build Coastguard Workerdone
8289*6236dae4SAndroid Build Coastguard WorkerIFS=$as_save_IFS
8290*6236dae4SAndroid Build Coastguard Workerlt_ac_max=0
8291*6236dae4SAndroid Build Coastguard Workerlt_ac_count=0
8292*6236dae4SAndroid Build Coastguard Worker# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8293*6236dae4SAndroid Build Coastguard Worker# along with /bin/sed that truncates output.
8294*6236dae4SAndroid Build Coastguard Workerfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8295*6236dae4SAndroid Build Coastguard Worker  test ! -f "$lt_ac_sed" && continue
8296*6236dae4SAndroid Build Coastguard Worker  cat /dev/null > conftest.in
8297*6236dae4SAndroid Build Coastguard Worker  lt_ac_count=0
8298*6236dae4SAndroid Build Coastguard Worker  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8299*6236dae4SAndroid Build Coastguard Worker  # Check for GNU sed and select it if it is found.
8300*6236dae4SAndroid Build Coastguard Worker  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8301*6236dae4SAndroid Build Coastguard Worker    lt_cv_path_SED=$lt_ac_sed
8302*6236dae4SAndroid Build Coastguard Worker    break
8303*6236dae4SAndroid Build Coastguard Worker  fi
8304*6236dae4SAndroid Build Coastguard Worker  while true; do
8305*6236dae4SAndroid Build Coastguard Worker    cat conftest.in conftest.in >conftest.tmp
8306*6236dae4SAndroid Build Coastguard Worker    mv conftest.tmp conftest.in
8307*6236dae4SAndroid Build Coastguard Worker    cp conftest.in conftest.nl
8308*6236dae4SAndroid Build Coastguard Worker    echo >>conftest.nl
8309*6236dae4SAndroid Build Coastguard Worker    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8310*6236dae4SAndroid Build Coastguard Worker    cmp -s conftest.out conftest.nl || break
8311*6236dae4SAndroid Build Coastguard Worker    # 10000 chars as input seems more than enough
8312*6236dae4SAndroid Build Coastguard Worker    test 10 -lt "$lt_ac_count" && break
8313*6236dae4SAndroid Build Coastguard Worker    lt_ac_count=`expr $lt_ac_count + 1`
8314*6236dae4SAndroid Build Coastguard Worker    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8315*6236dae4SAndroid Build Coastguard Worker      lt_ac_max=$lt_ac_count
8316*6236dae4SAndroid Build Coastguard Worker      lt_cv_path_SED=$lt_ac_sed
8317*6236dae4SAndroid Build Coastguard Worker    fi
8318*6236dae4SAndroid Build Coastguard Worker  done
8319*6236dae4SAndroid Build Coastguard Workerdone
8320*6236dae4SAndroid Build Coastguard Worker])
8321*6236dae4SAndroid Build Coastguard WorkerSED=$lt_cv_path_SED
8322*6236dae4SAndroid Build Coastguard WorkerAC_SUBST([SED])
8323*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT([$SED])
8324*6236dae4SAndroid Build Coastguard Worker])#AC_PROG_SED
8325*6236dae4SAndroid Build Coastguard Worker])#m4_ifndef
8326*6236dae4SAndroid Build Coastguard Worker
8327*6236dae4SAndroid Build Coastguard Worker# Old name:
8328*6236dae4SAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8329*6236dae4SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
8330*6236dae4SAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_SED], [])
8331*6236dae4SAndroid Build Coastguard Worker
8332*6236dae4SAndroid Build Coastguard Worker
8333*6236dae4SAndroid Build Coastguard Worker# _LT_CHECK_SHELL_FEATURES
8334*6236dae4SAndroid Build Coastguard Worker# ------------------------
8335*6236dae4SAndroid Build Coastguard Worker# Find out whether the shell is Bourne or XSI compatible,
8336*6236dae4SAndroid Build Coastguard Worker# or has some other useful features.
8337*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHELL_FEATURES],
8338*6236dae4SAndroid Build Coastguard Worker[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8339*6236dae4SAndroid Build Coastguard Worker  lt_unset=unset
8340*6236dae4SAndroid Build Coastguard Workerelse
8341*6236dae4SAndroid Build Coastguard Worker  lt_unset=false
8342*6236dae4SAndroid Build Coastguard Workerfi
8343*6236dae4SAndroid Build Coastguard Worker_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8344*6236dae4SAndroid Build Coastguard Worker
8345*6236dae4SAndroid Build Coastguard Worker# test EBCDIC or ASCII
8346*6236dae4SAndroid Build Coastguard Workercase `echo X|tr X '\101'` in
8347*6236dae4SAndroid Build Coastguard Worker A) # ASCII based system
8348*6236dae4SAndroid Build Coastguard Worker    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8349*6236dae4SAndroid Build Coastguard Worker  lt_SP2NL='tr \040 \012'
8350*6236dae4SAndroid Build Coastguard Worker  lt_NL2SP='tr \015\012 \040\040'
8351*6236dae4SAndroid Build Coastguard Worker  ;;
8352*6236dae4SAndroid Build Coastguard Worker *) # EBCDIC based system
8353*6236dae4SAndroid Build Coastguard Worker  lt_SP2NL='tr \100 \n'
8354*6236dae4SAndroid Build Coastguard Worker  lt_NL2SP='tr \r\n \100\100'
8355*6236dae4SAndroid Build Coastguard Worker  ;;
8356*6236dae4SAndroid Build Coastguard Workeresac
8357*6236dae4SAndroid Build Coastguard Worker_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8358*6236dae4SAndroid Build Coastguard Worker_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8359*6236dae4SAndroid Build Coastguard Worker])# _LT_CHECK_SHELL_FEATURES
8360*6236dae4SAndroid Build Coastguard Worker
8361*6236dae4SAndroid Build Coastguard Worker
8362*6236dae4SAndroid Build Coastguard Worker# _LT_PATH_CONVERSION_FUNCTIONS
8363*6236dae4SAndroid Build Coastguard Worker# -----------------------------
8364*6236dae4SAndroid Build Coastguard Worker# Determine what file name conversion functions should be used by
8365*6236dae4SAndroid Build Coastguard Worker# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8366*6236dae4SAndroid Build Coastguard Worker# for certain cross-compile configurations and native mingw.
8367*6236dae4SAndroid Build Coastguard Workerm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8368*6236dae4SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8369*6236dae4SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
8370*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to $host format])
8371*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_host_file_cmd,
8372*6236dae4SAndroid Build Coastguard Worker[case $host in
8373*6236dae4SAndroid Build Coastguard Worker  *-*-mingw* )
8374*6236dae4SAndroid Build Coastguard Worker    case $build in
8375*6236dae4SAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
8376*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8377*6236dae4SAndroid Build Coastguard Worker        ;;
8378*6236dae4SAndroid Build Coastguard Worker      *-*-cygwin* )
8379*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8380*6236dae4SAndroid Build Coastguard Worker        ;;
8381*6236dae4SAndroid Build Coastguard Worker      * ) # otherwise, assume *nix
8382*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8383*6236dae4SAndroid Build Coastguard Worker        ;;
8384*6236dae4SAndroid Build Coastguard Worker    esac
8385*6236dae4SAndroid Build Coastguard Worker    ;;
8386*6236dae4SAndroid Build Coastguard Worker  *-*-cygwin* )
8387*6236dae4SAndroid Build Coastguard Worker    case $build in
8388*6236dae4SAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
8389*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8390*6236dae4SAndroid Build Coastguard Worker        ;;
8391*6236dae4SAndroid Build Coastguard Worker      *-*-cygwin* )
8392*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_noop
8393*6236dae4SAndroid Build Coastguard Worker        ;;
8394*6236dae4SAndroid Build Coastguard Worker      * ) # otherwise, assume *nix
8395*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8396*6236dae4SAndroid Build Coastguard Worker        ;;
8397*6236dae4SAndroid Build Coastguard Worker    esac
8398*6236dae4SAndroid Build Coastguard Worker    ;;
8399*6236dae4SAndroid Build Coastguard Worker  * ) # unhandled hosts (and "normal" native builds)
8400*6236dae4SAndroid Build Coastguard Worker    lt_cv_to_host_file_cmd=func_convert_file_noop
8401*6236dae4SAndroid Build Coastguard Worker    ;;
8402*6236dae4SAndroid Build Coastguard Workeresac
8403*6236dae4SAndroid Build Coastguard Worker])
8404*6236dae4SAndroid Build Coastguard Workerto_host_file_cmd=$lt_cv_to_host_file_cmd
8405*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8406*6236dae4SAndroid Build Coastguard Worker_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8407*6236dae4SAndroid Build Coastguard Worker         [0], [convert $build file names to $host format])dnl
8408*6236dae4SAndroid Build Coastguard Worker
8409*6236dae4SAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to toolchain format])
8410*6236dae4SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8411*6236dae4SAndroid Build Coastguard Worker[#assume ordinary cross tools, or native build.
8412*6236dae4SAndroid Build Coastguard Workerlt_cv_to_tool_file_cmd=func_convert_file_noop
8413*6236dae4SAndroid Build Coastguard Workercase $host in
8414*6236dae4SAndroid Build Coastguard Worker  *-*-mingw* )
8415*6236dae4SAndroid Build Coastguard Worker    case $build in
8416*6236dae4SAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
8417*6236dae4SAndroid Build Coastguard Worker        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8418*6236dae4SAndroid Build Coastguard Worker        ;;
8419*6236dae4SAndroid Build Coastguard Worker    esac
8420*6236dae4SAndroid Build Coastguard Worker    ;;
8421*6236dae4SAndroid Build Coastguard Workeresac
8422*6236dae4SAndroid Build Coastguard Worker])
8423*6236dae4SAndroid Build Coastguard Workerto_tool_file_cmd=$lt_cv_to_tool_file_cmd
8424*6236dae4SAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8425*6236dae4SAndroid Build Coastguard Worker_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8426*6236dae4SAndroid Build Coastguard Worker         [0], [convert $build files to toolchain format])dnl
8427*6236dae4SAndroid Build Coastguard Worker])# _LT_PATH_CONVERSION_FUNCTIONS
8428