xref: /aosp_15_r20/external/libconfig/m4/libtool.m4 (revision 2e9d491483b805f09ea864149eadd5680efcc72a)
1*2e9d4914SAndroid Build Coastguard Worker# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2*2e9d4914SAndroid Build Coastguard Worker#
3*2e9d4914SAndroid Build Coastguard Worker#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4*2e9d4914SAndroid Build Coastguard Worker#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5*2e9d4914SAndroid Build Coastguard Worker#                 Foundation, Inc.
6*2e9d4914SAndroid Build Coastguard Worker#   Written by Gordon Matzigkeit, 1996
7*2e9d4914SAndroid Build Coastguard Worker#
8*2e9d4914SAndroid Build Coastguard Worker# This file is free software; the Free Software Foundation gives
9*2e9d4914SAndroid Build Coastguard Worker# unlimited permission to copy and/or distribute it, with or without
10*2e9d4914SAndroid Build Coastguard Worker# modifications, as long as this notice is preserved.
11*2e9d4914SAndroid Build Coastguard Worker
12*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_COPYING], [dnl
13*2e9d4914SAndroid Build Coastguard Worker#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14*2e9d4914SAndroid Build Coastguard Worker#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
15*2e9d4914SAndroid Build Coastguard Worker#                 Foundation, Inc.
16*2e9d4914SAndroid Build Coastguard Worker#   Written by Gordon Matzigkeit, 1996
17*2e9d4914SAndroid Build Coastguard Worker#
18*2e9d4914SAndroid Build Coastguard Worker#   This file is part of GNU Libtool.
19*2e9d4914SAndroid Build Coastguard Worker#
20*2e9d4914SAndroid Build Coastguard Worker# GNU Libtool is free software; you can redistribute it and/or
21*2e9d4914SAndroid Build Coastguard Worker# modify it under the terms of the GNU General Public License as
22*2e9d4914SAndroid Build Coastguard Worker# published by the Free Software Foundation; either version 2 of
23*2e9d4914SAndroid Build Coastguard Worker# the License, or (at your option) any later version.
24*2e9d4914SAndroid Build Coastguard Worker#
25*2e9d4914SAndroid Build Coastguard Worker# As a special exception to the GNU General Public License,
26*2e9d4914SAndroid Build Coastguard Worker# if you distribute this file as part of a program or library that
27*2e9d4914SAndroid Build Coastguard Worker# is built using GNU Libtool, you may include this file under the
28*2e9d4914SAndroid Build Coastguard Worker# same distribution terms that you use for the rest of that program.
29*2e9d4914SAndroid Build Coastguard Worker#
30*2e9d4914SAndroid Build Coastguard Worker# GNU Libtool is distributed in the hope that it will be useful,
31*2e9d4914SAndroid Build Coastguard Worker# but WITHOUT ANY WARRANTY; without even the implied warranty of
32*2e9d4914SAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33*2e9d4914SAndroid Build Coastguard Worker# GNU General Public License for more details.
34*2e9d4914SAndroid Build Coastguard Worker#
35*2e9d4914SAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License
36*2e9d4914SAndroid Build Coastguard Worker# along with GNU Libtool; see the file COPYING.  If not, a copy
37*2e9d4914SAndroid Build Coastguard Worker# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
38*2e9d4914SAndroid Build Coastguard Worker# obtained by writing to the Free Software Foundation, Inc.,
39*2e9d4914SAndroid Build Coastguard Worker# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
40*2e9d4914SAndroid Build Coastguard Worker])
41*2e9d4914SAndroid Build Coastguard Worker
42*2e9d4914SAndroid Build Coastguard Worker# serial 57 LT_INIT
43*2e9d4914SAndroid Build Coastguard Worker
44*2e9d4914SAndroid Build Coastguard Worker
45*2e9d4914SAndroid Build Coastguard Worker# LT_PREREQ(VERSION)
46*2e9d4914SAndroid Build Coastguard Worker# ------------------
47*2e9d4914SAndroid Build Coastguard Worker# Complain and exit if this libtool version is less that VERSION.
48*2e9d4914SAndroid Build Coastguard Workerm4_defun([LT_PREREQ],
49*2e9d4914SAndroid Build Coastguard Worker[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
50*2e9d4914SAndroid Build Coastguard Worker       [m4_default([$3],
51*2e9d4914SAndroid Build Coastguard Worker		   [m4_fatal([Libtool version $1 or higher is required],
52*2e9d4914SAndroid Build Coastguard Worker		             63)])],
53*2e9d4914SAndroid Build Coastguard Worker       [$2])])
54*2e9d4914SAndroid Build Coastguard Worker
55*2e9d4914SAndroid Build Coastguard Worker
56*2e9d4914SAndroid Build Coastguard Worker# _LT_CHECK_BUILDDIR
57*2e9d4914SAndroid Build Coastguard Worker# ------------------
58*2e9d4914SAndroid Build Coastguard Worker# Complain if the absolute build directory name contains unusual characters
59*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_BUILDDIR],
60*2e9d4914SAndroid Build Coastguard Worker[case `pwd` in
61*2e9d4914SAndroid Build Coastguard Worker  *\ * | *\	*)
62*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
63*2e9d4914SAndroid Build Coastguard Workeresac
64*2e9d4914SAndroid Build Coastguard Worker])
65*2e9d4914SAndroid Build Coastguard Worker
66*2e9d4914SAndroid Build Coastguard Worker
67*2e9d4914SAndroid Build Coastguard Worker# LT_INIT([OPTIONS])
68*2e9d4914SAndroid Build Coastguard Worker# ------------------
69*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_INIT],
70*2e9d4914SAndroid Build Coastguard Worker[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
71*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
72*2e9d4914SAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_LANG])dnl
73*2e9d4914SAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_OUTPUT])dnl
74*2e9d4914SAndroid Build Coastguard WorkerAC_BEFORE([$0], [LTDL_INIT])dnl
75*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CHECK_BUILDDIR])dnl
76*2e9d4914SAndroid Build Coastguard Worker
77*2e9d4914SAndroid Build Coastguard Workerdnl Autoconf doesn't catch unexpanded LT_ macros by default:
78*2e9d4914SAndroid Build Coastguard Workerm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
79*2e9d4914SAndroid Build Coastguard Workerm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
80*2e9d4914SAndroid Build Coastguard Workerdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
81*2e9d4914SAndroid Build Coastguard Workerdnl unless we require an AC_DEFUNed macro:
82*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LTOPTIONS_VERSION])dnl
83*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LTSUGAR_VERSION])dnl
84*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LTVERSION_VERSION])dnl
85*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LTOBSOLETE_VERSION])dnl
86*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_PROG_LTMAIN])dnl
87*2e9d4914SAndroid Build Coastguard Worker
88*2e9d4914SAndroid Build Coastguard Worker_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
89*2e9d4914SAndroid Build Coastguard Worker
90*2e9d4914SAndroid Build Coastguard Workerdnl Parse OPTIONS
91*2e9d4914SAndroid Build Coastguard Worker_LT_SET_OPTIONS([$0], [$1])
92*2e9d4914SAndroid Build Coastguard Worker
93*2e9d4914SAndroid Build Coastguard Worker# This can be used to rebuild libtool when needed
94*2e9d4914SAndroid Build Coastguard WorkerLIBTOOL_DEPS="$ltmain"
95*2e9d4914SAndroid Build Coastguard Worker
96*2e9d4914SAndroid Build Coastguard Worker# Always use our own libtool.
97*2e9d4914SAndroid Build Coastguard WorkerLIBTOOL='$(SHELL) $(top_builddir)/libtool'
98*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL)dnl
99*2e9d4914SAndroid Build Coastguard Worker
100*2e9d4914SAndroid Build Coastguard Worker_LT_SETUP
101*2e9d4914SAndroid Build Coastguard Worker
102*2e9d4914SAndroid Build Coastguard Worker# Only expand once:
103*2e9d4914SAndroid Build Coastguard Workerm4_define([LT_INIT])
104*2e9d4914SAndroid Build Coastguard Worker])# LT_INIT
105*2e9d4914SAndroid Build Coastguard Worker
106*2e9d4914SAndroid Build Coastguard Worker# Old names:
107*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
108*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
109*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
110*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
111*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
112*2e9d4914SAndroid Build Coastguard Worker
113*2e9d4914SAndroid Build Coastguard Worker
114*2e9d4914SAndroid Build Coastguard Worker# _LT_CC_BASENAME(CC)
115*2e9d4914SAndroid Build Coastguard Worker# -------------------
116*2e9d4914SAndroid Build Coastguard Worker# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
117*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CC_BASENAME],
118*2e9d4914SAndroid Build Coastguard Worker[for cc_temp in $1""; do
119*2e9d4914SAndroid Build Coastguard Worker  case $cc_temp in
120*2e9d4914SAndroid Build Coastguard Worker    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
121*2e9d4914SAndroid Build Coastguard Worker    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
122*2e9d4914SAndroid Build Coastguard Worker    \-*) ;;
123*2e9d4914SAndroid Build Coastguard Worker    *) break;;
124*2e9d4914SAndroid Build Coastguard Worker  esac
125*2e9d4914SAndroid Build Coastguard Workerdone
126*2e9d4914SAndroid Build Coastguard Workercc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
127*2e9d4914SAndroid Build Coastguard Worker])
128*2e9d4914SAndroid Build Coastguard Worker
129*2e9d4914SAndroid Build Coastguard Worker
130*2e9d4914SAndroid Build Coastguard Worker# _LT_FILEUTILS_DEFAULTS
131*2e9d4914SAndroid Build Coastguard Worker# ----------------------
132*2e9d4914SAndroid Build Coastguard Worker# It is okay to use these file commands and assume they have been set
133*2e9d4914SAndroid Build Coastguard Worker# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
134*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_FILEUTILS_DEFAULTS],
135*2e9d4914SAndroid Build Coastguard Worker[: ${CP="cp -f"}
136*2e9d4914SAndroid Build Coastguard Worker: ${MV="mv -f"}
137*2e9d4914SAndroid Build Coastguard Worker: ${RM="rm -f"}
138*2e9d4914SAndroid Build Coastguard Worker])# _LT_FILEUTILS_DEFAULTS
139*2e9d4914SAndroid Build Coastguard Worker
140*2e9d4914SAndroid Build Coastguard Worker
141*2e9d4914SAndroid Build Coastguard Worker# _LT_SETUP
142*2e9d4914SAndroid Build Coastguard Worker# ---------
143*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_SETUP],
144*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
145*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
146*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
147*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
148*2e9d4914SAndroid Build Coastguard Worker
149*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
150*2e9d4914SAndroid Build Coastguard Workerdnl
151*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [host_alias], [0], [The host system])dnl
152*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [host], [0])dnl
153*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [host_os], [0])dnl
154*2e9d4914SAndroid Build Coastguard Workerdnl
155*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [build_alias], [0], [The build system])dnl
156*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [build], [0])dnl
157*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [build_os], [0])dnl
158*2e9d4914SAndroid Build Coastguard Workerdnl
159*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl
160*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl
161*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
162*2e9d4914SAndroid Build Coastguard Workerdnl
163*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_LN_S])dnl
164*2e9d4914SAndroid Build Coastguard Workertest -z "$LN_S" && LN_S="ln -s"
165*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
166*2e9d4914SAndroid Build Coastguard Workerdnl
167*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LT_CMD_MAX_LEN])dnl
168*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
169*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
170*2e9d4914SAndroid Build Coastguard Workerdnl
171*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
172*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl
173*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
174*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CMD_RELOAD])dnl
175*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CHECK_MAGIC_METHOD])dnl
176*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
177*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CMD_OLD_ARCHIVE])dnl
178*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
179*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_WITH_SYSROOT])dnl
180*2e9d4914SAndroid Build Coastguard Worker
181*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([
182*2e9d4914SAndroid Build Coastguard Worker# See if we are running on zsh, and set the options which allow our
183*2e9d4914SAndroid Build Coastguard Worker# commands through without removal of \ escapes INIT.
184*2e9d4914SAndroid Build Coastguard Workerif test -n "\${ZSH_VERSION+set}" ; then
185*2e9d4914SAndroid Build Coastguard Worker   setopt NO_GLOB_SUBST
186*2e9d4914SAndroid Build Coastguard Workerfi
187*2e9d4914SAndroid Build Coastguard Worker])
188*2e9d4914SAndroid Build Coastguard Workerif test -n "${ZSH_VERSION+set}" ; then
189*2e9d4914SAndroid Build Coastguard Worker   setopt NO_GLOB_SUBST
190*2e9d4914SAndroid Build Coastguard Workerfi
191*2e9d4914SAndroid Build Coastguard Worker
192*2e9d4914SAndroid Build Coastguard Worker_LT_CHECK_OBJDIR
193*2e9d4914SAndroid Build Coastguard Worker
194*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
195*2e9d4914SAndroid Build Coastguard Worker
196*2e9d4914SAndroid Build Coastguard Workercase $host_os in
197*2e9d4914SAndroid Build Coastguard Workeraix3*)
198*2e9d4914SAndroid Build Coastguard Worker  # AIX sometimes has problems with the GCC collect2 program.  For some
199*2e9d4914SAndroid Build Coastguard Worker  # reason, if we set the COLLECT_NAMES environment variable, the problems
200*2e9d4914SAndroid Build Coastguard Worker  # vanish in a puff of smoke.
201*2e9d4914SAndroid Build Coastguard Worker  if test "X${COLLECT_NAMES+set}" != Xset; then
202*2e9d4914SAndroid Build Coastguard Worker    COLLECT_NAMES=
203*2e9d4914SAndroid Build Coastguard Worker    export COLLECT_NAMES
204*2e9d4914SAndroid Build Coastguard Worker  fi
205*2e9d4914SAndroid Build Coastguard Worker  ;;
206*2e9d4914SAndroid Build Coastguard Workeresac
207*2e9d4914SAndroid Build Coastguard Worker
208*2e9d4914SAndroid Build Coastguard Worker# Global variables:
209*2e9d4914SAndroid Build Coastguard Workerofile=libtool
210*2e9d4914SAndroid Build Coastguard Workercan_build_shared=yes
211*2e9d4914SAndroid Build Coastguard Worker
212*2e9d4914SAndroid Build Coastguard Worker# All known linkers require a `.a' archive for static linking (except MSVC,
213*2e9d4914SAndroid Build Coastguard Worker# which needs '.lib').
214*2e9d4914SAndroid Build Coastguard Workerlibext=a
215*2e9d4914SAndroid Build Coastguard Worker
216*2e9d4914SAndroid Build Coastguard Workerwith_gnu_ld="$lt_cv_prog_gnu_ld"
217*2e9d4914SAndroid Build Coastguard Worker
218*2e9d4914SAndroid Build Coastguard Workerold_CC="$CC"
219*2e9d4914SAndroid Build Coastguard Workerold_CFLAGS="$CFLAGS"
220*2e9d4914SAndroid Build Coastguard Worker
221*2e9d4914SAndroid Build Coastguard Worker# Set sane defaults for various variables
222*2e9d4914SAndroid Build Coastguard Workertest -z "$CC" && CC=cc
223*2e9d4914SAndroid Build Coastguard Workertest -z "$LTCC" && LTCC=$CC
224*2e9d4914SAndroid Build Coastguard Workertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
225*2e9d4914SAndroid Build Coastguard Workertest -z "$LD" && LD=ld
226*2e9d4914SAndroid Build Coastguard Workertest -z "$ac_objext" && ac_objext=o
227*2e9d4914SAndroid Build Coastguard Worker
228*2e9d4914SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
229*2e9d4914SAndroid Build Coastguard Worker
230*2e9d4914SAndroid Build Coastguard Worker# Only perform the check for file, if the check method requires it
231*2e9d4914SAndroid Build Coastguard Workertest -z "$MAGIC_CMD" && MAGIC_CMD=file
232*2e9d4914SAndroid Build Coastguard Workercase $deplibs_check_method in
233*2e9d4914SAndroid Build Coastguard Workerfile_magic*)
234*2e9d4914SAndroid Build Coastguard Worker  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
235*2e9d4914SAndroid Build Coastguard Worker    _LT_PATH_MAGIC
236*2e9d4914SAndroid Build Coastguard Worker  fi
237*2e9d4914SAndroid Build Coastguard Worker  ;;
238*2e9d4914SAndroid Build Coastguard Workeresac
239*2e9d4914SAndroid Build Coastguard Worker
240*2e9d4914SAndroid Build Coastguard Worker# Use C for the default configuration in the libtool script
241*2e9d4914SAndroid Build Coastguard WorkerLT_SUPPORTED_TAG([CC])
242*2e9d4914SAndroid Build Coastguard Worker_LT_LANG_C_CONFIG
243*2e9d4914SAndroid Build Coastguard Worker_LT_LANG_DEFAULT_CONFIG
244*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_COMMANDS
245*2e9d4914SAndroid Build Coastguard Worker])# _LT_SETUP
246*2e9d4914SAndroid Build Coastguard Worker
247*2e9d4914SAndroid Build Coastguard Worker
248*2e9d4914SAndroid Build Coastguard Worker# _LT_PREPARE_SED_QUOTE_VARS
249*2e9d4914SAndroid Build Coastguard Worker# --------------------------
250*2e9d4914SAndroid Build Coastguard Worker# Define a few sed substitution that help us do robust quoting.
251*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
252*2e9d4914SAndroid Build Coastguard Worker[# Backslashify metacharacters that are still active within
253*2e9d4914SAndroid Build Coastguard Worker# double-quoted strings.
254*2e9d4914SAndroid Build Coastguard Workersed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
255*2e9d4914SAndroid Build Coastguard Worker
256*2e9d4914SAndroid Build Coastguard Worker# Same as above, but do not quote variable references.
257*2e9d4914SAndroid Build Coastguard Workerdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
258*2e9d4914SAndroid Build Coastguard Worker
259*2e9d4914SAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped shell variable in a
260*2e9d4914SAndroid Build Coastguard Worker# double_quote_subst'ed string.
261*2e9d4914SAndroid Build Coastguard Workerdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
262*2e9d4914SAndroid Build Coastguard Worker
263*2e9d4914SAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped single quote.
264*2e9d4914SAndroid Build Coastguard Workerdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
265*2e9d4914SAndroid Build Coastguard Worker
266*2e9d4914SAndroid Build Coastguard Worker# Sed substitution to avoid accidental globbing in evaled expressions
267*2e9d4914SAndroid Build Coastguard Workerno_glob_subst='s/\*/\\\*/g'
268*2e9d4914SAndroid Build Coastguard Worker])
269*2e9d4914SAndroid Build Coastguard Worker
270*2e9d4914SAndroid Build Coastguard Worker# _LT_PROG_LTMAIN
271*2e9d4914SAndroid Build Coastguard Worker# ---------------
272*2e9d4914SAndroid Build Coastguard Worker# Note that this code is called both from `configure', and `config.status'
273*2e9d4914SAndroid Build Coastguard Worker# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
274*2e9d4914SAndroid Build Coastguard Worker# `config.status' has no value for ac_aux_dir unless we are using Automake,
275*2e9d4914SAndroid Build Coastguard Worker# so we pass a copy along to make sure it has a sensible value anyway.
276*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PROG_LTMAIN],
277*2e9d4914SAndroid Build Coastguard Worker[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
278*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
279*2e9d4914SAndroid Build Coastguard Workerltmain="$ac_aux_dir/ltmain.sh"
280*2e9d4914SAndroid Build Coastguard Worker])# _LT_PROG_LTMAIN
281*2e9d4914SAndroid Build Coastguard Worker
282*2e9d4914SAndroid Build Coastguard Worker
283*2e9d4914SAndroid Build Coastguard Worker## ------------------------------------- ##
284*2e9d4914SAndroid Build Coastguard Worker## Accumulate code for creating libtool. ##
285*2e9d4914SAndroid Build Coastguard Worker## ------------------------------------- ##
286*2e9d4914SAndroid Build Coastguard Worker
287*2e9d4914SAndroid Build Coastguard Worker# So that we can recreate a full libtool script including additional
288*2e9d4914SAndroid Build Coastguard Worker# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
289*2e9d4914SAndroid Build Coastguard Worker# in macros and then make a single call at the end using the `libtool'
290*2e9d4914SAndroid Build Coastguard Worker# label.
291*2e9d4914SAndroid Build Coastguard Worker
292*2e9d4914SAndroid Build Coastguard Worker
293*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
294*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------------
295*2e9d4914SAndroid Build Coastguard Worker# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
296*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL_INIT],
297*2e9d4914SAndroid Build Coastguard Worker[m4_ifval([$1],
298*2e9d4914SAndroid Build Coastguard Worker          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
299*2e9d4914SAndroid Build Coastguard Worker                     [$1
300*2e9d4914SAndroid Build Coastguard Worker])])])
301*2e9d4914SAndroid Build Coastguard Worker
302*2e9d4914SAndroid Build Coastguard Worker# Initialize.
303*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_INIT])
304*2e9d4914SAndroid Build Coastguard Worker
305*2e9d4914SAndroid Build Coastguard Worker
306*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL([COMMANDS])
307*2e9d4914SAndroid Build Coastguard Worker# ------------------------------
308*2e9d4914SAndroid Build Coastguard Worker# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
309*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL],
310*2e9d4914SAndroid Build Coastguard Worker[m4_ifval([$1],
311*2e9d4914SAndroid Build Coastguard Worker          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
312*2e9d4914SAndroid Build Coastguard Worker                     [$1
313*2e9d4914SAndroid Build Coastguard Worker])])])
314*2e9d4914SAndroid Build Coastguard Worker
315*2e9d4914SAndroid Build Coastguard Worker# Initialize.
316*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
317*2e9d4914SAndroid Build Coastguard Worker
318*2e9d4914SAndroid Build Coastguard Worker
319*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
320*2e9d4914SAndroid Build Coastguard Worker# -----------------------------------------------------
321*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_SAVE_COMMANDS],
322*2e9d4914SAndroid Build Coastguard Worker[_LT_CONFIG_LIBTOOL([$1])
323*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([$2])
324*2e9d4914SAndroid Build Coastguard Worker])
325*2e9d4914SAndroid Build Coastguard Worker
326*2e9d4914SAndroid Build Coastguard Worker
327*2e9d4914SAndroid Build Coastguard Worker# _LT_FORMAT_COMMENT([COMMENT])
328*2e9d4914SAndroid Build Coastguard Worker# -----------------------------
329*2e9d4914SAndroid Build Coastguard Worker# Add leading comment marks to the start of each line, and a trailing
330*2e9d4914SAndroid Build Coastguard Worker# full-stop to the whole comment if one is not present already.
331*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_FORMAT_COMMENT],
332*2e9d4914SAndroid Build Coastguard Worker[m4_ifval([$1], [
333*2e9d4914SAndroid Build Coastguard Workerm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
334*2e9d4914SAndroid Build Coastguard Worker              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
335*2e9d4914SAndroid Build Coastguard Worker)])
336*2e9d4914SAndroid Build Coastguard Worker
337*2e9d4914SAndroid Build Coastguard Worker
338*2e9d4914SAndroid Build Coastguard Worker
339*2e9d4914SAndroid Build Coastguard Worker## ------------------------ ##
340*2e9d4914SAndroid Build Coastguard Worker## FIXME: Eliminate VARNAME ##
341*2e9d4914SAndroid Build Coastguard Worker## ------------------------ ##
342*2e9d4914SAndroid Build Coastguard Worker
343*2e9d4914SAndroid Build Coastguard Worker
344*2e9d4914SAndroid Build Coastguard Worker# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
345*2e9d4914SAndroid Build Coastguard Worker# -------------------------------------------------------------------
346*2e9d4914SAndroid Build Coastguard Worker# CONFIGNAME is the name given to the value in the libtool script.
347*2e9d4914SAndroid Build Coastguard Worker# VARNAME is the (base) name used in the configure script.
348*2e9d4914SAndroid Build Coastguard Worker# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
349*2e9d4914SAndroid Build Coastguard Worker# VARNAME.  Any other value will be used directly.
350*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_DECL],
351*2e9d4914SAndroid Build Coastguard Worker[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
352*2e9d4914SAndroid Build Coastguard Worker    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
353*2e9d4914SAndroid Build Coastguard Worker	[m4_ifval([$1], [$1], [$2])])
354*2e9d4914SAndroid Build Coastguard Worker    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
355*2e9d4914SAndroid Build Coastguard Worker    m4_ifval([$4],
356*2e9d4914SAndroid Build Coastguard Worker	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
357*2e9d4914SAndroid Build Coastguard Worker    lt_dict_add_subkey([lt_decl_dict], [$2],
358*2e9d4914SAndroid Build Coastguard Worker	[tagged?], [m4_ifval([$5], [yes], [no])])])
359*2e9d4914SAndroid Build Coastguard Worker])
360*2e9d4914SAndroid Build Coastguard Worker
361*2e9d4914SAndroid Build Coastguard Worker
362*2e9d4914SAndroid Build Coastguard Worker# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
363*2e9d4914SAndroid Build Coastguard Worker# --------------------------------------------------------
364*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
365*2e9d4914SAndroid Build Coastguard Worker
366*2e9d4914SAndroid Build Coastguard Worker
367*2e9d4914SAndroid Build Coastguard Worker# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
368*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------------------
369*2e9d4914SAndroid Build Coastguard Workerm4_define([lt_decl_tag_varnames],
370*2e9d4914SAndroid Build Coastguard Worker[_lt_decl_filter([tagged?], [yes], $@)])
371*2e9d4914SAndroid Build Coastguard Worker
372*2e9d4914SAndroid Build Coastguard Worker
373*2e9d4914SAndroid Build Coastguard Worker# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
374*2e9d4914SAndroid Build Coastguard Worker# ---------------------------------------------------------
375*2e9d4914SAndroid Build Coastguard Workerm4_define([_lt_decl_filter],
376*2e9d4914SAndroid Build Coastguard Worker[m4_case([$#],
377*2e9d4914SAndroid Build Coastguard Worker  [0], [m4_fatal([$0: too few arguments: $#])],
378*2e9d4914SAndroid Build Coastguard Worker  [1], [m4_fatal([$0: too few arguments: $#: $1])],
379*2e9d4914SAndroid Build Coastguard Worker  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
380*2e9d4914SAndroid Build Coastguard Worker  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
381*2e9d4914SAndroid Build Coastguard Worker  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
382*2e9d4914SAndroid Build Coastguard Worker])
383*2e9d4914SAndroid Build Coastguard Worker
384*2e9d4914SAndroid Build Coastguard Worker
385*2e9d4914SAndroid Build Coastguard Worker# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
386*2e9d4914SAndroid Build Coastguard Worker# --------------------------------------------------
387*2e9d4914SAndroid Build Coastguard Workerm4_define([lt_decl_quote_varnames],
388*2e9d4914SAndroid Build Coastguard Worker[_lt_decl_filter([value], [1], $@)])
389*2e9d4914SAndroid Build Coastguard Worker
390*2e9d4914SAndroid Build Coastguard Worker
391*2e9d4914SAndroid Build Coastguard Worker# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
392*2e9d4914SAndroid Build Coastguard Worker# ---------------------------------------------------
393*2e9d4914SAndroid Build Coastguard Workerm4_define([lt_decl_dquote_varnames],
394*2e9d4914SAndroid Build Coastguard Worker[_lt_decl_filter([value], [2], $@)])
395*2e9d4914SAndroid Build Coastguard Worker
396*2e9d4914SAndroid Build Coastguard Worker
397*2e9d4914SAndroid Build Coastguard Worker# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
398*2e9d4914SAndroid Build Coastguard Worker# ---------------------------------------------------
399*2e9d4914SAndroid Build Coastguard Workerm4_define([lt_decl_varnames_tagged],
400*2e9d4914SAndroid Build Coastguard Worker[m4_assert([$# <= 2])dnl
401*2e9d4914SAndroid Build Coastguard Worker_$0(m4_quote(m4_default([$1], [[, ]])),
402*2e9d4914SAndroid Build Coastguard Worker    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
403*2e9d4914SAndroid Build Coastguard Worker    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
404*2e9d4914SAndroid Build Coastguard Workerm4_define([_lt_decl_varnames_tagged],
405*2e9d4914SAndroid Build Coastguard Worker[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
406*2e9d4914SAndroid Build Coastguard Worker
407*2e9d4914SAndroid Build Coastguard Worker
408*2e9d4914SAndroid Build Coastguard Worker# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
409*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------------------
410*2e9d4914SAndroid Build Coastguard Workerm4_define([lt_decl_all_varnames],
411*2e9d4914SAndroid Build Coastguard Worker[_$0(m4_quote(m4_default([$1], [[, ]])),
412*2e9d4914SAndroid Build Coastguard Worker     m4_if([$2], [],
413*2e9d4914SAndroid Build Coastguard Worker	   m4_quote(lt_decl_varnames),
414*2e9d4914SAndroid Build Coastguard Worker	m4_quote(m4_shift($@))))[]dnl
415*2e9d4914SAndroid Build Coastguard Worker])
416*2e9d4914SAndroid Build Coastguard Workerm4_define([_lt_decl_all_varnames],
417*2e9d4914SAndroid Build Coastguard Worker[lt_join($@, lt_decl_varnames_tagged([$1],
418*2e9d4914SAndroid Build Coastguard Worker			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
419*2e9d4914SAndroid Build Coastguard Worker])
420*2e9d4914SAndroid Build Coastguard Worker
421*2e9d4914SAndroid Build Coastguard Worker
422*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARE([VARNAME])
423*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------
424*2e9d4914SAndroid Build Coastguard Worker# Quote a variable value, and forward it to `config.status' so that its
425*2e9d4914SAndroid Build Coastguard Worker# declaration there will have the same value as in `configure'.  VARNAME
426*2e9d4914SAndroid Build Coastguard Worker# must have a single quote delimited value for this to work.
427*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_CONFIG_STATUS_DECLARE],
428*2e9d4914SAndroid Build Coastguard Worker[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
429*2e9d4914SAndroid Build Coastguard Worker
430*2e9d4914SAndroid Build Coastguard Worker
431*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARATIONS
432*2e9d4914SAndroid Build Coastguard Worker# ------------------------------
433*2e9d4914SAndroid Build Coastguard Worker# We delimit libtool config variables with single quotes, so when
434*2e9d4914SAndroid Build Coastguard Worker# we write them to config.status, we have to be sure to quote all
435*2e9d4914SAndroid Build Coastguard Worker# embedded single quotes properly.  In configure, this macro expands
436*2e9d4914SAndroid Build Coastguard Worker# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
437*2e9d4914SAndroid Build Coastguard Worker#
438*2e9d4914SAndroid Build Coastguard Worker#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
439*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
440*2e9d4914SAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
441*2e9d4914SAndroid Build Coastguard Worker    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
442*2e9d4914SAndroid Build Coastguard Worker
443*2e9d4914SAndroid Build Coastguard Worker
444*2e9d4914SAndroid Build Coastguard Worker# _LT_LIBTOOL_TAGS
445*2e9d4914SAndroid Build Coastguard Worker# ----------------
446*2e9d4914SAndroid Build Coastguard Worker# Output comment and list of tags supported by the script
447*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_TAGS],
448*2e9d4914SAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
449*2e9d4914SAndroid Build Coastguard Workeravailable_tags="_LT_TAGS"dnl
450*2e9d4914SAndroid Build Coastguard Worker])
451*2e9d4914SAndroid Build Coastguard Worker
452*2e9d4914SAndroid Build Coastguard Worker
453*2e9d4914SAndroid Build Coastguard Worker# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
454*2e9d4914SAndroid Build Coastguard Worker# -----------------------------------
455*2e9d4914SAndroid Build Coastguard Worker# Extract the dictionary values for VARNAME (optionally with TAG) and
456*2e9d4914SAndroid Build Coastguard Worker# expand to a commented shell variable setting:
457*2e9d4914SAndroid Build Coastguard Worker#
458*2e9d4914SAndroid Build Coastguard Worker#    # Some comment about what VAR is for.
459*2e9d4914SAndroid Build Coastguard Worker#    visible_name=$lt_internal_name
460*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_DECLARE],
461*2e9d4914SAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
462*2e9d4914SAndroid Build Coastguard Worker					   [description])))[]dnl
463*2e9d4914SAndroid Build Coastguard Workerm4_pushdef([_libtool_name],
464*2e9d4914SAndroid Build Coastguard Worker    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
465*2e9d4914SAndroid Build Coastguard Workerm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
466*2e9d4914SAndroid Build Coastguard Worker    [0], [_libtool_name=[$]$1],
467*2e9d4914SAndroid Build Coastguard Worker    [1], [_libtool_name=$lt_[]$1],
468*2e9d4914SAndroid Build Coastguard Worker    [2], [_libtool_name=$lt_[]$1],
469*2e9d4914SAndroid Build Coastguard Worker    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
470*2e9d4914SAndroid Build Coastguard Workerm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
471*2e9d4914SAndroid Build Coastguard Worker])
472*2e9d4914SAndroid Build Coastguard Worker
473*2e9d4914SAndroid Build Coastguard Worker
474*2e9d4914SAndroid Build Coastguard Worker# _LT_LIBTOOL_CONFIG_VARS
475*2e9d4914SAndroid Build Coastguard Worker# -----------------------
476*2e9d4914SAndroid Build Coastguard Worker# Produce commented declarations of non-tagged libtool config variables
477*2e9d4914SAndroid Build Coastguard Worker# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
478*2e9d4914SAndroid Build Coastguard Worker# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
479*2e9d4914SAndroid Build Coastguard Worker# section) are produced by _LT_LIBTOOL_TAG_VARS.
480*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_CONFIG_VARS],
481*2e9d4914SAndroid Build Coastguard Worker[m4_foreach([_lt_var],
482*2e9d4914SAndroid Build Coastguard Worker    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
483*2e9d4914SAndroid Build Coastguard Worker    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
484*2e9d4914SAndroid Build Coastguard Worker
485*2e9d4914SAndroid Build Coastguard Worker
486*2e9d4914SAndroid Build Coastguard Worker# _LT_LIBTOOL_TAG_VARS(TAG)
487*2e9d4914SAndroid Build Coastguard Worker# -------------------------
488*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_TAG_VARS],
489*2e9d4914SAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
490*2e9d4914SAndroid Build Coastguard Worker    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
491*2e9d4914SAndroid Build Coastguard Worker
492*2e9d4914SAndroid Build Coastguard Worker
493*2e9d4914SAndroid Build Coastguard Worker# _LT_TAGVAR(VARNAME, [TAGNAME])
494*2e9d4914SAndroid Build Coastguard Worker# ------------------------------
495*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
496*2e9d4914SAndroid Build Coastguard Worker
497*2e9d4914SAndroid Build Coastguard Worker
498*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG_COMMANDS
499*2e9d4914SAndroid Build Coastguard Worker# -------------------
500*2e9d4914SAndroid Build Coastguard Worker# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
501*2e9d4914SAndroid Build Coastguard Worker# variables for single and double quote escaping we saved from calls
502*2e9d4914SAndroid Build Coastguard Worker# to _LT_DECL, we can put quote escaped variables declarations
503*2e9d4914SAndroid Build Coastguard Worker# into `config.status', and then the shell code to quote escape them in
504*2e9d4914SAndroid Build Coastguard Worker# for loops in `config.status'.  Finally, any additional code accumulated
505*2e9d4914SAndroid Build Coastguard Worker# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
506*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_COMMANDS],
507*2e9d4914SAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([LT_OUTPUT],
508*2e9d4914SAndroid Build Coastguard Worker	dnl If the libtool generation code has been placed in $CONFIG_LT,
509*2e9d4914SAndroid Build Coastguard Worker	dnl instead of duplicating it all over again into config.status,
510*2e9d4914SAndroid Build Coastguard Worker	dnl then we will have config.status run $CONFIG_LT later, so it
511*2e9d4914SAndroid Build Coastguard Worker	dnl needs to know what name is stored there:
512*2e9d4914SAndroid Build Coastguard Worker        [AC_CONFIG_COMMANDS([libtool],
513*2e9d4914SAndroid Build Coastguard Worker            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
514*2e9d4914SAndroid Build Coastguard Worker    dnl If the libtool generation code is destined for config.status,
515*2e9d4914SAndroid Build Coastguard Worker    dnl expand the accumulated commands and init code now:
516*2e9d4914SAndroid Build Coastguard Worker    [AC_CONFIG_COMMANDS([libtool],
517*2e9d4914SAndroid Build Coastguard Worker        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
518*2e9d4914SAndroid Build Coastguard Worker])#_LT_CONFIG_COMMANDS
519*2e9d4914SAndroid Build Coastguard Worker
520*2e9d4914SAndroid Build Coastguard Worker
521*2e9d4914SAndroid Build Coastguard Worker# Initialize.
522*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
523*2e9d4914SAndroid Build Coastguard Worker[
524*2e9d4914SAndroid Build Coastguard Worker
525*2e9d4914SAndroid Build Coastguard Worker# The HP-UX ksh and POSIX shell print the target directory to stdout
526*2e9d4914SAndroid Build Coastguard Worker# if CDPATH is set.
527*2e9d4914SAndroid Build Coastguard Worker(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
528*2e9d4914SAndroid Build Coastguard Worker
529*2e9d4914SAndroid Build Coastguard Workersed_quote_subst='$sed_quote_subst'
530*2e9d4914SAndroid Build Coastguard Workerdouble_quote_subst='$double_quote_subst'
531*2e9d4914SAndroid Build Coastguard Workerdelay_variable_subst='$delay_variable_subst'
532*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_STATUS_DECLARATIONS
533*2e9d4914SAndroid Build Coastguard WorkerLTCC='$LTCC'
534*2e9d4914SAndroid Build Coastguard WorkerLTCFLAGS='$LTCFLAGS'
535*2e9d4914SAndroid Build Coastguard Workercompiler='$compiler_DEFAULT'
536*2e9d4914SAndroid Build Coastguard Worker
537*2e9d4914SAndroid Build Coastguard Worker# A function that is used when there is no print builtin or printf.
538*2e9d4914SAndroid Build Coastguard Workerfunc_fallback_echo ()
539*2e9d4914SAndroid Build Coastguard Worker{
540*2e9d4914SAndroid Build Coastguard Worker  eval 'cat <<_LTECHO_EOF
541*2e9d4914SAndroid Build Coastguard Worker\$[]1
542*2e9d4914SAndroid Build Coastguard Worker_LTECHO_EOF'
543*2e9d4914SAndroid Build Coastguard Worker}
544*2e9d4914SAndroid Build Coastguard Worker
545*2e9d4914SAndroid Build Coastguard Worker# Quote evaled strings.
546*2e9d4914SAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \
547*2e9d4914SAndroid Build Coastguard Worker]], lt_decl_quote_varnames); do
548*2e9d4914SAndroid Build Coastguard Worker    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
549*2e9d4914SAndroid Build Coastguard Worker    *[[\\\\\\\`\\"\\\$]]*)
550*2e9d4914SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
551*2e9d4914SAndroid Build Coastguard Worker      ;;
552*2e9d4914SAndroid Build Coastguard Worker    *)
553*2e9d4914SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
554*2e9d4914SAndroid Build Coastguard Worker      ;;
555*2e9d4914SAndroid Build Coastguard Worker    esac
556*2e9d4914SAndroid Build Coastguard Workerdone
557*2e9d4914SAndroid Build Coastguard Worker
558*2e9d4914SAndroid Build Coastguard Worker# Double-quote double-evaled strings.
559*2e9d4914SAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \
560*2e9d4914SAndroid Build Coastguard Worker]], lt_decl_dquote_varnames); do
561*2e9d4914SAndroid Build Coastguard Worker    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
562*2e9d4914SAndroid Build Coastguard Worker    *[[\\\\\\\`\\"\\\$]]*)
563*2e9d4914SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
564*2e9d4914SAndroid Build Coastguard Worker      ;;
565*2e9d4914SAndroid Build Coastguard Worker    *)
566*2e9d4914SAndroid Build Coastguard Worker      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
567*2e9d4914SAndroid Build Coastguard Worker      ;;
568*2e9d4914SAndroid Build Coastguard Worker    esac
569*2e9d4914SAndroid Build Coastguard Workerdone
570*2e9d4914SAndroid Build Coastguard Worker
571*2e9d4914SAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_INIT
572*2e9d4914SAndroid Build Coastguard Worker])
573*2e9d4914SAndroid Build Coastguard Worker
574*2e9d4914SAndroid Build Coastguard Worker# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
575*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------
576*2e9d4914SAndroid Build Coastguard Worker# Generate a child script FILE with all initialization necessary to
577*2e9d4914SAndroid Build Coastguard Worker# reuse the environment learned by the parent script, and make the
578*2e9d4914SAndroid Build Coastguard Worker# file executable.  If COMMENT is supplied, it is inserted after the
579*2e9d4914SAndroid Build Coastguard Worker# `#!' sequence but before initialization text begins.  After this
580*2e9d4914SAndroid Build Coastguard Worker# macro, additional text can be appended to FILE to form the body of
581*2e9d4914SAndroid Build Coastguard Worker# the child script.  The macro ends with non-zero status if the
582*2e9d4914SAndroid Build Coastguard Worker# file could not be fully written (such as if the disk is full).
583*2e9d4914SAndroid Build Coastguard Workerm4_ifdef([AS_INIT_GENERATED],
584*2e9d4914SAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
585*2e9d4914SAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],
586*2e9d4914SAndroid Build Coastguard Worker[m4_require([AS_PREPARE])]dnl
587*2e9d4914SAndroid Build Coastguard Worker[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
588*2e9d4914SAndroid Build Coastguard Worker[lt_write_fail=0
589*2e9d4914SAndroid Build Coastguard Workercat >$1 <<_ASEOF || lt_write_fail=1
590*2e9d4914SAndroid Build Coastguard Worker#! $SHELL
591*2e9d4914SAndroid Build Coastguard Worker# Generated by $as_me.
592*2e9d4914SAndroid Build Coastguard Worker$2
593*2e9d4914SAndroid Build Coastguard WorkerSHELL=\${CONFIG_SHELL-$SHELL}
594*2e9d4914SAndroid Build Coastguard Workerexport SHELL
595*2e9d4914SAndroid Build Coastguard Worker_ASEOF
596*2e9d4914SAndroid Build Coastguard Workercat >>$1 <<\_ASEOF || lt_write_fail=1
597*2e9d4914SAndroid Build Coastguard WorkerAS_SHELL_SANITIZE
598*2e9d4914SAndroid Build Coastguard Worker_AS_PREPARE
599*2e9d4914SAndroid Build Coastguard Workerexec AS_MESSAGE_FD>&1
600*2e9d4914SAndroid Build Coastguard Worker_ASEOF
601*2e9d4914SAndroid Build Coastguard Workertest $lt_write_fail = 0 && chmod +x $1[]dnl
602*2e9d4914SAndroid Build Coastguard Workerm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
603*2e9d4914SAndroid Build Coastguard Worker
604*2e9d4914SAndroid Build Coastguard Worker# LT_OUTPUT
605*2e9d4914SAndroid Build Coastguard Worker# ---------
606*2e9d4914SAndroid Build Coastguard Worker# This macro allows early generation of the libtool script (before
607*2e9d4914SAndroid Build Coastguard Worker# AC_OUTPUT is called), incase it is used in configure for compilation
608*2e9d4914SAndroid Build Coastguard Worker# tests.
609*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_OUTPUT],
610*2e9d4914SAndroid Build Coastguard Worker[: ${CONFIG_LT=./config.lt}
611*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $CONFIG_LT])
612*2e9d4914SAndroid Build Coastguard Worker_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
613*2e9d4914SAndroid Build Coastguard Worker[# Run this file to recreate a libtool stub with the current configuration.])
614*2e9d4914SAndroid Build Coastguard Worker
615*2e9d4914SAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF
616*2e9d4914SAndroid Build Coastguard Workerlt_cl_silent=false
617*2e9d4914SAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log
618*2e9d4914SAndroid Build Coastguard Worker{
619*2e9d4914SAndroid Build Coastguard Worker  echo
620*2e9d4914SAndroid Build Coastguard Worker  AS_BOX([Running $as_me.])
621*2e9d4914SAndroid Build Coastguard Worker} >&AS_MESSAGE_LOG_FD
622*2e9d4914SAndroid Build Coastguard Worker
623*2e9d4914SAndroid Build Coastguard Workerlt_cl_help="\
624*2e9d4914SAndroid Build Coastguard Worker\`$as_me' creates a local libtool stub from the current configuration,
625*2e9d4914SAndroid Build Coastguard Workerfor use in further configure time tests before the real libtool is
626*2e9d4914SAndroid Build Coastguard Workergenerated.
627*2e9d4914SAndroid Build Coastguard Worker
628*2e9d4914SAndroid Build Coastguard WorkerUsage: $[0] [[OPTIONS]]
629*2e9d4914SAndroid Build Coastguard Worker
630*2e9d4914SAndroid Build Coastguard Worker  -h, --help      print this help, then exit
631*2e9d4914SAndroid Build Coastguard Worker  -V, --version   print version number, then exit
632*2e9d4914SAndroid Build Coastguard Worker  -q, --quiet     do not print progress messages
633*2e9d4914SAndroid Build Coastguard Worker  -d, --debug     don't remove temporary files
634*2e9d4914SAndroid Build Coastguard Worker
635*2e9d4914SAndroid Build Coastguard WorkerReport bugs to <[email protected]>."
636*2e9d4914SAndroid Build Coastguard Worker
637*2e9d4914SAndroid Build Coastguard Workerlt_cl_version="\
638*2e9d4914SAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
639*2e9d4914SAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
640*2e9d4914SAndroid Build Coastguard Workerconfigured by $[0], generated by m4_PACKAGE_STRING.
641*2e9d4914SAndroid Build Coastguard Worker
642*2e9d4914SAndroid Build Coastguard WorkerCopyright (C) 2011 Free Software Foundation, Inc.
643*2e9d4914SAndroid Build Coastguard WorkerThis config.lt script is free software; the Free Software Foundation
644*2e9d4914SAndroid Build Coastguard Workergives unlimited permision to copy, distribute and modify it."
645*2e9d4914SAndroid Build Coastguard Worker
646*2e9d4914SAndroid Build Coastguard Workerwhile test $[#] != 0
647*2e9d4914SAndroid Build Coastguard Workerdo
648*2e9d4914SAndroid Build Coastguard Worker  case $[1] in
649*2e9d4914SAndroid Build Coastguard Worker    --version | --v* | -V )
650*2e9d4914SAndroid Build Coastguard Worker      echo "$lt_cl_version"; exit 0 ;;
651*2e9d4914SAndroid Build Coastguard Worker    --help | --h* | -h )
652*2e9d4914SAndroid Build Coastguard Worker      echo "$lt_cl_help"; exit 0 ;;
653*2e9d4914SAndroid Build Coastguard Worker    --debug | --d* | -d )
654*2e9d4914SAndroid Build Coastguard Worker      debug=: ;;
655*2e9d4914SAndroid Build Coastguard Worker    --quiet | --q* | --silent | --s* | -q )
656*2e9d4914SAndroid Build Coastguard Worker      lt_cl_silent=: ;;
657*2e9d4914SAndroid Build Coastguard Worker
658*2e9d4914SAndroid Build Coastguard Worker    -*) AC_MSG_ERROR([unrecognized option: $[1]
659*2e9d4914SAndroid Build Coastguard WorkerTry \`$[0] --help' for more information.]) ;;
660*2e9d4914SAndroid Build Coastguard Worker
661*2e9d4914SAndroid Build Coastguard Worker    *) AC_MSG_ERROR([unrecognized argument: $[1]
662*2e9d4914SAndroid Build Coastguard WorkerTry \`$[0] --help' for more information.]) ;;
663*2e9d4914SAndroid Build Coastguard Worker  esac
664*2e9d4914SAndroid Build Coastguard Worker  shift
665*2e9d4914SAndroid Build Coastguard Workerdone
666*2e9d4914SAndroid Build Coastguard Worker
667*2e9d4914SAndroid Build Coastguard Workerif $lt_cl_silent; then
668*2e9d4914SAndroid Build Coastguard Worker  exec AS_MESSAGE_FD>/dev/null
669*2e9d4914SAndroid Build Coastguard Workerfi
670*2e9d4914SAndroid Build Coastguard Worker_LTEOF
671*2e9d4914SAndroid Build Coastguard Worker
672*2e9d4914SAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<_LTEOF
673*2e9d4914SAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
674*2e9d4914SAndroid Build Coastguard Worker_LTEOF
675*2e9d4914SAndroid Build Coastguard Worker
676*2e9d4914SAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF
677*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $ofile])
678*2e9d4914SAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS
679*2e9d4914SAndroid Build Coastguard WorkerAS_EXIT(0)
680*2e9d4914SAndroid Build Coastguard Worker_LTEOF
681*2e9d4914SAndroid Build Coastguard Workerchmod +x "$CONFIG_LT"
682*2e9d4914SAndroid Build Coastguard Worker
683*2e9d4914SAndroid Build Coastguard Worker# configure is writing to config.log, but config.lt does its own redirection,
684*2e9d4914SAndroid Build Coastguard Worker# appending to config.log, which fails on DOS, as config.log is still kept
685*2e9d4914SAndroid Build Coastguard Worker# open by configure.  Here we exec the FD to /dev/null, effectively closing
686*2e9d4914SAndroid Build Coastguard Worker# config.log, so it can be properly (re)opened and appended to by config.lt.
687*2e9d4914SAndroid Build Coastguard Workerlt_cl_success=:
688*2e9d4914SAndroid Build Coastguard Workertest "$silent" = yes &&
689*2e9d4914SAndroid Build Coastguard Worker  lt_config_lt_args="$lt_config_lt_args --quiet"
690*2e9d4914SAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>/dev/null
691*2e9d4914SAndroid Build Coastguard Worker$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
692*2e9d4914SAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log
693*2e9d4914SAndroid Build Coastguard Worker$lt_cl_success || AS_EXIT(1)
694*2e9d4914SAndroid Build Coastguard Worker])# LT_OUTPUT
695*2e9d4914SAndroid Build Coastguard Worker
696*2e9d4914SAndroid Build Coastguard Worker
697*2e9d4914SAndroid Build Coastguard Worker# _LT_CONFIG(TAG)
698*2e9d4914SAndroid Build Coastguard Worker# ---------------
699*2e9d4914SAndroid Build Coastguard Worker# If TAG is the built-in tag, create an initial libtool script with a
700*2e9d4914SAndroid Build Coastguard Worker# default configuration from the untagged config vars.  Otherwise add code
701*2e9d4914SAndroid Build Coastguard Worker# to config.status for appending the configuration named by TAG from the
702*2e9d4914SAndroid Build Coastguard Worker# matching tagged config vars.
703*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CONFIG],
704*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
705*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_SAVE_COMMANDS([
706*2e9d4914SAndroid Build Coastguard Worker  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
707*2e9d4914SAndroid Build Coastguard Worker  m4_if(_LT_TAG, [C], [
708*2e9d4914SAndroid Build Coastguard Worker    # See if we are running on zsh, and set the options which allow our
709*2e9d4914SAndroid Build Coastguard Worker    # commands through without removal of \ escapes.
710*2e9d4914SAndroid Build Coastguard Worker    if test -n "${ZSH_VERSION+set}" ; then
711*2e9d4914SAndroid Build Coastguard Worker      setopt NO_GLOB_SUBST
712*2e9d4914SAndroid Build Coastguard Worker    fi
713*2e9d4914SAndroid Build Coastguard Worker
714*2e9d4914SAndroid Build Coastguard Worker    cfgfile="${ofile}T"
715*2e9d4914SAndroid Build Coastguard Worker    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
716*2e9d4914SAndroid Build Coastguard Worker    $RM "$cfgfile"
717*2e9d4914SAndroid Build Coastguard Worker
718*2e9d4914SAndroid Build Coastguard Worker    cat <<_LT_EOF >> "$cfgfile"
719*2e9d4914SAndroid Build Coastguard Worker#! $SHELL
720*2e9d4914SAndroid Build Coastguard Worker
721*2e9d4914SAndroid Build Coastguard Worker# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
722*2e9d4914SAndroid Build Coastguard Worker# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
723*2e9d4914SAndroid Build Coastguard Worker# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
724*2e9d4914SAndroid Build Coastguard Worker# NOTE: Changes made to this file will be lost: look at ltmain.sh.
725*2e9d4914SAndroid Build Coastguard Worker#
726*2e9d4914SAndroid Build Coastguard Worker_LT_COPYING
727*2e9d4914SAndroid Build Coastguard Worker_LT_LIBTOOL_TAGS
728*2e9d4914SAndroid Build Coastguard Worker
729*2e9d4914SAndroid Build Coastguard Worker# ### BEGIN LIBTOOL CONFIG
730*2e9d4914SAndroid Build Coastguard Worker_LT_LIBTOOL_CONFIG_VARS
731*2e9d4914SAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS
732*2e9d4914SAndroid Build Coastguard Worker# ### END LIBTOOL CONFIG
733*2e9d4914SAndroid Build Coastguard Worker
734*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
735*2e9d4914SAndroid Build Coastguard Worker
736*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
737*2e9d4914SAndroid Build Coastguard Worker  aix3*)
738*2e9d4914SAndroid Build Coastguard Worker    cat <<\_LT_EOF >> "$cfgfile"
739*2e9d4914SAndroid Build Coastguard Worker# AIX sometimes has problems with the GCC collect2 program.  For some
740*2e9d4914SAndroid Build Coastguard Worker# reason, if we set the COLLECT_NAMES environment variable, the problems
741*2e9d4914SAndroid Build Coastguard Worker# vanish in a puff of smoke.
742*2e9d4914SAndroid Build Coastguard Workerif test "X${COLLECT_NAMES+set}" != Xset; then
743*2e9d4914SAndroid Build Coastguard Worker  COLLECT_NAMES=
744*2e9d4914SAndroid Build Coastguard Worker  export COLLECT_NAMES
745*2e9d4914SAndroid Build Coastguard Workerfi
746*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
747*2e9d4914SAndroid Build Coastguard Worker    ;;
748*2e9d4914SAndroid Build Coastguard Worker  esac
749*2e9d4914SAndroid Build Coastguard Worker
750*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_LTMAIN
751*2e9d4914SAndroid Build Coastguard Worker
752*2e9d4914SAndroid Build Coastguard Worker  # We use sed instead of cat because bash on DJGPP gets confused if
753*2e9d4914SAndroid Build Coastguard Worker  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
754*2e9d4914SAndroid Build Coastguard Worker  # text mode, it properly converts lines to CR/LF.  This bash problem
755*2e9d4914SAndroid Build Coastguard Worker  # is reportedly fixed, but why not run on old versions too?
756*2e9d4914SAndroid Build Coastguard Worker  sed '$q' "$ltmain" >> "$cfgfile" \
757*2e9d4914SAndroid Build Coastguard Worker     || (rm -f "$cfgfile"; exit 1)
758*2e9d4914SAndroid Build Coastguard Worker
759*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_REPLACE_SHELLFNS
760*2e9d4914SAndroid Build Coastguard Worker
761*2e9d4914SAndroid Build Coastguard Worker   mv -f "$cfgfile" "$ofile" ||
762*2e9d4914SAndroid Build Coastguard Worker    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
763*2e9d4914SAndroid Build Coastguard Worker  chmod +x "$ofile"
764*2e9d4914SAndroid Build Coastguard Worker],
765*2e9d4914SAndroid Build Coastguard Worker[cat <<_LT_EOF >> "$ofile"
766*2e9d4914SAndroid Build Coastguard Worker
767*2e9d4914SAndroid Build Coastguard Workerdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
768*2e9d4914SAndroid Build Coastguard Workerdnl in a comment (ie after a #).
769*2e9d4914SAndroid Build Coastguard Worker# ### BEGIN LIBTOOL TAG CONFIG: $1
770*2e9d4914SAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS(_LT_TAG)
771*2e9d4914SAndroid Build Coastguard Worker# ### END LIBTOOL TAG CONFIG: $1
772*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
773*2e9d4914SAndroid Build Coastguard Worker])dnl /m4_if
774*2e9d4914SAndroid Build Coastguard Worker],
775*2e9d4914SAndroid Build Coastguard Worker[m4_if([$1], [], [
776*2e9d4914SAndroid Build Coastguard Worker    PACKAGE='$PACKAGE'
777*2e9d4914SAndroid Build Coastguard Worker    VERSION='$VERSION'
778*2e9d4914SAndroid Build Coastguard Worker    TIMESTAMP='$TIMESTAMP'
779*2e9d4914SAndroid Build Coastguard Worker    RM='$RM'
780*2e9d4914SAndroid Build Coastguard Worker    ofile='$ofile'], [])
781*2e9d4914SAndroid Build Coastguard Worker])dnl /_LT_CONFIG_SAVE_COMMANDS
782*2e9d4914SAndroid Build Coastguard Worker])# _LT_CONFIG
783*2e9d4914SAndroid Build Coastguard Worker
784*2e9d4914SAndroid Build Coastguard Worker
785*2e9d4914SAndroid Build Coastguard Worker# LT_SUPPORTED_TAG(TAG)
786*2e9d4914SAndroid Build Coastguard Worker# ---------------------
787*2e9d4914SAndroid Build Coastguard Worker# Trace this macro to discover what tags are supported by the libtool
788*2e9d4914SAndroid Build Coastguard Worker# --tag option, using:
789*2e9d4914SAndroid Build Coastguard Worker#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
790*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_SUPPORTED_TAG], [])
791*2e9d4914SAndroid Build Coastguard Worker
792*2e9d4914SAndroid Build Coastguard Worker
793*2e9d4914SAndroid Build Coastguard Worker# C support is built-in for now
794*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_LANG_C_enabled], [])
795*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_TAGS], [])
796*2e9d4914SAndroid Build Coastguard Worker
797*2e9d4914SAndroid Build Coastguard Worker
798*2e9d4914SAndroid Build Coastguard Worker# LT_LANG(LANG)
799*2e9d4914SAndroid Build Coastguard Worker# -------------
800*2e9d4914SAndroid Build Coastguard Worker# Enable libtool support for the given language if not already enabled.
801*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_LANG],
802*2e9d4914SAndroid Build Coastguard Worker[AC_BEFORE([$0], [LT_OUTPUT])dnl
803*2e9d4914SAndroid Build Coastguard Workerm4_case([$1],
804*2e9d4914SAndroid Build Coastguard Worker  [C],			[_LT_LANG(C)],
805*2e9d4914SAndroid Build Coastguard Worker  [C++],		[_LT_LANG(CXX)],
806*2e9d4914SAndroid Build Coastguard Worker  [Go],			[_LT_LANG(GO)],
807*2e9d4914SAndroid Build Coastguard Worker  [Java],		[_LT_LANG(GCJ)],
808*2e9d4914SAndroid Build Coastguard Worker  [Fortran 77],		[_LT_LANG(F77)],
809*2e9d4914SAndroid Build Coastguard Worker  [Fortran],		[_LT_LANG(FC)],
810*2e9d4914SAndroid Build Coastguard Worker  [Windows Resource],	[_LT_LANG(RC)],
811*2e9d4914SAndroid Build Coastguard Worker  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
812*2e9d4914SAndroid Build Coastguard Worker    [_LT_LANG($1)],
813*2e9d4914SAndroid Build Coastguard Worker    [m4_fatal([$0: unsupported language: "$1"])])])dnl
814*2e9d4914SAndroid Build Coastguard Worker])# LT_LANG
815*2e9d4914SAndroid Build Coastguard Worker
816*2e9d4914SAndroid Build Coastguard Worker
817*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG(LANGNAME)
818*2e9d4914SAndroid Build Coastguard Worker# ------------------
819*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG],
820*2e9d4914SAndroid Build Coastguard Worker[m4_ifdef([_LT_LANG_]$1[_enabled], [],
821*2e9d4914SAndroid Build Coastguard Worker  [LT_SUPPORTED_TAG([$1])dnl
822*2e9d4914SAndroid Build Coastguard Worker  m4_append([_LT_TAGS], [$1 ])dnl
823*2e9d4914SAndroid Build Coastguard Worker  m4_define([_LT_LANG_]$1[_enabled], [])dnl
824*2e9d4914SAndroid Build Coastguard Worker  _LT_LANG_$1_CONFIG($1)])dnl
825*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG
826*2e9d4914SAndroid Build Coastguard Worker
827*2e9d4914SAndroid Build Coastguard Worker
828*2e9d4914SAndroid Build Coastguard Workerm4_ifndef([AC_PROG_GO], [
829*2e9d4914SAndroid Build Coastguard Worker############################################################
830*2e9d4914SAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into   #
831*2e9d4914SAndroid Build Coastguard Worker#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
832*2e9d4914SAndroid Build Coastguard Worker#  a released version of Autoconf we should remove this    #
833*2e9d4914SAndroid Build Coastguard Worker#  macro and use it instead.                               #
834*2e9d4914SAndroid Build Coastguard Worker############################################################
835*2e9d4914SAndroid Build Coastguard Workerm4_defun([AC_PROG_GO],
836*2e9d4914SAndroid Build Coastguard Worker[AC_LANG_PUSH(Go)dnl
837*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_VAR([GOC],     [Go compiler command])dnl
838*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
839*2e9d4914SAndroid Build Coastguard Worker_AC_ARG_VAR_LDFLAGS()dnl
840*2e9d4914SAndroid Build Coastguard WorkerAC_CHECK_TOOL(GOC, gccgo)
841*2e9d4914SAndroid Build Coastguard Workerif test -z "$GOC"; then
842*2e9d4914SAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
843*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
844*2e9d4914SAndroid Build Coastguard Worker  fi
845*2e9d4914SAndroid Build Coastguard Workerfi
846*2e9d4914SAndroid Build Coastguard Workerif test -z "$GOC"; then
847*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
848*2e9d4914SAndroid Build Coastguard Workerfi
849*2e9d4914SAndroid Build Coastguard Worker])#m4_defun
850*2e9d4914SAndroid Build Coastguard Worker])#m4_ifndef
851*2e9d4914SAndroid Build Coastguard Worker
852*2e9d4914SAndroid Build Coastguard Worker
853*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_DEFAULT_CONFIG
854*2e9d4914SAndroid Build Coastguard Worker# -----------------------
855*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_DEFAULT_CONFIG],
856*2e9d4914SAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([AC_PROG_CXX],
857*2e9d4914SAndroid Build Coastguard Worker  [LT_LANG(CXX)],
858*2e9d4914SAndroid Build Coastguard Worker  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
859*2e9d4914SAndroid Build Coastguard Worker
860*2e9d4914SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_F77],
861*2e9d4914SAndroid Build Coastguard Worker  [LT_LANG(F77)],
862*2e9d4914SAndroid Build Coastguard Worker  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
863*2e9d4914SAndroid Build Coastguard Worker
864*2e9d4914SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_FC],
865*2e9d4914SAndroid Build Coastguard Worker  [LT_LANG(FC)],
866*2e9d4914SAndroid Build Coastguard Worker  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
867*2e9d4914SAndroid Build Coastguard Worker
868*2e9d4914SAndroid Build Coastguard Workerdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
869*2e9d4914SAndroid Build Coastguard Workerdnl pulling things in needlessly.
870*2e9d4914SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GCJ],
871*2e9d4914SAndroid Build Coastguard Worker  [LT_LANG(GCJ)],
872*2e9d4914SAndroid Build Coastguard Worker  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
873*2e9d4914SAndroid Build Coastguard Worker    [LT_LANG(GCJ)],
874*2e9d4914SAndroid Build Coastguard Worker    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
875*2e9d4914SAndroid Build Coastguard Worker      [LT_LANG(GCJ)],
876*2e9d4914SAndroid Build Coastguard Worker      [m4_ifdef([AC_PROG_GCJ],
877*2e9d4914SAndroid Build Coastguard Worker	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
878*2e9d4914SAndroid Build Coastguard Worker       m4_ifdef([A][M_PROG_GCJ],
879*2e9d4914SAndroid Build Coastguard Worker	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
880*2e9d4914SAndroid Build Coastguard Worker       m4_ifdef([LT_PROG_GCJ],
881*2e9d4914SAndroid Build Coastguard Worker	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
882*2e9d4914SAndroid Build Coastguard Worker
883*2e9d4914SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GO],
884*2e9d4914SAndroid Build Coastguard Worker  [LT_LANG(GO)],
885*2e9d4914SAndroid Build Coastguard Worker  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
886*2e9d4914SAndroid Build Coastguard Worker
887*2e9d4914SAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([LT_PROG_RC],
888*2e9d4914SAndroid Build Coastguard Worker  [LT_LANG(RC)],
889*2e9d4914SAndroid Build Coastguard Worker  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
890*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_DEFAULT_CONFIG
891*2e9d4914SAndroid Build Coastguard Worker
892*2e9d4914SAndroid Build Coastguard Worker# Obsolete macros:
893*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
894*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
895*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
896*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
897*2e9d4914SAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
898*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
899*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
900*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_F77], [])
901*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_FC], [])
902*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
903*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_RC], [])
904*2e9d4914SAndroid Build Coastguard Worker
905*2e9d4914SAndroid Build Coastguard Worker
906*2e9d4914SAndroid Build Coastguard Worker# _LT_TAG_COMPILER
907*2e9d4914SAndroid Build Coastguard Worker# ----------------
908*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_TAG_COMPILER],
909*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
910*2e9d4914SAndroid Build Coastguard Worker
911*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
912*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
913*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
914*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
915*2e9d4914SAndroid Build Coastguard Worker
916*2e9d4914SAndroid Build Coastguard Worker# If no C compiler was specified, use CC.
917*2e9d4914SAndroid Build Coastguard WorkerLTCC=${LTCC-"$CC"}
918*2e9d4914SAndroid Build Coastguard Worker
919*2e9d4914SAndroid Build Coastguard Worker# If no C compiler flags were specified, use CFLAGS.
920*2e9d4914SAndroid Build Coastguard WorkerLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
921*2e9d4914SAndroid Build Coastguard Worker
922*2e9d4914SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
923*2e9d4914SAndroid Build Coastguard Workercompiler=$CC
924*2e9d4914SAndroid Build Coastguard Worker])# _LT_TAG_COMPILER
925*2e9d4914SAndroid Build Coastguard Worker
926*2e9d4914SAndroid Build Coastguard Worker
927*2e9d4914SAndroid Build Coastguard Worker# _LT_COMPILER_BOILERPLATE
928*2e9d4914SAndroid Build Coastguard Worker# ------------------------
929*2e9d4914SAndroid Build Coastguard Worker# Check for compiler boilerplate output or warnings with
930*2e9d4914SAndroid Build Coastguard Worker# the simple compiler test code.
931*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_BOILERPLATE],
932*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
933*2e9d4914SAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext
934*2e9d4914SAndroid Build Coastguard Workerecho "$lt_simple_compile_test_code" >conftest.$ac_ext
935*2e9d4914SAndroid Build Coastguard Workereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
936*2e9d4914SAndroid Build Coastguard Worker_lt_compiler_boilerplate=`cat conftest.err`
937*2e9d4914SAndroid Build Coastguard Worker$RM conftest*
938*2e9d4914SAndroid Build Coastguard Worker])# _LT_COMPILER_BOILERPLATE
939*2e9d4914SAndroid Build Coastguard Worker
940*2e9d4914SAndroid Build Coastguard Worker
941*2e9d4914SAndroid Build Coastguard Worker# _LT_LINKER_BOILERPLATE
942*2e9d4914SAndroid Build Coastguard Worker# ----------------------
943*2e9d4914SAndroid Build Coastguard Worker# Check for linker boilerplate output or warnings with
944*2e9d4914SAndroid Build Coastguard Worker# the simple link test code.
945*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LINKER_BOILERPLATE],
946*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
947*2e9d4914SAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext
948*2e9d4914SAndroid Build Coastguard Workerecho "$lt_simple_link_test_code" >conftest.$ac_ext
949*2e9d4914SAndroid Build Coastguard Workereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
950*2e9d4914SAndroid Build Coastguard Worker_lt_linker_boilerplate=`cat conftest.err`
951*2e9d4914SAndroid Build Coastguard Worker$RM -r conftest*
952*2e9d4914SAndroid Build Coastguard Worker])# _LT_LINKER_BOILERPLATE
953*2e9d4914SAndroid Build Coastguard Worker
954*2e9d4914SAndroid Build Coastguard Worker# _LT_REQUIRED_DARWIN_CHECKS
955*2e9d4914SAndroid Build Coastguard Worker# -------------------------
956*2e9d4914SAndroid Build Coastguard Workerm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
957*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
958*2e9d4914SAndroid Build Coastguard Worker    rhapsody* | darwin*)
959*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
960*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
961*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_TOOL([LIPO], [lipo], [:])
962*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_TOOL([OTOOL], [otool], [:])
963*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
964*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([], [DSYMUTIL], [1],
965*2e9d4914SAndroid Build Coastguard Worker      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
966*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([], [NMEDIT], [1],
967*2e9d4914SAndroid Build Coastguard Worker      [Tool to change global to local symbols on Mac OS X])
968*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([], [LIPO], [1],
969*2e9d4914SAndroid Build Coastguard Worker      [Tool to manipulate fat objects and archives on Mac OS X])
970*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([], [OTOOL], [1],
971*2e9d4914SAndroid Build Coastguard Worker      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
972*2e9d4914SAndroid Build Coastguard Worker    _LT_DECL([], [OTOOL64], [1],
973*2e9d4914SAndroid Build Coastguard Worker      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
974*2e9d4914SAndroid Build Coastguard Worker
975*2e9d4914SAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
976*2e9d4914SAndroid Build Coastguard Worker      [lt_cv_apple_cc_single_mod=no
977*2e9d4914SAndroid Build Coastguard Worker      if test -z "${LT_MULTI_MODULE}"; then
978*2e9d4914SAndroid Build Coastguard Worker	# By default we will add the -single_module flag. You can override
979*2e9d4914SAndroid Build Coastguard Worker	# by either setting the environment variable LT_MULTI_MODULE
980*2e9d4914SAndroid Build Coastguard Worker	# non-empty at configure time, or by adding -multi_module to the
981*2e9d4914SAndroid Build Coastguard Worker	# link flags.
982*2e9d4914SAndroid Build Coastguard Worker	rm -rf libconftest.dylib*
983*2e9d4914SAndroid Build Coastguard Worker	echo "int foo(void){return 1;}" > conftest.c
984*2e9d4914SAndroid Build Coastguard Worker	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
985*2e9d4914SAndroid Build Coastguard Worker-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
986*2e9d4914SAndroid Build Coastguard Worker	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
987*2e9d4914SAndroid Build Coastguard Worker	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
988*2e9d4914SAndroid Build Coastguard Worker        _lt_result=$?
989*2e9d4914SAndroid Build Coastguard Worker	# If there is a non-empty error log, and "single_module"
990*2e9d4914SAndroid Build Coastguard Worker	# appears in it, assume the flag caused a linker warning
991*2e9d4914SAndroid Build Coastguard Worker        if test -s conftest.err && $GREP single_module conftest.err; then
992*2e9d4914SAndroid Build Coastguard Worker	  cat conftest.err >&AS_MESSAGE_LOG_FD
993*2e9d4914SAndroid Build Coastguard Worker	# Otherwise, if the output was created with a 0 exit code from
994*2e9d4914SAndroid Build Coastguard Worker	# the compiler, it worked.
995*2e9d4914SAndroid Build Coastguard Worker	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
996*2e9d4914SAndroid Build Coastguard Worker	  lt_cv_apple_cc_single_mod=yes
997*2e9d4914SAndroid Build Coastguard Worker	else
998*2e9d4914SAndroid Build Coastguard Worker	  cat conftest.err >&AS_MESSAGE_LOG_FD
999*2e9d4914SAndroid Build Coastguard Worker	fi
1000*2e9d4914SAndroid Build Coastguard Worker	rm -rf libconftest.dylib*
1001*2e9d4914SAndroid Build Coastguard Worker	rm -f conftest.*
1002*2e9d4914SAndroid Build Coastguard Worker      fi])
1003*2e9d4914SAndroid Build Coastguard Worker
1004*2e9d4914SAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1005*2e9d4914SAndroid Build Coastguard Worker      [lt_cv_ld_exported_symbols_list],
1006*2e9d4914SAndroid Build Coastguard Worker      [lt_cv_ld_exported_symbols_list=no
1007*2e9d4914SAndroid Build Coastguard Worker      save_LDFLAGS=$LDFLAGS
1008*2e9d4914SAndroid Build Coastguard Worker      echo "_main" > conftest.sym
1009*2e9d4914SAndroid Build Coastguard Worker      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1010*2e9d4914SAndroid Build Coastguard Worker      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1011*2e9d4914SAndroid Build Coastguard Worker	[lt_cv_ld_exported_symbols_list=yes],
1012*2e9d4914SAndroid Build Coastguard Worker	[lt_cv_ld_exported_symbols_list=no])
1013*2e9d4914SAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
1014*2e9d4914SAndroid Build Coastguard Worker    ])
1015*2e9d4914SAndroid Build Coastguard Worker
1016*2e9d4914SAndroid Build Coastguard Worker    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1017*2e9d4914SAndroid Build Coastguard Worker      [lt_cv_ld_force_load=no
1018*2e9d4914SAndroid Build Coastguard Worker      cat > conftest.c << _LT_EOF
1019*2e9d4914SAndroid Build Coastguard Workerint forced_loaded() { return 2;}
1020*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
1021*2e9d4914SAndroid Build Coastguard Worker      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1022*2e9d4914SAndroid Build Coastguard Worker      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1023*2e9d4914SAndroid Build Coastguard Worker      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1024*2e9d4914SAndroid Build Coastguard Worker      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1025*2e9d4914SAndroid Build Coastguard Worker      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1026*2e9d4914SAndroid Build Coastguard Worker      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1027*2e9d4914SAndroid Build Coastguard Worker      cat > conftest.c << _LT_EOF
1028*2e9d4914SAndroid Build Coastguard Workerint main() { return 0;}
1029*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
1030*2e9d4914SAndroid Build Coastguard Worker      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1031*2e9d4914SAndroid Build Coastguard Worker      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1032*2e9d4914SAndroid Build Coastguard Worker      _lt_result=$?
1033*2e9d4914SAndroid Build Coastguard Worker      if test -s conftest.err && $GREP force_load conftest.err; then
1034*2e9d4914SAndroid Build Coastguard Worker	cat conftest.err >&AS_MESSAGE_LOG_FD
1035*2e9d4914SAndroid Build Coastguard Worker      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1036*2e9d4914SAndroid Build Coastguard Worker	lt_cv_ld_force_load=yes
1037*2e9d4914SAndroid Build Coastguard Worker      else
1038*2e9d4914SAndroid Build Coastguard Worker	cat conftest.err >&AS_MESSAGE_LOG_FD
1039*2e9d4914SAndroid Build Coastguard Worker      fi
1040*2e9d4914SAndroid Build Coastguard Worker        rm -f conftest.err libconftest.a conftest conftest.c
1041*2e9d4914SAndroid Build Coastguard Worker        rm -rf conftest.dSYM
1042*2e9d4914SAndroid Build Coastguard Worker    ])
1043*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
1044*2e9d4914SAndroid Build Coastguard Worker    rhapsody* | darwin1.[[012]])
1045*2e9d4914SAndroid Build Coastguard Worker      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1046*2e9d4914SAndroid Build Coastguard Worker    darwin1.*)
1047*2e9d4914SAndroid Build Coastguard Worker      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1048*2e9d4914SAndroid Build Coastguard Worker    darwin*) # darwin 5.x on
1049*2e9d4914SAndroid Build Coastguard Worker      # if running on 10.5 or later, the deployment target defaults
1050*2e9d4914SAndroid Build Coastguard Worker      # to the OS version, if on x86, and 10.4, the deployment
1051*2e9d4914SAndroid Build Coastguard Worker      # target defaults to 10.4. Don't you love it?
1052*2e9d4914SAndroid Build Coastguard Worker      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1053*2e9d4914SAndroid Build Coastguard Worker	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1054*2e9d4914SAndroid Build Coastguard Worker	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1055*2e9d4914SAndroid Build Coastguard Worker	10.[[012]]*)
1056*2e9d4914SAndroid Build Coastguard Worker	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1057*2e9d4914SAndroid Build Coastguard Worker	10.*)
1058*2e9d4914SAndroid Build Coastguard Worker	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1059*2e9d4914SAndroid Build Coastguard Worker      esac
1060*2e9d4914SAndroid Build Coastguard Worker    ;;
1061*2e9d4914SAndroid Build Coastguard Worker  esac
1062*2e9d4914SAndroid Build Coastguard Worker    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1063*2e9d4914SAndroid Build Coastguard Worker      _lt_dar_single_mod='$single_module'
1064*2e9d4914SAndroid Build Coastguard Worker    fi
1065*2e9d4914SAndroid Build Coastguard Worker    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1066*2e9d4914SAndroid Build Coastguard Worker      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1067*2e9d4914SAndroid Build Coastguard Worker    else
1068*2e9d4914SAndroid Build Coastguard Worker      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1069*2e9d4914SAndroid Build Coastguard Worker    fi
1070*2e9d4914SAndroid Build Coastguard Worker    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1071*2e9d4914SAndroid Build Coastguard Worker      _lt_dsymutil='~$DSYMUTIL $lib || :'
1072*2e9d4914SAndroid Build Coastguard Worker    else
1073*2e9d4914SAndroid Build Coastguard Worker      _lt_dsymutil=
1074*2e9d4914SAndroid Build Coastguard Worker    fi
1075*2e9d4914SAndroid Build Coastguard Worker    ;;
1076*2e9d4914SAndroid Build Coastguard Worker  esac
1077*2e9d4914SAndroid Build Coastguard Worker])
1078*2e9d4914SAndroid Build Coastguard Worker
1079*2e9d4914SAndroid Build Coastguard Worker
1080*2e9d4914SAndroid Build Coastguard Worker# _LT_DARWIN_LINKER_FEATURES([TAG])
1081*2e9d4914SAndroid Build Coastguard Worker# ---------------------------------
1082*2e9d4914SAndroid Build Coastguard Worker# Checks for linker and compiler features on darwin
1083*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_DARWIN_LINKER_FEATURES],
1084*2e9d4914SAndroid Build Coastguard Worker[
1085*2e9d4914SAndroid Build Coastguard Worker  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1086*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1087*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct, $1)=no
1088*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_automatic, $1)=yes
1089*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1090*2e9d4914SAndroid Build Coastguard Worker  if test "$lt_cv_ld_force_load" = "yes"; then
1091*2e9d4914SAndroid 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\"`'
1092*2e9d4914SAndroid Build Coastguard Worker    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1093*2e9d4914SAndroid Build Coastguard Worker                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1094*2e9d4914SAndroid Build Coastguard Worker  else
1095*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1096*2e9d4914SAndroid Build Coastguard Worker  fi
1097*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(link_all_deplibs, $1)=yes
1098*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1099*2e9d4914SAndroid Build Coastguard Worker  case $cc_basename in
1100*2e9d4914SAndroid Build Coastguard Worker     ifort*) _lt_dar_can_shared=yes ;;
1101*2e9d4914SAndroid Build Coastguard Worker     *) _lt_dar_can_shared=$GCC ;;
1102*2e9d4914SAndroid Build Coastguard Worker  esac
1103*2e9d4914SAndroid Build Coastguard Worker  if test "$_lt_dar_can_shared" = "yes"; then
1104*2e9d4914SAndroid Build Coastguard Worker    output_verbose_link_cmd=func_echo_all
1105*2e9d4914SAndroid 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}"
1106*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1107*2e9d4914SAndroid 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}"
1108*2e9d4914SAndroid 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}"
1109*2e9d4914SAndroid Build Coastguard Worker    m4_if([$1], [CXX],
1110*2e9d4914SAndroid Build Coastguard Worker[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1111*2e9d4914SAndroid 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}"
1112*2e9d4914SAndroid 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}"
1113*2e9d4914SAndroid Build Coastguard Worker    fi
1114*2e9d4914SAndroid Build Coastguard Worker],[])
1115*2e9d4914SAndroid Build Coastguard Worker  else
1116*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(ld_shlibs, $1)=no
1117*2e9d4914SAndroid Build Coastguard Worker  fi
1118*2e9d4914SAndroid Build Coastguard Worker])
1119*2e9d4914SAndroid Build Coastguard Worker
1120*2e9d4914SAndroid Build Coastguard Worker# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1121*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------
1122*2e9d4914SAndroid Build Coastguard Worker# Links a minimal program and checks the executable
1123*2e9d4914SAndroid Build Coastguard Worker# for the system default hardcoded library path. In most cases,
1124*2e9d4914SAndroid Build Coastguard Worker# this is /usr/lib:/lib, but when the MPI compilers are used
1125*2e9d4914SAndroid Build Coastguard Worker# the location of the communication and MPI libs are included too.
1126*2e9d4914SAndroid Build Coastguard Worker# If we don't find anything, use the default library path according
1127*2e9d4914SAndroid Build Coastguard Worker# to the aix ld manual.
1128*2e9d4914SAndroid Build Coastguard Worker# Store the results from the different compilers for each TAGNAME.
1129*2e9d4914SAndroid Build Coastguard Worker# Allow to override them for all tags through lt_cv_aix_libpath.
1130*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_SYS_MODULE_PATH_AIX],
1131*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
1132*2e9d4914SAndroid Build Coastguard Workerif test "${lt_cv_aix_libpath+set}" = set; then
1133*2e9d4914SAndroid Build Coastguard Worker  aix_libpath=$lt_cv_aix_libpath
1134*2e9d4914SAndroid Build Coastguard Workerelse
1135*2e9d4914SAndroid Build Coastguard Worker  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1136*2e9d4914SAndroid Build Coastguard Worker  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1137*2e9d4914SAndroid Build Coastguard Worker  lt_aix_libpath_sed='[
1138*2e9d4914SAndroid Build Coastguard Worker      /Import File Strings/,/^$/ {
1139*2e9d4914SAndroid Build Coastguard Worker	  /^0/ {
1140*2e9d4914SAndroid Build Coastguard Worker	      s/^0  *\([^ ]*\) *$/\1/
1141*2e9d4914SAndroid Build Coastguard Worker	      p
1142*2e9d4914SAndroid Build Coastguard Worker	  }
1143*2e9d4914SAndroid Build Coastguard Worker      }]'
1144*2e9d4914SAndroid 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"`
1145*2e9d4914SAndroid Build Coastguard Worker  # Check for a 64-bit object if we didn't find anything.
1146*2e9d4914SAndroid Build Coastguard Worker  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1147*2e9d4914SAndroid 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"`
1148*2e9d4914SAndroid Build Coastguard Worker  fi],[])
1149*2e9d4914SAndroid Build Coastguard Worker  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1150*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1151*2e9d4914SAndroid Build Coastguard Worker  fi
1152*2e9d4914SAndroid Build Coastguard Worker  ])
1153*2e9d4914SAndroid Build Coastguard Worker  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1154*2e9d4914SAndroid Build Coastguard Workerfi
1155*2e9d4914SAndroid Build Coastguard Worker])# _LT_SYS_MODULE_PATH_AIX
1156*2e9d4914SAndroid Build Coastguard Worker
1157*2e9d4914SAndroid Build Coastguard Worker
1158*2e9d4914SAndroid Build Coastguard Worker# _LT_SHELL_INIT(ARG)
1159*2e9d4914SAndroid Build Coastguard Worker# -------------------
1160*2e9d4914SAndroid Build Coastguard Workerm4_define([_LT_SHELL_INIT],
1161*2e9d4914SAndroid Build Coastguard Worker[m4_divert_text([M4SH-INIT], [$1
1162*2e9d4914SAndroid Build Coastguard Worker])])# _LT_SHELL_INIT
1163*2e9d4914SAndroid Build Coastguard Worker
1164*2e9d4914SAndroid Build Coastguard Worker
1165*2e9d4914SAndroid Build Coastguard Worker
1166*2e9d4914SAndroid Build Coastguard Worker# _LT_PROG_ECHO_BACKSLASH
1167*2e9d4914SAndroid Build Coastguard Worker# -----------------------
1168*2e9d4914SAndroid Build Coastguard Worker# Find how we can fake an echo command that does not interpret backslash.
1169*2e9d4914SAndroid Build Coastguard Worker# In particular, with Autoconf 2.60 or later we add some code to the start
1170*2e9d4914SAndroid Build Coastguard Worker# of the generated configure script which will find a shell with a builtin
1171*2e9d4914SAndroid Build Coastguard Worker# printf (which we can use as an echo command).
1172*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PROG_ECHO_BACKSLASH],
1173*2e9d4914SAndroid Build Coastguard Worker[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1174*2e9d4914SAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1175*2e9d4914SAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1176*2e9d4914SAndroid Build Coastguard Worker
1177*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to print strings])
1178*2e9d4914SAndroid Build Coastguard Worker# Test print first, because it will be a builtin if present.
1179*2e9d4914SAndroid Build Coastguard Workerif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1180*2e9d4914SAndroid Build Coastguard Worker   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1181*2e9d4914SAndroid Build Coastguard Worker  ECHO='print -r --'
1182*2e9d4914SAndroid Build Coastguard Workerelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1183*2e9d4914SAndroid Build Coastguard Worker  ECHO='printf %s\n'
1184*2e9d4914SAndroid Build Coastguard Workerelse
1185*2e9d4914SAndroid Build Coastguard Worker  # Use this function as a fallback that always works.
1186*2e9d4914SAndroid Build Coastguard Worker  func_fallback_echo ()
1187*2e9d4914SAndroid Build Coastguard Worker  {
1188*2e9d4914SAndroid Build Coastguard Worker    eval 'cat <<_LTECHO_EOF
1189*2e9d4914SAndroid Build Coastguard Worker$[]1
1190*2e9d4914SAndroid Build Coastguard Worker_LTECHO_EOF'
1191*2e9d4914SAndroid Build Coastguard Worker  }
1192*2e9d4914SAndroid Build Coastguard Worker  ECHO='func_fallback_echo'
1193*2e9d4914SAndroid Build Coastguard Workerfi
1194*2e9d4914SAndroid Build Coastguard Worker
1195*2e9d4914SAndroid Build Coastguard Worker# func_echo_all arg...
1196*2e9d4914SAndroid Build Coastguard Worker# Invoke $ECHO with all args, space-separated.
1197*2e9d4914SAndroid Build Coastguard Workerfunc_echo_all ()
1198*2e9d4914SAndroid Build Coastguard Worker{
1199*2e9d4914SAndroid Build Coastguard Worker    $ECHO "$*"
1200*2e9d4914SAndroid Build Coastguard Worker}
1201*2e9d4914SAndroid Build Coastguard Worker
1202*2e9d4914SAndroid Build Coastguard Workercase "$ECHO" in
1203*2e9d4914SAndroid Build Coastguard Worker  printf*) AC_MSG_RESULT([printf]) ;;
1204*2e9d4914SAndroid Build Coastguard Worker  print*) AC_MSG_RESULT([print -r]) ;;
1205*2e9d4914SAndroid Build Coastguard Worker  *) AC_MSG_RESULT([cat]) ;;
1206*2e9d4914SAndroid Build Coastguard Workeresac
1207*2e9d4914SAndroid Build Coastguard Worker
1208*2e9d4914SAndroid Build Coastguard Workerm4_ifdef([_AS_DETECT_SUGGESTED],
1209*2e9d4914SAndroid Build Coastguard Worker[_AS_DETECT_SUGGESTED([
1210*2e9d4914SAndroid Build Coastguard Worker  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1211*2e9d4914SAndroid Build Coastguard Worker    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1212*2e9d4914SAndroid Build Coastguard Worker    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1213*2e9d4914SAndroid Build Coastguard Worker    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1214*2e9d4914SAndroid Build Coastguard Worker    PATH=/empty FPATH=/empty; export PATH FPATH
1215*2e9d4914SAndroid Build Coastguard Worker    test "X`printf %s $ECHO`" = "X$ECHO" \
1216*2e9d4914SAndroid Build Coastguard Worker      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1217*2e9d4914SAndroid Build Coastguard Worker
1218*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1219*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1220*2e9d4914SAndroid Build Coastguard Worker])# _LT_PROG_ECHO_BACKSLASH
1221*2e9d4914SAndroid Build Coastguard Worker
1222*2e9d4914SAndroid Build Coastguard Worker
1223*2e9d4914SAndroid Build Coastguard Worker# _LT_WITH_SYSROOT
1224*2e9d4914SAndroid Build Coastguard Worker# ----------------
1225*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([_LT_WITH_SYSROOT],
1226*2e9d4914SAndroid Build Coastguard Worker[AC_MSG_CHECKING([for sysroot])
1227*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_WITH([sysroot],
1228*2e9d4914SAndroid Build Coastguard Worker[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1229*2e9d4914SAndroid Build Coastguard Worker                        (or the compiler's sysroot if not specified).],
1230*2e9d4914SAndroid Build Coastguard Worker[], [with_sysroot=no])
1231*2e9d4914SAndroid Build Coastguard Worker
1232*2e9d4914SAndroid Build Coastguard Workerdnl lt_sysroot will always be passed unquoted.  We quote it here
1233*2e9d4914SAndroid Build Coastguard Workerdnl in case the user passed a directory name.
1234*2e9d4914SAndroid Build Coastguard Workerlt_sysroot=
1235*2e9d4914SAndroid Build Coastguard Workercase ${with_sysroot} in #(
1236*2e9d4914SAndroid Build Coastguard Worker yes)
1237*2e9d4914SAndroid Build Coastguard Worker   if test "$GCC" = yes; then
1238*2e9d4914SAndroid Build Coastguard Worker     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1239*2e9d4914SAndroid Build Coastguard Worker   fi
1240*2e9d4914SAndroid Build Coastguard Worker   ;; #(
1241*2e9d4914SAndroid Build Coastguard Worker /*)
1242*2e9d4914SAndroid Build Coastguard Worker   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1243*2e9d4914SAndroid Build Coastguard Worker   ;; #(
1244*2e9d4914SAndroid Build Coastguard Worker no|'')
1245*2e9d4914SAndroid Build Coastguard Worker   ;; #(
1246*2e9d4914SAndroid Build Coastguard Worker *)
1247*2e9d4914SAndroid Build Coastguard Worker   AC_MSG_RESULT([${with_sysroot}])
1248*2e9d4914SAndroid Build Coastguard Worker   AC_MSG_ERROR([The sysroot must be an absolute path.])
1249*2e9d4914SAndroid Build Coastguard Worker   ;;
1250*2e9d4914SAndroid Build Coastguard Workeresac
1251*2e9d4914SAndroid Build Coastguard Worker
1252*2e9d4914SAndroid Build Coastguard Worker AC_MSG_RESULT([${lt_sysroot:-no}])
1253*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1254*2e9d4914SAndroid Build Coastguard Worker[dependent libraries, and in which our libraries should be installed.])])
1255*2e9d4914SAndroid Build Coastguard Worker
1256*2e9d4914SAndroid Build Coastguard Worker# _LT_ENABLE_LOCK
1257*2e9d4914SAndroid Build Coastguard Worker# ---------------
1258*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_ENABLE_LOCK],
1259*2e9d4914SAndroid Build Coastguard Worker[AC_ARG_ENABLE([libtool-lock],
1260*2e9d4914SAndroid Build Coastguard Worker  [AS_HELP_STRING([--disable-libtool-lock],
1261*2e9d4914SAndroid Build Coastguard Worker    [avoid locking (might break parallel builds)])])
1262*2e9d4914SAndroid Build Coastguard Workertest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1263*2e9d4914SAndroid Build Coastguard Worker
1264*2e9d4914SAndroid Build Coastguard Worker# Some flags need to be propagated to the compiler or linker for good
1265*2e9d4914SAndroid Build Coastguard Worker# libtool support.
1266*2e9d4914SAndroid Build Coastguard Workercase $host in
1267*2e9d4914SAndroid Build Coastguard Workeria64-*-hpux*)
1268*2e9d4914SAndroid Build Coastguard Worker  # Find out which ABI we are using.
1269*2e9d4914SAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1270*2e9d4914SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1271*2e9d4914SAndroid Build Coastguard Worker    case `/usr/bin/file conftest.$ac_objext` in
1272*2e9d4914SAndroid Build Coastguard Worker      *ELF-32*)
1273*2e9d4914SAndroid Build Coastguard Worker	HPUX_IA64_MODE="32"
1274*2e9d4914SAndroid Build Coastguard Worker	;;
1275*2e9d4914SAndroid Build Coastguard Worker      *ELF-64*)
1276*2e9d4914SAndroid Build Coastguard Worker	HPUX_IA64_MODE="64"
1277*2e9d4914SAndroid Build Coastguard Worker	;;
1278*2e9d4914SAndroid Build Coastguard Worker    esac
1279*2e9d4914SAndroid Build Coastguard Worker  fi
1280*2e9d4914SAndroid Build Coastguard Worker  rm -rf conftest*
1281*2e9d4914SAndroid Build Coastguard Worker  ;;
1282*2e9d4914SAndroid Build Coastguard Worker*-*-irix6*)
1283*2e9d4914SAndroid Build Coastguard Worker  # Find out which ABI we are using.
1284*2e9d4914SAndroid Build Coastguard Worker  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1285*2e9d4914SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1286*2e9d4914SAndroid Build Coastguard Worker    if test "$lt_cv_prog_gnu_ld" = yes; then
1287*2e9d4914SAndroid Build Coastguard Worker      case `/usr/bin/file conftest.$ac_objext` in
1288*2e9d4914SAndroid Build Coastguard Worker	*32-bit*)
1289*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -melf32bsmip"
1290*2e9d4914SAndroid Build Coastguard Worker	  ;;
1291*2e9d4914SAndroid Build Coastguard Worker	*N32*)
1292*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -melf32bmipn32"
1293*2e9d4914SAndroid Build Coastguard Worker	  ;;
1294*2e9d4914SAndroid Build Coastguard Worker	*64-bit*)
1295*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -melf64bmip"
1296*2e9d4914SAndroid Build Coastguard Worker	;;
1297*2e9d4914SAndroid Build Coastguard Worker      esac
1298*2e9d4914SAndroid Build Coastguard Worker    else
1299*2e9d4914SAndroid Build Coastguard Worker      case `/usr/bin/file conftest.$ac_objext` in
1300*2e9d4914SAndroid Build Coastguard Worker	*32-bit*)
1301*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -32"
1302*2e9d4914SAndroid Build Coastguard Worker	  ;;
1303*2e9d4914SAndroid Build Coastguard Worker	*N32*)
1304*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -n32"
1305*2e9d4914SAndroid Build Coastguard Worker	  ;;
1306*2e9d4914SAndroid Build Coastguard Worker	*64-bit*)
1307*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -64"
1308*2e9d4914SAndroid Build Coastguard Worker	  ;;
1309*2e9d4914SAndroid Build Coastguard Worker      esac
1310*2e9d4914SAndroid Build Coastguard Worker    fi
1311*2e9d4914SAndroid Build Coastguard Worker  fi
1312*2e9d4914SAndroid Build Coastguard Worker  rm -rf conftest*
1313*2e9d4914SAndroid Build Coastguard Worker  ;;
1314*2e9d4914SAndroid Build Coastguard Worker
1315*2e9d4914SAndroid Build Coastguard Workerx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1316*2e9d4914SAndroid Build Coastguard Workers390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1317*2e9d4914SAndroid Build Coastguard Worker  # Find out which ABI we are using.
1318*2e9d4914SAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1319*2e9d4914SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1320*2e9d4914SAndroid Build Coastguard Worker    case `/usr/bin/file conftest.o` in
1321*2e9d4914SAndroid Build Coastguard Worker      *32-bit*)
1322*2e9d4914SAndroid Build Coastguard Worker	case $host in
1323*2e9d4914SAndroid Build Coastguard Worker	  x86_64-*kfreebsd*-gnu)
1324*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_i386_fbsd"
1325*2e9d4914SAndroid Build Coastguard Worker	    ;;
1326*2e9d4914SAndroid Build Coastguard Worker	  x86_64-*linux*)
1327*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_i386"
1328*2e9d4914SAndroid Build Coastguard Worker	    ;;
1329*2e9d4914SAndroid Build Coastguard Worker	  ppc64-*linux*|powerpc64-*linux*)
1330*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32ppclinux"
1331*2e9d4914SAndroid Build Coastguard Worker	    ;;
1332*2e9d4914SAndroid Build Coastguard Worker	  s390x-*linux*)
1333*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_s390"
1334*2e9d4914SAndroid Build Coastguard Worker	    ;;
1335*2e9d4914SAndroid Build Coastguard Worker	  sparc64-*linux*)
1336*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf32_sparc"
1337*2e9d4914SAndroid Build Coastguard Worker	    ;;
1338*2e9d4914SAndroid Build Coastguard Worker	esac
1339*2e9d4914SAndroid Build Coastguard Worker	;;
1340*2e9d4914SAndroid Build Coastguard Worker      *64-bit*)
1341*2e9d4914SAndroid Build Coastguard Worker	case $host in
1342*2e9d4914SAndroid Build Coastguard Worker	  x86_64-*kfreebsd*-gnu)
1343*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_x86_64_fbsd"
1344*2e9d4914SAndroid Build Coastguard Worker	    ;;
1345*2e9d4914SAndroid Build Coastguard Worker	  x86_64-*linux*)
1346*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf_x86_64"
1347*2e9d4914SAndroid Build Coastguard Worker	    ;;
1348*2e9d4914SAndroid Build Coastguard Worker	  ppc*-*linux*|powerpc*-*linux*)
1349*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64ppc"
1350*2e9d4914SAndroid Build Coastguard Worker	    ;;
1351*2e9d4914SAndroid Build Coastguard Worker	  s390*-*linux*|s390*-*tpf*)
1352*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64_s390"
1353*2e9d4914SAndroid Build Coastguard Worker	    ;;
1354*2e9d4914SAndroid Build Coastguard Worker	  sparc*-*linux*)
1355*2e9d4914SAndroid Build Coastguard Worker	    LD="${LD-ld} -m elf64_sparc"
1356*2e9d4914SAndroid Build Coastguard Worker	    ;;
1357*2e9d4914SAndroid Build Coastguard Worker	esac
1358*2e9d4914SAndroid Build Coastguard Worker	;;
1359*2e9d4914SAndroid Build Coastguard Worker    esac
1360*2e9d4914SAndroid Build Coastguard Worker  fi
1361*2e9d4914SAndroid Build Coastguard Worker  rm -rf conftest*
1362*2e9d4914SAndroid Build Coastguard Worker  ;;
1363*2e9d4914SAndroid Build Coastguard Worker
1364*2e9d4914SAndroid Build Coastguard Worker*-*-sco3.2v5*)
1365*2e9d4914SAndroid Build Coastguard Worker  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1366*2e9d4914SAndroid Build Coastguard Worker  SAVE_CFLAGS="$CFLAGS"
1367*2e9d4914SAndroid Build Coastguard Worker  CFLAGS="$CFLAGS -belf"
1368*2e9d4914SAndroid Build Coastguard Worker  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1369*2e9d4914SAndroid Build Coastguard Worker    [AC_LANG_PUSH(C)
1370*2e9d4914SAndroid Build Coastguard Worker     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1371*2e9d4914SAndroid Build Coastguard Worker     AC_LANG_POP])
1372*2e9d4914SAndroid Build Coastguard Worker  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1373*2e9d4914SAndroid Build Coastguard Worker    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1374*2e9d4914SAndroid Build Coastguard Worker    CFLAGS="$SAVE_CFLAGS"
1375*2e9d4914SAndroid Build Coastguard Worker  fi
1376*2e9d4914SAndroid Build Coastguard Worker  ;;
1377*2e9d4914SAndroid Build Coastguard Worker*-*solaris*)
1378*2e9d4914SAndroid Build Coastguard Worker  # Find out which ABI we are using.
1379*2e9d4914SAndroid Build Coastguard Worker  echo 'int i;' > conftest.$ac_ext
1380*2e9d4914SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
1381*2e9d4914SAndroid Build Coastguard Worker    case `/usr/bin/file conftest.o` in
1382*2e9d4914SAndroid Build Coastguard Worker    *64-bit*)
1383*2e9d4914SAndroid Build Coastguard Worker      case $lt_cv_prog_gnu_ld in
1384*2e9d4914SAndroid Build Coastguard Worker      yes*)
1385*2e9d4914SAndroid Build Coastguard Worker        case $host in
1386*2e9d4914SAndroid Build Coastguard Worker        i?86-*-solaris*)
1387*2e9d4914SAndroid Build Coastguard Worker          LD="${LD-ld} -m elf_x86_64"
1388*2e9d4914SAndroid Build Coastguard Worker          ;;
1389*2e9d4914SAndroid Build Coastguard Worker        sparc*-*-solaris*)
1390*2e9d4914SAndroid Build Coastguard Worker          LD="${LD-ld} -m elf64_sparc"
1391*2e9d4914SAndroid Build Coastguard Worker          ;;
1392*2e9d4914SAndroid Build Coastguard Worker        esac
1393*2e9d4914SAndroid Build Coastguard Worker        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1394*2e9d4914SAndroid Build Coastguard Worker        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1395*2e9d4914SAndroid Build Coastguard Worker          LD="${LD-ld}_sol2"
1396*2e9d4914SAndroid Build Coastguard Worker        fi
1397*2e9d4914SAndroid Build Coastguard Worker        ;;
1398*2e9d4914SAndroid Build Coastguard Worker      *)
1399*2e9d4914SAndroid Build Coastguard Worker	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1400*2e9d4914SAndroid Build Coastguard Worker	  LD="${LD-ld} -64"
1401*2e9d4914SAndroid Build Coastguard Worker	fi
1402*2e9d4914SAndroid Build Coastguard Worker	;;
1403*2e9d4914SAndroid Build Coastguard Worker      esac
1404*2e9d4914SAndroid Build Coastguard Worker      ;;
1405*2e9d4914SAndroid Build Coastguard Worker    esac
1406*2e9d4914SAndroid Build Coastguard Worker  fi
1407*2e9d4914SAndroid Build Coastguard Worker  rm -rf conftest*
1408*2e9d4914SAndroid Build Coastguard Worker  ;;
1409*2e9d4914SAndroid Build Coastguard Workeresac
1410*2e9d4914SAndroid Build Coastguard Worker
1411*2e9d4914SAndroid Build Coastguard Workerneed_locks="$enable_libtool_lock"
1412*2e9d4914SAndroid Build Coastguard Worker])# _LT_ENABLE_LOCK
1413*2e9d4914SAndroid Build Coastguard Worker
1414*2e9d4914SAndroid Build Coastguard Worker
1415*2e9d4914SAndroid Build Coastguard Worker# _LT_PROG_AR
1416*2e9d4914SAndroid Build Coastguard Worker# -----------
1417*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PROG_AR],
1418*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_TOOLS(AR, [ar], false)
1419*2e9d4914SAndroid Build Coastguard Worker: ${AR=ar}
1420*2e9d4914SAndroid Build Coastguard Worker: ${AR_FLAGS=cru}
1421*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [AR], [1], [The archiver])
1422*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1423*2e9d4914SAndroid Build Coastguard Worker
1424*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1425*2e9d4914SAndroid Build Coastguard Worker  [lt_cv_ar_at_file=no
1426*2e9d4914SAndroid Build Coastguard Worker   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1427*2e9d4914SAndroid Build Coastguard Worker     [echo conftest.$ac_objext > conftest.lst
1428*2e9d4914SAndroid Build Coastguard Worker      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1429*2e9d4914SAndroid Build Coastguard Worker      AC_TRY_EVAL([lt_ar_try])
1430*2e9d4914SAndroid Build Coastguard Worker      if test "$ac_status" -eq 0; then
1431*2e9d4914SAndroid Build Coastguard Worker	# Ensure the archiver fails upon bogus file names.
1432*2e9d4914SAndroid Build Coastguard Worker	rm -f conftest.$ac_objext libconftest.a
1433*2e9d4914SAndroid Build Coastguard Worker	AC_TRY_EVAL([lt_ar_try])
1434*2e9d4914SAndroid Build Coastguard Worker	if test "$ac_status" -ne 0; then
1435*2e9d4914SAndroid Build Coastguard Worker          lt_cv_ar_at_file=@
1436*2e9d4914SAndroid Build Coastguard Worker        fi
1437*2e9d4914SAndroid Build Coastguard Worker      fi
1438*2e9d4914SAndroid Build Coastguard Worker      rm -f conftest.* libconftest.a
1439*2e9d4914SAndroid Build Coastguard Worker     ])
1440*2e9d4914SAndroid Build Coastguard Worker  ])
1441*2e9d4914SAndroid Build Coastguard Worker
1442*2e9d4914SAndroid Build Coastguard Workerif test "x$lt_cv_ar_at_file" = xno; then
1443*2e9d4914SAndroid Build Coastguard Worker  archiver_list_spec=
1444*2e9d4914SAndroid Build Coastguard Workerelse
1445*2e9d4914SAndroid Build Coastguard Worker  archiver_list_spec=$lt_cv_ar_at_file
1446*2e9d4914SAndroid Build Coastguard Workerfi
1447*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [archiver_list_spec], [1],
1448*2e9d4914SAndroid Build Coastguard Worker  [How to feed a file listing to the archiver])
1449*2e9d4914SAndroid Build Coastguard Worker])# _LT_PROG_AR
1450*2e9d4914SAndroid Build Coastguard Worker
1451*2e9d4914SAndroid Build Coastguard Worker
1452*2e9d4914SAndroid Build Coastguard Worker# _LT_CMD_OLD_ARCHIVE
1453*2e9d4914SAndroid Build Coastguard Worker# -------------------
1454*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CMD_OLD_ARCHIVE],
1455*2e9d4914SAndroid Build Coastguard Worker[_LT_PROG_AR
1456*2e9d4914SAndroid Build Coastguard Worker
1457*2e9d4914SAndroid Build Coastguard WorkerAC_CHECK_TOOL(STRIP, strip, :)
1458*2e9d4914SAndroid Build Coastguard Workertest -z "$STRIP" && STRIP=:
1459*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1460*2e9d4914SAndroid Build Coastguard Worker
1461*2e9d4914SAndroid Build Coastguard WorkerAC_CHECK_TOOL(RANLIB, ranlib, :)
1462*2e9d4914SAndroid Build Coastguard Workertest -z "$RANLIB" && RANLIB=:
1463*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [RANLIB], [1],
1464*2e9d4914SAndroid Build Coastguard Worker    [Commands used to install an old-style archive])
1465*2e9d4914SAndroid Build Coastguard Worker
1466*2e9d4914SAndroid Build Coastguard Worker# Determine commands to create old-style static archives.
1467*2e9d4914SAndroid Build Coastguard Workerold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1468*2e9d4914SAndroid Build Coastguard Workerold_postinstall_cmds='chmod 644 $oldlib'
1469*2e9d4914SAndroid Build Coastguard Workerold_postuninstall_cmds=
1470*2e9d4914SAndroid Build Coastguard Worker
1471*2e9d4914SAndroid Build Coastguard Workerif test -n "$RANLIB"; then
1472*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
1473*2e9d4914SAndroid Build Coastguard Worker  openbsd*)
1474*2e9d4914SAndroid Build Coastguard Worker    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1475*2e9d4914SAndroid Build Coastguard Worker    ;;
1476*2e9d4914SAndroid Build Coastguard Worker  *)
1477*2e9d4914SAndroid Build Coastguard Worker    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1478*2e9d4914SAndroid Build Coastguard Worker    ;;
1479*2e9d4914SAndroid Build Coastguard Worker  esac
1480*2e9d4914SAndroid Build Coastguard Worker  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1481*2e9d4914SAndroid Build Coastguard Workerfi
1482*2e9d4914SAndroid Build Coastguard Worker
1483*2e9d4914SAndroid Build Coastguard Workercase $host_os in
1484*2e9d4914SAndroid Build Coastguard Worker  darwin*)
1485*2e9d4914SAndroid Build Coastguard Worker    lock_old_archive_extraction=yes ;;
1486*2e9d4914SAndroid Build Coastguard Worker  *)
1487*2e9d4914SAndroid Build Coastguard Worker    lock_old_archive_extraction=no ;;
1488*2e9d4914SAndroid Build Coastguard Workeresac
1489*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [old_postinstall_cmds], [2])
1490*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [old_postuninstall_cmds], [2])
1491*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_cmds], [2],
1492*2e9d4914SAndroid Build Coastguard Worker    [Commands used to build an old-style archive])
1493*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [lock_old_archive_extraction], [0],
1494*2e9d4914SAndroid Build Coastguard Worker    [Whether to use a lock for old archive extraction])
1495*2e9d4914SAndroid Build Coastguard Worker])# _LT_CMD_OLD_ARCHIVE
1496*2e9d4914SAndroid Build Coastguard Worker
1497*2e9d4914SAndroid Build Coastguard Worker
1498*2e9d4914SAndroid Build Coastguard Worker# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1499*2e9d4914SAndroid Build Coastguard Worker#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1500*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------------------------------------
1501*2e9d4914SAndroid Build Coastguard Worker# Check whether the given compiler option works
1502*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([_LT_COMPILER_OPTION],
1503*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1504*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
1505*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2],
1506*2e9d4914SAndroid Build Coastguard Worker  [$2=no
1507*2e9d4914SAndroid Build Coastguard Worker   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1508*2e9d4914SAndroid Build Coastguard Worker   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1509*2e9d4914SAndroid Build Coastguard Worker   lt_compiler_flag="$3"
1510*2e9d4914SAndroid Build Coastguard Worker   # Insert the option either (1) after the last *FLAGS variable, or
1511*2e9d4914SAndroid Build Coastguard Worker   # (2) before a word containing "conftest.", or (3) at the end.
1512*2e9d4914SAndroid Build Coastguard Worker   # Note that $ac_compile itself does not contain backslashes and begins
1513*2e9d4914SAndroid Build Coastguard Worker   # with a dollar sign (not a hyphen), so the echo should work correctly.
1514*2e9d4914SAndroid Build Coastguard Worker   # The option is referenced via a variable to avoid confusing sed.
1515*2e9d4914SAndroid Build Coastguard Worker   lt_compile=`echo "$ac_compile" | $SED \
1516*2e9d4914SAndroid Build Coastguard Worker   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1517*2e9d4914SAndroid Build Coastguard Worker   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1518*2e9d4914SAndroid Build Coastguard Worker   -e 's:$: $lt_compiler_flag:'`
1519*2e9d4914SAndroid Build Coastguard Worker   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1520*2e9d4914SAndroid Build Coastguard Worker   (eval "$lt_compile" 2>conftest.err)
1521*2e9d4914SAndroid Build Coastguard Worker   ac_status=$?
1522*2e9d4914SAndroid Build Coastguard Worker   cat conftest.err >&AS_MESSAGE_LOG_FD
1523*2e9d4914SAndroid Build Coastguard Worker   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1524*2e9d4914SAndroid Build Coastguard Worker   if (exit $ac_status) && test -s "$ac_outfile"; then
1525*2e9d4914SAndroid Build Coastguard Worker     # The compiler can only warn and ignore the option if not recognized
1526*2e9d4914SAndroid Build Coastguard Worker     # So say no if there are warnings other than the usual output.
1527*2e9d4914SAndroid Build Coastguard Worker     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1528*2e9d4914SAndroid Build Coastguard Worker     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1529*2e9d4914SAndroid Build Coastguard Worker     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1530*2e9d4914SAndroid Build Coastguard Worker       $2=yes
1531*2e9d4914SAndroid Build Coastguard Worker     fi
1532*2e9d4914SAndroid Build Coastguard Worker   fi
1533*2e9d4914SAndroid Build Coastguard Worker   $RM conftest*
1534*2e9d4914SAndroid Build Coastguard Worker])
1535*2e9d4914SAndroid Build Coastguard Worker
1536*2e9d4914SAndroid Build Coastguard Workerif test x"[$]$2" = xyes; then
1537*2e9d4914SAndroid Build Coastguard Worker    m4_if([$5], , :, [$5])
1538*2e9d4914SAndroid Build Coastguard Workerelse
1539*2e9d4914SAndroid Build Coastguard Worker    m4_if([$6], , :, [$6])
1540*2e9d4914SAndroid Build Coastguard Workerfi
1541*2e9d4914SAndroid Build Coastguard Worker])# _LT_COMPILER_OPTION
1542*2e9d4914SAndroid Build Coastguard Worker
1543*2e9d4914SAndroid Build Coastguard Worker# Old name:
1544*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1545*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1546*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1547*2e9d4914SAndroid Build Coastguard Worker
1548*2e9d4914SAndroid Build Coastguard Worker
1549*2e9d4914SAndroid Build Coastguard Worker# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1550*2e9d4914SAndroid Build Coastguard Worker#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1551*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------------------------
1552*2e9d4914SAndroid Build Coastguard Worker# Check whether the given linker option works
1553*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([_LT_LINKER_OPTION],
1554*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1555*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
1556*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2],
1557*2e9d4914SAndroid Build Coastguard Worker  [$2=no
1558*2e9d4914SAndroid Build Coastguard Worker   save_LDFLAGS="$LDFLAGS"
1559*2e9d4914SAndroid Build Coastguard Worker   LDFLAGS="$LDFLAGS $3"
1560*2e9d4914SAndroid Build Coastguard Worker   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1561*2e9d4914SAndroid Build Coastguard Worker   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1562*2e9d4914SAndroid Build Coastguard Worker     # The linker can only warn and ignore the option if not recognized
1563*2e9d4914SAndroid Build Coastguard Worker     # So say no if there are warnings
1564*2e9d4914SAndroid Build Coastguard Worker     if test -s conftest.err; then
1565*2e9d4914SAndroid Build Coastguard Worker       # Append any errors to the config.log.
1566*2e9d4914SAndroid Build Coastguard Worker       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1567*2e9d4914SAndroid Build Coastguard Worker       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1568*2e9d4914SAndroid Build Coastguard Worker       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1569*2e9d4914SAndroid Build Coastguard Worker       if diff conftest.exp conftest.er2 >/dev/null; then
1570*2e9d4914SAndroid Build Coastguard Worker         $2=yes
1571*2e9d4914SAndroid Build Coastguard Worker       fi
1572*2e9d4914SAndroid Build Coastguard Worker     else
1573*2e9d4914SAndroid Build Coastguard Worker       $2=yes
1574*2e9d4914SAndroid Build Coastguard Worker     fi
1575*2e9d4914SAndroid Build Coastguard Worker   fi
1576*2e9d4914SAndroid Build Coastguard Worker   $RM -r conftest*
1577*2e9d4914SAndroid Build Coastguard Worker   LDFLAGS="$save_LDFLAGS"
1578*2e9d4914SAndroid Build Coastguard Worker])
1579*2e9d4914SAndroid Build Coastguard Worker
1580*2e9d4914SAndroid Build Coastguard Workerif test x"[$]$2" = xyes; then
1581*2e9d4914SAndroid Build Coastguard Worker    m4_if([$4], , :, [$4])
1582*2e9d4914SAndroid Build Coastguard Workerelse
1583*2e9d4914SAndroid Build Coastguard Worker    m4_if([$5], , :, [$5])
1584*2e9d4914SAndroid Build Coastguard Workerfi
1585*2e9d4914SAndroid Build Coastguard Worker])# _LT_LINKER_OPTION
1586*2e9d4914SAndroid Build Coastguard Worker
1587*2e9d4914SAndroid Build Coastguard Worker# Old name:
1588*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1589*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1590*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1591*2e9d4914SAndroid Build Coastguard Worker
1592*2e9d4914SAndroid Build Coastguard Worker
1593*2e9d4914SAndroid Build Coastguard Worker# LT_CMD_MAX_LEN
1594*2e9d4914SAndroid Build Coastguard Worker#---------------
1595*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_CMD_MAX_LEN],
1596*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1597*2e9d4914SAndroid Build Coastguard Worker# find the maximum length of command line arguments
1598*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([the maximum length of command line arguments])
1599*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1600*2e9d4914SAndroid Build Coastguard Worker  i=0
1601*2e9d4914SAndroid Build Coastguard Worker  teststring="ABCD"
1602*2e9d4914SAndroid Build Coastguard Worker
1603*2e9d4914SAndroid Build Coastguard Worker  case $build_os in
1604*2e9d4914SAndroid Build Coastguard Worker  msdosdjgpp*)
1605*2e9d4914SAndroid Build Coastguard Worker    # On DJGPP, this test can blow up pretty badly due to problems in libc
1606*2e9d4914SAndroid Build Coastguard Worker    # (any single argument exceeding 2000 bytes causes a buffer overrun
1607*2e9d4914SAndroid Build Coastguard Worker    # during glob expansion).  Even if it were fixed, the result of this
1608*2e9d4914SAndroid Build Coastguard Worker    # check would be larger than it should be.
1609*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1610*2e9d4914SAndroid Build Coastguard Worker    ;;
1611*2e9d4914SAndroid Build Coastguard Worker
1612*2e9d4914SAndroid Build Coastguard Worker  gnu*)
1613*2e9d4914SAndroid Build Coastguard Worker    # Under GNU Hurd, this test is not required because there is
1614*2e9d4914SAndroid Build Coastguard Worker    # no limit to the length of command line arguments.
1615*2e9d4914SAndroid Build Coastguard Worker    # Libtool will interpret -1 as no limit whatsoever
1616*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=-1;
1617*2e9d4914SAndroid Build Coastguard Worker    ;;
1618*2e9d4914SAndroid Build Coastguard Worker
1619*2e9d4914SAndroid Build Coastguard Worker  cygwin* | mingw* | cegcc*)
1620*2e9d4914SAndroid Build Coastguard Worker    # On Win9x/ME, this test blows up -- it succeeds, but takes
1621*2e9d4914SAndroid Build Coastguard Worker    # about 5 minutes as the teststring grows exponentially.
1622*2e9d4914SAndroid Build Coastguard Worker    # Worse, since 9x/ME are not pre-emptively multitasking,
1623*2e9d4914SAndroid Build Coastguard Worker    # you end up with a "frozen" computer, even though with patience
1624*2e9d4914SAndroid Build Coastguard Worker    # the test eventually succeeds (with a max line length of 256k).
1625*2e9d4914SAndroid Build Coastguard Worker    # Instead, let's just punt: use the minimum linelength reported by
1626*2e9d4914SAndroid Build Coastguard Worker    # all of the supported platforms: 8192 (on NT/2K/XP).
1627*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1628*2e9d4914SAndroid Build Coastguard Worker    ;;
1629*2e9d4914SAndroid Build Coastguard Worker
1630*2e9d4914SAndroid Build Coastguard Worker  mint*)
1631*2e9d4914SAndroid Build Coastguard Worker    # On MiNT this can take a long time and run out of memory.
1632*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1633*2e9d4914SAndroid Build Coastguard Worker    ;;
1634*2e9d4914SAndroid Build Coastguard Worker
1635*2e9d4914SAndroid Build Coastguard Worker  amigaos*)
1636*2e9d4914SAndroid Build Coastguard Worker    # On AmigaOS with pdksh, this test takes hours, literally.
1637*2e9d4914SAndroid Build Coastguard Worker    # So we just punt and use a minimum line length of 8192.
1638*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192;
1639*2e9d4914SAndroid Build Coastguard Worker    ;;
1640*2e9d4914SAndroid Build Coastguard Worker
1641*2e9d4914SAndroid Build Coastguard Worker  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1642*2e9d4914SAndroid Build Coastguard Worker    # This has been around since 386BSD, at least.  Likely further.
1643*2e9d4914SAndroid Build Coastguard Worker    if test -x /sbin/sysctl; then
1644*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1645*2e9d4914SAndroid Build Coastguard Worker    elif test -x /usr/sbin/sysctl; then
1646*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1647*2e9d4914SAndroid Build Coastguard Worker    else
1648*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1649*2e9d4914SAndroid Build Coastguard Worker    fi
1650*2e9d4914SAndroid Build Coastguard Worker    # And add a safety zone
1651*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1652*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1653*2e9d4914SAndroid Build Coastguard Worker    ;;
1654*2e9d4914SAndroid Build Coastguard Worker
1655*2e9d4914SAndroid Build Coastguard Worker  interix*)
1656*2e9d4914SAndroid Build Coastguard Worker    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1657*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=196608
1658*2e9d4914SAndroid Build Coastguard Worker    ;;
1659*2e9d4914SAndroid Build Coastguard Worker
1660*2e9d4914SAndroid Build Coastguard Worker  os2*)
1661*2e9d4914SAndroid Build Coastguard Worker    # The test takes a long time on OS/2.
1662*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=8192
1663*2e9d4914SAndroid Build Coastguard Worker    ;;
1664*2e9d4914SAndroid Build Coastguard Worker
1665*2e9d4914SAndroid Build Coastguard Worker  osf*)
1666*2e9d4914SAndroid Build Coastguard Worker    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1667*2e9d4914SAndroid Build Coastguard Worker    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1668*2e9d4914SAndroid Build Coastguard Worker    # nice to cause kernel panics so lets avoid the loop below.
1669*2e9d4914SAndroid Build Coastguard Worker    # First set a reasonable default.
1670*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=16384
1671*2e9d4914SAndroid Build Coastguard Worker    #
1672*2e9d4914SAndroid Build Coastguard Worker    if test -x /sbin/sysconfig; then
1673*2e9d4914SAndroid Build Coastguard Worker      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1674*2e9d4914SAndroid Build Coastguard Worker        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1675*2e9d4914SAndroid Build Coastguard Worker      esac
1676*2e9d4914SAndroid Build Coastguard Worker    fi
1677*2e9d4914SAndroid Build Coastguard Worker    ;;
1678*2e9d4914SAndroid Build Coastguard Worker  sco3.2v5*)
1679*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=102400
1680*2e9d4914SAndroid Build Coastguard Worker    ;;
1681*2e9d4914SAndroid Build Coastguard Worker  sysv5* | sco5v6* | sysv4.2uw2*)
1682*2e9d4914SAndroid Build Coastguard Worker    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1683*2e9d4914SAndroid Build Coastguard Worker    if test -n "$kargmax"; then
1684*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1685*2e9d4914SAndroid Build Coastguard Worker    else
1686*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=32768
1687*2e9d4914SAndroid Build Coastguard Worker    fi
1688*2e9d4914SAndroid Build Coastguard Worker    ;;
1689*2e9d4914SAndroid Build Coastguard Worker  *)
1690*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1691*2e9d4914SAndroid Build Coastguard Worker    if test -n "$lt_cv_sys_max_cmd_len"; then
1692*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1693*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1694*2e9d4914SAndroid Build Coastguard Worker    else
1695*2e9d4914SAndroid Build Coastguard Worker      # Make teststring a little bigger before we do anything with it.
1696*2e9d4914SAndroid Build Coastguard Worker      # a 1K string should be a reasonable start.
1697*2e9d4914SAndroid Build Coastguard Worker      for i in 1 2 3 4 5 6 7 8 ; do
1698*2e9d4914SAndroid Build Coastguard Worker        teststring=$teststring$teststring
1699*2e9d4914SAndroid Build Coastguard Worker      done
1700*2e9d4914SAndroid Build Coastguard Worker      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1701*2e9d4914SAndroid Build Coastguard Worker      # If test is not a shell built-in, we'll probably end up computing a
1702*2e9d4914SAndroid Build Coastguard Worker      # maximum length that is only half of the actual maximum length, but
1703*2e9d4914SAndroid Build Coastguard Worker      # we can't tell.
1704*2e9d4914SAndroid Build Coastguard Worker      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1705*2e9d4914SAndroid Build Coastguard Worker	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1706*2e9d4914SAndroid Build Coastguard Worker	      test $i != 17 # 1/2 MB should be enough
1707*2e9d4914SAndroid Build Coastguard Worker      do
1708*2e9d4914SAndroid Build Coastguard Worker        i=`expr $i + 1`
1709*2e9d4914SAndroid Build Coastguard Worker        teststring=$teststring$teststring
1710*2e9d4914SAndroid Build Coastguard Worker      done
1711*2e9d4914SAndroid Build Coastguard Worker      # Only check the string length outside the loop.
1712*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1713*2e9d4914SAndroid Build Coastguard Worker      teststring=
1714*2e9d4914SAndroid Build Coastguard Worker      # Add a significant safety factor because C++ compilers can tack on
1715*2e9d4914SAndroid Build Coastguard Worker      # massive amounts of additional arguments before passing them to the
1716*2e9d4914SAndroid Build Coastguard Worker      # linker.  It appears as though 1/2 is a usable value.
1717*2e9d4914SAndroid Build Coastguard Worker      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1718*2e9d4914SAndroid Build Coastguard Worker    fi
1719*2e9d4914SAndroid Build Coastguard Worker    ;;
1720*2e9d4914SAndroid Build Coastguard Worker  esac
1721*2e9d4914SAndroid Build Coastguard Worker])
1722*2e9d4914SAndroid Build Coastguard Workerif test -n $lt_cv_sys_max_cmd_len ; then
1723*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1724*2e9d4914SAndroid Build Coastguard Workerelse
1725*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT(none)
1726*2e9d4914SAndroid Build Coastguard Workerfi
1727*2e9d4914SAndroid Build Coastguard Workermax_cmd_len=$lt_cv_sys_max_cmd_len
1728*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [max_cmd_len], [0],
1729*2e9d4914SAndroid Build Coastguard Worker    [What is the maximum length of a command?])
1730*2e9d4914SAndroid Build Coastguard Worker])# LT_CMD_MAX_LEN
1731*2e9d4914SAndroid Build Coastguard Worker
1732*2e9d4914SAndroid Build Coastguard Worker# Old name:
1733*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1734*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1735*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1736*2e9d4914SAndroid Build Coastguard Worker
1737*2e9d4914SAndroid Build Coastguard Worker
1738*2e9d4914SAndroid Build Coastguard Worker# _LT_HEADER_DLFCN
1739*2e9d4914SAndroid Build Coastguard Worker# ----------------
1740*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_HEADER_DLFCN],
1741*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1742*2e9d4914SAndroid Build Coastguard Worker])# _LT_HEADER_DLFCN
1743*2e9d4914SAndroid Build Coastguard Worker
1744*2e9d4914SAndroid Build Coastguard Worker
1745*2e9d4914SAndroid Build Coastguard Worker# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1746*2e9d4914SAndroid Build Coastguard Worker#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1747*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------------------------------------
1748*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_TRY_DLOPEN_SELF],
1749*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl
1750*2e9d4914SAndroid Build Coastguard Workerif test "$cross_compiling" = yes; then :
1751*2e9d4914SAndroid Build Coastguard Worker  [$4]
1752*2e9d4914SAndroid Build Coastguard Workerelse
1753*2e9d4914SAndroid Build Coastguard Worker  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1754*2e9d4914SAndroid Build Coastguard Worker  lt_status=$lt_dlunknown
1755*2e9d4914SAndroid Build Coastguard Worker  cat > conftest.$ac_ext <<_LT_EOF
1756*2e9d4914SAndroid Build Coastguard Worker[#line $LINENO "configure"
1757*2e9d4914SAndroid Build Coastguard Worker#include "confdefs.h"
1758*2e9d4914SAndroid Build Coastguard Worker
1759*2e9d4914SAndroid Build Coastguard Worker#if HAVE_DLFCN_H
1760*2e9d4914SAndroid Build Coastguard Worker#include <dlfcn.h>
1761*2e9d4914SAndroid Build Coastguard Worker#endif
1762*2e9d4914SAndroid Build Coastguard Worker
1763*2e9d4914SAndroid Build Coastguard Worker#include <stdio.h>
1764*2e9d4914SAndroid Build Coastguard Worker
1765*2e9d4914SAndroid Build Coastguard Worker#ifdef RTLD_GLOBAL
1766*2e9d4914SAndroid Build Coastguard Worker#  define LT_DLGLOBAL		RTLD_GLOBAL
1767*2e9d4914SAndroid Build Coastguard Worker#else
1768*2e9d4914SAndroid Build Coastguard Worker#  ifdef DL_GLOBAL
1769*2e9d4914SAndroid Build Coastguard Worker#    define LT_DLGLOBAL		DL_GLOBAL
1770*2e9d4914SAndroid Build Coastguard Worker#  else
1771*2e9d4914SAndroid Build Coastguard Worker#    define LT_DLGLOBAL		0
1772*2e9d4914SAndroid Build Coastguard Worker#  endif
1773*2e9d4914SAndroid Build Coastguard Worker#endif
1774*2e9d4914SAndroid Build Coastguard Worker
1775*2e9d4914SAndroid Build Coastguard Worker/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1776*2e9d4914SAndroid Build Coastguard Worker   find out it does not work in some platform. */
1777*2e9d4914SAndroid Build Coastguard Worker#ifndef LT_DLLAZY_OR_NOW
1778*2e9d4914SAndroid Build Coastguard Worker#  ifdef RTLD_LAZY
1779*2e9d4914SAndroid Build Coastguard Worker#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1780*2e9d4914SAndroid Build Coastguard Worker#  else
1781*2e9d4914SAndroid Build Coastguard Worker#    ifdef DL_LAZY
1782*2e9d4914SAndroid Build Coastguard Worker#      define LT_DLLAZY_OR_NOW		DL_LAZY
1783*2e9d4914SAndroid Build Coastguard Worker#    else
1784*2e9d4914SAndroid Build Coastguard Worker#      ifdef RTLD_NOW
1785*2e9d4914SAndroid Build Coastguard Worker#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1786*2e9d4914SAndroid Build Coastguard Worker#      else
1787*2e9d4914SAndroid Build Coastguard Worker#        ifdef DL_NOW
1788*2e9d4914SAndroid Build Coastguard Worker#          define LT_DLLAZY_OR_NOW	DL_NOW
1789*2e9d4914SAndroid Build Coastguard Worker#        else
1790*2e9d4914SAndroid Build Coastguard Worker#          define LT_DLLAZY_OR_NOW	0
1791*2e9d4914SAndroid Build Coastguard Worker#        endif
1792*2e9d4914SAndroid Build Coastguard Worker#      endif
1793*2e9d4914SAndroid Build Coastguard Worker#    endif
1794*2e9d4914SAndroid Build Coastguard Worker#  endif
1795*2e9d4914SAndroid Build Coastguard Worker#endif
1796*2e9d4914SAndroid Build Coastguard Worker
1797*2e9d4914SAndroid Build Coastguard Worker/* When -fvisbility=hidden is used, assume the code has been annotated
1798*2e9d4914SAndroid Build Coastguard Worker   correspondingly for the symbols needed.  */
1799*2e9d4914SAndroid Build Coastguard Worker#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1800*2e9d4914SAndroid Build Coastguard Workerint fnord () __attribute__((visibility("default")));
1801*2e9d4914SAndroid Build Coastguard Worker#endif
1802*2e9d4914SAndroid Build Coastguard Worker
1803*2e9d4914SAndroid Build Coastguard Workerint fnord () { return 42; }
1804*2e9d4914SAndroid Build Coastguard Workerint main ()
1805*2e9d4914SAndroid Build Coastguard Worker{
1806*2e9d4914SAndroid Build Coastguard Worker  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1807*2e9d4914SAndroid Build Coastguard Worker  int status = $lt_dlunknown;
1808*2e9d4914SAndroid Build Coastguard Worker
1809*2e9d4914SAndroid Build Coastguard Worker  if (self)
1810*2e9d4914SAndroid Build Coastguard Worker    {
1811*2e9d4914SAndroid Build Coastguard Worker      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1812*2e9d4914SAndroid Build Coastguard Worker      else
1813*2e9d4914SAndroid Build Coastguard Worker        {
1814*2e9d4914SAndroid Build Coastguard Worker	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1815*2e9d4914SAndroid Build Coastguard Worker          else puts (dlerror ());
1816*2e9d4914SAndroid Build Coastguard Worker	}
1817*2e9d4914SAndroid Build Coastguard Worker      /* dlclose (self); */
1818*2e9d4914SAndroid Build Coastguard Worker    }
1819*2e9d4914SAndroid Build Coastguard Worker  else
1820*2e9d4914SAndroid Build Coastguard Worker    puts (dlerror ());
1821*2e9d4914SAndroid Build Coastguard Worker
1822*2e9d4914SAndroid Build Coastguard Worker  return status;
1823*2e9d4914SAndroid Build Coastguard Worker}]
1824*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
1825*2e9d4914SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1826*2e9d4914SAndroid Build Coastguard Worker    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1827*2e9d4914SAndroid Build Coastguard Worker    lt_status=$?
1828*2e9d4914SAndroid Build Coastguard Worker    case x$lt_status in
1829*2e9d4914SAndroid Build Coastguard Worker      x$lt_dlno_uscore) $1 ;;
1830*2e9d4914SAndroid Build Coastguard Worker      x$lt_dlneed_uscore) $2 ;;
1831*2e9d4914SAndroid Build Coastguard Worker      x$lt_dlunknown|x*) $3 ;;
1832*2e9d4914SAndroid Build Coastguard Worker    esac
1833*2e9d4914SAndroid Build Coastguard Worker  else :
1834*2e9d4914SAndroid Build Coastguard Worker    # compilation failed
1835*2e9d4914SAndroid Build Coastguard Worker    $3
1836*2e9d4914SAndroid Build Coastguard Worker  fi
1837*2e9d4914SAndroid Build Coastguard Workerfi
1838*2e9d4914SAndroid Build Coastguard Workerrm -fr conftest*
1839*2e9d4914SAndroid Build Coastguard Worker])# _LT_TRY_DLOPEN_SELF
1840*2e9d4914SAndroid Build Coastguard Worker
1841*2e9d4914SAndroid Build Coastguard Worker
1842*2e9d4914SAndroid Build Coastguard Worker# LT_SYS_DLOPEN_SELF
1843*2e9d4914SAndroid Build Coastguard Worker# ------------------
1844*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_SYS_DLOPEN_SELF],
1845*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl
1846*2e9d4914SAndroid Build Coastguard Workerif test "x$enable_dlopen" != xyes; then
1847*2e9d4914SAndroid Build Coastguard Worker  enable_dlopen=unknown
1848*2e9d4914SAndroid Build Coastguard Worker  enable_dlopen_self=unknown
1849*2e9d4914SAndroid Build Coastguard Worker  enable_dlopen_self_static=unknown
1850*2e9d4914SAndroid Build Coastguard Workerelse
1851*2e9d4914SAndroid Build Coastguard Worker  lt_cv_dlopen=no
1852*2e9d4914SAndroid Build Coastguard Worker  lt_cv_dlopen_libs=
1853*2e9d4914SAndroid Build Coastguard Worker
1854*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
1855*2e9d4914SAndroid Build Coastguard Worker  beos*)
1856*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen="load_add_on"
1857*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1858*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen_self=yes
1859*2e9d4914SAndroid Build Coastguard Worker    ;;
1860*2e9d4914SAndroid Build Coastguard Worker
1861*2e9d4914SAndroid Build Coastguard Worker  mingw* | pw32* | cegcc*)
1862*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen="LoadLibrary"
1863*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1864*2e9d4914SAndroid Build Coastguard Worker    ;;
1865*2e9d4914SAndroid Build Coastguard Worker
1866*2e9d4914SAndroid Build Coastguard Worker  cygwin*)
1867*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen="dlopen"
1868*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1869*2e9d4914SAndroid Build Coastguard Worker    ;;
1870*2e9d4914SAndroid Build Coastguard Worker
1871*2e9d4914SAndroid Build Coastguard Worker  darwin*)
1872*2e9d4914SAndroid Build Coastguard Worker  # if libdl is installed we need to link against it
1873*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_LIB([dl], [dlopen],
1874*2e9d4914SAndroid Build Coastguard Worker		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1875*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen="dyld"
1876*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen_libs=
1877*2e9d4914SAndroid Build Coastguard Worker    lt_cv_dlopen_self=yes
1878*2e9d4914SAndroid Build Coastguard Worker    ])
1879*2e9d4914SAndroid Build Coastguard Worker    ;;
1880*2e9d4914SAndroid Build Coastguard Worker
1881*2e9d4914SAndroid Build Coastguard Worker  *)
1882*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_FUNC([shl_load],
1883*2e9d4914SAndroid Build Coastguard Worker	  [lt_cv_dlopen="shl_load"],
1884*2e9d4914SAndroid Build Coastguard Worker      [AC_CHECK_LIB([dld], [shl_load],
1885*2e9d4914SAndroid Build Coastguard Worker	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1886*2e9d4914SAndroid Build Coastguard Worker	[AC_CHECK_FUNC([dlopen],
1887*2e9d4914SAndroid Build Coastguard Worker	      [lt_cv_dlopen="dlopen"],
1888*2e9d4914SAndroid Build Coastguard Worker	  [AC_CHECK_LIB([dl], [dlopen],
1889*2e9d4914SAndroid Build Coastguard Worker		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1890*2e9d4914SAndroid Build Coastguard Worker	    [AC_CHECK_LIB([svld], [dlopen],
1891*2e9d4914SAndroid Build Coastguard Worker		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1892*2e9d4914SAndroid Build Coastguard Worker	      [AC_CHECK_LIB([dld], [dld_link],
1893*2e9d4914SAndroid Build Coastguard Worker		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1894*2e9d4914SAndroid Build Coastguard Worker	      ])
1895*2e9d4914SAndroid Build Coastguard Worker	    ])
1896*2e9d4914SAndroid Build Coastguard Worker	  ])
1897*2e9d4914SAndroid Build Coastguard Worker	])
1898*2e9d4914SAndroid Build Coastguard Worker      ])
1899*2e9d4914SAndroid Build Coastguard Worker    ;;
1900*2e9d4914SAndroid Build Coastguard Worker  esac
1901*2e9d4914SAndroid Build Coastguard Worker
1902*2e9d4914SAndroid Build Coastguard Worker  if test "x$lt_cv_dlopen" != xno; then
1903*2e9d4914SAndroid Build Coastguard Worker    enable_dlopen=yes
1904*2e9d4914SAndroid Build Coastguard Worker  else
1905*2e9d4914SAndroid Build Coastguard Worker    enable_dlopen=no
1906*2e9d4914SAndroid Build Coastguard Worker  fi
1907*2e9d4914SAndroid Build Coastguard Worker
1908*2e9d4914SAndroid Build Coastguard Worker  case $lt_cv_dlopen in
1909*2e9d4914SAndroid Build Coastguard Worker  dlopen)
1910*2e9d4914SAndroid Build Coastguard Worker    save_CPPFLAGS="$CPPFLAGS"
1911*2e9d4914SAndroid Build Coastguard Worker    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1912*2e9d4914SAndroid Build Coastguard Worker
1913*2e9d4914SAndroid Build Coastguard Worker    save_LDFLAGS="$LDFLAGS"
1914*2e9d4914SAndroid Build Coastguard Worker    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1915*2e9d4914SAndroid Build Coastguard Worker
1916*2e9d4914SAndroid Build Coastguard Worker    save_LIBS="$LIBS"
1917*2e9d4914SAndroid Build Coastguard Worker    LIBS="$lt_cv_dlopen_libs $LIBS"
1918*2e9d4914SAndroid Build Coastguard Worker
1919*2e9d4914SAndroid Build Coastguard Worker    AC_CACHE_CHECK([whether a program can dlopen itself],
1920*2e9d4914SAndroid Build Coastguard Worker	  lt_cv_dlopen_self, [dnl
1921*2e9d4914SAndroid Build Coastguard Worker	  _LT_TRY_DLOPEN_SELF(
1922*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1923*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1924*2e9d4914SAndroid Build Coastguard Worker    ])
1925*2e9d4914SAndroid Build Coastguard Worker
1926*2e9d4914SAndroid Build Coastguard Worker    if test "x$lt_cv_dlopen_self" = xyes; then
1927*2e9d4914SAndroid Build Coastguard Worker      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1928*2e9d4914SAndroid Build Coastguard Worker      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1929*2e9d4914SAndroid Build Coastguard Worker	  lt_cv_dlopen_self_static, [dnl
1930*2e9d4914SAndroid Build Coastguard Worker	  _LT_TRY_DLOPEN_SELF(
1931*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1932*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1933*2e9d4914SAndroid Build Coastguard Worker      ])
1934*2e9d4914SAndroid Build Coastguard Worker    fi
1935*2e9d4914SAndroid Build Coastguard Worker
1936*2e9d4914SAndroid Build Coastguard Worker    CPPFLAGS="$save_CPPFLAGS"
1937*2e9d4914SAndroid Build Coastguard Worker    LDFLAGS="$save_LDFLAGS"
1938*2e9d4914SAndroid Build Coastguard Worker    LIBS="$save_LIBS"
1939*2e9d4914SAndroid Build Coastguard Worker    ;;
1940*2e9d4914SAndroid Build Coastguard Worker  esac
1941*2e9d4914SAndroid Build Coastguard Worker
1942*2e9d4914SAndroid Build Coastguard Worker  case $lt_cv_dlopen_self in
1943*2e9d4914SAndroid Build Coastguard Worker  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1944*2e9d4914SAndroid Build Coastguard Worker  *) enable_dlopen_self=unknown ;;
1945*2e9d4914SAndroid Build Coastguard Worker  esac
1946*2e9d4914SAndroid Build Coastguard Worker
1947*2e9d4914SAndroid Build Coastguard Worker  case $lt_cv_dlopen_self_static in
1948*2e9d4914SAndroid Build Coastguard Worker  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1949*2e9d4914SAndroid Build Coastguard Worker  *) enable_dlopen_self_static=unknown ;;
1950*2e9d4914SAndroid Build Coastguard Worker  esac
1951*2e9d4914SAndroid Build Coastguard Workerfi
1952*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([dlopen_support], [enable_dlopen], [0],
1953*2e9d4914SAndroid Build Coastguard Worker	 [Whether dlopen is supported])
1954*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1955*2e9d4914SAndroid Build Coastguard Worker	 [Whether dlopen of programs is supported])
1956*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1957*2e9d4914SAndroid Build Coastguard Worker	 [Whether dlopen of statically linked programs is supported])
1958*2e9d4914SAndroid Build Coastguard Worker])# LT_SYS_DLOPEN_SELF
1959*2e9d4914SAndroid Build Coastguard Worker
1960*2e9d4914SAndroid Build Coastguard Worker# Old name:
1961*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1962*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
1963*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1964*2e9d4914SAndroid Build Coastguard Worker
1965*2e9d4914SAndroid Build Coastguard Worker
1966*2e9d4914SAndroid Build Coastguard Worker# _LT_COMPILER_C_O([TAGNAME])
1967*2e9d4914SAndroid Build Coastguard Worker# ---------------------------
1968*2e9d4914SAndroid Build Coastguard Worker# Check to see if options -c and -o are simultaneously supported by compiler.
1969*2e9d4914SAndroid Build Coastguard Worker# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1970*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_C_O],
1971*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl
1972*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1973*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
1974*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1975*2e9d4914SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1976*2e9d4914SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1977*2e9d4914SAndroid Build Coastguard Worker   $RM -r conftest 2>/dev/null
1978*2e9d4914SAndroid Build Coastguard Worker   mkdir conftest
1979*2e9d4914SAndroid Build Coastguard Worker   cd conftest
1980*2e9d4914SAndroid Build Coastguard Worker   mkdir out
1981*2e9d4914SAndroid Build Coastguard Worker   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1982*2e9d4914SAndroid Build Coastguard Worker
1983*2e9d4914SAndroid Build Coastguard Worker   lt_compiler_flag="-o out/conftest2.$ac_objext"
1984*2e9d4914SAndroid Build Coastguard Worker   # Insert the option either (1) after the last *FLAGS variable, or
1985*2e9d4914SAndroid Build Coastguard Worker   # (2) before a word containing "conftest.", or (3) at the end.
1986*2e9d4914SAndroid Build Coastguard Worker   # Note that $ac_compile itself does not contain backslashes and begins
1987*2e9d4914SAndroid Build Coastguard Worker   # with a dollar sign (not a hyphen), so the echo should work correctly.
1988*2e9d4914SAndroid Build Coastguard Worker   lt_compile=`echo "$ac_compile" | $SED \
1989*2e9d4914SAndroid Build Coastguard Worker   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1990*2e9d4914SAndroid Build Coastguard Worker   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1991*2e9d4914SAndroid Build Coastguard Worker   -e 's:$: $lt_compiler_flag:'`
1992*2e9d4914SAndroid Build Coastguard Worker   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1993*2e9d4914SAndroid Build Coastguard Worker   (eval "$lt_compile" 2>out/conftest.err)
1994*2e9d4914SAndroid Build Coastguard Worker   ac_status=$?
1995*2e9d4914SAndroid Build Coastguard Worker   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1996*2e9d4914SAndroid Build Coastguard Worker   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1997*2e9d4914SAndroid Build Coastguard Worker   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1998*2e9d4914SAndroid Build Coastguard Worker   then
1999*2e9d4914SAndroid Build Coastguard Worker     # The compiler can only warn and ignore the option if not recognized
2000*2e9d4914SAndroid Build Coastguard Worker     # So say no if there are warnings
2001*2e9d4914SAndroid Build Coastguard Worker     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2002*2e9d4914SAndroid Build Coastguard Worker     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2003*2e9d4914SAndroid Build Coastguard Worker     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2004*2e9d4914SAndroid Build Coastguard Worker       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2005*2e9d4914SAndroid Build Coastguard Worker     fi
2006*2e9d4914SAndroid Build Coastguard Worker   fi
2007*2e9d4914SAndroid Build Coastguard Worker   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2008*2e9d4914SAndroid Build Coastguard Worker   $RM conftest*
2009*2e9d4914SAndroid Build Coastguard Worker   # SGI C++ compiler will create directory out/ii_files/ for
2010*2e9d4914SAndroid Build Coastguard Worker   # template instantiation
2011*2e9d4914SAndroid Build Coastguard Worker   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2012*2e9d4914SAndroid Build Coastguard Worker   $RM out/* && rmdir out
2013*2e9d4914SAndroid Build Coastguard Worker   cd ..
2014*2e9d4914SAndroid Build Coastguard Worker   $RM -r conftest
2015*2e9d4914SAndroid Build Coastguard Worker   $RM conftest*
2016*2e9d4914SAndroid Build Coastguard Worker])
2017*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2018*2e9d4914SAndroid Build Coastguard Worker	[Does compiler simultaneously support -c and -o options?])
2019*2e9d4914SAndroid Build Coastguard Worker])# _LT_COMPILER_C_O
2020*2e9d4914SAndroid Build Coastguard Worker
2021*2e9d4914SAndroid Build Coastguard Worker
2022*2e9d4914SAndroid Build Coastguard Worker# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2023*2e9d4914SAndroid Build Coastguard Worker# ----------------------------------
2024*2e9d4914SAndroid Build Coastguard Worker# Check to see if we can do hard links to lock some files if needed
2025*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_FILE_LOCKS],
2026*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_ENABLE_LOCK])dnl
2027*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2028*2e9d4914SAndroid Build Coastguard Worker_LT_COMPILER_C_O([$1])
2029*2e9d4914SAndroid Build Coastguard Worker
2030*2e9d4914SAndroid Build Coastguard Workerhard_links="nottested"
2031*2e9d4914SAndroid Build Coastguard Workerif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2032*2e9d4914SAndroid Build Coastguard Worker  # do not overwrite the value of need_locks provided by the user
2033*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([if we can lock with hard links])
2034*2e9d4914SAndroid Build Coastguard Worker  hard_links=yes
2035*2e9d4914SAndroid Build Coastguard Worker  $RM conftest*
2036*2e9d4914SAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2037*2e9d4914SAndroid Build Coastguard Worker  touch conftest.a
2038*2e9d4914SAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>&5 || hard_links=no
2039*2e9d4914SAndroid Build Coastguard Worker  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2040*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT([$hard_links])
2041*2e9d4914SAndroid Build Coastguard Worker  if test "$hard_links" = no; then
2042*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2043*2e9d4914SAndroid Build Coastguard Worker    need_locks=warn
2044*2e9d4914SAndroid Build Coastguard Worker  fi
2045*2e9d4914SAndroid Build Coastguard Workerelse
2046*2e9d4914SAndroid Build Coastguard Worker  need_locks=no
2047*2e9d4914SAndroid Build Coastguard Workerfi
2048*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2049*2e9d4914SAndroid Build Coastguard Worker])# _LT_COMPILER_FILE_LOCKS
2050*2e9d4914SAndroid Build Coastguard Worker
2051*2e9d4914SAndroid Build Coastguard Worker
2052*2e9d4914SAndroid Build Coastguard Worker# _LT_CHECK_OBJDIR
2053*2e9d4914SAndroid Build Coastguard Worker# ----------------
2054*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_OBJDIR],
2055*2e9d4914SAndroid Build Coastguard Worker[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2056*2e9d4914SAndroid Build Coastguard Worker[rm -f .libs 2>/dev/null
2057*2e9d4914SAndroid Build Coastguard Workermkdir .libs 2>/dev/null
2058*2e9d4914SAndroid Build Coastguard Workerif test -d .libs; then
2059*2e9d4914SAndroid Build Coastguard Worker  lt_cv_objdir=.libs
2060*2e9d4914SAndroid Build Coastguard Workerelse
2061*2e9d4914SAndroid Build Coastguard Worker  # MS-DOS does not allow filenames that begin with a dot.
2062*2e9d4914SAndroid Build Coastguard Worker  lt_cv_objdir=_libs
2063*2e9d4914SAndroid Build Coastguard Workerfi
2064*2e9d4914SAndroid Build Coastguard Workerrmdir .libs 2>/dev/null])
2065*2e9d4914SAndroid Build Coastguard Workerobjdir=$lt_cv_objdir
2066*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [objdir], [0],
2067*2e9d4914SAndroid Build Coastguard Worker         [The name of the directory that contains temporary libtool files])dnl
2068*2e9d4914SAndroid Build Coastguard Workerm4_pattern_allow([LT_OBJDIR])dnl
2069*2e9d4914SAndroid Build Coastguard WorkerAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2070*2e9d4914SAndroid Build Coastguard Worker  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2071*2e9d4914SAndroid Build Coastguard Worker])# _LT_CHECK_OBJDIR
2072*2e9d4914SAndroid Build Coastguard Worker
2073*2e9d4914SAndroid Build Coastguard Worker
2074*2e9d4914SAndroid Build Coastguard Worker# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2075*2e9d4914SAndroid Build Coastguard Worker# --------------------------------------
2076*2e9d4914SAndroid Build Coastguard Worker# Check hardcoding attributes.
2077*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2078*2e9d4914SAndroid Build Coastguard Worker[AC_MSG_CHECKING([how to hardcode library paths into programs])
2079*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_action, $1)=
2080*2e9d4914SAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2081*2e9d4914SAndroid Build Coastguard Worker   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2082*2e9d4914SAndroid Build Coastguard Worker   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2083*2e9d4914SAndroid Build Coastguard Worker
2084*2e9d4914SAndroid Build Coastguard Worker  # We can hardcode non-existent directories.
2085*2e9d4914SAndroid Build Coastguard Worker  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2086*2e9d4914SAndroid Build Coastguard Worker     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2087*2e9d4914SAndroid Build Coastguard Worker     # have to relink, otherwise we might link with an installed library
2088*2e9d4914SAndroid Build Coastguard Worker     # when we should be linking with a yet-to-be-installed one
2089*2e9d4914SAndroid Build Coastguard Worker     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2090*2e9d4914SAndroid Build Coastguard Worker     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2091*2e9d4914SAndroid Build Coastguard Worker    # Linking always hardcodes the temporary library directory.
2092*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_action, $1)=relink
2093*2e9d4914SAndroid Build Coastguard Worker  else
2094*2e9d4914SAndroid Build Coastguard Worker    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2095*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_action, $1)=immediate
2096*2e9d4914SAndroid Build Coastguard Worker  fi
2097*2e9d4914SAndroid Build Coastguard Workerelse
2098*2e9d4914SAndroid Build Coastguard Worker  # We cannot hardcode anything, or else we can only hardcode existing
2099*2e9d4914SAndroid Build Coastguard Worker  # directories.
2100*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_action, $1)=unsupported
2101*2e9d4914SAndroid Build Coastguard Workerfi
2102*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2103*2e9d4914SAndroid Build Coastguard Worker
2104*2e9d4914SAndroid Build Coastguard Workerif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2105*2e9d4914SAndroid Build Coastguard Worker   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2106*2e9d4914SAndroid Build Coastguard Worker  # Fast installation is not supported
2107*2e9d4914SAndroid Build Coastguard Worker  enable_fast_install=no
2108*2e9d4914SAndroid Build Coastguard Workerelif test "$shlibpath_overrides_runpath" = yes ||
2109*2e9d4914SAndroid Build Coastguard Worker     test "$enable_shared" = no; then
2110*2e9d4914SAndroid Build Coastguard Worker  # Fast installation is not necessary
2111*2e9d4914SAndroid Build Coastguard Worker  enable_fast_install=needless
2112*2e9d4914SAndroid Build Coastguard Workerfi
2113*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_action], [0],
2114*2e9d4914SAndroid Build Coastguard Worker    [How to hardcode a shared library path into an executable])
2115*2e9d4914SAndroid Build Coastguard Worker])# _LT_LINKER_HARDCODE_LIBPATH
2116*2e9d4914SAndroid Build Coastguard Worker
2117*2e9d4914SAndroid Build Coastguard Worker
2118*2e9d4914SAndroid Build Coastguard Worker# _LT_CMD_STRIPLIB
2119*2e9d4914SAndroid Build Coastguard Worker# ----------------
2120*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CMD_STRIPLIB],
2121*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
2122*2e9d4914SAndroid Build Coastguard Workerstriplib=
2123*2e9d4914SAndroid Build Coastguard Workerold_striplib=
2124*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether stripping libraries is possible])
2125*2e9d4914SAndroid Build Coastguard Workerif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2126*2e9d4914SAndroid Build Coastguard Worker  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2127*2e9d4914SAndroid Build Coastguard Worker  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2128*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT([yes])
2129*2e9d4914SAndroid Build Coastguard Workerelse
2130*2e9d4914SAndroid Build Coastguard Worker# FIXME - insert some real tests, host_os isn't really good enough
2131*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2132*2e9d4914SAndroid Build Coastguard Worker  darwin*)
2133*2e9d4914SAndroid Build Coastguard Worker    if test -n "$STRIP" ; then
2134*2e9d4914SAndroid Build Coastguard Worker      striplib="$STRIP -x"
2135*2e9d4914SAndroid Build Coastguard Worker      old_striplib="$STRIP -S"
2136*2e9d4914SAndroid Build Coastguard Worker      AC_MSG_RESULT([yes])
2137*2e9d4914SAndroid Build Coastguard Worker    else
2138*2e9d4914SAndroid Build Coastguard Worker      AC_MSG_RESULT([no])
2139*2e9d4914SAndroid Build Coastguard Worker    fi
2140*2e9d4914SAndroid Build Coastguard Worker    ;;
2141*2e9d4914SAndroid Build Coastguard Worker  *)
2142*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([no])
2143*2e9d4914SAndroid Build Coastguard Worker    ;;
2144*2e9d4914SAndroid Build Coastguard Worker  esac
2145*2e9d4914SAndroid Build Coastguard Workerfi
2146*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2147*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [striplib], [1])
2148*2e9d4914SAndroid Build Coastguard Worker])# _LT_CMD_STRIPLIB
2149*2e9d4914SAndroid Build Coastguard Worker
2150*2e9d4914SAndroid Build Coastguard Worker
2151*2e9d4914SAndroid Build Coastguard Worker# _LT_SYS_DYNAMIC_LINKER([TAG])
2152*2e9d4914SAndroid Build Coastguard Worker# -----------------------------
2153*2e9d4914SAndroid Build Coastguard Worker# PORTME Fill in your ld.so characteristics
2154*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_SYS_DYNAMIC_LINKER],
2155*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2156*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
2157*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2158*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])dnl
2159*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
2160*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2161*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([dynamic linker characteristics])
2162*2e9d4914SAndroid Build Coastguard Workerm4_if([$1],
2163*2e9d4914SAndroid Build Coastguard Worker	[], [
2164*2e9d4914SAndroid Build Coastguard Workerif test "$GCC" = yes; then
2165*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2166*2e9d4914SAndroid Build Coastguard Worker    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2167*2e9d4914SAndroid Build Coastguard Worker    *) lt_awk_arg="/^libraries:/" ;;
2168*2e9d4914SAndroid Build Coastguard Worker  esac
2169*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2170*2e9d4914SAndroid Build Coastguard Worker    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2171*2e9d4914SAndroid Build Coastguard Worker    *) lt_sed_strip_eq="s,=/,/,g" ;;
2172*2e9d4914SAndroid Build Coastguard Worker  esac
2173*2e9d4914SAndroid Build Coastguard Worker  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2174*2e9d4914SAndroid Build Coastguard Worker  case $lt_search_path_spec in
2175*2e9d4914SAndroid Build Coastguard Worker  *\;*)
2176*2e9d4914SAndroid Build Coastguard Worker    # if the path contains ";" then we assume it to be the separator
2177*2e9d4914SAndroid Build Coastguard Worker    # otherwise default to the standard path separator (i.e. ":") - it is
2178*2e9d4914SAndroid Build Coastguard Worker    # assumed that no part of a normal pathname contains ";" but that should
2179*2e9d4914SAndroid Build Coastguard Worker    # okay in the real world where ";" in dirpaths is itself problematic.
2180*2e9d4914SAndroid Build Coastguard Worker    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2181*2e9d4914SAndroid Build Coastguard Worker    ;;
2182*2e9d4914SAndroid Build Coastguard Worker  *)
2183*2e9d4914SAndroid Build Coastguard Worker    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2184*2e9d4914SAndroid Build Coastguard Worker    ;;
2185*2e9d4914SAndroid Build Coastguard Worker  esac
2186*2e9d4914SAndroid Build Coastguard Worker  # Ok, now we have the path, separated by spaces, we can step through it
2187*2e9d4914SAndroid Build Coastguard Worker  # and add multilib dir if necessary.
2188*2e9d4914SAndroid Build Coastguard Worker  lt_tmp_lt_search_path_spec=
2189*2e9d4914SAndroid Build Coastguard Worker  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2190*2e9d4914SAndroid Build Coastguard Worker  for lt_sys_path in $lt_search_path_spec; do
2191*2e9d4914SAndroid Build Coastguard Worker    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2192*2e9d4914SAndroid Build Coastguard Worker      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2193*2e9d4914SAndroid Build Coastguard Worker    else
2194*2e9d4914SAndroid Build Coastguard Worker      test -d "$lt_sys_path" && \
2195*2e9d4914SAndroid Build Coastguard Worker	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2196*2e9d4914SAndroid Build Coastguard Worker    fi
2197*2e9d4914SAndroid Build Coastguard Worker  done
2198*2e9d4914SAndroid Build Coastguard Worker  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2199*2e9d4914SAndroid Build Coastguard WorkerBEGIN {RS=" "; FS="/|\n";} {
2200*2e9d4914SAndroid Build Coastguard Worker  lt_foo="";
2201*2e9d4914SAndroid Build Coastguard Worker  lt_count=0;
2202*2e9d4914SAndroid Build Coastguard Worker  for (lt_i = NF; lt_i > 0; lt_i--) {
2203*2e9d4914SAndroid Build Coastguard Worker    if ($lt_i != "" && $lt_i != ".") {
2204*2e9d4914SAndroid Build Coastguard Worker      if ($lt_i == "..") {
2205*2e9d4914SAndroid Build Coastguard Worker        lt_count++;
2206*2e9d4914SAndroid Build Coastguard Worker      } else {
2207*2e9d4914SAndroid Build Coastguard Worker        if (lt_count == 0) {
2208*2e9d4914SAndroid Build Coastguard Worker          lt_foo="/" $lt_i lt_foo;
2209*2e9d4914SAndroid Build Coastguard Worker        } else {
2210*2e9d4914SAndroid Build Coastguard Worker          lt_count--;
2211*2e9d4914SAndroid Build Coastguard Worker        }
2212*2e9d4914SAndroid Build Coastguard Worker      }
2213*2e9d4914SAndroid Build Coastguard Worker    }
2214*2e9d4914SAndroid Build Coastguard Worker  }
2215*2e9d4914SAndroid Build Coastguard Worker  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2216*2e9d4914SAndroid Build Coastguard Worker  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2217*2e9d4914SAndroid Build Coastguard Worker}'`
2218*2e9d4914SAndroid Build Coastguard Worker  # AWK program above erroneously prepends '/' to C:/dos/paths
2219*2e9d4914SAndroid Build Coastguard Worker  # for these hosts.
2220*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2221*2e9d4914SAndroid Build Coastguard Worker    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2222*2e9d4914SAndroid Build Coastguard Worker      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2223*2e9d4914SAndroid Build Coastguard Worker  esac
2224*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2225*2e9d4914SAndroid Build Coastguard Workerelse
2226*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2227*2e9d4914SAndroid Build Coastguard Workerfi])
2228*2e9d4914SAndroid Build Coastguard Workerlibrary_names_spec=
2229*2e9d4914SAndroid Build Coastguard Workerlibname_spec='lib$name'
2230*2e9d4914SAndroid Build Coastguard Workersoname_spec=
2231*2e9d4914SAndroid Build Coastguard Workershrext_cmds=".so"
2232*2e9d4914SAndroid Build Coastguard Workerpostinstall_cmds=
2233*2e9d4914SAndroid Build Coastguard Workerpostuninstall_cmds=
2234*2e9d4914SAndroid Build Coastguard Workerfinish_cmds=
2235*2e9d4914SAndroid Build Coastguard Workerfinish_eval=
2236*2e9d4914SAndroid Build Coastguard Workershlibpath_var=
2237*2e9d4914SAndroid Build Coastguard Workershlibpath_overrides_runpath=unknown
2238*2e9d4914SAndroid Build Coastguard Workerversion_type=none
2239*2e9d4914SAndroid Build Coastguard Workerdynamic_linker="$host_os ld.so"
2240*2e9d4914SAndroid Build Coastguard Workersys_lib_dlsearch_path_spec="/lib /usr/lib"
2241*2e9d4914SAndroid Build Coastguard Workerneed_lib_prefix=unknown
2242*2e9d4914SAndroid Build Coastguard Workerhardcode_into_libs=no
2243*2e9d4914SAndroid Build Coastguard Worker
2244*2e9d4914SAndroid Build Coastguard Worker# when you set need_version to no, make sure it does not cause -set_version
2245*2e9d4914SAndroid Build Coastguard Worker# flags to be left without arguments
2246*2e9d4914SAndroid Build Coastguard Workerneed_version=unknown
2247*2e9d4914SAndroid Build Coastguard Worker
2248*2e9d4914SAndroid Build Coastguard Workercase $host_os in
2249*2e9d4914SAndroid Build Coastguard Workeraix3*)
2250*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2251*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2252*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LIBPATH
2253*2e9d4914SAndroid Build Coastguard Worker
2254*2e9d4914SAndroid Build Coastguard Worker  # AIX 3 has no versioning support, so we append a major version to the name.
2255*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2256*2e9d4914SAndroid Build Coastguard Worker  ;;
2257*2e9d4914SAndroid Build Coastguard Worker
2258*2e9d4914SAndroid Build Coastguard Workeraix[[4-9]]*)
2259*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2260*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2261*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2262*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2263*2e9d4914SAndroid Build Coastguard Worker  if test "$host_cpu" = ia64; then
2264*2e9d4914SAndroid Build Coastguard Worker    # AIX 5 supports IA64
2265*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2266*2e9d4914SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2267*2e9d4914SAndroid Build Coastguard Worker  else
2268*2e9d4914SAndroid Build Coastguard Worker    # With GCC up to 2.95.x, collect2 would create an import file
2269*2e9d4914SAndroid Build Coastguard Worker    # for dependence libraries.  The import file would start with
2270*2e9d4914SAndroid Build Coastguard Worker    # the line `#! .'.  This would cause the generated library to
2271*2e9d4914SAndroid Build Coastguard Worker    # depend on `.', always an invalid library.  This was fixed in
2272*2e9d4914SAndroid Build Coastguard Worker    # development snapshots of GCC prior to 3.0.
2273*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
2274*2e9d4914SAndroid Build Coastguard Worker      aix4 | aix4.[[01]] | aix4.[[01]].*)
2275*2e9d4914SAndroid Build Coastguard Worker      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2276*2e9d4914SAndroid Build Coastguard Worker	   echo ' yes '
2277*2e9d4914SAndroid Build Coastguard Worker	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2278*2e9d4914SAndroid Build Coastguard Worker	:
2279*2e9d4914SAndroid Build Coastguard Worker      else
2280*2e9d4914SAndroid Build Coastguard Worker	can_build_shared=no
2281*2e9d4914SAndroid Build Coastguard Worker      fi
2282*2e9d4914SAndroid Build Coastguard Worker      ;;
2283*2e9d4914SAndroid Build Coastguard Worker    esac
2284*2e9d4914SAndroid Build Coastguard Worker    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2285*2e9d4914SAndroid Build Coastguard Worker    # soname into executable. Probably we can add versioning support to
2286*2e9d4914SAndroid Build Coastguard Worker    # collect2, so additional links can be useful in future.
2287*2e9d4914SAndroid Build Coastguard Worker    if test "$aix_use_runtimelinking" = yes; then
2288*2e9d4914SAndroid Build Coastguard Worker      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2289*2e9d4914SAndroid Build Coastguard Worker      # instead of lib<name>.a to let people know that these are not
2290*2e9d4914SAndroid Build Coastguard Worker      # typical AIX shared libraries.
2291*2e9d4914SAndroid Build Coastguard Worker      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2292*2e9d4914SAndroid Build Coastguard Worker    else
2293*2e9d4914SAndroid Build Coastguard Worker      # We preserve .a as extension for shared libraries through AIX4.2
2294*2e9d4914SAndroid Build Coastguard Worker      # and later when we are not doing run time linking.
2295*2e9d4914SAndroid Build Coastguard Worker      library_names_spec='${libname}${release}.a $libname.a'
2296*2e9d4914SAndroid Build Coastguard Worker      soname_spec='${libname}${release}${shared_ext}$major'
2297*2e9d4914SAndroid Build Coastguard Worker    fi
2298*2e9d4914SAndroid Build Coastguard Worker    shlibpath_var=LIBPATH
2299*2e9d4914SAndroid Build Coastguard Worker  fi
2300*2e9d4914SAndroid Build Coastguard Worker  ;;
2301*2e9d4914SAndroid Build Coastguard Worker
2302*2e9d4914SAndroid Build Coastguard Workeramigaos*)
2303*2e9d4914SAndroid Build Coastguard Worker  case $host_cpu in
2304*2e9d4914SAndroid Build Coastguard Worker  powerpc)
2305*2e9d4914SAndroid Build Coastguard Worker    # Since July 2007 AmigaOS4 officially supports .so libraries.
2306*2e9d4914SAndroid Build Coastguard Worker    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2307*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2308*2e9d4914SAndroid Build Coastguard Worker    ;;
2309*2e9d4914SAndroid Build Coastguard Worker  m68k)
2310*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='$libname.ixlibrary $libname.a'
2311*2e9d4914SAndroid Build Coastguard Worker    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2312*2e9d4914SAndroid Build Coastguard Worker    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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'
2313*2e9d4914SAndroid Build Coastguard Worker    ;;
2314*2e9d4914SAndroid Build Coastguard Worker  esac
2315*2e9d4914SAndroid Build Coastguard Worker  ;;
2316*2e9d4914SAndroid Build Coastguard Worker
2317*2e9d4914SAndroid Build Coastguard Workerbeos*)
2318*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${shared_ext}'
2319*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker="$host_os ld.so"
2320*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LIBRARY_PATH
2321*2e9d4914SAndroid Build Coastguard Worker  ;;
2322*2e9d4914SAndroid Build Coastguard Worker
2323*2e9d4914SAndroid Build Coastguard Workerbsdi[[45]]*)
2324*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2325*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2326*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2327*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2328*2e9d4914SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2329*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2330*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2331*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2332*2e9d4914SAndroid Build Coastguard Worker  # the default ld.so.conf also contains /usr/contrib/lib and
2333*2e9d4914SAndroid Build Coastguard Worker  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2334*2e9d4914SAndroid Build Coastguard Worker  # libtool to hard-code these into programs
2335*2e9d4914SAndroid Build Coastguard Worker  ;;
2336*2e9d4914SAndroid Build Coastguard Worker
2337*2e9d4914SAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
2338*2e9d4914SAndroid Build Coastguard Worker  version_type=windows
2339*2e9d4914SAndroid Build Coastguard Worker  shrext_cmds=".dll"
2340*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2341*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2342*2e9d4914SAndroid Build Coastguard Worker
2343*2e9d4914SAndroid Build Coastguard Worker  case $GCC,$cc_basename in
2344*2e9d4914SAndroid Build Coastguard Worker  yes,*)
2345*2e9d4914SAndroid Build Coastguard Worker    # gcc
2346*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='$libname.dll.a'
2347*2e9d4914SAndroid Build Coastguard Worker    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2348*2e9d4914SAndroid Build Coastguard Worker    postinstall_cmds='base_file=`basename \${file}`~
2349*2e9d4914SAndroid Build Coastguard Worker      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2350*2e9d4914SAndroid Build Coastguard Worker      dldir=$destdir/`dirname \$dlpath`~
2351*2e9d4914SAndroid Build Coastguard Worker      test -d \$dldir || mkdir -p \$dldir~
2352*2e9d4914SAndroid Build Coastguard Worker      $install_prog $dir/$dlname \$dldir/$dlname~
2353*2e9d4914SAndroid Build Coastguard Worker      chmod a+x \$dldir/$dlname~
2354*2e9d4914SAndroid Build Coastguard Worker      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2355*2e9d4914SAndroid Build Coastguard Worker        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2356*2e9d4914SAndroid Build Coastguard Worker      fi'
2357*2e9d4914SAndroid Build Coastguard Worker    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2358*2e9d4914SAndroid Build Coastguard Worker      dlpath=$dir/\$dldll~
2359*2e9d4914SAndroid Build Coastguard Worker       $RM \$dlpath'
2360*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2361*2e9d4914SAndroid Build Coastguard Worker
2362*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
2363*2e9d4914SAndroid Build Coastguard Worker    cygwin*)
2364*2e9d4914SAndroid Build Coastguard Worker      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2365*2e9d4914SAndroid Build Coastguard Worker      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2366*2e9d4914SAndroid Build Coastguard Workerm4_if([$1], [],[
2367*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2368*2e9d4914SAndroid Build Coastguard Worker      ;;
2369*2e9d4914SAndroid Build Coastguard Worker    mingw* | cegcc*)
2370*2e9d4914SAndroid Build Coastguard Worker      # MinGW DLLs use traditional 'lib' prefix
2371*2e9d4914SAndroid Build Coastguard Worker      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2372*2e9d4914SAndroid Build Coastguard Worker      ;;
2373*2e9d4914SAndroid Build Coastguard Worker    pw32*)
2374*2e9d4914SAndroid Build Coastguard Worker      # pw32 DLLs use 'pw' prefix rather than 'lib'
2375*2e9d4914SAndroid Build Coastguard Worker      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2376*2e9d4914SAndroid Build Coastguard Worker      ;;
2377*2e9d4914SAndroid Build Coastguard Worker    esac
2378*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker='Win32 ld.exe'
2379*2e9d4914SAndroid Build Coastguard Worker    ;;
2380*2e9d4914SAndroid Build Coastguard Worker
2381*2e9d4914SAndroid Build Coastguard Worker  *,cl*)
2382*2e9d4914SAndroid Build Coastguard Worker    # Native MSVC
2383*2e9d4914SAndroid Build Coastguard Worker    libname_spec='$name'
2384*2e9d4914SAndroid Build Coastguard Worker    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2385*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}.dll.lib'
2386*2e9d4914SAndroid Build Coastguard Worker
2387*2e9d4914SAndroid Build Coastguard Worker    case $build_os in
2388*2e9d4914SAndroid Build Coastguard Worker    mingw*)
2389*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec=
2390*2e9d4914SAndroid Build Coastguard Worker      lt_save_ifs=$IFS
2391*2e9d4914SAndroid Build Coastguard Worker      IFS=';'
2392*2e9d4914SAndroid Build Coastguard Worker      for lt_path in $LIB
2393*2e9d4914SAndroid Build Coastguard Worker      do
2394*2e9d4914SAndroid Build Coastguard Worker        IFS=$lt_save_ifs
2395*2e9d4914SAndroid Build Coastguard Worker        # Let DOS variable expansion print the short 8.3 style file name.
2396*2e9d4914SAndroid Build Coastguard Worker        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2397*2e9d4914SAndroid Build Coastguard Worker        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2398*2e9d4914SAndroid Build Coastguard Worker      done
2399*2e9d4914SAndroid Build Coastguard Worker      IFS=$lt_save_ifs
2400*2e9d4914SAndroid Build Coastguard Worker      # Convert to MSYS style.
2401*2e9d4914SAndroid 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|^ ||'`
2402*2e9d4914SAndroid Build Coastguard Worker      ;;
2403*2e9d4914SAndroid Build Coastguard Worker    cygwin*)
2404*2e9d4914SAndroid Build Coastguard Worker      # Convert to unix form, then to dos form, then back to unix form
2405*2e9d4914SAndroid Build Coastguard Worker      # but this time dos style (no spaces!) so that the unix form looks
2406*2e9d4914SAndroid Build Coastguard Worker      # like /cygdrive/c/PROGRA~1:/cygdr...
2407*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2408*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2409*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2410*2e9d4914SAndroid Build Coastguard Worker      ;;
2411*2e9d4914SAndroid Build Coastguard Worker    *)
2412*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec="$LIB"
2413*2e9d4914SAndroid Build Coastguard Worker      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2414*2e9d4914SAndroid Build Coastguard Worker        # It is most probably a Windows format PATH.
2415*2e9d4914SAndroid Build Coastguard Worker        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2416*2e9d4914SAndroid Build Coastguard Worker      else
2417*2e9d4914SAndroid Build Coastguard Worker        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2418*2e9d4914SAndroid Build Coastguard Worker      fi
2419*2e9d4914SAndroid Build Coastguard Worker      # FIXME: find the short name or the path components, as spaces are
2420*2e9d4914SAndroid Build Coastguard Worker      # common. (e.g. "Program Files" -> "PROGRA~1")
2421*2e9d4914SAndroid Build Coastguard Worker      ;;
2422*2e9d4914SAndroid Build Coastguard Worker    esac
2423*2e9d4914SAndroid Build Coastguard Worker
2424*2e9d4914SAndroid Build Coastguard Worker    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2425*2e9d4914SAndroid Build Coastguard Worker    postinstall_cmds='base_file=`basename \${file}`~
2426*2e9d4914SAndroid Build Coastguard Worker      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2427*2e9d4914SAndroid Build Coastguard Worker      dldir=$destdir/`dirname \$dlpath`~
2428*2e9d4914SAndroid Build Coastguard Worker      test -d \$dldir || mkdir -p \$dldir~
2429*2e9d4914SAndroid Build Coastguard Worker      $install_prog $dir/$dlname \$dldir/$dlname'
2430*2e9d4914SAndroid Build Coastguard Worker    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2431*2e9d4914SAndroid Build Coastguard Worker      dlpath=$dir/\$dldll~
2432*2e9d4914SAndroid Build Coastguard Worker       $RM \$dlpath'
2433*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2434*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker='Win32 link.exe'
2435*2e9d4914SAndroid Build Coastguard Worker    ;;
2436*2e9d4914SAndroid Build Coastguard Worker
2437*2e9d4914SAndroid Build Coastguard Worker  *)
2438*2e9d4914SAndroid Build Coastguard Worker    # Assume MSVC wrapper
2439*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2440*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker='Win32 ld.exe'
2441*2e9d4914SAndroid Build Coastguard Worker    ;;
2442*2e9d4914SAndroid Build Coastguard Worker  esac
2443*2e9d4914SAndroid Build Coastguard Worker  # FIXME: first we should search . and the directory the executable is in
2444*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=PATH
2445*2e9d4914SAndroid Build Coastguard Worker  ;;
2446*2e9d4914SAndroid Build Coastguard Worker
2447*2e9d4914SAndroid Build Coastguard Workerdarwin* | rhapsody*)
2448*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker="$host_os dyld"
2449*2e9d4914SAndroid Build Coastguard Worker  version_type=darwin
2450*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2451*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2452*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2453*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${major}$shared_ext'
2454*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2455*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=DYLD_LIBRARY_PATH
2456*2e9d4914SAndroid Build Coastguard Worker  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2457*2e9d4914SAndroid Build Coastguard Workerm4_if([$1], [],[
2458*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2459*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2460*2e9d4914SAndroid Build Coastguard Worker  ;;
2461*2e9d4914SAndroid Build Coastguard Worker
2462*2e9d4914SAndroid Build Coastguard Workerdgux*)
2463*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2464*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2465*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2466*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2467*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2468*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2469*2e9d4914SAndroid Build Coastguard Worker  ;;
2470*2e9d4914SAndroid Build Coastguard Worker
2471*2e9d4914SAndroid Build Coastguard Workerfreebsd* | dragonfly*)
2472*2e9d4914SAndroid Build Coastguard Worker  # DragonFly does not have aout.  When/if they implement a new
2473*2e9d4914SAndroid Build Coastguard Worker  # versioning mechanism, adjust this.
2474*2e9d4914SAndroid Build Coastguard Worker  if test -x /usr/bin/objformat; then
2475*2e9d4914SAndroid Build Coastguard Worker    objformat=`/usr/bin/objformat`
2476*2e9d4914SAndroid Build Coastguard Worker  else
2477*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
2478*2e9d4914SAndroid Build Coastguard Worker    freebsd[[23]].*) objformat=aout ;;
2479*2e9d4914SAndroid Build Coastguard Worker    *) objformat=elf ;;
2480*2e9d4914SAndroid Build Coastguard Worker    esac
2481*2e9d4914SAndroid Build Coastguard Worker  fi
2482*2e9d4914SAndroid Build Coastguard Worker  version_type=freebsd-$objformat
2483*2e9d4914SAndroid Build Coastguard Worker  case $version_type in
2484*2e9d4914SAndroid Build Coastguard Worker    freebsd-elf*)
2485*2e9d4914SAndroid Build Coastguard Worker      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2486*2e9d4914SAndroid Build Coastguard Worker      need_version=no
2487*2e9d4914SAndroid Build Coastguard Worker      need_lib_prefix=no
2488*2e9d4914SAndroid Build Coastguard Worker      ;;
2489*2e9d4914SAndroid Build Coastguard Worker    freebsd-*)
2490*2e9d4914SAndroid Build Coastguard Worker      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2491*2e9d4914SAndroid Build Coastguard Worker      need_version=yes
2492*2e9d4914SAndroid Build Coastguard Worker      ;;
2493*2e9d4914SAndroid Build Coastguard Worker  esac
2494*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2495*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2496*2e9d4914SAndroid Build Coastguard Worker  freebsd2.*)
2497*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2498*2e9d4914SAndroid Build Coastguard Worker    ;;
2499*2e9d4914SAndroid Build Coastguard Worker  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2500*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2501*2e9d4914SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2502*2e9d4914SAndroid Build Coastguard Worker    ;;
2503*2e9d4914SAndroid Build Coastguard Worker  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2504*2e9d4914SAndroid Build Coastguard Worker  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2505*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=no
2506*2e9d4914SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2507*2e9d4914SAndroid Build Coastguard Worker    ;;
2508*2e9d4914SAndroid Build Coastguard Worker  *) # from 4.6 on, and DragonFly
2509*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2510*2e9d4914SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2511*2e9d4914SAndroid Build Coastguard Worker    ;;
2512*2e9d4914SAndroid Build Coastguard Worker  esac
2513*2e9d4914SAndroid Build Coastguard Worker  ;;
2514*2e9d4914SAndroid Build Coastguard Worker
2515*2e9d4914SAndroid Build Coastguard Workergnu*)
2516*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2517*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2518*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2519*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2520*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2521*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2522*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2523*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2524*2e9d4914SAndroid Build Coastguard Worker  ;;
2525*2e9d4914SAndroid Build Coastguard Worker
2526*2e9d4914SAndroid Build Coastguard Workerhaiku*)
2527*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2528*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2529*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2530*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker="$host_os runtime_loader"
2531*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2532*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2533*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LIBRARY_PATH
2534*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2535*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2536*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2537*2e9d4914SAndroid Build Coastguard Worker  ;;
2538*2e9d4914SAndroid Build Coastguard Worker
2539*2e9d4914SAndroid Build Coastguard Workerhpux9* | hpux10* | hpux11*)
2540*2e9d4914SAndroid Build Coastguard Worker  # Give a soname corresponding to the major version so that dld.sl refuses to
2541*2e9d4914SAndroid Build Coastguard Worker  # link against other versions.
2542*2e9d4914SAndroid Build Coastguard Worker  version_type=sunos
2543*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2544*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2545*2e9d4914SAndroid Build Coastguard Worker  case $host_cpu in
2546*2e9d4914SAndroid Build Coastguard Worker  ia64*)
2547*2e9d4914SAndroid Build Coastguard Worker    shrext_cmds='.so'
2548*2e9d4914SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2549*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.so"
2550*2e9d4914SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2551*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2552*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2553*2e9d4914SAndroid Build Coastguard Worker    soname_spec='${libname}${release}${shared_ext}$major'
2554*2e9d4914SAndroid Build Coastguard Worker    if test "X$HPUX_IA64_MODE" = X32; then
2555*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2556*2e9d4914SAndroid Build Coastguard Worker    else
2557*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2558*2e9d4914SAndroid Build Coastguard Worker    fi
2559*2e9d4914SAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2560*2e9d4914SAndroid Build Coastguard Worker    ;;
2561*2e9d4914SAndroid Build Coastguard Worker  hppa*64*)
2562*2e9d4914SAndroid Build Coastguard Worker    shrext_cmds='.sl'
2563*2e9d4914SAndroid Build Coastguard Worker    hardcode_into_libs=yes
2564*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.sl"
2565*2e9d4914SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2566*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2567*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2568*2e9d4914SAndroid Build Coastguard Worker    soname_spec='${libname}${release}${shared_ext}$major'
2569*2e9d4914SAndroid Build Coastguard Worker    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2570*2e9d4914SAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2571*2e9d4914SAndroid Build Coastguard Worker    ;;
2572*2e9d4914SAndroid Build Coastguard Worker  *)
2573*2e9d4914SAndroid Build Coastguard Worker    shrext_cmds='.sl'
2574*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker="$host_os dld.sl"
2575*2e9d4914SAndroid Build Coastguard Worker    shlibpath_var=SHLIB_PATH
2576*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2577*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2578*2e9d4914SAndroid Build Coastguard Worker    soname_spec='${libname}${release}${shared_ext}$major'
2579*2e9d4914SAndroid Build Coastguard Worker    ;;
2580*2e9d4914SAndroid Build Coastguard Worker  esac
2581*2e9d4914SAndroid Build Coastguard Worker  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2582*2e9d4914SAndroid Build Coastguard Worker  postinstall_cmds='chmod 555 $lib'
2583*2e9d4914SAndroid Build Coastguard Worker  # or fails outright, so override atomically:
2584*2e9d4914SAndroid Build Coastguard Worker  install_override_mode=555
2585*2e9d4914SAndroid Build Coastguard Worker  ;;
2586*2e9d4914SAndroid Build Coastguard Worker
2587*2e9d4914SAndroid Build Coastguard Workerinterix[[3-9]]*)
2588*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2589*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2590*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2591*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2592*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2593*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2594*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2595*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2596*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2597*2e9d4914SAndroid Build Coastguard Worker  ;;
2598*2e9d4914SAndroid Build Coastguard Worker
2599*2e9d4914SAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*)
2600*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2601*2e9d4914SAndroid Build Coastguard Worker    nonstopux*) version_type=nonstopux ;;
2602*2e9d4914SAndroid Build Coastguard Worker    *)
2603*2e9d4914SAndroid Build Coastguard Worker	if test "$lt_cv_prog_gnu_ld" = yes; then
2604*2e9d4914SAndroid Build Coastguard Worker		version_type=linux # correct to gnu/linux during the next big refactor
2605*2e9d4914SAndroid Build Coastguard Worker	else
2606*2e9d4914SAndroid Build Coastguard Worker		version_type=irix
2607*2e9d4914SAndroid Build Coastguard Worker	fi ;;
2608*2e9d4914SAndroid Build Coastguard Worker  esac
2609*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2610*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2611*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2612*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2613*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2614*2e9d4914SAndroid Build Coastguard Worker  irix5* | nonstopux*)
2615*2e9d4914SAndroid Build Coastguard Worker    libsuff= shlibsuff=
2616*2e9d4914SAndroid Build Coastguard Worker    ;;
2617*2e9d4914SAndroid Build Coastguard Worker  *)
2618*2e9d4914SAndroid Build Coastguard Worker    case $LD in # libtool.m4 will add one of these switches to LD
2619*2e9d4914SAndroid Build Coastguard Worker    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2620*2e9d4914SAndroid Build Coastguard Worker      libsuff= shlibsuff= libmagic=32-bit;;
2621*2e9d4914SAndroid Build Coastguard Worker    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2622*2e9d4914SAndroid Build Coastguard Worker      libsuff=32 shlibsuff=N32 libmagic=N32;;
2623*2e9d4914SAndroid Build Coastguard Worker    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2624*2e9d4914SAndroid Build Coastguard Worker      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2625*2e9d4914SAndroid Build Coastguard Worker    *) libsuff= shlibsuff= libmagic=never-match;;
2626*2e9d4914SAndroid Build Coastguard Worker    esac
2627*2e9d4914SAndroid Build Coastguard Worker    ;;
2628*2e9d4914SAndroid Build Coastguard Worker  esac
2629*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2630*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2631*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2632*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2633*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2634*2e9d4914SAndroid Build Coastguard Worker  ;;
2635*2e9d4914SAndroid Build Coastguard Worker
2636*2e9d4914SAndroid Build Coastguard Worker# No shared lib support for Linux oldld, aout, or coff.
2637*2e9d4914SAndroid Build Coastguard Workerlinux*oldld* | linux*aout* | linux*coff*)
2638*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker=no
2639*2e9d4914SAndroid Build Coastguard Worker  ;;
2640*2e9d4914SAndroid Build Coastguard Worker
2641*2e9d4914SAndroid Build Coastguard Worker# This must be glibc/ELF.
2642*2e9d4914SAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu)
2643*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2644*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2645*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2646*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2647*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2648*2e9d4914SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2649*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2650*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2651*2e9d4914SAndroid Build Coastguard Worker
2652*2e9d4914SAndroid Build Coastguard Worker  # Some binutils ld are patched to set DT_RUNPATH
2653*2e9d4914SAndroid Build Coastguard Worker  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2654*2e9d4914SAndroid Build Coastguard Worker    [lt_cv_shlibpath_overrides_runpath=no
2655*2e9d4914SAndroid Build Coastguard Worker    save_LDFLAGS=$LDFLAGS
2656*2e9d4914SAndroid Build Coastguard Worker    save_libdir=$libdir
2657*2e9d4914SAndroid Build Coastguard Worker    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2658*2e9d4914SAndroid Build Coastguard Worker	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2659*2e9d4914SAndroid Build Coastguard Worker    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2660*2e9d4914SAndroid Build Coastguard Worker      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2661*2e9d4914SAndroid Build Coastguard Worker	 [lt_cv_shlibpath_overrides_runpath=yes])])
2662*2e9d4914SAndroid Build Coastguard Worker    LDFLAGS=$save_LDFLAGS
2663*2e9d4914SAndroid Build Coastguard Worker    libdir=$save_libdir
2664*2e9d4914SAndroid Build Coastguard Worker    ])
2665*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2666*2e9d4914SAndroid Build Coastguard Worker
2667*2e9d4914SAndroid Build Coastguard Worker  # This implies no fast_install, which is unacceptable.
2668*2e9d4914SAndroid Build Coastguard Worker  # Some rework will be needed to allow for fast_install
2669*2e9d4914SAndroid Build Coastguard Worker  # before this can be enabled.
2670*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2671*2e9d4914SAndroid Build Coastguard Worker
2672*2e9d4914SAndroid Build Coastguard Worker  # Append ld.so.conf contents to the search path
2673*2e9d4914SAndroid Build Coastguard Worker  if test -f /etc/ld.so.conf; then
2674*2e9d4914SAndroid 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' ' '`
2675*2e9d4914SAndroid Build Coastguard Worker    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2676*2e9d4914SAndroid Build Coastguard Worker  fi
2677*2e9d4914SAndroid Build Coastguard Worker
2678*2e9d4914SAndroid Build Coastguard Worker  # We used to test for /lib/ld.so.1 and disable shared libraries on
2679*2e9d4914SAndroid Build Coastguard Worker  # powerpc, because MkLinux only supported shared libraries with the
2680*2e9d4914SAndroid Build Coastguard Worker  # GNU dynamic linker.  Since this was broken with cross compilers,
2681*2e9d4914SAndroid Build Coastguard Worker  # most powerpc-linux boxes support dynamic linking these days and
2682*2e9d4914SAndroid Build Coastguard Worker  # people can always --disable-shared, the test was removed, and we
2683*2e9d4914SAndroid Build Coastguard Worker  # assume the GNU/Linux dynamic linker is in use.
2684*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker='GNU/Linux ld.so'
2685*2e9d4914SAndroid Build Coastguard Worker  ;;
2686*2e9d4914SAndroid Build Coastguard Worker
2687*2e9d4914SAndroid Build Coastguard Workernetbsd*)
2688*2e9d4914SAndroid Build Coastguard Worker  version_type=sunos
2689*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2690*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2691*2e9d4914SAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2692*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2693*2e9d4914SAndroid Build Coastguard Worker    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2694*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker='NetBSD (a.out) ld.so'
2695*2e9d4914SAndroid Build Coastguard Worker  else
2696*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2697*2e9d4914SAndroid Build Coastguard Worker    soname_spec='${libname}${release}${shared_ext}$major'
2698*2e9d4914SAndroid Build Coastguard Worker    dynamic_linker='NetBSD ld.elf_so'
2699*2e9d4914SAndroid Build Coastguard Worker  fi
2700*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2701*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2702*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2703*2e9d4914SAndroid Build Coastguard Worker  ;;
2704*2e9d4914SAndroid Build Coastguard Worker
2705*2e9d4914SAndroid Build Coastguard Workernewsos6)
2706*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2707*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2708*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2709*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2710*2e9d4914SAndroid Build Coastguard Worker  ;;
2711*2e9d4914SAndroid Build Coastguard Worker
2712*2e9d4914SAndroid Build Coastguard Worker*nto* | *qnx*)
2713*2e9d4914SAndroid Build Coastguard Worker  version_type=qnx
2714*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2715*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2716*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2717*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2718*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2719*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2720*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2721*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker='ldqnx.so'
2722*2e9d4914SAndroid Build Coastguard Worker  ;;
2723*2e9d4914SAndroid Build Coastguard Worker
2724*2e9d4914SAndroid Build Coastguard Workeropenbsd*)
2725*2e9d4914SAndroid Build Coastguard Worker  version_type=sunos
2726*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="/usr/lib"
2727*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2728*2e9d4914SAndroid Build Coastguard Worker  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2729*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
2730*2e9d4914SAndroid Build Coastguard Worker    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2731*2e9d4914SAndroid Build Coastguard Worker    *)				need_version=no  ;;
2732*2e9d4914SAndroid Build Coastguard Worker  esac
2733*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2734*2e9d4914SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2735*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2736*2e9d4914SAndroid Build Coastguard Worker  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2737*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
2738*2e9d4914SAndroid Build Coastguard Worker      openbsd2.[[89]] | openbsd2.[[89]].*)
2739*2e9d4914SAndroid Build Coastguard Worker	shlibpath_overrides_runpath=no
2740*2e9d4914SAndroid Build Coastguard Worker	;;
2741*2e9d4914SAndroid Build Coastguard Worker      *)
2742*2e9d4914SAndroid Build Coastguard Worker	shlibpath_overrides_runpath=yes
2743*2e9d4914SAndroid Build Coastguard Worker	;;
2744*2e9d4914SAndroid Build Coastguard Worker      esac
2745*2e9d4914SAndroid Build Coastguard Worker  else
2746*2e9d4914SAndroid Build Coastguard Worker    shlibpath_overrides_runpath=yes
2747*2e9d4914SAndroid Build Coastguard Worker  fi
2748*2e9d4914SAndroid Build Coastguard Worker  ;;
2749*2e9d4914SAndroid Build Coastguard Worker
2750*2e9d4914SAndroid Build Coastguard Workeros2*)
2751*2e9d4914SAndroid Build Coastguard Worker  libname_spec='$name'
2752*2e9d4914SAndroid Build Coastguard Worker  shrext_cmds=".dll"
2753*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2754*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='$libname${shared_ext} $libname.a'
2755*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker='OS/2 ld.exe'
2756*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LIBPATH
2757*2e9d4914SAndroid Build Coastguard Worker  ;;
2758*2e9d4914SAndroid Build Coastguard Worker
2759*2e9d4914SAndroid Build Coastguard Workerosf3* | osf4* | osf5*)
2760*2e9d4914SAndroid Build Coastguard Worker  version_type=osf
2761*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2762*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2763*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2764*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2765*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2766*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2767*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2768*2e9d4914SAndroid Build Coastguard Worker  ;;
2769*2e9d4914SAndroid Build Coastguard Worker
2770*2e9d4914SAndroid Build Coastguard Workerrdos*)
2771*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker=no
2772*2e9d4914SAndroid Build Coastguard Worker  ;;
2773*2e9d4914SAndroid Build Coastguard Worker
2774*2e9d4914SAndroid Build Coastguard Workersolaris*)
2775*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2776*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2777*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2778*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2779*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2780*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2781*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2782*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2783*2e9d4914SAndroid Build Coastguard Worker  # ldd complains unless libraries are executable
2784*2e9d4914SAndroid Build Coastguard Worker  postinstall_cmds='chmod +x $lib'
2785*2e9d4914SAndroid Build Coastguard Worker  ;;
2786*2e9d4914SAndroid Build Coastguard Worker
2787*2e9d4914SAndroid Build Coastguard Workersunos4*)
2788*2e9d4914SAndroid Build Coastguard Worker  version_type=sunos
2789*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2790*2e9d4914SAndroid Build Coastguard Worker  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2791*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2792*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2793*2e9d4914SAndroid Build Coastguard Worker  if test "$with_gnu_ld" = yes; then
2794*2e9d4914SAndroid Build Coastguard Worker    need_lib_prefix=no
2795*2e9d4914SAndroid Build Coastguard Worker  fi
2796*2e9d4914SAndroid Build Coastguard Worker  need_version=yes
2797*2e9d4914SAndroid Build Coastguard Worker  ;;
2798*2e9d4914SAndroid Build Coastguard Worker
2799*2e9d4914SAndroid Build Coastguard Workersysv4 | sysv4.3*)
2800*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2801*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2802*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2803*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2804*2e9d4914SAndroid Build Coastguard Worker  case $host_vendor in
2805*2e9d4914SAndroid Build Coastguard Worker    sni)
2806*2e9d4914SAndroid Build Coastguard Worker      shlibpath_overrides_runpath=no
2807*2e9d4914SAndroid Build Coastguard Worker      need_lib_prefix=no
2808*2e9d4914SAndroid Build Coastguard Worker      runpath_var=LD_RUN_PATH
2809*2e9d4914SAndroid Build Coastguard Worker      ;;
2810*2e9d4914SAndroid Build Coastguard Worker    siemens)
2811*2e9d4914SAndroid Build Coastguard Worker      need_lib_prefix=no
2812*2e9d4914SAndroid Build Coastguard Worker      ;;
2813*2e9d4914SAndroid Build Coastguard Worker    motorola)
2814*2e9d4914SAndroid Build Coastguard Worker      need_lib_prefix=no
2815*2e9d4914SAndroid Build Coastguard Worker      need_version=no
2816*2e9d4914SAndroid Build Coastguard Worker      shlibpath_overrides_runpath=no
2817*2e9d4914SAndroid Build Coastguard Worker      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2818*2e9d4914SAndroid Build Coastguard Worker      ;;
2819*2e9d4914SAndroid Build Coastguard Worker  esac
2820*2e9d4914SAndroid Build Coastguard Worker  ;;
2821*2e9d4914SAndroid Build Coastguard Worker
2822*2e9d4914SAndroid Build Coastguard Workersysv4*MP*)
2823*2e9d4914SAndroid Build Coastguard Worker  if test -d /usr/nec ;then
2824*2e9d4914SAndroid Build Coastguard Worker    version_type=linux # correct to gnu/linux during the next big refactor
2825*2e9d4914SAndroid Build Coastguard Worker    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2826*2e9d4914SAndroid Build Coastguard Worker    soname_spec='$libname${shared_ext}.$major'
2827*2e9d4914SAndroid Build Coastguard Worker    shlibpath_var=LD_LIBRARY_PATH
2828*2e9d4914SAndroid Build Coastguard Worker  fi
2829*2e9d4914SAndroid Build Coastguard Worker  ;;
2830*2e9d4914SAndroid Build Coastguard Worker
2831*2e9d4914SAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2832*2e9d4914SAndroid Build Coastguard Worker  version_type=freebsd-elf
2833*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2834*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2835*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2836*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2837*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2838*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=yes
2839*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2840*2e9d4914SAndroid Build Coastguard Worker  if test "$with_gnu_ld" = yes; then
2841*2e9d4914SAndroid Build Coastguard Worker    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2842*2e9d4914SAndroid Build Coastguard Worker  else
2843*2e9d4914SAndroid Build Coastguard Worker    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2844*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
2845*2e9d4914SAndroid Build Coastguard Worker      sco3.2v5*)
2846*2e9d4914SAndroid Build Coastguard Worker        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2847*2e9d4914SAndroid Build Coastguard Worker	;;
2848*2e9d4914SAndroid Build Coastguard Worker    esac
2849*2e9d4914SAndroid Build Coastguard Worker  fi
2850*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec='/usr/lib'
2851*2e9d4914SAndroid Build Coastguard Worker  ;;
2852*2e9d4914SAndroid Build Coastguard Worker
2853*2e9d4914SAndroid Build Coastguard Workertpf*)
2854*2e9d4914SAndroid Build Coastguard Worker  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2855*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2856*2e9d4914SAndroid Build Coastguard Worker  need_lib_prefix=no
2857*2e9d4914SAndroid Build Coastguard Worker  need_version=no
2858*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2859*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2860*2e9d4914SAndroid Build Coastguard Worker  shlibpath_overrides_runpath=no
2861*2e9d4914SAndroid Build Coastguard Worker  hardcode_into_libs=yes
2862*2e9d4914SAndroid Build Coastguard Worker  ;;
2863*2e9d4914SAndroid Build Coastguard Worker
2864*2e9d4914SAndroid Build Coastguard Workeruts4*)
2865*2e9d4914SAndroid Build Coastguard Worker  version_type=linux # correct to gnu/linux during the next big refactor
2866*2e9d4914SAndroid Build Coastguard Worker  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2867*2e9d4914SAndroid Build Coastguard Worker  soname_spec='${libname}${release}${shared_ext}$major'
2868*2e9d4914SAndroid Build Coastguard Worker  shlibpath_var=LD_LIBRARY_PATH
2869*2e9d4914SAndroid Build Coastguard Worker  ;;
2870*2e9d4914SAndroid Build Coastguard Worker
2871*2e9d4914SAndroid Build Coastguard Worker*)
2872*2e9d4914SAndroid Build Coastguard Worker  dynamic_linker=no
2873*2e9d4914SAndroid Build Coastguard Worker  ;;
2874*2e9d4914SAndroid Build Coastguard Workeresac
2875*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$dynamic_linker])
2876*2e9d4914SAndroid Build Coastguard Workertest "$dynamic_linker" = no && can_build_shared=no
2877*2e9d4914SAndroid Build Coastguard Worker
2878*2e9d4914SAndroid Build Coastguard Workervariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2879*2e9d4914SAndroid Build Coastguard Workerif test "$GCC" = yes; then
2880*2e9d4914SAndroid Build Coastguard Worker  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2881*2e9d4914SAndroid Build Coastguard Workerfi
2882*2e9d4914SAndroid Build Coastguard Worker
2883*2e9d4914SAndroid Build Coastguard Workerif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2884*2e9d4914SAndroid Build Coastguard Worker  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2885*2e9d4914SAndroid Build Coastguard Workerfi
2886*2e9d4914SAndroid Build Coastguard Workerif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2887*2e9d4914SAndroid Build Coastguard Worker  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2888*2e9d4914SAndroid Build Coastguard Workerfi
2889*2e9d4914SAndroid Build Coastguard Worker
2890*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [variables_saved_for_relink], [1],
2891*2e9d4914SAndroid Build Coastguard Worker    [Variables whose values should be saved in libtool wrapper scripts and
2892*2e9d4914SAndroid Build Coastguard Worker    restored at link time])
2893*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [need_lib_prefix], [0],
2894*2e9d4914SAndroid Build Coastguard Worker    [Do we need the "lib" prefix for modules?])
2895*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2896*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [version_type], [0], [Library versioning type])
2897*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2898*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2899*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_overrides_runpath], [0],
2900*2e9d4914SAndroid Build Coastguard Worker    [Is shlibpath searched before the hard-coded library search path?])
2901*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2902*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [library_names_spec], [1],
2903*2e9d4914SAndroid Build Coastguard Worker    [[List of archive names.  First name is the real one, the rest are links.
2904*2e9d4914SAndroid Build Coastguard Worker    The last name is the one that the linker finds with -lNAME]])
2905*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [soname_spec], [1],
2906*2e9d4914SAndroid Build Coastguard Worker    [[The coded name of the library, if different from the real name]])
2907*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [install_override_mode], [1],
2908*2e9d4914SAndroid Build Coastguard Worker    [Permission mode override for installation of shared libraries])
2909*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [postinstall_cmds], [2],
2910*2e9d4914SAndroid Build Coastguard Worker    [Command to use after installation of a shared archive])
2911*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [postuninstall_cmds], [2],
2912*2e9d4914SAndroid Build Coastguard Worker    [Command to use after uninstallation of a shared archive])
2913*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [finish_cmds], [2],
2914*2e9d4914SAndroid Build Coastguard Worker    [Commands used to finish a libtool library installation in a directory])
2915*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [finish_eval], [1],
2916*2e9d4914SAndroid Build Coastguard Worker    [[As "finish_cmds", except a single script fragment to be evaled but
2917*2e9d4914SAndroid Build Coastguard Worker    not shown]])
2918*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [hardcode_into_libs], [0],
2919*2e9d4914SAndroid Build Coastguard Worker    [Whether we should hardcode library paths into libraries])
2920*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [sys_lib_search_path_spec], [2],
2921*2e9d4914SAndroid Build Coastguard Worker    [Compile-time system search path for libraries])
2922*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2923*2e9d4914SAndroid Build Coastguard Worker    [Run-time system search path for libraries])
2924*2e9d4914SAndroid Build Coastguard Worker])# _LT_SYS_DYNAMIC_LINKER
2925*2e9d4914SAndroid Build Coastguard Worker
2926*2e9d4914SAndroid Build Coastguard Worker
2927*2e9d4914SAndroid Build Coastguard Worker# _LT_PATH_TOOL_PREFIX(TOOL)
2928*2e9d4914SAndroid Build Coastguard Worker# --------------------------
2929*2e9d4914SAndroid Build Coastguard Worker# find a file program which can recognize shared library
2930*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2931*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl
2932*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([for $1])
2933*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2934*2e9d4914SAndroid Build Coastguard Worker[case $MAGIC_CMD in
2935*2e9d4914SAndroid Build Coastguard Worker[[\\/*] |  ?:[\\/]*])
2936*2e9d4914SAndroid Build Coastguard Worker  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2937*2e9d4914SAndroid Build Coastguard Worker  ;;
2938*2e9d4914SAndroid Build Coastguard Worker*)
2939*2e9d4914SAndroid Build Coastguard Worker  lt_save_MAGIC_CMD="$MAGIC_CMD"
2940*2e9d4914SAndroid Build Coastguard Worker  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2941*2e9d4914SAndroid Build Coastguard Workerdnl $ac_dummy forces splitting on constant user-supplied paths.
2942*2e9d4914SAndroid Build Coastguard Workerdnl POSIX.2 word splitting is done only on the output of word expansions,
2943*2e9d4914SAndroid Build Coastguard Workerdnl not every word.  This closes a longstanding sh security hole.
2944*2e9d4914SAndroid Build Coastguard Worker  ac_dummy="m4_if([$2], , $PATH, [$2])"
2945*2e9d4914SAndroid Build Coastguard Worker  for ac_dir in $ac_dummy; do
2946*2e9d4914SAndroid Build Coastguard Worker    IFS="$lt_save_ifs"
2947*2e9d4914SAndroid Build Coastguard Worker    test -z "$ac_dir" && ac_dir=.
2948*2e9d4914SAndroid Build Coastguard Worker    if test -f $ac_dir/$1; then
2949*2e9d4914SAndroid Build Coastguard Worker      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2950*2e9d4914SAndroid Build Coastguard Worker      if test -n "$file_magic_test_file"; then
2951*2e9d4914SAndroid Build Coastguard Worker	case $deplibs_check_method in
2952*2e9d4914SAndroid Build Coastguard Worker	"file_magic "*)
2953*2e9d4914SAndroid Build Coastguard Worker	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2954*2e9d4914SAndroid Build Coastguard Worker	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2955*2e9d4914SAndroid Build Coastguard Worker	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2956*2e9d4914SAndroid Build Coastguard Worker	    $EGREP "$file_magic_regex" > /dev/null; then
2957*2e9d4914SAndroid Build Coastguard Worker	    :
2958*2e9d4914SAndroid Build Coastguard Worker	  else
2959*2e9d4914SAndroid Build Coastguard Worker	    cat <<_LT_EOF 1>&2
2960*2e9d4914SAndroid Build Coastguard Worker
2961*2e9d4914SAndroid Build Coastguard Worker*** Warning: the command libtool uses to detect shared libraries,
2962*2e9d4914SAndroid Build Coastguard Worker*** $file_magic_cmd, produces output that libtool cannot recognize.
2963*2e9d4914SAndroid Build Coastguard Worker*** The result is that libtool may fail to recognize shared libraries
2964*2e9d4914SAndroid Build Coastguard Worker*** as such.  This will affect the creation of libtool libraries that
2965*2e9d4914SAndroid Build Coastguard Worker*** depend on shared libraries, but programs linked with such libtool
2966*2e9d4914SAndroid Build Coastguard Worker*** libraries will work regardless of this problem.  Nevertheless, you
2967*2e9d4914SAndroid Build Coastguard Worker*** may want to report the problem to your system manager and/or to
2968*2e9d4914SAndroid Build Coastguard Worker*** [email protected]
2969*2e9d4914SAndroid Build Coastguard Worker
2970*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
2971*2e9d4914SAndroid Build Coastguard Worker	  fi ;;
2972*2e9d4914SAndroid Build Coastguard Worker	esac
2973*2e9d4914SAndroid Build Coastguard Worker      fi
2974*2e9d4914SAndroid Build Coastguard Worker      break
2975*2e9d4914SAndroid Build Coastguard Worker    fi
2976*2e9d4914SAndroid Build Coastguard Worker  done
2977*2e9d4914SAndroid Build Coastguard Worker  IFS="$lt_save_ifs"
2978*2e9d4914SAndroid Build Coastguard Worker  MAGIC_CMD="$lt_save_MAGIC_CMD"
2979*2e9d4914SAndroid Build Coastguard Worker  ;;
2980*2e9d4914SAndroid Build Coastguard Workeresac])
2981*2e9d4914SAndroid Build Coastguard WorkerMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2982*2e9d4914SAndroid Build Coastguard Workerif test -n "$MAGIC_CMD"; then
2983*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT($MAGIC_CMD)
2984*2e9d4914SAndroid Build Coastguard Workerelse
2985*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT(no)
2986*2e9d4914SAndroid Build Coastguard Workerfi
2987*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [MAGIC_CMD], [0],
2988*2e9d4914SAndroid Build Coastguard Worker	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2989*2e9d4914SAndroid Build Coastguard Worker])# _LT_PATH_TOOL_PREFIX
2990*2e9d4914SAndroid Build Coastguard Worker
2991*2e9d4914SAndroid Build Coastguard Worker# Old name:
2992*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2993*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
2994*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2995*2e9d4914SAndroid Build Coastguard Worker
2996*2e9d4914SAndroid Build Coastguard Worker
2997*2e9d4914SAndroid Build Coastguard Worker# _LT_PATH_MAGIC
2998*2e9d4914SAndroid Build Coastguard Worker# --------------
2999*2e9d4914SAndroid Build Coastguard Worker# find a file program which can recognize a shared library
3000*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PATH_MAGIC],
3001*2e9d4914SAndroid Build Coastguard Worker[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3002*2e9d4914SAndroid Build Coastguard Workerif test -z "$lt_cv_path_MAGIC_CMD"; then
3003*2e9d4914SAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
3004*2e9d4914SAndroid Build Coastguard Worker    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3005*2e9d4914SAndroid Build Coastguard Worker  else
3006*2e9d4914SAndroid Build Coastguard Worker    MAGIC_CMD=:
3007*2e9d4914SAndroid Build Coastguard Worker  fi
3008*2e9d4914SAndroid Build Coastguard Workerfi
3009*2e9d4914SAndroid Build Coastguard Worker])# _LT_PATH_MAGIC
3010*2e9d4914SAndroid Build Coastguard Worker
3011*2e9d4914SAndroid Build Coastguard Worker
3012*2e9d4914SAndroid Build Coastguard Worker# LT_PATH_LD
3013*2e9d4914SAndroid Build Coastguard Worker# ----------
3014*2e9d4914SAndroid Build Coastguard Worker# find the pathname to the GNU or non-GNU linker
3015*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_LD],
3016*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
3017*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_HOST])dnl
3018*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3019*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
3020*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
3021*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3022*2e9d4914SAndroid Build Coastguard Worker
3023*2e9d4914SAndroid Build Coastguard WorkerAC_ARG_WITH([gnu-ld],
3024*2e9d4914SAndroid Build Coastguard Worker    [AS_HELP_STRING([--with-gnu-ld],
3025*2e9d4914SAndroid Build Coastguard Worker	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3026*2e9d4914SAndroid Build Coastguard Worker    [test "$withval" = no || with_gnu_ld=yes],
3027*2e9d4914SAndroid Build Coastguard Worker    [with_gnu_ld=no])dnl
3028*2e9d4914SAndroid Build Coastguard Worker
3029*2e9d4914SAndroid Build Coastguard Workerac_prog=ld
3030*2e9d4914SAndroid Build Coastguard Workerif test "$GCC" = yes; then
3031*2e9d4914SAndroid Build Coastguard Worker  # Check if gcc -print-prog-name=ld gives a path.
3032*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([for ld used by $CC])
3033*2e9d4914SAndroid Build Coastguard Worker  case $host in
3034*2e9d4914SAndroid Build Coastguard Worker  *-*-mingw*)
3035*2e9d4914SAndroid Build Coastguard Worker    # gcc leaves a trailing carriage return which upsets mingw
3036*2e9d4914SAndroid Build Coastguard Worker    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3037*2e9d4914SAndroid Build Coastguard Worker  *)
3038*2e9d4914SAndroid Build Coastguard Worker    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3039*2e9d4914SAndroid Build Coastguard Worker  esac
3040*2e9d4914SAndroid Build Coastguard Worker  case $ac_prog in
3041*2e9d4914SAndroid Build Coastguard Worker    # Accept absolute paths.
3042*2e9d4914SAndroid Build Coastguard Worker    [[\\/]]* | ?:[[\\/]]*)
3043*2e9d4914SAndroid Build Coastguard Worker      re_direlt='/[[^/]][[^/]]*/\.\./'
3044*2e9d4914SAndroid Build Coastguard Worker      # Canonicalize the pathname of ld
3045*2e9d4914SAndroid Build Coastguard Worker      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3046*2e9d4914SAndroid Build Coastguard Worker      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3047*2e9d4914SAndroid Build Coastguard Worker	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3048*2e9d4914SAndroid Build Coastguard Worker      done
3049*2e9d4914SAndroid Build Coastguard Worker      test -z "$LD" && LD="$ac_prog"
3050*2e9d4914SAndroid Build Coastguard Worker      ;;
3051*2e9d4914SAndroid Build Coastguard Worker  "")
3052*2e9d4914SAndroid Build Coastguard Worker    # If it fails, then pretend we aren't using GCC.
3053*2e9d4914SAndroid Build Coastguard Worker    ac_prog=ld
3054*2e9d4914SAndroid Build Coastguard Worker    ;;
3055*2e9d4914SAndroid Build Coastguard Worker  *)
3056*2e9d4914SAndroid Build Coastguard Worker    # If it is relative, then search for the first ld in PATH.
3057*2e9d4914SAndroid Build Coastguard Worker    with_gnu_ld=unknown
3058*2e9d4914SAndroid Build Coastguard Worker    ;;
3059*2e9d4914SAndroid Build Coastguard Worker  esac
3060*2e9d4914SAndroid Build Coastguard Workerelif test "$with_gnu_ld" = yes; then
3061*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([for GNU ld])
3062*2e9d4914SAndroid Build Coastguard Workerelse
3063*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([for non-GNU ld])
3064*2e9d4914SAndroid Build Coastguard Workerfi
3065*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_LD,
3066*2e9d4914SAndroid Build Coastguard Worker[if test -z "$LD"; then
3067*2e9d4914SAndroid Build Coastguard Worker  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3068*2e9d4914SAndroid Build Coastguard Worker  for ac_dir in $PATH; do
3069*2e9d4914SAndroid Build Coastguard Worker    IFS="$lt_save_ifs"
3070*2e9d4914SAndroid Build Coastguard Worker    test -z "$ac_dir" && ac_dir=.
3071*2e9d4914SAndroid Build Coastguard Worker    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3072*2e9d4914SAndroid Build Coastguard Worker      lt_cv_path_LD="$ac_dir/$ac_prog"
3073*2e9d4914SAndroid Build Coastguard Worker      # Check to see if the program is GNU ld.  I'd rather use --version,
3074*2e9d4914SAndroid Build Coastguard Worker      # but apparently some variants of GNU ld only accept -v.
3075*2e9d4914SAndroid Build Coastguard Worker      # Break only if it was the GNU/non-GNU ld that we prefer.
3076*2e9d4914SAndroid Build Coastguard Worker      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3077*2e9d4914SAndroid Build Coastguard Worker      *GNU* | *'with BFD'*)
3078*2e9d4914SAndroid Build Coastguard Worker	test "$with_gnu_ld" != no && break
3079*2e9d4914SAndroid Build Coastguard Worker	;;
3080*2e9d4914SAndroid Build Coastguard Worker      *)
3081*2e9d4914SAndroid Build Coastguard Worker	test "$with_gnu_ld" != yes && break
3082*2e9d4914SAndroid Build Coastguard Worker	;;
3083*2e9d4914SAndroid Build Coastguard Worker      esac
3084*2e9d4914SAndroid Build Coastguard Worker    fi
3085*2e9d4914SAndroid Build Coastguard Worker  done
3086*2e9d4914SAndroid Build Coastguard Worker  IFS="$lt_save_ifs"
3087*2e9d4914SAndroid Build Coastguard Workerelse
3088*2e9d4914SAndroid Build Coastguard Worker  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3089*2e9d4914SAndroid Build Coastguard Workerfi])
3090*2e9d4914SAndroid Build Coastguard WorkerLD="$lt_cv_path_LD"
3091*2e9d4914SAndroid Build Coastguard Workerif test -n "$LD"; then
3092*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT($LD)
3093*2e9d4914SAndroid Build Coastguard Workerelse
3094*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT(no)
3095*2e9d4914SAndroid Build Coastguard Workerfi
3096*2e9d4914SAndroid Build Coastguard Workertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3097*2e9d4914SAndroid Build Coastguard Worker_LT_PATH_LD_GNU
3098*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([LD])
3099*2e9d4914SAndroid Build Coastguard Worker
3100*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3101*2e9d4914SAndroid Build Coastguard Worker])# LT_PATH_LD
3102*2e9d4914SAndroid Build Coastguard Worker
3103*2e9d4914SAndroid Build Coastguard Worker# Old names:
3104*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3105*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3106*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3107*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LD], [])
3108*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LD], [])
3109*2e9d4914SAndroid Build Coastguard Worker
3110*2e9d4914SAndroid Build Coastguard Worker
3111*2e9d4914SAndroid Build Coastguard Worker# _LT_PATH_LD_GNU
3112*2e9d4914SAndroid Build Coastguard Worker#- --------------
3113*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PATH_LD_GNU],
3114*2e9d4914SAndroid Build Coastguard Worker[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3115*2e9d4914SAndroid Build Coastguard Worker[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3116*2e9d4914SAndroid Build Coastguard Workercase `$LD -v 2>&1 </dev/null` in
3117*2e9d4914SAndroid Build Coastguard Worker*GNU* | *'with BFD'*)
3118*2e9d4914SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=yes
3119*2e9d4914SAndroid Build Coastguard Worker  ;;
3120*2e9d4914SAndroid Build Coastguard Worker*)
3121*2e9d4914SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=no
3122*2e9d4914SAndroid Build Coastguard Worker  ;;
3123*2e9d4914SAndroid Build Coastguard Workeresac])
3124*2e9d4914SAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld
3125*2e9d4914SAndroid Build Coastguard Worker])# _LT_PATH_LD_GNU
3126*2e9d4914SAndroid Build Coastguard Worker
3127*2e9d4914SAndroid Build Coastguard Worker
3128*2e9d4914SAndroid Build Coastguard Worker# _LT_CMD_RELOAD
3129*2e9d4914SAndroid Build Coastguard Worker# --------------
3130*2e9d4914SAndroid Build Coastguard Worker# find reload flag for linker
3131*2e9d4914SAndroid Build Coastguard Worker#   -- PORTME Some linkers may need a different reload flag.
3132*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CMD_RELOAD],
3133*2e9d4914SAndroid Build Coastguard Worker[AC_CACHE_CHECK([for $LD option to reload object files],
3134*2e9d4914SAndroid Build Coastguard Worker  lt_cv_ld_reload_flag,
3135*2e9d4914SAndroid Build Coastguard Worker  [lt_cv_ld_reload_flag='-r'])
3136*2e9d4914SAndroid Build Coastguard Workerreload_flag=$lt_cv_ld_reload_flag
3137*2e9d4914SAndroid Build Coastguard Workercase $reload_flag in
3138*2e9d4914SAndroid Build Coastguard Worker"" | " "*) ;;
3139*2e9d4914SAndroid Build Coastguard Worker*) reload_flag=" $reload_flag" ;;
3140*2e9d4914SAndroid Build Coastguard Workeresac
3141*2e9d4914SAndroid Build Coastguard Workerreload_cmds='$LD$reload_flag -o $output$reload_objs'
3142*2e9d4914SAndroid Build Coastguard Workercase $host_os in
3143*2e9d4914SAndroid Build Coastguard Worker  cygwin* | mingw* | pw32* | cegcc*)
3144*2e9d4914SAndroid Build Coastguard Worker    if test "$GCC" != yes; then
3145*2e9d4914SAndroid Build Coastguard Worker      reload_cmds=false
3146*2e9d4914SAndroid Build Coastguard Worker    fi
3147*2e9d4914SAndroid Build Coastguard Worker    ;;
3148*2e9d4914SAndroid Build Coastguard Worker  darwin*)
3149*2e9d4914SAndroid Build Coastguard Worker    if test "$GCC" = yes; then
3150*2e9d4914SAndroid Build Coastguard Worker      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3151*2e9d4914SAndroid Build Coastguard Worker    else
3152*2e9d4914SAndroid Build Coastguard Worker      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3153*2e9d4914SAndroid Build Coastguard Worker    fi
3154*2e9d4914SAndroid Build Coastguard Worker    ;;
3155*2e9d4914SAndroid Build Coastguard Workeresac
3156*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3157*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_cmds], [2])dnl
3158*2e9d4914SAndroid Build Coastguard Worker])# _LT_CMD_RELOAD
3159*2e9d4914SAndroid Build Coastguard Worker
3160*2e9d4914SAndroid Build Coastguard Worker
3161*2e9d4914SAndroid Build Coastguard Worker# _LT_CHECK_MAGIC_METHOD
3162*2e9d4914SAndroid Build Coastguard Worker# ----------------------
3163*2e9d4914SAndroid Build Coastguard Worker# how to check for library dependencies
3164*2e9d4914SAndroid Build Coastguard Worker#  -- PORTME fill in with the dynamic library characteristics
3165*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_MAGIC_METHOD],
3166*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
3167*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])
3168*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to recognize dependent libraries],
3169*2e9d4914SAndroid Build Coastguard Workerlt_cv_deplibs_check_method,
3170*2e9d4914SAndroid Build Coastguard Worker[lt_cv_file_magic_cmd='$MAGIC_CMD'
3171*2e9d4914SAndroid Build Coastguard Workerlt_cv_file_magic_test_file=
3172*2e9d4914SAndroid Build Coastguard Workerlt_cv_deplibs_check_method='unknown'
3173*2e9d4914SAndroid Build Coastguard Worker# Need to set the preceding variable on all platforms that support
3174*2e9d4914SAndroid Build Coastguard Worker# interlibrary dependencies.
3175*2e9d4914SAndroid Build Coastguard Worker# 'none' -- dependencies not supported.
3176*2e9d4914SAndroid Build Coastguard Worker# `unknown' -- same as none, but documents that we really don't know.
3177*2e9d4914SAndroid Build Coastguard Worker# 'pass_all' -- all dependencies passed with no checks.
3178*2e9d4914SAndroid Build Coastguard Worker# 'test_compile' -- check by making test program.
3179*2e9d4914SAndroid Build Coastguard Worker# 'file_magic [[regex]]' -- check by looking for files in library path
3180*2e9d4914SAndroid Build Coastguard Worker# which responds to the $file_magic_cmd with a given extended regex.
3181*2e9d4914SAndroid Build Coastguard Worker# If you have `file' or equivalent on your system and you're not sure
3182*2e9d4914SAndroid Build Coastguard Worker# whether `pass_all' will *always* work, you probably want this one.
3183*2e9d4914SAndroid Build Coastguard Worker
3184*2e9d4914SAndroid Build Coastguard Workercase $host_os in
3185*2e9d4914SAndroid Build Coastguard Workeraix[[4-9]]*)
3186*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3187*2e9d4914SAndroid Build Coastguard Worker  ;;
3188*2e9d4914SAndroid Build Coastguard Worker
3189*2e9d4914SAndroid Build Coastguard Workerbeos*)
3190*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3191*2e9d4914SAndroid Build Coastguard Worker  ;;
3192*2e9d4914SAndroid Build Coastguard Worker
3193*2e9d4914SAndroid Build Coastguard Workerbsdi[[45]]*)
3194*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3195*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='/usr/bin/file -L'
3196*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_test_file=/shlib/libc.so
3197*2e9d4914SAndroid Build Coastguard Worker  ;;
3198*2e9d4914SAndroid Build Coastguard Worker
3199*2e9d4914SAndroid Build Coastguard Workercygwin*)
3200*2e9d4914SAndroid Build Coastguard Worker  # func_win32_libid is a shell function defined in ltmain.sh
3201*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3202*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='func_win32_libid'
3203*2e9d4914SAndroid Build Coastguard Worker  ;;
3204*2e9d4914SAndroid Build Coastguard Worker
3205*2e9d4914SAndroid Build Coastguard Workermingw* | pw32*)
3206*2e9d4914SAndroid Build Coastguard Worker  # Base MSYS/MinGW do not provide the 'file' command needed by
3207*2e9d4914SAndroid Build Coastguard Worker  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3208*2e9d4914SAndroid Build Coastguard Worker  # unless we find 'file', for example because we are cross-compiling.
3209*2e9d4914SAndroid Build Coastguard Worker  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3210*2e9d4914SAndroid Build Coastguard Worker  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3211*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3212*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='func_win32_libid'
3213*2e9d4914SAndroid Build Coastguard Worker  else
3214*2e9d4914SAndroid Build Coastguard Worker    # Keep this pattern in sync with the one in func_win32_libid.
3215*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3216*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='$OBJDUMP -f'
3217*2e9d4914SAndroid Build Coastguard Worker  fi
3218*2e9d4914SAndroid Build Coastguard Worker  ;;
3219*2e9d4914SAndroid Build Coastguard Worker
3220*2e9d4914SAndroid Build Coastguard Workercegcc*)
3221*2e9d4914SAndroid Build Coastguard Worker  # use the weaker test based on 'objdump'. See mingw*.
3222*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3223*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd='$OBJDUMP -f'
3224*2e9d4914SAndroid Build Coastguard Worker  ;;
3225*2e9d4914SAndroid Build Coastguard Worker
3226*2e9d4914SAndroid Build Coastguard Workerdarwin* | rhapsody*)
3227*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3228*2e9d4914SAndroid Build Coastguard Worker  ;;
3229*2e9d4914SAndroid Build Coastguard Worker
3230*2e9d4914SAndroid Build Coastguard Workerfreebsd* | dragonfly*)
3231*2e9d4914SAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3232*2e9d4914SAndroid Build Coastguard Worker    case $host_cpu in
3233*2e9d4914SAndroid Build Coastguard Worker    i*86 )
3234*2e9d4914SAndroid Build Coastguard Worker      # Not sure whether the presence of OpenBSD here was a mistake.
3235*2e9d4914SAndroid Build Coastguard Worker      # Let's accept both of them until this is cleared up.
3236*2e9d4914SAndroid Build Coastguard Worker      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3237*2e9d4914SAndroid Build Coastguard Worker      lt_cv_file_magic_cmd=/usr/bin/file
3238*2e9d4914SAndroid Build Coastguard Worker      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3239*2e9d4914SAndroid Build Coastguard Worker      ;;
3240*2e9d4914SAndroid Build Coastguard Worker    esac
3241*2e9d4914SAndroid Build Coastguard Worker  else
3242*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3243*2e9d4914SAndroid Build Coastguard Worker  fi
3244*2e9d4914SAndroid Build Coastguard Worker  ;;
3245*2e9d4914SAndroid Build Coastguard Worker
3246*2e9d4914SAndroid Build Coastguard Workergnu*)
3247*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3248*2e9d4914SAndroid Build Coastguard Worker  ;;
3249*2e9d4914SAndroid Build Coastguard Worker
3250*2e9d4914SAndroid Build Coastguard Workerhaiku*)
3251*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3252*2e9d4914SAndroid Build Coastguard Worker  ;;
3253*2e9d4914SAndroid Build Coastguard Worker
3254*2e9d4914SAndroid Build Coastguard Workerhpux10.20* | hpux11*)
3255*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd=/usr/bin/file
3256*2e9d4914SAndroid Build Coastguard Worker  case $host_cpu in
3257*2e9d4914SAndroid Build Coastguard Worker  ia64*)
3258*2e9d4914SAndroid 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'
3259*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3260*2e9d4914SAndroid Build Coastguard Worker    ;;
3261*2e9d4914SAndroid Build Coastguard Worker  hppa*64*)
3262*2e9d4914SAndroid 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]']
3263*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3264*2e9d4914SAndroid Build Coastguard Worker    ;;
3265*2e9d4914SAndroid Build Coastguard Worker  *)
3266*2e9d4914SAndroid 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'
3267*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3268*2e9d4914SAndroid Build Coastguard Worker    ;;
3269*2e9d4914SAndroid Build Coastguard Worker  esac
3270*2e9d4914SAndroid Build Coastguard Worker  ;;
3271*2e9d4914SAndroid Build Coastguard Worker
3272*2e9d4914SAndroid Build Coastguard Workerinterix[[3-9]]*)
3273*2e9d4914SAndroid Build Coastguard Worker  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3274*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3275*2e9d4914SAndroid Build Coastguard Worker  ;;
3276*2e9d4914SAndroid Build Coastguard Worker
3277*2e9d4914SAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*)
3278*2e9d4914SAndroid Build Coastguard Worker  case $LD in
3279*2e9d4914SAndroid Build Coastguard Worker  *-32|*"-32 ") libmagic=32-bit;;
3280*2e9d4914SAndroid Build Coastguard Worker  *-n32|*"-n32 ") libmagic=N32;;
3281*2e9d4914SAndroid Build Coastguard Worker  *-64|*"-64 ") libmagic=64-bit;;
3282*2e9d4914SAndroid Build Coastguard Worker  *) libmagic=never-match;;
3283*2e9d4914SAndroid Build Coastguard Worker  esac
3284*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3285*2e9d4914SAndroid Build Coastguard Worker  ;;
3286*2e9d4914SAndroid Build Coastguard Worker
3287*2e9d4914SAndroid Build Coastguard Worker# This must be glibc/ELF.
3288*2e9d4914SAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu)
3289*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3290*2e9d4914SAndroid Build Coastguard Worker  ;;
3291*2e9d4914SAndroid Build Coastguard Worker
3292*2e9d4914SAndroid Build Coastguard Workernetbsd*)
3293*2e9d4914SAndroid Build Coastguard Worker  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3294*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3295*2e9d4914SAndroid Build Coastguard Worker  else
3296*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3297*2e9d4914SAndroid Build Coastguard Worker  fi
3298*2e9d4914SAndroid Build Coastguard Worker  ;;
3299*2e9d4914SAndroid Build Coastguard Worker
3300*2e9d4914SAndroid Build Coastguard Workernewos6*)
3301*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3302*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_cmd=/usr/bin/file
3303*2e9d4914SAndroid Build Coastguard Worker  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3304*2e9d4914SAndroid Build Coastguard Worker  ;;
3305*2e9d4914SAndroid Build Coastguard Worker
3306*2e9d4914SAndroid Build Coastguard Worker*nto* | *qnx*)
3307*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3308*2e9d4914SAndroid Build Coastguard Worker  ;;
3309*2e9d4914SAndroid Build Coastguard Worker
3310*2e9d4914SAndroid Build Coastguard Workeropenbsd*)
3311*2e9d4914SAndroid Build Coastguard Worker  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3312*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3313*2e9d4914SAndroid Build Coastguard Worker  else
3314*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3315*2e9d4914SAndroid Build Coastguard Worker  fi
3316*2e9d4914SAndroid Build Coastguard Worker  ;;
3317*2e9d4914SAndroid Build Coastguard Worker
3318*2e9d4914SAndroid Build Coastguard Workerosf3* | osf4* | osf5*)
3319*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3320*2e9d4914SAndroid Build Coastguard Worker  ;;
3321*2e9d4914SAndroid Build Coastguard Worker
3322*2e9d4914SAndroid Build Coastguard Workerrdos*)
3323*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3324*2e9d4914SAndroid Build Coastguard Worker  ;;
3325*2e9d4914SAndroid Build Coastguard Worker
3326*2e9d4914SAndroid Build Coastguard Workersolaris*)
3327*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3328*2e9d4914SAndroid Build Coastguard Worker  ;;
3329*2e9d4914SAndroid Build Coastguard Worker
3330*2e9d4914SAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3331*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3332*2e9d4914SAndroid Build Coastguard Worker  ;;
3333*2e9d4914SAndroid Build Coastguard Worker
3334*2e9d4914SAndroid Build Coastguard Workersysv4 | sysv4.3*)
3335*2e9d4914SAndroid Build Coastguard Worker  case $host_vendor in
3336*2e9d4914SAndroid Build Coastguard Worker  motorola)
3337*2e9d4914SAndroid 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]]'
3338*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3339*2e9d4914SAndroid Build Coastguard Worker    ;;
3340*2e9d4914SAndroid Build Coastguard Worker  ncr)
3341*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3342*2e9d4914SAndroid Build Coastguard Worker    ;;
3343*2e9d4914SAndroid Build Coastguard Worker  sequent)
3344*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='/bin/file'
3345*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3346*2e9d4914SAndroid Build Coastguard Worker    ;;
3347*2e9d4914SAndroid Build Coastguard Worker  sni)
3348*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_cmd='/bin/file'
3349*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3350*2e9d4914SAndroid Build Coastguard Worker    lt_cv_file_magic_test_file=/lib/libc.so
3351*2e9d4914SAndroid Build Coastguard Worker    ;;
3352*2e9d4914SAndroid Build Coastguard Worker  siemens)
3353*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3354*2e9d4914SAndroid Build Coastguard Worker    ;;
3355*2e9d4914SAndroid Build Coastguard Worker  pc)
3356*2e9d4914SAndroid Build Coastguard Worker    lt_cv_deplibs_check_method=pass_all
3357*2e9d4914SAndroid Build Coastguard Worker    ;;
3358*2e9d4914SAndroid Build Coastguard Worker  esac
3359*2e9d4914SAndroid Build Coastguard Worker  ;;
3360*2e9d4914SAndroid Build Coastguard Worker
3361*2e9d4914SAndroid Build Coastguard Workertpf*)
3362*2e9d4914SAndroid Build Coastguard Worker  lt_cv_deplibs_check_method=pass_all
3363*2e9d4914SAndroid Build Coastguard Worker  ;;
3364*2e9d4914SAndroid Build Coastguard Workeresac
3365*2e9d4914SAndroid Build Coastguard Worker])
3366*2e9d4914SAndroid Build Coastguard Worker
3367*2e9d4914SAndroid Build Coastguard Workerfile_magic_glob=
3368*2e9d4914SAndroid Build Coastguard Workerwant_nocaseglob=no
3369*2e9d4914SAndroid Build Coastguard Workerif test "$build" = "$host"; then
3370*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
3371*2e9d4914SAndroid Build Coastguard Worker  mingw* | pw32*)
3372*2e9d4914SAndroid Build Coastguard Worker    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3373*2e9d4914SAndroid Build Coastguard Worker      want_nocaseglob=yes
3374*2e9d4914SAndroid Build Coastguard Worker    else
3375*2e9d4914SAndroid Build Coastguard Worker      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3376*2e9d4914SAndroid Build Coastguard Worker    fi
3377*2e9d4914SAndroid Build Coastguard Worker    ;;
3378*2e9d4914SAndroid Build Coastguard Worker  esac
3379*2e9d4914SAndroid Build Coastguard Workerfi
3380*2e9d4914SAndroid Build Coastguard Worker
3381*2e9d4914SAndroid Build Coastguard Workerfile_magic_cmd=$lt_cv_file_magic_cmd
3382*2e9d4914SAndroid Build Coastguard Workerdeplibs_check_method=$lt_cv_deplibs_check_method
3383*2e9d4914SAndroid Build Coastguard Workertest -z "$deplibs_check_method" && deplibs_check_method=unknown
3384*2e9d4914SAndroid Build Coastguard Worker
3385*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [deplibs_check_method], [1],
3386*2e9d4914SAndroid Build Coastguard Worker    [Method to check whether dependent libraries are shared objects])
3387*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [file_magic_cmd], [1],
3388*2e9d4914SAndroid Build Coastguard Worker    [Command to use when deplibs_check_method = "file_magic"])
3389*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [file_magic_glob], [1],
3390*2e9d4914SAndroid Build Coastguard Worker    [How to find potential files when deplibs_check_method = "file_magic"])
3391*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [want_nocaseglob], [1],
3392*2e9d4914SAndroid Build Coastguard Worker    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3393*2e9d4914SAndroid Build Coastguard Worker])# _LT_CHECK_MAGIC_METHOD
3394*2e9d4914SAndroid Build Coastguard Worker
3395*2e9d4914SAndroid Build Coastguard Worker
3396*2e9d4914SAndroid Build Coastguard Worker# LT_PATH_NM
3397*2e9d4914SAndroid Build Coastguard Worker# ----------
3398*2e9d4914SAndroid Build Coastguard Worker# find the pathname to a BSD- or MS-compatible name lister
3399*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_NM],
3400*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl
3401*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3402*2e9d4914SAndroid Build Coastguard Worker[if test -n "$NM"; then
3403*2e9d4914SAndroid Build Coastguard Worker  # Let the user override the test.
3404*2e9d4914SAndroid Build Coastguard Worker  lt_cv_path_NM="$NM"
3405*2e9d4914SAndroid Build Coastguard Workerelse
3406*2e9d4914SAndroid Build Coastguard Worker  lt_nm_to_check="${ac_tool_prefix}nm"
3407*2e9d4914SAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3408*2e9d4914SAndroid Build Coastguard Worker    lt_nm_to_check="$lt_nm_to_check nm"
3409*2e9d4914SAndroid Build Coastguard Worker  fi
3410*2e9d4914SAndroid Build Coastguard Worker  for lt_tmp_nm in $lt_nm_to_check; do
3411*2e9d4914SAndroid Build Coastguard Worker    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3412*2e9d4914SAndroid Build Coastguard Worker    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3413*2e9d4914SAndroid Build Coastguard Worker      IFS="$lt_save_ifs"
3414*2e9d4914SAndroid Build Coastguard Worker      test -z "$ac_dir" && ac_dir=.
3415*2e9d4914SAndroid Build Coastguard Worker      tmp_nm="$ac_dir/$lt_tmp_nm"
3416*2e9d4914SAndroid Build Coastguard Worker      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3417*2e9d4914SAndroid Build Coastguard Worker	# Check to see if the nm accepts a BSD-compat flag.
3418*2e9d4914SAndroid Build Coastguard Worker	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3419*2e9d4914SAndroid Build Coastguard Worker	#   nm: unknown option "B" ignored
3420*2e9d4914SAndroid Build Coastguard Worker	# Tru64's nm complains that /dev/null is an invalid object file
3421*2e9d4914SAndroid Build Coastguard Worker	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3422*2e9d4914SAndroid Build Coastguard Worker	*/dev/null* | *'Invalid file or object type'*)
3423*2e9d4914SAndroid Build Coastguard Worker	  lt_cv_path_NM="$tmp_nm -B"
3424*2e9d4914SAndroid Build Coastguard Worker	  break
3425*2e9d4914SAndroid Build Coastguard Worker	  ;;
3426*2e9d4914SAndroid Build Coastguard Worker	*)
3427*2e9d4914SAndroid Build Coastguard Worker	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3428*2e9d4914SAndroid Build Coastguard Worker	  */dev/null*)
3429*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_path_NM="$tmp_nm -p"
3430*2e9d4914SAndroid Build Coastguard Worker	    break
3431*2e9d4914SAndroid Build Coastguard Worker	    ;;
3432*2e9d4914SAndroid Build Coastguard Worker	  *)
3433*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3434*2e9d4914SAndroid Build Coastguard Worker	    continue # so that we can try to find one that supports BSD flags
3435*2e9d4914SAndroid Build Coastguard Worker	    ;;
3436*2e9d4914SAndroid Build Coastguard Worker	  esac
3437*2e9d4914SAndroid Build Coastguard Worker	  ;;
3438*2e9d4914SAndroid Build Coastguard Worker	esac
3439*2e9d4914SAndroid Build Coastguard Worker      fi
3440*2e9d4914SAndroid Build Coastguard Worker    done
3441*2e9d4914SAndroid Build Coastguard Worker    IFS="$lt_save_ifs"
3442*2e9d4914SAndroid Build Coastguard Worker  done
3443*2e9d4914SAndroid Build Coastguard Worker  : ${lt_cv_path_NM=no}
3444*2e9d4914SAndroid Build Coastguard Workerfi])
3445*2e9d4914SAndroid Build Coastguard Workerif test "$lt_cv_path_NM" != "no"; then
3446*2e9d4914SAndroid Build Coastguard Worker  NM="$lt_cv_path_NM"
3447*2e9d4914SAndroid Build Coastguard Workerelse
3448*2e9d4914SAndroid Build Coastguard Worker  # Didn't find any BSD compatible name lister, look for dumpbin.
3449*2e9d4914SAndroid Build Coastguard Worker  if test -n "$DUMPBIN"; then :
3450*2e9d4914SAndroid Build Coastguard Worker    # Let the user override the test.
3451*2e9d4914SAndroid Build Coastguard Worker  else
3452*2e9d4914SAndroid Build Coastguard Worker    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3453*2e9d4914SAndroid Build Coastguard Worker    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3454*2e9d4914SAndroid Build Coastguard Worker    *COFF*)
3455*2e9d4914SAndroid Build Coastguard Worker      DUMPBIN="$DUMPBIN -symbols"
3456*2e9d4914SAndroid Build Coastguard Worker      ;;
3457*2e9d4914SAndroid Build Coastguard Worker    *)
3458*2e9d4914SAndroid Build Coastguard Worker      DUMPBIN=:
3459*2e9d4914SAndroid Build Coastguard Worker      ;;
3460*2e9d4914SAndroid Build Coastguard Worker    esac
3461*2e9d4914SAndroid Build Coastguard Worker  fi
3462*2e9d4914SAndroid Build Coastguard Worker  AC_SUBST([DUMPBIN])
3463*2e9d4914SAndroid Build Coastguard Worker  if test "$DUMPBIN" != ":"; then
3464*2e9d4914SAndroid Build Coastguard Worker    NM="$DUMPBIN"
3465*2e9d4914SAndroid Build Coastguard Worker  fi
3466*2e9d4914SAndroid Build Coastguard Workerfi
3467*2e9d4914SAndroid Build Coastguard Workertest -z "$NM" && NM=nm
3468*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([NM])
3469*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3470*2e9d4914SAndroid Build Coastguard Worker
3471*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3472*2e9d4914SAndroid Build Coastguard Worker  [lt_cv_nm_interface="BSD nm"
3473*2e9d4914SAndroid Build Coastguard Worker  echo "int some_variable = 0;" > conftest.$ac_ext
3474*2e9d4914SAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3475*2e9d4914SAndroid Build Coastguard Worker  (eval "$ac_compile" 2>conftest.err)
3476*2e9d4914SAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3477*2e9d4914SAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3478*2e9d4914SAndroid Build Coastguard Worker  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3479*2e9d4914SAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3480*2e9d4914SAndroid Build Coastguard Worker  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3481*2e9d4914SAndroid Build Coastguard Worker  cat conftest.out >&AS_MESSAGE_LOG_FD
3482*2e9d4914SAndroid Build Coastguard Worker  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3483*2e9d4914SAndroid Build Coastguard Worker    lt_cv_nm_interface="MS dumpbin"
3484*2e9d4914SAndroid Build Coastguard Worker  fi
3485*2e9d4914SAndroid Build Coastguard Worker  rm -f conftest*])
3486*2e9d4914SAndroid Build Coastguard Worker])# LT_PATH_NM
3487*2e9d4914SAndroid Build Coastguard Worker
3488*2e9d4914SAndroid Build Coastguard Worker# Old names:
3489*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3490*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3491*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3492*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_NM], [])
3493*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_NM], [])
3494*2e9d4914SAndroid Build Coastguard Worker
3495*2e9d4914SAndroid Build Coastguard Worker# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3496*2e9d4914SAndroid Build Coastguard Worker# --------------------------------
3497*2e9d4914SAndroid Build Coastguard Worker# how to determine the name of the shared library
3498*2e9d4914SAndroid Build Coastguard Worker# associated with a specific link library.
3499*2e9d4914SAndroid Build Coastguard Worker#  -- PORTME fill in with the dynamic library characteristics
3500*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3501*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])
3502*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])
3503*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_DLLTOOL])
3504*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to associate runtime and link libraries],
3505*2e9d4914SAndroid Build Coastguard Workerlt_cv_sharedlib_from_linklib_cmd,
3506*2e9d4914SAndroid Build Coastguard Worker[lt_cv_sharedlib_from_linklib_cmd='unknown'
3507*2e9d4914SAndroid Build Coastguard Worker
3508*2e9d4914SAndroid Build Coastguard Workercase $host_os in
3509*2e9d4914SAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
3510*2e9d4914SAndroid Build Coastguard Worker  # two different shell functions defined in ltmain.sh
3511*2e9d4914SAndroid Build Coastguard Worker  # decide which to use based on capabilities of $DLLTOOL
3512*2e9d4914SAndroid Build Coastguard Worker  case `$DLLTOOL --help 2>&1` in
3513*2e9d4914SAndroid Build Coastguard Worker  *--identify-strict*)
3514*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3515*2e9d4914SAndroid Build Coastguard Worker    ;;
3516*2e9d4914SAndroid Build Coastguard Worker  *)
3517*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3518*2e9d4914SAndroid Build Coastguard Worker    ;;
3519*2e9d4914SAndroid Build Coastguard Worker  esac
3520*2e9d4914SAndroid Build Coastguard Worker  ;;
3521*2e9d4914SAndroid Build Coastguard Worker*)
3522*2e9d4914SAndroid Build Coastguard Worker  # fallback: assume linklib IS sharedlib
3523*2e9d4914SAndroid Build Coastguard Worker  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3524*2e9d4914SAndroid Build Coastguard Worker  ;;
3525*2e9d4914SAndroid Build Coastguard Workeresac
3526*2e9d4914SAndroid Build Coastguard Worker])
3527*2e9d4914SAndroid Build Coastguard Workersharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3528*2e9d4914SAndroid Build Coastguard Workertest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3529*2e9d4914SAndroid Build Coastguard Worker
3530*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3531*2e9d4914SAndroid Build Coastguard Worker    [Command to associate shared and link libraries])
3532*2e9d4914SAndroid Build Coastguard Worker])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3533*2e9d4914SAndroid Build Coastguard Worker
3534*2e9d4914SAndroid Build Coastguard Worker
3535*2e9d4914SAndroid Build Coastguard Worker# _LT_PATH_MANIFEST_TOOL
3536*2e9d4914SAndroid Build Coastguard Worker# ----------------------
3537*2e9d4914SAndroid Build Coastguard Worker# locate the manifest tool
3538*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PATH_MANIFEST_TOOL],
3539*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3540*2e9d4914SAndroid Build Coastguard Workertest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3541*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3542*2e9d4914SAndroid Build Coastguard Worker  [lt_cv_path_mainfest_tool=no
3543*2e9d4914SAndroid Build Coastguard Worker  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3544*2e9d4914SAndroid Build Coastguard Worker  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3545*2e9d4914SAndroid Build Coastguard Worker  cat conftest.err >&AS_MESSAGE_LOG_FD
3546*2e9d4914SAndroid Build Coastguard Worker  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3547*2e9d4914SAndroid Build Coastguard Worker    lt_cv_path_mainfest_tool=yes
3548*2e9d4914SAndroid Build Coastguard Worker  fi
3549*2e9d4914SAndroid Build Coastguard Worker  rm -f conftest*])
3550*2e9d4914SAndroid Build Coastguard Workerif test "x$lt_cv_path_mainfest_tool" != xyes; then
3551*2e9d4914SAndroid Build Coastguard Worker  MANIFEST_TOOL=:
3552*2e9d4914SAndroid Build Coastguard Workerfi
3553*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3554*2e9d4914SAndroid Build Coastguard Worker])# _LT_PATH_MANIFEST_TOOL
3555*2e9d4914SAndroid Build Coastguard Worker
3556*2e9d4914SAndroid Build Coastguard Worker
3557*2e9d4914SAndroid Build Coastguard Worker# LT_LIB_M
3558*2e9d4914SAndroid Build Coastguard Worker# --------
3559*2e9d4914SAndroid Build Coastguard Worker# check for math library
3560*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_LIB_M],
3561*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3562*2e9d4914SAndroid Build Coastguard WorkerLIBM=
3563*2e9d4914SAndroid Build Coastguard Workercase $host in
3564*2e9d4914SAndroid Build Coastguard Worker*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3565*2e9d4914SAndroid Build Coastguard Worker  # These system don't have libm, or don't need it
3566*2e9d4914SAndroid Build Coastguard Worker  ;;
3567*2e9d4914SAndroid Build Coastguard Worker*-ncr-sysv4.3*)
3568*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3569*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3570*2e9d4914SAndroid Build Coastguard Worker  ;;
3571*2e9d4914SAndroid Build Coastguard Worker*)
3572*2e9d4914SAndroid Build Coastguard Worker  AC_CHECK_LIB(m, cos, LIBM="-lm")
3573*2e9d4914SAndroid Build Coastguard Worker  ;;
3574*2e9d4914SAndroid Build Coastguard Workeresac
3575*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([LIBM])
3576*2e9d4914SAndroid Build Coastguard Worker])# LT_LIB_M
3577*2e9d4914SAndroid Build Coastguard Worker
3578*2e9d4914SAndroid Build Coastguard Worker# Old name:
3579*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3580*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
3581*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([AC_CHECK_LIBM], [])
3582*2e9d4914SAndroid Build Coastguard Worker
3583*2e9d4914SAndroid Build Coastguard Worker
3584*2e9d4914SAndroid Build Coastguard Worker# _LT_COMPILER_NO_RTTI([TAGNAME])
3585*2e9d4914SAndroid Build Coastguard Worker# -------------------------------
3586*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_NO_RTTI],
3587*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl
3588*2e9d4914SAndroid Build Coastguard Worker
3589*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3590*2e9d4914SAndroid Build Coastguard Worker
3591*2e9d4914SAndroid Build Coastguard Workerif test "$GCC" = yes; then
3592*2e9d4914SAndroid Build Coastguard Worker  case $cc_basename in
3593*2e9d4914SAndroid Build Coastguard Worker  nvcc*)
3594*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3595*2e9d4914SAndroid Build Coastguard Worker  *)
3596*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3597*2e9d4914SAndroid Build Coastguard Worker  esac
3598*2e9d4914SAndroid Build Coastguard Worker
3599*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3600*2e9d4914SAndroid Build Coastguard Worker    lt_cv_prog_compiler_rtti_exceptions,
3601*2e9d4914SAndroid Build Coastguard Worker    [-fno-rtti -fno-exceptions], [],
3602*2e9d4914SAndroid 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"])
3603*2e9d4914SAndroid Build Coastguard Workerfi
3604*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3605*2e9d4914SAndroid Build Coastguard Worker	[Compiler flag to turn off builtin functions])
3606*2e9d4914SAndroid Build Coastguard Worker])# _LT_COMPILER_NO_RTTI
3607*2e9d4914SAndroid Build Coastguard Worker
3608*2e9d4914SAndroid Build Coastguard Worker
3609*2e9d4914SAndroid Build Coastguard Worker# _LT_CMD_GLOBAL_SYMBOLS
3610*2e9d4914SAndroid Build Coastguard Worker# ----------------------
3611*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3612*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3613*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl
3614*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_AWK])dnl
3615*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
3616*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl
3617*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
3618*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
3619*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
3620*2e9d4914SAndroid Build Coastguard Worker
3621*2e9d4914SAndroid Build Coastguard Worker# Check for command to grab the raw symbol name followed by C symbol from nm.
3622*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3623*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3624*2e9d4914SAndroid Build Coastguard Worker[
3625*2e9d4914SAndroid Build Coastguard Worker# These are sane defaults that work on at least a few old systems.
3626*2e9d4914SAndroid Build Coastguard Worker# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3627*2e9d4914SAndroid Build Coastguard Worker
3628*2e9d4914SAndroid Build Coastguard Worker# Character class describing NM global symbol codes.
3629*2e9d4914SAndroid Build Coastguard Workersymcode='[[BCDEGRST]]'
3630*2e9d4914SAndroid Build Coastguard Worker
3631*2e9d4914SAndroid Build Coastguard Worker# Regexp to match symbols that can be accessed directly from C.
3632*2e9d4914SAndroid Build Coastguard Workersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3633*2e9d4914SAndroid Build Coastguard Worker
3634*2e9d4914SAndroid Build Coastguard Worker# Define system-specific variables.
3635*2e9d4914SAndroid Build Coastguard Workercase $host_os in
3636*2e9d4914SAndroid Build Coastguard Workeraix*)
3637*2e9d4914SAndroid Build Coastguard Worker  symcode='[[BCDT]]'
3638*2e9d4914SAndroid Build Coastguard Worker  ;;
3639*2e9d4914SAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*)
3640*2e9d4914SAndroid Build Coastguard Worker  symcode='[[ABCDGISTW]]'
3641*2e9d4914SAndroid Build Coastguard Worker  ;;
3642*2e9d4914SAndroid Build Coastguard Workerhpux*)
3643*2e9d4914SAndroid Build Coastguard Worker  if test "$host_cpu" = ia64; then
3644*2e9d4914SAndroid Build Coastguard Worker    symcode='[[ABCDEGRST]]'
3645*2e9d4914SAndroid Build Coastguard Worker  fi
3646*2e9d4914SAndroid Build Coastguard Worker  ;;
3647*2e9d4914SAndroid Build Coastguard Workeririx* | nonstopux*)
3648*2e9d4914SAndroid Build Coastguard Worker  symcode='[[BCDEGRST]]'
3649*2e9d4914SAndroid Build Coastguard Worker  ;;
3650*2e9d4914SAndroid Build Coastguard Workerosf*)
3651*2e9d4914SAndroid Build Coastguard Worker  symcode='[[BCDEGQRST]]'
3652*2e9d4914SAndroid Build Coastguard Worker  ;;
3653*2e9d4914SAndroid Build Coastguard Workersolaris*)
3654*2e9d4914SAndroid Build Coastguard Worker  symcode='[[BDRT]]'
3655*2e9d4914SAndroid Build Coastguard Worker  ;;
3656*2e9d4914SAndroid Build Coastguard Workersco3.2v5*)
3657*2e9d4914SAndroid Build Coastguard Worker  symcode='[[DT]]'
3658*2e9d4914SAndroid Build Coastguard Worker  ;;
3659*2e9d4914SAndroid Build Coastguard Workersysv4.2uw2*)
3660*2e9d4914SAndroid Build Coastguard Worker  symcode='[[DT]]'
3661*2e9d4914SAndroid Build Coastguard Worker  ;;
3662*2e9d4914SAndroid Build Coastguard Workersysv5* | sco5v6* | unixware* | OpenUNIX*)
3663*2e9d4914SAndroid Build Coastguard Worker  symcode='[[ABDT]]'
3664*2e9d4914SAndroid Build Coastguard Worker  ;;
3665*2e9d4914SAndroid Build Coastguard Workersysv4)
3666*2e9d4914SAndroid Build Coastguard Worker  symcode='[[DFNSTU]]'
3667*2e9d4914SAndroid Build Coastguard Worker  ;;
3668*2e9d4914SAndroid Build Coastguard Workeresac
3669*2e9d4914SAndroid Build Coastguard Worker
3670*2e9d4914SAndroid Build Coastguard Worker# If we're using GNU nm, then use its standard symbol codes.
3671*2e9d4914SAndroid Build Coastguard Workercase `$NM -V 2>&1` in
3672*2e9d4914SAndroid Build Coastguard Worker*GNU* | *'with BFD'*)
3673*2e9d4914SAndroid Build Coastguard Worker  symcode='[[ABCDGIRSTW]]' ;;
3674*2e9d4914SAndroid Build Coastguard Workeresac
3675*2e9d4914SAndroid Build Coastguard Worker
3676*2e9d4914SAndroid Build Coastguard Worker# Transform an extracted symbol line into a proper C declaration.
3677*2e9d4914SAndroid Build Coastguard Worker# Some systems (esp. on ia64) link data and code symbols differently,
3678*2e9d4914SAndroid Build Coastguard Worker# so use this general approach.
3679*2e9d4914SAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3680*2e9d4914SAndroid Build Coastguard Worker
3681*2e9d4914SAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name and symbol address
3682*2e9d4914SAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3683*2e9d4914SAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
3684*2e9d4914SAndroid Build Coastguard Worker
3685*2e9d4914SAndroid Build Coastguard Worker# Handle CRLF in mingw tool chain
3686*2e9d4914SAndroid Build Coastguard Workeropt_cr=
3687*2e9d4914SAndroid Build Coastguard Workercase $build_os in
3688*2e9d4914SAndroid Build Coastguard Workermingw*)
3689*2e9d4914SAndroid Build Coastguard Worker  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3690*2e9d4914SAndroid Build Coastguard Worker  ;;
3691*2e9d4914SAndroid Build Coastguard Workeresac
3692*2e9d4914SAndroid Build Coastguard Worker
3693*2e9d4914SAndroid Build Coastguard Worker# Try without a prefix underscore, then with it.
3694*2e9d4914SAndroid Build Coastguard Workerfor ac_symprfx in "" "_"; do
3695*2e9d4914SAndroid Build Coastguard Worker
3696*2e9d4914SAndroid Build Coastguard Worker  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3697*2e9d4914SAndroid Build Coastguard Worker  symxfrm="\\1 $ac_symprfx\\2 \\2"
3698*2e9d4914SAndroid Build Coastguard Worker
3699*2e9d4914SAndroid Build Coastguard Worker  # Write the raw and C identifiers.
3700*2e9d4914SAndroid Build Coastguard Worker  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3701*2e9d4914SAndroid Build Coastguard Worker    # Fake it for dumpbin and say T for any non-static function
3702*2e9d4914SAndroid Build Coastguard Worker    # and D for any global variable.
3703*2e9d4914SAndroid Build Coastguard Worker    # Also find C++ and __fastcall symbols from MSVC++,
3704*2e9d4914SAndroid Build Coastguard Worker    # which start with @ or ?.
3705*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3706*2e9d4914SAndroid Build Coastguard Worker"     {last_section=section; section=\$ 3};"\
3707*2e9d4914SAndroid Build Coastguard Worker"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3708*2e9d4914SAndroid Build Coastguard Worker"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3709*2e9d4914SAndroid Build Coastguard Worker"     \$ 0!~/External *\|/{next};"\
3710*2e9d4914SAndroid Build Coastguard Worker"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3711*2e9d4914SAndroid Build Coastguard Worker"     {if(hide[section]) next};"\
3712*2e9d4914SAndroid Build Coastguard Worker"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3713*2e9d4914SAndroid Build Coastguard Worker"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3714*2e9d4914SAndroid Build Coastguard Worker"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3715*2e9d4914SAndroid Build Coastguard Worker"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3716*2e9d4914SAndroid Build Coastguard Worker"     ' prfx=^$ac_symprfx]"
3717*2e9d4914SAndroid Build Coastguard Worker  else
3718*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3719*2e9d4914SAndroid Build Coastguard Worker  fi
3720*2e9d4914SAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3721*2e9d4914SAndroid Build Coastguard Worker
3722*2e9d4914SAndroid Build Coastguard Worker  # Check to see that the pipe works correctly.
3723*2e9d4914SAndroid Build Coastguard Worker  pipe_works=no
3724*2e9d4914SAndroid Build Coastguard Worker
3725*2e9d4914SAndroid Build Coastguard Worker  rm -f conftest*
3726*2e9d4914SAndroid Build Coastguard Worker  cat > conftest.$ac_ext <<_LT_EOF
3727*2e9d4914SAndroid Build Coastguard Worker#ifdef __cplusplus
3728*2e9d4914SAndroid Build Coastguard Workerextern "C" {
3729*2e9d4914SAndroid Build Coastguard Worker#endif
3730*2e9d4914SAndroid Build Coastguard Workerchar nm_test_var;
3731*2e9d4914SAndroid Build Coastguard Workervoid nm_test_func(void);
3732*2e9d4914SAndroid Build Coastguard Workervoid nm_test_func(void){}
3733*2e9d4914SAndroid Build Coastguard Worker#ifdef __cplusplus
3734*2e9d4914SAndroid Build Coastguard Worker}
3735*2e9d4914SAndroid Build Coastguard Worker#endif
3736*2e9d4914SAndroid Build Coastguard Workerint main(){nm_test_var='a';nm_test_func();return(0);}
3737*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
3738*2e9d4914SAndroid Build Coastguard Worker
3739*2e9d4914SAndroid Build Coastguard Worker  if AC_TRY_EVAL(ac_compile); then
3740*2e9d4914SAndroid Build Coastguard Worker    # Now try to grab the symbols.
3741*2e9d4914SAndroid Build Coastguard Worker    nlist=conftest.nm
3742*2e9d4914SAndroid Build Coastguard Worker    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3743*2e9d4914SAndroid Build Coastguard Worker      # Try sorting and uniquifying the output.
3744*2e9d4914SAndroid Build Coastguard Worker      if sort "$nlist" | uniq > "$nlist"T; then
3745*2e9d4914SAndroid Build Coastguard Worker	mv -f "$nlist"T "$nlist"
3746*2e9d4914SAndroid Build Coastguard Worker      else
3747*2e9d4914SAndroid Build Coastguard Worker	rm -f "$nlist"T
3748*2e9d4914SAndroid Build Coastguard Worker      fi
3749*2e9d4914SAndroid Build Coastguard Worker
3750*2e9d4914SAndroid Build Coastguard Worker      # Make sure that we snagged all the symbols we need.
3751*2e9d4914SAndroid Build Coastguard Worker      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3752*2e9d4914SAndroid Build Coastguard Worker	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3753*2e9d4914SAndroid Build Coastguard Worker	  cat <<_LT_EOF > conftest.$ac_ext
3754*2e9d4914SAndroid Build Coastguard Worker/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
3755*2e9d4914SAndroid Build Coastguard Worker#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3756*2e9d4914SAndroid Build Coastguard Worker/* DATA imports from DLLs on WIN32 con't be const, because runtime
3757*2e9d4914SAndroid Build Coastguard Worker   relocations are performed -- see ld's documentation on pseudo-relocs.  */
3758*2e9d4914SAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST
3759*2e9d4914SAndroid Build Coastguard Worker#elif defined(__osf__)
3760*2e9d4914SAndroid Build Coastguard Worker/* This system does not cope well with relocations in const data.  */
3761*2e9d4914SAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST
3762*2e9d4914SAndroid Build Coastguard Worker#else
3763*2e9d4914SAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST const
3764*2e9d4914SAndroid Build Coastguard Worker#endif
3765*2e9d4914SAndroid Build Coastguard Worker
3766*2e9d4914SAndroid Build Coastguard Worker#ifdef __cplusplus
3767*2e9d4914SAndroid Build Coastguard Workerextern "C" {
3768*2e9d4914SAndroid Build Coastguard Worker#endif
3769*2e9d4914SAndroid Build Coastguard Worker
3770*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
3771*2e9d4914SAndroid Build Coastguard Worker	  # Now generate the symbol file.
3772*2e9d4914SAndroid Build Coastguard Worker	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3773*2e9d4914SAndroid Build Coastguard Worker
3774*2e9d4914SAndroid Build Coastguard Worker	  cat <<_LT_EOF >> conftest.$ac_ext
3775*2e9d4914SAndroid Build Coastguard Worker
3776*2e9d4914SAndroid Build Coastguard Worker/* The mapping between symbol names and symbols.  */
3777*2e9d4914SAndroid Build Coastguard WorkerLT@&t@_DLSYM_CONST struct {
3778*2e9d4914SAndroid Build Coastguard Worker  const char *name;
3779*2e9d4914SAndroid Build Coastguard Worker  void       *address;
3780*2e9d4914SAndroid Build Coastguard Worker}
3781*2e9d4914SAndroid Build Coastguard Workerlt__PROGRAM__LTX_preloaded_symbols[[]] =
3782*2e9d4914SAndroid Build Coastguard Worker{
3783*2e9d4914SAndroid Build Coastguard Worker  { "@PROGRAM@", (void *) 0 },
3784*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
3785*2e9d4914SAndroid Build Coastguard Worker	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3786*2e9d4914SAndroid Build Coastguard Worker	  cat <<\_LT_EOF >> conftest.$ac_ext
3787*2e9d4914SAndroid Build Coastguard Worker  {0, (void *) 0}
3788*2e9d4914SAndroid Build Coastguard Worker};
3789*2e9d4914SAndroid Build Coastguard Worker
3790*2e9d4914SAndroid Build Coastguard Worker/* This works around a problem in FreeBSD linker */
3791*2e9d4914SAndroid Build Coastguard Worker#ifdef FREEBSD_WORKAROUND
3792*2e9d4914SAndroid Build Coastguard Workerstatic const void *lt_preloaded_setup() {
3793*2e9d4914SAndroid Build Coastguard Worker  return lt__PROGRAM__LTX_preloaded_symbols;
3794*2e9d4914SAndroid Build Coastguard Worker}
3795*2e9d4914SAndroid Build Coastguard Worker#endif
3796*2e9d4914SAndroid Build Coastguard Worker
3797*2e9d4914SAndroid Build Coastguard Worker#ifdef __cplusplus
3798*2e9d4914SAndroid Build Coastguard Worker}
3799*2e9d4914SAndroid Build Coastguard Worker#endif
3800*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
3801*2e9d4914SAndroid Build Coastguard Worker	  # Now try linking the two files.
3802*2e9d4914SAndroid Build Coastguard Worker	  mv conftest.$ac_objext conftstm.$ac_objext
3803*2e9d4914SAndroid Build Coastguard Worker	  lt_globsym_save_LIBS=$LIBS
3804*2e9d4914SAndroid Build Coastguard Worker	  lt_globsym_save_CFLAGS=$CFLAGS
3805*2e9d4914SAndroid Build Coastguard Worker	  LIBS="conftstm.$ac_objext"
3806*2e9d4914SAndroid Build Coastguard Worker	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3807*2e9d4914SAndroid Build Coastguard Worker	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3808*2e9d4914SAndroid Build Coastguard Worker	    pipe_works=yes
3809*2e9d4914SAndroid Build Coastguard Worker	  fi
3810*2e9d4914SAndroid Build Coastguard Worker	  LIBS=$lt_globsym_save_LIBS
3811*2e9d4914SAndroid Build Coastguard Worker	  CFLAGS=$lt_globsym_save_CFLAGS
3812*2e9d4914SAndroid Build Coastguard Worker	else
3813*2e9d4914SAndroid Build Coastguard Worker	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3814*2e9d4914SAndroid Build Coastguard Worker	fi
3815*2e9d4914SAndroid Build Coastguard Worker      else
3816*2e9d4914SAndroid Build Coastguard Worker	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3817*2e9d4914SAndroid Build Coastguard Worker      fi
3818*2e9d4914SAndroid Build Coastguard Worker    else
3819*2e9d4914SAndroid Build Coastguard Worker      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3820*2e9d4914SAndroid Build Coastguard Worker    fi
3821*2e9d4914SAndroid Build Coastguard Worker  else
3822*2e9d4914SAndroid Build Coastguard Worker    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3823*2e9d4914SAndroid Build Coastguard Worker    cat conftest.$ac_ext >&5
3824*2e9d4914SAndroid Build Coastguard Worker  fi
3825*2e9d4914SAndroid Build Coastguard Worker  rm -rf conftest* conftst*
3826*2e9d4914SAndroid Build Coastguard Worker
3827*2e9d4914SAndroid Build Coastguard Worker  # Do not use the global_symbol_pipe unless it works.
3828*2e9d4914SAndroid Build Coastguard Worker  if test "$pipe_works" = yes; then
3829*2e9d4914SAndroid Build Coastguard Worker    break
3830*2e9d4914SAndroid Build Coastguard Worker  else
3831*2e9d4914SAndroid Build Coastguard Worker    lt_cv_sys_global_symbol_pipe=
3832*2e9d4914SAndroid Build Coastguard Worker  fi
3833*2e9d4914SAndroid Build Coastguard Workerdone
3834*2e9d4914SAndroid Build Coastguard Worker])
3835*2e9d4914SAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe"; then
3836*2e9d4914SAndroid Build Coastguard Worker  lt_cv_sys_global_symbol_to_cdecl=
3837*2e9d4914SAndroid Build Coastguard Workerfi
3838*2e9d4914SAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3839*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT(failed)
3840*2e9d4914SAndroid Build Coastguard Workerelse
3841*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT(ok)
3842*2e9d4914SAndroid Build Coastguard Workerfi
3843*2e9d4914SAndroid Build Coastguard Worker
3844*2e9d4914SAndroid Build Coastguard Worker# Response file support.
3845*2e9d4914SAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3846*2e9d4914SAndroid Build Coastguard Worker  nm_file_list_spec='@'
3847*2e9d4914SAndroid Build Coastguard Workerelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3848*2e9d4914SAndroid Build Coastguard Worker  nm_file_list_spec='@'
3849*2e9d4914SAndroid Build Coastguard Workerfi
3850*2e9d4914SAndroid Build Coastguard Worker
3851*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3852*2e9d4914SAndroid Build Coastguard Worker    [Take the output of nm and produce a listing of raw symbols and C names])
3853*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3854*2e9d4914SAndroid Build Coastguard Worker    [Transform the output of nm in a proper C declaration])
3855*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address],
3856*2e9d4914SAndroid Build Coastguard Worker    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3857*2e9d4914SAndroid Build Coastguard Worker    [Transform the output of nm in a C name address pair])
3858*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3859*2e9d4914SAndroid Build Coastguard Worker    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3860*2e9d4914SAndroid Build Coastguard Worker    [Transform the output of nm in a C name address pair when lib prefix is needed])
3861*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [nm_file_list_spec], [1],
3862*2e9d4914SAndroid Build Coastguard Worker    [Specify filename containing input files for $NM])
3863*2e9d4914SAndroid Build Coastguard Worker]) # _LT_CMD_GLOBAL_SYMBOLS
3864*2e9d4914SAndroid Build Coastguard Worker
3865*2e9d4914SAndroid Build Coastguard Worker
3866*2e9d4914SAndroid Build Coastguard Worker# _LT_COMPILER_PIC([TAGNAME])
3867*2e9d4914SAndroid Build Coastguard Worker# ---------------------------
3868*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_PIC],
3869*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl
3870*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3871*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3872*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_static, $1)=
3873*2e9d4914SAndroid Build Coastguard Worker
3874*2e9d4914SAndroid Build Coastguard Workerm4_if([$1], [CXX], [
3875*2e9d4914SAndroid Build Coastguard Worker  # C++ specific cases for pic, static, wl, etc.
3876*2e9d4914SAndroid Build Coastguard Worker  if test "$GXX" = yes; then
3877*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3878*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3879*2e9d4914SAndroid Build Coastguard Worker
3880*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
3881*2e9d4914SAndroid Build Coastguard Worker    aix*)
3882*2e9d4914SAndroid Build Coastguard Worker      # All AIX code is PIC.
3883*2e9d4914SAndroid Build Coastguard Worker      if test "$host_cpu" = ia64; then
3884*2e9d4914SAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
3885*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3886*2e9d4914SAndroid Build Coastguard Worker      fi
3887*2e9d4914SAndroid Build Coastguard Worker      ;;
3888*2e9d4914SAndroid Build Coastguard Worker
3889*2e9d4914SAndroid Build Coastguard Worker    amigaos*)
3890*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
3891*2e9d4914SAndroid Build Coastguard Worker      powerpc)
3892*2e9d4914SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
3893*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3894*2e9d4914SAndroid Build Coastguard Worker        ;;
3895*2e9d4914SAndroid Build Coastguard Worker      m68k)
3896*2e9d4914SAndroid Build Coastguard Worker            # FIXME: we need at least 68020 code to build shared libraries, but
3897*2e9d4914SAndroid Build Coastguard Worker            # adding the `-m68020' flag to GCC prevents building anything better,
3898*2e9d4914SAndroid Build Coastguard Worker            # like `-m68040'.
3899*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3900*2e9d4914SAndroid Build Coastguard Worker        ;;
3901*2e9d4914SAndroid Build Coastguard Worker      esac
3902*2e9d4914SAndroid Build Coastguard Worker      ;;
3903*2e9d4914SAndroid Build Coastguard Worker
3904*2e9d4914SAndroid Build Coastguard Worker    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3905*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for these OSes.
3906*2e9d4914SAndroid Build Coastguard Worker      ;;
3907*2e9d4914SAndroid Build Coastguard Worker    mingw* | cygwin* | os2* | pw32* | cegcc*)
3908*2e9d4914SAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
3909*2e9d4914SAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
3910*2e9d4914SAndroid Build Coastguard Worker      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3911*2e9d4914SAndroid Build Coastguard Worker      # (--disable-auto-import) libraries
3912*2e9d4914SAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
3913*2e9d4914SAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3914*2e9d4914SAndroid Build Coastguard Worker      ;;
3915*2e9d4914SAndroid Build Coastguard Worker    darwin* | rhapsody*)
3916*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default on this platform
3917*2e9d4914SAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
3918*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3919*2e9d4914SAndroid Build Coastguard Worker      ;;
3920*2e9d4914SAndroid Build Coastguard Worker    *djgpp*)
3921*2e9d4914SAndroid Build Coastguard Worker      # DJGPP does not support shared libraries at all
3922*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3923*2e9d4914SAndroid Build Coastguard Worker      ;;
3924*2e9d4914SAndroid Build Coastguard Worker    haiku*)
3925*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for Haiku.
3926*2e9d4914SAndroid Build Coastguard Worker      # The "-static" flag exists, but is broken.
3927*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)=
3928*2e9d4914SAndroid Build Coastguard Worker      ;;
3929*2e9d4914SAndroid Build Coastguard Worker    interix[[3-9]]*)
3930*2e9d4914SAndroid Build Coastguard Worker      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3931*2e9d4914SAndroid Build Coastguard Worker      # Instead, we relocate shared libraries at runtime.
3932*2e9d4914SAndroid Build Coastguard Worker      ;;
3933*2e9d4914SAndroid Build Coastguard Worker    sysv4*MP*)
3934*2e9d4914SAndroid Build Coastguard Worker      if test -d /usr/nec; then
3935*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3936*2e9d4914SAndroid Build Coastguard Worker      fi
3937*2e9d4914SAndroid Build Coastguard Worker      ;;
3938*2e9d4914SAndroid Build Coastguard Worker    hpux*)
3939*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3940*2e9d4914SAndroid Build Coastguard Worker      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3941*2e9d4914SAndroid Build Coastguard Worker      # sets the default TLS model and affects inlining.
3942*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
3943*2e9d4914SAndroid Build Coastguard Worker      hppa*64*)
3944*2e9d4914SAndroid Build Coastguard Worker	;;
3945*2e9d4914SAndroid Build Coastguard Worker      *)
3946*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3947*2e9d4914SAndroid Build Coastguard Worker	;;
3948*2e9d4914SAndroid Build Coastguard Worker      esac
3949*2e9d4914SAndroid Build Coastguard Worker      ;;
3950*2e9d4914SAndroid Build Coastguard Worker    *qnx* | *nto*)
3951*2e9d4914SAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
3952*2e9d4914SAndroid Build Coastguard Worker      # it will coredump.
3953*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3954*2e9d4914SAndroid Build Coastguard Worker      ;;
3955*2e9d4914SAndroid Build Coastguard Worker    *)
3956*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3957*2e9d4914SAndroid Build Coastguard Worker      ;;
3958*2e9d4914SAndroid Build Coastguard Worker    esac
3959*2e9d4914SAndroid Build Coastguard Worker  else
3960*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
3961*2e9d4914SAndroid Build Coastguard Worker      aix[[4-9]]*)
3962*2e9d4914SAndroid Build Coastguard Worker	# All AIX code is PIC.
3963*2e9d4914SAndroid Build Coastguard Worker	if test "$host_cpu" = ia64; then
3964*2e9d4914SAndroid Build Coastguard Worker	  # AIX 5 now supports IA64 processor
3965*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3966*2e9d4914SAndroid Build Coastguard Worker	else
3967*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3968*2e9d4914SAndroid Build Coastguard Worker	fi
3969*2e9d4914SAndroid Build Coastguard Worker	;;
3970*2e9d4914SAndroid Build Coastguard Worker      chorus*)
3971*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
3972*2e9d4914SAndroid Build Coastguard Worker	cxch68*)
3973*2e9d4914SAndroid Build Coastguard Worker	  # Green Hills C++ Compiler
3974*2e9d4914SAndroid 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"
3975*2e9d4914SAndroid Build Coastguard Worker	  ;;
3976*2e9d4914SAndroid Build Coastguard Worker	esac
3977*2e9d4914SAndroid Build Coastguard Worker	;;
3978*2e9d4914SAndroid Build Coastguard Worker      mingw* | cygwin* | os2* | pw32* | cegcc*)
3979*2e9d4914SAndroid Build Coastguard Worker	# This hack is so that the source file can tell whether it is being
3980*2e9d4914SAndroid Build Coastguard Worker	# built for inclusion in a dll (and should export symbols for example).
3981*2e9d4914SAndroid Build Coastguard Worker	m4_if([$1], [GCJ], [],
3982*2e9d4914SAndroid Build Coastguard Worker	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3983*2e9d4914SAndroid Build Coastguard Worker	;;
3984*2e9d4914SAndroid Build Coastguard Worker      dgux*)
3985*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
3986*2e9d4914SAndroid Build Coastguard Worker	  ec++*)
3987*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3988*2e9d4914SAndroid Build Coastguard Worker	    ;;
3989*2e9d4914SAndroid Build Coastguard Worker	  ghcx*)
3990*2e9d4914SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
3991*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3992*2e9d4914SAndroid Build Coastguard Worker	    ;;
3993*2e9d4914SAndroid Build Coastguard Worker	  *)
3994*2e9d4914SAndroid Build Coastguard Worker	    ;;
3995*2e9d4914SAndroid Build Coastguard Worker	esac
3996*2e9d4914SAndroid Build Coastguard Worker	;;
3997*2e9d4914SAndroid Build Coastguard Worker      freebsd* | dragonfly*)
3998*2e9d4914SAndroid Build Coastguard Worker	# FreeBSD uses GNU C++
3999*2e9d4914SAndroid Build Coastguard Worker	;;
4000*2e9d4914SAndroid Build Coastguard Worker      hpux9* | hpux10* | hpux11*)
4001*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4002*2e9d4914SAndroid Build Coastguard Worker	  CC*)
4003*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4004*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4005*2e9d4914SAndroid Build Coastguard Worker	    if test "$host_cpu" != ia64; then
4006*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4007*2e9d4914SAndroid Build Coastguard Worker	    fi
4008*2e9d4914SAndroid Build Coastguard Worker	    ;;
4009*2e9d4914SAndroid Build Coastguard Worker	  aCC*)
4010*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4011*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4012*2e9d4914SAndroid Build Coastguard Worker	    case $host_cpu in
4013*2e9d4914SAndroid Build Coastguard Worker	    hppa*64*|ia64*)
4014*2e9d4914SAndroid Build Coastguard Worker	      # +Z the default
4015*2e9d4914SAndroid Build Coastguard Worker	      ;;
4016*2e9d4914SAndroid Build Coastguard Worker	    *)
4017*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4018*2e9d4914SAndroid Build Coastguard Worker	      ;;
4019*2e9d4914SAndroid Build Coastguard Worker	    esac
4020*2e9d4914SAndroid Build Coastguard Worker	    ;;
4021*2e9d4914SAndroid Build Coastguard Worker	  *)
4022*2e9d4914SAndroid Build Coastguard Worker	    ;;
4023*2e9d4914SAndroid Build Coastguard Worker	esac
4024*2e9d4914SAndroid Build Coastguard Worker	;;
4025*2e9d4914SAndroid Build Coastguard Worker      interix*)
4026*2e9d4914SAndroid Build Coastguard Worker	# This is c89, which is MS Visual C++ (no shared libs)
4027*2e9d4914SAndroid Build Coastguard Worker	# Anyone wants to do a port?
4028*2e9d4914SAndroid Build Coastguard Worker	;;
4029*2e9d4914SAndroid Build Coastguard Worker      irix5* | irix6* | nonstopux*)
4030*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4031*2e9d4914SAndroid Build Coastguard Worker	  CC*)
4032*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4033*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4034*2e9d4914SAndroid Build Coastguard Worker	    # CC pic flag -KPIC is the default.
4035*2e9d4914SAndroid Build Coastguard Worker	    ;;
4036*2e9d4914SAndroid Build Coastguard Worker	  *)
4037*2e9d4914SAndroid Build Coastguard Worker	    ;;
4038*2e9d4914SAndroid Build Coastguard Worker	esac
4039*2e9d4914SAndroid Build Coastguard Worker	;;
4040*2e9d4914SAndroid Build Coastguard Worker      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4041*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4042*2e9d4914SAndroid Build Coastguard Worker	  KCC*)
4043*2e9d4914SAndroid Build Coastguard Worker	    # KAI C++ Compiler
4044*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4045*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4046*2e9d4914SAndroid Build Coastguard Worker	    ;;
4047*2e9d4914SAndroid Build Coastguard Worker	  ecpc* )
4048*2e9d4914SAndroid Build Coastguard Worker	    # old Intel C++ for x86_64 which still supported -KPIC.
4049*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4050*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4051*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4052*2e9d4914SAndroid Build Coastguard Worker	    ;;
4053*2e9d4914SAndroid Build Coastguard Worker	  icpc* )
4054*2e9d4914SAndroid Build Coastguard Worker	    # Intel C++, used to be incompatible with GCC.
4055*2e9d4914SAndroid Build Coastguard Worker	    # ICC 10 doesn't accept -KPIC any more.
4056*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4057*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4058*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4059*2e9d4914SAndroid Build Coastguard Worker	    ;;
4060*2e9d4914SAndroid Build Coastguard Worker	  pgCC* | pgcpp*)
4061*2e9d4914SAndroid Build Coastguard Worker	    # Portland Group C++ compiler
4062*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4063*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4064*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4065*2e9d4914SAndroid Build Coastguard Worker	    ;;
4066*2e9d4914SAndroid Build Coastguard Worker	  cxx*)
4067*2e9d4914SAndroid Build Coastguard Worker	    # Compaq C++
4068*2e9d4914SAndroid Build Coastguard Worker	    # Make sure the PIC flag is empty.  It appears that all Alpha
4069*2e9d4914SAndroid Build Coastguard Worker	    # Linux and Compaq Tru64 Unix objects are PIC.
4070*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4071*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4072*2e9d4914SAndroid Build Coastguard Worker	    ;;
4073*2e9d4914SAndroid Build Coastguard Worker	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4074*2e9d4914SAndroid Build Coastguard Worker	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4075*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4076*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4077*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4078*2e9d4914SAndroid Build Coastguard Worker	    ;;
4079*2e9d4914SAndroid Build Coastguard Worker	  *)
4080*2e9d4914SAndroid Build Coastguard Worker	    case `$CC -V 2>&1 | sed 5q` in
4081*2e9d4914SAndroid Build Coastguard Worker	    *Sun\ C*)
4082*2e9d4914SAndroid Build Coastguard Worker	      # Sun C++ 5.9
4083*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4084*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4085*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4086*2e9d4914SAndroid Build Coastguard Worker	      ;;
4087*2e9d4914SAndroid Build Coastguard Worker	    esac
4088*2e9d4914SAndroid Build Coastguard Worker	    ;;
4089*2e9d4914SAndroid Build Coastguard Worker	esac
4090*2e9d4914SAndroid Build Coastguard Worker	;;
4091*2e9d4914SAndroid Build Coastguard Worker      lynxos*)
4092*2e9d4914SAndroid Build Coastguard Worker	;;
4093*2e9d4914SAndroid Build Coastguard Worker      m88k*)
4094*2e9d4914SAndroid Build Coastguard Worker	;;
4095*2e9d4914SAndroid Build Coastguard Worker      mvs*)
4096*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4097*2e9d4914SAndroid Build Coastguard Worker	  cxx*)
4098*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4099*2e9d4914SAndroid Build Coastguard Worker	    ;;
4100*2e9d4914SAndroid Build Coastguard Worker	  *)
4101*2e9d4914SAndroid Build Coastguard Worker	    ;;
4102*2e9d4914SAndroid Build Coastguard Worker	esac
4103*2e9d4914SAndroid Build Coastguard Worker	;;
4104*2e9d4914SAndroid Build Coastguard Worker      netbsd*)
4105*2e9d4914SAndroid Build Coastguard Worker	;;
4106*2e9d4914SAndroid Build Coastguard Worker      *qnx* | *nto*)
4107*2e9d4914SAndroid Build Coastguard Worker        # QNX uses GNU C++, but need to define -shared option too, otherwise
4108*2e9d4914SAndroid Build Coastguard Worker        # it will coredump.
4109*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4110*2e9d4914SAndroid Build Coastguard Worker        ;;
4111*2e9d4914SAndroid Build Coastguard Worker      osf3* | osf4* | osf5*)
4112*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4113*2e9d4914SAndroid Build Coastguard Worker	  KCC*)
4114*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4115*2e9d4914SAndroid Build Coastguard Worker	    ;;
4116*2e9d4914SAndroid Build Coastguard Worker	  RCC*)
4117*2e9d4914SAndroid Build Coastguard Worker	    # Rational C++ 2.4.1
4118*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4119*2e9d4914SAndroid Build Coastguard Worker	    ;;
4120*2e9d4914SAndroid Build Coastguard Worker	  cxx*)
4121*2e9d4914SAndroid Build Coastguard Worker	    # Digital/Compaq C++
4122*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4123*2e9d4914SAndroid Build Coastguard Worker	    # Make sure the PIC flag is empty.  It appears that all Alpha
4124*2e9d4914SAndroid Build Coastguard Worker	    # Linux and Compaq Tru64 Unix objects are PIC.
4125*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4126*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4127*2e9d4914SAndroid Build Coastguard Worker	    ;;
4128*2e9d4914SAndroid Build Coastguard Worker	  *)
4129*2e9d4914SAndroid Build Coastguard Worker	    ;;
4130*2e9d4914SAndroid Build Coastguard Worker	esac
4131*2e9d4914SAndroid Build Coastguard Worker	;;
4132*2e9d4914SAndroid Build Coastguard Worker      psos*)
4133*2e9d4914SAndroid Build Coastguard Worker	;;
4134*2e9d4914SAndroid Build Coastguard Worker      solaris*)
4135*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4136*2e9d4914SAndroid Build Coastguard Worker	  CC* | sunCC*)
4137*2e9d4914SAndroid Build Coastguard Worker	    # Sun C++ 4.2, 5.x and Centerline C++
4138*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4139*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4140*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4141*2e9d4914SAndroid Build Coastguard Worker	    ;;
4142*2e9d4914SAndroid Build Coastguard Worker	  gcx*)
4143*2e9d4914SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
4144*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4145*2e9d4914SAndroid Build Coastguard Worker	    ;;
4146*2e9d4914SAndroid Build Coastguard Worker	  *)
4147*2e9d4914SAndroid Build Coastguard Worker	    ;;
4148*2e9d4914SAndroid Build Coastguard Worker	esac
4149*2e9d4914SAndroid Build Coastguard Worker	;;
4150*2e9d4914SAndroid Build Coastguard Worker      sunos4*)
4151*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4152*2e9d4914SAndroid Build Coastguard Worker	  CC*)
4153*2e9d4914SAndroid Build Coastguard Worker	    # Sun C++ 4.x
4154*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4155*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4156*2e9d4914SAndroid Build Coastguard Worker	    ;;
4157*2e9d4914SAndroid Build Coastguard Worker	  lcc*)
4158*2e9d4914SAndroid Build Coastguard Worker	    # Lucid
4159*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4160*2e9d4914SAndroid Build Coastguard Worker	    ;;
4161*2e9d4914SAndroid Build Coastguard Worker	  *)
4162*2e9d4914SAndroid Build Coastguard Worker	    ;;
4163*2e9d4914SAndroid Build Coastguard Worker	esac
4164*2e9d4914SAndroid Build Coastguard Worker	;;
4165*2e9d4914SAndroid Build Coastguard Worker      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4166*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4167*2e9d4914SAndroid Build Coastguard Worker	  CC*)
4168*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4169*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4170*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4171*2e9d4914SAndroid Build Coastguard Worker	    ;;
4172*2e9d4914SAndroid Build Coastguard Worker	esac
4173*2e9d4914SAndroid Build Coastguard Worker	;;
4174*2e9d4914SAndroid Build Coastguard Worker      tandem*)
4175*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4176*2e9d4914SAndroid Build Coastguard Worker	  NCC*)
4177*2e9d4914SAndroid Build Coastguard Worker	    # NonStop-UX NCC 3.20
4178*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4179*2e9d4914SAndroid Build Coastguard Worker	    ;;
4180*2e9d4914SAndroid Build Coastguard Worker	  *)
4181*2e9d4914SAndroid Build Coastguard Worker	    ;;
4182*2e9d4914SAndroid Build Coastguard Worker	esac
4183*2e9d4914SAndroid Build Coastguard Worker	;;
4184*2e9d4914SAndroid Build Coastguard Worker      vxworks*)
4185*2e9d4914SAndroid Build Coastguard Worker	;;
4186*2e9d4914SAndroid Build Coastguard Worker      *)
4187*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4188*2e9d4914SAndroid Build Coastguard Worker	;;
4189*2e9d4914SAndroid Build Coastguard Worker    esac
4190*2e9d4914SAndroid Build Coastguard Worker  fi
4191*2e9d4914SAndroid Build Coastguard Worker],
4192*2e9d4914SAndroid Build Coastguard Worker[
4193*2e9d4914SAndroid Build Coastguard Worker  if test "$GCC" = yes; then
4194*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4195*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4196*2e9d4914SAndroid Build Coastguard Worker
4197*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
4198*2e9d4914SAndroid Build Coastguard Worker      aix*)
4199*2e9d4914SAndroid Build Coastguard Worker      # All AIX code is PIC.
4200*2e9d4914SAndroid Build Coastguard Worker      if test "$host_cpu" = ia64; then
4201*2e9d4914SAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4202*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4203*2e9d4914SAndroid Build Coastguard Worker      fi
4204*2e9d4914SAndroid Build Coastguard Worker      ;;
4205*2e9d4914SAndroid Build Coastguard Worker
4206*2e9d4914SAndroid Build Coastguard Worker    amigaos*)
4207*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
4208*2e9d4914SAndroid Build Coastguard Worker      powerpc)
4209*2e9d4914SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
4210*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4211*2e9d4914SAndroid Build Coastguard Worker        ;;
4212*2e9d4914SAndroid Build Coastguard Worker      m68k)
4213*2e9d4914SAndroid Build Coastguard Worker            # FIXME: we need at least 68020 code to build shared libraries, but
4214*2e9d4914SAndroid Build Coastguard Worker            # adding the `-m68020' flag to GCC prevents building anything better,
4215*2e9d4914SAndroid Build Coastguard Worker            # like `-m68040'.
4216*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4217*2e9d4914SAndroid Build Coastguard Worker        ;;
4218*2e9d4914SAndroid Build Coastguard Worker      esac
4219*2e9d4914SAndroid Build Coastguard Worker      ;;
4220*2e9d4914SAndroid Build Coastguard Worker
4221*2e9d4914SAndroid Build Coastguard Worker    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4222*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for these OSes.
4223*2e9d4914SAndroid Build Coastguard Worker      ;;
4224*2e9d4914SAndroid Build Coastguard Worker
4225*2e9d4914SAndroid Build Coastguard Worker    mingw* | cygwin* | pw32* | os2* | cegcc*)
4226*2e9d4914SAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4227*2e9d4914SAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4228*2e9d4914SAndroid Build Coastguard Worker      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4229*2e9d4914SAndroid Build Coastguard Worker      # (--disable-auto-import) libraries
4230*2e9d4914SAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4231*2e9d4914SAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4232*2e9d4914SAndroid Build Coastguard Worker      ;;
4233*2e9d4914SAndroid Build Coastguard Worker
4234*2e9d4914SAndroid Build Coastguard Worker    darwin* | rhapsody*)
4235*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default on this platform
4236*2e9d4914SAndroid Build Coastguard Worker      # Common symbols not allowed in MH_DYLIB files
4237*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4238*2e9d4914SAndroid Build Coastguard Worker      ;;
4239*2e9d4914SAndroid Build Coastguard Worker
4240*2e9d4914SAndroid Build Coastguard Worker    haiku*)
4241*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for Haiku.
4242*2e9d4914SAndroid Build Coastguard Worker      # The "-static" flag exists, but is broken.
4243*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4244*2e9d4914SAndroid Build Coastguard Worker      ;;
4245*2e9d4914SAndroid Build Coastguard Worker
4246*2e9d4914SAndroid Build Coastguard Worker    hpux*)
4247*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4248*2e9d4914SAndroid Build Coastguard Worker      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4249*2e9d4914SAndroid Build Coastguard Worker      # sets the default TLS model and affects inlining.
4250*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
4251*2e9d4914SAndroid Build Coastguard Worker      hppa*64*)
4252*2e9d4914SAndroid Build Coastguard Worker	# +Z the default
4253*2e9d4914SAndroid Build Coastguard Worker	;;
4254*2e9d4914SAndroid Build Coastguard Worker      *)
4255*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4256*2e9d4914SAndroid Build Coastguard Worker	;;
4257*2e9d4914SAndroid Build Coastguard Worker      esac
4258*2e9d4914SAndroid Build Coastguard Worker      ;;
4259*2e9d4914SAndroid Build Coastguard Worker
4260*2e9d4914SAndroid Build Coastguard Worker    interix[[3-9]]*)
4261*2e9d4914SAndroid Build Coastguard Worker      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4262*2e9d4914SAndroid Build Coastguard Worker      # Instead, we relocate shared libraries at runtime.
4263*2e9d4914SAndroid Build Coastguard Worker      ;;
4264*2e9d4914SAndroid Build Coastguard Worker
4265*2e9d4914SAndroid Build Coastguard Worker    msdosdjgpp*)
4266*2e9d4914SAndroid Build Coastguard Worker      # Just because we use GCC doesn't mean we suddenly get shared libraries
4267*2e9d4914SAndroid Build Coastguard Worker      # on systems that don't support them.
4268*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4269*2e9d4914SAndroid Build Coastguard Worker      enable_shared=no
4270*2e9d4914SAndroid Build Coastguard Worker      ;;
4271*2e9d4914SAndroid Build Coastguard Worker
4272*2e9d4914SAndroid Build Coastguard Worker    *nto* | *qnx*)
4273*2e9d4914SAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4274*2e9d4914SAndroid Build Coastguard Worker      # it will coredump.
4275*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4276*2e9d4914SAndroid Build Coastguard Worker      ;;
4277*2e9d4914SAndroid Build Coastguard Worker
4278*2e9d4914SAndroid Build Coastguard Worker    sysv4*MP*)
4279*2e9d4914SAndroid Build Coastguard Worker      if test -d /usr/nec; then
4280*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4281*2e9d4914SAndroid Build Coastguard Worker      fi
4282*2e9d4914SAndroid Build Coastguard Worker      ;;
4283*2e9d4914SAndroid Build Coastguard Worker
4284*2e9d4914SAndroid Build Coastguard Worker    *)
4285*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4286*2e9d4914SAndroid Build Coastguard Worker      ;;
4287*2e9d4914SAndroid Build Coastguard Worker    esac
4288*2e9d4914SAndroid Build Coastguard Worker
4289*2e9d4914SAndroid Build Coastguard Worker    case $cc_basename in
4290*2e9d4914SAndroid Build Coastguard Worker    nvcc*) # Cuda Compiler Driver 2.2
4291*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4292*2e9d4914SAndroid Build Coastguard Worker      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4293*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4294*2e9d4914SAndroid Build Coastguard Worker      fi
4295*2e9d4914SAndroid Build Coastguard Worker      ;;
4296*2e9d4914SAndroid Build Coastguard Worker    esac
4297*2e9d4914SAndroid Build Coastguard Worker  else
4298*2e9d4914SAndroid Build Coastguard Worker    # PORTME Check for flag to pass linker flags through the system compiler.
4299*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
4300*2e9d4914SAndroid Build Coastguard Worker    aix*)
4301*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4302*2e9d4914SAndroid Build Coastguard Worker      if test "$host_cpu" = ia64; then
4303*2e9d4914SAndroid Build Coastguard Worker	# AIX 5 now supports IA64 processor
4304*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4305*2e9d4914SAndroid Build Coastguard Worker      else
4306*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4307*2e9d4914SAndroid Build Coastguard Worker      fi
4308*2e9d4914SAndroid Build Coastguard Worker      ;;
4309*2e9d4914SAndroid Build Coastguard Worker
4310*2e9d4914SAndroid Build Coastguard Worker    mingw* | cygwin* | pw32* | os2* | cegcc*)
4311*2e9d4914SAndroid Build Coastguard Worker      # This hack is so that the source file can tell whether it is being
4312*2e9d4914SAndroid Build Coastguard Worker      # built for inclusion in a dll (and should export symbols for example).
4313*2e9d4914SAndroid Build Coastguard Worker      m4_if([$1], [GCJ], [],
4314*2e9d4914SAndroid Build Coastguard Worker	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4315*2e9d4914SAndroid Build Coastguard Worker      ;;
4316*2e9d4914SAndroid Build Coastguard Worker
4317*2e9d4914SAndroid Build Coastguard Worker    hpux9* | hpux10* | hpux11*)
4318*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4319*2e9d4914SAndroid Build Coastguard Worker      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4320*2e9d4914SAndroid Build Coastguard Worker      # not for PA HP-UX.
4321*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
4322*2e9d4914SAndroid Build Coastguard Worker      hppa*64*|ia64*)
4323*2e9d4914SAndroid Build Coastguard Worker	# +Z the default
4324*2e9d4914SAndroid Build Coastguard Worker	;;
4325*2e9d4914SAndroid Build Coastguard Worker      *)
4326*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4327*2e9d4914SAndroid Build Coastguard Worker	;;
4328*2e9d4914SAndroid Build Coastguard Worker      esac
4329*2e9d4914SAndroid Build Coastguard Worker      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4330*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4331*2e9d4914SAndroid Build Coastguard Worker      ;;
4332*2e9d4914SAndroid Build Coastguard Worker
4333*2e9d4914SAndroid Build Coastguard Worker    irix5* | irix6* | nonstopux*)
4334*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4335*2e9d4914SAndroid Build Coastguard Worker      # PIC (with -KPIC) is the default.
4336*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4337*2e9d4914SAndroid Build Coastguard Worker      ;;
4338*2e9d4914SAndroid Build Coastguard Worker
4339*2e9d4914SAndroid Build Coastguard Worker    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4340*2e9d4914SAndroid Build Coastguard Worker      case $cc_basename in
4341*2e9d4914SAndroid Build Coastguard Worker      # old Intel for x86_64 which still supported -KPIC.
4342*2e9d4914SAndroid Build Coastguard Worker      ecc*)
4343*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4344*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4345*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4346*2e9d4914SAndroid Build Coastguard Worker        ;;
4347*2e9d4914SAndroid Build Coastguard Worker      # icc used to be incompatible with GCC.
4348*2e9d4914SAndroid Build Coastguard Worker      # ICC 10 doesn't accept -KPIC any more.
4349*2e9d4914SAndroid Build Coastguard Worker      icc* | ifort*)
4350*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4351*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4352*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4353*2e9d4914SAndroid Build Coastguard Worker        ;;
4354*2e9d4914SAndroid Build Coastguard Worker      # Lahey Fortran 8.1.
4355*2e9d4914SAndroid Build Coastguard Worker      lf95*)
4356*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4357*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4358*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4359*2e9d4914SAndroid Build Coastguard Worker	;;
4360*2e9d4914SAndroid Build Coastguard Worker      nagfor*)
4361*2e9d4914SAndroid Build Coastguard Worker	# NAG Fortran compiler
4362*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4363*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4364*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4365*2e9d4914SAndroid Build Coastguard Worker	;;
4366*2e9d4914SAndroid Build Coastguard Worker      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4367*2e9d4914SAndroid Build Coastguard Worker        # Portland Group compilers (*not* the Pentium gcc compiler,
4368*2e9d4914SAndroid Build Coastguard Worker	# which looks to be a dead project)
4369*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4370*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4371*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4372*2e9d4914SAndroid Build Coastguard Worker        ;;
4373*2e9d4914SAndroid Build Coastguard Worker      ccc*)
4374*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4375*2e9d4914SAndroid Build Coastguard Worker        # All Alpha code is PIC.
4376*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4377*2e9d4914SAndroid Build Coastguard Worker        ;;
4378*2e9d4914SAndroid Build Coastguard Worker      xl* | bgxl* | bgf* | mpixl*)
4379*2e9d4914SAndroid Build Coastguard Worker	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4380*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4381*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4382*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4383*2e9d4914SAndroid Build Coastguard Worker	;;
4384*2e9d4914SAndroid Build Coastguard Worker      *)
4385*2e9d4914SAndroid Build Coastguard Worker	case `$CC -V 2>&1 | sed 5q` in
4386*2e9d4914SAndroid Build Coastguard Worker	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4387*2e9d4914SAndroid Build Coastguard Worker	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4388*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4389*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4390*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4391*2e9d4914SAndroid Build Coastguard Worker	  ;;
4392*2e9d4914SAndroid Build Coastguard Worker	*Sun\ F* | *Sun*Fortran*)
4393*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4394*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4395*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4396*2e9d4914SAndroid Build Coastguard Worker	  ;;
4397*2e9d4914SAndroid Build Coastguard Worker	*Sun\ C*)
4398*2e9d4914SAndroid Build Coastguard Worker	  # Sun C 5.9
4399*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4400*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4401*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4402*2e9d4914SAndroid Build Coastguard Worker	  ;;
4403*2e9d4914SAndroid Build Coastguard Worker        *Intel*\ [[CF]]*Compiler*)
4404*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4406*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4407*2e9d4914SAndroid Build Coastguard Worker	  ;;
4408*2e9d4914SAndroid Build Coastguard Worker	*Portland\ Group*)
4409*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4410*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4411*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4412*2e9d4914SAndroid Build Coastguard Worker	  ;;
4413*2e9d4914SAndroid Build Coastguard Worker	esac
4414*2e9d4914SAndroid Build Coastguard Worker	;;
4415*2e9d4914SAndroid Build Coastguard Worker      esac
4416*2e9d4914SAndroid Build Coastguard Worker      ;;
4417*2e9d4914SAndroid Build Coastguard Worker
4418*2e9d4914SAndroid Build Coastguard Worker    newsos6)
4419*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4420*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4421*2e9d4914SAndroid Build Coastguard Worker      ;;
4422*2e9d4914SAndroid Build Coastguard Worker
4423*2e9d4914SAndroid Build Coastguard Worker    *nto* | *qnx*)
4424*2e9d4914SAndroid Build Coastguard Worker      # QNX uses GNU C++, but need to define -shared option too, otherwise
4425*2e9d4914SAndroid Build Coastguard Worker      # it will coredump.
4426*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4427*2e9d4914SAndroid Build Coastguard Worker      ;;
4428*2e9d4914SAndroid Build Coastguard Worker
4429*2e9d4914SAndroid Build Coastguard Worker    osf3* | osf4* | osf5*)
4430*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4431*2e9d4914SAndroid Build Coastguard Worker      # All OSF/1 code is PIC.
4432*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4433*2e9d4914SAndroid Build Coastguard Worker      ;;
4434*2e9d4914SAndroid Build Coastguard Worker
4435*2e9d4914SAndroid Build Coastguard Worker    rdos*)
4436*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4437*2e9d4914SAndroid Build Coastguard Worker      ;;
4438*2e9d4914SAndroid Build Coastguard Worker
4439*2e9d4914SAndroid Build Coastguard Worker    solaris*)
4440*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4441*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4442*2e9d4914SAndroid Build Coastguard Worker      case $cc_basename in
4443*2e9d4914SAndroid Build Coastguard Worker      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4444*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4445*2e9d4914SAndroid Build Coastguard Worker      *)
4446*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4447*2e9d4914SAndroid Build Coastguard Worker      esac
4448*2e9d4914SAndroid Build Coastguard Worker      ;;
4449*2e9d4914SAndroid Build Coastguard Worker
4450*2e9d4914SAndroid Build Coastguard Worker    sunos4*)
4451*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4452*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4453*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4454*2e9d4914SAndroid Build Coastguard Worker      ;;
4455*2e9d4914SAndroid Build Coastguard Worker
4456*2e9d4914SAndroid Build Coastguard Worker    sysv4 | sysv4.2uw2* | sysv4.3*)
4457*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4458*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4459*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4460*2e9d4914SAndroid Build Coastguard Worker      ;;
4461*2e9d4914SAndroid Build Coastguard Worker
4462*2e9d4914SAndroid Build Coastguard Worker    sysv4*MP*)
4463*2e9d4914SAndroid Build Coastguard Worker      if test -d /usr/nec ;then
4464*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4465*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4466*2e9d4914SAndroid Build Coastguard Worker      fi
4467*2e9d4914SAndroid Build Coastguard Worker      ;;
4468*2e9d4914SAndroid Build Coastguard Worker
4469*2e9d4914SAndroid Build Coastguard Worker    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4470*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4471*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4472*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4473*2e9d4914SAndroid Build Coastguard Worker      ;;
4474*2e9d4914SAndroid Build Coastguard Worker
4475*2e9d4914SAndroid Build Coastguard Worker    unicos*)
4476*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4477*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4478*2e9d4914SAndroid Build Coastguard Worker      ;;
4479*2e9d4914SAndroid Build Coastguard Worker
4480*2e9d4914SAndroid Build Coastguard Worker    uts4*)
4481*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4482*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4483*2e9d4914SAndroid Build Coastguard Worker      ;;
4484*2e9d4914SAndroid Build Coastguard Worker
4485*2e9d4914SAndroid Build Coastguard Worker    *)
4486*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4487*2e9d4914SAndroid Build Coastguard Worker      ;;
4488*2e9d4914SAndroid Build Coastguard Worker    esac
4489*2e9d4914SAndroid Build Coastguard Worker  fi
4490*2e9d4914SAndroid Build Coastguard Worker])
4491*2e9d4914SAndroid Build Coastguard Workercase $host_os in
4492*2e9d4914SAndroid Build Coastguard Worker  # For platforms which do not support PIC, -DPIC is meaningless:
4493*2e9d4914SAndroid Build Coastguard Worker  *djgpp*)
4494*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4495*2e9d4914SAndroid Build Coastguard Worker    ;;
4496*2e9d4914SAndroid Build Coastguard Worker  *)
4497*2e9d4914SAndroid 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],[])])"
4498*2e9d4914SAndroid Build Coastguard Worker    ;;
4499*2e9d4914SAndroid Build Coastguard Workeresac
4500*2e9d4914SAndroid Build Coastguard Worker
4501*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_CHECK([for $compiler option to produce PIC],
4502*2e9d4914SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4503*2e9d4914SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4504*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4505*2e9d4914SAndroid Build Coastguard Worker
4506*2e9d4914SAndroid Build Coastguard Worker#
4507*2e9d4914SAndroid Build Coastguard Worker# Check to make sure the PIC flag actually works.
4508*2e9d4914SAndroid Build Coastguard Worker#
4509*2e9d4914SAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4510*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4511*2e9d4914SAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4512*2e9d4914SAndroid Build Coastguard Worker    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4513*2e9d4914SAndroid Build Coastguard Worker    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4514*2e9d4914SAndroid Build Coastguard Worker     "" | " "*) ;;
4515*2e9d4914SAndroid Build Coastguard Worker     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4516*2e9d4914SAndroid Build Coastguard Worker     esac],
4517*2e9d4914SAndroid Build Coastguard Worker    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4518*2e9d4914SAndroid Build Coastguard Worker     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4519*2e9d4914SAndroid Build Coastguard Workerfi
4520*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4521*2e9d4914SAndroid Build Coastguard Worker	[Additional compiler flags for building library objects])
4522*2e9d4914SAndroid Build Coastguard Worker
4523*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4524*2e9d4914SAndroid Build Coastguard Worker	[How to pass a linker flag through the compiler])
4525*2e9d4914SAndroid Build Coastguard Worker#
4526*2e9d4914SAndroid Build Coastguard Worker# Check to make sure the static flag actually works.
4527*2e9d4914SAndroid Build Coastguard Worker#
4528*2e9d4914SAndroid Build Coastguard Workerwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4529*2e9d4914SAndroid Build Coastguard Worker_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4530*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4531*2e9d4914SAndroid Build Coastguard Worker  $lt_tmp_static_flag,
4532*2e9d4914SAndroid Build Coastguard Worker  [],
4533*2e9d4914SAndroid Build Coastguard Worker  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4534*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4535*2e9d4914SAndroid Build Coastguard Worker	[Compiler flag to prevent dynamic linking])
4536*2e9d4914SAndroid Build Coastguard Worker])# _LT_COMPILER_PIC
4537*2e9d4914SAndroid Build Coastguard Worker
4538*2e9d4914SAndroid Build Coastguard Worker
4539*2e9d4914SAndroid Build Coastguard Worker# _LT_LINKER_SHLIBS([TAGNAME])
4540*2e9d4914SAndroid Build Coastguard Worker# ----------------------------
4541*2e9d4914SAndroid Build Coastguard Worker# See if the linker supports building shared libraries.
4542*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LINKER_SHLIBS],
4543*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PATH_LD])dnl
4544*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl
4545*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4546*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4547*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
4548*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl
4549*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4550*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl
4551*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4552*2e9d4914SAndroid Build Coastguard Workerm4_if([$1], [CXX], [
4553*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4554*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4555*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
4556*2e9d4914SAndroid Build Coastguard Worker  aix[[4-9]]*)
4557*2e9d4914SAndroid Build Coastguard Worker    # If we're using GNU nm, then we don't want the "-C" option.
4558*2e9d4914SAndroid Build Coastguard Worker    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4559*2e9d4914SAndroid Build Coastguard Worker    # Also, AIX nm treats weak defined symbols like other global defined
4560*2e9d4914SAndroid Build Coastguard Worker    # symbols, whereas GNU nm marks them as "W".
4561*2e9d4914SAndroid Build Coastguard Worker    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562*2e9d4914SAndroid 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4563*2e9d4914SAndroid Build Coastguard Worker    else
4564*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4565*2e9d4914SAndroid Build Coastguard Worker    fi
4566*2e9d4914SAndroid Build Coastguard Worker    ;;
4567*2e9d4914SAndroid Build Coastguard Worker  pw32*)
4568*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4569*2e9d4914SAndroid Build Coastguard Worker    ;;
4570*2e9d4914SAndroid Build Coastguard Worker  cygwin* | mingw* | cegcc*)
4571*2e9d4914SAndroid Build Coastguard Worker    case $cc_basename in
4572*2e9d4914SAndroid Build Coastguard Worker    cl*)
4573*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4574*2e9d4914SAndroid Build Coastguard Worker      ;;
4575*2e9d4914SAndroid Build Coastguard Worker    *)
4576*2e9d4914SAndroid 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'
4577*2e9d4914SAndroid 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']
4578*2e9d4914SAndroid Build Coastguard Worker      ;;
4579*2e9d4914SAndroid Build Coastguard Worker    esac
4580*2e9d4914SAndroid Build Coastguard Worker    ;;
4581*2e9d4914SAndroid Build Coastguard Worker  *)
4582*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4583*2e9d4914SAndroid Build Coastguard Worker    ;;
4584*2e9d4914SAndroid Build Coastguard Worker  esac
4585*2e9d4914SAndroid Build Coastguard Worker], [
4586*2e9d4914SAndroid Build Coastguard Worker  runpath_var=
4587*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(allow_undefined_flag, $1)=
4588*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(always_export_symbols, $1)=no
4589*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds, $1)=
4590*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_expsym_cmds, $1)=
4591*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler_needs_object, $1)=no
4592*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4593*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4594*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4595*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_automatic, $1)=no
4596*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct, $1)=no
4597*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4598*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4599*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4600*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_minus_L, $1)=no
4601*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4602*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(inherit_rpath, $1)=no
4603*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4604*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(module_cmds, $1)=
4605*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(module_expsym_cmds, $1)=
4606*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4607*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4608*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4609*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4610*2e9d4914SAndroid Build Coastguard Worker  # include_expsyms should be a list of space-separated symbols to be *always*
4611*2e9d4914SAndroid Build Coastguard Worker  # included in the symbol list
4612*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(include_expsyms, $1)=
4613*2e9d4914SAndroid Build Coastguard Worker  # exclude_expsyms can be an extended regexp of symbols to exclude
4614*2e9d4914SAndroid Build Coastguard Worker  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4615*2e9d4914SAndroid Build Coastguard Worker  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4616*2e9d4914SAndroid Build Coastguard Worker  # as well as any symbol that contains `d'.
4617*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4618*2e9d4914SAndroid Build Coastguard Worker  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4619*2e9d4914SAndroid Build Coastguard Worker  # platforms (ab)use it in PIC code, but their linkers get confused if
4620*2e9d4914SAndroid Build Coastguard Worker  # the symbol is explicitly referenced.  Since portable code cannot
4621*2e9d4914SAndroid Build Coastguard Worker  # rely on this symbol name, it's probably fine to never include it in
4622*2e9d4914SAndroid Build Coastguard Worker  # preloaded symbol tables.
4623*2e9d4914SAndroid Build Coastguard Worker  # Exclude shared library initialization/finalization symbols.
4624*2e9d4914SAndroid Build Coastguard Workerdnl Note also adjust exclude_expsyms for C++ above.
4625*2e9d4914SAndroid Build Coastguard Worker  extract_expsyms_cmds=
4626*2e9d4914SAndroid Build Coastguard Worker
4627*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
4628*2e9d4914SAndroid Build Coastguard Worker  cygwin* | mingw* | pw32* | cegcc*)
4629*2e9d4914SAndroid Build Coastguard Worker    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4630*2e9d4914SAndroid Build Coastguard Worker    # When not using gcc, we currently assume that we are using
4631*2e9d4914SAndroid Build Coastguard Worker    # Microsoft Visual C++.
4632*2e9d4914SAndroid Build Coastguard Worker    if test "$GCC" != yes; then
4633*2e9d4914SAndroid Build Coastguard Worker      with_gnu_ld=no
4634*2e9d4914SAndroid Build Coastguard Worker    fi
4635*2e9d4914SAndroid Build Coastguard Worker    ;;
4636*2e9d4914SAndroid Build Coastguard Worker  interix*)
4637*2e9d4914SAndroid Build Coastguard Worker    # we just hope/assume this is gcc and not c89 (= MSVC++)
4638*2e9d4914SAndroid Build Coastguard Worker    with_gnu_ld=yes
4639*2e9d4914SAndroid Build Coastguard Worker    ;;
4640*2e9d4914SAndroid Build Coastguard Worker  openbsd*)
4641*2e9d4914SAndroid Build Coastguard Worker    with_gnu_ld=no
4642*2e9d4914SAndroid Build Coastguard Worker    ;;
4643*2e9d4914SAndroid Build Coastguard Worker  esac
4644*2e9d4914SAndroid Build Coastguard Worker
4645*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(ld_shlibs, $1)=yes
4646*2e9d4914SAndroid Build Coastguard Worker
4647*2e9d4914SAndroid Build Coastguard Worker  # On some targets, GNU ld is compatible enough with the native linker
4648*2e9d4914SAndroid Build Coastguard Worker  # that we're better off using the native interface for both.
4649*2e9d4914SAndroid Build Coastguard Worker  lt_use_gnu_ld_interface=no
4650*2e9d4914SAndroid Build Coastguard Worker  if test "$with_gnu_ld" = yes; then
4651*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
4652*2e9d4914SAndroid Build Coastguard Worker      aix*)
4653*2e9d4914SAndroid Build Coastguard Worker	# The AIX port of GNU ld has always aspired to compatibility
4654*2e9d4914SAndroid Build Coastguard Worker	# with the native linker.  However, as the warning in the GNU ld
4655*2e9d4914SAndroid Build Coastguard Worker	# block says, versions before 2.19.5* couldn't really create working
4656*2e9d4914SAndroid Build Coastguard Worker	# shared libraries, regardless of the interface used.
4657*2e9d4914SAndroid Build Coastguard Worker	case `$LD -v 2>&1` in
4658*2e9d4914SAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4659*2e9d4914SAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4660*2e9d4914SAndroid Build Coastguard Worker	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4661*2e9d4914SAndroid Build Coastguard Worker	  *)
4662*2e9d4914SAndroid Build Coastguard Worker	    lt_use_gnu_ld_interface=yes
4663*2e9d4914SAndroid Build Coastguard Worker	    ;;
4664*2e9d4914SAndroid Build Coastguard Worker	esac
4665*2e9d4914SAndroid Build Coastguard Worker	;;
4666*2e9d4914SAndroid Build Coastguard Worker      *)
4667*2e9d4914SAndroid Build Coastguard Worker	lt_use_gnu_ld_interface=yes
4668*2e9d4914SAndroid Build Coastguard Worker	;;
4669*2e9d4914SAndroid Build Coastguard Worker    esac
4670*2e9d4914SAndroid Build Coastguard Worker  fi
4671*2e9d4914SAndroid Build Coastguard Worker
4672*2e9d4914SAndroid Build Coastguard Worker  if test "$lt_use_gnu_ld_interface" = yes; then
4673*2e9d4914SAndroid Build Coastguard Worker    # If archive_cmds runs LD, not CC, wlarc should be empty
4674*2e9d4914SAndroid Build Coastguard Worker    wlarc='${wl}'
4675*2e9d4914SAndroid Build Coastguard Worker
4676*2e9d4914SAndroid Build Coastguard Worker    # Set some defaults for GNU ld with shared library support. These
4677*2e9d4914SAndroid Build Coastguard Worker    # are reset later if shared libraries are not supported. Putting them
4678*2e9d4914SAndroid Build Coastguard Worker    # here allows them to be overridden if necessary.
4679*2e9d4914SAndroid Build Coastguard Worker    runpath_var=LD_RUN_PATH
4680*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4681*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4682*2e9d4914SAndroid Build Coastguard Worker    # ancient GNU ld didn't support --whole-archive et. al.
4683*2e9d4914SAndroid Build Coastguard Worker    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4684*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4685*2e9d4914SAndroid Build Coastguard Worker    else
4686*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4687*2e9d4914SAndroid Build Coastguard Worker    fi
4688*2e9d4914SAndroid Build Coastguard Worker    supports_anon_versioning=no
4689*2e9d4914SAndroid Build Coastguard Worker    case `$LD -v 2>&1` in
4690*2e9d4914SAndroid Build Coastguard Worker      *GNU\ gold*) supports_anon_versioning=yes ;;
4691*2e9d4914SAndroid Build Coastguard Worker      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4692*2e9d4914SAndroid Build Coastguard Worker      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4693*2e9d4914SAndroid Build Coastguard Worker      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4694*2e9d4914SAndroid Build Coastguard Worker      *\ 2.11.*) ;; # other 2.11 versions
4695*2e9d4914SAndroid Build Coastguard Worker      *) supports_anon_versioning=yes ;;
4696*2e9d4914SAndroid Build Coastguard Worker    esac
4697*2e9d4914SAndroid Build Coastguard Worker
4698*2e9d4914SAndroid Build Coastguard Worker    # See if GNU ld supports shared libraries.
4699*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
4700*2e9d4914SAndroid Build Coastguard Worker    aix[[3-9]]*)
4701*2e9d4914SAndroid Build Coastguard Worker      # On AIX/PPC, the GNU linker is very broken
4702*2e9d4914SAndroid Build Coastguard Worker      if test "$host_cpu" != ia64; then
4703*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4704*2e9d4914SAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
4705*2e9d4914SAndroid Build Coastguard Worker
4706*2e9d4914SAndroid Build Coastguard Worker*** Warning: the GNU linker, at least up to release 2.19, is reported
4707*2e9d4914SAndroid Build Coastguard Worker*** to be unable to reliably create shared libraries on AIX.
4708*2e9d4914SAndroid Build Coastguard Worker*** Therefore, libtool is disabling shared libraries support.  If you
4709*2e9d4914SAndroid Build Coastguard Worker*** really care for shared libraries, you may want to install binutils
4710*2e9d4914SAndroid Build Coastguard Worker*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4711*2e9d4914SAndroid Build Coastguard Worker*** You will then need to restart the configuration process.
4712*2e9d4914SAndroid Build Coastguard Worker
4713*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
4714*2e9d4914SAndroid Build Coastguard Worker      fi
4715*2e9d4914SAndroid Build Coastguard Worker      ;;
4716*2e9d4914SAndroid Build Coastguard Worker
4717*2e9d4914SAndroid Build Coastguard Worker    amigaos*)
4718*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
4719*2e9d4914SAndroid Build Coastguard Worker      powerpc)
4720*2e9d4914SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
4721*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4722*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4723*2e9d4914SAndroid Build Coastguard Worker        ;;
4724*2e9d4914SAndroid Build Coastguard Worker      m68k)
4725*2e9d4914SAndroid 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)'
4726*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4727*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4728*2e9d4914SAndroid Build Coastguard Worker        ;;
4729*2e9d4914SAndroid Build Coastguard Worker      esac
4730*2e9d4914SAndroid Build Coastguard Worker      ;;
4731*2e9d4914SAndroid Build Coastguard Worker
4732*2e9d4914SAndroid Build Coastguard Worker    beos*)
4733*2e9d4914SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4734*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4735*2e9d4914SAndroid Build Coastguard Worker	# Joseph Beckenbach <[email protected]> says some releases of gcc
4736*2e9d4914SAndroid Build Coastguard Worker	# support --undefined.  This deserves some investigation.  FIXME
4737*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4738*2e9d4914SAndroid Build Coastguard Worker      else
4739*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4740*2e9d4914SAndroid Build Coastguard Worker      fi
4741*2e9d4914SAndroid Build Coastguard Worker      ;;
4742*2e9d4914SAndroid Build Coastguard Worker
4743*2e9d4914SAndroid Build Coastguard Worker    cygwin* | mingw* | pw32* | cegcc*)
4744*2e9d4914SAndroid Build Coastguard Worker      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4745*2e9d4914SAndroid Build Coastguard Worker      # as there is no search path for DLLs.
4746*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4747*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4748*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4749*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=no
4750*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4751*2e9d4914SAndroid 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'
4752*2e9d4914SAndroid 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']
4753*2e9d4914SAndroid Build Coastguard Worker
4754*2e9d4914SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4755*2e9d4914SAndroid 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'
4756*2e9d4914SAndroid Build Coastguard Worker	# If the export-symbols file already is a .def file (1st line
4757*2e9d4914SAndroid Build Coastguard Worker	# is EXPORTS), use it as is; otherwise, prepend...
4758*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4759*2e9d4914SAndroid Build Coastguard Worker	  cp $export_symbols $output_objdir/$soname.def;
4760*2e9d4914SAndroid Build Coastguard Worker	else
4761*2e9d4914SAndroid Build Coastguard Worker	  echo EXPORTS > $output_objdir/$soname.def;
4762*2e9d4914SAndroid Build Coastguard Worker	  cat $export_symbols >> $output_objdir/$soname.def;
4763*2e9d4914SAndroid Build Coastguard Worker	fi~
4764*2e9d4914SAndroid 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'
4765*2e9d4914SAndroid Build Coastguard Worker      else
4766*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4767*2e9d4914SAndroid Build Coastguard Worker      fi
4768*2e9d4914SAndroid Build Coastguard Worker      ;;
4769*2e9d4914SAndroid Build Coastguard Worker
4770*2e9d4914SAndroid Build Coastguard Worker    haiku*)
4771*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4772*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
4773*2e9d4914SAndroid Build Coastguard Worker      ;;
4774*2e9d4914SAndroid Build Coastguard Worker
4775*2e9d4914SAndroid Build Coastguard Worker    interix[[3-9]]*)
4776*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=no
4777*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4778*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4779*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4780*2e9d4914SAndroid Build Coastguard Worker      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4781*2e9d4914SAndroid Build Coastguard Worker      # Instead, shared libraries are loaded at an image base (0x10000000 by
4782*2e9d4914SAndroid Build Coastguard Worker      # default) and relocated if they conflict, which is a slow very memory
4783*2e9d4914SAndroid Build Coastguard Worker      # consuming and fragmenting process.  To avoid this, we pick a random,
4784*2e9d4914SAndroid Build Coastguard Worker      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4785*2e9d4914SAndroid Build Coastguard Worker      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4786*2e9d4914SAndroid 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'
4787*2e9d4914SAndroid 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'
4788*2e9d4914SAndroid Build Coastguard Worker      ;;
4789*2e9d4914SAndroid Build Coastguard Worker
4790*2e9d4914SAndroid Build Coastguard Worker    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4791*2e9d4914SAndroid Build Coastguard Worker      tmp_diet=no
4792*2e9d4914SAndroid Build Coastguard Worker      if test "$host_os" = linux-dietlibc; then
4793*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4794*2e9d4914SAndroid Build Coastguard Worker	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4795*2e9d4914SAndroid Build Coastguard Worker	esac
4796*2e9d4914SAndroid Build Coastguard Worker      fi
4797*2e9d4914SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4798*2e9d4914SAndroid Build Coastguard Worker	 && test "$tmp_diet" = no
4799*2e9d4914SAndroid Build Coastguard Worker      then
4800*2e9d4914SAndroid Build Coastguard Worker	tmp_addflag=' $pic_flag'
4801*2e9d4914SAndroid Build Coastguard Worker	tmp_sharedflag='-shared'
4802*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename,$host_cpu in
4803*2e9d4914SAndroid Build Coastguard Worker        pgcc*)				# Portland Group C compiler
4804*2e9d4914SAndroid 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'
4805*2e9d4914SAndroid Build Coastguard Worker	  tmp_addflag=' $pic_flag'
4806*2e9d4914SAndroid Build Coastguard Worker	  ;;
4807*2e9d4914SAndroid Build Coastguard Worker	pgf77* | pgf90* | pgf95* | pgfortran*)
4808*2e9d4914SAndroid Build Coastguard Worker					# Portland Group f77 and f90 compilers
4809*2e9d4914SAndroid 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'
4810*2e9d4914SAndroid Build Coastguard Worker	  tmp_addflag=' $pic_flag -Mnomain' ;;
4811*2e9d4914SAndroid Build Coastguard Worker	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4812*2e9d4914SAndroid Build Coastguard Worker	  tmp_addflag=' -i_dynamic' ;;
4813*2e9d4914SAndroid Build Coastguard Worker	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4814*2e9d4914SAndroid Build Coastguard Worker	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4815*2e9d4914SAndroid Build Coastguard Worker	ifc* | ifort*)			# Intel Fortran compiler
4816*2e9d4914SAndroid Build Coastguard Worker	  tmp_addflag=' -nofor_main' ;;
4817*2e9d4914SAndroid Build Coastguard Worker	lf95*)				# Lahey Fortran 8.1
4818*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4819*2e9d4914SAndroid Build Coastguard Worker	  tmp_sharedflag='--shared' ;;
4820*2e9d4914SAndroid Build Coastguard Worker	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4821*2e9d4914SAndroid Build Coastguard Worker	  tmp_sharedflag='-qmkshrobj'
4822*2e9d4914SAndroid Build Coastguard Worker	  tmp_addflag= ;;
4823*2e9d4914SAndroid Build Coastguard Worker	nvcc*)	# Cuda Compiler Driver 2.2
4824*2e9d4914SAndroid 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'
4825*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4826*2e9d4914SAndroid Build Coastguard Worker	  ;;
4827*2e9d4914SAndroid Build Coastguard Worker	esac
4828*2e9d4914SAndroid Build Coastguard Worker	case `$CC -V 2>&1 | sed 5q` in
4829*2e9d4914SAndroid Build Coastguard Worker	*Sun\ C*)			# Sun C 5.9
4830*2e9d4914SAndroid 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'
4831*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4832*2e9d4914SAndroid Build Coastguard Worker	  tmp_sharedflag='-G' ;;
4833*2e9d4914SAndroid Build Coastguard Worker	*Sun\ F*)			# Sun Fortran 8.3
4834*2e9d4914SAndroid Build Coastguard Worker	  tmp_sharedflag='-G' ;;
4835*2e9d4914SAndroid Build Coastguard Worker	esac
4836*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4837*2e9d4914SAndroid Build Coastguard Worker
4838*2e9d4914SAndroid Build Coastguard Worker        if test "x$supports_anon_versioning" = xyes; then
4839*2e9d4914SAndroid Build Coastguard Worker          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4840*2e9d4914SAndroid Build Coastguard Worker	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4841*2e9d4914SAndroid Build Coastguard Worker	    echo "local: *; };" >> $output_objdir/$libname.ver~
4842*2e9d4914SAndroid 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'
4843*2e9d4914SAndroid Build Coastguard Worker        fi
4844*2e9d4914SAndroid Build Coastguard Worker
4845*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
4846*2e9d4914SAndroid Build Coastguard Worker	xlf* | bgf* | bgxlf* | mpixlf*)
4847*2e9d4914SAndroid Build Coastguard Worker	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4848*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4849*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4850*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4851*2e9d4914SAndroid Build Coastguard Worker	  if test "x$supports_anon_versioning" = xyes; then
4852*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4853*2e9d4914SAndroid Build Coastguard Worker	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4854*2e9d4914SAndroid Build Coastguard Worker	      echo "local: *; };" >> $output_objdir/$libname.ver~
4855*2e9d4914SAndroid Build Coastguard Worker	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4856*2e9d4914SAndroid Build Coastguard Worker	  fi
4857*2e9d4914SAndroid Build Coastguard Worker	  ;;
4858*2e9d4914SAndroid Build Coastguard Worker	esac
4859*2e9d4914SAndroid Build Coastguard Worker      else
4860*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
4861*2e9d4914SAndroid Build Coastguard Worker      fi
4862*2e9d4914SAndroid Build Coastguard Worker      ;;
4863*2e9d4914SAndroid Build Coastguard Worker
4864*2e9d4914SAndroid Build Coastguard Worker    netbsd*)
4865*2e9d4914SAndroid Build Coastguard Worker      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4866*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4867*2e9d4914SAndroid Build Coastguard Worker	wlarc=
4868*2e9d4914SAndroid Build Coastguard Worker      else
4869*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4870*2e9d4914SAndroid 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'
4871*2e9d4914SAndroid Build Coastguard Worker      fi
4872*2e9d4914SAndroid Build Coastguard Worker      ;;
4873*2e9d4914SAndroid Build Coastguard Worker
4874*2e9d4914SAndroid Build Coastguard Worker    solaris*)
4875*2e9d4914SAndroid Build Coastguard Worker      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4876*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4877*2e9d4914SAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
4878*2e9d4914SAndroid Build Coastguard Worker
4879*2e9d4914SAndroid Build Coastguard Worker*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4880*2e9d4914SAndroid Build Coastguard Worker*** create shared libraries on Solaris systems.  Therefore, libtool
4881*2e9d4914SAndroid Build Coastguard Worker*** is disabling shared libraries support.  We urge you to upgrade GNU
4882*2e9d4914SAndroid Build Coastguard Worker*** binutils to release 2.9.1 or newer.  Another option is to modify
4883*2e9d4914SAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is
4884*2e9d4914SAndroid Build Coastguard Worker*** used, and then restart.
4885*2e9d4914SAndroid Build Coastguard Worker
4886*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
4887*2e9d4914SAndroid Build Coastguard Worker      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4888*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4889*2e9d4914SAndroid 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'
4890*2e9d4914SAndroid Build Coastguard Worker      else
4891*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4892*2e9d4914SAndroid Build Coastguard Worker      fi
4893*2e9d4914SAndroid Build Coastguard Worker      ;;
4894*2e9d4914SAndroid Build Coastguard Worker
4895*2e9d4914SAndroid Build Coastguard Worker    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4896*2e9d4914SAndroid Build Coastguard Worker      case `$LD -v 2>&1` in
4897*2e9d4914SAndroid Build Coastguard Worker        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4898*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4899*2e9d4914SAndroid Build Coastguard Worker	cat <<_LT_EOF 1>&2
4900*2e9d4914SAndroid Build Coastguard Worker
4901*2e9d4914SAndroid Build Coastguard Worker*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4902*2e9d4914SAndroid Build Coastguard Worker*** reliably create shared libraries on SCO systems.  Therefore, libtool
4903*2e9d4914SAndroid Build Coastguard Worker*** is disabling shared libraries support.  We urge you to upgrade GNU
4904*2e9d4914SAndroid Build Coastguard Worker*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4905*2e9d4914SAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is
4906*2e9d4914SAndroid Build Coastguard Worker*** used, and then restart.
4907*2e9d4914SAndroid Build Coastguard Worker
4908*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
4909*2e9d4914SAndroid Build Coastguard Worker	;;
4910*2e9d4914SAndroid Build Coastguard Worker	*)
4911*2e9d4914SAndroid Build Coastguard Worker	  # For security reasons, it is highly recommended that you always
4912*2e9d4914SAndroid Build Coastguard Worker	  # use absolute paths for naming shared libraries, and exclude the
4913*2e9d4914SAndroid Build Coastguard Worker	  # DT_RUNPATH tag from executables and libraries.  But doing so
4914*2e9d4914SAndroid Build Coastguard Worker	  # requires that you compile everything twice, which is a pain.
4915*2e9d4914SAndroid Build Coastguard Worker	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4916*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4917*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4918*2e9d4914SAndroid 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'
4919*2e9d4914SAndroid Build Coastguard Worker	  else
4920*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
4921*2e9d4914SAndroid Build Coastguard Worker	  fi
4922*2e9d4914SAndroid Build Coastguard Worker	;;
4923*2e9d4914SAndroid Build Coastguard Worker      esac
4924*2e9d4914SAndroid Build Coastguard Worker      ;;
4925*2e9d4914SAndroid Build Coastguard Worker
4926*2e9d4914SAndroid Build Coastguard Worker    sunos4*)
4927*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4928*2e9d4914SAndroid Build Coastguard Worker      wlarc=
4929*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
4930*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4931*2e9d4914SAndroid Build Coastguard Worker      ;;
4932*2e9d4914SAndroid Build Coastguard Worker
4933*2e9d4914SAndroid Build Coastguard Worker    *)
4934*2e9d4914SAndroid Build Coastguard Worker      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4935*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4936*2e9d4914SAndroid 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'
4937*2e9d4914SAndroid Build Coastguard Worker      else
4938*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
4939*2e9d4914SAndroid Build Coastguard Worker      fi
4940*2e9d4914SAndroid Build Coastguard Worker      ;;
4941*2e9d4914SAndroid Build Coastguard Worker    esac
4942*2e9d4914SAndroid Build Coastguard Worker
4943*2e9d4914SAndroid Build Coastguard Worker    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4944*2e9d4914SAndroid Build Coastguard Worker      runpath_var=
4945*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4946*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4947*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4948*2e9d4914SAndroid Build Coastguard Worker    fi
4949*2e9d4914SAndroid Build Coastguard Worker  else
4950*2e9d4914SAndroid Build Coastguard Worker    # PORTME fill in a description of your system's linker (not GNU ld)
4951*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
4952*2e9d4914SAndroid Build Coastguard Worker    aix3*)
4953*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4954*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=yes
4955*2e9d4914SAndroid 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'
4956*2e9d4914SAndroid Build Coastguard Worker      # Note: this linker hardcodes the directories in LIBPATH if there
4957*2e9d4914SAndroid Build Coastguard Worker      # are no directories specified by -L.
4958*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4959*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4960*2e9d4914SAndroid Build Coastguard Worker	# Neither direct hardcoding nor static linking is supported with a
4961*2e9d4914SAndroid Build Coastguard Worker	# broken collect2.
4962*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4963*2e9d4914SAndroid Build Coastguard Worker      fi
4964*2e9d4914SAndroid Build Coastguard Worker      ;;
4965*2e9d4914SAndroid Build Coastguard Worker
4966*2e9d4914SAndroid Build Coastguard Worker    aix[[4-9]]*)
4967*2e9d4914SAndroid Build Coastguard Worker      if test "$host_cpu" = ia64; then
4968*2e9d4914SAndroid Build Coastguard Worker	# On IA64, the linker does run time linking by default, so we don't
4969*2e9d4914SAndroid Build Coastguard Worker	# have to do anything special.
4970*2e9d4914SAndroid Build Coastguard Worker	aix_use_runtimelinking=no
4971*2e9d4914SAndroid Build Coastguard Worker	exp_sym_flag='-Bexport'
4972*2e9d4914SAndroid Build Coastguard Worker	no_entry_flag=""
4973*2e9d4914SAndroid Build Coastguard Worker      else
4974*2e9d4914SAndroid Build Coastguard Worker	# If we're using GNU nm, then we don't want the "-C" option.
4975*2e9d4914SAndroid Build Coastguard Worker	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4976*2e9d4914SAndroid Build Coastguard Worker	# Also, AIX nm treats weak defined symbols like other global
4977*2e9d4914SAndroid Build Coastguard Worker	# defined symbols, whereas GNU nm marks them as "W".
4978*2e9d4914SAndroid Build Coastguard Worker	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4979*2e9d4914SAndroid 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4980*2e9d4914SAndroid Build Coastguard Worker	else
4981*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4982*2e9d4914SAndroid Build Coastguard Worker	fi
4983*2e9d4914SAndroid Build Coastguard Worker	aix_use_runtimelinking=no
4984*2e9d4914SAndroid Build Coastguard Worker
4985*2e9d4914SAndroid Build Coastguard Worker	# Test if we are trying to use run time linking or normal
4986*2e9d4914SAndroid Build Coastguard Worker	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4987*2e9d4914SAndroid Build Coastguard Worker	# need to do runtime linking.
4988*2e9d4914SAndroid Build Coastguard Worker	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4989*2e9d4914SAndroid Build Coastguard Worker	  for ld_flag in $LDFLAGS; do
4990*2e9d4914SAndroid Build Coastguard Worker	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4991*2e9d4914SAndroid Build Coastguard Worker	    aix_use_runtimelinking=yes
4992*2e9d4914SAndroid Build Coastguard Worker	    break
4993*2e9d4914SAndroid Build Coastguard Worker	  fi
4994*2e9d4914SAndroid Build Coastguard Worker	  done
4995*2e9d4914SAndroid Build Coastguard Worker	  ;;
4996*2e9d4914SAndroid Build Coastguard Worker	esac
4997*2e9d4914SAndroid Build Coastguard Worker
4998*2e9d4914SAndroid Build Coastguard Worker	exp_sym_flag='-bexport'
4999*2e9d4914SAndroid Build Coastguard Worker	no_entry_flag='-bnoentry'
5000*2e9d4914SAndroid Build Coastguard Worker      fi
5001*2e9d4914SAndroid Build Coastguard Worker
5002*2e9d4914SAndroid Build Coastguard Worker      # When large executables or shared objects are built, AIX ld can
5003*2e9d4914SAndroid Build Coastguard Worker      # have problems creating the table of contents.  If linking a library
5004*2e9d4914SAndroid Build Coastguard Worker      # or program results in "error TOC overflow" add -mminimal-toc to
5005*2e9d4914SAndroid Build Coastguard Worker      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5006*2e9d4914SAndroid Build Coastguard Worker      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5007*2e9d4914SAndroid Build Coastguard Worker
5008*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)=''
5009*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5010*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5011*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5012*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5013*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5014*2e9d4914SAndroid Build Coastguard Worker
5015*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5016*2e9d4914SAndroid Build Coastguard Worker	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5017*2e9d4914SAndroid Build Coastguard Worker	# We only want to do this on AIX 4.2 and lower, the check
5018*2e9d4914SAndroid Build Coastguard Worker	# below for broken collect2 doesn't work under 4.3+
5019*2e9d4914SAndroid Build Coastguard Worker	  collect2name=`${CC} -print-prog-name=collect2`
5020*2e9d4914SAndroid Build Coastguard Worker	  if test -f "$collect2name" &&
5021*2e9d4914SAndroid Build Coastguard Worker	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5022*2e9d4914SAndroid Build Coastguard Worker	  then
5023*2e9d4914SAndroid Build Coastguard Worker	  # We have reworked collect2
5024*2e9d4914SAndroid Build Coastguard Worker	  :
5025*2e9d4914SAndroid Build Coastguard Worker	  else
5026*2e9d4914SAndroid Build Coastguard Worker	  # We have old collect2
5027*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5028*2e9d4914SAndroid Build Coastguard Worker	  # It fails to find uninstalled libraries when the uninstalled
5029*2e9d4914SAndroid Build Coastguard Worker	  # path is not listed in the libpath.  Setting hardcode_minus_L
5030*2e9d4914SAndroid Build Coastguard Worker	  # to unsupported forces relinking
5031*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5032*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5033*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5034*2e9d4914SAndroid Build Coastguard Worker	  fi
5035*2e9d4914SAndroid Build Coastguard Worker	  ;;
5036*2e9d4914SAndroid Build Coastguard Worker	esac
5037*2e9d4914SAndroid Build Coastguard Worker	shared_flag='-shared'
5038*2e9d4914SAndroid Build Coastguard Worker	if test "$aix_use_runtimelinking" = yes; then
5039*2e9d4914SAndroid Build Coastguard Worker	  shared_flag="$shared_flag "'${wl}-G'
5040*2e9d4914SAndroid Build Coastguard Worker	fi
5041*2e9d4914SAndroid Build Coastguard Worker      else
5042*2e9d4914SAndroid Build Coastguard Worker	# not using gcc
5043*2e9d4914SAndroid Build Coastguard Worker	if test "$host_cpu" = ia64; then
5044*2e9d4914SAndroid Build Coastguard Worker	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5045*2e9d4914SAndroid Build Coastguard Worker	# chokes on -Wl,-G. The following line is correct:
5046*2e9d4914SAndroid Build Coastguard Worker	  shared_flag='-G'
5047*2e9d4914SAndroid Build Coastguard Worker	else
5048*2e9d4914SAndroid Build Coastguard Worker	  if test "$aix_use_runtimelinking" = yes; then
5049*2e9d4914SAndroid Build Coastguard Worker	    shared_flag='${wl}-G'
5050*2e9d4914SAndroid Build Coastguard Worker	  else
5051*2e9d4914SAndroid Build Coastguard Worker	    shared_flag='${wl}-bM:SRE'
5052*2e9d4914SAndroid Build Coastguard Worker	  fi
5053*2e9d4914SAndroid Build Coastguard Worker	fi
5054*2e9d4914SAndroid Build Coastguard Worker      fi
5055*2e9d4914SAndroid Build Coastguard Worker
5056*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5057*2e9d4914SAndroid Build Coastguard Worker      # It seems that -bexpall does not export symbols beginning with
5058*2e9d4914SAndroid Build Coastguard Worker      # underscore (_), so it is better to generate a list of symbols to export.
5059*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(always_export_symbols, $1)=yes
5060*2e9d4914SAndroid Build Coastguard Worker      if test "$aix_use_runtimelinking" = yes; then
5061*2e9d4914SAndroid Build Coastguard Worker	# Warning - without using the other runtime loading flags (-brtl),
5062*2e9d4914SAndroid Build Coastguard Worker	# -berok will link without error, but may produce a broken library.
5063*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5064*2e9d4914SAndroid Build Coastguard Worker        # Determine the default libpath from the value encoded in an
5065*2e9d4914SAndroid Build Coastguard Worker        # empty executable.
5066*2e9d4914SAndroid Build Coastguard Worker        _LT_SYS_MODULE_PATH_AIX([$1])
5067*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5068*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5069*2e9d4914SAndroid Build Coastguard Worker      else
5070*2e9d4914SAndroid Build Coastguard Worker	if test "$host_cpu" = ia64; then
5071*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5072*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5073*2e9d4914SAndroid 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"
5074*2e9d4914SAndroid Build Coastguard Worker	else
5075*2e9d4914SAndroid Build Coastguard Worker	 # Determine the default libpath from the value encoded in an
5076*2e9d4914SAndroid Build Coastguard Worker	 # empty executable.
5077*2e9d4914SAndroid Build Coastguard Worker	 _LT_SYS_MODULE_PATH_AIX([$1])
5078*2e9d4914SAndroid Build Coastguard Worker	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5079*2e9d4914SAndroid Build Coastguard Worker	  # Warning - without using the other run time loading flags,
5080*2e9d4914SAndroid Build Coastguard Worker	  # -berok will link without error, but may produce a broken library.
5081*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5082*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5083*2e9d4914SAndroid Build Coastguard Worker	  if test "$with_gnu_ld" = yes; then
5084*2e9d4914SAndroid Build Coastguard Worker	    # We only use this code for GNU lds that support --whole-archive.
5085*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5086*2e9d4914SAndroid Build Coastguard Worker	  else
5087*2e9d4914SAndroid Build Coastguard Worker	    # Exported symbols can be pulled into shared objects from archives
5088*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5089*2e9d4914SAndroid Build Coastguard Worker	  fi
5090*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5091*2e9d4914SAndroid Build Coastguard Worker	  # This is similar to how AIX traditionally builds its shared libraries.
5092*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5093*2e9d4914SAndroid Build Coastguard Worker	fi
5094*2e9d4914SAndroid Build Coastguard Worker      fi
5095*2e9d4914SAndroid Build Coastguard Worker      ;;
5096*2e9d4914SAndroid Build Coastguard Worker
5097*2e9d4914SAndroid Build Coastguard Worker    amigaos*)
5098*2e9d4914SAndroid Build Coastguard Worker      case $host_cpu in
5099*2e9d4914SAndroid Build Coastguard Worker      powerpc)
5100*2e9d4914SAndroid Build Coastguard Worker            # see comment about AmigaOS4 .so support
5101*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5102*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5103*2e9d4914SAndroid Build Coastguard Worker        ;;
5104*2e9d4914SAndroid Build Coastguard Worker      m68k)
5105*2e9d4914SAndroid 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)'
5106*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5107*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5108*2e9d4914SAndroid Build Coastguard Worker        ;;
5109*2e9d4914SAndroid Build Coastguard Worker      esac
5110*2e9d4914SAndroid Build Coastguard Worker      ;;
5111*2e9d4914SAndroid Build Coastguard Worker
5112*2e9d4914SAndroid Build Coastguard Worker    bsdi[[45]]*)
5113*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5114*2e9d4914SAndroid Build Coastguard Worker      ;;
5115*2e9d4914SAndroid Build Coastguard Worker
5116*2e9d4914SAndroid Build Coastguard Worker    cygwin* | mingw* | pw32* | cegcc*)
5117*2e9d4914SAndroid Build Coastguard Worker      # When not using gcc, we currently assume that we are using
5118*2e9d4914SAndroid Build Coastguard Worker      # Microsoft Visual C++.
5119*2e9d4914SAndroid Build Coastguard Worker      # hardcode_libdir_flag_spec is actually meaningless, as there is
5120*2e9d4914SAndroid Build Coastguard Worker      # no search path for DLLs.
5121*2e9d4914SAndroid Build Coastguard Worker      case $cc_basename in
5122*2e9d4914SAndroid Build Coastguard Worker      cl*)
5123*2e9d4914SAndroid Build Coastguard Worker	# Native MSVC
5124*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5125*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5126*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(always_export_symbols, $1)=yes
5127*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(file_list_spec, $1)='@'
5128*2e9d4914SAndroid Build Coastguard Worker	# Tell ltmain to make .lib files, not .a files.
5129*2e9d4914SAndroid Build Coastguard Worker	libext=lib
5130*2e9d4914SAndroid Build Coastguard Worker	# Tell ltmain to make .dll files, not .so files.
5131*2e9d4914SAndroid Build Coastguard Worker	shrext_cmds=".dll"
5132*2e9d4914SAndroid Build Coastguard Worker	# FIXME: Setting linknames here is a bad hack.
5133*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5134*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5135*2e9d4914SAndroid Build Coastguard Worker	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5136*2e9d4914SAndroid Build Coastguard Worker	  else
5137*2e9d4914SAndroid Build Coastguard Worker	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5138*2e9d4914SAndroid Build Coastguard Worker	  fi~
5139*2e9d4914SAndroid 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"~
5140*2e9d4914SAndroid Build Coastguard Worker	  linknames='
5141*2e9d4914SAndroid Build Coastguard Worker	# The linker will not automatically build a static lib if we build a DLL.
5142*2e9d4914SAndroid Build Coastguard Worker	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5143*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5144*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5145*2e9d4914SAndroid 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'
5146*2e9d4914SAndroid Build Coastguard Worker	# Don't use ranlib
5147*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5148*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5149*2e9d4914SAndroid Build Coastguard Worker	  lt_tool_outputfile="@TOOL_OUTPUT@"~
5150*2e9d4914SAndroid Build Coastguard Worker	  case $lt_outputfile in
5151*2e9d4914SAndroid Build Coastguard Worker	    *.exe|*.EXE) ;;
5152*2e9d4914SAndroid Build Coastguard Worker	    *)
5153*2e9d4914SAndroid Build Coastguard Worker	      lt_outputfile="$lt_outputfile.exe"
5154*2e9d4914SAndroid Build Coastguard Worker	      lt_tool_outputfile="$lt_tool_outputfile.exe"
5155*2e9d4914SAndroid Build Coastguard Worker	      ;;
5156*2e9d4914SAndroid Build Coastguard Worker	  esac~
5157*2e9d4914SAndroid Build Coastguard Worker	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5158*2e9d4914SAndroid Build Coastguard Worker	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5159*2e9d4914SAndroid Build Coastguard Worker	    $RM "$lt_outputfile.manifest";
5160*2e9d4914SAndroid Build Coastguard Worker	  fi'
5161*2e9d4914SAndroid Build Coastguard Worker	;;
5162*2e9d4914SAndroid Build Coastguard Worker      *)
5163*2e9d4914SAndroid Build Coastguard Worker	# Assume MSVC wrapper
5164*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5165*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5166*2e9d4914SAndroid Build Coastguard Worker	# Tell ltmain to make .lib files, not .a files.
5167*2e9d4914SAndroid Build Coastguard Worker	libext=lib
5168*2e9d4914SAndroid Build Coastguard Worker	# Tell ltmain to make .dll files, not .so files.
5169*2e9d4914SAndroid Build Coastguard Worker	shrext_cmds=".dll"
5170*2e9d4914SAndroid Build Coastguard Worker	# FIXME: Setting linknames here is a bad hack.
5171*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5172*2e9d4914SAndroid Build Coastguard Worker	# The linker will automatically build a .lib file if we build a DLL.
5173*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5174*2e9d4914SAndroid Build Coastguard Worker	# FIXME: Should let the user specify the lib program.
5175*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5176*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5177*2e9d4914SAndroid Build Coastguard Worker	;;
5178*2e9d4914SAndroid Build Coastguard Worker      esac
5179*2e9d4914SAndroid Build Coastguard Worker      ;;
5180*2e9d4914SAndroid Build Coastguard Worker
5181*2e9d4914SAndroid Build Coastguard Worker    darwin* | rhapsody*)
5182*2e9d4914SAndroid Build Coastguard Worker      _LT_DARWIN_LINKER_FEATURES($1)
5183*2e9d4914SAndroid Build Coastguard Worker      ;;
5184*2e9d4914SAndroid Build Coastguard Worker
5185*2e9d4914SAndroid Build Coastguard Worker    dgux*)
5186*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5187*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5188*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5189*2e9d4914SAndroid Build Coastguard Worker      ;;
5190*2e9d4914SAndroid Build Coastguard Worker
5191*2e9d4914SAndroid Build Coastguard Worker    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5192*2e9d4914SAndroid Build Coastguard Worker    # support.  Future versions do this automatically, but an explicit c++rt0.o
5193*2e9d4914SAndroid Build Coastguard Worker    # does not break anything, and helps significantly (at the cost of a little
5194*2e9d4914SAndroid Build Coastguard Worker    # extra space).
5195*2e9d4914SAndroid Build Coastguard Worker    freebsd2.2*)
5196*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5197*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5198*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5199*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5200*2e9d4914SAndroid Build Coastguard Worker      ;;
5201*2e9d4914SAndroid Build Coastguard Worker
5202*2e9d4914SAndroid Build Coastguard Worker    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5203*2e9d4914SAndroid Build Coastguard Worker    freebsd2.*)
5204*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5205*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5206*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5207*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5208*2e9d4914SAndroid Build Coastguard Worker      ;;
5209*2e9d4914SAndroid Build Coastguard Worker
5210*2e9d4914SAndroid Build Coastguard Worker    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5211*2e9d4914SAndroid Build Coastguard Worker    freebsd* | dragonfly*)
5212*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5213*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5214*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5215*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5216*2e9d4914SAndroid Build Coastguard Worker      ;;
5217*2e9d4914SAndroid Build Coastguard Worker
5218*2e9d4914SAndroid Build Coastguard Worker    hpux9*)
5219*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5220*2e9d4914SAndroid 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5221*2e9d4914SAndroid Build Coastguard Worker      else
5222*2e9d4914SAndroid 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5223*2e9d4914SAndroid Build Coastguard Worker      fi
5224*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5225*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5226*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5227*2e9d4914SAndroid Build Coastguard Worker
5228*2e9d4914SAndroid Build Coastguard Worker      # hardcode_minus_L: Not really in the search PATH,
5229*2e9d4914SAndroid Build Coastguard Worker      # but as the default location of the library.
5230*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5231*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5232*2e9d4914SAndroid Build Coastguard Worker      ;;
5233*2e9d4914SAndroid Build Coastguard Worker
5234*2e9d4914SAndroid Build Coastguard Worker    hpux10*)
5235*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5236*2e9d4914SAndroid 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'
5237*2e9d4914SAndroid Build Coastguard Worker      else
5238*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5239*2e9d4914SAndroid Build Coastguard Worker      fi
5240*2e9d4914SAndroid Build Coastguard Worker      if test "$with_gnu_ld" = no; then
5241*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5242*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5243*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=yes
5244*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5245*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5246*2e9d4914SAndroid Build Coastguard Worker	# hardcode_minus_L: Not really in the search PATH,
5247*2e9d4914SAndroid Build Coastguard Worker	# but as the default location of the library.
5248*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5249*2e9d4914SAndroid Build Coastguard Worker      fi
5250*2e9d4914SAndroid Build Coastguard Worker      ;;
5251*2e9d4914SAndroid Build Coastguard Worker
5252*2e9d4914SAndroid Build Coastguard Worker    hpux11*)
5253*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5254*2e9d4914SAndroid Build Coastguard Worker	case $host_cpu in
5255*2e9d4914SAndroid Build Coastguard Worker	hppa*64*)
5256*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5257*2e9d4914SAndroid Build Coastguard Worker	  ;;
5258*2e9d4914SAndroid Build Coastguard Worker	ia64*)
5259*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5260*2e9d4914SAndroid Build Coastguard Worker	  ;;
5261*2e9d4914SAndroid Build Coastguard Worker	*)
5262*2e9d4914SAndroid 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'
5263*2e9d4914SAndroid Build Coastguard Worker	  ;;
5264*2e9d4914SAndroid Build Coastguard Worker	esac
5265*2e9d4914SAndroid Build Coastguard Worker      else
5266*2e9d4914SAndroid Build Coastguard Worker	case $host_cpu in
5267*2e9d4914SAndroid Build Coastguard Worker	hppa*64*)
5268*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5269*2e9d4914SAndroid Build Coastguard Worker	  ;;
5270*2e9d4914SAndroid Build Coastguard Worker	ia64*)
5271*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5272*2e9d4914SAndroid Build Coastguard Worker	  ;;
5273*2e9d4914SAndroid Build Coastguard Worker	*)
5274*2e9d4914SAndroid Build Coastguard Worker	m4_if($1, [], [
5275*2e9d4914SAndroid Build Coastguard Worker	  # Older versions of the 11.00 compiler do not understand -b yet
5276*2e9d4914SAndroid Build Coastguard Worker	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5277*2e9d4914SAndroid Build Coastguard Worker	  _LT_LINKER_OPTION([if $CC understands -b],
5278*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5279*2e9d4914SAndroid 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'],
5280*2e9d4914SAndroid Build Coastguard Worker	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5281*2e9d4914SAndroid 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'])
5282*2e9d4914SAndroid Build Coastguard Worker	  ;;
5283*2e9d4914SAndroid Build Coastguard Worker	esac
5284*2e9d4914SAndroid Build Coastguard Worker      fi
5285*2e9d4914SAndroid Build Coastguard Worker      if test "$with_gnu_ld" = no; then
5286*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5287*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5288*2e9d4914SAndroid Build Coastguard Worker
5289*2e9d4914SAndroid Build Coastguard Worker	case $host_cpu in
5290*2e9d4914SAndroid Build Coastguard Worker	hppa*64*|ia64*)
5291*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no
5292*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5293*2e9d4914SAndroid Build Coastguard Worker	  ;;
5294*2e9d4914SAndroid Build Coastguard Worker	*)
5295*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
5296*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5297*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5298*2e9d4914SAndroid Build Coastguard Worker
5299*2e9d4914SAndroid Build Coastguard Worker	  # hardcode_minus_L: Not really in the search PATH,
5300*2e9d4914SAndroid Build Coastguard Worker	  # but as the default location of the library.
5301*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5302*2e9d4914SAndroid Build Coastguard Worker	  ;;
5303*2e9d4914SAndroid Build Coastguard Worker	esac
5304*2e9d4914SAndroid Build Coastguard Worker      fi
5305*2e9d4914SAndroid Build Coastguard Worker      ;;
5306*2e9d4914SAndroid Build Coastguard Worker
5307*2e9d4914SAndroid Build Coastguard Worker    irix5* | irix6* | nonstopux*)
5308*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5309*2e9d4914SAndroid 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'
5310*2e9d4914SAndroid Build Coastguard Worker	# Try to use the -exported_symbol ld option, if it does not
5311*2e9d4914SAndroid Build Coastguard Worker	# work, assume that -exports_file does not work either and
5312*2e9d4914SAndroid Build Coastguard Worker	# implicitly export all symbols.
5313*2e9d4914SAndroid Build Coastguard Worker	# This should be the same for all languages, so no per-tag cache variable.
5314*2e9d4914SAndroid Build Coastguard Worker	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5315*2e9d4914SAndroid Build Coastguard Worker	  [lt_cv_irix_exported_symbol],
5316*2e9d4914SAndroid Build Coastguard Worker	  [save_LDFLAGS="$LDFLAGS"
5317*2e9d4914SAndroid Build Coastguard Worker	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5318*2e9d4914SAndroid Build Coastguard Worker	   AC_LINK_IFELSE(
5319*2e9d4914SAndroid Build Coastguard Worker	     [AC_LANG_SOURCE(
5320*2e9d4914SAndroid Build Coastguard Worker	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5321*2e9d4914SAndroid Build Coastguard Worker			      [C++], [[int foo (void) { return 0; }]],
5322*2e9d4914SAndroid Build Coastguard Worker			      [Fortran 77], [[
5323*2e9d4914SAndroid Build Coastguard Worker      subroutine foo
5324*2e9d4914SAndroid Build Coastguard Worker      end]],
5325*2e9d4914SAndroid Build Coastguard Worker			      [Fortran], [[
5326*2e9d4914SAndroid Build Coastguard Worker      subroutine foo
5327*2e9d4914SAndroid Build Coastguard Worker      end]])])],
5328*2e9d4914SAndroid Build Coastguard Worker	      [lt_cv_irix_exported_symbol=yes],
5329*2e9d4914SAndroid Build Coastguard Worker	      [lt_cv_irix_exported_symbol=no])
5330*2e9d4914SAndroid Build Coastguard Worker           LDFLAGS="$save_LDFLAGS"])
5331*2e9d4914SAndroid Build Coastguard Worker	if test "$lt_cv_irix_exported_symbol" = yes; then
5332*2e9d4914SAndroid 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'
5333*2e9d4914SAndroid Build Coastguard Worker	fi
5334*2e9d4914SAndroid Build Coastguard Worker      else
5335*2e9d4914SAndroid 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'
5336*2e9d4914SAndroid 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'
5337*2e9d4914SAndroid Build Coastguard Worker      fi
5338*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5339*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5340*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5341*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(inherit_rpath, $1)=yes
5342*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5343*2e9d4914SAndroid Build Coastguard Worker      ;;
5344*2e9d4914SAndroid Build Coastguard Worker
5345*2e9d4914SAndroid Build Coastguard Worker    netbsd*)
5346*2e9d4914SAndroid Build Coastguard Worker      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5347*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5348*2e9d4914SAndroid Build Coastguard Worker      else
5349*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5350*2e9d4914SAndroid Build Coastguard Worker      fi
5351*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5352*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5353*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5354*2e9d4914SAndroid Build Coastguard Worker      ;;
5355*2e9d4914SAndroid Build Coastguard Worker
5356*2e9d4914SAndroid Build Coastguard Worker    newsos6)
5357*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5358*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5359*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5360*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5361*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5362*2e9d4914SAndroid Build Coastguard Worker      ;;
5363*2e9d4914SAndroid Build Coastguard Worker
5364*2e9d4914SAndroid Build Coastguard Worker    *nto* | *qnx*)
5365*2e9d4914SAndroid Build Coastguard Worker      ;;
5366*2e9d4914SAndroid Build Coastguard Worker
5367*2e9d4914SAndroid Build Coastguard Worker    openbsd*)
5368*2e9d4914SAndroid Build Coastguard Worker      if test -f /usr/libexec/ld.so; then
5369*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=yes
5370*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5371*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5372*2e9d4914SAndroid Build Coastguard Worker	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5373*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5374*2e9d4914SAndroid 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'
5375*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5376*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5377*2e9d4914SAndroid Build Coastguard Worker	else
5378*2e9d4914SAndroid Build Coastguard Worker	  case $host_os in
5379*2e9d4914SAndroid Build Coastguard Worker	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5380*2e9d4914SAndroid Build Coastguard Worker	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5381*2e9d4914SAndroid Build Coastguard Worker	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5382*2e9d4914SAndroid Build Coastguard Worker	     ;;
5383*2e9d4914SAndroid Build Coastguard Worker	   *)
5384*2e9d4914SAndroid Build Coastguard Worker	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5385*2e9d4914SAndroid Build Coastguard Worker	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5386*2e9d4914SAndroid Build Coastguard Worker	     ;;
5387*2e9d4914SAndroid Build Coastguard Worker	  esac
5388*2e9d4914SAndroid Build Coastguard Worker	fi
5389*2e9d4914SAndroid Build Coastguard Worker      else
5390*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
5391*2e9d4914SAndroid Build Coastguard Worker      fi
5392*2e9d4914SAndroid Build Coastguard Worker      ;;
5393*2e9d4914SAndroid Build Coastguard Worker
5394*2e9d4914SAndroid Build Coastguard Worker    os2*)
5395*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5396*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5397*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5398*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5399*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5400*2e9d4914SAndroid Build Coastguard Worker      ;;
5401*2e9d4914SAndroid Build Coastguard Worker
5402*2e9d4914SAndroid Build Coastguard Worker    osf3*)
5403*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5404*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5405*2e9d4914SAndroid 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'
5406*2e9d4914SAndroid Build Coastguard Worker      else
5407*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5408*2e9d4914SAndroid 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'
5409*2e9d4914SAndroid Build Coastguard Worker      fi
5410*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5411*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5412*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5413*2e9d4914SAndroid Build Coastguard Worker      ;;
5414*2e9d4914SAndroid Build Coastguard Worker
5415*2e9d4914SAndroid Build Coastguard Worker    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5416*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5417*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5418*2e9d4914SAndroid 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'
5419*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5420*2e9d4914SAndroid Build Coastguard Worker      else
5421*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5422*2e9d4914SAndroid 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'
5423*2e9d4914SAndroid 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~
5424*2e9d4914SAndroid 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'
5425*2e9d4914SAndroid Build Coastguard Worker
5426*2e9d4914SAndroid Build Coastguard Worker	# Both c and cxx compiler support -rpath directly
5427*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5428*2e9d4914SAndroid Build Coastguard Worker      fi
5429*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5430*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5431*2e9d4914SAndroid Build Coastguard Worker      ;;
5432*2e9d4914SAndroid Build Coastguard Worker
5433*2e9d4914SAndroid Build Coastguard Worker    solaris*)
5434*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5435*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5436*2e9d4914SAndroid Build Coastguard Worker	wlarc='${wl}'
5437*2e9d4914SAndroid 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'
5438*2e9d4914SAndroid 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~
5439*2e9d4914SAndroid 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'
5440*2e9d4914SAndroid Build Coastguard Worker      else
5441*2e9d4914SAndroid Build Coastguard Worker	case `$CC -V 2>&1` in
5442*2e9d4914SAndroid Build Coastguard Worker	*"Compilers 5.0"*)
5443*2e9d4914SAndroid Build Coastguard Worker	  wlarc=''
5444*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5445*2e9d4914SAndroid 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~
5446*2e9d4914SAndroid Build Coastguard Worker	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5447*2e9d4914SAndroid Build Coastguard Worker	  ;;
5448*2e9d4914SAndroid Build Coastguard Worker	*)
5449*2e9d4914SAndroid Build Coastguard Worker	  wlarc='${wl}'
5450*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5451*2e9d4914SAndroid 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~
5452*2e9d4914SAndroid Build Coastguard Worker	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5453*2e9d4914SAndroid Build Coastguard Worker	  ;;
5454*2e9d4914SAndroid Build Coastguard Worker	esac
5455*2e9d4914SAndroid Build Coastguard Worker      fi
5456*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5457*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5458*2e9d4914SAndroid Build Coastguard Worker      case $host_os in
5459*2e9d4914SAndroid Build Coastguard Worker      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5460*2e9d4914SAndroid Build Coastguard Worker      *)
5461*2e9d4914SAndroid Build Coastguard Worker	# The compiler driver will combine and reorder linker options,
5462*2e9d4914SAndroid Build Coastguard Worker	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5463*2e9d4914SAndroid Build Coastguard Worker	# but is careful enough not to reorder.
5464*2e9d4914SAndroid Build Coastguard Worker	# Supported since Solaris 2.6 (maybe 2.5.1?)
5465*2e9d4914SAndroid Build Coastguard Worker	if test "$GCC" = yes; then
5466*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5467*2e9d4914SAndroid Build Coastguard Worker	else
5468*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5469*2e9d4914SAndroid Build Coastguard Worker	fi
5470*2e9d4914SAndroid Build Coastguard Worker	;;
5471*2e9d4914SAndroid Build Coastguard Worker      esac
5472*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5473*2e9d4914SAndroid Build Coastguard Worker      ;;
5474*2e9d4914SAndroid Build Coastguard Worker
5475*2e9d4914SAndroid Build Coastguard Worker    sunos4*)
5476*2e9d4914SAndroid Build Coastguard Worker      if test "x$host_vendor" = xsequent; then
5477*2e9d4914SAndroid Build Coastguard Worker	# Use $CC to link under sequent, because it throws in some extra .o
5478*2e9d4914SAndroid Build Coastguard Worker	# files that make .init and .fini sections work.
5479*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5480*2e9d4914SAndroid Build Coastguard Worker      else
5481*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5482*2e9d4914SAndroid Build Coastguard Worker      fi
5483*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5484*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_direct, $1)=yes
5485*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5486*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5487*2e9d4914SAndroid Build Coastguard Worker      ;;
5488*2e9d4914SAndroid Build Coastguard Worker
5489*2e9d4914SAndroid Build Coastguard Worker    sysv4)
5490*2e9d4914SAndroid Build Coastguard Worker      case $host_vendor in
5491*2e9d4914SAndroid Build Coastguard Worker	sni)
5492*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5493*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5494*2e9d4914SAndroid Build Coastguard Worker	;;
5495*2e9d4914SAndroid Build Coastguard Worker	siemens)
5496*2e9d4914SAndroid Build Coastguard Worker	  ## LD is ld it makes a PLAMLIB
5497*2e9d4914SAndroid Build Coastguard Worker	  ## CC just makes a GrossModule.
5498*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5499*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5500*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no
5501*2e9d4914SAndroid Build Coastguard Worker        ;;
5502*2e9d4914SAndroid Build Coastguard Worker	motorola)
5503*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5504*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5505*2e9d4914SAndroid Build Coastguard Worker	;;
5506*2e9d4914SAndroid Build Coastguard Worker      esac
5507*2e9d4914SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
5508*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5509*2e9d4914SAndroid Build Coastguard Worker      ;;
5510*2e9d4914SAndroid Build Coastguard Worker
5511*2e9d4914SAndroid Build Coastguard Worker    sysv4.3*)
5512*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5513*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5514*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5515*2e9d4914SAndroid Build Coastguard Worker      ;;
5516*2e9d4914SAndroid Build Coastguard Worker
5517*2e9d4914SAndroid Build Coastguard Worker    sysv4*MP*)
5518*2e9d4914SAndroid Build Coastguard Worker      if test -d /usr/nec; then
5519*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5520*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5521*2e9d4914SAndroid Build Coastguard Worker	runpath_var=LD_RUN_PATH
5522*2e9d4914SAndroid Build Coastguard Worker	hardcode_runpath_var=yes
5523*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=yes
5524*2e9d4914SAndroid Build Coastguard Worker      fi
5525*2e9d4914SAndroid Build Coastguard Worker      ;;
5526*2e9d4914SAndroid Build Coastguard Worker
5527*2e9d4914SAndroid Build Coastguard Worker    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5528*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5529*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5530*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5531*2e9d4914SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
5532*2e9d4914SAndroid Build Coastguard Worker
5533*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5534*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5535*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5536*2e9d4914SAndroid Build Coastguard Worker      else
5537*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5538*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5539*2e9d4914SAndroid Build Coastguard Worker      fi
5540*2e9d4914SAndroid Build Coastguard Worker      ;;
5541*2e9d4914SAndroid Build Coastguard Worker
5542*2e9d4914SAndroid Build Coastguard Worker    sysv5* | sco3.2v5* | sco5v6*)
5543*2e9d4914SAndroid Build Coastguard Worker      # Note: We can NOT use -z defs as we might desire, because we do not
5544*2e9d4914SAndroid Build Coastguard Worker      # link with -lc, and that would cause any symbols used from libc to
5545*2e9d4914SAndroid Build Coastguard Worker      # always be unresolved, which means just about no library would
5546*2e9d4914SAndroid Build Coastguard Worker      # ever link correctly.  If we're not using GNU ld we use -z text
5547*2e9d4914SAndroid Build Coastguard Worker      # though, which does catch some bad symbols but isn't as heavy-handed
5548*2e9d4914SAndroid Build Coastguard Worker      # as -z defs.
5549*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5550*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5551*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5552*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5553*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5554*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5555*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(link_all_deplibs, $1)=yes
5556*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5557*2e9d4914SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
5558*2e9d4914SAndroid Build Coastguard Worker
5559*2e9d4914SAndroid Build Coastguard Worker      if test "$GCC" = yes; then
5560*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5561*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5562*2e9d4914SAndroid Build Coastguard Worker      else
5563*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5564*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5565*2e9d4914SAndroid Build Coastguard Worker      fi
5566*2e9d4914SAndroid Build Coastguard Worker      ;;
5567*2e9d4914SAndroid Build Coastguard Worker
5568*2e9d4914SAndroid Build Coastguard Worker    uts4*)
5569*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5570*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5571*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5572*2e9d4914SAndroid Build Coastguard Worker      ;;
5573*2e9d4914SAndroid Build Coastguard Worker
5574*2e9d4914SAndroid Build Coastguard Worker    *)
5575*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(ld_shlibs, $1)=no
5576*2e9d4914SAndroid Build Coastguard Worker      ;;
5577*2e9d4914SAndroid Build Coastguard Worker    esac
5578*2e9d4914SAndroid Build Coastguard Worker
5579*2e9d4914SAndroid Build Coastguard Worker    if test x$host_vendor = xsni; then
5580*2e9d4914SAndroid Build Coastguard Worker      case $host in
5581*2e9d4914SAndroid Build Coastguard Worker      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5582*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5583*2e9d4914SAndroid Build Coastguard Worker	;;
5584*2e9d4914SAndroid Build Coastguard Worker      esac
5585*2e9d4914SAndroid Build Coastguard Worker    fi
5586*2e9d4914SAndroid Build Coastguard Worker  fi
5587*2e9d4914SAndroid Build Coastguard Worker])
5588*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5589*2e9d4914SAndroid Build Coastguard Workertest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5590*2e9d4914SAndroid Build Coastguard Worker
5591*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5592*2e9d4914SAndroid Build Coastguard Worker
5593*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5594*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5595*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [extract_expsyms_cmds], [2],
5596*2e9d4914SAndroid Build Coastguard Worker    [The commands to extract the exported symbol list from a shared archive])
5597*2e9d4914SAndroid Build Coastguard Worker
5598*2e9d4914SAndroid Build Coastguard Worker#
5599*2e9d4914SAndroid Build Coastguard Worker# Do we need to explicitly link libc?
5600*2e9d4914SAndroid Build Coastguard Worker#
5601*2e9d4914SAndroid Build Coastguard Workercase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5602*2e9d4914SAndroid Build Coastguard Workerx|xyes)
5603*2e9d4914SAndroid Build Coastguard Worker  # Assume -lc should be added
5604*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5605*2e9d4914SAndroid Build Coastguard Worker
5606*2e9d4914SAndroid Build Coastguard Worker  if test "$enable_shared" = yes && test "$GCC" = yes; then
5607*2e9d4914SAndroid Build Coastguard Worker    case $_LT_TAGVAR(archive_cmds, $1) in
5608*2e9d4914SAndroid Build Coastguard Worker    *'~'*)
5609*2e9d4914SAndroid Build Coastguard Worker      # FIXME: we may have to deal with multi-command sequences.
5610*2e9d4914SAndroid Build Coastguard Worker      ;;
5611*2e9d4914SAndroid Build Coastguard Worker    '$CC '*)
5612*2e9d4914SAndroid Build Coastguard Worker      # Test whether the compiler implicitly links with -lc since on some
5613*2e9d4914SAndroid Build Coastguard Worker      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5614*2e9d4914SAndroid Build Coastguard Worker      # to ld, don't add -lc before -lgcc.
5615*2e9d4914SAndroid Build Coastguard Worker      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5616*2e9d4914SAndroid Build Coastguard Worker	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5617*2e9d4914SAndroid Build Coastguard Worker	[$RM conftest*
5618*2e9d4914SAndroid Build Coastguard Worker	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5619*2e9d4914SAndroid Build Coastguard Worker
5620*2e9d4914SAndroid Build Coastguard Worker	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5621*2e9d4914SAndroid Build Coastguard Worker	  soname=conftest
5622*2e9d4914SAndroid Build Coastguard Worker	  lib=conftest
5623*2e9d4914SAndroid Build Coastguard Worker	  libobjs=conftest.$ac_objext
5624*2e9d4914SAndroid Build Coastguard Worker	  deplibs=
5625*2e9d4914SAndroid Build Coastguard Worker	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5626*2e9d4914SAndroid Build Coastguard Worker	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5627*2e9d4914SAndroid Build Coastguard Worker	  compiler_flags=-v
5628*2e9d4914SAndroid Build Coastguard Worker	  linker_flags=-v
5629*2e9d4914SAndroid Build Coastguard Worker	  verstring=
5630*2e9d4914SAndroid Build Coastguard Worker	  output_objdir=.
5631*2e9d4914SAndroid Build Coastguard Worker	  libname=conftest
5632*2e9d4914SAndroid Build Coastguard Worker	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5633*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=
5634*2e9d4914SAndroid Build Coastguard Worker	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5635*2e9d4914SAndroid Build Coastguard Worker	  then
5636*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5637*2e9d4914SAndroid Build Coastguard Worker	  else
5638*2e9d4914SAndroid Build Coastguard Worker	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5639*2e9d4914SAndroid Build Coastguard Worker	  fi
5640*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5641*2e9d4914SAndroid Build Coastguard Worker	else
5642*2e9d4914SAndroid Build Coastguard Worker	  cat conftest.err 1>&5
5643*2e9d4914SAndroid Build Coastguard Worker	fi
5644*2e9d4914SAndroid Build Coastguard Worker	$RM conftest*
5645*2e9d4914SAndroid Build Coastguard Worker	])
5646*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5647*2e9d4914SAndroid Build Coastguard Worker      ;;
5648*2e9d4914SAndroid Build Coastguard Worker    esac
5649*2e9d4914SAndroid Build Coastguard Worker  fi
5650*2e9d4914SAndroid Build Coastguard Worker  ;;
5651*2e9d4914SAndroid Build Coastguard Workeresac
5652*2e9d4914SAndroid Build Coastguard Worker
5653*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5654*2e9d4914SAndroid Build Coastguard Worker    [Whether or not to add -lc for building shared libraries])
5655*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5656*2e9d4914SAndroid Build Coastguard Worker    [enable_shared_with_static_runtimes], [0],
5657*2e9d4914SAndroid Build Coastguard Worker    [Whether or not to disallow shared libs when runtime libs are static])
5658*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5659*2e9d4914SAndroid Build Coastguard Worker    [Compiler flag to allow reflexive dlopens])
5660*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5661*2e9d4914SAndroid Build Coastguard Worker    [Compiler flag to generate shared objects directly from archives])
5662*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_needs_object], [1],
5663*2e9d4914SAndroid Build Coastguard Worker    [Whether the compiler copes with passing no objects directly])
5664*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5665*2e9d4914SAndroid Build Coastguard Worker    [Create an old-style archive from a shared archive])
5666*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5667*2e9d4914SAndroid Build Coastguard Worker    [Create a temporary old-style archive to link instead of a shared archive])
5668*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5669*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_expsym_cmds], [2])
5670*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [module_cmds], [2],
5671*2e9d4914SAndroid Build Coastguard Worker    [Commands used to build a loadable module if different from building
5672*2e9d4914SAndroid Build Coastguard Worker    a shared archive.])
5673*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [module_expsym_cmds], [2])
5674*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [with_gnu_ld], [1],
5675*2e9d4914SAndroid Build Coastguard Worker    [Whether we are building with GNU ld or not])
5676*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [allow_undefined_flag], [1],
5677*2e9d4914SAndroid Build Coastguard Worker    [Flag that allows shared libraries with undefined symbols to be built])
5678*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [no_undefined_flag], [1],
5679*2e9d4914SAndroid Build Coastguard Worker    [Flag that enforces no undefined symbols])
5680*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5681*2e9d4914SAndroid Build Coastguard Worker    [Flag to hardcode $libdir into a binary during linking.
5682*2e9d4914SAndroid Build Coastguard Worker    This must work even if $libdir does not exist])
5683*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5684*2e9d4914SAndroid Build Coastguard Worker    [Whether we need a single "-rpath" flag with a separated argument])
5685*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct], [0],
5686*2e9d4914SAndroid Build Coastguard Worker    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5687*2e9d4914SAndroid Build Coastguard Worker    DIR into the resulting binary])
5688*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5689*2e9d4914SAndroid Build Coastguard Worker    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5690*2e9d4914SAndroid Build Coastguard Worker    DIR into the resulting binary and the resulting library dependency is
5691*2e9d4914SAndroid Build Coastguard Worker    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5692*2e9d4914SAndroid Build Coastguard Worker    library is relocated])
5693*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_minus_L], [0],
5694*2e9d4914SAndroid Build Coastguard Worker    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5695*2e9d4914SAndroid Build Coastguard Worker    into the resulting binary])
5696*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5697*2e9d4914SAndroid Build Coastguard Worker    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5698*2e9d4914SAndroid Build Coastguard Worker    into the resulting binary])
5699*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_automatic], [0],
5700*2e9d4914SAndroid Build Coastguard Worker    [Set to "yes" if building a shared library automatically hardcodes DIR
5701*2e9d4914SAndroid Build Coastguard Worker    into the library and all subsequent libraries and executables linked
5702*2e9d4914SAndroid Build Coastguard Worker    against it])
5703*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [inherit_rpath], [0],
5704*2e9d4914SAndroid Build Coastguard Worker    [Set to yes if linker adds runtime paths of dependent libraries
5705*2e9d4914SAndroid Build Coastguard Worker    to runtime path list])
5706*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [link_all_deplibs], [0],
5707*2e9d4914SAndroid Build Coastguard Worker    [Whether libtool must link a program against all its dependency libraries])
5708*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [always_export_symbols], [0],
5709*2e9d4914SAndroid Build Coastguard Worker    [Set to "yes" if exported symbols are required])
5710*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [export_symbols_cmds], [2],
5711*2e9d4914SAndroid Build Coastguard Worker    [The commands to list exported symbols])
5712*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [exclude_expsyms], [1],
5713*2e9d4914SAndroid Build Coastguard Worker    [Symbols that should not be listed in the preloaded symbols])
5714*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [include_expsyms], [1],
5715*2e9d4914SAndroid Build Coastguard Worker    [Symbols that must always be exported])
5716*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [prelink_cmds], [2],
5717*2e9d4914SAndroid Build Coastguard Worker    [Commands necessary for linking programs (against libraries) with templates])
5718*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [postlink_cmds], [2],
5719*2e9d4914SAndroid Build Coastguard Worker    [Commands necessary for finishing linking programs])
5720*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [file_list_spec], [1],
5721*2e9d4914SAndroid Build Coastguard Worker    [Specify filename containing input files])
5722*2e9d4914SAndroid Build Coastguard Workerdnl FIXME: Not yet implemented
5723*2e9d4914SAndroid Build Coastguard Workerdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5724*2e9d4914SAndroid Build Coastguard Workerdnl    [Compiler flag to generate thread safe objects])
5725*2e9d4914SAndroid Build Coastguard Worker])# _LT_LINKER_SHLIBS
5726*2e9d4914SAndroid Build Coastguard Worker
5727*2e9d4914SAndroid Build Coastguard Worker
5728*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_C_CONFIG([TAG])
5729*2e9d4914SAndroid Build Coastguard Worker# ------------------------
5730*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for a C compiler are suitably
5731*2e9d4914SAndroid Build Coastguard Worker# defined.  These variables are subsequently used by _LT_CONFIG to write
5732*2e9d4914SAndroid Build Coastguard Worker# the compiler configuration to `libtool'.
5733*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_C_CONFIG],
5734*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl
5735*2e9d4914SAndroid Build Coastguard Workerlt_save_CC="$CC"
5736*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_PUSH(C)
5737*2e9d4914SAndroid Build Coastguard Worker
5738*2e9d4914SAndroid Build Coastguard Worker# Source file extension for C test sources.
5739*2e9d4914SAndroid Build Coastguard Workerac_ext=c
5740*2e9d4914SAndroid Build Coastguard Worker
5741*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled C test sources.
5742*2e9d4914SAndroid Build Coastguard Workerobjext=o
5743*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
5744*2e9d4914SAndroid Build Coastguard Worker
5745*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple compile tests
5746*2e9d4914SAndroid Build Coastguard Workerlt_simple_compile_test_code="int some_variable = 0;"
5747*2e9d4914SAndroid Build Coastguard Worker
5748*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple link tests
5749*2e9d4914SAndroid Build Coastguard Workerlt_simple_link_test_code='int main(){return(0);}'
5750*2e9d4914SAndroid Build Coastguard Worker
5751*2e9d4914SAndroid Build Coastguard Worker_LT_TAG_COMPILER
5752*2e9d4914SAndroid Build Coastguard Worker# Save the default compiler, since it gets overwritten when the other
5753*2e9d4914SAndroid Build Coastguard Worker# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5754*2e9d4914SAndroid Build Coastguard Workercompiler_DEFAULT=$CC
5755*2e9d4914SAndroid Build Coastguard Worker
5756*2e9d4914SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
5757*2e9d4914SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
5758*2e9d4914SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
5759*2e9d4914SAndroid Build Coastguard Worker
5760*2e9d4914SAndroid Build Coastguard Worker## CAVEAT EMPTOR:
5761*2e9d4914SAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
5762*2e9d4914SAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
5763*2e9d4914SAndroid Build Coastguard Worker## what you are doing...
5764*2e9d4914SAndroid Build Coastguard Workerif test -n "$compiler"; then
5765*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
5766*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
5767*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
5768*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
5769*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
5770*2e9d4914SAndroid Build Coastguard Worker  _LT_SYS_DYNAMIC_LINKER($1)
5771*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
5772*2e9d4914SAndroid Build Coastguard Worker  LT_SYS_DLOPEN_SELF
5773*2e9d4914SAndroid Build Coastguard Worker  _LT_CMD_STRIPLIB
5774*2e9d4914SAndroid Build Coastguard Worker
5775*2e9d4914SAndroid Build Coastguard Worker  # Report which library types will actually be built
5776*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([if libtool supports shared libraries])
5777*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT([$can_build_shared])
5778*2e9d4914SAndroid Build Coastguard Worker
5779*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([whether to build shared libraries])
5780*2e9d4914SAndroid Build Coastguard Worker  test "$can_build_shared" = "no" && enable_shared=no
5781*2e9d4914SAndroid Build Coastguard Worker
5782*2e9d4914SAndroid Build Coastguard Worker  # On AIX, shared libraries and static libraries use the same namespace, and
5783*2e9d4914SAndroid Build Coastguard Worker  # are all built from PIC.
5784*2e9d4914SAndroid Build Coastguard Worker  case $host_os in
5785*2e9d4914SAndroid Build Coastguard Worker  aix3*)
5786*2e9d4914SAndroid Build Coastguard Worker    test "$enable_shared" = yes && enable_static=no
5787*2e9d4914SAndroid Build Coastguard Worker    if test -n "$RANLIB"; then
5788*2e9d4914SAndroid Build Coastguard Worker      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5789*2e9d4914SAndroid Build Coastguard Worker      postinstall_cmds='$RANLIB $lib'
5790*2e9d4914SAndroid Build Coastguard Worker    fi
5791*2e9d4914SAndroid Build Coastguard Worker    ;;
5792*2e9d4914SAndroid Build Coastguard Worker
5793*2e9d4914SAndroid Build Coastguard Worker  aix[[4-9]]*)
5794*2e9d4914SAndroid Build Coastguard Worker    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5795*2e9d4914SAndroid Build Coastguard Worker      test "$enable_shared" = yes && enable_static=no
5796*2e9d4914SAndroid Build Coastguard Worker    fi
5797*2e9d4914SAndroid Build Coastguard Worker    ;;
5798*2e9d4914SAndroid Build Coastguard Worker  esac
5799*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT([$enable_shared])
5800*2e9d4914SAndroid Build Coastguard Worker
5801*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_CHECKING([whether to build static libraries])
5802*2e9d4914SAndroid Build Coastguard Worker  # Make sure either enable_shared or enable_static is yes.
5803*2e9d4914SAndroid Build Coastguard Worker  test "$enable_shared" = yes || enable_static=yes
5804*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_RESULT([$enable_static])
5805*2e9d4914SAndroid Build Coastguard Worker
5806*2e9d4914SAndroid Build Coastguard Worker  _LT_CONFIG($1)
5807*2e9d4914SAndroid Build Coastguard Workerfi
5808*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_POP
5809*2e9d4914SAndroid Build Coastguard WorkerCC="$lt_save_CC"
5810*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_C_CONFIG
5811*2e9d4914SAndroid Build Coastguard Worker
5812*2e9d4914SAndroid Build Coastguard Worker
5813*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_CXX_CONFIG([TAG])
5814*2e9d4914SAndroid Build Coastguard Worker# --------------------------
5815*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for a C++ compiler are suitably
5816*2e9d4914SAndroid Build Coastguard Worker# defined.  These variables are subsequently used by _LT_CONFIG to write
5817*2e9d4914SAndroid Build Coastguard Worker# the compiler configuration to `libtool'.
5818*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_CXX_CONFIG],
5819*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5820*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl
5821*2e9d4914SAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl
5822*2e9d4914SAndroid Build Coastguard Workerif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5823*2e9d4914SAndroid Build Coastguard Worker    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5824*2e9d4914SAndroid Build Coastguard Worker    (test "X$CXX" != "Xg++"))) ; then
5825*2e9d4914SAndroid Build Coastguard Worker  AC_PROG_CXXCPP
5826*2e9d4914SAndroid Build Coastguard Workerelse
5827*2e9d4914SAndroid Build Coastguard Worker  _lt_caught_CXX_error=yes
5828*2e9d4914SAndroid Build Coastguard Workerfi
5829*2e9d4914SAndroid Build Coastguard Worker
5830*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_PUSH(C++)
5831*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5832*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
5833*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
5834*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
5835*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(compiler_needs_object, $1)=no
5836*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5837*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
5838*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5839*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5840*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
5841*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
5842*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5843*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
5844*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
5845*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
5846*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
5847*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
5848*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5849*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
5850*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5851*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
5852*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
5853*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5854*2e9d4914SAndroid Build Coastguard Worker
5855*2e9d4914SAndroid Build Coastguard Worker# Source file extension for C++ test sources.
5856*2e9d4914SAndroid Build Coastguard Workerac_ext=cpp
5857*2e9d4914SAndroid Build Coastguard Worker
5858*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled C++ test sources.
5859*2e9d4914SAndroid Build Coastguard Workerobjext=o
5860*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
5861*2e9d4914SAndroid Build Coastguard Worker
5862*2e9d4914SAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
5863*2e9d4914SAndroid Build Coastguard Worker# the CXX compiler isn't working.  Some variables (like enable_shared)
5864*2e9d4914SAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
5865*2e9d4914SAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
5866*2e9d4914SAndroid Build Coastguard Workerif test "$_lt_caught_CXX_error" != yes; then
5867*2e9d4914SAndroid Build Coastguard Worker  # Code to be used in simple compile tests
5868*2e9d4914SAndroid Build Coastguard Worker  lt_simple_compile_test_code="int some_variable = 0;"
5869*2e9d4914SAndroid Build Coastguard Worker
5870*2e9d4914SAndroid Build Coastguard Worker  # Code to be used in simple link tests
5871*2e9d4914SAndroid Build Coastguard Worker  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5872*2e9d4914SAndroid Build Coastguard Worker
5873*2e9d4914SAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5874*2e9d4914SAndroid Build Coastguard Worker  _LT_TAG_COMPILER
5875*2e9d4914SAndroid Build Coastguard Worker
5876*2e9d4914SAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
5877*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
5878*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
5879*2e9d4914SAndroid Build Coastguard Worker
5880*2e9d4914SAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
5881*2e9d4914SAndroid Build Coastguard Worker  lt_save_CC=$CC
5882*2e9d4914SAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
5883*2e9d4914SAndroid Build Coastguard Worker  lt_save_LD=$LD
5884*2e9d4914SAndroid Build Coastguard Worker  lt_save_GCC=$GCC
5885*2e9d4914SAndroid Build Coastguard Worker  GCC=$GXX
5886*2e9d4914SAndroid Build Coastguard Worker  lt_save_with_gnu_ld=$with_gnu_ld
5887*2e9d4914SAndroid Build Coastguard Worker  lt_save_path_LD=$lt_cv_path_LD
5888*2e9d4914SAndroid Build Coastguard Worker  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5889*2e9d4914SAndroid Build Coastguard Worker    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5890*2e9d4914SAndroid Build Coastguard Worker  else
5891*2e9d4914SAndroid Build Coastguard Worker    $as_unset lt_cv_prog_gnu_ld
5892*2e9d4914SAndroid Build Coastguard Worker  fi
5893*2e9d4914SAndroid Build Coastguard Worker  if test -n "${lt_cv_path_LDCXX+set}"; then
5894*2e9d4914SAndroid Build Coastguard Worker    lt_cv_path_LD=$lt_cv_path_LDCXX
5895*2e9d4914SAndroid Build Coastguard Worker  else
5896*2e9d4914SAndroid Build Coastguard Worker    $as_unset lt_cv_path_LD
5897*2e9d4914SAndroid Build Coastguard Worker  fi
5898*2e9d4914SAndroid Build Coastguard Worker  test -z "${LDCXX+set}" || LD=$LDCXX
5899*2e9d4914SAndroid Build Coastguard Worker  CC=${CXX-"c++"}
5900*2e9d4914SAndroid Build Coastguard Worker  CFLAGS=$CXXFLAGS
5901*2e9d4914SAndroid Build Coastguard Worker  compiler=$CC
5902*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
5903*2e9d4914SAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
5904*2e9d4914SAndroid Build Coastguard Worker
5905*2e9d4914SAndroid Build Coastguard Worker  if test -n "$compiler"; then
5906*2e9d4914SAndroid Build Coastguard Worker    # We don't want -fno-exception when compiling C++ code, so set the
5907*2e9d4914SAndroid Build Coastguard Worker    # no_builtin_flag separately
5908*2e9d4914SAndroid Build Coastguard Worker    if test "$GXX" = yes; then
5909*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5910*2e9d4914SAndroid Build Coastguard Worker    else
5911*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5912*2e9d4914SAndroid Build Coastguard Worker    fi
5913*2e9d4914SAndroid Build Coastguard Worker
5914*2e9d4914SAndroid Build Coastguard Worker    if test "$GXX" = yes; then
5915*2e9d4914SAndroid Build Coastguard Worker      # Set up default GNU C++ configuration
5916*2e9d4914SAndroid Build Coastguard Worker
5917*2e9d4914SAndroid Build Coastguard Worker      LT_PATH_LD
5918*2e9d4914SAndroid Build Coastguard Worker
5919*2e9d4914SAndroid Build Coastguard Worker      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5920*2e9d4914SAndroid Build Coastguard Worker      # archiving commands below assume that GNU ld is being used.
5921*2e9d4914SAndroid Build Coastguard Worker      if test "$with_gnu_ld" = yes; then
5922*2e9d4914SAndroid 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'
5923*2e9d4914SAndroid 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'
5924*2e9d4914SAndroid Build Coastguard Worker
5925*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5926*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5927*2e9d4914SAndroid Build Coastguard Worker
5928*2e9d4914SAndroid Build Coastguard Worker        # If archive_cmds runs LD, not CC, wlarc should be empty
5929*2e9d4914SAndroid Build Coastguard Worker        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5930*2e9d4914SAndroid Build Coastguard Worker        #     investigate it a little bit more. (MM)
5931*2e9d4914SAndroid Build Coastguard Worker        wlarc='${wl}'
5932*2e9d4914SAndroid Build Coastguard Worker
5933*2e9d4914SAndroid Build Coastguard Worker        # ancient GNU ld didn't support --whole-archive et. al.
5934*2e9d4914SAndroid Build Coastguard Worker        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5935*2e9d4914SAndroid Build Coastguard Worker	  $GREP 'no-whole-archive' > /dev/null; then
5936*2e9d4914SAndroid Build Coastguard Worker          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5937*2e9d4914SAndroid Build Coastguard Worker        else
5938*2e9d4914SAndroid Build Coastguard Worker          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5939*2e9d4914SAndroid Build Coastguard Worker        fi
5940*2e9d4914SAndroid Build Coastguard Worker      else
5941*2e9d4914SAndroid Build Coastguard Worker        with_gnu_ld=no
5942*2e9d4914SAndroid Build Coastguard Worker        wlarc=
5943*2e9d4914SAndroid Build Coastguard Worker
5944*2e9d4914SAndroid Build Coastguard Worker        # A generic and very simple default shared library creation
5945*2e9d4914SAndroid Build Coastguard Worker        # command for GNU C++ for the case where it uses the native
5946*2e9d4914SAndroid Build Coastguard Worker        # linker, instead of GNU ld.  If possible, this setting should
5947*2e9d4914SAndroid Build Coastguard Worker        # overridden to take advantage of the native linker features on
5948*2e9d4914SAndroid Build Coastguard Worker        # the platform it is being used on.
5949*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5950*2e9d4914SAndroid Build Coastguard Worker      fi
5951*2e9d4914SAndroid Build Coastguard Worker
5952*2e9d4914SAndroid Build Coastguard Worker      # Commands to make compiler produce verbose output that lists
5953*2e9d4914SAndroid Build Coastguard Worker      # what "hidden" libraries, object files and flags are used when
5954*2e9d4914SAndroid Build Coastguard Worker      # linking a shared library.
5955*2e9d4914SAndroid Build Coastguard Worker      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5956*2e9d4914SAndroid Build Coastguard Worker
5957*2e9d4914SAndroid Build Coastguard Worker    else
5958*2e9d4914SAndroid Build Coastguard Worker      GXX=no
5959*2e9d4914SAndroid Build Coastguard Worker      with_gnu_ld=no
5960*2e9d4914SAndroid Build Coastguard Worker      wlarc=
5961*2e9d4914SAndroid Build Coastguard Worker    fi
5962*2e9d4914SAndroid Build Coastguard Worker
5963*2e9d4914SAndroid Build Coastguard Worker    # PORTME: fill in a description of your system's C++ link characteristics
5964*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5965*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(ld_shlibs, $1)=yes
5966*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
5967*2e9d4914SAndroid Build Coastguard Worker      aix3*)
5968*2e9d4914SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
5969*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
5970*2e9d4914SAndroid Build Coastguard Worker        ;;
5971*2e9d4914SAndroid Build Coastguard Worker      aix[[4-9]]*)
5972*2e9d4914SAndroid Build Coastguard Worker        if test "$host_cpu" = ia64; then
5973*2e9d4914SAndroid Build Coastguard Worker          # On IA64, the linker does run time linking by default, so we don't
5974*2e9d4914SAndroid Build Coastguard Worker          # have to do anything special.
5975*2e9d4914SAndroid Build Coastguard Worker          aix_use_runtimelinking=no
5976*2e9d4914SAndroid Build Coastguard Worker          exp_sym_flag='-Bexport'
5977*2e9d4914SAndroid Build Coastguard Worker          no_entry_flag=""
5978*2e9d4914SAndroid Build Coastguard Worker        else
5979*2e9d4914SAndroid Build Coastguard Worker          aix_use_runtimelinking=no
5980*2e9d4914SAndroid Build Coastguard Worker
5981*2e9d4914SAndroid Build Coastguard Worker          # Test if we are trying to use run time linking or normal
5982*2e9d4914SAndroid Build Coastguard Worker          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5983*2e9d4914SAndroid Build Coastguard Worker          # need to do runtime linking.
5984*2e9d4914SAndroid Build Coastguard Worker          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5985*2e9d4914SAndroid Build Coastguard Worker	    for ld_flag in $LDFLAGS; do
5986*2e9d4914SAndroid Build Coastguard Worker	      case $ld_flag in
5987*2e9d4914SAndroid Build Coastguard Worker	      *-brtl*)
5988*2e9d4914SAndroid Build Coastguard Worker	        aix_use_runtimelinking=yes
5989*2e9d4914SAndroid Build Coastguard Worker	        break
5990*2e9d4914SAndroid Build Coastguard Worker	        ;;
5991*2e9d4914SAndroid Build Coastguard Worker	      esac
5992*2e9d4914SAndroid Build Coastguard Worker	    done
5993*2e9d4914SAndroid Build Coastguard Worker	    ;;
5994*2e9d4914SAndroid Build Coastguard Worker          esac
5995*2e9d4914SAndroid Build Coastguard Worker
5996*2e9d4914SAndroid Build Coastguard Worker          exp_sym_flag='-bexport'
5997*2e9d4914SAndroid Build Coastguard Worker          no_entry_flag='-bnoentry'
5998*2e9d4914SAndroid Build Coastguard Worker        fi
5999*2e9d4914SAndroid Build Coastguard Worker
6000*2e9d4914SAndroid Build Coastguard Worker        # When large executables or shared objects are built, AIX ld can
6001*2e9d4914SAndroid Build Coastguard Worker        # have problems creating the table of contents.  If linking a library
6002*2e9d4914SAndroid Build Coastguard Worker        # or program results in "error TOC overflow" add -mminimal-toc to
6003*2e9d4914SAndroid Build Coastguard Worker        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6004*2e9d4914SAndroid Build Coastguard Worker        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6005*2e9d4914SAndroid Build Coastguard Worker
6006*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)=''
6007*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct, $1)=yes
6008*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6009*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6010*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(link_all_deplibs, $1)=yes
6011*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6012*2e9d4914SAndroid Build Coastguard Worker
6013*2e9d4914SAndroid Build Coastguard Worker        if test "$GXX" = yes; then
6014*2e9d4914SAndroid Build Coastguard Worker          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6015*2e9d4914SAndroid Build Coastguard Worker          # We only want to do this on AIX 4.2 and lower, the check
6016*2e9d4914SAndroid Build Coastguard Worker          # below for broken collect2 doesn't work under 4.3+
6017*2e9d4914SAndroid Build Coastguard Worker	  collect2name=`${CC} -print-prog-name=collect2`
6018*2e9d4914SAndroid Build Coastguard Worker	  if test -f "$collect2name" &&
6019*2e9d4914SAndroid Build Coastguard Worker	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6020*2e9d4914SAndroid Build Coastguard Worker	  then
6021*2e9d4914SAndroid Build Coastguard Worker	    # We have reworked collect2
6022*2e9d4914SAndroid Build Coastguard Worker	    :
6023*2e9d4914SAndroid Build Coastguard Worker	  else
6024*2e9d4914SAndroid Build Coastguard Worker	    # We have old collect2
6025*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6026*2e9d4914SAndroid Build Coastguard Worker	    # It fails to find uninstalled libraries when the uninstalled
6027*2e9d4914SAndroid Build Coastguard Worker	    # path is not listed in the libpath.  Setting hardcode_minus_L
6028*2e9d4914SAndroid Build Coastguard Worker	    # to unsupported forces relinking
6029*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6030*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6031*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6032*2e9d4914SAndroid Build Coastguard Worker	  fi
6033*2e9d4914SAndroid Build Coastguard Worker          esac
6034*2e9d4914SAndroid Build Coastguard Worker          shared_flag='-shared'
6035*2e9d4914SAndroid Build Coastguard Worker	  if test "$aix_use_runtimelinking" = yes; then
6036*2e9d4914SAndroid Build Coastguard Worker	    shared_flag="$shared_flag "'${wl}-G'
6037*2e9d4914SAndroid Build Coastguard Worker	  fi
6038*2e9d4914SAndroid Build Coastguard Worker        else
6039*2e9d4914SAndroid Build Coastguard Worker          # not using gcc
6040*2e9d4914SAndroid Build Coastguard Worker          if test "$host_cpu" = ia64; then
6041*2e9d4914SAndroid Build Coastguard Worker	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6042*2e9d4914SAndroid Build Coastguard Worker	  # chokes on -Wl,-G. The following line is correct:
6043*2e9d4914SAndroid Build Coastguard Worker	  shared_flag='-G'
6044*2e9d4914SAndroid Build Coastguard Worker          else
6045*2e9d4914SAndroid Build Coastguard Worker	    if test "$aix_use_runtimelinking" = yes; then
6046*2e9d4914SAndroid Build Coastguard Worker	      shared_flag='${wl}-G'
6047*2e9d4914SAndroid Build Coastguard Worker	    else
6048*2e9d4914SAndroid Build Coastguard Worker	      shared_flag='${wl}-bM:SRE'
6049*2e9d4914SAndroid Build Coastguard Worker	    fi
6050*2e9d4914SAndroid Build Coastguard Worker          fi
6051*2e9d4914SAndroid Build Coastguard Worker        fi
6052*2e9d4914SAndroid Build Coastguard Worker
6053*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6054*2e9d4914SAndroid Build Coastguard Worker        # It seems that -bexpall does not export symbols beginning with
6055*2e9d4914SAndroid Build Coastguard Worker        # underscore (_), so it is better to generate a list of symbols to
6056*2e9d4914SAndroid Build Coastguard Worker	# export.
6057*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(always_export_symbols, $1)=yes
6058*2e9d4914SAndroid Build Coastguard Worker        if test "$aix_use_runtimelinking" = yes; then
6059*2e9d4914SAndroid Build Coastguard Worker          # Warning - without using the other runtime loading flags (-brtl),
6060*2e9d4914SAndroid Build Coastguard Worker          # -berok will link without error, but may produce a broken library.
6061*2e9d4914SAndroid Build Coastguard Worker          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6062*2e9d4914SAndroid Build Coastguard Worker          # Determine the default libpath from the value encoded in an empty
6063*2e9d4914SAndroid Build Coastguard Worker          # executable.
6064*2e9d4914SAndroid Build Coastguard Worker          _LT_SYS_MODULE_PATH_AIX([$1])
6065*2e9d4914SAndroid Build Coastguard Worker          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6066*2e9d4914SAndroid Build Coastguard Worker
6067*2e9d4914SAndroid Build Coastguard Worker          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6068*2e9d4914SAndroid Build Coastguard Worker        else
6069*2e9d4914SAndroid Build Coastguard Worker          if test "$host_cpu" = ia64; then
6070*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6071*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6072*2e9d4914SAndroid 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"
6073*2e9d4914SAndroid Build Coastguard Worker          else
6074*2e9d4914SAndroid Build Coastguard Worker	    # Determine the default libpath from the value encoded in an
6075*2e9d4914SAndroid Build Coastguard Worker	    # empty executable.
6076*2e9d4914SAndroid Build Coastguard Worker	    _LT_SYS_MODULE_PATH_AIX([$1])
6077*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6078*2e9d4914SAndroid Build Coastguard Worker	    # Warning - without using the other run time loading flags,
6079*2e9d4914SAndroid Build Coastguard Worker	    # -berok will link without error, but may produce a broken library.
6080*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6081*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6082*2e9d4914SAndroid Build Coastguard Worker	    if test "$with_gnu_ld" = yes; then
6083*2e9d4914SAndroid Build Coastguard Worker	      # We only use this code for GNU lds that support --whole-archive.
6084*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6085*2e9d4914SAndroid Build Coastguard Worker	    else
6086*2e9d4914SAndroid Build Coastguard Worker	      # Exported symbols can be pulled into shared objects from archives
6087*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6088*2e9d4914SAndroid Build Coastguard Worker	    fi
6089*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6090*2e9d4914SAndroid Build Coastguard Worker	    # This is similar to how AIX traditionally builds its shared
6091*2e9d4914SAndroid Build Coastguard Worker	    # libraries.
6092*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6093*2e9d4914SAndroid Build Coastguard Worker          fi
6094*2e9d4914SAndroid Build Coastguard Worker        fi
6095*2e9d4914SAndroid Build Coastguard Worker        ;;
6096*2e9d4914SAndroid Build Coastguard Worker
6097*2e9d4914SAndroid Build Coastguard Worker      beos*)
6098*2e9d4914SAndroid Build Coastguard Worker	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6099*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6100*2e9d4914SAndroid Build Coastguard Worker	  # Joseph Beckenbach <[email protected]> says some releases of gcc
6101*2e9d4914SAndroid Build Coastguard Worker	  # support --undefined.  This deserves some investigation.  FIXME
6102*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6103*2e9d4914SAndroid Build Coastguard Worker	else
6104*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6105*2e9d4914SAndroid Build Coastguard Worker	fi
6106*2e9d4914SAndroid Build Coastguard Worker	;;
6107*2e9d4914SAndroid Build Coastguard Worker
6108*2e9d4914SAndroid Build Coastguard Worker      chorus*)
6109*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6110*2e9d4914SAndroid Build Coastguard Worker          *)
6111*2e9d4914SAndroid Build Coastguard Worker	  # FIXME: insert proper C++ library support
6112*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6113*2e9d4914SAndroid Build Coastguard Worker	  ;;
6114*2e9d4914SAndroid Build Coastguard Worker        esac
6115*2e9d4914SAndroid Build Coastguard Worker        ;;
6116*2e9d4914SAndroid Build Coastguard Worker
6117*2e9d4914SAndroid Build Coastguard Worker      cygwin* | mingw* | pw32* | cegcc*)
6118*2e9d4914SAndroid Build Coastguard Worker	case $GXX,$cc_basename in
6119*2e9d4914SAndroid Build Coastguard Worker	,cl* | no,cl*)
6120*2e9d4914SAndroid Build Coastguard Worker	  # Native MSVC
6121*2e9d4914SAndroid Build Coastguard Worker	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6122*2e9d4914SAndroid Build Coastguard Worker	  # no search path for DLLs.
6123*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6124*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6125*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(always_export_symbols, $1)=yes
6126*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(file_list_spec, $1)='@'
6127*2e9d4914SAndroid Build Coastguard Worker	  # Tell ltmain to make .lib files, not .a files.
6128*2e9d4914SAndroid Build Coastguard Worker	  libext=lib
6129*2e9d4914SAndroid Build Coastguard Worker	  # Tell ltmain to make .dll files, not .so files.
6130*2e9d4914SAndroid Build Coastguard Worker	  shrext_cmds=".dll"
6131*2e9d4914SAndroid Build Coastguard Worker	  # FIXME: Setting linknames here is a bad hack.
6132*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6133*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6134*2e9d4914SAndroid Build Coastguard Worker	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6135*2e9d4914SAndroid Build Coastguard Worker	    else
6136*2e9d4914SAndroid Build Coastguard Worker	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6137*2e9d4914SAndroid Build Coastguard Worker	    fi~
6138*2e9d4914SAndroid 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"~
6139*2e9d4914SAndroid Build Coastguard Worker	    linknames='
6140*2e9d4914SAndroid Build Coastguard Worker	  # The linker will not automatically build a static lib if we build a DLL.
6141*2e9d4914SAndroid Build Coastguard Worker	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6142*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6143*2e9d4914SAndroid Build Coastguard Worker	  # Don't use ranlib
6144*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6145*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6146*2e9d4914SAndroid Build Coastguard Worker	    lt_tool_outputfile="@TOOL_OUTPUT@"~
6147*2e9d4914SAndroid Build Coastguard Worker	    case $lt_outputfile in
6148*2e9d4914SAndroid Build Coastguard Worker	      *.exe|*.EXE) ;;
6149*2e9d4914SAndroid Build Coastguard Worker	      *)
6150*2e9d4914SAndroid Build Coastguard Worker		lt_outputfile="$lt_outputfile.exe"
6151*2e9d4914SAndroid Build Coastguard Worker		lt_tool_outputfile="$lt_tool_outputfile.exe"
6152*2e9d4914SAndroid Build Coastguard Worker		;;
6153*2e9d4914SAndroid Build Coastguard Worker	    esac~
6154*2e9d4914SAndroid Build Coastguard Worker	    func_to_tool_file "$lt_outputfile"~
6155*2e9d4914SAndroid Build Coastguard Worker	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6156*2e9d4914SAndroid Build Coastguard Worker	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6157*2e9d4914SAndroid Build Coastguard Worker	      $RM "$lt_outputfile.manifest";
6158*2e9d4914SAndroid Build Coastguard Worker	    fi'
6159*2e9d4914SAndroid Build Coastguard Worker	  ;;
6160*2e9d4914SAndroid Build Coastguard Worker	*)
6161*2e9d4914SAndroid Build Coastguard Worker	  # g++
6162*2e9d4914SAndroid Build Coastguard Worker	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6163*2e9d4914SAndroid Build Coastguard Worker	  # as there is no search path for DLLs.
6164*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6165*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6166*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6167*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(always_export_symbols, $1)=no
6168*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6169*2e9d4914SAndroid Build Coastguard Worker
6170*2e9d4914SAndroid Build Coastguard Worker	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6171*2e9d4914SAndroid 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'
6172*2e9d4914SAndroid Build Coastguard Worker	    # If the export-symbols file already is a .def file (1st line
6173*2e9d4914SAndroid Build Coastguard Worker	    # is EXPORTS), use it as is; otherwise, prepend...
6174*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6175*2e9d4914SAndroid Build Coastguard Worker	      cp $export_symbols $output_objdir/$soname.def;
6176*2e9d4914SAndroid Build Coastguard Worker	    else
6177*2e9d4914SAndroid Build Coastguard Worker	      echo EXPORTS > $output_objdir/$soname.def;
6178*2e9d4914SAndroid Build Coastguard Worker	      cat $export_symbols >> $output_objdir/$soname.def;
6179*2e9d4914SAndroid Build Coastguard Worker	    fi~
6180*2e9d4914SAndroid 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'
6181*2e9d4914SAndroid Build Coastguard Worker	  else
6182*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6183*2e9d4914SAndroid Build Coastguard Worker	  fi
6184*2e9d4914SAndroid Build Coastguard Worker	  ;;
6185*2e9d4914SAndroid Build Coastguard Worker	esac
6186*2e9d4914SAndroid Build Coastguard Worker	;;
6187*2e9d4914SAndroid Build Coastguard Worker      darwin* | rhapsody*)
6188*2e9d4914SAndroid Build Coastguard Worker        _LT_DARWIN_LINKER_FEATURES($1)
6189*2e9d4914SAndroid Build Coastguard Worker	;;
6190*2e9d4914SAndroid Build Coastguard Worker
6191*2e9d4914SAndroid Build Coastguard Worker      dgux*)
6192*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6193*2e9d4914SAndroid Build Coastguard Worker          ec++*)
6194*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6195*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6196*2e9d4914SAndroid Build Coastguard Worker	    ;;
6197*2e9d4914SAndroid Build Coastguard Worker          ghcx*)
6198*2e9d4914SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
6199*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6200*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6201*2e9d4914SAndroid Build Coastguard Worker	    ;;
6202*2e9d4914SAndroid Build Coastguard Worker          *)
6203*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6204*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6205*2e9d4914SAndroid Build Coastguard Worker	    ;;
6206*2e9d4914SAndroid Build Coastguard Worker        esac
6207*2e9d4914SAndroid Build Coastguard Worker        ;;
6208*2e9d4914SAndroid Build Coastguard Worker
6209*2e9d4914SAndroid Build Coastguard Worker      freebsd2.*)
6210*2e9d4914SAndroid Build Coastguard Worker        # C++ shared libraries reported to be fairly broken before
6211*2e9d4914SAndroid Build Coastguard Worker	# switch to ELF
6212*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6213*2e9d4914SAndroid Build Coastguard Worker        ;;
6214*2e9d4914SAndroid Build Coastguard Worker
6215*2e9d4914SAndroid Build Coastguard Worker      freebsd-elf*)
6216*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6217*2e9d4914SAndroid Build Coastguard Worker        ;;
6218*2e9d4914SAndroid Build Coastguard Worker
6219*2e9d4914SAndroid Build Coastguard Worker      freebsd* | dragonfly*)
6220*2e9d4914SAndroid Build Coastguard Worker        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6221*2e9d4914SAndroid Build Coastguard Worker        # conventions
6222*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=yes
6223*2e9d4914SAndroid Build Coastguard Worker        ;;
6224*2e9d4914SAndroid Build Coastguard Worker
6225*2e9d4914SAndroid Build Coastguard Worker      gnu*)
6226*2e9d4914SAndroid Build Coastguard Worker        ;;
6227*2e9d4914SAndroid Build Coastguard Worker
6228*2e9d4914SAndroid Build Coastguard Worker      haiku*)
6229*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6230*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(link_all_deplibs, $1)=yes
6231*2e9d4914SAndroid Build Coastguard Worker        ;;
6232*2e9d4914SAndroid Build Coastguard Worker
6233*2e9d4914SAndroid Build Coastguard Worker      hpux9*)
6234*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6235*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6236*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6237*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_direct, $1)=yes
6238*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6239*2e9d4914SAndroid Build Coastguard Worker				             # but as the default
6240*2e9d4914SAndroid Build Coastguard Worker				             # location of the library.
6241*2e9d4914SAndroid Build Coastguard Worker
6242*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6243*2e9d4914SAndroid Build Coastguard Worker          CC*)
6244*2e9d4914SAndroid Build Coastguard Worker            # FIXME: insert proper C++ library support
6245*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(ld_shlibs, $1)=no
6246*2e9d4914SAndroid Build Coastguard Worker            ;;
6247*2e9d4914SAndroid Build Coastguard Worker          aCC*)
6248*2e9d4914SAndroid 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6249*2e9d4914SAndroid Build Coastguard Worker            # Commands to make compiler produce verbose output that lists
6250*2e9d4914SAndroid Build Coastguard Worker            # what "hidden" libraries, object files and flags are used when
6251*2e9d4914SAndroid Build Coastguard Worker            # linking a shared library.
6252*2e9d4914SAndroid Build Coastguard Worker            #
6253*2e9d4914SAndroid Build Coastguard Worker            # There doesn't appear to be a way to prevent this compiler from
6254*2e9d4914SAndroid Build Coastguard Worker            # explicitly linking system object files so we need to strip them
6255*2e9d4914SAndroid Build Coastguard Worker            # from the output so that they don't get included in the library
6256*2e9d4914SAndroid Build Coastguard Worker            # dependencies.
6257*2e9d4914SAndroid 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"'
6258*2e9d4914SAndroid Build Coastguard Worker            ;;
6259*2e9d4914SAndroid Build Coastguard Worker          *)
6260*2e9d4914SAndroid Build Coastguard Worker            if test "$GXX" = yes; then
6261*2e9d4914SAndroid 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6262*2e9d4914SAndroid Build Coastguard Worker            else
6263*2e9d4914SAndroid Build Coastguard Worker              # FIXME: insert proper C++ library support
6264*2e9d4914SAndroid Build Coastguard Worker              _LT_TAGVAR(ld_shlibs, $1)=no
6265*2e9d4914SAndroid Build Coastguard Worker            fi
6266*2e9d4914SAndroid Build Coastguard Worker            ;;
6267*2e9d4914SAndroid Build Coastguard Worker        esac
6268*2e9d4914SAndroid Build Coastguard Worker        ;;
6269*2e9d4914SAndroid Build Coastguard Worker
6270*2e9d4914SAndroid Build Coastguard Worker      hpux10*|hpux11*)
6271*2e9d4914SAndroid Build Coastguard Worker        if test $with_gnu_ld = no; then
6272*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6273*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6274*2e9d4914SAndroid Build Coastguard Worker
6275*2e9d4914SAndroid Build Coastguard Worker          case $host_cpu in
6276*2e9d4914SAndroid Build Coastguard Worker            hppa*64*|ia64*)
6277*2e9d4914SAndroid Build Coastguard Worker              ;;
6278*2e9d4914SAndroid Build Coastguard Worker            *)
6279*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6280*2e9d4914SAndroid Build Coastguard Worker              ;;
6281*2e9d4914SAndroid Build Coastguard Worker          esac
6282*2e9d4914SAndroid Build Coastguard Worker        fi
6283*2e9d4914SAndroid Build Coastguard Worker        case $host_cpu in
6284*2e9d4914SAndroid Build Coastguard Worker          hppa*64*|ia64*)
6285*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct, $1)=no
6286*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6287*2e9d4914SAndroid Build Coastguard Worker            ;;
6288*2e9d4914SAndroid Build Coastguard Worker          *)
6289*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct, $1)=yes
6290*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6291*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6292*2e9d4914SAndroid Build Coastguard Worker					         # but as the default
6293*2e9d4914SAndroid Build Coastguard Worker					         # location of the library.
6294*2e9d4914SAndroid Build Coastguard Worker            ;;
6295*2e9d4914SAndroid Build Coastguard Worker        esac
6296*2e9d4914SAndroid Build Coastguard Worker
6297*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6298*2e9d4914SAndroid Build Coastguard Worker          CC*)
6299*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6300*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6301*2e9d4914SAndroid Build Coastguard Worker	    ;;
6302*2e9d4914SAndroid Build Coastguard Worker          aCC*)
6303*2e9d4914SAndroid Build Coastguard Worker	    case $host_cpu in
6304*2e9d4914SAndroid Build Coastguard Worker	      hppa*64*)
6305*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6306*2e9d4914SAndroid Build Coastguard Worker	        ;;
6307*2e9d4914SAndroid Build Coastguard Worker	      ia64*)
6308*2e9d4914SAndroid 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'
6309*2e9d4914SAndroid Build Coastguard Worker	        ;;
6310*2e9d4914SAndroid Build Coastguard Worker	      *)
6311*2e9d4914SAndroid 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'
6312*2e9d4914SAndroid Build Coastguard Worker	        ;;
6313*2e9d4914SAndroid Build Coastguard Worker	    esac
6314*2e9d4914SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6315*2e9d4914SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6316*2e9d4914SAndroid Build Coastguard Worker	    # linking a shared library.
6317*2e9d4914SAndroid Build Coastguard Worker	    #
6318*2e9d4914SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6319*2e9d4914SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6320*2e9d4914SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6321*2e9d4914SAndroid Build Coastguard Worker	    # dependencies.
6322*2e9d4914SAndroid 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"'
6323*2e9d4914SAndroid Build Coastguard Worker	    ;;
6324*2e9d4914SAndroid Build Coastguard Worker          *)
6325*2e9d4914SAndroid Build Coastguard Worker	    if test "$GXX" = yes; then
6326*2e9d4914SAndroid Build Coastguard Worker	      if test $with_gnu_ld = no; then
6327*2e9d4914SAndroid Build Coastguard Worker	        case $host_cpu in
6328*2e9d4914SAndroid Build Coastguard Worker	          hppa*64*)
6329*2e9d4914SAndroid 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'
6330*2e9d4914SAndroid Build Coastguard Worker	            ;;
6331*2e9d4914SAndroid Build Coastguard Worker	          ia64*)
6332*2e9d4914SAndroid 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'
6333*2e9d4914SAndroid Build Coastguard Worker	            ;;
6334*2e9d4914SAndroid Build Coastguard Worker	          *)
6335*2e9d4914SAndroid 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'
6336*2e9d4914SAndroid Build Coastguard Worker	            ;;
6337*2e9d4914SAndroid Build Coastguard Worker	        esac
6338*2e9d4914SAndroid Build Coastguard Worker	      fi
6339*2e9d4914SAndroid Build Coastguard Worker	    else
6340*2e9d4914SAndroid Build Coastguard Worker	      # FIXME: insert proper C++ library support
6341*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(ld_shlibs, $1)=no
6342*2e9d4914SAndroid Build Coastguard Worker	    fi
6343*2e9d4914SAndroid Build Coastguard Worker	    ;;
6344*2e9d4914SAndroid Build Coastguard Worker        esac
6345*2e9d4914SAndroid Build Coastguard Worker        ;;
6346*2e9d4914SAndroid Build Coastguard Worker
6347*2e9d4914SAndroid Build Coastguard Worker      interix[[3-9]]*)
6348*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_direct, $1)=no
6349*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6350*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6351*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6352*2e9d4914SAndroid Build Coastguard Worker	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6353*2e9d4914SAndroid Build Coastguard Worker	# Instead, shared libraries are loaded at an image base (0x10000000 by
6354*2e9d4914SAndroid Build Coastguard Worker	# default) and relocated if they conflict, which is a slow very memory
6355*2e9d4914SAndroid Build Coastguard Worker	# consuming and fragmenting process.  To avoid this, we pick a random,
6356*2e9d4914SAndroid Build Coastguard Worker	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6357*2e9d4914SAndroid Build Coastguard Worker	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6358*2e9d4914SAndroid 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'
6359*2e9d4914SAndroid 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'
6360*2e9d4914SAndroid Build Coastguard Worker	;;
6361*2e9d4914SAndroid Build Coastguard Worker      irix5* | irix6*)
6362*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6363*2e9d4914SAndroid Build Coastguard Worker          CC*)
6364*2e9d4914SAndroid Build Coastguard Worker	    # SGI C++
6365*2e9d4914SAndroid 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'
6366*2e9d4914SAndroid Build Coastguard Worker
6367*2e9d4914SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6368*2e9d4914SAndroid Build Coastguard Worker	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6369*2e9d4914SAndroid Build Coastguard Worker	    # necessary to make sure instantiated templates are included
6370*2e9d4914SAndroid Build Coastguard Worker	    # in the archive.
6371*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6372*2e9d4914SAndroid Build Coastguard Worker	    ;;
6373*2e9d4914SAndroid Build Coastguard Worker          *)
6374*2e9d4914SAndroid Build Coastguard Worker	    if test "$GXX" = yes; then
6375*2e9d4914SAndroid Build Coastguard Worker	      if test "$with_gnu_ld" = no; then
6376*2e9d4914SAndroid 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'
6377*2e9d4914SAndroid Build Coastguard Worker	      else
6378*2e9d4914SAndroid 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'
6379*2e9d4914SAndroid Build Coastguard Worker	      fi
6380*2e9d4914SAndroid Build Coastguard Worker	    fi
6381*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6382*2e9d4914SAndroid Build Coastguard Worker	    ;;
6383*2e9d4914SAndroid Build Coastguard Worker        esac
6384*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6385*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6386*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(inherit_rpath, $1)=yes
6387*2e9d4914SAndroid Build Coastguard Worker        ;;
6388*2e9d4914SAndroid Build Coastguard Worker
6389*2e9d4914SAndroid Build Coastguard Worker      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6390*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6391*2e9d4914SAndroid Build Coastguard Worker          KCC*)
6392*2e9d4914SAndroid Build Coastguard Worker	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6393*2e9d4914SAndroid Build Coastguard Worker
6394*2e9d4914SAndroid Build Coastguard Worker	    # KCC will only create a shared library if the output file
6395*2e9d4914SAndroid Build Coastguard Worker	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6396*2e9d4914SAndroid Build Coastguard Worker	    # to its proper name (with version) after linking.
6397*2e9d4914SAndroid 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'
6398*2e9d4914SAndroid 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'
6399*2e9d4914SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6400*2e9d4914SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6401*2e9d4914SAndroid Build Coastguard Worker	    # linking a shared library.
6402*2e9d4914SAndroid Build Coastguard Worker	    #
6403*2e9d4914SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6404*2e9d4914SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6405*2e9d4914SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6406*2e9d4914SAndroid Build Coastguard Worker	    # dependencies.
6407*2e9d4914SAndroid 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"'
6408*2e9d4914SAndroid Build Coastguard Worker
6409*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6410*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6411*2e9d4914SAndroid Build Coastguard Worker
6412*2e9d4914SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6413*2e9d4914SAndroid Build Coastguard Worker	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6414*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6415*2e9d4914SAndroid Build Coastguard Worker	    ;;
6416*2e9d4914SAndroid Build Coastguard Worker	  icpc* | ecpc* )
6417*2e9d4914SAndroid Build Coastguard Worker	    # Intel C++
6418*2e9d4914SAndroid Build Coastguard Worker	    with_gnu_ld=yes
6419*2e9d4914SAndroid Build Coastguard Worker	    # version 8.0 and above of icpc choke on multiply defined symbols
6420*2e9d4914SAndroid Build Coastguard Worker	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6421*2e9d4914SAndroid Build Coastguard Worker	    # earlier do not add the objects themselves.
6422*2e9d4914SAndroid Build Coastguard Worker	    case `$CC -V 2>&1` in
6423*2e9d4914SAndroid Build Coastguard Worker	      *"Version 7."*)
6424*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6425*2e9d4914SAndroid 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'
6426*2e9d4914SAndroid Build Coastguard Worker		;;
6427*2e9d4914SAndroid Build Coastguard Worker	      *)  # Version 8.0 or newer
6428*2e9d4914SAndroid Build Coastguard Worker	        tmp_idyn=
6429*2e9d4914SAndroid Build Coastguard Worker	        case $host_cpu in
6430*2e9d4914SAndroid Build Coastguard Worker		  ia64*) tmp_idyn=' -i_dynamic';;
6431*2e9d4914SAndroid Build Coastguard Worker		esac
6432*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6433*2e9d4914SAndroid 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'
6434*2e9d4914SAndroid Build Coastguard Worker		;;
6435*2e9d4914SAndroid Build Coastguard Worker	    esac
6436*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6437*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6438*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6439*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6440*2e9d4914SAndroid Build Coastguard Worker	    ;;
6441*2e9d4914SAndroid Build Coastguard Worker          pgCC* | pgcpp*)
6442*2e9d4914SAndroid Build Coastguard Worker            # Portland Group C++ compiler
6443*2e9d4914SAndroid Build Coastguard Worker	    case `$CC -V` in
6444*2e9d4914SAndroid Build Coastguard Worker	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6445*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6446*2e9d4914SAndroid Build Coastguard Worker		rm -rf $tpldir~
6447*2e9d4914SAndroid Build Coastguard Worker		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6448*2e9d4914SAndroid Build Coastguard Worker		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6449*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6450*2e9d4914SAndroid Build Coastguard Worker		rm -rf $tpldir~
6451*2e9d4914SAndroid Build Coastguard Worker		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6452*2e9d4914SAndroid Build Coastguard Worker		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6453*2e9d4914SAndroid Build Coastguard Worker		$RANLIB $oldlib'
6454*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6455*2e9d4914SAndroid Build Coastguard Worker		rm -rf $tpldir~
6456*2e9d4914SAndroid Build Coastguard Worker		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6457*2e9d4914SAndroid 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'
6458*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6459*2e9d4914SAndroid Build Coastguard Worker		rm -rf $tpldir~
6460*2e9d4914SAndroid Build Coastguard Worker		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6461*2e9d4914SAndroid 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'
6462*2e9d4914SAndroid Build Coastguard Worker	      ;;
6463*2e9d4914SAndroid Build Coastguard Worker	    *) # Version 6 and above use weak symbols
6464*2e9d4914SAndroid 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'
6465*2e9d4914SAndroid 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'
6466*2e9d4914SAndroid Build Coastguard Worker	      ;;
6467*2e9d4914SAndroid Build Coastguard Worker	    esac
6468*2e9d4914SAndroid Build Coastguard Worker
6469*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6470*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6471*2e9d4914SAndroid 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'
6472*2e9d4914SAndroid Build Coastguard Worker            ;;
6473*2e9d4914SAndroid Build Coastguard Worker	  cxx*)
6474*2e9d4914SAndroid Build Coastguard Worker	    # Compaq C++
6475*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6476*2e9d4914SAndroid 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'
6477*2e9d4914SAndroid Build Coastguard Worker
6478*2e9d4914SAndroid Build Coastguard Worker	    runpath_var=LD_RUN_PATH
6479*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6480*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6481*2e9d4914SAndroid Build Coastguard Worker
6482*2e9d4914SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6483*2e9d4914SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6484*2e9d4914SAndroid Build Coastguard Worker	    # linking a shared library.
6485*2e9d4914SAndroid Build Coastguard Worker	    #
6486*2e9d4914SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6487*2e9d4914SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6488*2e9d4914SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6489*2e9d4914SAndroid Build Coastguard Worker	    # dependencies.
6490*2e9d4914SAndroid 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'
6491*2e9d4914SAndroid Build Coastguard Worker	    ;;
6492*2e9d4914SAndroid Build Coastguard Worker	  xl* | mpixl* | bgxl*)
6493*2e9d4914SAndroid Build Coastguard Worker	    # IBM XL 8.0 on PPC, with GNU ld
6494*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6495*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6496*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6497*2e9d4914SAndroid Build Coastguard Worker	    if test "x$supports_anon_versioning" = xyes; then
6498*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6499*2e9d4914SAndroid Build Coastguard Worker		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6500*2e9d4914SAndroid Build Coastguard Worker		echo "local: *; };" >> $output_objdir/$libname.ver~
6501*2e9d4914SAndroid Build Coastguard Worker		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6502*2e9d4914SAndroid Build Coastguard Worker	    fi
6503*2e9d4914SAndroid Build Coastguard Worker	    ;;
6504*2e9d4914SAndroid Build Coastguard Worker	  *)
6505*2e9d4914SAndroid Build Coastguard Worker	    case `$CC -V 2>&1 | sed 5q` in
6506*2e9d4914SAndroid Build Coastguard Worker	    *Sun\ C*)
6507*2e9d4914SAndroid Build Coastguard Worker	      # Sun C++ 5.9
6508*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6509*2e9d4914SAndroid 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'
6510*2e9d4914SAndroid 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'
6511*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6512*2e9d4914SAndroid 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'
6513*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6514*2e9d4914SAndroid Build Coastguard Worker
6515*2e9d4914SAndroid Build Coastguard Worker	      # Not sure whether something based on
6516*2e9d4914SAndroid Build Coastguard Worker	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6517*2e9d4914SAndroid Build Coastguard Worker	      # would be better.
6518*2e9d4914SAndroid Build Coastguard Worker	      output_verbose_link_cmd='func_echo_all'
6519*2e9d4914SAndroid Build Coastguard Worker
6520*2e9d4914SAndroid Build Coastguard Worker	      # Archives containing C++ object files must be created using
6521*2e9d4914SAndroid Build Coastguard Worker	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6522*2e9d4914SAndroid Build Coastguard Worker	      # necessary to make sure instantiated templates are included
6523*2e9d4914SAndroid Build Coastguard Worker	      # in the archive.
6524*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6525*2e9d4914SAndroid Build Coastguard Worker	      ;;
6526*2e9d4914SAndroid Build Coastguard Worker	    esac
6527*2e9d4914SAndroid Build Coastguard Worker	    ;;
6528*2e9d4914SAndroid Build Coastguard Worker	esac
6529*2e9d4914SAndroid Build Coastguard Worker	;;
6530*2e9d4914SAndroid Build Coastguard Worker
6531*2e9d4914SAndroid Build Coastguard Worker      lynxos*)
6532*2e9d4914SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6533*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
6534*2e9d4914SAndroid Build Coastguard Worker	;;
6535*2e9d4914SAndroid Build Coastguard Worker
6536*2e9d4914SAndroid Build Coastguard Worker      m88k*)
6537*2e9d4914SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6538*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6539*2e9d4914SAndroid Build Coastguard Worker	;;
6540*2e9d4914SAndroid Build Coastguard Worker
6541*2e9d4914SAndroid Build Coastguard Worker      mvs*)
6542*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6543*2e9d4914SAndroid Build Coastguard Worker          cxx*)
6544*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6545*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6546*2e9d4914SAndroid Build Coastguard Worker	    ;;
6547*2e9d4914SAndroid Build Coastguard Worker	  *)
6548*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6549*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6550*2e9d4914SAndroid Build Coastguard Worker	    ;;
6551*2e9d4914SAndroid Build Coastguard Worker	esac
6552*2e9d4914SAndroid Build Coastguard Worker	;;
6553*2e9d4914SAndroid Build Coastguard Worker
6554*2e9d4914SAndroid Build Coastguard Worker      netbsd*)
6555*2e9d4914SAndroid Build Coastguard Worker        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6556*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6557*2e9d4914SAndroid Build Coastguard Worker	  wlarc=
6558*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6559*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
6560*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6561*2e9d4914SAndroid Build Coastguard Worker	fi
6562*2e9d4914SAndroid Build Coastguard Worker	# Workaround some broken pre-1.5 toolchains
6563*2e9d4914SAndroid Build Coastguard Worker	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6564*2e9d4914SAndroid Build Coastguard Worker	;;
6565*2e9d4914SAndroid Build Coastguard Worker
6566*2e9d4914SAndroid Build Coastguard Worker      *nto* | *qnx*)
6567*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=yes
6568*2e9d4914SAndroid Build Coastguard Worker	;;
6569*2e9d4914SAndroid Build Coastguard Worker
6570*2e9d4914SAndroid Build Coastguard Worker      openbsd2*)
6571*2e9d4914SAndroid Build Coastguard Worker        # C++ shared libraries are fairly broken
6572*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(ld_shlibs, $1)=no
6573*2e9d4914SAndroid Build Coastguard Worker	;;
6574*2e9d4914SAndroid Build Coastguard Worker
6575*2e9d4914SAndroid Build Coastguard Worker      openbsd*)
6576*2e9d4914SAndroid Build Coastguard Worker	if test -f /usr/libexec/ld.so; then
6577*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct, $1)=yes
6578*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6579*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6580*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6581*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6582*2e9d4914SAndroid Build Coastguard Worker	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6583*2e9d4914SAndroid 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'
6584*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6585*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6586*2e9d4914SAndroid Build Coastguard Worker	  fi
6587*2e9d4914SAndroid Build Coastguard Worker	  output_verbose_link_cmd=func_echo_all
6588*2e9d4914SAndroid Build Coastguard Worker	else
6589*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(ld_shlibs, $1)=no
6590*2e9d4914SAndroid Build Coastguard Worker	fi
6591*2e9d4914SAndroid Build Coastguard Worker	;;
6592*2e9d4914SAndroid Build Coastguard Worker
6593*2e9d4914SAndroid Build Coastguard Worker      osf3* | osf4* | osf5*)
6594*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6595*2e9d4914SAndroid Build Coastguard Worker          KCC*)
6596*2e9d4914SAndroid Build Coastguard Worker	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6597*2e9d4914SAndroid Build Coastguard Worker
6598*2e9d4914SAndroid Build Coastguard Worker	    # KCC will only create a shared library if the output file
6599*2e9d4914SAndroid Build Coastguard Worker	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6600*2e9d4914SAndroid Build Coastguard Worker	    # to its proper name (with version) after linking.
6601*2e9d4914SAndroid 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'
6602*2e9d4914SAndroid Build Coastguard Worker
6603*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6604*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6605*2e9d4914SAndroid Build Coastguard Worker
6606*2e9d4914SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6607*2e9d4914SAndroid Build Coastguard Worker	    # the KAI C++ compiler.
6608*2e9d4914SAndroid Build Coastguard Worker	    case $host in
6609*2e9d4914SAndroid Build Coastguard Worker	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6610*2e9d4914SAndroid Build Coastguard Worker	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6611*2e9d4914SAndroid Build Coastguard Worker	    esac
6612*2e9d4914SAndroid Build Coastguard Worker	    ;;
6613*2e9d4914SAndroid Build Coastguard Worker          RCC*)
6614*2e9d4914SAndroid Build Coastguard Worker	    # Rational C++ 2.4.1
6615*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6616*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6617*2e9d4914SAndroid Build Coastguard Worker	    ;;
6618*2e9d4914SAndroid Build Coastguard Worker          cxx*)
6619*2e9d4914SAndroid Build Coastguard Worker	    case $host in
6620*2e9d4914SAndroid Build Coastguard Worker	      osf3*)
6621*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6622*2e9d4914SAndroid 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'
6623*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6624*2e9d4914SAndroid Build Coastguard Worker		;;
6625*2e9d4914SAndroid Build Coastguard Worker	      *)
6626*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6627*2e9d4914SAndroid 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'
6628*2e9d4914SAndroid 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~
6629*2e9d4914SAndroid Build Coastguard Worker	          echo "-hidden">> $lib.exp~
6630*2e9d4914SAndroid 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~
6631*2e9d4914SAndroid Build Coastguard Worker	          $RM $lib.exp'
6632*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6633*2e9d4914SAndroid Build Coastguard Worker		;;
6634*2e9d4914SAndroid Build Coastguard Worker	    esac
6635*2e9d4914SAndroid Build Coastguard Worker
6636*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6637*2e9d4914SAndroid Build Coastguard Worker
6638*2e9d4914SAndroid Build Coastguard Worker	    # Commands to make compiler produce verbose output that lists
6639*2e9d4914SAndroid Build Coastguard Worker	    # what "hidden" libraries, object files and flags are used when
6640*2e9d4914SAndroid Build Coastguard Worker	    # linking a shared library.
6641*2e9d4914SAndroid Build Coastguard Worker	    #
6642*2e9d4914SAndroid Build Coastguard Worker	    # There doesn't appear to be a way to prevent this compiler from
6643*2e9d4914SAndroid Build Coastguard Worker	    # explicitly linking system object files so we need to strip them
6644*2e9d4914SAndroid Build Coastguard Worker	    # from the output so that they don't get included in the library
6645*2e9d4914SAndroid Build Coastguard Worker	    # dependencies.
6646*2e9d4914SAndroid 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"'
6647*2e9d4914SAndroid Build Coastguard Worker	    ;;
6648*2e9d4914SAndroid Build Coastguard Worker	  *)
6649*2e9d4914SAndroid Build Coastguard Worker	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6650*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6651*2e9d4914SAndroid Build Coastguard Worker	      case $host in
6652*2e9d4914SAndroid Build Coastguard Worker	        osf3*)
6653*2e9d4914SAndroid 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'
6654*2e9d4914SAndroid Build Coastguard Worker		  ;;
6655*2e9d4914SAndroid Build Coastguard Worker	        *)
6656*2e9d4914SAndroid 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'
6657*2e9d4914SAndroid Build Coastguard Worker		  ;;
6658*2e9d4914SAndroid Build Coastguard Worker	      esac
6659*2e9d4914SAndroid Build Coastguard Worker
6660*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6661*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6662*2e9d4914SAndroid Build Coastguard Worker
6663*2e9d4914SAndroid Build Coastguard Worker	      # Commands to make compiler produce verbose output that lists
6664*2e9d4914SAndroid Build Coastguard Worker	      # what "hidden" libraries, object files and flags are used when
6665*2e9d4914SAndroid Build Coastguard Worker	      # linking a shared library.
6666*2e9d4914SAndroid Build Coastguard Worker	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6667*2e9d4914SAndroid Build Coastguard Worker
6668*2e9d4914SAndroid Build Coastguard Worker	    else
6669*2e9d4914SAndroid Build Coastguard Worker	      # FIXME: insert proper C++ library support
6670*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(ld_shlibs, $1)=no
6671*2e9d4914SAndroid Build Coastguard Worker	    fi
6672*2e9d4914SAndroid Build Coastguard Worker	    ;;
6673*2e9d4914SAndroid Build Coastguard Worker        esac
6674*2e9d4914SAndroid Build Coastguard Worker        ;;
6675*2e9d4914SAndroid Build Coastguard Worker
6676*2e9d4914SAndroid Build Coastguard Worker      psos*)
6677*2e9d4914SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6678*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6679*2e9d4914SAndroid Build Coastguard Worker        ;;
6680*2e9d4914SAndroid Build Coastguard Worker
6681*2e9d4914SAndroid Build Coastguard Worker      sunos4*)
6682*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6683*2e9d4914SAndroid Build Coastguard Worker          CC*)
6684*2e9d4914SAndroid Build Coastguard Worker	    # Sun C++ 4.x
6685*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6686*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6687*2e9d4914SAndroid Build Coastguard Worker	    ;;
6688*2e9d4914SAndroid Build Coastguard Worker          lcc*)
6689*2e9d4914SAndroid Build Coastguard Worker	    # Lucid
6690*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6691*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6692*2e9d4914SAndroid Build Coastguard Worker	    ;;
6693*2e9d4914SAndroid Build Coastguard Worker          *)
6694*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6695*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6696*2e9d4914SAndroid Build Coastguard Worker	    ;;
6697*2e9d4914SAndroid Build Coastguard Worker        esac
6698*2e9d4914SAndroid Build Coastguard Worker        ;;
6699*2e9d4914SAndroid Build Coastguard Worker
6700*2e9d4914SAndroid Build Coastguard Worker      solaris*)
6701*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6702*2e9d4914SAndroid Build Coastguard Worker          CC* | sunCC*)
6703*2e9d4914SAndroid Build Coastguard Worker	    # Sun C++ 4.2, 5.x and Centerline C++
6704*2e9d4914SAndroid Build Coastguard Worker            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6705*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6706*2e9d4914SAndroid 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'
6707*2e9d4914SAndroid 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~
6708*2e9d4914SAndroid 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'
6709*2e9d4914SAndroid Build Coastguard Worker
6710*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6711*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6712*2e9d4914SAndroid Build Coastguard Worker	    case $host_os in
6713*2e9d4914SAndroid Build Coastguard Worker	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6714*2e9d4914SAndroid Build Coastguard Worker	      *)
6715*2e9d4914SAndroid Build Coastguard Worker		# The compiler driver will combine and reorder linker options,
6716*2e9d4914SAndroid Build Coastguard Worker		# but understands `-z linker_flag'.
6717*2e9d4914SAndroid Build Coastguard Worker	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6718*2e9d4914SAndroid Build Coastguard Worker		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6719*2e9d4914SAndroid Build Coastguard Worker	        ;;
6720*2e9d4914SAndroid Build Coastguard Worker	    esac
6721*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6722*2e9d4914SAndroid Build Coastguard Worker
6723*2e9d4914SAndroid Build Coastguard Worker	    output_verbose_link_cmd='func_echo_all'
6724*2e9d4914SAndroid Build Coastguard Worker
6725*2e9d4914SAndroid Build Coastguard Worker	    # Archives containing C++ object files must be created using
6726*2e9d4914SAndroid Build Coastguard Worker	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6727*2e9d4914SAndroid Build Coastguard Worker	    # necessary to make sure instantiated templates are included
6728*2e9d4914SAndroid Build Coastguard Worker	    # in the archive.
6729*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6730*2e9d4914SAndroid Build Coastguard Worker	    ;;
6731*2e9d4914SAndroid Build Coastguard Worker          gcx*)
6732*2e9d4914SAndroid Build Coastguard Worker	    # Green Hills C++ Compiler
6733*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6734*2e9d4914SAndroid Build Coastguard Worker
6735*2e9d4914SAndroid Build Coastguard Worker	    # The C++ compiler must be used to create the archive.
6736*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6737*2e9d4914SAndroid Build Coastguard Worker	    ;;
6738*2e9d4914SAndroid Build Coastguard Worker          *)
6739*2e9d4914SAndroid Build Coastguard Worker	    # GNU C++ compiler with Solaris linker
6740*2e9d4914SAndroid Build Coastguard Worker	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6741*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6742*2e9d4914SAndroid Build Coastguard Worker	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6743*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6744*2e9d4914SAndroid 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~
6745*2e9d4914SAndroid Build Coastguard Worker		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6746*2e9d4914SAndroid Build Coastguard Worker
6747*2e9d4914SAndroid Build Coastguard Worker	        # Commands to make compiler produce verbose output that lists
6748*2e9d4914SAndroid Build Coastguard Worker	        # what "hidden" libraries, object files and flags are used when
6749*2e9d4914SAndroid Build Coastguard Worker	        # linking a shared library.
6750*2e9d4914SAndroid Build Coastguard Worker	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6751*2e9d4914SAndroid Build Coastguard Worker	      else
6752*2e9d4914SAndroid Build Coastguard Worker	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6753*2e9d4914SAndroid Build Coastguard Worker	        # platform.
6754*2e9d4914SAndroid Build Coastguard Worker	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6755*2e9d4914SAndroid 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~
6756*2e9d4914SAndroid Build Coastguard Worker		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6757*2e9d4914SAndroid Build Coastguard Worker
6758*2e9d4914SAndroid Build Coastguard Worker	        # Commands to make compiler produce verbose output that lists
6759*2e9d4914SAndroid Build Coastguard Worker	        # what "hidden" libraries, object files and flags are used when
6760*2e9d4914SAndroid Build Coastguard Worker	        # linking a shared library.
6761*2e9d4914SAndroid Build Coastguard Worker	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6762*2e9d4914SAndroid Build Coastguard Worker	      fi
6763*2e9d4914SAndroid Build Coastguard Worker
6764*2e9d4914SAndroid Build Coastguard Worker	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6765*2e9d4914SAndroid Build Coastguard Worker	      case $host_os in
6766*2e9d4914SAndroid Build Coastguard Worker		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6767*2e9d4914SAndroid Build Coastguard Worker		*)
6768*2e9d4914SAndroid Build Coastguard Worker		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6769*2e9d4914SAndroid Build Coastguard Worker		  ;;
6770*2e9d4914SAndroid Build Coastguard Worker	      esac
6771*2e9d4914SAndroid Build Coastguard Worker	    fi
6772*2e9d4914SAndroid Build Coastguard Worker	    ;;
6773*2e9d4914SAndroid Build Coastguard Worker        esac
6774*2e9d4914SAndroid Build Coastguard Worker        ;;
6775*2e9d4914SAndroid Build Coastguard Worker
6776*2e9d4914SAndroid Build Coastguard Worker    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6777*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6778*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6779*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6780*2e9d4914SAndroid Build Coastguard Worker      runpath_var='LD_RUN_PATH'
6781*2e9d4914SAndroid Build Coastguard Worker
6782*2e9d4914SAndroid Build Coastguard Worker      case $cc_basename in
6783*2e9d4914SAndroid Build Coastguard Worker        CC*)
6784*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6785*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6786*2e9d4914SAndroid Build Coastguard Worker	  ;;
6787*2e9d4914SAndroid Build Coastguard Worker	*)
6788*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6789*2e9d4914SAndroid Build Coastguard Worker	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6790*2e9d4914SAndroid Build Coastguard Worker	  ;;
6791*2e9d4914SAndroid Build Coastguard Worker      esac
6792*2e9d4914SAndroid Build Coastguard Worker      ;;
6793*2e9d4914SAndroid Build Coastguard Worker
6794*2e9d4914SAndroid Build Coastguard Worker      sysv5* | sco3.2v5* | sco5v6*)
6795*2e9d4914SAndroid Build Coastguard Worker	# Note: We can NOT use -z defs as we might desire, because we do not
6796*2e9d4914SAndroid Build Coastguard Worker	# link with -lc, and that would cause any symbols used from libc to
6797*2e9d4914SAndroid Build Coastguard Worker	# always be unresolved, which means just about no library would
6798*2e9d4914SAndroid Build Coastguard Worker	# ever link correctly.  If we're not using GNU ld we use -z text
6799*2e9d4914SAndroid Build Coastguard Worker	# though, which does catch some bad symbols but isn't as heavy-handed
6800*2e9d4914SAndroid Build Coastguard Worker	# as -z defs.
6801*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6802*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6803*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6804*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6805*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6806*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6807*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(link_all_deplibs, $1)=yes
6808*2e9d4914SAndroid Build Coastguard Worker	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6809*2e9d4914SAndroid Build Coastguard Worker	runpath_var='LD_RUN_PATH'
6810*2e9d4914SAndroid Build Coastguard Worker
6811*2e9d4914SAndroid Build Coastguard Worker	case $cc_basename in
6812*2e9d4914SAndroid Build Coastguard Worker          CC*)
6813*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6814*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6815*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6816*2e9d4914SAndroid Build Coastguard Worker	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
6817*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6818*2e9d4914SAndroid Build Coastguard Worker	      '"$_LT_TAGVAR(reload_cmds, $1)"
6819*2e9d4914SAndroid Build Coastguard Worker	    ;;
6820*2e9d4914SAndroid Build Coastguard Worker	  *)
6821*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6822*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6823*2e9d4914SAndroid Build Coastguard Worker	    ;;
6824*2e9d4914SAndroid Build Coastguard Worker	esac
6825*2e9d4914SAndroid Build Coastguard Worker      ;;
6826*2e9d4914SAndroid Build Coastguard Worker
6827*2e9d4914SAndroid Build Coastguard Worker      tandem*)
6828*2e9d4914SAndroid Build Coastguard Worker        case $cc_basename in
6829*2e9d4914SAndroid Build Coastguard Worker          NCC*)
6830*2e9d4914SAndroid Build Coastguard Worker	    # NonStop-UX NCC 3.20
6831*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6832*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6833*2e9d4914SAndroid Build Coastguard Worker	    ;;
6834*2e9d4914SAndroid Build Coastguard Worker          *)
6835*2e9d4914SAndroid Build Coastguard Worker	    # FIXME: insert proper C++ library support
6836*2e9d4914SAndroid Build Coastguard Worker	    _LT_TAGVAR(ld_shlibs, $1)=no
6837*2e9d4914SAndroid Build Coastguard Worker	    ;;
6838*2e9d4914SAndroid Build Coastguard Worker        esac
6839*2e9d4914SAndroid Build Coastguard Worker        ;;
6840*2e9d4914SAndroid Build Coastguard Worker
6841*2e9d4914SAndroid Build Coastguard Worker      vxworks*)
6842*2e9d4914SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6843*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6844*2e9d4914SAndroid Build Coastguard Worker        ;;
6845*2e9d4914SAndroid Build Coastguard Worker
6846*2e9d4914SAndroid Build Coastguard Worker      *)
6847*2e9d4914SAndroid Build Coastguard Worker        # FIXME: insert proper C++ library support
6848*2e9d4914SAndroid Build Coastguard Worker        _LT_TAGVAR(ld_shlibs, $1)=no
6849*2e9d4914SAndroid Build Coastguard Worker        ;;
6850*2e9d4914SAndroid Build Coastguard Worker    esac
6851*2e9d4914SAndroid Build Coastguard Worker
6852*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6853*2e9d4914SAndroid Build Coastguard Worker    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6854*2e9d4914SAndroid Build Coastguard Worker
6855*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)="$GXX"
6856*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)="$LD"
6857*2e9d4914SAndroid Build Coastguard Worker
6858*2e9d4914SAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
6859*2e9d4914SAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
6860*2e9d4914SAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
6861*2e9d4914SAndroid Build Coastguard Worker    ## what you are doing...
6862*2e9d4914SAndroid Build Coastguard Worker    _LT_SYS_HIDDEN_LIBDEPS($1)
6863*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
6864*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
6865*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
6866*2e9d4914SAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
6867*2e9d4914SAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
6868*2e9d4914SAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
6869*2e9d4914SAndroid Build Coastguard Worker
6870*2e9d4914SAndroid Build Coastguard Worker    _LT_CONFIG($1)
6871*2e9d4914SAndroid Build Coastguard Worker  fi # test -n "$compiler"
6872*2e9d4914SAndroid Build Coastguard Worker
6873*2e9d4914SAndroid Build Coastguard Worker  CC=$lt_save_CC
6874*2e9d4914SAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
6875*2e9d4914SAndroid Build Coastguard Worker  LDCXX=$LD
6876*2e9d4914SAndroid Build Coastguard Worker  LD=$lt_save_LD
6877*2e9d4914SAndroid Build Coastguard Worker  GCC=$lt_save_GCC
6878*2e9d4914SAndroid Build Coastguard Worker  with_gnu_ld=$lt_save_with_gnu_ld
6879*2e9d4914SAndroid Build Coastguard Worker  lt_cv_path_LDCXX=$lt_cv_path_LD
6880*2e9d4914SAndroid Build Coastguard Worker  lt_cv_path_LD=$lt_save_path_LD
6881*2e9d4914SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6882*2e9d4914SAndroid Build Coastguard Worker  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6883*2e9d4914SAndroid Build Coastguard Workerfi # test "$_lt_caught_CXX_error" != yes
6884*2e9d4914SAndroid Build Coastguard Worker
6885*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_POP
6886*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_CXX_CONFIG
6887*2e9d4914SAndroid Build Coastguard Worker
6888*2e9d4914SAndroid Build Coastguard Worker
6889*2e9d4914SAndroid Build Coastguard Worker# _LT_FUNC_STRIPNAME_CNF
6890*2e9d4914SAndroid Build Coastguard Worker# ----------------------
6891*2e9d4914SAndroid Build Coastguard Worker# func_stripname_cnf prefix suffix name
6892*2e9d4914SAndroid Build Coastguard Worker# strip PREFIX and SUFFIX off of NAME.
6893*2e9d4914SAndroid Build Coastguard Worker# PREFIX and SUFFIX must not contain globbing or regex special
6894*2e9d4914SAndroid Build Coastguard Worker# characters, hashes, percent signs, but SUFFIX may contain a leading
6895*2e9d4914SAndroid Build Coastguard Worker# dot (in which case that matches only a dot).
6896*2e9d4914SAndroid Build Coastguard Worker#
6897*2e9d4914SAndroid Build Coastguard Worker# This function is identical to the (non-XSI) version of func_stripname,
6898*2e9d4914SAndroid Build Coastguard Worker# except this one can be used by m4 code that may be executed by configure,
6899*2e9d4914SAndroid Build Coastguard Worker# rather than the libtool script.
6900*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6901*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED])
6902*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6903*2e9d4914SAndroid Build Coastguard Workerfunc_stripname_cnf ()
6904*2e9d4914SAndroid Build Coastguard Worker{
6905*2e9d4914SAndroid Build Coastguard Worker  case ${2} in
6906*2e9d4914SAndroid Build Coastguard Worker  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6907*2e9d4914SAndroid Build Coastguard Worker  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6908*2e9d4914SAndroid Build Coastguard Worker  esac
6909*2e9d4914SAndroid Build Coastguard Worker} # func_stripname_cnf
6910*2e9d4914SAndroid Build Coastguard Worker])# _LT_FUNC_STRIPNAME_CNF
6911*2e9d4914SAndroid Build Coastguard Worker
6912*2e9d4914SAndroid Build Coastguard Worker# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6913*2e9d4914SAndroid Build Coastguard Worker# ---------------------------------
6914*2e9d4914SAndroid Build Coastguard Worker# Figure out "hidden" library dependencies from verbose
6915*2e9d4914SAndroid Build Coastguard Worker# compiler output when linking a shared library.
6916*2e9d4914SAndroid Build Coastguard Worker# Parse the compiler output and extract the necessary
6917*2e9d4914SAndroid Build Coastguard Worker# objects, libraries and library flags.
6918*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6919*2e9d4914SAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6920*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6921*2e9d4914SAndroid Build Coastguard Worker# Dependencies to place before and after the object being linked:
6922*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(predep_objects, $1)=
6923*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(postdep_objects, $1)=
6924*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(predeps, $1)=
6925*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(postdeps, $1)=
6926*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(compiler_lib_search_path, $1)=
6927*2e9d4914SAndroid Build Coastguard Worker
6928*2e9d4914SAndroid Build Coastguard Workerdnl we can't use the lt_simple_compile_test_code here,
6929*2e9d4914SAndroid Build Coastguard Workerdnl because it contains code intended for an executable,
6930*2e9d4914SAndroid Build Coastguard Workerdnl not a library.  It's possible we should let each
6931*2e9d4914SAndroid Build Coastguard Workerdnl tag define a new lt_????_link_test_code variable,
6932*2e9d4914SAndroid Build Coastguard Workerdnl but it's only used here...
6933*2e9d4914SAndroid Build Coastguard Workerm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6934*2e9d4914SAndroid Build Coastguard Workerint a;
6935*2e9d4914SAndroid Build Coastguard Workervoid foo (void) { a = 0; }
6936*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
6937*2e9d4914SAndroid Build Coastguard Worker], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6938*2e9d4914SAndroid Build Coastguard Workerclass Foo
6939*2e9d4914SAndroid Build Coastguard Worker{
6940*2e9d4914SAndroid Build Coastguard Workerpublic:
6941*2e9d4914SAndroid Build Coastguard Worker  Foo (void) { a = 0; }
6942*2e9d4914SAndroid Build Coastguard Workerprivate:
6943*2e9d4914SAndroid Build Coastguard Worker  int a;
6944*2e9d4914SAndroid Build Coastguard Worker};
6945*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
6946*2e9d4914SAndroid Build Coastguard Worker], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6947*2e9d4914SAndroid Build Coastguard Worker      subroutine foo
6948*2e9d4914SAndroid Build Coastguard Worker      implicit none
6949*2e9d4914SAndroid Build Coastguard Worker      integer*4 a
6950*2e9d4914SAndroid Build Coastguard Worker      a=0
6951*2e9d4914SAndroid Build Coastguard Worker      return
6952*2e9d4914SAndroid Build Coastguard Worker      end
6953*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
6954*2e9d4914SAndroid Build Coastguard Worker], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6955*2e9d4914SAndroid Build Coastguard Worker      subroutine foo
6956*2e9d4914SAndroid Build Coastguard Worker      implicit none
6957*2e9d4914SAndroid Build Coastguard Worker      integer a
6958*2e9d4914SAndroid Build Coastguard Worker      a=0
6959*2e9d4914SAndroid Build Coastguard Worker      return
6960*2e9d4914SAndroid Build Coastguard Worker      end
6961*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
6962*2e9d4914SAndroid Build Coastguard Worker], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6963*2e9d4914SAndroid Build Coastguard Workerpublic class foo {
6964*2e9d4914SAndroid Build Coastguard Worker  private int a;
6965*2e9d4914SAndroid Build Coastguard Worker  public void bar (void) {
6966*2e9d4914SAndroid Build Coastguard Worker    a = 0;
6967*2e9d4914SAndroid Build Coastguard Worker  }
6968*2e9d4914SAndroid Build Coastguard Worker};
6969*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
6970*2e9d4914SAndroid Build Coastguard Worker], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6971*2e9d4914SAndroid Build Coastguard Workerpackage foo
6972*2e9d4914SAndroid Build Coastguard Workerfunc foo() {
6973*2e9d4914SAndroid Build Coastguard Worker}
6974*2e9d4914SAndroid Build Coastguard Worker_LT_EOF
6975*2e9d4914SAndroid Build Coastguard Worker])
6976*2e9d4914SAndroid Build Coastguard Worker
6977*2e9d4914SAndroid Build Coastguard Worker_lt_libdeps_save_CFLAGS=$CFLAGS
6978*2e9d4914SAndroid Build Coastguard Workercase "$CC $CFLAGS " in #(
6979*2e9d4914SAndroid Build Coastguard Worker*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6980*2e9d4914SAndroid Build Coastguard Worker*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6981*2e9d4914SAndroid Build Coastguard Worker*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6982*2e9d4914SAndroid Build Coastguard Workeresac
6983*2e9d4914SAndroid Build Coastguard Worker
6984*2e9d4914SAndroid Build Coastguard Workerdnl Parse the compiler output and extract the necessary
6985*2e9d4914SAndroid Build Coastguard Workerdnl objects, libraries and library flags.
6986*2e9d4914SAndroid Build Coastguard Workerif AC_TRY_EVAL(ac_compile); then
6987*2e9d4914SAndroid Build Coastguard Worker  # Parse the compiler output and extract the necessary
6988*2e9d4914SAndroid Build Coastguard Worker  # objects, libraries and library flags.
6989*2e9d4914SAndroid Build Coastguard Worker
6990*2e9d4914SAndroid Build Coastguard Worker  # Sentinel used to keep track of whether or not we are before
6991*2e9d4914SAndroid Build Coastguard Worker  # the conftest object file.
6992*2e9d4914SAndroid Build Coastguard Worker  pre_test_object_deps_done=no
6993*2e9d4914SAndroid Build Coastguard Worker
6994*2e9d4914SAndroid Build Coastguard Worker  for p in `eval "$output_verbose_link_cmd"`; do
6995*2e9d4914SAndroid Build Coastguard Worker    case ${prev}${p} in
6996*2e9d4914SAndroid Build Coastguard Worker
6997*2e9d4914SAndroid Build Coastguard Worker    -L* | -R* | -l*)
6998*2e9d4914SAndroid Build Coastguard Worker       # Some compilers place space between "-{L,R}" and the path.
6999*2e9d4914SAndroid Build Coastguard Worker       # Remove the space.
7000*2e9d4914SAndroid Build Coastguard Worker       if test $p = "-L" ||
7001*2e9d4914SAndroid Build Coastguard Worker          test $p = "-R"; then
7002*2e9d4914SAndroid Build Coastguard Worker	 prev=$p
7003*2e9d4914SAndroid Build Coastguard Worker	 continue
7004*2e9d4914SAndroid Build Coastguard Worker       fi
7005*2e9d4914SAndroid Build Coastguard Worker
7006*2e9d4914SAndroid Build Coastguard Worker       # Expand the sysroot to ease extracting the directories later.
7007*2e9d4914SAndroid Build Coastguard Worker       if test -z "$prev"; then
7008*2e9d4914SAndroid Build Coastguard Worker         case $p in
7009*2e9d4914SAndroid Build Coastguard Worker         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7010*2e9d4914SAndroid Build Coastguard Worker         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7011*2e9d4914SAndroid Build Coastguard Worker         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7012*2e9d4914SAndroid Build Coastguard Worker         esac
7013*2e9d4914SAndroid Build Coastguard Worker       fi
7014*2e9d4914SAndroid Build Coastguard Worker       case $p in
7015*2e9d4914SAndroid Build Coastguard Worker       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7016*2e9d4914SAndroid Build Coastguard Worker       esac
7017*2e9d4914SAndroid Build Coastguard Worker       if test "$pre_test_object_deps_done" = no; then
7018*2e9d4914SAndroid Build Coastguard Worker	 case ${prev} in
7019*2e9d4914SAndroid Build Coastguard Worker	 -L | -R)
7020*2e9d4914SAndroid Build Coastguard Worker	   # Internal compiler library paths should come after those
7021*2e9d4914SAndroid Build Coastguard Worker	   # provided the user.  The postdeps already come after the
7022*2e9d4914SAndroid Build Coastguard Worker	   # user supplied libs so there is no need to process them.
7023*2e9d4914SAndroid Build Coastguard Worker	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7024*2e9d4914SAndroid Build Coastguard Worker	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7025*2e9d4914SAndroid Build Coastguard Worker	   else
7026*2e9d4914SAndroid Build Coastguard Worker	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7027*2e9d4914SAndroid Build Coastguard Worker	   fi
7028*2e9d4914SAndroid Build Coastguard Worker	   ;;
7029*2e9d4914SAndroid Build Coastguard Worker	 # The "-l" case would never come before the object being
7030*2e9d4914SAndroid Build Coastguard Worker	 # linked, so don't bother handling this case.
7031*2e9d4914SAndroid Build Coastguard Worker	 esac
7032*2e9d4914SAndroid Build Coastguard Worker       else
7033*2e9d4914SAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7034*2e9d4914SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7035*2e9d4914SAndroid Build Coastguard Worker	 else
7036*2e9d4914SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7037*2e9d4914SAndroid Build Coastguard Worker	 fi
7038*2e9d4914SAndroid Build Coastguard Worker       fi
7039*2e9d4914SAndroid Build Coastguard Worker       prev=
7040*2e9d4914SAndroid Build Coastguard Worker       ;;
7041*2e9d4914SAndroid Build Coastguard Worker
7042*2e9d4914SAndroid Build Coastguard Worker    *.lto.$objext) ;; # Ignore GCC LTO objects
7043*2e9d4914SAndroid Build Coastguard Worker    *.$objext)
7044*2e9d4914SAndroid Build Coastguard Worker       # This assumes that the test object file only shows up
7045*2e9d4914SAndroid Build Coastguard Worker       # once in the compiler output.
7046*2e9d4914SAndroid Build Coastguard Worker       if test "$p" = "conftest.$objext"; then
7047*2e9d4914SAndroid Build Coastguard Worker	 pre_test_object_deps_done=yes
7048*2e9d4914SAndroid Build Coastguard Worker	 continue
7049*2e9d4914SAndroid Build Coastguard Worker       fi
7050*2e9d4914SAndroid Build Coastguard Worker
7051*2e9d4914SAndroid Build Coastguard Worker       if test "$pre_test_object_deps_done" = no; then
7052*2e9d4914SAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7053*2e9d4914SAndroid Build Coastguard Worker	   _LT_TAGVAR(predep_objects, $1)="$p"
7054*2e9d4914SAndroid Build Coastguard Worker	 else
7055*2e9d4914SAndroid Build Coastguard Worker	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7056*2e9d4914SAndroid Build Coastguard Worker	 fi
7057*2e9d4914SAndroid Build Coastguard Worker       else
7058*2e9d4914SAndroid Build Coastguard Worker	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7059*2e9d4914SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdep_objects, $1)="$p"
7060*2e9d4914SAndroid Build Coastguard Worker	 else
7061*2e9d4914SAndroid Build Coastguard Worker	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7062*2e9d4914SAndroid Build Coastguard Worker	 fi
7063*2e9d4914SAndroid Build Coastguard Worker       fi
7064*2e9d4914SAndroid Build Coastguard Worker       ;;
7065*2e9d4914SAndroid Build Coastguard Worker
7066*2e9d4914SAndroid Build Coastguard Worker    *) ;; # Ignore the rest.
7067*2e9d4914SAndroid Build Coastguard Worker
7068*2e9d4914SAndroid Build Coastguard Worker    esac
7069*2e9d4914SAndroid Build Coastguard Worker  done
7070*2e9d4914SAndroid Build Coastguard Worker
7071*2e9d4914SAndroid Build Coastguard Worker  # Clean up.
7072*2e9d4914SAndroid Build Coastguard Worker  rm -f a.out a.exe
7073*2e9d4914SAndroid Build Coastguard Workerelse
7074*2e9d4914SAndroid Build Coastguard Worker  echo "libtool.m4: error: problem compiling $1 test program"
7075*2e9d4914SAndroid Build Coastguard Workerfi
7076*2e9d4914SAndroid Build Coastguard Worker
7077*2e9d4914SAndroid Build Coastguard Worker$RM -f confest.$objext
7078*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=$_lt_libdeps_save_CFLAGS
7079*2e9d4914SAndroid Build Coastguard Worker
7080*2e9d4914SAndroid Build Coastguard Worker# PORTME: override above test on systems where it is broken
7081*2e9d4914SAndroid Build Coastguard Workerm4_if([$1], [CXX],
7082*2e9d4914SAndroid Build Coastguard Worker[case $host_os in
7083*2e9d4914SAndroid Build Coastguard Workerinterix[[3-9]]*)
7084*2e9d4914SAndroid Build Coastguard Worker  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7085*2e9d4914SAndroid Build Coastguard Worker  # hack all around it, let's just trust "g++" to DTRT.
7086*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(predep_objects,$1)=
7087*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(postdep_objects,$1)=
7088*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(postdeps,$1)=
7089*2e9d4914SAndroid Build Coastguard Worker  ;;
7090*2e9d4914SAndroid Build Coastguard Worker
7091*2e9d4914SAndroid Build Coastguard Workerlinux*)
7092*2e9d4914SAndroid Build Coastguard Worker  case `$CC -V 2>&1 | sed 5q` in
7093*2e9d4914SAndroid Build Coastguard Worker  *Sun\ C*)
7094*2e9d4914SAndroid Build Coastguard Worker    # Sun C++ 5.9
7095*2e9d4914SAndroid Build Coastguard Worker
7096*2e9d4914SAndroid Build Coastguard Worker    # The more standards-conforming stlport4 library is
7097*2e9d4914SAndroid Build Coastguard Worker    # incompatible with the Cstd library. Avoid specifying
7098*2e9d4914SAndroid Build Coastguard Worker    # it if it's in CXXFLAGS. Ignore libCrun as
7099*2e9d4914SAndroid Build Coastguard Worker    # -library=stlport4 depends on it.
7100*2e9d4914SAndroid Build Coastguard Worker    case " $CXX $CXXFLAGS " in
7101*2e9d4914SAndroid Build Coastguard Worker    *" -library=stlport4 "*)
7102*2e9d4914SAndroid Build Coastguard Worker      solaris_use_stlport4=yes
7103*2e9d4914SAndroid Build Coastguard Worker      ;;
7104*2e9d4914SAndroid Build Coastguard Worker    esac
7105*2e9d4914SAndroid Build Coastguard Worker
7106*2e9d4914SAndroid Build Coastguard Worker    if test "$solaris_use_stlport4" != yes; then
7107*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7108*2e9d4914SAndroid Build Coastguard Worker    fi
7109*2e9d4914SAndroid Build Coastguard Worker    ;;
7110*2e9d4914SAndroid Build Coastguard Worker  esac
7111*2e9d4914SAndroid Build Coastguard Worker  ;;
7112*2e9d4914SAndroid Build Coastguard Worker
7113*2e9d4914SAndroid Build Coastguard Workersolaris*)
7114*2e9d4914SAndroid Build Coastguard Worker  case $cc_basename in
7115*2e9d4914SAndroid Build Coastguard Worker  CC* | sunCC*)
7116*2e9d4914SAndroid Build Coastguard Worker    # The more standards-conforming stlport4 library is
7117*2e9d4914SAndroid Build Coastguard Worker    # incompatible with the Cstd library. Avoid specifying
7118*2e9d4914SAndroid Build Coastguard Worker    # it if it's in CXXFLAGS. Ignore libCrun as
7119*2e9d4914SAndroid Build Coastguard Worker    # -library=stlport4 depends on it.
7120*2e9d4914SAndroid Build Coastguard Worker    case " $CXX $CXXFLAGS " in
7121*2e9d4914SAndroid Build Coastguard Worker    *" -library=stlport4 "*)
7122*2e9d4914SAndroid Build Coastguard Worker      solaris_use_stlport4=yes
7123*2e9d4914SAndroid Build Coastguard Worker      ;;
7124*2e9d4914SAndroid Build Coastguard Worker    esac
7125*2e9d4914SAndroid Build Coastguard Worker
7126*2e9d4914SAndroid Build Coastguard Worker    # Adding this requires a known-good setup of shared libraries for
7127*2e9d4914SAndroid Build Coastguard Worker    # Sun compiler versions before 5.6, else PIC objects from an old
7128*2e9d4914SAndroid Build Coastguard Worker    # archive will be linked into the output, leading to subtle bugs.
7129*2e9d4914SAndroid Build Coastguard Worker    if test "$solaris_use_stlport4" != yes; then
7130*2e9d4914SAndroid Build Coastguard Worker      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7131*2e9d4914SAndroid Build Coastguard Worker    fi
7132*2e9d4914SAndroid Build Coastguard Worker    ;;
7133*2e9d4914SAndroid Build Coastguard Worker  esac
7134*2e9d4914SAndroid Build Coastguard Worker  ;;
7135*2e9d4914SAndroid Build Coastguard Workeresac
7136*2e9d4914SAndroid Build Coastguard Worker])
7137*2e9d4914SAndroid Build Coastguard Worker
7138*2e9d4914SAndroid Build Coastguard Workercase " $_LT_TAGVAR(postdeps, $1) " in
7139*2e9d4914SAndroid Build Coastguard Worker*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7140*2e9d4914SAndroid Build Coastguard Workeresac
7141*2e9d4914SAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7142*2e9d4914SAndroid Build Coastguard Workerif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7143*2e9d4914SAndroid 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!^ !!'`
7144*2e9d4914SAndroid Build Coastguard Workerfi
7145*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7146*2e9d4914SAndroid Build Coastguard Worker    [The directories searched by this compiler when creating a shared library])
7147*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [predep_objects], [1],
7148*2e9d4914SAndroid Build Coastguard Worker    [Dependencies to place before and after the objects being linked to
7149*2e9d4914SAndroid Build Coastguard Worker    create a shared library])
7150*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [postdep_objects], [1])
7151*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [predeps], [1])
7152*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [postdeps], [1])
7153*2e9d4914SAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_path], [1],
7154*2e9d4914SAndroid Build Coastguard Worker    [The library search path used internally by the compiler when linking
7155*2e9d4914SAndroid Build Coastguard Worker    a shared library])
7156*2e9d4914SAndroid Build Coastguard Worker])# _LT_SYS_HIDDEN_LIBDEPS
7157*2e9d4914SAndroid Build Coastguard Worker
7158*2e9d4914SAndroid Build Coastguard Worker
7159*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_F77_CONFIG([TAG])
7160*2e9d4914SAndroid Build Coastguard Worker# --------------------------
7161*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran 77 compiler are
7162*2e9d4914SAndroid Build Coastguard Worker# suitably defined.  These variables are subsequently used by _LT_CONFIG
7163*2e9d4914SAndroid Build Coastguard Worker# to write the compiler configuration to `libtool'.
7164*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_F77_CONFIG],
7165*2e9d4914SAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran 77)
7166*2e9d4914SAndroid Build Coastguard Workerif test -z "$F77" || test "X$F77" = "Xno"; then
7167*2e9d4914SAndroid Build Coastguard Worker  _lt_disable_F77=yes
7168*2e9d4914SAndroid Build Coastguard Workerfi
7169*2e9d4914SAndroid Build Coastguard Worker
7170*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7171*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
7172*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
7173*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
7174*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7175*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
7176*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7177*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7178*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
7179*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
7180*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
7181*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
7182*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
7183*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
7184*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
7185*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7186*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7187*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7188*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
7189*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
7190*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7191*2e9d4914SAndroid Build Coastguard Worker
7192*2e9d4914SAndroid Build Coastguard Worker# Source file extension for f77 test sources.
7193*2e9d4914SAndroid Build Coastguard Workerac_ext=f
7194*2e9d4914SAndroid Build Coastguard Worker
7195*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled f77 test sources.
7196*2e9d4914SAndroid Build Coastguard Workerobjext=o
7197*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7198*2e9d4914SAndroid Build Coastguard Worker
7199*2e9d4914SAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
7200*2e9d4914SAndroid Build Coastguard Worker# the F77 compiler isn't working.  Some variables (like enable_shared)
7201*2e9d4914SAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
7202*2e9d4914SAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
7203*2e9d4914SAndroid Build Coastguard Workerif test "$_lt_disable_F77" != yes; then
7204*2e9d4914SAndroid Build Coastguard Worker  # Code to be used in simple compile tests
7205*2e9d4914SAndroid Build Coastguard Worker  lt_simple_compile_test_code="\
7206*2e9d4914SAndroid Build Coastguard Worker      subroutine t
7207*2e9d4914SAndroid Build Coastguard Worker      return
7208*2e9d4914SAndroid Build Coastguard Worker      end
7209*2e9d4914SAndroid Build Coastguard Worker"
7210*2e9d4914SAndroid Build Coastguard Worker
7211*2e9d4914SAndroid Build Coastguard Worker  # Code to be used in simple link tests
7212*2e9d4914SAndroid Build Coastguard Worker  lt_simple_link_test_code="\
7213*2e9d4914SAndroid Build Coastguard Worker      program t
7214*2e9d4914SAndroid Build Coastguard Worker      end
7215*2e9d4914SAndroid Build Coastguard Worker"
7216*2e9d4914SAndroid Build Coastguard Worker
7217*2e9d4914SAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7218*2e9d4914SAndroid Build Coastguard Worker  _LT_TAG_COMPILER
7219*2e9d4914SAndroid Build Coastguard Worker
7220*2e9d4914SAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
7221*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
7222*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
7223*2e9d4914SAndroid Build Coastguard Worker
7224*2e9d4914SAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
7225*2e9d4914SAndroid Build Coastguard Worker  lt_save_CC="$CC"
7226*2e9d4914SAndroid Build Coastguard Worker  lt_save_GCC=$GCC
7227*2e9d4914SAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
7228*2e9d4914SAndroid Build Coastguard Worker  CC=${F77-"f77"}
7229*2e9d4914SAndroid Build Coastguard Worker  CFLAGS=$FFLAGS
7230*2e9d4914SAndroid Build Coastguard Worker  compiler=$CC
7231*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
7232*2e9d4914SAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
7233*2e9d4914SAndroid Build Coastguard Worker  GCC=$G77
7234*2e9d4914SAndroid Build Coastguard Worker  if test -n "$compiler"; then
7235*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([if libtool supports shared libraries])
7236*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$can_build_shared])
7237*2e9d4914SAndroid Build Coastguard Worker
7238*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build shared libraries])
7239*2e9d4914SAndroid Build Coastguard Worker    test "$can_build_shared" = "no" && enable_shared=no
7240*2e9d4914SAndroid Build Coastguard Worker
7241*2e9d4914SAndroid Build Coastguard Worker    # On AIX, shared libraries and static libraries use the same namespace, and
7242*2e9d4914SAndroid Build Coastguard Worker    # are all built from PIC.
7243*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
7244*2e9d4914SAndroid Build Coastguard Worker      aix3*)
7245*2e9d4914SAndroid Build Coastguard Worker        test "$enable_shared" = yes && enable_static=no
7246*2e9d4914SAndroid Build Coastguard Worker        if test -n "$RANLIB"; then
7247*2e9d4914SAndroid Build Coastguard Worker          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7248*2e9d4914SAndroid Build Coastguard Worker          postinstall_cmds='$RANLIB $lib'
7249*2e9d4914SAndroid Build Coastguard Worker        fi
7250*2e9d4914SAndroid Build Coastguard Worker        ;;
7251*2e9d4914SAndroid Build Coastguard Worker      aix[[4-9]]*)
7252*2e9d4914SAndroid Build Coastguard Worker	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7253*2e9d4914SAndroid Build Coastguard Worker	  test "$enable_shared" = yes && enable_static=no
7254*2e9d4914SAndroid Build Coastguard Worker	fi
7255*2e9d4914SAndroid Build Coastguard Worker        ;;
7256*2e9d4914SAndroid Build Coastguard Worker    esac
7257*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_shared])
7258*2e9d4914SAndroid Build Coastguard Worker
7259*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build static libraries])
7260*2e9d4914SAndroid Build Coastguard Worker    # Make sure either enable_shared or enable_static is yes.
7261*2e9d4914SAndroid Build Coastguard Worker    test "$enable_shared" = yes || enable_static=yes
7262*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_static])
7263*2e9d4914SAndroid Build Coastguard Worker
7264*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)="$G77"
7265*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)="$LD"
7266*2e9d4914SAndroid Build Coastguard Worker
7267*2e9d4914SAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7268*2e9d4914SAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7269*2e9d4914SAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7270*2e9d4914SAndroid Build Coastguard Worker    ## what you are doing...
7271*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7272*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7273*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7274*2e9d4914SAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7275*2e9d4914SAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7276*2e9d4914SAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7277*2e9d4914SAndroid Build Coastguard Worker
7278*2e9d4914SAndroid Build Coastguard Worker    _LT_CONFIG($1)
7279*2e9d4914SAndroid Build Coastguard Worker  fi # test -n "$compiler"
7280*2e9d4914SAndroid Build Coastguard Worker
7281*2e9d4914SAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7282*2e9d4914SAndroid Build Coastguard Worker  CC="$lt_save_CC"
7283*2e9d4914SAndroid Build Coastguard Worker  CFLAGS="$lt_save_CFLAGS"
7284*2e9d4914SAndroid Build Coastguard Workerfi # test "$_lt_disable_F77" != yes
7285*2e9d4914SAndroid Build Coastguard Worker
7286*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_POP
7287*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_F77_CONFIG
7288*2e9d4914SAndroid Build Coastguard Worker
7289*2e9d4914SAndroid Build Coastguard Worker
7290*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_FC_CONFIG([TAG])
7291*2e9d4914SAndroid Build Coastguard Worker# -------------------------
7292*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran compiler are
7293*2e9d4914SAndroid Build Coastguard Worker# suitably defined.  These variables are subsequently used by _LT_CONFIG
7294*2e9d4914SAndroid Build Coastguard Worker# to write the compiler configuration to `libtool'.
7295*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_FC_CONFIG],
7296*2e9d4914SAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran)
7297*2e9d4914SAndroid Build Coastguard Worker
7298*2e9d4914SAndroid Build Coastguard Workerif test -z "$FC" || test "X$FC" = "Xno"; then
7299*2e9d4914SAndroid Build Coastguard Worker  _lt_disable_FC=yes
7300*2e9d4914SAndroid Build Coastguard Workerfi
7301*2e9d4914SAndroid Build Coastguard Worker
7302*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7303*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)=
7304*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no
7305*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)=
7306*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7307*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no
7308*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7309*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7310*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)=
7311*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no
7312*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no
7313*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no
7314*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)=
7315*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)=
7316*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown
7317*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7318*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7319*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7320*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)=
7321*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)=
7322*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7323*2e9d4914SAndroid Build Coastguard Worker
7324*2e9d4914SAndroid Build Coastguard Worker# Source file extension for fc test sources.
7325*2e9d4914SAndroid Build Coastguard Workerac_ext=${ac_fc_srcext-f}
7326*2e9d4914SAndroid Build Coastguard Worker
7327*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled fc test sources.
7328*2e9d4914SAndroid Build Coastguard Workerobjext=o
7329*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7330*2e9d4914SAndroid Build Coastguard Worker
7331*2e9d4914SAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that
7332*2e9d4914SAndroid Build Coastguard Worker# the FC compiler isn't working.  Some variables (like enable_shared)
7333*2e9d4914SAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform,
7334*2e9d4914SAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler.
7335*2e9d4914SAndroid Build Coastguard Workerif test "$_lt_disable_FC" != yes; then
7336*2e9d4914SAndroid Build Coastguard Worker  # Code to be used in simple compile tests
7337*2e9d4914SAndroid Build Coastguard Worker  lt_simple_compile_test_code="\
7338*2e9d4914SAndroid Build Coastguard Worker      subroutine t
7339*2e9d4914SAndroid Build Coastguard Worker      return
7340*2e9d4914SAndroid Build Coastguard Worker      end
7341*2e9d4914SAndroid Build Coastguard Worker"
7342*2e9d4914SAndroid Build Coastguard Worker
7343*2e9d4914SAndroid Build Coastguard Worker  # Code to be used in simple link tests
7344*2e9d4914SAndroid Build Coastguard Worker  lt_simple_link_test_code="\
7345*2e9d4914SAndroid Build Coastguard Worker      program t
7346*2e9d4914SAndroid Build Coastguard Worker      end
7347*2e9d4914SAndroid Build Coastguard Worker"
7348*2e9d4914SAndroid Build Coastguard Worker
7349*2e9d4914SAndroid Build Coastguard Worker  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7350*2e9d4914SAndroid Build Coastguard Worker  _LT_TAG_COMPILER
7351*2e9d4914SAndroid Build Coastguard Worker
7352*2e9d4914SAndroid Build Coastguard Worker  # save warnings/boilerplate of simple test code
7353*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_BOILERPLATE
7354*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_BOILERPLATE
7355*2e9d4914SAndroid Build Coastguard Worker
7356*2e9d4914SAndroid Build Coastguard Worker  # Allow CC to be a program name with arguments.
7357*2e9d4914SAndroid Build Coastguard Worker  lt_save_CC="$CC"
7358*2e9d4914SAndroid Build Coastguard Worker  lt_save_GCC=$GCC
7359*2e9d4914SAndroid Build Coastguard Worker  lt_save_CFLAGS=$CFLAGS
7360*2e9d4914SAndroid Build Coastguard Worker  CC=${FC-"f95"}
7361*2e9d4914SAndroid Build Coastguard Worker  CFLAGS=$FCFLAGS
7362*2e9d4914SAndroid Build Coastguard Worker  compiler=$CC
7363*2e9d4914SAndroid Build Coastguard Worker  GCC=$ac_cv_fc_compiler_gnu
7364*2e9d4914SAndroid Build Coastguard Worker
7365*2e9d4914SAndroid Build Coastguard Worker  _LT_TAGVAR(compiler, $1)=$CC
7366*2e9d4914SAndroid Build Coastguard Worker  _LT_CC_BASENAME([$compiler])
7367*2e9d4914SAndroid Build Coastguard Worker
7368*2e9d4914SAndroid Build Coastguard Worker  if test -n "$compiler"; then
7369*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([if libtool supports shared libraries])
7370*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$can_build_shared])
7371*2e9d4914SAndroid Build Coastguard Worker
7372*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build shared libraries])
7373*2e9d4914SAndroid Build Coastguard Worker    test "$can_build_shared" = "no" && enable_shared=no
7374*2e9d4914SAndroid Build Coastguard Worker
7375*2e9d4914SAndroid Build Coastguard Worker    # On AIX, shared libraries and static libraries use the same namespace, and
7376*2e9d4914SAndroid Build Coastguard Worker    # are all built from PIC.
7377*2e9d4914SAndroid Build Coastguard Worker    case $host_os in
7378*2e9d4914SAndroid Build Coastguard Worker      aix3*)
7379*2e9d4914SAndroid Build Coastguard Worker        test "$enable_shared" = yes && enable_static=no
7380*2e9d4914SAndroid Build Coastguard Worker        if test -n "$RANLIB"; then
7381*2e9d4914SAndroid Build Coastguard Worker          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7382*2e9d4914SAndroid Build Coastguard Worker          postinstall_cmds='$RANLIB $lib'
7383*2e9d4914SAndroid Build Coastguard Worker        fi
7384*2e9d4914SAndroid Build Coastguard Worker        ;;
7385*2e9d4914SAndroid Build Coastguard Worker      aix[[4-9]]*)
7386*2e9d4914SAndroid Build Coastguard Worker	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7387*2e9d4914SAndroid Build Coastguard Worker	  test "$enable_shared" = yes && enable_static=no
7388*2e9d4914SAndroid Build Coastguard Worker	fi
7389*2e9d4914SAndroid Build Coastguard Worker        ;;
7390*2e9d4914SAndroid Build Coastguard Worker    esac
7391*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_shared])
7392*2e9d4914SAndroid Build Coastguard Worker
7393*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_CHECKING([whether to build static libraries])
7394*2e9d4914SAndroid Build Coastguard Worker    # Make sure either enable_shared or enable_static is yes.
7395*2e9d4914SAndroid Build Coastguard Worker    test "$enable_shared" = yes || enable_static=yes
7396*2e9d4914SAndroid Build Coastguard Worker    AC_MSG_RESULT([$enable_static])
7397*2e9d4914SAndroid Build Coastguard Worker
7398*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7399*2e9d4914SAndroid Build Coastguard Worker    _LT_TAGVAR(LD, $1)="$LD"
7400*2e9d4914SAndroid Build Coastguard Worker
7401*2e9d4914SAndroid Build Coastguard Worker    ## CAVEAT EMPTOR:
7402*2e9d4914SAndroid Build Coastguard Worker    ## There is no encapsulation within the following macros, do not change
7403*2e9d4914SAndroid Build Coastguard Worker    ## the running order or otherwise move them around unless you know exactly
7404*2e9d4914SAndroid Build Coastguard Worker    ## what you are doing...
7405*2e9d4914SAndroid Build Coastguard Worker    _LT_SYS_HIDDEN_LIBDEPS($1)
7406*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_PIC($1)
7407*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_C_O($1)
7408*2e9d4914SAndroid Build Coastguard Worker    _LT_COMPILER_FILE_LOCKS($1)
7409*2e9d4914SAndroid Build Coastguard Worker    _LT_LINKER_SHLIBS($1)
7410*2e9d4914SAndroid Build Coastguard Worker    _LT_SYS_DYNAMIC_LINKER($1)
7411*2e9d4914SAndroid Build Coastguard Worker    _LT_LINKER_HARDCODE_LIBPATH($1)
7412*2e9d4914SAndroid Build Coastguard Worker
7413*2e9d4914SAndroid Build Coastguard Worker    _LT_CONFIG($1)
7414*2e9d4914SAndroid Build Coastguard Worker  fi # test -n "$compiler"
7415*2e9d4914SAndroid Build Coastguard Worker
7416*2e9d4914SAndroid Build Coastguard Worker  GCC=$lt_save_GCC
7417*2e9d4914SAndroid Build Coastguard Worker  CC=$lt_save_CC
7418*2e9d4914SAndroid Build Coastguard Worker  CFLAGS=$lt_save_CFLAGS
7419*2e9d4914SAndroid Build Coastguard Workerfi # test "$_lt_disable_FC" != yes
7420*2e9d4914SAndroid Build Coastguard Worker
7421*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_POP
7422*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_FC_CONFIG
7423*2e9d4914SAndroid Build Coastguard Worker
7424*2e9d4914SAndroid Build Coastguard Worker
7425*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_GCJ_CONFIG([TAG])
7426*2e9d4914SAndroid Build Coastguard Worker# --------------------------
7427*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Java Compiler compiler
7428*2e9d4914SAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7429*2e9d4914SAndroid Build Coastguard Worker# to write the compiler configuration to `libtool'.
7430*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_GCJ_CONFIG],
7431*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GCJ])dnl
7432*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_SAVE
7433*2e9d4914SAndroid Build Coastguard Worker
7434*2e9d4914SAndroid Build Coastguard Worker# Source file extension for Java test sources.
7435*2e9d4914SAndroid Build Coastguard Workerac_ext=java
7436*2e9d4914SAndroid Build Coastguard Worker
7437*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled Java test sources.
7438*2e9d4914SAndroid Build Coastguard Workerobjext=o
7439*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7440*2e9d4914SAndroid Build Coastguard Worker
7441*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple compile tests
7442*2e9d4914SAndroid Build Coastguard Workerlt_simple_compile_test_code="class foo {}"
7443*2e9d4914SAndroid Build Coastguard Worker
7444*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple link tests
7445*2e9d4914SAndroid Build Coastguard Workerlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7446*2e9d4914SAndroid Build Coastguard Worker
7447*2e9d4914SAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7448*2e9d4914SAndroid Build Coastguard Worker_LT_TAG_COMPILER
7449*2e9d4914SAndroid Build Coastguard Worker
7450*2e9d4914SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
7451*2e9d4914SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
7452*2e9d4914SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
7453*2e9d4914SAndroid Build Coastguard Worker
7454*2e9d4914SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
7455*2e9d4914SAndroid Build Coastguard Workerlt_save_CC=$CC
7456*2e9d4914SAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
7457*2e9d4914SAndroid Build Coastguard Workerlt_save_GCC=$GCC
7458*2e9d4914SAndroid Build Coastguard WorkerGCC=yes
7459*2e9d4914SAndroid Build Coastguard WorkerCC=${GCJ-"gcj"}
7460*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=$GCJFLAGS
7461*2e9d4914SAndroid Build Coastguard Workercompiler=$CC
7462*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
7463*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)="$LD"
7464*2e9d4914SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
7465*2e9d4914SAndroid Build Coastguard Worker
7466*2e9d4914SAndroid Build Coastguard Worker# GCJ did not exist at the time GCC didn't implicitly link libc in.
7467*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7468*2e9d4914SAndroid Build Coastguard Worker
7469*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7470*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7471*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7472*2e9d4914SAndroid Build Coastguard Worker
7473*2e9d4914SAndroid Build Coastguard Worker## CAVEAT EMPTOR:
7474*2e9d4914SAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
7475*2e9d4914SAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
7476*2e9d4914SAndroid Build Coastguard Worker## what you are doing...
7477*2e9d4914SAndroid Build Coastguard Workerif test -n "$compiler"; then
7478*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
7479*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
7480*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
7481*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
7482*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
7483*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
7484*2e9d4914SAndroid Build Coastguard Worker
7485*2e9d4914SAndroid Build Coastguard Worker  _LT_CONFIG($1)
7486*2e9d4914SAndroid Build Coastguard Workerfi
7487*2e9d4914SAndroid Build Coastguard Worker
7488*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_RESTORE
7489*2e9d4914SAndroid Build Coastguard Worker
7490*2e9d4914SAndroid Build Coastguard WorkerGCC=$lt_save_GCC
7491*2e9d4914SAndroid Build Coastguard WorkerCC=$lt_save_CC
7492*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
7493*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_GCJ_CONFIG
7494*2e9d4914SAndroid Build Coastguard Worker
7495*2e9d4914SAndroid Build Coastguard Worker
7496*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_GO_CONFIG([TAG])
7497*2e9d4914SAndroid Build Coastguard Worker# --------------------------
7498*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Go compiler
7499*2e9d4914SAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7500*2e9d4914SAndroid Build Coastguard Worker# to write the compiler configuration to `libtool'.
7501*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_GO_CONFIG],
7502*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GO])dnl
7503*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_SAVE
7504*2e9d4914SAndroid Build Coastguard Worker
7505*2e9d4914SAndroid Build Coastguard Worker# Source file extension for Go test sources.
7506*2e9d4914SAndroid Build Coastguard Workerac_ext=go
7507*2e9d4914SAndroid Build Coastguard Worker
7508*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled Go test sources.
7509*2e9d4914SAndroid Build Coastguard Workerobjext=o
7510*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7511*2e9d4914SAndroid Build Coastguard Worker
7512*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple compile tests
7513*2e9d4914SAndroid Build Coastguard Workerlt_simple_compile_test_code="package main; func main() { }"
7514*2e9d4914SAndroid Build Coastguard Worker
7515*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple link tests
7516*2e9d4914SAndroid Build Coastguard Workerlt_simple_link_test_code='package main; func main() { }'
7517*2e9d4914SAndroid Build Coastguard Worker
7518*2e9d4914SAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7519*2e9d4914SAndroid Build Coastguard Worker_LT_TAG_COMPILER
7520*2e9d4914SAndroid Build Coastguard Worker
7521*2e9d4914SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
7522*2e9d4914SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
7523*2e9d4914SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
7524*2e9d4914SAndroid Build Coastguard Worker
7525*2e9d4914SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
7526*2e9d4914SAndroid Build Coastguard Workerlt_save_CC=$CC
7527*2e9d4914SAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
7528*2e9d4914SAndroid Build Coastguard Workerlt_save_GCC=$GCC
7529*2e9d4914SAndroid Build Coastguard WorkerGCC=yes
7530*2e9d4914SAndroid Build Coastguard WorkerCC=${GOC-"gccgo"}
7531*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=$GOFLAGS
7532*2e9d4914SAndroid Build Coastguard Workercompiler=$CC
7533*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
7534*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)="$LD"
7535*2e9d4914SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
7536*2e9d4914SAndroid Build Coastguard Worker
7537*2e9d4914SAndroid Build Coastguard Worker# Go did not exist at the time GCC didn't implicitly link libc in.
7538*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7539*2e9d4914SAndroid Build Coastguard Worker
7540*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7541*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag
7542*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7543*2e9d4914SAndroid Build Coastguard Worker
7544*2e9d4914SAndroid Build Coastguard Worker## CAVEAT EMPTOR:
7545*2e9d4914SAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change
7546*2e9d4914SAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly
7547*2e9d4914SAndroid Build Coastguard Worker## what you are doing...
7548*2e9d4914SAndroid Build Coastguard Workerif test -n "$compiler"; then
7549*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_NO_RTTI($1)
7550*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_PIC($1)
7551*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_C_O($1)
7552*2e9d4914SAndroid Build Coastguard Worker  _LT_COMPILER_FILE_LOCKS($1)
7553*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_SHLIBS($1)
7554*2e9d4914SAndroid Build Coastguard Worker  _LT_LINKER_HARDCODE_LIBPATH($1)
7555*2e9d4914SAndroid Build Coastguard Worker
7556*2e9d4914SAndroid Build Coastguard Worker  _LT_CONFIG($1)
7557*2e9d4914SAndroid Build Coastguard Workerfi
7558*2e9d4914SAndroid Build Coastguard Worker
7559*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_RESTORE
7560*2e9d4914SAndroid Build Coastguard Worker
7561*2e9d4914SAndroid Build Coastguard WorkerGCC=$lt_save_GCC
7562*2e9d4914SAndroid Build Coastguard WorkerCC=$lt_save_CC
7563*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
7564*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_GO_CONFIG
7565*2e9d4914SAndroid Build Coastguard Worker
7566*2e9d4914SAndroid Build Coastguard Worker
7567*2e9d4914SAndroid Build Coastguard Worker# _LT_LANG_RC_CONFIG([TAG])
7568*2e9d4914SAndroid Build Coastguard Worker# -------------------------
7569*2e9d4914SAndroid Build Coastguard Worker# Ensure that the configuration variables for the Windows resource compiler
7570*2e9d4914SAndroid Build Coastguard Worker# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7571*2e9d4914SAndroid Build Coastguard Worker# to write the compiler configuration to `libtool'.
7572*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_LANG_RC_CONFIG],
7573*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_RC])dnl
7574*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_SAVE
7575*2e9d4914SAndroid Build Coastguard Worker
7576*2e9d4914SAndroid Build Coastguard Worker# Source file extension for RC test sources.
7577*2e9d4914SAndroid Build Coastguard Workerac_ext=rc
7578*2e9d4914SAndroid Build Coastguard Worker
7579*2e9d4914SAndroid Build Coastguard Worker# Object file extension for compiled RC test sources.
7580*2e9d4914SAndroid Build Coastguard Workerobjext=o
7581*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext
7582*2e9d4914SAndroid Build Coastguard Worker
7583*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple compile tests
7584*2e9d4914SAndroid Build Coastguard Workerlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7585*2e9d4914SAndroid Build Coastguard Worker
7586*2e9d4914SAndroid Build Coastguard Worker# Code to be used in simple link tests
7587*2e9d4914SAndroid Build Coastguard Workerlt_simple_link_test_code="$lt_simple_compile_test_code"
7588*2e9d4914SAndroid Build Coastguard Worker
7589*2e9d4914SAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7590*2e9d4914SAndroid Build Coastguard Worker_LT_TAG_COMPILER
7591*2e9d4914SAndroid Build Coastguard Worker
7592*2e9d4914SAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code
7593*2e9d4914SAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE
7594*2e9d4914SAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE
7595*2e9d4914SAndroid Build Coastguard Worker
7596*2e9d4914SAndroid Build Coastguard Worker# Allow CC to be a program name with arguments.
7597*2e9d4914SAndroid Build Coastguard Workerlt_save_CC="$CC"
7598*2e9d4914SAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS
7599*2e9d4914SAndroid Build Coastguard Workerlt_save_GCC=$GCC
7600*2e9d4914SAndroid Build Coastguard WorkerGCC=
7601*2e9d4914SAndroid Build Coastguard WorkerCC=${RC-"windres"}
7602*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=
7603*2e9d4914SAndroid Build Coastguard Workercompiler=$CC
7604*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC
7605*2e9d4914SAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler])
7606*2e9d4914SAndroid Build Coastguard Worker_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7607*2e9d4914SAndroid Build Coastguard Worker
7608*2e9d4914SAndroid Build Coastguard Workerif test -n "$compiler"; then
7609*2e9d4914SAndroid Build Coastguard Worker  :
7610*2e9d4914SAndroid Build Coastguard Worker  _LT_CONFIG($1)
7611*2e9d4914SAndroid Build Coastguard Workerfi
7612*2e9d4914SAndroid Build Coastguard Worker
7613*2e9d4914SAndroid Build Coastguard WorkerGCC=$lt_save_GCC
7614*2e9d4914SAndroid Build Coastguard WorkerAC_LANG_RESTORE
7615*2e9d4914SAndroid Build Coastguard WorkerCC=$lt_save_CC
7616*2e9d4914SAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS
7617*2e9d4914SAndroid Build Coastguard Worker])# _LT_LANG_RC_CONFIG
7618*2e9d4914SAndroid Build Coastguard Worker
7619*2e9d4914SAndroid Build Coastguard Worker
7620*2e9d4914SAndroid Build Coastguard Worker# LT_PROG_GCJ
7621*2e9d4914SAndroid Build Coastguard Worker# -----------
7622*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GCJ],
7623*2e9d4914SAndroid Build Coastguard Worker[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7624*2e9d4914SAndroid Build Coastguard Worker  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7625*2e9d4914SAndroid Build Coastguard Worker    [AC_CHECK_TOOL(GCJ, gcj,)
7626*2e9d4914SAndroid Build Coastguard Worker      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7627*2e9d4914SAndroid Build Coastguard Worker      AC_SUBST(GCJFLAGS)])])[]dnl
7628*2e9d4914SAndroid Build Coastguard Worker])
7629*2e9d4914SAndroid Build Coastguard Worker
7630*2e9d4914SAndroid Build Coastguard Worker# Old name:
7631*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7632*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
7633*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7634*2e9d4914SAndroid Build Coastguard Worker
7635*2e9d4914SAndroid Build Coastguard Worker
7636*2e9d4914SAndroid Build Coastguard Worker# LT_PROG_GO
7637*2e9d4914SAndroid Build Coastguard Worker# ----------
7638*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GO],
7639*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_TOOL(GOC, gccgo,)
7640*2e9d4914SAndroid Build Coastguard Worker])
7641*2e9d4914SAndroid Build Coastguard Worker
7642*2e9d4914SAndroid Build Coastguard Worker
7643*2e9d4914SAndroid Build Coastguard Worker# LT_PROG_RC
7644*2e9d4914SAndroid Build Coastguard Worker# ----------
7645*2e9d4914SAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_RC],
7646*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_TOOL(RC, windres,)
7647*2e9d4914SAndroid Build Coastguard Worker])
7648*2e9d4914SAndroid Build Coastguard Worker
7649*2e9d4914SAndroid Build Coastguard Worker# Old name:
7650*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7651*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
7652*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_RC], [])
7653*2e9d4914SAndroid Build Coastguard Worker
7654*2e9d4914SAndroid Build Coastguard Worker
7655*2e9d4914SAndroid Build Coastguard Worker# _LT_DECL_EGREP
7656*2e9d4914SAndroid Build Coastguard Worker# --------------
7657*2e9d4914SAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best grep
7658*2e9d4914SAndroid Build Coastguard Worker# available, choose the one first in the user's PATH.
7659*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_DECL_EGREP],
7660*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_EGREP])dnl
7661*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_FGREP])dnl
7662*2e9d4914SAndroid Build Coastguard Workertest -z "$GREP" && GREP=grep
7663*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7664*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [EGREP], [1], [An ERE matcher])
7665*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [FGREP], [1], [A literal string matcher])
7666*2e9d4914SAndroid Build Coastguard Workerdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7667*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([GREP])
7668*2e9d4914SAndroid Build Coastguard Worker])
7669*2e9d4914SAndroid Build Coastguard Worker
7670*2e9d4914SAndroid Build Coastguard Worker
7671*2e9d4914SAndroid Build Coastguard Worker# _LT_DECL_OBJDUMP
7672*2e9d4914SAndroid Build Coastguard Worker# --------------
7673*2e9d4914SAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best objdump
7674*2e9d4914SAndroid Build Coastguard Worker# available, choose the one first in the user's PATH.
7675*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_DECL_OBJDUMP],
7676*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7677*2e9d4914SAndroid Build Coastguard Workertest -z "$OBJDUMP" && OBJDUMP=objdump
7678*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7679*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([OBJDUMP])
7680*2e9d4914SAndroid Build Coastguard Worker])
7681*2e9d4914SAndroid Build Coastguard Worker
7682*2e9d4914SAndroid Build Coastguard Worker# _LT_DECL_DLLTOOL
7683*2e9d4914SAndroid Build Coastguard Worker# ----------------
7684*2e9d4914SAndroid Build Coastguard Worker# Ensure DLLTOOL variable is set.
7685*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_DECL_DLLTOOL],
7686*2e9d4914SAndroid Build Coastguard Worker[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7687*2e9d4914SAndroid Build Coastguard Workertest -z "$DLLTOOL" && DLLTOOL=dlltool
7688*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7689*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([DLLTOOL])
7690*2e9d4914SAndroid Build Coastguard Worker])
7691*2e9d4914SAndroid Build Coastguard Worker
7692*2e9d4914SAndroid Build Coastguard Worker# _LT_DECL_SED
7693*2e9d4914SAndroid Build Coastguard Worker# ------------
7694*2e9d4914SAndroid Build Coastguard Worker# Check for a fully-functional sed program, that truncates
7695*2e9d4914SAndroid Build Coastguard Worker# as few characters as possible.  Prefer GNU sed if found.
7696*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_DECL_SED],
7697*2e9d4914SAndroid Build Coastguard Worker[AC_PROG_SED
7698*2e9d4914SAndroid Build Coastguard Workertest -z "$SED" && SED=sed
7699*2e9d4914SAndroid Build Coastguard WorkerXsed="$SED -e 1s/^X//"
7700*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7701*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7702*2e9d4914SAndroid Build Coastguard Worker    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7703*2e9d4914SAndroid Build Coastguard Worker])# _LT_DECL_SED
7704*2e9d4914SAndroid Build Coastguard Worker
7705*2e9d4914SAndroid Build Coastguard Workerm4_ifndef([AC_PROG_SED], [
7706*2e9d4914SAndroid Build Coastguard Worker############################################################
7707*2e9d4914SAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into   #
7708*2e9d4914SAndroid Build Coastguard Worker#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7709*2e9d4914SAndroid Build Coastguard Worker#  a released version of Autoconf we should remove this    #
7710*2e9d4914SAndroid Build Coastguard Worker#  macro and use it instead.                               #
7711*2e9d4914SAndroid Build Coastguard Worker############################################################
7712*2e9d4914SAndroid Build Coastguard Worker
7713*2e9d4914SAndroid Build Coastguard Workerm4_defun([AC_PROG_SED],
7714*2e9d4914SAndroid Build Coastguard Worker[AC_MSG_CHECKING([for a sed that does not truncate output])
7715*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_SED,
7716*2e9d4914SAndroid Build Coastguard Worker[# Loop through the user's path and test for sed and gsed.
7717*2e9d4914SAndroid Build Coastguard Worker# Then use that list of sed's as ones to test for truncation.
7718*2e9d4914SAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719*2e9d4914SAndroid Build Coastguard Workerfor as_dir in $PATH
7720*2e9d4914SAndroid Build Coastguard Workerdo
7721*2e9d4914SAndroid Build Coastguard Worker  IFS=$as_save_IFS
7722*2e9d4914SAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
7723*2e9d4914SAndroid Build Coastguard Worker  for lt_ac_prog in sed gsed; do
7724*2e9d4914SAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
7725*2e9d4914SAndroid Build Coastguard Worker      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7726*2e9d4914SAndroid Build Coastguard Worker        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7727*2e9d4914SAndroid Build Coastguard Worker      fi
7728*2e9d4914SAndroid Build Coastguard Worker    done
7729*2e9d4914SAndroid Build Coastguard Worker  done
7730*2e9d4914SAndroid Build Coastguard Workerdone
7731*2e9d4914SAndroid Build Coastguard WorkerIFS=$as_save_IFS
7732*2e9d4914SAndroid Build Coastguard Workerlt_ac_max=0
7733*2e9d4914SAndroid Build Coastguard Workerlt_ac_count=0
7734*2e9d4914SAndroid Build Coastguard Worker# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7735*2e9d4914SAndroid Build Coastguard Worker# along with /bin/sed that truncates output.
7736*2e9d4914SAndroid Build Coastguard Workerfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7737*2e9d4914SAndroid Build Coastguard Worker  test ! -f $lt_ac_sed && continue
7738*2e9d4914SAndroid Build Coastguard Worker  cat /dev/null > conftest.in
7739*2e9d4914SAndroid Build Coastguard Worker  lt_ac_count=0
7740*2e9d4914SAndroid Build Coastguard Worker  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7741*2e9d4914SAndroid Build Coastguard Worker  # Check for GNU sed and select it if it is found.
7742*2e9d4914SAndroid Build Coastguard Worker  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7743*2e9d4914SAndroid Build Coastguard Worker    lt_cv_path_SED=$lt_ac_sed
7744*2e9d4914SAndroid Build Coastguard Worker    break
7745*2e9d4914SAndroid Build Coastguard Worker  fi
7746*2e9d4914SAndroid Build Coastguard Worker  while true; do
7747*2e9d4914SAndroid Build Coastguard Worker    cat conftest.in conftest.in >conftest.tmp
7748*2e9d4914SAndroid Build Coastguard Worker    mv conftest.tmp conftest.in
7749*2e9d4914SAndroid Build Coastguard Worker    cp conftest.in conftest.nl
7750*2e9d4914SAndroid Build Coastguard Worker    echo >>conftest.nl
7751*2e9d4914SAndroid Build Coastguard Worker    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7752*2e9d4914SAndroid Build Coastguard Worker    cmp -s conftest.out conftest.nl || break
7753*2e9d4914SAndroid Build Coastguard Worker    # 10000 chars as input seems more than enough
7754*2e9d4914SAndroid Build Coastguard Worker    test $lt_ac_count -gt 10 && break
7755*2e9d4914SAndroid Build Coastguard Worker    lt_ac_count=`expr $lt_ac_count + 1`
7756*2e9d4914SAndroid Build Coastguard Worker    if test $lt_ac_count -gt $lt_ac_max; then
7757*2e9d4914SAndroid Build Coastguard Worker      lt_ac_max=$lt_ac_count
7758*2e9d4914SAndroid Build Coastguard Worker      lt_cv_path_SED=$lt_ac_sed
7759*2e9d4914SAndroid Build Coastguard Worker    fi
7760*2e9d4914SAndroid Build Coastguard Worker  done
7761*2e9d4914SAndroid Build Coastguard Workerdone
7762*2e9d4914SAndroid Build Coastguard Worker])
7763*2e9d4914SAndroid Build Coastguard WorkerSED=$lt_cv_path_SED
7764*2e9d4914SAndroid Build Coastguard WorkerAC_SUBST([SED])
7765*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$SED])
7766*2e9d4914SAndroid Build Coastguard Worker])#AC_PROG_SED
7767*2e9d4914SAndroid Build Coastguard Worker])#m4_ifndef
7768*2e9d4914SAndroid Build Coastguard Worker
7769*2e9d4914SAndroid Build Coastguard Worker# Old name:
7770*2e9d4914SAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7771*2e9d4914SAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility:
7772*2e9d4914SAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_SED], [])
7773*2e9d4914SAndroid Build Coastguard Worker
7774*2e9d4914SAndroid Build Coastguard Worker
7775*2e9d4914SAndroid Build Coastguard Worker# _LT_CHECK_SHELL_FEATURES
7776*2e9d4914SAndroid Build Coastguard Worker# ------------------------
7777*2e9d4914SAndroid Build Coastguard Worker# Find out whether the shell is Bourne or XSI compatible,
7778*2e9d4914SAndroid Build Coastguard Worker# or has some other useful features.
7779*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHELL_FEATURES],
7780*2e9d4914SAndroid Build Coastguard Worker[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7781*2e9d4914SAndroid Build Coastguard Worker# Try some XSI features
7782*2e9d4914SAndroid Build Coastguard Workerxsi_shell=no
7783*2e9d4914SAndroid Build Coastguard Worker( _lt_dummy="a/b/c"
7784*2e9d4914SAndroid Build Coastguard Worker  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7785*2e9d4914SAndroid Build Coastguard Worker      = c,a/b,b/c, \
7786*2e9d4914SAndroid Build Coastguard Worker    && eval 'test $(( 1 + 1 )) -eq 2 \
7787*2e9d4914SAndroid Build Coastguard Worker    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7788*2e9d4914SAndroid Build Coastguard Worker  && xsi_shell=yes
7789*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$xsi_shell])
7790*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7791*2e9d4914SAndroid Build Coastguard Worker
7792*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether the shell understands "+="])
7793*2e9d4914SAndroid Build Coastguard Workerlt_shell_append=no
7794*2e9d4914SAndroid Build Coastguard Worker( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7795*2e9d4914SAndroid Build Coastguard Worker    >/dev/null 2>&1 \
7796*2e9d4914SAndroid Build Coastguard Worker  && lt_shell_append=yes
7797*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_shell_append])
7798*2e9d4914SAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7799*2e9d4914SAndroid Build Coastguard Worker
7800*2e9d4914SAndroid Build Coastguard Workerif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7801*2e9d4914SAndroid Build Coastguard Worker  lt_unset=unset
7802*2e9d4914SAndroid Build Coastguard Workerelse
7803*2e9d4914SAndroid Build Coastguard Worker  lt_unset=false
7804*2e9d4914SAndroid Build Coastguard Workerfi
7805*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7806*2e9d4914SAndroid Build Coastguard Worker
7807*2e9d4914SAndroid Build Coastguard Worker# test EBCDIC or ASCII
7808*2e9d4914SAndroid Build Coastguard Workercase `echo X|tr X '\101'` in
7809*2e9d4914SAndroid Build Coastguard Worker A) # ASCII based system
7810*2e9d4914SAndroid Build Coastguard Worker    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7811*2e9d4914SAndroid Build Coastguard Worker  lt_SP2NL='tr \040 \012'
7812*2e9d4914SAndroid Build Coastguard Worker  lt_NL2SP='tr \015\012 \040\040'
7813*2e9d4914SAndroid Build Coastguard Worker  ;;
7814*2e9d4914SAndroid Build Coastguard Worker *) # EBCDIC based system
7815*2e9d4914SAndroid Build Coastguard Worker  lt_SP2NL='tr \100 \n'
7816*2e9d4914SAndroid Build Coastguard Worker  lt_NL2SP='tr \r\n \100\100'
7817*2e9d4914SAndroid Build Coastguard Worker  ;;
7818*2e9d4914SAndroid Build Coastguard Workeresac
7819*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7820*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7821*2e9d4914SAndroid Build Coastguard Worker])# _LT_CHECK_SHELL_FEATURES
7822*2e9d4914SAndroid Build Coastguard Worker
7823*2e9d4914SAndroid Build Coastguard Worker
7824*2e9d4914SAndroid Build Coastguard Worker# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7825*2e9d4914SAndroid Build Coastguard Worker# ------------------------------------------------------
7826*2e9d4914SAndroid Build Coastguard Worker# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7827*2e9d4914SAndroid Build Coastguard Worker# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7828*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PROG_FUNCTION_REPLACE],
7829*2e9d4914SAndroid Build Coastguard Worker[dnl {
7830*2e9d4914SAndroid Build Coastguard Workersed -e '/^$1 ()$/,/^} # $1 /c\
7831*2e9d4914SAndroid Build Coastguard Worker$1 ()\
7832*2e9d4914SAndroid Build Coastguard Worker{\
7833*2e9d4914SAndroid Build Coastguard Workerm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
7834*2e9d4914SAndroid Build Coastguard Worker} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7835*2e9d4914SAndroid Build Coastguard Worker  && mv -f "$cfgfile.tmp" "$cfgfile" \
7836*2e9d4914SAndroid Build Coastguard Worker    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7837*2e9d4914SAndroid Build Coastguard Workertest 0 -eq $? || _lt_function_replace_fail=:
7838*2e9d4914SAndroid Build Coastguard Worker])
7839*2e9d4914SAndroid Build Coastguard Worker
7840*2e9d4914SAndroid Build Coastguard Worker
7841*2e9d4914SAndroid Build Coastguard Worker# _LT_PROG_REPLACE_SHELLFNS
7842*2e9d4914SAndroid Build Coastguard Worker# -------------------------
7843*2e9d4914SAndroid Build Coastguard Worker# Replace existing portable implementations of several shell functions with
7844*2e9d4914SAndroid Build Coastguard Worker# equivalent extended shell implementations where those features are available..
7845*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PROG_REPLACE_SHELLFNS],
7846*2e9d4914SAndroid Build Coastguard Worker[if test x"$xsi_shell" = xyes; then
7847*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7848*2e9d4914SAndroid Build Coastguard Worker    case ${1} in
7849*2e9d4914SAndroid Build Coastguard Worker      */*) func_dirname_result="${1%/*}${2}" ;;
7850*2e9d4914SAndroid Build Coastguard Worker      *  ) func_dirname_result="${3}" ;;
7851*2e9d4914SAndroid Build Coastguard Worker    esac])
7852*2e9d4914SAndroid Build Coastguard Worker
7853*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7854*2e9d4914SAndroid Build Coastguard Worker    func_basename_result="${1##*/}"])
7855*2e9d4914SAndroid Build Coastguard Worker
7856*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7857*2e9d4914SAndroid Build Coastguard Worker    case ${1} in
7858*2e9d4914SAndroid Build Coastguard Worker      */*) func_dirname_result="${1%/*}${2}" ;;
7859*2e9d4914SAndroid Build Coastguard Worker      *  ) func_dirname_result="${3}" ;;
7860*2e9d4914SAndroid Build Coastguard Worker    esac
7861*2e9d4914SAndroid Build Coastguard Worker    func_basename_result="${1##*/}"])
7862*2e9d4914SAndroid Build Coastguard Worker
7863*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7864*2e9d4914SAndroid Build Coastguard Worker    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7865*2e9d4914SAndroid Build Coastguard Worker    # positional parameters, so assign one to ordinary parameter first.
7866*2e9d4914SAndroid Build Coastguard Worker    func_stripname_result=${3}
7867*2e9d4914SAndroid Build Coastguard Worker    func_stripname_result=${func_stripname_result#"${1}"}
7868*2e9d4914SAndroid Build Coastguard Worker    func_stripname_result=${func_stripname_result%"${2}"}])
7869*2e9d4914SAndroid Build Coastguard Worker
7870*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7871*2e9d4914SAndroid Build Coastguard Worker    func_split_long_opt_name=${1%%=*}
7872*2e9d4914SAndroid Build Coastguard Worker    func_split_long_opt_arg=${1#*=}])
7873*2e9d4914SAndroid Build Coastguard Worker
7874*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7875*2e9d4914SAndroid Build Coastguard Worker    func_split_short_opt_arg=${1#??}
7876*2e9d4914SAndroid Build Coastguard Worker    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7877*2e9d4914SAndroid Build Coastguard Worker
7878*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7879*2e9d4914SAndroid Build Coastguard Worker    case ${1} in
7880*2e9d4914SAndroid Build Coastguard Worker      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7881*2e9d4914SAndroid Build Coastguard Worker      *)    func_lo2o_result=${1} ;;
7882*2e9d4914SAndroid Build Coastguard Worker    esac])
7883*2e9d4914SAndroid Build Coastguard Worker
7884*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
7885*2e9d4914SAndroid Build Coastguard Worker
7886*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
7887*2e9d4914SAndroid Build Coastguard Worker
7888*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
7889*2e9d4914SAndroid Build Coastguard Workerfi
7890*2e9d4914SAndroid Build Coastguard Worker
7891*2e9d4914SAndroid Build Coastguard Workerif test x"$lt_shell_append" = xyes; then
7892*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
7893*2e9d4914SAndroid Build Coastguard Worker
7894*2e9d4914SAndroid Build Coastguard Worker  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7895*2e9d4914SAndroid Build Coastguard Worker    func_quote_for_eval "${2}"
7896*2e9d4914SAndroid Build Coastguard Workerdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7897*2e9d4914SAndroid Build Coastguard Worker    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7898*2e9d4914SAndroid Build Coastguard Worker
7899*2e9d4914SAndroid Build Coastguard Worker  # Save a `func_append' function call where possible by direct use of '+='
7900*2e9d4914SAndroid Build Coastguard Worker  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7901*2e9d4914SAndroid Build Coastguard Worker    && mv -f "$cfgfile.tmp" "$cfgfile" \
7902*2e9d4914SAndroid Build Coastguard Worker      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7903*2e9d4914SAndroid Build Coastguard Worker  test 0 -eq $? || _lt_function_replace_fail=:
7904*2e9d4914SAndroid Build Coastguard Workerelse
7905*2e9d4914SAndroid Build Coastguard Worker  # Save a `func_append' function call even when '+=' is not available
7906*2e9d4914SAndroid Build Coastguard Worker  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7907*2e9d4914SAndroid Build Coastguard Worker    && mv -f "$cfgfile.tmp" "$cfgfile" \
7908*2e9d4914SAndroid Build Coastguard Worker      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7909*2e9d4914SAndroid Build Coastguard Worker  test 0 -eq $? || _lt_function_replace_fail=:
7910*2e9d4914SAndroid Build Coastguard Workerfi
7911*2e9d4914SAndroid Build Coastguard Worker
7912*2e9d4914SAndroid Build Coastguard Workerif test x"$_lt_function_replace_fail" = x":"; then
7913*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7914*2e9d4914SAndroid Build Coastguard Workerfi
7915*2e9d4914SAndroid Build Coastguard Worker])
7916*2e9d4914SAndroid Build Coastguard Worker
7917*2e9d4914SAndroid Build Coastguard Worker# _LT_PATH_CONVERSION_FUNCTIONS
7918*2e9d4914SAndroid Build Coastguard Worker# -----------------------------
7919*2e9d4914SAndroid Build Coastguard Worker# Determine which file name conversion functions should be used by
7920*2e9d4914SAndroid Build Coastguard Worker# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
7921*2e9d4914SAndroid Build Coastguard Worker# for certain cross-compile configurations and native mingw.
7922*2e9d4914SAndroid Build Coastguard Workerm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7923*2e9d4914SAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7924*2e9d4914SAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl
7925*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to $host format])
7926*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_host_file_cmd,
7927*2e9d4914SAndroid Build Coastguard Worker[case $host in
7928*2e9d4914SAndroid Build Coastguard Worker  *-*-mingw* )
7929*2e9d4914SAndroid Build Coastguard Worker    case $build in
7930*2e9d4914SAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
7931*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7932*2e9d4914SAndroid Build Coastguard Worker        ;;
7933*2e9d4914SAndroid Build Coastguard Worker      *-*-cygwin* )
7934*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7935*2e9d4914SAndroid Build Coastguard Worker        ;;
7936*2e9d4914SAndroid Build Coastguard Worker      * ) # otherwise, assume *nix
7937*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7938*2e9d4914SAndroid Build Coastguard Worker        ;;
7939*2e9d4914SAndroid Build Coastguard Worker    esac
7940*2e9d4914SAndroid Build Coastguard Worker    ;;
7941*2e9d4914SAndroid Build Coastguard Worker  *-*-cygwin* )
7942*2e9d4914SAndroid Build Coastguard Worker    case $build in
7943*2e9d4914SAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
7944*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7945*2e9d4914SAndroid Build Coastguard Worker        ;;
7946*2e9d4914SAndroid Build Coastguard Worker      *-*-cygwin* )
7947*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_noop
7948*2e9d4914SAndroid Build Coastguard Worker        ;;
7949*2e9d4914SAndroid Build Coastguard Worker      * ) # otherwise, assume *nix
7950*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7951*2e9d4914SAndroid Build Coastguard Worker        ;;
7952*2e9d4914SAndroid Build Coastguard Worker    esac
7953*2e9d4914SAndroid Build Coastguard Worker    ;;
7954*2e9d4914SAndroid Build Coastguard Worker  * ) # unhandled hosts (and "normal" native builds)
7955*2e9d4914SAndroid Build Coastguard Worker    lt_cv_to_host_file_cmd=func_convert_file_noop
7956*2e9d4914SAndroid Build Coastguard Worker    ;;
7957*2e9d4914SAndroid Build Coastguard Workeresac
7958*2e9d4914SAndroid Build Coastguard Worker])
7959*2e9d4914SAndroid Build Coastguard Workerto_host_file_cmd=$lt_cv_to_host_file_cmd
7960*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7961*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7962*2e9d4914SAndroid Build Coastguard Worker         [0], [convert $build file names to $host format])dnl
7963*2e9d4914SAndroid Build Coastguard Worker
7964*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to toolchain format])
7965*2e9d4914SAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7966*2e9d4914SAndroid Build Coastguard Worker[#assume ordinary cross tools, or native build.
7967*2e9d4914SAndroid Build Coastguard Workerlt_cv_to_tool_file_cmd=func_convert_file_noop
7968*2e9d4914SAndroid Build Coastguard Workercase $host in
7969*2e9d4914SAndroid Build Coastguard Worker  *-*-mingw* )
7970*2e9d4914SAndroid Build Coastguard Worker    case $build in
7971*2e9d4914SAndroid Build Coastguard Worker      *-*-mingw* ) # actually msys
7972*2e9d4914SAndroid Build Coastguard Worker        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7973*2e9d4914SAndroid Build Coastguard Worker        ;;
7974*2e9d4914SAndroid Build Coastguard Worker    esac
7975*2e9d4914SAndroid Build Coastguard Worker    ;;
7976*2e9d4914SAndroid Build Coastguard Workeresac
7977*2e9d4914SAndroid Build Coastguard Worker])
7978*2e9d4914SAndroid Build Coastguard Workerto_tool_file_cmd=$lt_cv_to_tool_file_cmd
7979*2e9d4914SAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7980*2e9d4914SAndroid Build Coastguard Worker_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7981*2e9d4914SAndroid Build Coastguard Worker         [0], [convert $build files to toolchain format])dnl
7982*2e9d4914SAndroid Build Coastguard Worker])# _LT_PATH_CONVERSION_FUNCTIONS
7983