libtool.m4 revision cc4920e5
1cc4920e5Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2cc4920e5Smrg#
3cc4920e5Smrg#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
4cc4920e5Smrg#   Written by Gordon Matzigkeit, 1996
5cc4920e5Smrg#
6cc4920e5Smrg# This file is free software; the Free Software Foundation gives
7cc4920e5Smrg# unlimited permission to copy and/or distribute it, with or without
8cc4920e5Smrg# modifications, as long as this notice is preserved.
9cc4920e5Smrg
10cc4920e5Smrgm4_define([_LT_COPYING], [dnl
11cc4920e5Smrg# Copyright (C) 2014 Free Software Foundation, Inc.
12cc4920e5Smrg# This is free software; see the source for copying conditions.  There is NO
13cc4920e5Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14cc4920e5Smrg
15cc4920e5Smrg# GNU Libtool is free software; you can redistribute it and/or modify
16cc4920e5Smrg# it under the terms of the GNU General Public License as published by
17cc4920e5Smrg# the Free Software Foundation; either version 2 of of the License, or
18cc4920e5Smrg# (at your option) any later version.
19cc4920e5Smrg#
20cc4920e5Smrg# As a special exception to the GNU General Public License, if you
21cc4920e5Smrg# distribute this file as part of a program or library that is built
22cc4920e5Smrg# using GNU Libtool, you may include this file under the  same
23cc4920e5Smrg# distribution terms that you use for the rest of that program.
24cc4920e5Smrg#
25cc4920e5Smrg# GNU Libtool is distributed in the hope that it will be useful, but
26cc4920e5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
27cc4920e5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28cc4920e5Smrg# GNU General Public License for more details.
29cc4920e5Smrg#
30cc4920e5Smrg# You should have received a copy of the GNU General Public License
31cc4920e5Smrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
32cc4920e5Smrg])
33cc4920e5Smrg
34cc4920e5Smrg# serial 58 LT_INIT
35cc4920e5Smrg
36cc4920e5Smrg
37cc4920e5Smrg# LT_PREREQ(VERSION)
38cc4920e5Smrg# ------------------
39cc4920e5Smrg# Complain and exit if this libtool version is less that VERSION.
40cc4920e5Smrgm4_defun([LT_PREREQ],
41cc4920e5Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
42cc4920e5Smrg       [m4_default([$3],
43cc4920e5Smrg		   [m4_fatal([Libtool version $1 or higher is required],
44cc4920e5Smrg		             63)])],
45cc4920e5Smrg       [$2])])
46cc4920e5Smrg
47cc4920e5Smrg
48cc4920e5Smrg# _LT_CHECK_BUILDDIR
49cc4920e5Smrg# ------------------
50cc4920e5Smrg# Complain if the absolute build directory name contains unusual characters
51cc4920e5Smrgm4_defun([_LT_CHECK_BUILDDIR],
52cc4920e5Smrg[case `pwd` in
53cc4920e5Smrg  *\ * | *\	*)
54cc4920e5Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
55cc4920e5Smrgesac
56cc4920e5Smrg])
57cc4920e5Smrg
58cc4920e5Smrg
59cc4920e5Smrg# LT_INIT([OPTIONS])
60cc4920e5Smrg# ------------------
61cc4920e5SmrgAC_DEFUN([LT_INIT],
62cc4920e5Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
63cc4920e5SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
64cc4920e5SmrgAC_BEFORE([$0], [LT_LANG])dnl
65cc4920e5SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
66cc4920e5SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
67cc4920e5Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
68cc4920e5Smrg
69cc4920e5Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
70cc4920e5Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
71cc4920e5Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
72cc4920e5Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
73cc4920e5Smrgdnl unless we require an AC_DEFUNed macro:
74cc4920e5SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
75cc4920e5SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
76cc4920e5SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
77cc4920e5SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
78cc4920e5Smrgm4_require([_LT_PROG_LTMAIN])dnl
79cc4920e5Smrg
80cc4920e5Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
81cc4920e5Smrg
82cc4920e5Smrgdnl Parse OPTIONS
83cc4920e5Smrg_LT_SET_OPTIONS([$0], [$1])
84cc4920e5Smrg
85cc4920e5Smrg# This can be used to rebuild libtool when needed
86cc4920e5SmrgLIBTOOL_DEPS=$ltmain
87cc4920e5Smrg
88cc4920e5Smrg# Always use our own libtool.
89cc4920e5SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
90cc4920e5SmrgAC_SUBST(LIBTOOL)dnl
91cc4920e5Smrg
92cc4920e5Smrg_LT_SETUP
93cc4920e5Smrg
94cc4920e5Smrg# Only expand once:
95cc4920e5Smrgm4_define([LT_INIT])
96cc4920e5Smrg])# LT_INIT
97cc4920e5Smrg
98cc4920e5Smrg# Old names:
99cc4920e5SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
100cc4920e5SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
101cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
102cc4920e5Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
103cc4920e5Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
104cc4920e5Smrg
105cc4920e5Smrg
106cc4920e5Smrg# _LT_PREPARE_CC_BASENAME
107cc4920e5Smrg# -----------------------
108cc4920e5Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [
109cc4920e5Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
110cc4920e5Smrgfunc_cc_basename ()
111cc4920e5Smrg{
112cc4920e5Smrg    for cc_temp in @S|@*""; do
113cc4920e5Smrg      case $cc_temp in
114cc4920e5Smrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
115cc4920e5Smrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
116cc4920e5Smrg        \-*) ;;
117cc4920e5Smrg        *) break;;
118cc4920e5Smrg      esac
119cc4920e5Smrg    done
120cc4920e5Smrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
121cc4920e5Smrg}
122cc4920e5Smrg])# _LT_PREPARE_CC_BASENAME
123cc4920e5Smrg
124cc4920e5Smrg
125cc4920e5Smrg# _LT_CC_BASENAME(CC)
126cc4920e5Smrg# -------------------
127cc4920e5Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
128cc4920e5Smrg# but that macro is also expanded into generated libtool script, which
129cc4920e5Smrg# arranges for $SED and $ECHO to be set by different means.
130cc4920e5Smrgm4_defun([_LT_CC_BASENAME],
131cc4920e5Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
132cc4920e5SmrgAC_REQUIRE([_LT_DECL_SED])dnl
133cc4920e5SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
134cc4920e5Smrgfunc_cc_basename $1
135cc4920e5Smrgcc_basename=$func_cc_basename_result
136cc4920e5Smrg])
137cc4920e5Smrg
138cc4920e5Smrg
139cc4920e5Smrg# _LT_FILEUTILS_DEFAULTS
140cc4920e5Smrg# ----------------------
141cc4920e5Smrg# It is okay to use these file commands and assume they have been set
142cc4920e5Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
143cc4920e5Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
144cc4920e5Smrg[: ${CP="cp -f"}
145cc4920e5Smrg: ${MV="mv -f"}
146cc4920e5Smrg: ${RM="rm -f"}
147cc4920e5Smrg])# _LT_FILEUTILS_DEFAULTS
148cc4920e5Smrg
149cc4920e5Smrg
150cc4920e5Smrg# _LT_SETUP
151cc4920e5Smrg# ---------
152cc4920e5Smrgm4_defun([_LT_SETUP],
153cc4920e5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
154cc4920e5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
155cc4920e5SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
156cc4920e5SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
157cc4920e5Smrg
158cc4920e5Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
159cc4920e5Smrgdnl
160cc4920e5Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
161cc4920e5Smrg_LT_DECL([], [host], [0])dnl
162cc4920e5Smrg_LT_DECL([], [host_os], [0])dnl
163cc4920e5Smrgdnl
164cc4920e5Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
165cc4920e5Smrg_LT_DECL([], [build], [0])dnl
166cc4920e5Smrg_LT_DECL([], [build_os], [0])dnl
167cc4920e5Smrgdnl
168cc4920e5SmrgAC_REQUIRE([AC_PROG_CC])dnl
169cc4920e5SmrgAC_REQUIRE([LT_PATH_LD])dnl
170cc4920e5SmrgAC_REQUIRE([LT_PATH_NM])dnl
171cc4920e5Smrgdnl
172cc4920e5SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
173cc4920e5Smrgtest -z "$LN_S" && LN_S="ln -s"
174cc4920e5Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
175cc4920e5Smrgdnl
176cc4920e5SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
177cc4920e5Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
178cc4920e5Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
179cc4920e5Smrgdnl
180cc4920e5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
181cc4920e5Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
182cc4920e5Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
183cc4920e5Smrgm4_require([_LT_CMD_RELOAD])dnl
184cc4920e5Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
185cc4920e5Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
186cc4920e5Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187cc4920e5Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188cc4920e5Smrgm4_require([_LT_WITH_SYSROOT])dnl
189cc4920e5Smrgm4_require([_LT_CMD_TRUNCATE])dnl
190cc4920e5Smrg
191cc4920e5Smrg_LT_CONFIG_LIBTOOL_INIT([
192cc4920e5Smrg# See if we are running on zsh, and set the options that allow our
193cc4920e5Smrg# commands through without removal of \ escapes INIT.
194cc4920e5Smrgif test -n "\${ZSH_VERSION+set}"; then
195cc4920e5Smrg   setopt NO_GLOB_SUBST
196cc4920e5Smrgfi
197cc4920e5Smrg])
198cc4920e5Smrgif test -n "${ZSH_VERSION+set}"; then
199cc4920e5Smrg   setopt NO_GLOB_SUBST
200cc4920e5Smrgfi
201cc4920e5Smrg
202cc4920e5Smrg_LT_CHECK_OBJDIR
203cc4920e5Smrg
204cc4920e5Smrgm4_require([_LT_TAG_COMPILER])dnl
205cc4920e5Smrg
206cc4920e5Smrgcase $host_os in
207cc4920e5Smrgaix3*)
208cc4920e5Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
209cc4920e5Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
210cc4920e5Smrg  # vanish in a puff of smoke.
211cc4920e5Smrg  if test set != "${COLLECT_NAMES+set}"; then
212cc4920e5Smrg    COLLECT_NAMES=
213cc4920e5Smrg    export COLLECT_NAMES
214cc4920e5Smrg  fi
215cc4920e5Smrg  ;;
216cc4920e5Smrgesac
217cc4920e5Smrg
218cc4920e5Smrg# Global variables:
219cc4920e5Smrgofile=libtool
220cc4920e5Smrgcan_build_shared=yes
221cc4920e5Smrg
222cc4920e5Smrg# All known linkers require a '.a' archive for static linking (except MSVC,
223cc4920e5Smrg# which needs '.lib').
224cc4920e5Smrglibext=a
225cc4920e5Smrg
226cc4920e5Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
227cc4920e5Smrg
228cc4920e5Smrgold_CC=$CC
229cc4920e5Smrgold_CFLAGS=$CFLAGS
230cc4920e5Smrg
231cc4920e5Smrg# Set sane defaults for various variables
232cc4920e5Smrgtest -z "$CC" && CC=cc
233cc4920e5Smrgtest -z "$LTCC" && LTCC=$CC
234cc4920e5Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
235cc4920e5Smrgtest -z "$LD" && LD=ld
236cc4920e5Smrgtest -z "$ac_objext" && ac_objext=o
237cc4920e5Smrg
238cc4920e5Smrg_LT_CC_BASENAME([$compiler])
239cc4920e5Smrg
240cc4920e5Smrg# Only perform the check for file, if the check method requires it
241cc4920e5Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
242cc4920e5Smrgcase $deplibs_check_method in
243cc4920e5Smrgfile_magic*)
244cc4920e5Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
245cc4920e5Smrg    _LT_PATH_MAGIC
246cc4920e5Smrg  fi
247cc4920e5Smrg  ;;
248cc4920e5Smrgesac
249cc4920e5Smrg
250cc4920e5Smrg# Use C for the default configuration in the libtool script
251cc4920e5SmrgLT_SUPPORTED_TAG([CC])
252cc4920e5Smrg_LT_LANG_C_CONFIG
253cc4920e5Smrg_LT_LANG_DEFAULT_CONFIG
254cc4920e5Smrg_LT_CONFIG_COMMANDS
255cc4920e5Smrg])# _LT_SETUP
256cc4920e5Smrg
257cc4920e5Smrg
258cc4920e5Smrg# _LT_PREPARE_SED_QUOTE_VARS
259cc4920e5Smrg# --------------------------
260cc4920e5Smrg# Define a few sed substitution that help us do robust quoting.
261cc4920e5Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
262cc4920e5Smrg[# Backslashify metacharacters that are still active within
263cc4920e5Smrg# double-quoted strings.
264cc4920e5Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
265cc4920e5Smrg
266cc4920e5Smrg# Same as above, but do not quote variable references.
267cc4920e5Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
268cc4920e5Smrg
269cc4920e5Smrg# Sed substitution to delay expansion of an escaped shell variable in a
270cc4920e5Smrg# double_quote_subst'ed string.
271cc4920e5Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
272cc4920e5Smrg
273cc4920e5Smrg# Sed substitution to delay expansion of an escaped single quote.
274cc4920e5Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
275cc4920e5Smrg
276cc4920e5Smrg# Sed substitution to avoid accidental globbing in evaled expressions
277cc4920e5Smrgno_glob_subst='s/\*/\\\*/g'
278cc4920e5Smrg])
279cc4920e5Smrg
280cc4920e5Smrg# _LT_PROG_LTMAIN
281cc4920e5Smrg# ---------------
282cc4920e5Smrg# Note that this code is called both from 'configure', and 'config.status'
283cc4920e5Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
284cc4920e5Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
285cc4920e5Smrg# so we pass a copy along to make sure it has a sensible value anyway.
286cc4920e5Smrgm4_defun([_LT_PROG_LTMAIN],
287cc4920e5Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
288cc4920e5Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
289cc4920e5Smrgltmain=$ac_aux_dir/ltmain.sh
290cc4920e5Smrg])# _LT_PROG_LTMAIN
291cc4920e5Smrg
292cc4920e5Smrg
293cc4920e5Smrg## ------------------------------------- ##
294cc4920e5Smrg## Accumulate code for creating libtool. ##
295cc4920e5Smrg## ------------------------------------- ##
296cc4920e5Smrg
297cc4920e5Smrg# So that we can recreate a full libtool script including additional
298cc4920e5Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
299cc4920e5Smrg# in macros and then make a single call at the end using the 'libtool'
300cc4920e5Smrg# label.
301cc4920e5Smrg
302cc4920e5Smrg
303cc4920e5Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
304cc4920e5Smrg# ----------------------------------------
305cc4920e5Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
306cc4920e5Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
307cc4920e5Smrg[m4_ifval([$1],
308cc4920e5Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
309cc4920e5Smrg                     [$1
310cc4920e5Smrg])])])
311cc4920e5Smrg
312cc4920e5Smrg# Initialize.
313cc4920e5Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
314cc4920e5Smrg
315cc4920e5Smrg
316cc4920e5Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
317cc4920e5Smrg# ------------------------------
318cc4920e5Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
319cc4920e5Smrgm4_define([_LT_CONFIG_LIBTOOL],
320cc4920e5Smrg[m4_ifval([$1],
321cc4920e5Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
322cc4920e5Smrg                     [$1
323cc4920e5Smrg])])])
324cc4920e5Smrg
325cc4920e5Smrg# Initialize.
326cc4920e5Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
327cc4920e5Smrg
328cc4920e5Smrg
329cc4920e5Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
330cc4920e5Smrg# -----------------------------------------------------
331cc4920e5Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
332cc4920e5Smrg[_LT_CONFIG_LIBTOOL([$1])
333cc4920e5Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
334cc4920e5Smrg])
335cc4920e5Smrg
336cc4920e5Smrg
337cc4920e5Smrg# _LT_FORMAT_COMMENT([COMMENT])
338cc4920e5Smrg# -----------------------------
339cc4920e5Smrg# Add leading comment marks to the start of each line, and a trailing
340cc4920e5Smrg# full-stop to the whole comment if one is not present already.
341cc4920e5Smrgm4_define([_LT_FORMAT_COMMENT],
342cc4920e5Smrg[m4_ifval([$1], [
343cc4920e5Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
344cc4920e5Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
345cc4920e5Smrg)])
346cc4920e5Smrg
347cc4920e5Smrg
348cc4920e5Smrg
349cc4920e5Smrg## ------------------------ ##
350cc4920e5Smrg## FIXME: Eliminate VARNAME ##
351cc4920e5Smrg## ------------------------ ##
352cc4920e5Smrg
353cc4920e5Smrg
354cc4920e5Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
355cc4920e5Smrg# -------------------------------------------------------------------
356cc4920e5Smrg# CONFIGNAME is the name given to the value in the libtool script.
357cc4920e5Smrg# VARNAME is the (base) name used in the configure script.
358cc4920e5Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
359cc4920e5Smrg# VARNAME.  Any other value will be used directly.
360cc4920e5Smrgm4_define([_LT_DECL],
361cc4920e5Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
362cc4920e5Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
363cc4920e5Smrg	[m4_ifval([$1], [$1], [$2])])
364cc4920e5Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
365cc4920e5Smrg    m4_ifval([$4],
366cc4920e5Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
367cc4920e5Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
368cc4920e5Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
369cc4920e5Smrg])
370cc4920e5Smrg
371cc4920e5Smrg
372cc4920e5Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
373cc4920e5Smrg# --------------------------------------------------------
374cc4920e5Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
375cc4920e5Smrg
376cc4920e5Smrg
377cc4920e5Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
378cc4920e5Smrg# ------------------------------------------------
379cc4920e5Smrgm4_define([lt_decl_tag_varnames],
380cc4920e5Smrg[_lt_decl_filter([tagged?], [yes], $@)])
381cc4920e5Smrg
382cc4920e5Smrg
383cc4920e5Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
384cc4920e5Smrg# ---------------------------------------------------------
385cc4920e5Smrgm4_define([_lt_decl_filter],
386cc4920e5Smrg[m4_case([$#],
387cc4920e5Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
388cc4920e5Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
389cc4920e5Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
390cc4920e5Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
391cc4920e5Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
392cc4920e5Smrg])
393cc4920e5Smrg
394cc4920e5Smrg
395cc4920e5Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
396cc4920e5Smrg# --------------------------------------------------
397cc4920e5Smrgm4_define([lt_decl_quote_varnames],
398cc4920e5Smrg[_lt_decl_filter([value], [1], $@)])
399cc4920e5Smrg
400cc4920e5Smrg
401cc4920e5Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
402cc4920e5Smrg# ---------------------------------------------------
403cc4920e5Smrgm4_define([lt_decl_dquote_varnames],
404cc4920e5Smrg[_lt_decl_filter([value], [2], $@)])
405cc4920e5Smrg
406cc4920e5Smrg
407cc4920e5Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
408cc4920e5Smrg# ---------------------------------------------------
409cc4920e5Smrgm4_define([lt_decl_varnames_tagged],
410cc4920e5Smrg[m4_assert([$# <= 2])dnl
411cc4920e5Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
412cc4920e5Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
413cc4920e5Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
414cc4920e5Smrgm4_define([_lt_decl_varnames_tagged],
415cc4920e5Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
416cc4920e5Smrg
417cc4920e5Smrg
418cc4920e5Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
419cc4920e5Smrg# ------------------------------------------------
420cc4920e5Smrgm4_define([lt_decl_all_varnames],
421cc4920e5Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
422cc4920e5Smrg     m4_if([$2], [],
423cc4920e5Smrg	   m4_quote(lt_decl_varnames),
424cc4920e5Smrg	m4_quote(m4_shift($@))))[]dnl
425cc4920e5Smrg])
426cc4920e5Smrgm4_define([_lt_decl_all_varnames],
427cc4920e5Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
428cc4920e5Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
429cc4920e5Smrg])
430cc4920e5Smrg
431cc4920e5Smrg
432cc4920e5Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
433cc4920e5Smrg# ------------------------------------
434cc4920e5Smrg# Quote a variable value, and forward it to 'config.status' so that its
435cc4920e5Smrg# declaration there will have the same value as in 'configure'.  VARNAME
436cc4920e5Smrg# must have a single quote delimited value for this to work.
437cc4920e5Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
438cc4920e5Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
439cc4920e5Smrg
440cc4920e5Smrg
441cc4920e5Smrg# _LT_CONFIG_STATUS_DECLARATIONS
442cc4920e5Smrg# ------------------------------
443cc4920e5Smrg# We delimit libtool config variables with single quotes, so when
444cc4920e5Smrg# we write them to config.status, we have to be sure to quote all
445cc4920e5Smrg# embedded single quotes properly.  In configure, this macro expands
446cc4920e5Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
447cc4920e5Smrg#
448cc4920e5Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
449cc4920e5Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
450cc4920e5Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
451cc4920e5Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
452cc4920e5Smrg
453cc4920e5Smrg
454cc4920e5Smrg# _LT_LIBTOOL_TAGS
455cc4920e5Smrg# ----------------
456cc4920e5Smrg# Output comment and list of tags supported by the script
457cc4920e5Smrgm4_defun([_LT_LIBTOOL_TAGS],
458cc4920e5Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
459cc4920e5Smrgavailable_tags='_LT_TAGS'dnl
460cc4920e5Smrg])
461cc4920e5Smrg
462cc4920e5Smrg
463cc4920e5Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
464cc4920e5Smrg# -----------------------------------
465cc4920e5Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
466cc4920e5Smrg# expand to a commented shell variable setting:
467cc4920e5Smrg#
468cc4920e5Smrg#    # Some comment about what VAR is for.
469cc4920e5Smrg#    visible_name=$lt_internal_name
470cc4920e5Smrgm4_define([_LT_LIBTOOL_DECLARE],
471cc4920e5Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
472cc4920e5Smrg					   [description])))[]dnl
473cc4920e5Smrgm4_pushdef([_libtool_name],
474cc4920e5Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
475cc4920e5Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
476cc4920e5Smrg    [0], [_libtool_name=[$]$1],
477cc4920e5Smrg    [1], [_libtool_name=$lt_[]$1],
478cc4920e5Smrg    [2], [_libtool_name=$lt_[]$1],
479cc4920e5Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
480cc4920e5Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
481cc4920e5Smrg])
482cc4920e5Smrg
483cc4920e5Smrg
484cc4920e5Smrg# _LT_LIBTOOL_CONFIG_VARS
485cc4920e5Smrg# -----------------------
486cc4920e5Smrg# Produce commented declarations of non-tagged libtool config variables
487cc4920e5Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
488cc4920e5Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
489cc4920e5Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
490cc4920e5Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
491cc4920e5Smrg[m4_foreach([_lt_var],
492cc4920e5Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
493cc4920e5Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
494cc4920e5Smrg
495cc4920e5Smrg
496cc4920e5Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
497cc4920e5Smrg# -------------------------
498cc4920e5Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
499cc4920e5Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
500cc4920e5Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
501cc4920e5Smrg
502cc4920e5Smrg
503cc4920e5Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
504cc4920e5Smrg# ------------------------------
505cc4920e5Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
506cc4920e5Smrg
507cc4920e5Smrg
508cc4920e5Smrg# _LT_CONFIG_COMMANDS
509cc4920e5Smrg# -------------------
510cc4920e5Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
511cc4920e5Smrg# variables for single and double quote escaping we saved from calls
512cc4920e5Smrg# to _LT_DECL, we can put quote escaped variables declarations
513cc4920e5Smrg# into 'config.status', and then the shell code to quote escape them in
514cc4920e5Smrg# for loops in 'config.status'.  Finally, any additional code accumulated
515cc4920e5Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
516cc4920e5Smrgm4_defun([_LT_CONFIG_COMMANDS],
517cc4920e5Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
518cc4920e5Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
519cc4920e5Smrg	dnl instead of duplicating it all over again into config.status,
520cc4920e5Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
521cc4920e5Smrg	dnl needs to know what name is stored there:
522cc4920e5Smrg        [AC_CONFIG_COMMANDS([libtool],
523cc4920e5Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
524cc4920e5Smrg    dnl If the libtool generation code is destined for config.status,
525cc4920e5Smrg    dnl expand the accumulated commands and init code now:
526cc4920e5Smrg    [AC_CONFIG_COMMANDS([libtool],
527cc4920e5Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
528cc4920e5Smrg])#_LT_CONFIG_COMMANDS
529cc4920e5Smrg
530cc4920e5Smrg
531cc4920e5Smrg# Initialize.
532cc4920e5Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
533cc4920e5Smrg[
534cc4920e5Smrg
535cc4920e5Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
536cc4920e5Smrg# if CDPATH is set.
537cc4920e5Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
538cc4920e5Smrg
539cc4920e5Smrgsed_quote_subst='$sed_quote_subst'
540cc4920e5Smrgdouble_quote_subst='$double_quote_subst'
541cc4920e5Smrgdelay_variable_subst='$delay_variable_subst'
542cc4920e5Smrg_LT_CONFIG_STATUS_DECLARATIONS
543cc4920e5SmrgLTCC='$LTCC'
544cc4920e5SmrgLTCFLAGS='$LTCFLAGS'
545cc4920e5Smrgcompiler='$compiler_DEFAULT'
546cc4920e5Smrg
547cc4920e5Smrg# A function that is used when there is no print builtin or printf.
548cc4920e5Smrgfunc_fallback_echo ()
549cc4920e5Smrg{
550cc4920e5Smrg  eval 'cat <<_LTECHO_EOF
551cc4920e5Smrg\$[]1
552cc4920e5Smrg_LTECHO_EOF'
553cc4920e5Smrg}
554cc4920e5Smrg
555cc4920e5Smrg# Quote evaled strings.
556cc4920e5Smrgfor var in lt_decl_all_varnames([[ \
557cc4920e5Smrg]], lt_decl_quote_varnames); do
558cc4920e5Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
559cc4920e5Smrg    *[[\\\\\\\`\\"\\\$]]*)
560cc4920e5Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
561cc4920e5Smrg      ;;
562cc4920e5Smrg    *)
563cc4920e5Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
564cc4920e5Smrg      ;;
565cc4920e5Smrg    esac
566cc4920e5Smrgdone
567cc4920e5Smrg
568cc4920e5Smrg# Double-quote double-evaled strings.
569cc4920e5Smrgfor var in lt_decl_all_varnames([[ \
570cc4920e5Smrg]], lt_decl_dquote_varnames); do
571cc4920e5Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
572cc4920e5Smrg    *[[\\\\\\\`\\"\\\$]]*)
573cc4920e5Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
574cc4920e5Smrg      ;;
575cc4920e5Smrg    *)
576cc4920e5Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
577cc4920e5Smrg      ;;
578cc4920e5Smrg    esac
579cc4920e5Smrgdone
580cc4920e5Smrg
581cc4920e5Smrg_LT_OUTPUT_LIBTOOL_INIT
582cc4920e5Smrg])
583cc4920e5Smrg
584cc4920e5Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
585cc4920e5Smrg# ------------------------------------
586cc4920e5Smrg# Generate a child script FILE with all initialization necessary to
587cc4920e5Smrg# reuse the environment learned by the parent script, and make the
588cc4920e5Smrg# file executable.  If COMMENT is supplied, it is inserted after the
589cc4920e5Smrg# '#!' sequence but before initialization text begins.  After this
590cc4920e5Smrg# macro, additional text can be appended to FILE to form the body of
591cc4920e5Smrg# the child script.  The macro ends with non-zero status if the
592cc4920e5Smrg# file could not be fully written (such as if the disk is full).
593cc4920e5Smrgm4_ifdef([AS_INIT_GENERATED],
594cc4920e5Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
595cc4920e5Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
596cc4920e5Smrg[m4_require([AS_PREPARE])]dnl
597cc4920e5Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
598cc4920e5Smrg[lt_write_fail=0
599cc4920e5Smrgcat >$1 <<_ASEOF || lt_write_fail=1
600cc4920e5Smrg#! $SHELL
601cc4920e5Smrg# Generated by $as_me.
602cc4920e5Smrg$2
603cc4920e5SmrgSHELL=\${CONFIG_SHELL-$SHELL}
604cc4920e5Smrgexport SHELL
605cc4920e5Smrg_ASEOF
606cc4920e5Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
607cc4920e5SmrgAS_SHELL_SANITIZE
608cc4920e5Smrg_AS_PREPARE
609cc4920e5Smrgexec AS_MESSAGE_FD>&1
610cc4920e5Smrg_ASEOF
611cc4920e5Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
612cc4920e5Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
613cc4920e5Smrg
614cc4920e5Smrg# LT_OUTPUT
615cc4920e5Smrg# ---------
616cc4920e5Smrg# This macro allows early generation of the libtool script (before
617cc4920e5Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
618cc4920e5Smrg# tests.
619cc4920e5SmrgAC_DEFUN([LT_OUTPUT],
620cc4920e5Smrg[: ${CONFIG_LT=./config.lt}
621cc4920e5SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
622cc4920e5Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
623cc4920e5Smrg[# Run this file to recreate a libtool stub with the current configuration.])
624cc4920e5Smrg
625cc4920e5Smrgcat >>"$CONFIG_LT" <<\_LTEOF
626cc4920e5Smrglt_cl_silent=false
627cc4920e5Smrgexec AS_MESSAGE_LOG_FD>>config.log
628cc4920e5Smrg{
629cc4920e5Smrg  echo
630cc4920e5Smrg  AS_BOX([Running $as_me.])
631cc4920e5Smrg} >&AS_MESSAGE_LOG_FD
632cc4920e5Smrg
633cc4920e5Smrglt_cl_help="\
634cc4920e5Smrg'$as_me' creates a local libtool stub from the current configuration,
635cc4920e5Smrgfor use in further configure time tests before the real libtool is
636cc4920e5Smrggenerated.
637cc4920e5Smrg
638cc4920e5SmrgUsage: $[0] [[OPTIONS]]
639cc4920e5Smrg
640cc4920e5Smrg  -h, --help      print this help, then exit
641cc4920e5Smrg  -V, --version   print version number, then exit
642cc4920e5Smrg  -q, --quiet     do not print progress messages
643cc4920e5Smrg  -d, --debug     don't remove temporary files
644cc4920e5Smrg
645cc4920e5SmrgReport bugs to <bug-libtool@gnu.org>."
646cc4920e5Smrg
647cc4920e5Smrglt_cl_version="\
648cc4920e5Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
649cc4920e5Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
650cc4920e5Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
651cc4920e5Smrg
652cc4920e5SmrgCopyright (C) 2011 Free Software Foundation, Inc.
653cc4920e5SmrgThis config.lt script is free software; the Free Software Foundation
654cc4920e5Smrggives unlimited permision to copy, distribute and modify it."
655cc4920e5Smrg
656cc4920e5Smrgwhile test 0 != $[#]
657cc4920e5Smrgdo
658cc4920e5Smrg  case $[1] in
659cc4920e5Smrg    --version | --v* | -V )
660cc4920e5Smrg      echo "$lt_cl_version"; exit 0 ;;
661cc4920e5Smrg    --help | --h* | -h )
662cc4920e5Smrg      echo "$lt_cl_help"; exit 0 ;;
663cc4920e5Smrg    --debug | --d* | -d )
664cc4920e5Smrg      debug=: ;;
665cc4920e5Smrg    --quiet | --q* | --silent | --s* | -q )
666cc4920e5Smrg      lt_cl_silent=: ;;
667cc4920e5Smrg
668cc4920e5Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
669cc4920e5SmrgTry '$[0] --help' for more information.]) ;;
670cc4920e5Smrg
671cc4920e5Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
672cc4920e5SmrgTry '$[0] --help' for more information.]) ;;
673cc4920e5Smrg  esac
674cc4920e5Smrg  shift
675cc4920e5Smrgdone
676cc4920e5Smrg
677cc4920e5Smrgif $lt_cl_silent; then
678cc4920e5Smrg  exec AS_MESSAGE_FD>/dev/null
679cc4920e5Smrgfi
680cc4920e5Smrg_LTEOF
681cc4920e5Smrg
682cc4920e5Smrgcat >>"$CONFIG_LT" <<_LTEOF
683cc4920e5Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
684cc4920e5Smrg_LTEOF
685cc4920e5Smrg
686cc4920e5Smrgcat >>"$CONFIG_LT" <<\_LTEOF
687cc4920e5SmrgAC_MSG_NOTICE([creating $ofile])
688cc4920e5Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
689cc4920e5SmrgAS_EXIT(0)
690cc4920e5Smrg_LTEOF
691cc4920e5Smrgchmod +x "$CONFIG_LT"
692cc4920e5Smrg
693cc4920e5Smrg# configure is writing to config.log, but config.lt does its own redirection,
694cc4920e5Smrg# appending to config.log, which fails on DOS, as config.log is still kept
695cc4920e5Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
696cc4920e5Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
697cc4920e5Smrglt_cl_success=:
698cc4920e5Smrgtest yes = "$silent" &&
699cc4920e5Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
700cc4920e5Smrgexec AS_MESSAGE_LOG_FD>/dev/null
701cc4920e5Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
702cc4920e5Smrgexec AS_MESSAGE_LOG_FD>>config.log
703cc4920e5Smrg$lt_cl_success || AS_EXIT(1)
704cc4920e5Smrg])# LT_OUTPUT
705cc4920e5Smrg
706cc4920e5Smrg
707cc4920e5Smrg# _LT_CONFIG(TAG)
708cc4920e5Smrg# ---------------
709cc4920e5Smrg# If TAG is the built-in tag, create an initial libtool script with a
710cc4920e5Smrg# default configuration from the untagged config vars.  Otherwise add code
711cc4920e5Smrg# to config.status for appending the configuration named by TAG from the
712cc4920e5Smrg# matching tagged config vars.
713cc4920e5Smrgm4_defun([_LT_CONFIG],
714cc4920e5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
715cc4920e5Smrg_LT_CONFIG_SAVE_COMMANDS([
716cc4920e5Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
717cc4920e5Smrg  m4_if(_LT_TAG, [C], [
718cc4920e5Smrg    # See if we are running on zsh, and set the options that allow our
719cc4920e5Smrg    # commands through without removal of \ escapes.
720cc4920e5Smrg    if test -n "${ZSH_VERSION+set}"; then
721cc4920e5Smrg      setopt NO_GLOB_SUBST
722cc4920e5Smrg    fi
723cc4920e5Smrg
724cc4920e5Smrg    cfgfile=${ofile}T
725cc4920e5Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
726cc4920e5Smrg    $RM "$cfgfile"
727cc4920e5Smrg
728cc4920e5Smrg    cat <<_LT_EOF >> "$cfgfile"
729cc4920e5Smrg#! $SHELL
730cc4920e5Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION
731cc4920e5Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
732cc4920e5Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
733cc4920e5Smrg
734cc4920e5Smrg# Provide generalized library-building support services.
735cc4920e5Smrg# Written by Gordon Matzigkeit, 1996
736cc4920e5Smrg
737cc4920e5Smrg_LT_COPYING
738cc4920e5Smrg_LT_LIBTOOL_TAGS
739cc4920e5Smrg
740cc4920e5Smrg# Configured defaults for sys_lib_dlsearch_path munging.
741cc4920e5Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
742cc4920e5Smrg
743cc4920e5Smrg# ### BEGIN LIBTOOL CONFIG
744cc4920e5Smrg_LT_LIBTOOL_CONFIG_VARS
745cc4920e5Smrg_LT_LIBTOOL_TAG_VARS
746cc4920e5Smrg# ### END LIBTOOL CONFIG
747cc4920e5Smrg
748cc4920e5Smrg_LT_EOF
749cc4920e5Smrg
750cc4920e5Smrg    cat <<'_LT_EOF' >> "$cfgfile"
751cc4920e5Smrg
752cc4920e5Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
753cc4920e5Smrg
754cc4920e5Smrg_LT_PREPARE_MUNGE_PATH_LIST
755cc4920e5Smrg_LT_PREPARE_CC_BASENAME
756cc4920e5Smrg
757cc4920e5Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE
758cc4920e5Smrg
759cc4920e5Smrg_LT_EOF
760cc4920e5Smrg
761cc4920e5Smrg  case $host_os in
762cc4920e5Smrg  aix3*)
763cc4920e5Smrg    cat <<\_LT_EOF >> "$cfgfile"
764cc4920e5Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
765cc4920e5Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
766cc4920e5Smrg# vanish in a puff of smoke.
767cc4920e5Smrgif test set != "${COLLECT_NAMES+set}"; then
768cc4920e5Smrg  COLLECT_NAMES=
769cc4920e5Smrg  export COLLECT_NAMES
770cc4920e5Smrgfi
771cc4920e5Smrg_LT_EOF
772cc4920e5Smrg    ;;
773cc4920e5Smrg  esac
774cc4920e5Smrg
775cc4920e5Smrg  _LT_PROG_LTMAIN
776cc4920e5Smrg
777cc4920e5Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
778cc4920e5Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
779cc4920e5Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
780cc4920e5Smrg  # is reportedly fixed, but why not run on old versions too?
781cc4920e5Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
782cc4920e5Smrg     || (rm -f "$cfgfile"; exit 1)
783cc4920e5Smrg
784cc4920e5Smrg   mv -f "$cfgfile" "$ofile" ||
785cc4920e5Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
786cc4920e5Smrg  chmod +x "$ofile"
787cc4920e5Smrg],
788cc4920e5Smrg[cat <<_LT_EOF >> "$ofile"
789cc4920e5Smrg
790cc4920e5Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
791cc4920e5Smrgdnl in a comment (ie after a #).
792cc4920e5Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
793cc4920e5Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
794cc4920e5Smrg# ### END LIBTOOL TAG CONFIG: $1
795cc4920e5Smrg_LT_EOF
796cc4920e5Smrg])dnl /m4_if
797cc4920e5Smrg],
798cc4920e5Smrg[m4_if([$1], [], [
799cc4920e5Smrg    PACKAGE='$PACKAGE'
800cc4920e5Smrg    VERSION='$VERSION'
801cc4920e5Smrg    RM='$RM'
802cc4920e5Smrg    ofile='$ofile'], [])
803cc4920e5Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
804cc4920e5Smrg])# _LT_CONFIG
805cc4920e5Smrg
806cc4920e5Smrg
807cc4920e5Smrg# LT_SUPPORTED_TAG(TAG)
808cc4920e5Smrg# ---------------------
809cc4920e5Smrg# Trace this macro to discover what tags are supported by the libtool
810cc4920e5Smrg# --tag option, using:
811cc4920e5Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
812cc4920e5SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
813cc4920e5Smrg
814cc4920e5Smrg
815cc4920e5Smrg# C support is built-in for now
816cc4920e5Smrgm4_define([_LT_LANG_C_enabled], [])
817cc4920e5Smrgm4_define([_LT_TAGS], [])
818cc4920e5Smrg
819cc4920e5Smrg
820cc4920e5Smrg# LT_LANG(LANG)
821cc4920e5Smrg# -------------
822cc4920e5Smrg# Enable libtool support for the given language if not already enabled.
823cc4920e5SmrgAC_DEFUN([LT_LANG],
824cc4920e5Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
825cc4920e5Smrgm4_case([$1],
826cc4920e5Smrg  [C],			[_LT_LANG(C)],
827cc4920e5Smrg  [C++],		[_LT_LANG(CXX)],
828cc4920e5Smrg  [Go],			[_LT_LANG(GO)],
829cc4920e5Smrg  [Java],		[_LT_LANG(GCJ)],
830cc4920e5Smrg  [Fortran 77],		[_LT_LANG(F77)],
831cc4920e5Smrg  [Fortran],		[_LT_LANG(FC)],
832cc4920e5Smrg  [Windows Resource],	[_LT_LANG(RC)],
833cc4920e5Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
834cc4920e5Smrg    [_LT_LANG($1)],
835cc4920e5Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
836cc4920e5Smrg])# LT_LANG
837cc4920e5Smrg
838cc4920e5Smrg
839cc4920e5Smrg# _LT_LANG(LANGNAME)
840cc4920e5Smrg# ------------------
841cc4920e5Smrgm4_defun([_LT_LANG],
842cc4920e5Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
843cc4920e5Smrg  [LT_SUPPORTED_TAG([$1])dnl
844cc4920e5Smrg  m4_append([_LT_TAGS], [$1 ])dnl
845cc4920e5Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
846cc4920e5Smrg  _LT_LANG_$1_CONFIG($1)])dnl
847cc4920e5Smrg])# _LT_LANG
848cc4920e5Smrg
849cc4920e5Smrg
850cc4920e5Smrgm4_ifndef([AC_PROG_GO], [
851cc4920e5Smrg############################################################
852cc4920e5Smrg# NOTE: This macro has been submitted for inclusion into   #
853cc4920e5Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
854cc4920e5Smrg#  a released version of Autoconf we should remove this    #
855cc4920e5Smrg#  macro and use it instead.                               #
856cc4920e5Smrg############################################################
857cc4920e5Smrgm4_defun([AC_PROG_GO],
858cc4920e5Smrg[AC_LANG_PUSH(Go)dnl
859cc4920e5SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
860cc4920e5SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
861cc4920e5Smrg_AC_ARG_VAR_LDFLAGS()dnl
862cc4920e5SmrgAC_CHECK_TOOL(GOC, gccgo)
863cc4920e5Smrgif test -z "$GOC"; then
864cc4920e5Smrg  if test -n "$ac_tool_prefix"; then
865cc4920e5Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
866cc4920e5Smrg  fi
867cc4920e5Smrgfi
868cc4920e5Smrgif test -z "$GOC"; then
869cc4920e5Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
870cc4920e5Smrgfi
871cc4920e5Smrg])#m4_defun
872cc4920e5Smrg])#m4_ifndef
873cc4920e5Smrg
874cc4920e5Smrg
875cc4920e5Smrg# _LT_LANG_DEFAULT_CONFIG
876cc4920e5Smrg# -----------------------
877cc4920e5Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
878cc4920e5Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
879cc4920e5Smrg  [LT_LANG(CXX)],
880cc4920e5Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
881cc4920e5Smrg
882cc4920e5SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
883cc4920e5Smrg  [LT_LANG(F77)],
884cc4920e5Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
885cc4920e5Smrg
886cc4920e5SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
887cc4920e5Smrg  [LT_LANG(FC)],
888cc4920e5Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
889cc4920e5Smrg
890cc4920e5Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
891cc4920e5Smrgdnl pulling things in needlessly.
892cc4920e5SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
893cc4920e5Smrg  [LT_LANG(GCJ)],
894cc4920e5Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
895cc4920e5Smrg    [LT_LANG(GCJ)],
896cc4920e5Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
897cc4920e5Smrg      [LT_LANG(GCJ)],
898cc4920e5Smrg      [m4_ifdef([AC_PROG_GCJ],
899cc4920e5Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
900cc4920e5Smrg       m4_ifdef([A][M_PROG_GCJ],
901cc4920e5Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
902cc4920e5Smrg       m4_ifdef([LT_PROG_GCJ],
903cc4920e5Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
904cc4920e5Smrg
905cc4920e5SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
906cc4920e5Smrg  [LT_LANG(GO)],
907cc4920e5Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
908cc4920e5Smrg
909cc4920e5SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
910cc4920e5Smrg  [LT_LANG(RC)],
911cc4920e5Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
912cc4920e5Smrg])# _LT_LANG_DEFAULT_CONFIG
913cc4920e5Smrg
914cc4920e5Smrg# Obsolete macros:
915cc4920e5SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
916cc4920e5SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
917cc4920e5SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
918cc4920e5SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
919cc4920e5SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
920cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
921cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
922cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
923cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
924cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
925cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
926cc4920e5Smrg
927cc4920e5Smrg
928cc4920e5Smrg# _LT_TAG_COMPILER
929cc4920e5Smrg# ----------------
930cc4920e5Smrgm4_defun([_LT_TAG_COMPILER],
931cc4920e5Smrg[AC_REQUIRE([AC_PROG_CC])dnl
932cc4920e5Smrg
933cc4920e5Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
934cc4920e5Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
935cc4920e5Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
936cc4920e5Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
937cc4920e5Smrg
938cc4920e5Smrg# If no C compiler was specified, use CC.
939cc4920e5SmrgLTCC=${LTCC-"$CC"}
940cc4920e5Smrg
941cc4920e5Smrg# If no C compiler flags were specified, use CFLAGS.
942cc4920e5SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
943cc4920e5Smrg
944cc4920e5Smrg# Allow CC to be a program name with arguments.
945cc4920e5Smrgcompiler=$CC
946cc4920e5Smrg])# _LT_TAG_COMPILER
947cc4920e5Smrg
948cc4920e5Smrg
949cc4920e5Smrg# _LT_COMPILER_BOILERPLATE
950cc4920e5Smrg# ------------------------
951cc4920e5Smrg# Check for compiler boilerplate output or warnings with
952cc4920e5Smrg# the simple compiler test code.
953cc4920e5Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
954cc4920e5Smrg[m4_require([_LT_DECL_SED])dnl
955cc4920e5Smrgac_outfile=conftest.$ac_objext
956cc4920e5Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
957cc4920e5Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
958cc4920e5Smrg_lt_compiler_boilerplate=`cat conftest.err`
959cc4920e5Smrg$RM conftest*
960cc4920e5Smrg])# _LT_COMPILER_BOILERPLATE
961cc4920e5Smrg
962cc4920e5Smrg
963cc4920e5Smrg# _LT_LINKER_BOILERPLATE
964cc4920e5Smrg# ----------------------
965cc4920e5Smrg# Check for linker boilerplate output or warnings with
966cc4920e5Smrg# the simple link test code.
967cc4920e5Smrgm4_defun([_LT_LINKER_BOILERPLATE],
968cc4920e5Smrg[m4_require([_LT_DECL_SED])dnl
969cc4920e5Smrgac_outfile=conftest.$ac_objext
970cc4920e5Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
971cc4920e5Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
972cc4920e5Smrg_lt_linker_boilerplate=`cat conftest.err`
973cc4920e5Smrg$RM -r conftest*
974cc4920e5Smrg])# _LT_LINKER_BOILERPLATE
975cc4920e5Smrg
976cc4920e5Smrg# _LT_REQUIRED_DARWIN_CHECKS
977cc4920e5Smrg# -------------------------
978cc4920e5Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
979cc4920e5Smrg  case $host_os in
980cc4920e5Smrg    rhapsody* | darwin*)
981cc4920e5Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
982cc4920e5Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
983cc4920e5Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
984cc4920e5Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
985cc4920e5Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
986cc4920e5Smrg    _LT_DECL([], [DSYMUTIL], [1],
987cc4920e5Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
988cc4920e5Smrg    _LT_DECL([], [NMEDIT], [1],
989cc4920e5Smrg      [Tool to change global to local symbols on Mac OS X])
990cc4920e5Smrg    _LT_DECL([], [LIPO], [1],
991cc4920e5Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
992cc4920e5Smrg    _LT_DECL([], [OTOOL], [1],
993cc4920e5Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
994cc4920e5Smrg    _LT_DECL([], [OTOOL64], [1],
995cc4920e5Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
996cc4920e5Smrg
997cc4920e5Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
998cc4920e5Smrg      [lt_cv_apple_cc_single_mod=no
999cc4920e5Smrg      if test -z "$LT_MULTI_MODULE"; then
1000cc4920e5Smrg	# By default we will add the -single_module flag. You can override
1001cc4920e5Smrg	# by either setting the environment variable LT_MULTI_MODULE
1002cc4920e5Smrg	# non-empty at configure time, or by adding -multi_module to the
1003cc4920e5Smrg	# link flags.
1004cc4920e5Smrg	rm -rf libconftest.dylib*
1005cc4920e5Smrg	echo "int foo(void){return 1;}" > conftest.c
1006cc4920e5Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1007cc4920e5Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1008cc4920e5Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009cc4920e5Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1010cc4920e5Smrg        _lt_result=$?
1011cc4920e5Smrg	# If there is a non-empty error log, and "single_module"
1012cc4920e5Smrg	# appears in it, assume the flag caused a linker warning
1013cc4920e5Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
1014cc4920e5Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
1015cc4920e5Smrg	# Otherwise, if the output was created with a 0 exit code from
1016cc4920e5Smrg	# the compiler, it worked.
1017cc4920e5Smrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1018cc4920e5Smrg	  lt_cv_apple_cc_single_mod=yes
1019cc4920e5Smrg	else
1020cc4920e5Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
1021cc4920e5Smrg	fi
1022cc4920e5Smrg	rm -rf libconftest.dylib*
1023cc4920e5Smrg	rm -f conftest.*
1024cc4920e5Smrg      fi])
1025cc4920e5Smrg
1026cc4920e5Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1027cc4920e5Smrg      [lt_cv_ld_exported_symbols_list],
1028cc4920e5Smrg      [lt_cv_ld_exported_symbols_list=no
1029cc4920e5Smrg      save_LDFLAGS=$LDFLAGS
1030cc4920e5Smrg      echo "_main" > conftest.sym
1031cc4920e5Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1032cc4920e5Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1033cc4920e5Smrg	[lt_cv_ld_exported_symbols_list=yes],
1034cc4920e5Smrg	[lt_cv_ld_exported_symbols_list=no])
1035cc4920e5Smrg	LDFLAGS=$save_LDFLAGS
1036cc4920e5Smrg    ])
1037cc4920e5Smrg
1038cc4920e5Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1039cc4920e5Smrg      [lt_cv_ld_force_load=no
1040cc4920e5Smrg      cat > conftest.c << _LT_EOF
1041cc4920e5Smrgint forced_loaded() { return 2;}
1042cc4920e5Smrg_LT_EOF
1043cc4920e5Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1044cc4920e5Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1045cc4920e5Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1046cc4920e5Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1047cc4920e5Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1048cc4920e5Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1049cc4920e5Smrg      cat > conftest.c << _LT_EOF
1050cc4920e5Smrgint main() { return 0;}
1051cc4920e5Smrg_LT_EOF
1052cc4920e5Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1053cc4920e5Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1054cc4920e5Smrg      _lt_result=$?
1055cc4920e5Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
1056cc4920e5Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1057cc4920e5Smrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1058cc4920e5Smrg	lt_cv_ld_force_load=yes
1059cc4920e5Smrg      else
1060cc4920e5Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1061cc4920e5Smrg      fi
1062cc4920e5Smrg        rm -f conftest.err libconftest.a conftest conftest.c
1063cc4920e5Smrg        rm -rf conftest.dSYM
1064cc4920e5Smrg    ])
1065cc4920e5Smrg    case $host_os in
1066cc4920e5Smrg    rhapsody* | darwin1.[[012]])
1067cc4920e5Smrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1068cc4920e5Smrg    darwin1.*)
1069cc4920e5Smrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1070cc4920e5Smrg    darwin*) # darwin 5.x on
1071cc4920e5Smrg      # if running on 10.5 or later, the deployment target defaults
1072cc4920e5Smrg      # to the OS version, if on x86, and 10.4, the deployment
1073cc4920e5Smrg      # target defaults to 10.4. Don't you love it?
1074cc4920e5Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1075cc4920e5Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1076cc4920e5Smrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1077cc4920e5Smrg	10.[[012]][[,.]]*)
1078cc4920e5Smrg	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1079cc4920e5Smrg	10.*)
1080cc4920e5Smrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1081cc4920e5Smrg      esac
1082cc4920e5Smrg    ;;
1083cc4920e5Smrg  esac
1084cc4920e5Smrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
1085cc4920e5Smrg      _lt_dar_single_mod='$single_module'
1086cc4920e5Smrg    fi
1087cc4920e5Smrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1088cc4920e5Smrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1089cc4920e5Smrg    else
1090cc4920e5Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1091cc4920e5Smrg    fi
1092cc4920e5Smrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1093cc4920e5Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
1094cc4920e5Smrg    else
1095cc4920e5Smrg      _lt_dsymutil=
1096cc4920e5Smrg    fi
1097cc4920e5Smrg    ;;
1098cc4920e5Smrg  esac
1099cc4920e5Smrg])
1100cc4920e5Smrg
1101cc4920e5Smrg
1102cc4920e5Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
1103cc4920e5Smrg# ---------------------------------
1104cc4920e5Smrg# Checks for linker and compiler features on darwin
1105cc4920e5Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
1106cc4920e5Smrg[
1107cc4920e5Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1108cc4920e5Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1109cc4920e5Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
1110cc4920e5Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1111cc4920e5Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1112cc4920e5Smrg  if test yes = "$lt_cv_ld_force_load"; then
1113cc4920e5Smrg    _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\"`'
1114cc4920e5Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1115cc4920e5Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1116cc4920e5Smrg  else
1117cc4920e5Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1118cc4920e5Smrg  fi
1119cc4920e5Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1120cc4920e5Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1121cc4920e5Smrg  case $cc_basename in
1122cc4920e5Smrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1123cc4920e5Smrg     *) _lt_dar_can_shared=$GCC ;;
1124cc4920e5Smrg  esac
1125cc4920e5Smrg  if test yes = "$_lt_dar_can_shared"; then
1126cc4920e5Smrg    output_verbose_link_cmd=func_echo_all
1127cc4920e5Smrg    _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"
1128cc4920e5Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1129cc4920e5Smrg    _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"
1130cc4920e5Smrg    _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"
1131cc4920e5Smrg    m4_if([$1], [CXX],
1132cc4920e5Smrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1133cc4920e5Smrg      _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"
1134cc4920e5Smrg      _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"
1135cc4920e5Smrg    fi
1136cc4920e5Smrg],[])
1137cc4920e5Smrg  else
1138cc4920e5Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
1139cc4920e5Smrg  fi
1140cc4920e5Smrg])
1141cc4920e5Smrg
1142cc4920e5Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1143cc4920e5Smrg# ----------------------------------
1144cc4920e5Smrg# Links a minimal program and checks the executable
1145cc4920e5Smrg# for the system default hardcoded library path. In most cases,
1146cc4920e5Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
1147cc4920e5Smrg# the location of the communication and MPI libs are included too.
1148cc4920e5Smrg# If we don't find anything, use the default library path according
1149cc4920e5Smrg# to the aix ld manual.
1150cc4920e5Smrg# Store the results from the different compilers for each TAGNAME.
1151cc4920e5Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
1152cc4920e5Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1153cc4920e5Smrg[m4_require([_LT_DECL_SED])dnl
1154cc4920e5Smrgif test set = "${lt_cv_aix_libpath+set}"; then
1155cc4920e5Smrg  aix_libpath=$lt_cv_aix_libpath
1156cc4920e5Smrgelse
1157cc4920e5Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1158cc4920e5Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1159cc4920e5Smrg  lt_aix_libpath_sed='[
1160cc4920e5Smrg      /Import File Strings/,/^$/ {
1161cc4920e5Smrg	  /^0/ {
1162cc4920e5Smrg	      s/^0  *\([^ ]*\) *$/\1/
1163cc4920e5Smrg	      p
1164cc4920e5Smrg	  }
1165cc4920e5Smrg      }]'
1166cc4920e5Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1167cc4920e5Smrg  # Check for a 64-bit object if we didn't find anything.
1168cc4920e5Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1169cc4920e5Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1170cc4920e5Smrg  fi],[])
1171cc4920e5Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1172cc4920e5Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1173cc4920e5Smrg  fi
1174cc4920e5Smrg  ])
1175cc4920e5Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1176cc4920e5Smrgfi
1177cc4920e5Smrg])# _LT_SYS_MODULE_PATH_AIX
1178cc4920e5Smrg
1179cc4920e5Smrg
1180cc4920e5Smrg# _LT_SHELL_INIT(ARG)
1181cc4920e5Smrg# -------------------
1182cc4920e5Smrgm4_define([_LT_SHELL_INIT],
1183cc4920e5Smrg[m4_divert_text([M4SH-INIT], [$1
1184cc4920e5Smrg])])# _LT_SHELL_INIT
1185cc4920e5Smrg
1186cc4920e5Smrg
1187cc4920e5Smrg
1188cc4920e5Smrg# _LT_PROG_ECHO_BACKSLASH
1189cc4920e5Smrg# -----------------------
1190cc4920e5Smrg# Find how we can fake an echo command that does not interpret backslash.
1191cc4920e5Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
1192cc4920e5Smrg# of the generated configure script that will find a shell with a builtin
1193cc4920e5Smrg# printf (that we can use as an echo command).
1194cc4920e5Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1195cc4920e5Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1196cc4920e5SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1197cc4920e5SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1198cc4920e5Smrg
1199cc4920e5SmrgAC_MSG_CHECKING([how to print strings])
1200cc4920e5Smrg# Test print first, because it will be a builtin if present.
1201cc4920e5Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1202cc4920e5Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1203cc4920e5Smrg  ECHO='print -r --'
1204cc4920e5Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1205cc4920e5Smrg  ECHO='printf %s\n'
1206cc4920e5Smrgelse
1207cc4920e5Smrg  # Use this function as a fallback that always works.
1208cc4920e5Smrg  func_fallback_echo ()
1209cc4920e5Smrg  {
1210cc4920e5Smrg    eval 'cat <<_LTECHO_EOF
1211cc4920e5Smrg$[]1
1212cc4920e5Smrg_LTECHO_EOF'
1213cc4920e5Smrg  }
1214cc4920e5Smrg  ECHO='func_fallback_echo'
1215cc4920e5Smrgfi
1216cc4920e5Smrg
1217cc4920e5Smrg# func_echo_all arg...
1218cc4920e5Smrg# Invoke $ECHO with all args, space-separated.
1219cc4920e5Smrgfunc_echo_all ()
1220cc4920e5Smrg{
1221cc4920e5Smrg    $ECHO "$*"
1222cc4920e5Smrg}
1223cc4920e5Smrg
1224cc4920e5Smrgcase $ECHO in
1225cc4920e5Smrg  printf*) AC_MSG_RESULT([printf]) ;;
1226cc4920e5Smrg  print*) AC_MSG_RESULT([print -r]) ;;
1227cc4920e5Smrg  *) AC_MSG_RESULT([cat]) ;;
1228cc4920e5Smrgesac
1229cc4920e5Smrg
1230cc4920e5Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
1231cc4920e5Smrg[_AS_DETECT_SUGGESTED([
1232cc4920e5Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1233cc4920e5Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1234cc4920e5Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1235cc4920e5Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1236cc4920e5Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
1237cc4920e5Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
1238cc4920e5Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1239cc4920e5Smrg
1240cc4920e5Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1241cc4920e5Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1242cc4920e5Smrg])# _LT_PROG_ECHO_BACKSLASH
1243cc4920e5Smrg
1244cc4920e5Smrg
1245cc4920e5Smrg# _LT_WITH_SYSROOT
1246cc4920e5Smrg# ----------------
1247cc4920e5SmrgAC_DEFUN([_LT_WITH_SYSROOT],
1248cc4920e5Smrg[AC_MSG_CHECKING([for sysroot])
1249cc4920e5SmrgAC_ARG_WITH([sysroot],
1250cc4920e5Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1251cc4920e5Smrg  [Search for dependent libraries within DIR (or the compiler's sysroot
1252cc4920e5Smrg   if not specified).])],
1253cc4920e5Smrg[], [with_sysroot=no])
1254cc4920e5Smrg
1255cc4920e5Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
1256cc4920e5Smrgdnl in case the user passed a directory name.
1257cc4920e5Smrglt_sysroot=
1258cc4920e5Smrgcase $with_sysroot in #(
1259cc4920e5Smrg yes)
1260cc4920e5Smrg   if test yes = "$GCC"; then
1261cc4920e5Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1262cc4920e5Smrg   fi
1263cc4920e5Smrg   ;; #(
1264cc4920e5Smrg /*)
1265cc4920e5Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1266cc4920e5Smrg   ;; #(
1267cc4920e5Smrg no|'')
1268cc4920e5Smrg   ;; #(
1269cc4920e5Smrg *)
1270cc4920e5Smrg   AC_MSG_RESULT([$with_sysroot])
1271cc4920e5Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
1272cc4920e5Smrg   ;;
1273cc4920e5Smrgesac
1274cc4920e5Smrg
1275cc4920e5Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
1276cc4920e5Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1277cc4920e5Smrg[dependent libraries, and where our libraries should be installed.])])
1278cc4920e5Smrg
1279cc4920e5Smrg# _LT_ENABLE_LOCK
1280cc4920e5Smrg# ---------------
1281cc4920e5Smrgm4_defun([_LT_ENABLE_LOCK],
1282cc4920e5Smrg[AC_ARG_ENABLE([libtool-lock],
1283cc4920e5Smrg  [AS_HELP_STRING([--disable-libtool-lock],
1284cc4920e5Smrg    [avoid locking (might break parallel builds)])])
1285cc4920e5Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
1286cc4920e5Smrg
1287cc4920e5Smrg# Some flags need to be propagated to the compiler or linker for good
1288cc4920e5Smrg# libtool support.
1289cc4920e5Smrgcase $host in
1290cc4920e5Smrgia64-*-hpux*)
1291cc4920e5Smrg  # Find out what ABI is being produced by ac_compile, and set mode
1292cc4920e5Smrg  # options accordingly.
1293cc4920e5Smrg  echo 'int i;' > conftest.$ac_ext
1294cc4920e5Smrg  if AC_TRY_EVAL(ac_compile); then
1295cc4920e5Smrg    case `/usr/bin/file conftest.$ac_objext` in
1296cc4920e5Smrg      *ELF-32*)
1297cc4920e5Smrg	HPUX_IA64_MODE=32
1298cc4920e5Smrg	;;
1299cc4920e5Smrg      *ELF-64*)
1300cc4920e5Smrg	HPUX_IA64_MODE=64
1301cc4920e5Smrg	;;
1302cc4920e5Smrg    esac
1303cc4920e5Smrg  fi
1304cc4920e5Smrg  rm -rf conftest*
1305cc4920e5Smrg  ;;
1306cc4920e5Smrg*-*-irix6*)
1307cc4920e5Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1308cc4920e5Smrg  # options accordingly.
1309cc4920e5Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1310cc4920e5Smrg  if AC_TRY_EVAL(ac_compile); then
1311cc4920e5Smrg    if test yes = "$lt_cv_prog_gnu_ld"; then
1312cc4920e5Smrg      case `/usr/bin/file conftest.$ac_objext` in
1313cc4920e5Smrg	*32-bit*)
1314cc4920e5Smrg	  LD="${LD-ld} -melf32bsmip"
1315cc4920e5Smrg	  ;;
1316cc4920e5Smrg	*N32*)
1317cc4920e5Smrg	  LD="${LD-ld} -melf32bmipn32"
1318cc4920e5Smrg	  ;;
1319cc4920e5Smrg	*64-bit*)
1320cc4920e5Smrg	  LD="${LD-ld} -melf64bmip"
1321cc4920e5Smrg	;;
1322cc4920e5Smrg      esac
1323cc4920e5Smrg    else
1324cc4920e5Smrg      case `/usr/bin/file conftest.$ac_objext` in
1325cc4920e5Smrg	*32-bit*)
1326cc4920e5Smrg	  LD="${LD-ld} -32"
1327cc4920e5Smrg	  ;;
1328cc4920e5Smrg	*N32*)
1329cc4920e5Smrg	  LD="${LD-ld} -n32"
1330cc4920e5Smrg	  ;;
1331cc4920e5Smrg	*64-bit*)
1332cc4920e5Smrg	  LD="${LD-ld} -64"
1333cc4920e5Smrg	  ;;
1334cc4920e5Smrg      esac
1335cc4920e5Smrg    fi
1336cc4920e5Smrg  fi
1337cc4920e5Smrg  rm -rf conftest*
1338cc4920e5Smrg  ;;
1339cc4920e5Smrg
1340cc4920e5Smrgmips64*-*linux*)
1341cc4920e5Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1342cc4920e5Smrg  # options accordingly.
1343cc4920e5Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1344cc4920e5Smrg  if AC_TRY_EVAL(ac_compile); then
1345cc4920e5Smrg    emul=elf
1346cc4920e5Smrg    case `/usr/bin/file conftest.$ac_objext` in
1347cc4920e5Smrg      *32-bit*)
1348cc4920e5Smrg	emul="${emul}32"
1349cc4920e5Smrg	;;
1350cc4920e5Smrg      *64-bit*)
1351cc4920e5Smrg	emul="${emul}64"
1352cc4920e5Smrg	;;
1353cc4920e5Smrg    esac
1354cc4920e5Smrg    case `/usr/bin/file conftest.$ac_objext` in
1355cc4920e5Smrg      *MSB*)
1356cc4920e5Smrg	emul="${emul}btsmip"
1357cc4920e5Smrg	;;
1358cc4920e5Smrg      *LSB*)
1359cc4920e5Smrg	emul="${emul}ltsmip"
1360cc4920e5Smrg	;;
1361cc4920e5Smrg    esac
1362cc4920e5Smrg    case `/usr/bin/file conftest.$ac_objext` in
1363cc4920e5Smrg      *N32*)
1364cc4920e5Smrg	emul="${emul}n32"
1365cc4920e5Smrg	;;
1366cc4920e5Smrg    esac
1367cc4920e5Smrg    LD="${LD-ld} -m $emul"
1368cc4920e5Smrg  fi
1369cc4920e5Smrg  rm -rf conftest*
1370cc4920e5Smrg  ;;
1371cc4920e5Smrg
1372cc4920e5Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1373cc4920e5Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1374cc4920e5Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1375cc4920e5Smrg  # options accordingly.  Note that the listed cases only cover the
1376cc4920e5Smrg  # situations where additional linker options are needed (such as when
1377cc4920e5Smrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1378cc4920e5Smrg  # vice versa); the common cases where no linker options are needed do
1379cc4920e5Smrg  # not appear in the list.
1380cc4920e5Smrg  echo 'int i;' > conftest.$ac_ext
1381cc4920e5Smrg  if AC_TRY_EVAL(ac_compile); then
1382cc4920e5Smrg    case `/usr/bin/file conftest.o` in
1383cc4920e5Smrg      *32-bit*)
1384cc4920e5Smrg	case $host in
1385cc4920e5Smrg	  x86_64-*kfreebsd*-gnu)
1386cc4920e5Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
1387cc4920e5Smrg	    ;;
1388cc4920e5Smrg	  x86_64-*linux*)
1389cc4920e5Smrg	    case `/usr/bin/file conftest.o` in
1390cc4920e5Smrg	      *x86-64*)
1391cc4920e5Smrg		LD="${LD-ld} -m elf32_x86_64"
1392cc4920e5Smrg		;;
1393cc4920e5Smrg	      *)
1394cc4920e5Smrg		LD="${LD-ld} -m elf_i386"
1395cc4920e5Smrg		;;
1396cc4920e5Smrg	    esac
1397cc4920e5Smrg	    ;;
1398cc4920e5Smrg	  powerpc64le-*linux*)
1399cc4920e5Smrg	    LD="${LD-ld} -m elf32lppclinux"
1400cc4920e5Smrg	    ;;
1401cc4920e5Smrg	  powerpc64-*linux*)
1402cc4920e5Smrg	    LD="${LD-ld} -m elf32ppclinux"
1403cc4920e5Smrg	    ;;
1404cc4920e5Smrg	  s390x-*linux*)
1405cc4920e5Smrg	    LD="${LD-ld} -m elf_s390"
1406cc4920e5Smrg	    ;;
1407cc4920e5Smrg	  sparc64-*linux*)
1408cc4920e5Smrg	    LD="${LD-ld} -m elf32_sparc"
1409cc4920e5Smrg	    ;;
1410cc4920e5Smrg	esac
1411cc4920e5Smrg	;;
1412cc4920e5Smrg      *64-bit*)
1413cc4920e5Smrg	case $host in
1414cc4920e5Smrg	  x86_64-*kfreebsd*-gnu)
1415cc4920e5Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1416cc4920e5Smrg	    ;;
1417cc4920e5Smrg	  x86_64-*linux*)
1418cc4920e5Smrg	    LD="${LD-ld} -m elf_x86_64"
1419cc4920e5Smrg	    ;;
1420cc4920e5Smrg	  powerpcle-*linux*)
1421cc4920e5Smrg	    LD="${LD-ld} -m elf64lppc"
1422cc4920e5Smrg	    ;;
1423cc4920e5Smrg	  powerpc-*linux*)
1424cc4920e5Smrg	    LD="${LD-ld} -m elf64ppc"
1425cc4920e5Smrg	    ;;
1426cc4920e5Smrg	  s390*-*linux*|s390*-*tpf*)
1427cc4920e5Smrg	    LD="${LD-ld} -m elf64_s390"
1428cc4920e5Smrg	    ;;
1429cc4920e5Smrg	  sparc*-*linux*)
1430cc4920e5Smrg	    LD="${LD-ld} -m elf64_sparc"
1431cc4920e5Smrg	    ;;
1432cc4920e5Smrg	esac
1433cc4920e5Smrg	;;
1434cc4920e5Smrg    esac
1435cc4920e5Smrg  fi
1436cc4920e5Smrg  rm -rf conftest*
1437cc4920e5Smrg  ;;
1438cc4920e5Smrg
1439cc4920e5Smrg*-*-sco3.2v5*)
1440cc4920e5Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1441cc4920e5Smrg  SAVE_CFLAGS=$CFLAGS
1442cc4920e5Smrg  CFLAGS="$CFLAGS -belf"
1443cc4920e5Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1444cc4920e5Smrg    [AC_LANG_PUSH(C)
1445cc4920e5Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1446cc4920e5Smrg     AC_LANG_POP])
1447cc4920e5Smrg  if test yes != "$lt_cv_cc_needs_belf"; then
1448cc4920e5Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1449cc4920e5Smrg    CFLAGS=$SAVE_CFLAGS
1450cc4920e5Smrg  fi
1451cc4920e5Smrg  ;;
1452cc4920e5Smrg*-*solaris*)
1453cc4920e5Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1454cc4920e5Smrg  # options accordingly.
1455cc4920e5Smrg  echo 'int i;' > conftest.$ac_ext
1456cc4920e5Smrg  if AC_TRY_EVAL(ac_compile); then
1457cc4920e5Smrg    case `/usr/bin/file conftest.o` in
1458cc4920e5Smrg    *64-bit*)
1459cc4920e5Smrg      case $lt_cv_prog_gnu_ld in
1460cc4920e5Smrg      yes*)
1461cc4920e5Smrg        case $host in
1462cc4920e5Smrg        i?86-*-solaris*|x86_64-*-solaris*)
1463cc4920e5Smrg          LD="${LD-ld} -m elf_x86_64"
1464cc4920e5Smrg          ;;
1465cc4920e5Smrg        sparc*-*-solaris*)
1466cc4920e5Smrg          LD="${LD-ld} -m elf64_sparc"
1467cc4920e5Smrg          ;;
1468cc4920e5Smrg        esac
1469cc4920e5Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1470cc4920e5Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1471cc4920e5Smrg          LD=${LD-ld}_sol2
1472cc4920e5Smrg        fi
1473cc4920e5Smrg        ;;
1474cc4920e5Smrg      *)
1475cc4920e5Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1476cc4920e5Smrg	  LD="${LD-ld} -64"
1477cc4920e5Smrg	fi
1478cc4920e5Smrg	;;
1479cc4920e5Smrg      esac
1480cc4920e5Smrg      ;;
1481cc4920e5Smrg    esac
1482cc4920e5Smrg  fi
1483cc4920e5Smrg  rm -rf conftest*
1484cc4920e5Smrg  ;;
1485cc4920e5Smrgesac
1486cc4920e5Smrg
1487cc4920e5Smrgneed_locks=$enable_libtool_lock
1488cc4920e5Smrg])# _LT_ENABLE_LOCK
1489cc4920e5Smrg
1490cc4920e5Smrg
1491cc4920e5Smrg# _LT_PROG_AR
1492cc4920e5Smrg# -----------
1493cc4920e5Smrgm4_defun([_LT_PROG_AR],
1494cc4920e5Smrg[AC_CHECK_TOOLS(AR, [ar], false)
1495cc4920e5Smrg: ${AR=ar}
1496cc4920e5Smrg: ${AR_FLAGS=cru}
1497cc4920e5Smrg_LT_DECL([], [AR], [1], [The archiver])
1498cc4920e5Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1499cc4920e5Smrg
1500cc4920e5SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1501cc4920e5Smrg  [lt_cv_ar_at_file=no
1502cc4920e5Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1503cc4920e5Smrg     [echo conftest.$ac_objext > conftest.lst
1504cc4920e5Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1505cc4920e5Smrg      AC_TRY_EVAL([lt_ar_try])
1506cc4920e5Smrg      if test 0 -eq "$ac_status"; then
1507cc4920e5Smrg	# Ensure the archiver fails upon bogus file names.
1508cc4920e5Smrg	rm -f conftest.$ac_objext libconftest.a
1509cc4920e5Smrg	AC_TRY_EVAL([lt_ar_try])
1510cc4920e5Smrg	if test 0 -ne "$ac_status"; then
1511cc4920e5Smrg          lt_cv_ar_at_file=@
1512cc4920e5Smrg        fi
1513cc4920e5Smrg      fi
1514cc4920e5Smrg      rm -f conftest.* libconftest.a
1515cc4920e5Smrg     ])
1516cc4920e5Smrg  ])
1517cc4920e5Smrg
1518cc4920e5Smrgif test no = "$lt_cv_ar_at_file"; then
1519cc4920e5Smrg  archiver_list_spec=
1520cc4920e5Smrgelse
1521cc4920e5Smrg  archiver_list_spec=$lt_cv_ar_at_file
1522cc4920e5Smrgfi
1523cc4920e5Smrg_LT_DECL([], [archiver_list_spec], [1],
1524cc4920e5Smrg  [How to feed a file listing to the archiver])
1525cc4920e5Smrg])# _LT_PROG_AR
1526cc4920e5Smrg
1527cc4920e5Smrg
1528cc4920e5Smrg# _LT_CMD_OLD_ARCHIVE
1529cc4920e5Smrg# -------------------
1530cc4920e5Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1531cc4920e5Smrg[_LT_PROG_AR
1532cc4920e5Smrg
1533cc4920e5SmrgAC_CHECK_TOOL(STRIP, strip, :)
1534cc4920e5Smrgtest -z "$STRIP" && STRIP=:
1535cc4920e5Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1536cc4920e5Smrg
1537cc4920e5SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1538cc4920e5Smrgtest -z "$RANLIB" && RANLIB=:
1539cc4920e5Smrg_LT_DECL([], [RANLIB], [1],
1540cc4920e5Smrg    [Commands used to install an old-style archive])
1541cc4920e5Smrg
1542cc4920e5Smrg# Determine commands to create old-style static archives.
1543cc4920e5Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1544cc4920e5Smrgold_postinstall_cmds='chmod 644 $oldlib'
1545cc4920e5Smrgold_postuninstall_cmds=
1546cc4920e5Smrg
1547cc4920e5Smrgif test -n "$RANLIB"; then
1548cc4920e5Smrg  case $host_os in
1549cc4920e5Smrg  bitrig* | openbsd*)
1550cc4920e5Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1551cc4920e5Smrg    ;;
1552cc4920e5Smrg  *)
1553cc4920e5Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1554cc4920e5Smrg    ;;
1555cc4920e5Smrg  esac
1556cc4920e5Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1557cc4920e5Smrgfi
1558cc4920e5Smrg
1559cc4920e5Smrgcase $host_os in
1560cc4920e5Smrg  darwin*)
1561cc4920e5Smrg    lock_old_archive_extraction=yes ;;
1562cc4920e5Smrg  *)
1563cc4920e5Smrg    lock_old_archive_extraction=no ;;
1564cc4920e5Smrgesac
1565cc4920e5Smrg_LT_DECL([], [old_postinstall_cmds], [2])
1566cc4920e5Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
1567cc4920e5Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
1568cc4920e5Smrg    [Commands used to build an old-style archive])
1569cc4920e5Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
1570cc4920e5Smrg    [Whether to use a lock for old archive extraction])
1571cc4920e5Smrg])# _LT_CMD_OLD_ARCHIVE
1572cc4920e5Smrg
1573cc4920e5Smrg
1574cc4920e5Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1575cc4920e5Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1576cc4920e5Smrg# ----------------------------------------------------------------
1577cc4920e5Smrg# Check whether the given compiler option works
1578cc4920e5SmrgAC_DEFUN([_LT_COMPILER_OPTION],
1579cc4920e5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1580cc4920e5Smrgm4_require([_LT_DECL_SED])dnl
1581cc4920e5SmrgAC_CACHE_CHECK([$1], [$2],
1582cc4920e5Smrg  [$2=no
1583cc4920e5Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1584cc4920e5Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1585cc4920e5Smrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1586cc4920e5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1587cc4920e5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1588cc4920e5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1589cc4920e5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1590cc4920e5Smrg   # The option is referenced via a variable to avoid confusing sed.
1591cc4920e5Smrg   lt_compile=`echo "$ac_compile" | $SED \
1592cc4920e5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1593cc4920e5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1594cc4920e5Smrg   -e 's:$: $lt_compiler_flag:'`
1595cc4920e5Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1596cc4920e5Smrg   (eval "$lt_compile" 2>conftest.err)
1597cc4920e5Smrg   ac_status=$?
1598cc4920e5Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1599cc4920e5Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1600cc4920e5Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1601cc4920e5Smrg     # The compiler can only warn and ignore the option if not recognized
1602cc4920e5Smrg     # So say no if there are warnings other than the usual output.
1603cc4920e5Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1604cc4920e5Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1605cc4920e5Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1606cc4920e5Smrg       $2=yes
1607cc4920e5Smrg     fi
1608cc4920e5Smrg   fi
1609cc4920e5Smrg   $RM conftest*
1610cc4920e5Smrg])
1611cc4920e5Smrg
1612cc4920e5Smrgif test yes = "[$]$2"; then
1613cc4920e5Smrg    m4_if([$5], , :, [$5])
1614cc4920e5Smrgelse
1615cc4920e5Smrg    m4_if([$6], , :, [$6])
1616cc4920e5Smrgfi
1617cc4920e5Smrg])# _LT_COMPILER_OPTION
1618cc4920e5Smrg
1619cc4920e5Smrg# Old name:
1620cc4920e5SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1621cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
1622cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1623cc4920e5Smrg
1624cc4920e5Smrg
1625cc4920e5Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1626cc4920e5Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1627cc4920e5Smrg# ----------------------------------------------------
1628cc4920e5Smrg# Check whether the given linker option works
1629cc4920e5SmrgAC_DEFUN([_LT_LINKER_OPTION],
1630cc4920e5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1631cc4920e5Smrgm4_require([_LT_DECL_SED])dnl
1632cc4920e5SmrgAC_CACHE_CHECK([$1], [$2],
1633cc4920e5Smrg  [$2=no
1634cc4920e5Smrg   save_LDFLAGS=$LDFLAGS
1635cc4920e5Smrg   LDFLAGS="$LDFLAGS $3"
1636cc4920e5Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1637cc4920e5Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1638cc4920e5Smrg     # The linker can only warn and ignore the option if not recognized
1639cc4920e5Smrg     # So say no if there are warnings
1640cc4920e5Smrg     if test -s conftest.err; then
1641cc4920e5Smrg       # Append any errors to the config.log.
1642cc4920e5Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1643cc4920e5Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1644cc4920e5Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1645cc4920e5Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
1646cc4920e5Smrg         $2=yes
1647cc4920e5Smrg       fi
1648cc4920e5Smrg     else
1649cc4920e5Smrg       $2=yes
1650cc4920e5Smrg     fi
1651cc4920e5Smrg   fi
1652cc4920e5Smrg   $RM -r conftest*
1653cc4920e5Smrg   LDFLAGS=$save_LDFLAGS
1654cc4920e5Smrg])
1655cc4920e5Smrg
1656cc4920e5Smrgif test yes = "[$]$2"; then
1657cc4920e5Smrg    m4_if([$4], , :, [$4])
1658cc4920e5Smrgelse
1659cc4920e5Smrg    m4_if([$5], , :, [$5])
1660cc4920e5Smrgfi
1661cc4920e5Smrg])# _LT_LINKER_OPTION
1662cc4920e5Smrg
1663cc4920e5Smrg# Old name:
1664cc4920e5SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1665cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
1666cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1667cc4920e5Smrg
1668cc4920e5Smrg
1669cc4920e5Smrg# LT_CMD_MAX_LEN
1670cc4920e5Smrg#---------------
1671cc4920e5SmrgAC_DEFUN([LT_CMD_MAX_LEN],
1672cc4920e5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1673cc4920e5Smrg# find the maximum length of command line arguments
1674cc4920e5SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1675cc4920e5SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1676cc4920e5Smrg  i=0
1677cc4920e5Smrg  teststring=ABCD
1678cc4920e5Smrg
1679cc4920e5Smrg  case $build_os in
1680cc4920e5Smrg  msdosdjgpp*)
1681cc4920e5Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1682cc4920e5Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1683cc4920e5Smrg    # during glob expansion).  Even if it were fixed, the result of this
1684cc4920e5Smrg    # check would be larger than it should be.
1685cc4920e5Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1686cc4920e5Smrg    ;;
1687cc4920e5Smrg
1688cc4920e5Smrg  gnu*)
1689cc4920e5Smrg    # Under GNU Hurd, this test is not required because there is
1690cc4920e5Smrg    # no limit to the length of command line arguments.
1691cc4920e5Smrg    # Libtool will interpret -1 as no limit whatsoever
1692cc4920e5Smrg    lt_cv_sys_max_cmd_len=-1;
1693cc4920e5Smrg    ;;
1694cc4920e5Smrg
1695cc4920e5Smrg  cygwin* | mingw* | cegcc*)
1696cc4920e5Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1697cc4920e5Smrg    # about 5 minutes as the teststring grows exponentially.
1698cc4920e5Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1699cc4920e5Smrg    # you end up with a "frozen" computer, even though with patience
1700cc4920e5Smrg    # the test eventually succeeds (with a max line length of 256k).
1701cc4920e5Smrg    # Instead, let's just punt: use the minimum linelength reported by
1702cc4920e5Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1703cc4920e5Smrg    lt_cv_sys_max_cmd_len=8192;
1704cc4920e5Smrg    ;;
1705cc4920e5Smrg
1706cc4920e5Smrg  mint*)
1707cc4920e5Smrg    # On MiNT this can take a long time and run out of memory.
1708cc4920e5Smrg    lt_cv_sys_max_cmd_len=8192;
1709cc4920e5Smrg    ;;
1710cc4920e5Smrg
1711cc4920e5Smrg  amigaos*)
1712cc4920e5Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
1713cc4920e5Smrg    # So we just punt and use a minimum line length of 8192.
1714cc4920e5Smrg    lt_cv_sys_max_cmd_len=8192;
1715cc4920e5Smrg    ;;
1716cc4920e5Smrg
1717cc4920e5Smrg  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1718cc4920e5Smrg    # This has been around since 386BSD, at least.  Likely further.
1719cc4920e5Smrg    if test -x /sbin/sysctl; then
1720cc4920e5Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1721cc4920e5Smrg    elif test -x /usr/sbin/sysctl; then
1722cc4920e5Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1723cc4920e5Smrg    else
1724cc4920e5Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1725cc4920e5Smrg    fi
1726cc4920e5Smrg    # And add a safety zone
1727cc4920e5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1728cc4920e5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1729cc4920e5Smrg    ;;
1730cc4920e5Smrg
1731cc4920e5Smrg  interix*)
1732cc4920e5Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1733cc4920e5Smrg    lt_cv_sys_max_cmd_len=196608
1734cc4920e5Smrg    ;;
1735cc4920e5Smrg
1736cc4920e5Smrg  os2*)
1737cc4920e5Smrg    # The test takes a long time on OS/2.
1738cc4920e5Smrg    lt_cv_sys_max_cmd_len=8192
1739cc4920e5Smrg    ;;
1740cc4920e5Smrg
1741cc4920e5Smrg  osf*)
1742cc4920e5Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1743cc4920e5Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1744cc4920e5Smrg    # nice to cause kernel panics so lets avoid the loop below.
1745cc4920e5Smrg    # First set a reasonable default.
1746cc4920e5Smrg    lt_cv_sys_max_cmd_len=16384
1747cc4920e5Smrg    #
1748cc4920e5Smrg    if test -x /sbin/sysconfig; then
1749cc4920e5Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1750cc4920e5Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1751cc4920e5Smrg      esac
1752cc4920e5Smrg    fi
1753cc4920e5Smrg    ;;
1754cc4920e5Smrg  sco3.2v5*)
1755cc4920e5Smrg    lt_cv_sys_max_cmd_len=102400
1756cc4920e5Smrg    ;;
1757cc4920e5Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
1758cc4920e5Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1759cc4920e5Smrg    if test -n "$kargmax"; then
1760cc4920e5Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1761cc4920e5Smrg    else
1762cc4920e5Smrg      lt_cv_sys_max_cmd_len=32768
1763cc4920e5Smrg    fi
1764cc4920e5Smrg    ;;
1765cc4920e5Smrg  *)
1766cc4920e5Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1767cc4920e5Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
1768cc4920e5Smrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
1769cc4920e5Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1770cc4920e5Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1771cc4920e5Smrg    else
1772cc4920e5Smrg      # Make teststring a little bigger before we do anything with it.
1773cc4920e5Smrg      # a 1K string should be a reasonable start.
1774cc4920e5Smrg      for i in 1 2 3 4 5 6 7 8; do
1775cc4920e5Smrg        teststring=$teststring$teststring
1776cc4920e5Smrg      done
1777cc4920e5Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1778cc4920e5Smrg      # If test is not a shell built-in, we'll probably end up computing a
1779cc4920e5Smrg      # maximum length that is only half of the actual maximum length, but
1780cc4920e5Smrg      # we can't tell.
1781cc4920e5Smrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1782cc4920e5Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1783cc4920e5Smrg	      test 17 != "$i" # 1/2 MB should be enough
1784cc4920e5Smrg      do
1785cc4920e5Smrg        i=`expr $i + 1`
1786cc4920e5Smrg        teststring=$teststring$teststring
1787cc4920e5Smrg      done
1788cc4920e5Smrg      # Only check the string length outside the loop.
1789cc4920e5Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1790cc4920e5Smrg      teststring=
1791cc4920e5Smrg      # Add a significant safety factor because C++ compilers can tack on
1792cc4920e5Smrg      # massive amounts of additional arguments before passing them to the
1793cc4920e5Smrg      # linker.  It appears as though 1/2 is a usable value.
1794cc4920e5Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1795cc4920e5Smrg    fi
1796cc4920e5Smrg    ;;
1797cc4920e5Smrg  esac
1798cc4920e5Smrg])
1799cc4920e5Smrgif test -n "$lt_cv_sys_max_cmd_len"; then
1800cc4920e5Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1801cc4920e5Smrgelse
1802cc4920e5Smrg  AC_MSG_RESULT(none)
1803cc4920e5Smrgfi
1804cc4920e5Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1805cc4920e5Smrg_LT_DECL([], [max_cmd_len], [0],
1806cc4920e5Smrg    [What is the maximum length of a command?])
1807cc4920e5Smrg])# LT_CMD_MAX_LEN
1808cc4920e5Smrg
1809cc4920e5Smrg# Old name:
1810cc4920e5SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1811cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
1812cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1813cc4920e5Smrg
1814cc4920e5Smrg
1815cc4920e5Smrg# _LT_HEADER_DLFCN
1816cc4920e5Smrg# ----------------
1817cc4920e5Smrgm4_defun([_LT_HEADER_DLFCN],
1818cc4920e5Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1819cc4920e5Smrg])# _LT_HEADER_DLFCN
1820cc4920e5Smrg
1821cc4920e5Smrg
1822cc4920e5Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1823cc4920e5Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1824cc4920e5Smrg# ----------------------------------------------------------------
1825cc4920e5Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
1826cc4920e5Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1827cc4920e5Smrgif test yes = "$cross_compiling"; then :
1828cc4920e5Smrg  [$4]
1829cc4920e5Smrgelse
1830cc4920e5Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1831cc4920e5Smrg  lt_status=$lt_dlunknown
1832cc4920e5Smrg  cat > conftest.$ac_ext <<_LT_EOF
1833cc4920e5Smrg[#line $LINENO "configure"
1834cc4920e5Smrg#include "confdefs.h"
1835cc4920e5Smrg
1836cc4920e5Smrg#if HAVE_DLFCN_H
1837cc4920e5Smrg#include <dlfcn.h>
1838cc4920e5Smrg#endif
1839cc4920e5Smrg
1840cc4920e5Smrg#include <stdio.h>
1841cc4920e5Smrg
1842cc4920e5Smrg#ifdef RTLD_GLOBAL
1843cc4920e5Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1844cc4920e5Smrg#else
1845cc4920e5Smrg#  ifdef DL_GLOBAL
1846cc4920e5Smrg#    define LT_DLGLOBAL		DL_GLOBAL
1847cc4920e5Smrg#  else
1848cc4920e5Smrg#    define LT_DLGLOBAL		0
1849cc4920e5Smrg#  endif
1850cc4920e5Smrg#endif
1851cc4920e5Smrg
1852cc4920e5Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1853cc4920e5Smrg   find out it does not work in some platform. */
1854cc4920e5Smrg#ifndef LT_DLLAZY_OR_NOW
1855cc4920e5Smrg#  ifdef RTLD_LAZY
1856cc4920e5Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1857cc4920e5Smrg#  else
1858cc4920e5Smrg#    ifdef DL_LAZY
1859cc4920e5Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1860cc4920e5Smrg#    else
1861cc4920e5Smrg#      ifdef RTLD_NOW
1862cc4920e5Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1863cc4920e5Smrg#      else
1864cc4920e5Smrg#        ifdef DL_NOW
1865cc4920e5Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1866cc4920e5Smrg#        else
1867cc4920e5Smrg#          define LT_DLLAZY_OR_NOW	0
1868cc4920e5Smrg#        endif
1869cc4920e5Smrg#      endif
1870cc4920e5Smrg#    endif
1871cc4920e5Smrg#  endif
1872cc4920e5Smrg#endif
1873cc4920e5Smrg
1874cc4920e5Smrg/* When -fvisibility=hidden is used, assume the code has been annotated
1875cc4920e5Smrg   correspondingly for the symbols needed.  */
1876cc4920e5Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1877cc4920e5Smrgint fnord () __attribute__((visibility("default")));
1878cc4920e5Smrg#endif
1879cc4920e5Smrg
1880cc4920e5Smrgint fnord () { return 42; }
1881cc4920e5Smrgint main ()
1882cc4920e5Smrg{
1883cc4920e5Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1884cc4920e5Smrg  int status = $lt_dlunknown;
1885cc4920e5Smrg
1886cc4920e5Smrg  if (self)
1887cc4920e5Smrg    {
1888cc4920e5Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1889cc4920e5Smrg      else
1890cc4920e5Smrg        {
1891cc4920e5Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1892cc4920e5Smrg          else puts (dlerror ());
1893cc4920e5Smrg	}
1894cc4920e5Smrg      /* dlclose (self); */
1895cc4920e5Smrg    }
1896cc4920e5Smrg  else
1897cc4920e5Smrg    puts (dlerror ());
1898cc4920e5Smrg
1899cc4920e5Smrg  return status;
1900cc4920e5Smrg}]
1901cc4920e5Smrg_LT_EOF
1902cc4920e5Smrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1903cc4920e5Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1904cc4920e5Smrg    lt_status=$?
1905cc4920e5Smrg    case x$lt_status in
1906cc4920e5Smrg      x$lt_dlno_uscore) $1 ;;
1907cc4920e5Smrg      x$lt_dlneed_uscore) $2 ;;
1908cc4920e5Smrg      x$lt_dlunknown|x*) $3 ;;
1909cc4920e5Smrg    esac
1910cc4920e5Smrg  else :
1911cc4920e5Smrg    # compilation failed
1912cc4920e5Smrg    $3
1913cc4920e5Smrg  fi
1914cc4920e5Smrgfi
1915cc4920e5Smrgrm -fr conftest*
1916cc4920e5Smrg])# _LT_TRY_DLOPEN_SELF
1917cc4920e5Smrg
1918cc4920e5Smrg
1919cc4920e5Smrg# LT_SYS_DLOPEN_SELF
1920cc4920e5Smrg# ------------------
1921cc4920e5SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1922cc4920e5Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1923cc4920e5Smrgif test yes != "$enable_dlopen"; then
1924cc4920e5Smrg  enable_dlopen=unknown
1925cc4920e5Smrg  enable_dlopen_self=unknown
1926cc4920e5Smrg  enable_dlopen_self_static=unknown
1927cc4920e5Smrgelse
1928cc4920e5Smrg  lt_cv_dlopen=no
1929cc4920e5Smrg  lt_cv_dlopen_libs=
1930cc4920e5Smrg
1931cc4920e5Smrg  case $host_os in
1932cc4920e5Smrg  beos*)
1933cc4920e5Smrg    lt_cv_dlopen=load_add_on
1934cc4920e5Smrg    lt_cv_dlopen_libs=
1935cc4920e5Smrg    lt_cv_dlopen_self=yes
1936cc4920e5Smrg    ;;
1937cc4920e5Smrg
1938cc4920e5Smrg  mingw* | pw32* | cegcc*)
1939cc4920e5Smrg    lt_cv_dlopen=LoadLibrary
1940cc4920e5Smrg    lt_cv_dlopen_libs=
1941cc4920e5Smrg    ;;
1942cc4920e5Smrg
1943cc4920e5Smrg  cygwin*)
1944cc4920e5Smrg    lt_cv_dlopen=dlopen
1945cc4920e5Smrg    lt_cv_dlopen_libs=
1946cc4920e5Smrg    ;;
1947cc4920e5Smrg
1948cc4920e5Smrg  darwin*)
1949cc4920e5Smrg    # if libdl is installed we need to link against it
1950cc4920e5Smrg    AC_CHECK_LIB([dl], [dlopen],
1951cc4920e5Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1952cc4920e5Smrg    lt_cv_dlopen=dyld
1953cc4920e5Smrg    lt_cv_dlopen_libs=
1954cc4920e5Smrg    lt_cv_dlopen_self=yes
1955cc4920e5Smrg    ])
1956cc4920e5Smrg    ;;
1957cc4920e5Smrg
1958cc4920e5Smrg  tpf*)
1959cc4920e5Smrg    # Don't try to run any link tests for TPF.  We know it's impossible
1960cc4920e5Smrg    # because TPF is a cross-compiler, and we know how we open DSOs.
1961cc4920e5Smrg    lt_cv_dlopen=dlopen
1962cc4920e5Smrg    lt_cv_dlopen_libs=
1963cc4920e5Smrg    lt_cv_dlopen_self=no
1964cc4920e5Smrg    ;;
1965cc4920e5Smrg
1966cc4920e5Smrg  *)
1967cc4920e5Smrg    AC_CHECK_FUNC([shl_load],
1968cc4920e5Smrg	  [lt_cv_dlopen=shl_load],
1969cc4920e5Smrg      [AC_CHECK_LIB([dld], [shl_load],
1970cc4920e5Smrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1971cc4920e5Smrg	[AC_CHECK_FUNC([dlopen],
1972cc4920e5Smrg	      [lt_cv_dlopen=dlopen],
1973cc4920e5Smrg	  [AC_CHECK_LIB([dl], [dlopen],
1974cc4920e5Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1975cc4920e5Smrg	    [AC_CHECK_LIB([svld], [dlopen],
1976cc4920e5Smrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1977cc4920e5Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1978cc4920e5Smrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1979cc4920e5Smrg	      ])
1980cc4920e5Smrg	    ])
1981cc4920e5Smrg	  ])
1982cc4920e5Smrg	])
1983cc4920e5Smrg      ])
1984cc4920e5Smrg    ;;
1985cc4920e5Smrg  esac
1986cc4920e5Smrg
1987cc4920e5Smrg  if test no = "$lt_cv_dlopen"; then
1988cc4920e5Smrg    enable_dlopen=no
1989cc4920e5Smrg  else
1990cc4920e5Smrg    enable_dlopen=yes
1991cc4920e5Smrg  fi
1992cc4920e5Smrg
1993cc4920e5Smrg  case $lt_cv_dlopen in
1994cc4920e5Smrg  dlopen)
1995cc4920e5Smrg    save_CPPFLAGS=$CPPFLAGS
1996cc4920e5Smrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1997cc4920e5Smrg
1998cc4920e5Smrg    save_LDFLAGS=$LDFLAGS
1999cc4920e5Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2000cc4920e5Smrg
2001cc4920e5Smrg    save_LIBS=$LIBS
2002cc4920e5Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2003cc4920e5Smrg
2004cc4920e5Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2005cc4920e5Smrg	  lt_cv_dlopen_self, [dnl
2006cc4920e5Smrg	  _LT_TRY_DLOPEN_SELF(
2007cc4920e5Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2008cc4920e5Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2009cc4920e5Smrg    ])
2010cc4920e5Smrg
2011cc4920e5Smrg    if test yes = "$lt_cv_dlopen_self"; then
2012cc4920e5Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2013cc4920e5Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2014cc4920e5Smrg	  lt_cv_dlopen_self_static, [dnl
2015cc4920e5Smrg	  _LT_TRY_DLOPEN_SELF(
2016cc4920e5Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2017cc4920e5Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2018cc4920e5Smrg      ])
2019cc4920e5Smrg    fi
2020cc4920e5Smrg
2021cc4920e5Smrg    CPPFLAGS=$save_CPPFLAGS
2022cc4920e5Smrg    LDFLAGS=$save_LDFLAGS
2023cc4920e5Smrg    LIBS=$save_LIBS
2024cc4920e5Smrg    ;;
2025cc4920e5Smrg  esac
2026cc4920e5Smrg
2027cc4920e5Smrg  case $lt_cv_dlopen_self in
2028cc4920e5Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2029cc4920e5Smrg  *) enable_dlopen_self=unknown ;;
2030cc4920e5Smrg  esac
2031cc4920e5Smrg
2032cc4920e5Smrg  case $lt_cv_dlopen_self_static in
2033cc4920e5Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2034cc4920e5Smrg  *) enable_dlopen_self_static=unknown ;;
2035cc4920e5Smrg  esac
2036cc4920e5Smrgfi
2037cc4920e5Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
2038cc4920e5Smrg	 [Whether dlopen is supported])
2039cc4920e5Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2040cc4920e5Smrg	 [Whether dlopen of programs is supported])
2041cc4920e5Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2042cc4920e5Smrg	 [Whether dlopen of statically linked programs is supported])
2043cc4920e5Smrg])# LT_SYS_DLOPEN_SELF
2044cc4920e5Smrg
2045cc4920e5Smrg# Old name:
2046cc4920e5SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2047cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
2048cc4920e5Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2049cc4920e5Smrg
2050cc4920e5Smrg
2051cc4920e5Smrg# _LT_COMPILER_C_O([TAGNAME])
2052cc4920e5Smrg# ---------------------------
2053cc4920e5Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
2054cc4920e5Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2055cc4920e5Smrgm4_defun([_LT_COMPILER_C_O],
2056cc4920e5Smrg[m4_require([_LT_DECL_SED])dnl
2057cc4920e5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2058cc4920e5Smrgm4_require([_LT_TAG_COMPILER])dnl
2059cc4920e5SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2060cc4920e5Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2061cc4920e5Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2062cc4920e5Smrg   $RM -r conftest 2>/dev/null
2063cc4920e5Smrg   mkdir conftest
2064cc4920e5Smrg   cd conftest
2065cc4920e5Smrg   mkdir out
2066cc4920e5Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2067cc4920e5Smrg
2068cc4920e5Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2069cc4920e5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
2070cc4920e5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
2071cc4920e5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
2072cc4920e5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2073cc4920e5Smrg   lt_compile=`echo "$ac_compile" | $SED \
2074cc4920e5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2075cc4920e5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2076cc4920e5Smrg   -e 's:$: $lt_compiler_flag:'`
2077cc4920e5Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2078cc4920e5Smrg   (eval "$lt_compile" 2>out/conftest.err)
2079cc4920e5Smrg   ac_status=$?
2080cc4920e5Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2081cc4920e5Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2082cc4920e5Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2083cc4920e5Smrg   then
2084cc4920e5Smrg     # The compiler can only warn and ignore the option if not recognized
2085cc4920e5Smrg     # So say no if there are warnings
2086cc4920e5Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2087cc4920e5Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2088cc4920e5Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2089cc4920e5Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2090cc4920e5Smrg     fi
2091cc4920e5Smrg   fi
2092cc4920e5Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2093cc4920e5Smrg   $RM conftest*
2094cc4920e5Smrg   # SGI C++ compiler will create directory out/ii_files/ for
2095cc4920e5Smrg   # template instantiation
2096cc4920e5Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2097cc4920e5Smrg   $RM out/* && rmdir out
2098cc4920e5Smrg   cd ..
2099cc4920e5Smrg   $RM -r conftest
2100cc4920e5Smrg   $RM conftest*
2101cc4920e5Smrg])
2102cc4920e5Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2103cc4920e5Smrg	[Does compiler simultaneously support -c and -o options?])
2104cc4920e5Smrg])# _LT_COMPILER_C_O
2105cc4920e5Smrg
2106cc4920e5Smrg
2107cc4920e5Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2108cc4920e5Smrg# ----------------------------------
2109cc4920e5Smrg# Check to see if we can do hard links to lock some files if needed
2110cc4920e5Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
2111cc4920e5Smrg[m4_require([_LT_ENABLE_LOCK])dnl
2112cc4920e5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2113cc4920e5Smrg_LT_COMPILER_C_O([$1])
2114cc4920e5Smrg
2115cc4920e5Smrghard_links=nottested
2116cc4920e5Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2117cc4920e5Smrg  # do not overwrite the value of need_locks provided by the user
2118cc4920e5Smrg  AC_MSG_CHECKING([if we can lock with hard links])
2119cc4920e5Smrg  hard_links=yes
2120cc4920e5Smrg  $RM conftest*
2121cc4920e5Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2122cc4920e5Smrg  touch conftest.a
2123cc4920e5Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2124cc4920e5Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2125cc4920e5Smrg  AC_MSG_RESULT([$hard_links])
2126cc4920e5Smrg  if test no = "$hard_links"; then
2127cc4920e5Smrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2128cc4920e5Smrg    need_locks=warn
2129cc4920e5Smrg  fi
2130cc4920e5Smrgelse
2131cc4920e5Smrg  need_locks=no
2132cc4920e5Smrgfi
2133cc4920e5Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2134cc4920e5Smrg])# _LT_COMPILER_FILE_LOCKS
2135cc4920e5Smrg
2136cc4920e5Smrg
2137cc4920e5Smrg# _LT_CHECK_OBJDIR
2138cc4920e5Smrg# ----------------
2139cc4920e5Smrgm4_defun([_LT_CHECK_OBJDIR],
2140cc4920e5Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2141cc4920e5Smrg[rm -f .libs 2>/dev/null
2142cc4920e5Smrgmkdir .libs 2>/dev/null
2143cc4920e5Smrgif test -d .libs; then
2144cc4920e5Smrg  lt_cv_objdir=.libs
2145cc4920e5Smrgelse
2146cc4920e5Smrg  # MS-DOS does not allow filenames that begin with a dot.
2147cc4920e5Smrg  lt_cv_objdir=_libs
2148cc4920e5Smrgfi
2149cc4920e5Smrgrmdir .libs 2>/dev/null])
2150cc4920e5Smrgobjdir=$lt_cv_objdir
2151cc4920e5Smrg_LT_DECL([], [objdir], [0],
2152cc4920e5Smrg         [The name of the directory that contains temporary libtool files])dnl
2153cc4920e5Smrgm4_pattern_allow([LT_OBJDIR])dnl
2154cc4920e5SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2155cc4920e5Smrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
2156cc4920e5Smrg])# _LT_CHECK_OBJDIR
2157cc4920e5Smrg
2158cc4920e5Smrg
2159cc4920e5Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2160cc4920e5Smrg# --------------------------------------
2161cc4920e5Smrg# Check hardcoding attributes.
2162cc4920e5Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2163cc4920e5Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2164cc4920e5Smrg_LT_TAGVAR(hardcode_action, $1)=
2165cc4920e5Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2166cc4920e5Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2167cc4920e5Smrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2168cc4920e5Smrg
2169cc4920e5Smrg  # We can hardcode non-existent directories.
2170cc4920e5Smrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2171cc4920e5Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2172cc4920e5Smrg     # have to relink, otherwise we might link with an installed library
2173cc4920e5Smrg     # when we should be linking with a yet-to-be-installed one
2174cc4920e5Smrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2175cc4920e5Smrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2176cc4920e5Smrg    # Linking always hardcodes the temporary library directory.
2177cc4920e5Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
2178cc4920e5Smrg  else
2179cc4920e5Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2180cc4920e5Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
2181cc4920e5Smrg  fi
2182cc4920e5Smrgelse
2183cc4920e5Smrg  # We cannot hardcode anything, or else we can only hardcode existing
2184cc4920e5Smrg  # directories.
2185cc4920e5Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
2186cc4920e5Smrgfi
2187cc4920e5SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2188cc4920e5Smrg
2189cc4920e5Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2190cc4920e5Smrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2191cc4920e5Smrg  # Fast installation is not supported
2192cc4920e5Smrg  enable_fast_install=no
2193cc4920e5Smrgelif test yes = "$shlibpath_overrides_runpath" ||
2194cc4920e5Smrg     test no = "$enable_shared"; then
2195cc4920e5Smrg  # Fast installation is not necessary
2196cc4920e5Smrg  enable_fast_install=needless
2197cc4920e5Smrgfi
2198cc4920e5Smrg_LT_TAGDECL([], [hardcode_action], [0],
2199cc4920e5Smrg    [How to hardcode a shared library path into an executable])
2200cc4920e5Smrg])# _LT_LINKER_HARDCODE_LIBPATH
2201cc4920e5Smrg
2202cc4920e5Smrg
2203cc4920e5Smrg# _LT_CMD_STRIPLIB
2204cc4920e5Smrg# ----------------
2205cc4920e5Smrgm4_defun([_LT_CMD_STRIPLIB],
2206cc4920e5Smrg[m4_require([_LT_DECL_EGREP])
2207cc4920e5Smrgstriplib=
2208cc4920e5Smrgold_striplib=
2209cc4920e5SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2210cc4920e5Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2211cc4920e5Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2212cc4920e5Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2213cc4920e5Smrg  AC_MSG_RESULT([yes])
2214cc4920e5Smrgelse
2215cc4920e5Smrg# FIXME - insert some real tests, host_os isn't really good enough
2216cc4920e5Smrg  case $host_os in
2217cc4920e5Smrg  darwin*)
2218cc4920e5Smrg    if test -n "$STRIP"; then
2219cc4920e5Smrg      striplib="$STRIP -x"
2220cc4920e5Smrg      old_striplib="$STRIP -S"
2221cc4920e5Smrg      AC_MSG_RESULT([yes])
2222cc4920e5Smrg    else
2223cc4920e5Smrg      AC_MSG_RESULT([no])
2224cc4920e5Smrg    fi
2225cc4920e5Smrg    ;;
2226cc4920e5Smrg  *)
2227cc4920e5Smrg    AC_MSG_RESULT([no])
2228cc4920e5Smrg    ;;
2229cc4920e5Smrg  esac
2230cc4920e5Smrgfi
2231cc4920e5Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2232cc4920e5Smrg_LT_DECL([], [striplib], [1])
2233cc4920e5Smrg])# _LT_CMD_STRIPLIB
2234cc4920e5Smrg
2235cc4920e5Smrg
2236cc4920e5Smrg# _LT_PREPARE_MUNGE_PATH_LIST
2237cc4920e5Smrg# ---------------------------
2238cc4920e5Smrg# Make sure func_munge_path_list() is defined correctly.
2239cc4920e5Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2240cc4920e5Smrg[[# func_munge_path_list VARIABLE PATH
2241cc4920e5Smrg# -----------------------------------
2242cc4920e5Smrg# VARIABLE is name of variable containing _space_ separated list of
2243cc4920e5Smrg# directories to be munged by the contents of PATH, which is string
2244cc4920e5Smrg# having a format:
2245cc4920e5Smrg# "DIR[:DIR]:"
2246cc4920e5Smrg#       string "DIR[ DIR]" will be prepended to VARIABLE
2247cc4920e5Smrg# ":DIR[:DIR]"
2248cc4920e5Smrg#       string "DIR[ DIR]" will be appended to VARIABLE
2249cc4920e5Smrg# "DIRP[:DIRP]::[DIRA:]DIRA"
2250cc4920e5Smrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2251cc4920e5Smrg#       "DIRA[ DIRA]" will be appended to VARIABLE
2252cc4920e5Smrg# "DIR[:DIR]"
2253cc4920e5Smrg#       VARIABLE will be replaced by "DIR[ DIR]"
2254cc4920e5Smrgfunc_munge_path_list ()
2255cc4920e5Smrg{
2256cc4920e5Smrg    case x@S|@2 in
2257cc4920e5Smrg    x)
2258cc4920e5Smrg        ;;
2259cc4920e5Smrg    *:)
2260cc4920e5Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2261cc4920e5Smrg        ;;
2262cc4920e5Smrg    x:*)
2263cc4920e5Smrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2264cc4920e5Smrg        ;;
2265cc4920e5Smrg    *::*)
2266cc4920e5Smrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2267cc4920e5Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2268cc4920e5Smrg        ;;
2269cc4920e5Smrg    *)
2270cc4920e5Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2271cc4920e5Smrg        ;;
2272cc4920e5Smrg    esac
2273cc4920e5Smrg}
2274cc4920e5Smrg]])# _LT_PREPARE_PATH_LIST
2275cc4920e5Smrg
2276cc4920e5Smrg
2277cc4920e5Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2278cc4920e5Smrg# -----------------------------
2279cc4920e5Smrg# PORTME Fill in your ld.so characteristics
2280cc4920e5Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2281cc4920e5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2282cc4920e5Smrgm4_require([_LT_DECL_EGREP])dnl
2283cc4920e5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2284cc4920e5Smrgm4_require([_LT_DECL_OBJDUMP])dnl
2285cc4920e5Smrgm4_require([_LT_DECL_SED])dnl
2286cc4920e5Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2287cc4920e5Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2288cc4920e5SmrgAC_MSG_CHECKING([dynamic linker characteristics])
2289cc4920e5Smrgm4_if([$1],
2290cc4920e5Smrg	[], [
2291cc4920e5Smrgif test yes = "$GCC"; then
2292cc4920e5Smrg  case $host_os in
2293cc4920e5Smrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2294cc4920e5Smrg    *) lt_awk_arg='/^libraries:/' ;;
2295cc4920e5Smrg  esac
2296cc4920e5Smrg  case $host_os in
2297cc4920e5Smrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2298cc4920e5Smrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
2299cc4920e5Smrg  esac
2300cc4920e5Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2301cc4920e5Smrg  case $lt_search_path_spec in
2302cc4920e5Smrg  *\;*)
2303cc4920e5Smrg    # if the path contains ";" then we assume it to be the separator
2304cc4920e5Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
2305cc4920e5Smrg    # assumed that no part of a normal pathname contains ";" but that should
2306cc4920e5Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
2307cc4920e5Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2308cc4920e5Smrg    ;;
2309cc4920e5Smrg  *)
2310cc4920e5Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2311cc4920e5Smrg    ;;
2312cc4920e5Smrg  esac
2313cc4920e5Smrg  # Ok, now we have the path, separated by spaces, we can step through it
2314cc4920e5Smrg  # and add multilib dir if necessary...
2315cc4920e5Smrg  lt_tmp_lt_search_path_spec=
2316cc4920e5Smrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2317cc4920e5Smrg  # ...but if some path component already ends with the multilib dir we assume
2318cc4920e5Smrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2319cc4920e5Smrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
2320cc4920e5Smrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2321cc4920e5Smrg    lt_multi_os_dir=
2322cc4920e5Smrg    ;;
2323cc4920e5Smrg  esac
2324cc4920e5Smrg  for lt_sys_path in $lt_search_path_spec; do
2325cc4920e5Smrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2326cc4920e5Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2327cc4920e5Smrg    elif test -n "$lt_multi_os_dir"; then
2328cc4920e5Smrg      test -d "$lt_sys_path" && \
2329cc4920e5Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2330cc4920e5Smrg    fi
2331cc4920e5Smrg  done
2332cc4920e5Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2333cc4920e5SmrgBEGIN {RS = " "; FS = "/|\n";} {
2334cc4920e5Smrg  lt_foo = "";
2335cc4920e5Smrg  lt_count = 0;
2336cc4920e5Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2337cc4920e5Smrg    if ($lt_i != "" && $lt_i != ".") {
2338cc4920e5Smrg      if ($lt_i == "..") {
2339cc4920e5Smrg        lt_count++;
2340cc4920e5Smrg      } else {
2341cc4920e5Smrg        if (lt_count == 0) {
2342cc4920e5Smrg          lt_foo = "/" $lt_i lt_foo;
2343cc4920e5Smrg        } else {
2344cc4920e5Smrg          lt_count--;
2345cc4920e5Smrg        }
2346cc4920e5Smrg      }
2347cc4920e5Smrg    }
2348cc4920e5Smrg  }
2349cc4920e5Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2350cc4920e5Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2351cc4920e5Smrg}'`
2352cc4920e5Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
2353cc4920e5Smrg  # for these hosts.
2354cc4920e5Smrg  case $host_os in
2355cc4920e5Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2356cc4920e5Smrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2357cc4920e5Smrg  esac
2358cc4920e5Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2359cc4920e5Smrgelse
2360cc4920e5Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2361cc4920e5Smrgfi])
2362cc4920e5Smrglibrary_names_spec=
2363cc4920e5Smrglibname_spec='lib$name'
2364cc4920e5Smrgsoname_spec=
2365cc4920e5Smrgshrext_cmds=.so
2366cc4920e5Smrgpostinstall_cmds=
2367cc4920e5Smrgpostuninstall_cmds=
2368cc4920e5Smrgfinish_cmds=
2369cc4920e5Smrgfinish_eval=
2370cc4920e5Smrgshlibpath_var=
2371cc4920e5Smrgshlibpath_overrides_runpath=unknown
2372cc4920e5Smrgversion_type=none
2373cc4920e5Smrgdynamic_linker="$host_os ld.so"
2374cc4920e5Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2375cc4920e5Smrgneed_lib_prefix=unknown
2376cc4920e5Smrghardcode_into_libs=no
2377cc4920e5Smrg
2378cc4920e5Smrg# when you set need_version to no, make sure it does not cause -set_version
2379cc4920e5Smrg# flags to be left without arguments
2380cc4920e5Smrgneed_version=unknown
2381cc4920e5Smrg
2382cc4920e5SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2383cc4920e5Smrg[User-defined run-time library search path.])
2384cc4920e5Smrg
2385cc4920e5Smrgcase $host_os in
2386cc4920e5Smrgaix3*)
2387cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2388cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2389cc4920e5Smrg  shlibpath_var=LIBPATH
2390cc4920e5Smrg
2391cc4920e5Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
2392cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2393cc4920e5Smrg  ;;
2394cc4920e5Smrg
2395cc4920e5Smrgaix[[4-9]]*)
2396cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2397cc4920e5Smrg  need_lib_prefix=no
2398cc4920e5Smrg  need_version=no
2399cc4920e5Smrg  hardcode_into_libs=yes
2400cc4920e5Smrg  if test ia64 = "$host_cpu"; then
2401cc4920e5Smrg    # AIX 5 supports IA64
2402cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2403cc4920e5Smrg    shlibpath_var=LD_LIBRARY_PATH
2404cc4920e5Smrg  else
2405cc4920e5Smrg    # With GCC up to 2.95.x, collect2 would create an import file
2406cc4920e5Smrg    # for dependence libraries.  The import file would start with
2407cc4920e5Smrg    # the line '#! .'.  This would cause the generated library to
2408cc4920e5Smrg    # depend on '.', always an invalid library.  This was fixed in
2409cc4920e5Smrg    # development snapshots of GCC prior to 3.0.
2410cc4920e5Smrg    case $host_os in
2411cc4920e5Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2412cc4920e5Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2413cc4920e5Smrg	   echo ' yes '
2414cc4920e5Smrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2415cc4920e5Smrg	:
2416cc4920e5Smrg      else
2417cc4920e5Smrg	can_build_shared=no
2418cc4920e5Smrg      fi
2419cc4920e5Smrg      ;;
2420cc4920e5Smrg    esac
2421cc4920e5Smrg    # Using Import Files as archive members, it is possible to support
2422cc4920e5Smrg    # filename-based versioning of shared library archives on AIX. While
2423cc4920e5Smrg    # this would work for both with and without runtime linking, it will
2424cc4920e5Smrg    # prevent static linking of such archives. So we do filename-based
2425cc4920e5Smrg    # shared library versioning with .so extension only, which is used
2426cc4920e5Smrg    # when both runtime linking and shared linking is enabled.
2427cc4920e5Smrg    # Unfortunately, runtime linking may impact performance, so we do
2428cc4920e5Smrg    # not want this to be the default eventually. Also, we use the
2429cc4920e5Smrg    # versioned .so libs for executables only if there is the -brtl
2430cc4920e5Smrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2431cc4920e5Smrg    # To allow for filename-based versioning support, we need to create
2432cc4920e5Smrg    # libNAME.so.V as an archive file, containing:
2433cc4920e5Smrg    # *) an Import File, referring to the versioned filename of the
2434cc4920e5Smrg    #    archive as well as the shared archive member, telling the
2435cc4920e5Smrg    #    bitwidth (32 or 64) of that shared object, and providing the
2436cc4920e5Smrg    #    list of exported symbols of that shared object, eventually
2437cc4920e5Smrg    #    decorated with the 'weak' keyword
2438cc4920e5Smrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
2439cc4920e5Smrg    #    it being seen by the linker.
2440cc4920e5Smrg    # At run time we better use the real file rather than another symlink,
2441cc4920e5Smrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2442cc4920e5Smrg
2443cc4920e5Smrg    case $with_aix_soname,$aix_use_runtimelinking in
2444cc4920e5Smrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2445cc4920e5Smrg    # soname into executable. Probably we can add versioning support to
2446cc4920e5Smrg    # collect2, so additional links can be useful in future.
2447cc4920e5Smrg    aix,yes) # traditional libtool
2448cc4920e5Smrg      dynamic_linker='AIX unversionable lib.so'
2449cc4920e5Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2450cc4920e5Smrg      # instead of lib<name>.a to let people know that these are not
2451cc4920e5Smrg      # typical AIX shared libraries.
2452cc4920e5Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2453cc4920e5Smrg      ;;
2454cc4920e5Smrg    aix,no) # traditional AIX only
2455cc4920e5Smrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2456cc4920e5Smrg      # We preserve .a as extension for shared libraries through AIX4.2
2457cc4920e5Smrg      # and later when we are not doing run time linking.
2458cc4920e5Smrg      library_names_spec='$libname$release.a $libname.a'
2459cc4920e5Smrg      soname_spec='$libname$release$shared_ext$major'
2460cc4920e5Smrg      ;;
2461cc4920e5Smrg    svr4,*) # full svr4 only
2462cc4920e5Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2463cc4920e5Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2464cc4920e5Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
2465cc4920e5Smrg      shlibpath_overrides_runpath=yes
2466cc4920e5Smrg      ;;
2467cc4920e5Smrg    *,yes) # both, prefer svr4
2468cc4920e5Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2469cc4920e5Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2470cc4920e5Smrg      # unpreferred sharedlib libNAME.a needs extra handling
2471cc4920e5Smrg      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2472cc4920e5Smrg      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2473cc4920e5Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
2474cc4920e5Smrg      shlibpath_overrides_runpath=yes
2475cc4920e5Smrg      ;;
2476cc4920e5Smrg    *,no) # both, prefer aix
2477cc4920e5Smrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2478cc4920e5Smrg      library_names_spec='$libname$release.a $libname.a'
2479cc4920e5Smrg      soname_spec='$libname$release$shared_ext$major'
2480cc4920e5Smrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2481cc4920e5Smrg      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2482cc4920e5Smrg      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2483cc4920e5Smrg      ;;
2484cc4920e5Smrg    esac
2485cc4920e5Smrg    shlibpath_var=LIBPATH
2486cc4920e5Smrg  fi
2487cc4920e5Smrg  ;;
2488cc4920e5Smrg
2489cc4920e5Smrgamigaos*)
2490cc4920e5Smrg  case $host_cpu in
2491cc4920e5Smrg  powerpc)
2492cc4920e5Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2493cc4920e5Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2494cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2495cc4920e5Smrg    ;;
2496cc4920e5Smrg  m68k)
2497cc4920e5Smrg    library_names_spec='$libname.ixlibrary $libname.a'
2498cc4920e5Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2499cc4920e5Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2500cc4920e5Smrg    ;;
2501cc4920e5Smrg  esac
2502cc4920e5Smrg  ;;
2503cc4920e5Smrg
2504cc4920e5Smrgbeos*)
2505cc4920e5Smrg  library_names_spec='$libname$shared_ext'
2506cc4920e5Smrg  dynamic_linker="$host_os ld.so"
2507cc4920e5Smrg  shlibpath_var=LIBRARY_PATH
2508cc4920e5Smrg  ;;
2509cc4920e5Smrg
2510cc4920e5Smrgbsdi[[45]]*)
2511cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2512cc4920e5Smrg  need_version=no
2513cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2514cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2515cc4920e5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2516cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2517cc4920e5Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2518cc4920e5Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2519cc4920e5Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
2520cc4920e5Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2521cc4920e5Smrg  # libtool to hard-code these into programs
2522cc4920e5Smrg  ;;
2523cc4920e5Smrg
2524cc4920e5Smrgcygwin* | mingw* | pw32* | cegcc*)
2525cc4920e5Smrg  version_type=windows
2526cc4920e5Smrg  shrext_cmds=.dll
2527cc4920e5Smrg  need_version=no
2528cc4920e5Smrg  need_lib_prefix=no
2529cc4920e5Smrg
2530cc4920e5Smrg  case $GCC,$cc_basename in
2531cc4920e5Smrg  yes,*)
2532cc4920e5Smrg    # gcc
2533cc4920e5Smrg    library_names_spec='$libname.dll.a'
2534cc4920e5Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2535cc4920e5Smrg    postinstall_cmds='base_file=`basename \$file`~
2536cc4920e5Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2537cc4920e5Smrg      dldir=$destdir/`dirname \$dlpath`~
2538cc4920e5Smrg      test -d \$dldir || mkdir -p \$dldir~
2539cc4920e5Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
2540cc4920e5Smrg      chmod a+x \$dldir/$dlname~
2541cc4920e5Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2542cc4920e5Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2543cc4920e5Smrg      fi'
2544cc4920e5Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2545cc4920e5Smrg      dlpath=$dir/\$dldll~
2546cc4920e5Smrg       $RM \$dlpath'
2547cc4920e5Smrg    shlibpath_overrides_runpath=yes
2548cc4920e5Smrg
2549cc4920e5Smrg    case $host_os in
2550cc4920e5Smrg    cygwin*)
2551cc4920e5Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2552cc4920e5Smrg      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2553cc4920e5Smrgm4_if([$1], [],[
2554cc4920e5Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2555cc4920e5Smrg      ;;
2556cc4920e5Smrg    mingw* | cegcc*)
2557cc4920e5Smrg      # MinGW DLLs use traditional 'lib' prefix
2558cc4920e5Smrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2559cc4920e5Smrg      ;;
2560cc4920e5Smrg    pw32*)
2561cc4920e5Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2562cc4920e5Smrg      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2563cc4920e5Smrg      ;;
2564cc4920e5Smrg    esac
2565cc4920e5Smrg    dynamic_linker='Win32 ld.exe'
2566cc4920e5Smrg    ;;
2567cc4920e5Smrg
2568cc4920e5Smrg  *,cl*)
2569cc4920e5Smrg    # Native MSVC
2570cc4920e5Smrg    libname_spec='$name'
2571cc4920e5Smrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572cc4920e5Smrg    library_names_spec='$libname.dll.lib'
2573cc4920e5Smrg
2574cc4920e5Smrg    case $build_os in
2575cc4920e5Smrg    mingw*)
2576cc4920e5Smrg      sys_lib_search_path_spec=
2577cc4920e5Smrg      lt_save_ifs=$IFS
2578cc4920e5Smrg      IFS=';'
2579cc4920e5Smrg      for lt_path in $LIB
2580cc4920e5Smrg      do
2581cc4920e5Smrg        IFS=$lt_save_ifs
2582cc4920e5Smrg        # Let DOS variable expansion print the short 8.3 style file name.
2583cc4920e5Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2584cc4920e5Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2585cc4920e5Smrg      done
2586cc4920e5Smrg      IFS=$lt_save_ifs
2587cc4920e5Smrg      # Convert to MSYS style.
2588cc4920e5Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2589cc4920e5Smrg      ;;
2590cc4920e5Smrg    cygwin*)
2591cc4920e5Smrg      # Convert to unix form, then to dos form, then back to unix form
2592cc4920e5Smrg      # but this time dos style (no spaces!) so that the unix form looks
2593cc4920e5Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
2594cc4920e5Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2595cc4920e5Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2596cc4920e5Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2597cc4920e5Smrg      ;;
2598cc4920e5Smrg    *)
2599cc4920e5Smrg      sys_lib_search_path_spec=$LIB
2600cc4920e5Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2601cc4920e5Smrg        # It is most probably a Windows format PATH.
2602cc4920e5Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2603cc4920e5Smrg      else
2604cc4920e5Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2605cc4920e5Smrg      fi
2606cc4920e5Smrg      # FIXME: find the short name or the path components, as spaces are
2607cc4920e5Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
2608cc4920e5Smrg      ;;
2609cc4920e5Smrg    esac
2610cc4920e5Smrg
2611cc4920e5Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2612cc4920e5Smrg    postinstall_cmds='base_file=`basename \$file`~
2613cc4920e5Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2614cc4920e5Smrg      dldir=$destdir/`dirname \$dlpath`~
2615cc4920e5Smrg      test -d \$dldir || mkdir -p \$dldir~
2616cc4920e5Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
2617cc4920e5Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2618cc4920e5Smrg      dlpath=$dir/\$dldll~
2619cc4920e5Smrg       $RM \$dlpath'
2620cc4920e5Smrg    shlibpath_overrides_runpath=yes
2621cc4920e5Smrg    dynamic_linker='Win32 link.exe'
2622cc4920e5Smrg    ;;
2623cc4920e5Smrg
2624cc4920e5Smrg  *)
2625cc4920e5Smrg    # Assume MSVC wrapper
2626cc4920e5Smrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2627cc4920e5Smrg    dynamic_linker='Win32 ld.exe'
2628cc4920e5Smrg    ;;
2629cc4920e5Smrg  esac
2630cc4920e5Smrg  # FIXME: first we should search . and the directory the executable is in
2631cc4920e5Smrg  shlibpath_var=PATH
2632cc4920e5Smrg  ;;
2633cc4920e5Smrg
2634cc4920e5Smrgdarwin* | rhapsody*)
2635cc4920e5Smrg  dynamic_linker="$host_os dyld"
2636cc4920e5Smrg  version_type=darwin
2637cc4920e5Smrg  need_lib_prefix=no
2638cc4920e5Smrg  need_version=no
2639cc4920e5Smrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2640cc4920e5Smrg  soname_spec='$libname$release$major$shared_ext'
2641cc4920e5Smrg  shlibpath_overrides_runpath=yes
2642cc4920e5Smrg  shlibpath_var=DYLD_LIBRARY_PATH
2643cc4920e5Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2644cc4920e5Smrgm4_if([$1], [],[
2645cc4920e5Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2646cc4920e5Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2647cc4920e5Smrg  ;;
2648cc4920e5Smrg
2649cc4920e5Smrgdgux*)
2650cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2651cc4920e5Smrg  need_lib_prefix=no
2652cc4920e5Smrg  need_version=no
2653cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2654cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2655cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2656cc4920e5Smrg  ;;
2657cc4920e5Smrg
2658cc4920e5Smrgfreebsd* | dragonfly*)
2659cc4920e5Smrg  # DragonFly does not have aout.  When/if they implement a new
2660cc4920e5Smrg  # versioning mechanism, adjust this.
2661cc4920e5Smrg  if test -x /usr/bin/objformat; then
2662cc4920e5Smrg    objformat=`/usr/bin/objformat`
2663cc4920e5Smrg  else
2664cc4920e5Smrg    case $host_os in
2665cc4920e5Smrg    freebsd[[23]].*) objformat=aout ;;
2666cc4920e5Smrg    *) objformat=elf ;;
2667cc4920e5Smrg    esac
2668cc4920e5Smrg  fi
2669cc4920e5Smrg  version_type=freebsd-$objformat
2670cc4920e5Smrg  case $version_type in
2671cc4920e5Smrg    freebsd-elf*)
2672cc4920e5Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2673cc4920e5Smrg      soname_spec='$libname$release$shared_ext$major'
2674cc4920e5Smrg      need_version=no
2675cc4920e5Smrg      need_lib_prefix=no
2676cc4920e5Smrg      ;;
2677cc4920e5Smrg    freebsd-*)
2678cc4920e5Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2679cc4920e5Smrg      need_version=yes
2680cc4920e5Smrg      ;;
2681cc4920e5Smrg  esac
2682cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2683cc4920e5Smrg  case $host_os in
2684cc4920e5Smrg  freebsd2.*)
2685cc4920e5Smrg    shlibpath_overrides_runpath=yes
2686cc4920e5Smrg    ;;
2687cc4920e5Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2688cc4920e5Smrg    shlibpath_overrides_runpath=yes
2689cc4920e5Smrg    hardcode_into_libs=yes
2690cc4920e5Smrg    ;;
2691cc4920e5Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2692cc4920e5Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2693cc4920e5Smrg    shlibpath_overrides_runpath=no
2694cc4920e5Smrg    hardcode_into_libs=yes
2695cc4920e5Smrg    ;;
2696cc4920e5Smrg  *) # from 4.6 on, and DragonFly
2697cc4920e5Smrg    shlibpath_overrides_runpath=yes
2698cc4920e5Smrg    hardcode_into_libs=yes
2699cc4920e5Smrg    ;;
2700cc4920e5Smrg  esac
2701cc4920e5Smrg  ;;
2702cc4920e5Smrg
2703cc4920e5Smrghaiku*)
2704cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2705cc4920e5Smrg  need_lib_prefix=no
2706cc4920e5Smrg  need_version=no
2707cc4920e5Smrg  dynamic_linker="$host_os runtime_loader"
2708cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2709cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2710cc4920e5Smrg  shlibpath_var=LIBRARY_PATH
2711cc4920e5Smrg  shlibpath_overrides_runpath=no
2712cc4920e5Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2713cc4920e5Smrg  hardcode_into_libs=yes
2714cc4920e5Smrg  ;;
2715cc4920e5Smrg
2716cc4920e5Smrghpux9* | hpux10* | hpux11*)
2717cc4920e5Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2718cc4920e5Smrg  # link against other versions.
2719cc4920e5Smrg  version_type=sunos
2720cc4920e5Smrg  need_lib_prefix=no
2721cc4920e5Smrg  need_version=no
2722cc4920e5Smrg  case $host_cpu in
2723cc4920e5Smrg  ia64*)
2724cc4920e5Smrg    shrext_cmds='.so'
2725cc4920e5Smrg    hardcode_into_libs=yes
2726cc4920e5Smrg    dynamic_linker="$host_os dld.so"
2727cc4920e5Smrg    shlibpath_var=LD_LIBRARY_PATH
2728cc4920e5Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2729cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2730cc4920e5Smrg    soname_spec='$libname$release$shared_ext$major'
2731cc4920e5Smrg    if test 32 = "$HPUX_IA64_MODE"; then
2732cc4920e5Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2733cc4920e5Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2734cc4920e5Smrg    else
2735cc4920e5Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2736cc4920e5Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2737cc4920e5Smrg    fi
2738cc4920e5Smrg    ;;
2739cc4920e5Smrg  hppa*64*)
2740cc4920e5Smrg    shrext_cmds='.sl'
2741cc4920e5Smrg    hardcode_into_libs=yes
2742cc4920e5Smrg    dynamic_linker="$host_os dld.sl"
2743cc4920e5Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2744cc4920e5Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2745cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2746cc4920e5Smrg    soname_spec='$libname$release$shared_ext$major'
2747cc4920e5Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2748cc4920e5Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2749cc4920e5Smrg    ;;
2750cc4920e5Smrg  *)
2751cc4920e5Smrg    shrext_cmds='.sl'
2752cc4920e5Smrg    dynamic_linker="$host_os dld.sl"
2753cc4920e5Smrg    shlibpath_var=SHLIB_PATH
2754cc4920e5Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2755cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2756cc4920e5Smrg    soname_spec='$libname$release$shared_ext$major'
2757cc4920e5Smrg    ;;
2758cc4920e5Smrg  esac
2759cc4920e5Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2760cc4920e5Smrg  postinstall_cmds='chmod 555 $lib'
2761cc4920e5Smrg  # or fails outright, so override atomically:
2762cc4920e5Smrg  install_override_mode=555
2763cc4920e5Smrg  ;;
2764cc4920e5Smrg
2765cc4920e5Smrginterix[[3-9]]*)
2766cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2767cc4920e5Smrg  need_lib_prefix=no
2768cc4920e5Smrg  need_version=no
2769cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2770cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2771cc4920e5Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2772cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2773cc4920e5Smrg  shlibpath_overrides_runpath=no
2774cc4920e5Smrg  hardcode_into_libs=yes
2775cc4920e5Smrg  ;;
2776cc4920e5Smrg
2777cc4920e5Smrgirix5* | irix6* | nonstopux*)
2778cc4920e5Smrg  case $host_os in
2779cc4920e5Smrg    nonstopux*) version_type=nonstopux ;;
2780cc4920e5Smrg    *)
2781cc4920e5Smrg	if test yes = "$lt_cv_prog_gnu_ld"; then
2782cc4920e5Smrg		version_type=linux # correct to gnu/linux during the next big refactor
2783cc4920e5Smrg	else
2784cc4920e5Smrg		version_type=irix
2785cc4920e5Smrg	fi ;;
2786cc4920e5Smrg  esac
2787cc4920e5Smrg  need_lib_prefix=no
2788cc4920e5Smrg  need_version=no
2789cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2790cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2791cc4920e5Smrg  case $host_os in
2792cc4920e5Smrg  irix5* | nonstopux*)
2793cc4920e5Smrg    libsuff= shlibsuff=
2794cc4920e5Smrg    ;;
2795cc4920e5Smrg  *)
2796cc4920e5Smrg    case $LD in # libtool.m4 will add one of these switches to LD
2797cc4920e5Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2798cc4920e5Smrg      libsuff= shlibsuff= libmagic=32-bit;;
2799cc4920e5Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2800cc4920e5Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2801cc4920e5Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2802cc4920e5Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2803cc4920e5Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
2804cc4920e5Smrg    esac
2805cc4920e5Smrg    ;;
2806cc4920e5Smrg  esac
2807cc4920e5Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2808cc4920e5Smrg  shlibpath_overrides_runpath=no
2809cc4920e5Smrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2810cc4920e5Smrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2811cc4920e5Smrg  hardcode_into_libs=yes
2812cc4920e5Smrg  ;;
2813cc4920e5Smrg
2814cc4920e5Smrg# No shared lib support for Linux oldld, aout, or coff.
2815cc4920e5Smrglinux*oldld* | linux*aout* | linux*coff*)
2816cc4920e5Smrg  dynamic_linker=no
2817cc4920e5Smrg  ;;
2818cc4920e5Smrg
2819cc4920e5Smrglinux*android*)
2820cc4920e5Smrg  version_type=none # Android doesn't support versioned libraries.
2821cc4920e5Smrg  need_lib_prefix=no
2822cc4920e5Smrg  need_version=no
2823cc4920e5Smrg  library_names_spec='$libname$release$shared_ext'
2824cc4920e5Smrg  soname_spec='$libname$release$shared_ext'
2825cc4920e5Smrg  finish_cmds=
2826cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2827cc4920e5Smrg  shlibpath_overrides_runpath=yes
2828cc4920e5Smrg
2829cc4920e5Smrg  # This implies no fast_install, which is unacceptable.
2830cc4920e5Smrg  # Some rework will be needed to allow for fast_install
2831cc4920e5Smrg  # before this can be enabled.
2832cc4920e5Smrg  hardcode_into_libs=yes
2833cc4920e5Smrg
2834cc4920e5Smrg  dynamic_linker='Android linker'
2835cc4920e5Smrg  # Don't embed -rpath directories since the linker doesn't support them.
2836cc4920e5Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2837cc4920e5Smrg  ;;
2838cc4920e5Smrg
2839cc4920e5Smrg# This must be glibc/ELF.
2840cc4920e5Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2841cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2842cc4920e5Smrg  need_lib_prefix=no
2843cc4920e5Smrg  need_version=no
2844cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2845cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2846cc4920e5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2847cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2848cc4920e5Smrg  shlibpath_overrides_runpath=no
2849cc4920e5Smrg
2850cc4920e5Smrg  # Some binutils ld are patched to set DT_RUNPATH
2851cc4920e5Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2852cc4920e5Smrg    [lt_cv_shlibpath_overrides_runpath=no
2853cc4920e5Smrg    save_LDFLAGS=$LDFLAGS
2854cc4920e5Smrg    save_libdir=$libdir
2855cc4920e5Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2856cc4920e5Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2857cc4920e5Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2858cc4920e5Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2859cc4920e5Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
2860cc4920e5Smrg    LDFLAGS=$save_LDFLAGS
2861cc4920e5Smrg    libdir=$save_libdir
2862cc4920e5Smrg    ])
2863cc4920e5Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2864cc4920e5Smrg
2865cc4920e5Smrg  # This implies no fast_install, which is unacceptable.
2866cc4920e5Smrg  # Some rework will be needed to allow for fast_install
2867cc4920e5Smrg  # before this can be enabled.
2868cc4920e5Smrg  hardcode_into_libs=yes
2869cc4920e5Smrg
2870cc4920e5Smrg  # Ideally, we could use ldconfig to report *all* directores which are
2871cc4920e5Smrg  # searched for libraries, however this is still not possible.  Aside from not
2872cc4920e5Smrg  # being certain /sbin/ldconfig is available, command
2873cc4920e5Smrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2874cc4920e5Smrg  # even though it is searched at run-time.  Try to do the best guess by
2875cc4920e5Smrg  # appending ld.so.conf contents (and includes) to the search path.
2876cc4920e5Smrg  if test -f /etc/ld.so.conf; then
2877cc4920e5Smrg    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' ' '`
2878cc4920e5Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2879cc4920e5Smrg  fi
2880cc4920e5Smrg
2881cc4920e5Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2882cc4920e5Smrg  # powerpc, because MkLinux only supported shared libraries with the
2883cc4920e5Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2884cc4920e5Smrg  # most powerpc-linux boxes support dynamic linking these days and
2885cc4920e5Smrg  # people can always --disable-shared, the test was removed, and we
2886cc4920e5Smrg  # assume the GNU/Linux dynamic linker is in use.
2887cc4920e5Smrg  dynamic_linker='GNU/Linux ld.so'
2888cc4920e5Smrg  ;;
2889cc4920e5Smrg
2890cc4920e5Smrgnetbsd*)
2891cc4920e5Smrg  version_type=sunos
2892cc4920e5Smrg  need_lib_prefix=no
2893cc4920e5Smrg  need_version=no
2894cc4920e5Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2895cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2896cc4920e5Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2897cc4920e5Smrg    dynamic_linker='NetBSD (a.out) ld.so'
2898cc4920e5Smrg  else
2899cc4920e5Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2900cc4920e5Smrg    soname_spec='$libname$release$shared_ext$major'
2901cc4920e5Smrg    dynamic_linker='NetBSD ld.elf_so'
2902cc4920e5Smrg  fi
2903cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2904cc4920e5Smrg  shlibpath_overrides_runpath=yes
2905cc4920e5Smrg  hardcode_into_libs=yes
2906cc4920e5Smrg  ;;
2907cc4920e5Smrg
2908cc4920e5Smrgnewsos6)
2909cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2910cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2911cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2912cc4920e5Smrg  shlibpath_overrides_runpath=yes
2913cc4920e5Smrg  ;;
2914cc4920e5Smrg
2915cc4920e5Smrg*nto* | *qnx*)
2916cc4920e5Smrg  version_type=qnx
2917cc4920e5Smrg  need_lib_prefix=no
2918cc4920e5Smrg  need_version=no
2919cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2920cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2921cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2922cc4920e5Smrg  shlibpath_overrides_runpath=no
2923cc4920e5Smrg  hardcode_into_libs=yes
2924cc4920e5Smrg  dynamic_linker='ldqnx.so'
2925cc4920e5Smrg  ;;
2926cc4920e5Smrg
2927cc4920e5Smrgopenbsd* | bitrig*)
2928cc4920e5Smrg  version_type=sunos
2929cc4920e5Smrg  sys_lib_dlsearch_path_spec=/usr/lib
2930cc4920e5Smrg  need_lib_prefix=no
2931cc4920e5Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2932cc4920e5Smrg    need_version=no
2933cc4920e5Smrg  else
2934cc4920e5Smrg    need_version=yes
2935cc4920e5Smrg  fi
2936cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2937cc4920e5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2938cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2939cc4920e5Smrg  shlibpath_overrides_runpath=yes
2940cc4920e5Smrg  ;;
2941cc4920e5Smrg
2942cc4920e5Smrgos2*)
2943cc4920e5Smrg  libname_spec='$name'
2944cc4920e5Smrg  version_type=windows
2945cc4920e5Smrg  shrext_cmds=.dll
2946cc4920e5Smrg  need_version=no
2947cc4920e5Smrg  need_lib_prefix=no
2948cc4920e5Smrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
2949cc4920e5Smrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2950cc4920e5Smrg    v=$($ECHO $release$versuffix | tr -d .-);
2951cc4920e5Smrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2952cc4920e5Smrg    $ECHO $n$v`$shared_ext'
2953cc4920e5Smrg  library_names_spec='${libname}_dll.$libext'
2954cc4920e5Smrg  dynamic_linker='OS/2 ld.exe'
2955cc4920e5Smrg  shlibpath_var=BEGINLIBPATH
2956cc4920e5Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2957cc4920e5Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2958cc4920e5Smrg  postinstall_cmds='base_file=`basename \$file`~
2959cc4920e5Smrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2960cc4920e5Smrg    dldir=$destdir/`dirname \$dlpath`~
2961cc4920e5Smrg    test -d \$dldir || mkdir -p \$dldir~
2962cc4920e5Smrg    $install_prog $dir/$dlname \$dldir/$dlname~
2963cc4920e5Smrg    chmod a+x \$dldir/$dlname~
2964cc4920e5Smrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2965cc4920e5Smrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2966cc4920e5Smrg    fi'
2967cc4920e5Smrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2968cc4920e5Smrg    dlpath=$dir/\$dldll~
2969cc4920e5Smrg    $RM \$dlpath'
2970cc4920e5Smrg  ;;
2971cc4920e5Smrg
2972cc4920e5Smrgosf3* | osf4* | osf5*)
2973cc4920e5Smrg  version_type=osf
2974cc4920e5Smrg  need_lib_prefix=no
2975cc4920e5Smrg  need_version=no
2976cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2977cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2978cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2979cc4920e5Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2980cc4920e5Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2981cc4920e5Smrg  ;;
2982cc4920e5Smrg
2983cc4920e5Smrgrdos*)
2984cc4920e5Smrg  dynamic_linker=no
2985cc4920e5Smrg  ;;
2986cc4920e5Smrg
2987cc4920e5Smrgsolaris*)
2988cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2989cc4920e5Smrg  need_lib_prefix=no
2990cc4920e5Smrg  need_version=no
2991cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2992cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
2993cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
2994cc4920e5Smrg  shlibpath_overrides_runpath=yes
2995cc4920e5Smrg  hardcode_into_libs=yes
2996cc4920e5Smrg  # ldd complains unless libraries are executable
2997cc4920e5Smrg  postinstall_cmds='chmod +x $lib'
2998cc4920e5Smrg  ;;
2999cc4920e5Smrg
3000cc4920e5Smrgsunos4*)
3001cc4920e5Smrg  version_type=sunos
3002cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3003cc4920e5Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3004cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
3005cc4920e5Smrg  shlibpath_overrides_runpath=yes
3006cc4920e5Smrg  if test yes = "$with_gnu_ld"; then
3007cc4920e5Smrg    need_lib_prefix=no
3008cc4920e5Smrg  fi
3009cc4920e5Smrg  need_version=yes
3010cc4920e5Smrg  ;;
3011cc4920e5Smrg
3012cc4920e5Smrgsysv4 | sysv4.3*)
3013cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
3014cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3015cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
3016cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
3017cc4920e5Smrg  case $host_vendor in
3018cc4920e5Smrg    sni)
3019cc4920e5Smrg      shlibpath_overrides_runpath=no
3020cc4920e5Smrg      need_lib_prefix=no
3021cc4920e5Smrg      runpath_var=LD_RUN_PATH
3022cc4920e5Smrg      ;;
3023cc4920e5Smrg    siemens)
3024cc4920e5Smrg      need_lib_prefix=no
3025cc4920e5Smrg      ;;
3026cc4920e5Smrg    motorola)
3027cc4920e5Smrg      need_lib_prefix=no
3028cc4920e5Smrg      need_version=no
3029cc4920e5Smrg      shlibpath_overrides_runpath=no
3030cc4920e5Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3031cc4920e5Smrg      ;;
3032cc4920e5Smrg  esac
3033cc4920e5Smrg  ;;
3034cc4920e5Smrg
3035cc4920e5Smrgsysv4*MP*)
3036cc4920e5Smrg  if test -d /usr/nec; then
3037cc4920e5Smrg    version_type=linux # correct to gnu/linux during the next big refactor
3038cc4920e5Smrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3039cc4920e5Smrg    soname_spec='$libname$shared_ext.$major'
3040cc4920e5Smrg    shlibpath_var=LD_LIBRARY_PATH
3041cc4920e5Smrg  fi
3042cc4920e5Smrg  ;;
3043cc4920e5Smrg
3044cc4920e5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3045cc4920e5Smrg  version_type=sco
3046cc4920e5Smrg  need_lib_prefix=no
3047cc4920e5Smrg  need_version=no
3048cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3049cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
3050cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
3051cc4920e5Smrg  shlibpath_overrides_runpath=yes
3052cc4920e5Smrg  hardcode_into_libs=yes
3053cc4920e5Smrg  if test yes = "$with_gnu_ld"; then
3054cc4920e5Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3055cc4920e5Smrg  else
3056cc4920e5Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3057cc4920e5Smrg    case $host_os in
3058cc4920e5Smrg      sco3.2v5*)
3059cc4920e5Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3060cc4920e5Smrg	;;
3061cc4920e5Smrg    esac
3062cc4920e5Smrg  fi
3063cc4920e5Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
3064cc4920e5Smrg  ;;
3065cc4920e5Smrg
3066cc4920e5Smrgtpf*)
3067cc4920e5Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3068cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
3069cc4920e5Smrg  need_lib_prefix=no
3070cc4920e5Smrg  need_version=no
3071cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3072cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
3073cc4920e5Smrg  shlibpath_overrides_runpath=no
3074cc4920e5Smrg  hardcode_into_libs=yes
3075cc4920e5Smrg  ;;
3076cc4920e5Smrg
3077cc4920e5Smrguts4*)
3078cc4920e5Smrg  version_type=linux # correct to gnu/linux during the next big refactor
3079cc4920e5Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3080cc4920e5Smrg  soname_spec='$libname$release$shared_ext$major'
3081cc4920e5Smrg  shlibpath_var=LD_LIBRARY_PATH
3082cc4920e5Smrg  ;;
3083cc4920e5Smrg
3084cc4920e5Smrg*)
3085cc4920e5Smrg  dynamic_linker=no
3086cc4920e5Smrg  ;;
3087cc4920e5Smrgesac
3088cc4920e5SmrgAC_MSG_RESULT([$dynamic_linker])
3089cc4920e5Smrgtest no = "$dynamic_linker" && can_build_shared=no
3090cc4920e5Smrg
3091cc4920e5Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3092cc4920e5Smrgif test yes = "$GCC"; then
3093cc4920e5Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3094cc4920e5Smrgfi
3095cc4920e5Smrg
3096cc4920e5Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3097cc4920e5Smrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3098cc4920e5Smrgfi
3099cc4920e5Smrg
3100cc4920e5Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3101cc4920e5Smrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3102cc4920e5Smrgfi
3103cc4920e5Smrg
3104cc4920e5Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3105cc4920e5Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3106cc4920e5Smrg
3107cc4920e5Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3108cc4920e5Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3109cc4920e5Smrg
3110cc4920e5Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3111cc4920e5Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3112cc4920e5Smrg
3113cc4920e5Smrg_LT_DECL([], [variables_saved_for_relink], [1],
3114cc4920e5Smrg    [Variables whose values should be saved in libtool wrapper scripts and
3115cc4920e5Smrg    restored at link time])
3116cc4920e5Smrg_LT_DECL([], [need_lib_prefix], [0],
3117cc4920e5Smrg    [Do we need the "lib" prefix for modules?])
3118cc4920e5Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3119cc4920e5Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
3120cc4920e5Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3121cc4920e5Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3122cc4920e5Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
3123cc4920e5Smrg    [Is shlibpath searched before the hard-coded library search path?])
3124cc4920e5Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3125cc4920e5Smrg_LT_DECL([], [library_names_spec], [1],
3126cc4920e5Smrg    [[List of archive names.  First name is the real one, the rest are links.
3127cc4920e5Smrg    The last name is the one that the linker finds with -lNAME]])
3128cc4920e5Smrg_LT_DECL([], [soname_spec], [1],
3129cc4920e5Smrg    [[The coded name of the library, if different from the real name]])
3130cc4920e5Smrg_LT_DECL([], [install_override_mode], [1],
3131cc4920e5Smrg    [Permission mode override for installation of shared libraries])
3132cc4920e5Smrg_LT_DECL([], [postinstall_cmds], [2],
3133cc4920e5Smrg    [Command to use after installation of a shared archive])
3134cc4920e5Smrg_LT_DECL([], [postuninstall_cmds], [2],
3135cc4920e5Smrg    [Command to use after uninstallation of a shared archive])
3136cc4920e5Smrg_LT_DECL([], [finish_cmds], [2],
3137cc4920e5Smrg    [Commands used to finish a libtool library installation in a directory])
3138cc4920e5Smrg_LT_DECL([], [finish_eval], [1],
3139cc4920e5Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
3140cc4920e5Smrg    not shown]])
3141cc4920e5Smrg_LT_DECL([], [hardcode_into_libs], [0],
3142cc4920e5Smrg    [Whether we should hardcode library paths into libraries])
3143cc4920e5Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
3144cc4920e5Smrg    [Compile-time system search path for libraries])
3145cc4920e5Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3146cc4920e5Smrg    [Detected run-time system search path for libraries])
3147cc4920e5Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3148cc4920e5Smrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3149cc4920e5Smrg])# _LT_SYS_DYNAMIC_LINKER
3150cc4920e5Smrg
3151cc4920e5Smrg
3152cc4920e5Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
3153cc4920e5Smrg# --------------------------
3154cc4920e5Smrg# find a file program that can recognize shared library
3155cc4920e5SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
3156cc4920e5Smrg[m4_require([_LT_DECL_EGREP])dnl
3157cc4920e5SmrgAC_MSG_CHECKING([for $1])
3158cc4920e5SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3159cc4920e5Smrg[case $MAGIC_CMD in
3160cc4920e5Smrg[[\\/*] |  ?:[\\/]*])
3161cc4920e5Smrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3162cc4920e5Smrg  ;;
3163cc4920e5Smrg*)
3164cc4920e5Smrg  lt_save_MAGIC_CMD=$MAGIC_CMD
3165cc4920e5Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3166cc4920e5Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3167cc4920e5Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3168cc4920e5Smrgdnl not every word.  This closes a longstanding sh security hole.
3169cc4920e5Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
3170cc4920e5Smrg  for ac_dir in $ac_dummy; do
3171cc4920e5Smrg    IFS=$lt_save_ifs
3172cc4920e5Smrg    test -z "$ac_dir" && ac_dir=.
3173cc4920e5Smrg    if test -f "$ac_dir/$1"; then
3174cc4920e5Smrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3175cc4920e5Smrg      if test -n "$file_magic_test_file"; then
3176cc4920e5Smrg	case $deplibs_check_method in
3177cc4920e5Smrg	"file_magic "*)
3178cc4920e5Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3179cc4920e5Smrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3180cc4920e5Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3181cc4920e5Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
3182cc4920e5Smrg	    :
3183cc4920e5Smrg	  else
3184cc4920e5Smrg	    cat <<_LT_EOF 1>&2
3185cc4920e5Smrg
3186cc4920e5Smrg*** Warning: the command libtool uses to detect shared libraries,
3187cc4920e5Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3188cc4920e5Smrg*** The result is that libtool may fail to recognize shared libraries
3189cc4920e5Smrg*** as such.  This will affect the creation of libtool libraries that
3190cc4920e5Smrg*** depend on shared libraries, but programs linked with such libtool
3191cc4920e5Smrg*** libraries will work regardless of this problem.  Nevertheless, you
3192cc4920e5Smrg*** may want to report the problem to your system manager and/or to
3193cc4920e5Smrg*** bug-libtool@gnu.org
3194cc4920e5Smrg
3195cc4920e5Smrg_LT_EOF
3196cc4920e5Smrg	  fi ;;
3197cc4920e5Smrg	esac
3198cc4920e5Smrg      fi
3199cc4920e5Smrg      break
3200cc4920e5Smrg    fi
3201cc4920e5Smrg  done
3202cc4920e5Smrg  IFS=$lt_save_ifs
3203cc4920e5Smrg  MAGIC_CMD=$lt_save_MAGIC_CMD
3204cc4920e5Smrg  ;;
3205cc4920e5Smrgesac])
3206cc4920e5SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
3207cc4920e5Smrgif test -n "$MAGIC_CMD"; then
3208cc4920e5Smrg  AC_MSG_RESULT($MAGIC_CMD)
3209cc4920e5Smrgelse
3210cc4920e5Smrg  AC_MSG_RESULT(no)
3211cc4920e5Smrgfi
3212cc4920e5Smrg_LT_DECL([], [MAGIC_CMD], [0],
3213cc4920e5Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3214cc4920e5Smrg])# _LT_PATH_TOOL_PREFIX
3215cc4920e5Smrg
3216cc4920e5Smrg# Old name:
3217cc4920e5SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3218cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
3219cc4920e5Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3220cc4920e5Smrg
3221cc4920e5Smrg
3222cc4920e5Smrg# _LT_PATH_MAGIC
3223cc4920e5Smrg# --------------
3224cc4920e5Smrg# find a file program that can recognize a shared library
3225cc4920e5Smrgm4_defun([_LT_PATH_MAGIC],
3226cc4920e5Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3227cc4920e5Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3228cc4920e5Smrg  if test -n "$ac_tool_prefix"; then
3229cc4920e5Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3230cc4920e5Smrg  else
3231cc4920e5Smrg    MAGIC_CMD=:
3232cc4920e5Smrg  fi
3233cc4920e5Smrgfi
3234cc4920e5Smrg])# _LT_PATH_MAGIC
3235cc4920e5Smrg
3236cc4920e5Smrg
3237cc4920e5Smrg# LT_PATH_LD
3238cc4920e5Smrg# ----------
3239cc4920e5Smrg# find the pathname to the GNU or non-GNU linker
3240cc4920e5SmrgAC_DEFUN([LT_PATH_LD],
3241cc4920e5Smrg[AC_REQUIRE([AC_PROG_CC])dnl
3242cc4920e5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3243cc4920e5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3244cc4920e5Smrgm4_require([_LT_DECL_SED])dnl
3245cc4920e5Smrgm4_require([_LT_DECL_EGREP])dnl
3246cc4920e5Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3247cc4920e5Smrg
3248cc4920e5SmrgAC_ARG_WITH([gnu-ld],
3249cc4920e5Smrg    [AS_HELP_STRING([--with-gnu-ld],
3250cc4920e5Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3251cc4920e5Smrg    [test no = "$withval" || with_gnu_ld=yes],
3252cc4920e5Smrg    [with_gnu_ld=no])dnl
3253cc4920e5Smrg
3254cc4920e5Smrgac_prog=ld
3255cc4920e5Smrgif test yes = "$GCC"; then
3256cc4920e5Smrg  # Check if gcc -print-prog-name=ld gives a path.
3257cc4920e5Smrg  AC_MSG_CHECKING([for ld used by $CC])
3258cc4920e5Smrg  case $host in
3259cc4920e5Smrg  *-*-mingw*)
3260cc4920e5Smrg    # gcc leaves a trailing carriage return, which upsets mingw
3261cc4920e5Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3262cc4920e5Smrg  *)
3263cc4920e5Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3264cc4920e5Smrg  esac
3265cc4920e5Smrg  case $ac_prog in
3266cc4920e5Smrg    # Accept absolute paths.
3267cc4920e5Smrg    [[\\/]]* | ?:[[\\/]]*)
3268cc4920e5Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3269cc4920e5Smrg      # Canonicalize the pathname of ld
3270cc4920e5Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3271cc4920e5Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3272cc4920e5Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3273cc4920e5Smrg      done
3274cc4920e5Smrg      test -z "$LD" && LD=$ac_prog
3275cc4920e5Smrg      ;;
3276cc4920e5Smrg  "")
3277cc4920e5Smrg    # If it fails, then pretend we aren't using GCC.
3278cc4920e5Smrg    ac_prog=ld
3279cc4920e5Smrg    ;;
3280cc4920e5Smrg  *)
3281cc4920e5Smrg    # If it is relative, then search for the first ld in PATH.
3282cc4920e5Smrg    with_gnu_ld=unknown
3283cc4920e5Smrg    ;;
3284cc4920e5Smrg  esac
3285cc4920e5Smrgelif test yes = "$with_gnu_ld"; then
3286cc4920e5Smrg  AC_MSG_CHECKING([for GNU ld])
3287cc4920e5Smrgelse
3288cc4920e5Smrg  AC_MSG_CHECKING([for non-GNU ld])
3289cc4920e5Smrgfi
3290cc4920e5SmrgAC_CACHE_VAL(lt_cv_path_LD,
3291cc4920e5Smrg[if test -z "$LD"; then
3292cc4920e5Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3293cc4920e5Smrg  for ac_dir in $PATH; do
3294cc4920e5Smrg    IFS=$lt_save_ifs
3295cc4920e5Smrg    test -z "$ac_dir" && ac_dir=.
3296cc4920e5Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3297cc4920e5Smrg      lt_cv_path_LD=$ac_dir/$ac_prog
3298cc4920e5Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3299cc4920e5Smrg      # but apparently some variants of GNU ld only accept -v.
3300cc4920e5Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3301cc4920e5Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3302cc4920e5Smrg      *GNU* | *'with BFD'*)
3303cc4920e5Smrg	test no != "$with_gnu_ld" && break
3304cc4920e5Smrg	;;
3305cc4920e5Smrg      *)
3306cc4920e5Smrg	test yes != "$with_gnu_ld" && break
3307cc4920e5Smrg	;;
3308cc4920e5Smrg      esac
3309cc4920e5Smrg    fi
3310cc4920e5Smrg  done
3311cc4920e5Smrg  IFS=$lt_save_ifs
3312cc4920e5Smrgelse
3313cc4920e5Smrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
3314cc4920e5Smrgfi])
3315cc4920e5SmrgLD=$lt_cv_path_LD
3316cc4920e5Smrgif test -n "$LD"; then
3317cc4920e5Smrg  AC_MSG_RESULT($LD)
3318cc4920e5Smrgelse
3319cc4920e5Smrg  AC_MSG_RESULT(no)
3320cc4920e5Smrgfi
3321cc4920e5Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3322cc4920e5Smrg_LT_PATH_LD_GNU
3323cc4920e5SmrgAC_SUBST([LD])
3324cc4920e5Smrg
3325cc4920e5Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3326cc4920e5Smrg])# LT_PATH_LD
3327cc4920e5Smrg
3328cc4920e5Smrg# Old names:
3329cc4920e5SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3330cc4920e5SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3331cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
3332cc4920e5Smrgdnl AC_DEFUN([AM_PROG_LD], [])
3333cc4920e5Smrgdnl AC_DEFUN([AC_PROG_LD], [])
3334cc4920e5Smrg
3335cc4920e5Smrg
3336cc4920e5Smrg# _LT_PATH_LD_GNU
3337cc4920e5Smrg#- --------------
3338cc4920e5Smrgm4_defun([_LT_PATH_LD_GNU],
3339cc4920e5Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3340cc4920e5Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3341cc4920e5Smrgcase `$LD -v 2>&1 </dev/null` in
3342cc4920e5Smrg*GNU* | *'with BFD'*)
3343cc4920e5Smrg  lt_cv_prog_gnu_ld=yes
3344cc4920e5Smrg  ;;
3345cc4920e5Smrg*)
3346cc4920e5Smrg  lt_cv_prog_gnu_ld=no
3347cc4920e5Smrg  ;;
3348cc4920e5Smrgesac])
3349cc4920e5Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3350cc4920e5Smrg])# _LT_PATH_LD_GNU
3351cc4920e5Smrg
3352cc4920e5Smrg
3353cc4920e5Smrg# _LT_CMD_RELOAD
3354cc4920e5Smrg# --------------
3355cc4920e5Smrg# find reload flag for linker
3356cc4920e5Smrg#   -- PORTME Some linkers may need a different reload flag.
3357cc4920e5Smrgm4_defun([_LT_CMD_RELOAD],
3358cc4920e5Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
3359cc4920e5Smrg  lt_cv_ld_reload_flag,
3360cc4920e5Smrg  [lt_cv_ld_reload_flag='-r'])
3361cc4920e5Smrgreload_flag=$lt_cv_ld_reload_flag
3362cc4920e5Smrgcase $reload_flag in
3363cc4920e5Smrg"" | " "*) ;;
3364cc4920e5Smrg*) reload_flag=" $reload_flag" ;;
3365cc4920e5Smrgesac
3366cc4920e5Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3367cc4920e5Smrgcase $host_os in
3368cc4920e5Smrg  cygwin* | mingw* | pw32* | cegcc*)
3369cc4920e5Smrg    if test yes != "$GCC"; then
3370cc4920e5Smrg      reload_cmds=false
3371cc4920e5Smrg    fi
3372cc4920e5Smrg    ;;
3373cc4920e5Smrg  darwin*)
3374cc4920e5Smrg    if test yes = "$GCC"; then
3375cc4920e5Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3376cc4920e5Smrg    else
3377cc4920e5Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3378cc4920e5Smrg    fi
3379cc4920e5Smrg    ;;
3380cc4920e5Smrgesac
3381cc4920e5Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3382cc4920e5Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
3383cc4920e5Smrg])# _LT_CMD_RELOAD
3384cc4920e5Smrg
3385cc4920e5Smrg
3386cc4920e5Smrg# _LT_PATH_DD
3387cc4920e5Smrg# -----------
3388cc4920e5Smrg# find a working dd
3389cc4920e5Smrgm4_defun([_LT_PATH_DD],
3390cc4920e5Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3391cc4920e5Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
3392cc4920e5Smrgcat conftest.i conftest.i >conftest2.i
3393cc4920e5Smrg: ${lt_DD:=$DD}
3394cc4920e5SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3395cc4920e5Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3396cc4920e5Smrg  cmp -s conftest.i conftest.out \
3397cc4920e5Smrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3398cc4920e5Smrgfi])
3399cc4920e5Smrgrm -f conftest.i conftest2.i conftest.out])
3400cc4920e5Smrg])# _LT_PATH_DD
3401cc4920e5Smrg
3402cc4920e5Smrg
3403cc4920e5Smrg# _LT_CMD_TRUNCATE
3404cc4920e5Smrg# ----------------
3405cc4920e5Smrg# find command to truncate a binary pipe
3406cc4920e5Smrgm4_defun([_LT_CMD_TRUNCATE],
3407cc4920e5Smrg[m4_require([_LT_PATH_DD])
3408cc4920e5SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3409cc4920e5Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
3410cc4920e5Smrgcat conftest.i conftest.i >conftest2.i
3411cc4920e5Smrglt_cv_truncate_bin=
3412cc4920e5Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3413cc4920e5Smrg  cmp -s conftest.i conftest.out \
3414cc4920e5Smrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3415cc4920e5Smrgfi
3416cc4920e5Smrgrm -f conftest.i conftest2.i conftest.out
3417cc4920e5Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3418cc4920e5Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3419cc4920e5Smrg  [Command to truncate a binary pipe])
3420cc4920e5Smrg])# _LT_CMD_TRUNCATE
3421cc4920e5Smrg
3422cc4920e5Smrg
3423cc4920e5Smrg# _LT_CHECK_MAGIC_METHOD
3424cc4920e5Smrg# ----------------------
3425cc4920e5Smrg# how to check for library dependencies
3426cc4920e5Smrg#  -- PORTME fill in with the dynamic library characteristics
3427cc4920e5Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
3428cc4920e5Smrg[m4_require([_LT_DECL_EGREP])
3429cc4920e5Smrgm4_require([_LT_DECL_OBJDUMP])
3430cc4920e5SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
3431cc4920e5Smrglt_cv_deplibs_check_method,
3432cc4920e5Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3433cc4920e5Smrglt_cv_file_magic_test_file=
3434cc4920e5Smrglt_cv_deplibs_check_method='unknown'
3435cc4920e5Smrg# Need to set the preceding variable on all platforms that support
3436cc4920e5Smrg# interlibrary dependencies.
3437cc4920e5Smrg# 'none' -- dependencies not supported.
3438cc4920e5Smrg# 'unknown' -- same as none, but documents that we really don't know.
3439cc4920e5Smrg# 'pass_all' -- all dependencies passed with no checks.
3440cc4920e5Smrg# 'test_compile' -- check by making test program.
3441cc4920e5Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
3442cc4920e5Smrg# that responds to the $file_magic_cmd with a given extended regex.
3443cc4920e5Smrg# If you have 'file' or equivalent on your system and you're not sure
3444cc4920e5Smrg# whether 'pass_all' will *always* work, you probably want this one.
3445cc4920e5Smrg
3446cc4920e5Smrgcase $host_os in
3447cc4920e5Smrgaix[[4-9]]*)
3448cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3449cc4920e5Smrg  ;;
3450cc4920e5Smrg
3451cc4920e5Smrgbeos*)
3452cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3453cc4920e5Smrg  ;;
3454cc4920e5Smrg
3455cc4920e5Smrgbsdi[[45]]*)
3456cc4920e5Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3457cc4920e5Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3458cc4920e5Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
3459cc4920e5Smrg  ;;
3460cc4920e5Smrg
3461cc4920e5Smrgcygwin*)
3462cc4920e5Smrg  # func_win32_libid is a shell function defined in ltmain.sh
3463cc4920e5Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3464cc4920e5Smrg  lt_cv_file_magic_cmd='func_win32_libid'
3465cc4920e5Smrg  ;;
3466cc4920e5Smrg
3467cc4920e5Smrgmingw* | pw32*)
3468cc4920e5Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3469cc4920e5Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3470cc4920e5Smrg  # unless we find 'file', for example because we are cross-compiling.
3471cc4920e5Smrg  if ( file / ) >/dev/null 2>&1; then
3472cc4920e5Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3473cc4920e5Smrg    lt_cv_file_magic_cmd='func_win32_libid'
3474cc4920e5Smrg  else
3475cc4920e5Smrg    # Keep this pattern in sync with the one in func_win32_libid.
3476cc4920e5Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3477cc4920e5Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3478cc4920e5Smrg  fi
3479cc4920e5Smrg  ;;
3480cc4920e5Smrg
3481cc4920e5Smrgcegcc*)
3482cc4920e5Smrg  # use the weaker test based on 'objdump'. See mingw*.
3483cc4920e5Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3484cc4920e5Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3485cc4920e5Smrg  ;;
3486cc4920e5Smrg
3487cc4920e5Smrgdarwin* | rhapsody*)
3488cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3489cc4920e5Smrg  ;;
3490cc4920e5Smrg
3491cc4920e5Smrgfreebsd* | dragonfly*)
3492cc4920e5Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3493cc4920e5Smrg    case $host_cpu in
3494cc4920e5Smrg    i*86 )
3495cc4920e5Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
3496cc4920e5Smrg      # Let's accept both of them until this is cleared up.
3497cc4920e5Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3498cc4920e5Smrg      lt_cv_file_magic_cmd=/usr/bin/file
3499cc4920e5Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3500cc4920e5Smrg      ;;
3501cc4920e5Smrg    esac
3502cc4920e5Smrg  else
3503cc4920e5Smrg    lt_cv_deplibs_check_method=pass_all
3504cc4920e5Smrg  fi
3505cc4920e5Smrg  ;;
3506cc4920e5Smrg
3507cc4920e5Smrghaiku*)
3508cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3509cc4920e5Smrg  ;;
3510cc4920e5Smrg
3511cc4920e5Smrghpux10.20* | hpux11*)
3512cc4920e5Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3513cc4920e5Smrg  case $host_cpu in
3514cc4920e5Smrg  ia64*)
3515cc4920e5Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3516cc4920e5Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3517cc4920e5Smrg    ;;
3518cc4920e5Smrg  hppa*64*)
3519cc4920e5Smrg    [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]']
3520cc4920e5Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3521cc4920e5Smrg    ;;
3522cc4920e5Smrg  *)
3523cc4920e5Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3524cc4920e5Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3525cc4920e5Smrg    ;;
3526cc4920e5Smrg  esac
3527cc4920e5Smrg  ;;
3528cc4920e5Smrg
3529cc4920e5Smrginterix[[3-9]]*)
3530cc4920e5Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3531cc4920e5Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3532cc4920e5Smrg  ;;
3533cc4920e5Smrg
3534cc4920e5Smrgirix5* | irix6* | nonstopux*)
3535cc4920e5Smrg  case $LD in
3536cc4920e5Smrg  *-32|*"-32 ") libmagic=32-bit;;
3537cc4920e5Smrg  *-n32|*"-n32 ") libmagic=N32;;
3538cc4920e5Smrg  *-64|*"-64 ") libmagic=64-bit;;
3539cc4920e5Smrg  *) libmagic=never-match;;
3540cc4920e5Smrg  esac
3541cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3542cc4920e5Smrg  ;;
3543cc4920e5Smrg
3544cc4920e5Smrg# This must be glibc/ELF.
3545cc4920e5Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3546cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3547cc4920e5Smrg  ;;
3548cc4920e5Smrg
3549cc4920e5Smrgnetbsd*)
3550cc4920e5Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3551cc4920e5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3552cc4920e5Smrg  else
3553cc4920e5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3554cc4920e5Smrg  fi
3555cc4920e5Smrg  ;;
3556cc4920e5Smrg
3557cc4920e5Smrgnewos6*)
3558cc4920e5Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3559cc4920e5Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3560cc4920e5Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3561cc4920e5Smrg  ;;
3562cc4920e5Smrg
3563cc4920e5Smrg*nto* | *qnx*)
3564cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3565cc4920e5Smrg  ;;
3566cc4920e5Smrg
3567cc4920e5Smrgopenbsd* | bitrig*)
3568cc4920e5Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3569cc4920e5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3570cc4920e5Smrg  else
3571cc4920e5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3572cc4920e5Smrg  fi
3573cc4920e5Smrg  ;;
3574cc4920e5Smrg
3575cc4920e5Smrgosf3* | osf4* | osf5*)
3576cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3577cc4920e5Smrg  ;;
3578cc4920e5Smrg
3579cc4920e5Smrgrdos*)
3580cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3581cc4920e5Smrg  ;;
3582cc4920e5Smrg
3583cc4920e5Smrgsolaris*)
3584cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3585cc4920e5Smrg  ;;
3586cc4920e5Smrg
3587cc4920e5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3588cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3589cc4920e5Smrg  ;;
3590cc4920e5Smrg
3591cc4920e5Smrgsysv4 | sysv4.3*)
3592cc4920e5Smrg  case $host_vendor in
3593cc4920e5Smrg  motorola)
3594cc4920e5Smrg    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]]'
3595cc4920e5Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3596cc4920e5Smrg    ;;
3597cc4920e5Smrg  ncr)
3598cc4920e5Smrg    lt_cv_deplibs_check_method=pass_all
3599cc4920e5Smrg    ;;
3600cc4920e5Smrg  sequent)
3601cc4920e5Smrg    lt_cv_file_magic_cmd='/bin/file'
3602cc4920e5Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3603cc4920e5Smrg    ;;
3604cc4920e5Smrg  sni)
3605cc4920e5Smrg    lt_cv_file_magic_cmd='/bin/file'
3606cc4920e5Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3607cc4920e5Smrg    lt_cv_file_magic_test_file=/lib/libc.so
3608cc4920e5Smrg    ;;
3609cc4920e5Smrg  siemens)
3610cc4920e5Smrg    lt_cv_deplibs_check_method=pass_all
3611cc4920e5Smrg    ;;
3612cc4920e5Smrg  pc)
3613cc4920e5Smrg    lt_cv_deplibs_check_method=pass_all
3614cc4920e5Smrg    ;;
3615cc4920e5Smrg  esac
3616cc4920e5Smrg  ;;
3617cc4920e5Smrg
3618cc4920e5Smrgtpf*)
3619cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3620cc4920e5Smrg  ;;
3621cc4920e5Smrgos2*)
3622cc4920e5Smrg  lt_cv_deplibs_check_method=pass_all
3623cc4920e5Smrg  ;;
3624cc4920e5Smrgesac
3625cc4920e5Smrg])
3626cc4920e5Smrg
3627cc4920e5Smrgfile_magic_glob=
3628cc4920e5Smrgwant_nocaseglob=no
3629cc4920e5Smrgif test "$build" = "$host"; then
3630cc4920e5Smrg  case $host_os in
3631cc4920e5Smrg  mingw* | pw32*)
3632cc4920e5Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3633cc4920e5Smrg      want_nocaseglob=yes
3634cc4920e5Smrg    else
3635cc4920e5Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3636cc4920e5Smrg    fi
3637cc4920e5Smrg    ;;
3638cc4920e5Smrg  esac
3639cc4920e5Smrgfi
3640cc4920e5Smrg
3641cc4920e5Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
3642cc4920e5Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
3643cc4920e5Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3644cc4920e5Smrg
3645cc4920e5Smrg_LT_DECL([], [deplibs_check_method], [1],
3646cc4920e5Smrg    [Method to check whether dependent libraries are shared objects])
3647cc4920e5Smrg_LT_DECL([], [file_magic_cmd], [1],
3648cc4920e5Smrg    [Command to use when deplibs_check_method = "file_magic"])
3649cc4920e5Smrg_LT_DECL([], [file_magic_glob], [1],
3650cc4920e5Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
3651cc4920e5Smrg_LT_DECL([], [want_nocaseglob], [1],
3652cc4920e5Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3653cc4920e5Smrg])# _LT_CHECK_MAGIC_METHOD
3654cc4920e5Smrg
3655cc4920e5Smrg
3656cc4920e5Smrg# LT_PATH_NM
3657cc4920e5Smrg# ----------
3658cc4920e5Smrg# find the pathname to a BSD- or MS-compatible name lister
3659cc4920e5SmrgAC_DEFUN([LT_PATH_NM],
3660cc4920e5Smrg[AC_REQUIRE([AC_PROG_CC])dnl
3661cc4920e5SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3662cc4920e5Smrg[if test -n "$NM"; then
3663cc4920e5Smrg  # Let the user override the test.
3664cc4920e5Smrg  lt_cv_path_NM=$NM
3665cc4920e5Smrgelse
3666cc4920e5Smrg  lt_nm_to_check=${ac_tool_prefix}nm
3667cc4920e5Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3668cc4920e5Smrg    lt_nm_to_check="$lt_nm_to_check nm"
3669cc4920e5Smrg  fi
3670cc4920e5Smrg  for lt_tmp_nm in $lt_nm_to_check; do
3671cc4920e5Smrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3672cc4920e5Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3673cc4920e5Smrg      IFS=$lt_save_ifs
3674cc4920e5Smrg      test -z "$ac_dir" && ac_dir=.
3675cc4920e5Smrg      tmp_nm=$ac_dir/$lt_tmp_nm
3676cc4920e5Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3677cc4920e5Smrg	# Check to see if the nm accepts a BSD-compat flag.
3678cc4920e5Smrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3679cc4920e5Smrg	#   nm: unknown option "B" ignored
3680cc4920e5Smrg	# Tru64's nm complains that /dev/null is an invalid object file
3681cc4920e5Smrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3682cc4920e5Smrg	case $build_os in
3683cc4920e5Smrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
3684cc4920e5Smrg	*) lt_bad_file=/dev/null ;;
3685cc4920e5Smrg	esac
3686cc4920e5Smrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3687cc4920e5Smrg	*$lt_bad_file* | *'Invalid file or object type'*)
3688cc4920e5Smrg	  lt_cv_path_NM="$tmp_nm -B"
3689cc4920e5Smrg	  break 2
3690cc4920e5Smrg	  ;;
3691cc4920e5Smrg	*)
3692cc4920e5Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3693cc4920e5Smrg	  */dev/null*)
3694cc4920e5Smrg	    lt_cv_path_NM="$tmp_nm -p"
3695cc4920e5Smrg	    break 2
3696cc4920e5Smrg	    ;;
3697cc4920e5Smrg	  *)
3698cc4920e5Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3699cc4920e5Smrg	    continue # so that we can try to find one that supports BSD flags
3700cc4920e5Smrg	    ;;
3701cc4920e5Smrg	  esac
3702cc4920e5Smrg	  ;;
3703cc4920e5Smrg	esac
3704cc4920e5Smrg      fi
3705cc4920e5Smrg    done
3706cc4920e5Smrg    IFS=$lt_save_ifs
3707cc4920e5Smrg  done
3708cc4920e5Smrg  : ${lt_cv_path_NM=no}
3709cc4920e5Smrgfi])
3710cc4920e5Smrgif test no != "$lt_cv_path_NM"; then
3711cc4920e5Smrg  NM=$lt_cv_path_NM
3712cc4920e5Smrgelse
3713cc4920e5Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3714cc4920e5Smrg  if test -n "$DUMPBIN"; then :
3715cc4920e5Smrg    # Let the user override the test.
3716cc4920e5Smrg  else
3717cc4920e5Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3718cc4920e5Smrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3719cc4920e5Smrg    *COFF*)
3720cc4920e5Smrg      DUMPBIN="$DUMPBIN -symbols -headers"
3721cc4920e5Smrg      ;;
3722cc4920e5Smrg    *)
3723cc4920e5Smrg      DUMPBIN=:
3724cc4920e5Smrg      ;;
3725cc4920e5Smrg    esac
3726cc4920e5Smrg  fi
3727cc4920e5Smrg  AC_SUBST([DUMPBIN])
3728cc4920e5Smrg  if test : != "$DUMPBIN"; then
3729cc4920e5Smrg    NM=$DUMPBIN
3730cc4920e5Smrg  fi
3731cc4920e5Smrgfi
3732cc4920e5Smrgtest -z "$NM" && NM=nm
3733cc4920e5SmrgAC_SUBST([NM])
3734cc4920e5Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3735cc4920e5Smrg
3736cc4920e5SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3737cc4920e5Smrg  [lt_cv_nm_interface="BSD nm"
3738cc4920e5Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
3739cc4920e5Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3740cc4920e5Smrg  (eval "$ac_compile" 2>conftest.err)
3741cc4920e5Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3742cc4920e5Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3743cc4920e5Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3744cc4920e5Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3745cc4920e5Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3746cc4920e5Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3747cc4920e5Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3748cc4920e5Smrg    lt_cv_nm_interface="MS dumpbin"
3749cc4920e5Smrg  fi
3750cc4920e5Smrg  rm -f conftest*])
3751cc4920e5Smrg])# LT_PATH_NM
3752cc4920e5Smrg
3753cc4920e5Smrg# Old names:
3754cc4920e5SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3755cc4920e5SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3756cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
3757cc4920e5Smrgdnl AC_DEFUN([AM_PROG_NM], [])
3758cc4920e5Smrgdnl AC_DEFUN([AC_PROG_NM], [])
3759cc4920e5Smrg
3760cc4920e5Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3761cc4920e5Smrg# --------------------------------
3762cc4920e5Smrg# how to determine the name of the shared library
3763cc4920e5Smrg# associated with a specific link library.
3764cc4920e5Smrg#  -- PORTME fill in with the dynamic library characteristics
3765cc4920e5Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3766cc4920e5Smrg[m4_require([_LT_DECL_EGREP])
3767cc4920e5Smrgm4_require([_LT_DECL_OBJDUMP])
3768cc4920e5Smrgm4_require([_LT_DECL_DLLTOOL])
3769cc4920e5SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
3770cc4920e5Smrglt_cv_sharedlib_from_linklib_cmd,
3771cc4920e5Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
3772cc4920e5Smrg
3773cc4920e5Smrgcase $host_os in
3774cc4920e5Smrgcygwin* | mingw* | pw32* | cegcc*)
3775cc4920e5Smrg  # two different shell functions defined in ltmain.sh;
3776cc4920e5Smrg  # decide which one to use based on capabilities of $DLLTOOL
3777cc4920e5Smrg  case `$DLLTOOL --help 2>&1` in
3778cc4920e5Smrg  *--identify-strict*)
3779cc4920e5Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3780cc4920e5Smrg    ;;
3781cc4920e5Smrg  *)
3782cc4920e5Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3783cc4920e5Smrg    ;;
3784cc4920e5Smrg  esac
3785cc4920e5Smrg  ;;
3786cc4920e5Smrg*)
3787cc4920e5Smrg  # fallback: assume linklib IS sharedlib
3788cc4920e5Smrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
3789cc4920e5Smrg  ;;
3790cc4920e5Smrgesac
3791cc4920e5Smrg])
3792cc4920e5Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3793cc4920e5Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3794cc4920e5Smrg
3795cc4920e5Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3796cc4920e5Smrg    [Command to associate shared and link libraries])
3797cc4920e5Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3798cc4920e5Smrg
3799cc4920e5Smrg
3800cc4920e5Smrg# _LT_PATH_MANIFEST_TOOL
3801cc4920e5Smrg# ----------------------
3802cc4920e5Smrg# locate the manifest tool
3803cc4920e5Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
3804cc4920e5Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3805cc4920e5Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3806cc4920e5SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3807cc4920e5Smrg  [lt_cv_path_mainfest_tool=no
3808cc4920e5Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3809cc4920e5Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3810cc4920e5Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3811cc4920e5Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3812cc4920e5Smrg    lt_cv_path_mainfest_tool=yes
3813cc4920e5Smrg  fi
3814cc4920e5Smrg  rm -f conftest*])
3815cc4920e5Smrgif test yes != "$lt_cv_path_mainfest_tool"; then
3816cc4920e5Smrg  MANIFEST_TOOL=:
3817cc4920e5Smrgfi
3818cc4920e5Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3819cc4920e5Smrg])# _LT_PATH_MANIFEST_TOOL
3820cc4920e5Smrg
3821cc4920e5Smrg
3822cc4920e5Smrg# _LT_DLL_DEF_P([FILE])
3823cc4920e5Smrg# ---------------------
3824cc4920e5Smrg# True iff FILE is a Windows DLL '.def' file.
3825cc4920e5Smrg# Keep in sync with func_dll_def_p in the libtool script
3826cc4920e5SmrgAC_DEFUN([_LT_DLL_DEF_P],
3827cc4920e5Smrg[dnl
3828cc4920e5Smrg  test DEF = "`$SED -n dnl
3829cc4920e5Smrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3830cc4920e5Smrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3831cc4920e5Smrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3832cc4920e5Smrg    -e q dnl                          Only consider the first "real" line
3833cc4920e5Smrg    $1`" dnl
3834cc4920e5Smrg])# _LT_DLL_DEF_P
3835cc4920e5Smrg
3836cc4920e5Smrg
3837cc4920e5Smrg# LT_LIB_M
3838cc4920e5Smrg# --------
3839cc4920e5Smrg# check for math library
3840cc4920e5SmrgAC_DEFUN([LT_LIB_M],
3841cc4920e5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3842cc4920e5SmrgLIBM=
3843cc4920e5Smrgcase $host in
3844cc4920e5Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3845cc4920e5Smrg  # These system don't have libm, or don't need it
3846cc4920e5Smrg  ;;
3847cc4920e5Smrg*-ncr-sysv4.3*)
3848cc4920e5Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3849cc4920e5Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3850cc4920e5Smrg  ;;
3851cc4920e5Smrg*)
3852cc4920e5Smrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
3853cc4920e5Smrg  ;;
3854cc4920e5Smrgesac
3855cc4920e5SmrgAC_SUBST([LIBM])
3856cc4920e5Smrg])# LT_LIB_M
3857cc4920e5Smrg
3858cc4920e5Smrg# Old name:
3859cc4920e5SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3860cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
3861cc4920e5Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3862cc4920e5Smrg
3863cc4920e5Smrg
3864cc4920e5Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3865cc4920e5Smrg# -------------------------------
3866cc4920e5Smrgm4_defun([_LT_COMPILER_NO_RTTI],
3867cc4920e5Smrg[m4_require([_LT_TAG_COMPILER])dnl
3868cc4920e5Smrg
3869cc4920e5Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3870cc4920e5Smrg
3871cc4920e5Smrgif test yes = "$GCC"; then
3872cc4920e5Smrg  case $cc_basename in
3873cc4920e5Smrg  nvcc*)
3874cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3875cc4920e5Smrg  *)
3876cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3877cc4920e5Smrg  esac
3878cc4920e5Smrg
3879cc4920e5Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3880cc4920e5Smrg    lt_cv_prog_compiler_rtti_exceptions,
3881cc4920e5Smrg    [-fno-rtti -fno-exceptions], [],
3882cc4920e5Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3883cc4920e5Smrgfi
3884cc4920e5Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3885cc4920e5Smrg	[Compiler flag to turn off builtin functions])
3886cc4920e5Smrg])# _LT_COMPILER_NO_RTTI
3887cc4920e5Smrg
3888cc4920e5Smrg
3889cc4920e5Smrg# _LT_CMD_GLOBAL_SYMBOLS
3890cc4920e5Smrg# ----------------------
3891cc4920e5Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3892cc4920e5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3893cc4920e5SmrgAC_REQUIRE([AC_PROG_CC])dnl
3894cc4920e5SmrgAC_REQUIRE([AC_PROG_AWK])dnl
3895cc4920e5SmrgAC_REQUIRE([LT_PATH_NM])dnl
3896cc4920e5SmrgAC_REQUIRE([LT_PATH_LD])dnl
3897cc4920e5Smrgm4_require([_LT_DECL_SED])dnl
3898cc4920e5Smrgm4_require([_LT_DECL_EGREP])dnl
3899cc4920e5Smrgm4_require([_LT_TAG_COMPILER])dnl
3900cc4920e5Smrg
3901cc4920e5Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3902cc4920e5SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3903cc4920e5SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3904cc4920e5Smrg[
3905cc4920e5Smrg# These are sane defaults that work on at least a few old systems.
3906cc4920e5Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3907cc4920e5Smrg
3908cc4920e5Smrg# Character class describing NM global symbol codes.
3909cc4920e5Smrgsymcode='[[BCDEGRST]]'
3910cc4920e5Smrg
3911cc4920e5Smrg# Regexp to match symbols that can be accessed directly from C.
3912cc4920e5Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3913cc4920e5Smrg
3914cc4920e5Smrg# Define system-specific variables.
3915cc4920e5Smrgcase $host_os in
3916cc4920e5Smrgaix*)
3917cc4920e5Smrg  symcode='[[BCDT]]'
3918cc4920e5Smrg  ;;
3919cc4920e5Smrgcygwin* | mingw* | pw32* | cegcc*)
3920cc4920e5Smrg  symcode='[[ABCDGISTW]]'
3921cc4920e5Smrg  ;;
3922cc4920e5Smrghpux*)
3923cc4920e5Smrg  if test ia64 = "$host_cpu"; then
3924cc4920e5Smrg    symcode='[[ABCDEGRST]]'
3925cc4920e5Smrg  fi
3926cc4920e5Smrg  ;;
3927cc4920e5Smrgirix* | nonstopux*)
3928cc4920e5Smrg  symcode='[[BCDEGRST]]'
3929cc4920e5Smrg  ;;
3930cc4920e5Smrgosf*)
3931cc4920e5Smrg  symcode='[[BCDEGQRST]]'
3932cc4920e5Smrg  ;;
3933cc4920e5Smrgsolaris*)
3934cc4920e5Smrg  symcode='[[BDRT]]'
3935cc4920e5Smrg  ;;
3936cc4920e5Smrgsco3.2v5*)
3937cc4920e5Smrg  symcode='[[DT]]'
3938cc4920e5Smrg  ;;
3939cc4920e5Smrgsysv4.2uw2*)
3940cc4920e5Smrg  symcode='[[DT]]'
3941cc4920e5Smrg  ;;
3942cc4920e5Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3943cc4920e5Smrg  symcode='[[ABDT]]'
3944cc4920e5Smrg  ;;
3945cc4920e5Smrgsysv4)
3946cc4920e5Smrg  symcode='[[DFNSTU]]'
3947cc4920e5Smrg  ;;
3948cc4920e5Smrgesac
3949cc4920e5Smrg
3950cc4920e5Smrg# If we're using GNU nm, then use its standard symbol codes.
3951cc4920e5Smrgcase `$NM -V 2>&1` in
3952cc4920e5Smrg*GNU* | *'with BFD'*)
3953cc4920e5Smrg  symcode='[[ABCDGIRSTW]]' ;;
3954cc4920e5Smrgesac
3955cc4920e5Smrg
3956cc4920e5Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3957cc4920e5Smrg  # Gets list of data symbols to import.
3958cc4920e5Smrg  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3959cc4920e5Smrg  # Adjust the below global symbol transforms to fixup imported variables.
3960cc4920e5Smrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3961cc4920e5Smrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
3962cc4920e5Smrg  lt_c_name_lib_hook="\
3963cc4920e5Smrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
3964cc4920e5Smrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
3965cc4920e5Smrgelse
3966cc4920e5Smrg  # Disable hooks by default.
3967cc4920e5Smrg  lt_cv_sys_global_symbol_to_import=
3968cc4920e5Smrg  lt_cdecl_hook=
3969cc4920e5Smrg  lt_c_name_hook=
3970cc4920e5Smrg  lt_c_name_lib_hook=
3971cc4920e5Smrgfi
3972cc4920e5Smrg
3973cc4920e5Smrg# Transform an extracted symbol line into a proper C declaration.
3974cc4920e5Smrg# Some systems (esp. on ia64) link data and code symbols differently,
3975cc4920e5Smrg# so use this general approach.
3976cc4920e5Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\
3977cc4920e5Smrg$lt_cdecl_hook\
3978cc4920e5Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3979cc4920e5Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3980cc4920e5Smrg
3981cc4920e5Smrg# Transform an extracted symbol line into symbol name and symbol address
3982cc4920e5Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3983cc4920e5Smrg$lt_c_name_hook\
3984cc4920e5Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
3985cc4920e5Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
3986cc4920e5Smrg
3987cc4920e5Smrg# Transform an extracted symbol line into symbol name with lib prefix and
3988cc4920e5Smrg# symbol address.
3989cc4920e5Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
3990cc4920e5Smrg$lt_c_name_lib_hook\
3991cc4920e5Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
3992cc4920e5Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
3993cc4920e5Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
3994cc4920e5Smrg
3995cc4920e5Smrg# Handle CRLF in mingw tool chain
3996cc4920e5Smrgopt_cr=
3997cc4920e5Smrgcase $build_os in
3998cc4920e5Smrgmingw*)
3999cc4920e5Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4000cc4920e5Smrg  ;;
4001cc4920e5Smrgesac
4002cc4920e5Smrg
4003cc4920e5Smrg# Try without a prefix underscore, then with it.
4004cc4920e5Smrgfor ac_symprfx in "" "_"; do
4005cc4920e5Smrg
4006cc4920e5Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4007cc4920e5Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4008cc4920e5Smrg
4009cc4920e5Smrg  # Write the raw and C identifiers.
4010cc4920e5Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4011cc4920e5Smrg    # Fake it for dumpbin and say T for any non-static function,
4012cc4920e5Smrg    # D for any global variable and I for any imported variable.
4013cc4920e5Smrg    # Also find C++ and __fastcall symbols from MSVC++,
4014cc4920e5Smrg    # which start with @ or ?.
4015cc4920e5Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4016cc4920e5Smrg"     {last_section=section; section=\$ 3};"\
4017cc4920e5Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4018cc4920e5Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4019cc4920e5Smrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4020cc4920e5Smrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4021cc4920e5Smrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4022cc4920e5Smrg"     \$ 0!~/External *\|/{next};"\
4023cc4920e5Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4024cc4920e5Smrg"     {if(hide[section]) next};"\
4025cc4920e5Smrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4026cc4920e5Smrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4027cc4920e5Smrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4028cc4920e5Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4029cc4920e5Smrg"     ' prfx=^$ac_symprfx]"
4030cc4920e5Smrg  else
4031cc4920e5Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4032cc4920e5Smrg  fi
4033cc4920e5Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4034cc4920e5Smrg
4035cc4920e5Smrg  # Check to see that the pipe works correctly.
4036cc4920e5Smrg  pipe_works=no
4037cc4920e5Smrg
4038cc4920e5Smrg  rm -f conftest*
4039cc4920e5Smrg  cat > conftest.$ac_ext <<_LT_EOF
4040cc4920e5Smrg#ifdef __cplusplus
4041cc4920e5Smrgextern "C" {
4042cc4920e5Smrg#endif
4043cc4920e5Smrgchar nm_test_var;
4044cc4920e5Smrgvoid nm_test_func(void);
4045cc4920e5Smrgvoid nm_test_func(void){}
4046cc4920e5Smrg#ifdef __cplusplus
4047cc4920e5Smrg}
4048cc4920e5Smrg#endif
4049cc4920e5Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
4050cc4920e5Smrg_LT_EOF
4051cc4920e5Smrg
4052cc4920e5Smrg  if AC_TRY_EVAL(ac_compile); then
4053cc4920e5Smrg    # Now try to grab the symbols.
4054cc4920e5Smrg    nlist=conftest.nm
4055cc4920e5Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4056cc4920e5Smrg      # Try sorting and uniquifying the output.
4057cc4920e5Smrg      if sort "$nlist" | uniq > "$nlist"T; then
4058cc4920e5Smrg	mv -f "$nlist"T "$nlist"
4059cc4920e5Smrg      else
4060cc4920e5Smrg	rm -f "$nlist"T
4061cc4920e5Smrg      fi
4062cc4920e5Smrg
4063cc4920e5Smrg      # Make sure that we snagged all the symbols we need.
4064cc4920e5Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4065cc4920e5Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4066cc4920e5Smrg	  cat <<_LT_EOF > conftest.$ac_ext
4067cc4920e5Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4068cc4920e5Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4069cc4920e5Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
4070cc4920e5Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4071cc4920e5Smrg# define LT@&t@_DLSYM_CONST
4072cc4920e5Smrg#elif defined __osf__
4073cc4920e5Smrg/* This system does not cope well with relocations in const data.  */
4074cc4920e5Smrg# define LT@&t@_DLSYM_CONST
4075cc4920e5Smrg#else
4076cc4920e5Smrg# define LT@&t@_DLSYM_CONST const
4077cc4920e5Smrg#endif
4078cc4920e5Smrg
4079cc4920e5Smrg#ifdef __cplusplus
4080cc4920e5Smrgextern "C" {
4081cc4920e5Smrg#endif
4082cc4920e5Smrg
4083cc4920e5Smrg_LT_EOF
4084cc4920e5Smrg	  # Now generate the symbol file.
4085cc4920e5Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4086cc4920e5Smrg
4087cc4920e5Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
4088cc4920e5Smrg
4089cc4920e5Smrg/* The mapping between symbol names and symbols.  */
4090cc4920e5SmrgLT@&t@_DLSYM_CONST struct {
4091cc4920e5Smrg  const char *name;
4092cc4920e5Smrg  void       *address;
4093cc4920e5Smrg}
4094cc4920e5Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
4095cc4920e5Smrg{
4096cc4920e5Smrg  { "@PROGRAM@", (void *) 0 },
4097cc4920e5Smrg_LT_EOF
4098cc4920e5Smrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4099cc4920e5Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
4100cc4920e5Smrg  {0, (void *) 0}
4101cc4920e5Smrg};
4102cc4920e5Smrg
4103cc4920e5Smrg/* This works around a problem in FreeBSD linker */
4104cc4920e5Smrg#ifdef FREEBSD_WORKAROUND
4105cc4920e5Smrgstatic const void *lt_preloaded_setup() {
4106cc4920e5Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
4107cc4920e5Smrg}
4108cc4920e5Smrg#endif
4109cc4920e5Smrg
4110cc4920e5Smrg#ifdef __cplusplus
4111cc4920e5Smrg}
4112cc4920e5Smrg#endif
4113cc4920e5Smrg_LT_EOF
4114cc4920e5Smrg	  # Now try linking the two files.
4115cc4920e5Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
4116cc4920e5Smrg	  lt_globsym_save_LIBS=$LIBS
4117cc4920e5Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
4118cc4920e5Smrg	  LIBS=conftstm.$ac_objext
4119cc4920e5Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4120cc4920e5Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4121cc4920e5Smrg	    pipe_works=yes
4122cc4920e5Smrg	  fi
4123cc4920e5Smrg	  LIBS=$lt_globsym_save_LIBS
4124cc4920e5Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
4125cc4920e5Smrg	else
4126cc4920e5Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4127cc4920e5Smrg	fi
4128cc4920e5Smrg      else
4129cc4920e5Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4130cc4920e5Smrg      fi
4131cc4920e5Smrg    else
4132cc4920e5Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4133cc4920e5Smrg    fi
4134cc4920e5Smrg  else
4135cc4920e5Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4136cc4920e5Smrg    cat conftest.$ac_ext >&5
4137cc4920e5Smrg  fi
4138cc4920e5Smrg  rm -rf conftest* conftst*
4139cc4920e5Smrg
4140cc4920e5Smrg  # Do not use the global_symbol_pipe unless it works.
4141cc4920e5Smrg  if test yes = "$pipe_works"; then
4142cc4920e5Smrg    break
4143cc4920e5Smrg  else
4144cc4920e5Smrg    lt_cv_sys_global_symbol_pipe=
4145cc4920e5Smrg  fi
4146cc4920e5Smrgdone
4147cc4920e5Smrg])
4148cc4920e5Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4149cc4920e5Smrg  lt_cv_sys_global_symbol_to_cdecl=
4150cc4920e5Smrgfi
4151cc4920e5Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4152cc4920e5Smrg  AC_MSG_RESULT(failed)
4153cc4920e5Smrgelse
4154cc4920e5Smrg  AC_MSG_RESULT(ok)
4155cc4920e5Smrgfi
4156cc4920e5Smrg
4157cc4920e5Smrg# Response file support.
4158cc4920e5Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
4159cc4920e5Smrg  nm_file_list_spec='@'
4160cc4920e5Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4161cc4920e5Smrg  nm_file_list_spec='@'
4162cc4920e5Smrgfi
4163cc4920e5Smrg
4164cc4920e5Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4165cc4920e5Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
4166cc4920e5Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4167cc4920e5Smrg    [Transform the output of nm in a proper C declaration])
4168cc4920e5Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4169cc4920e5Smrg    [Transform the output of nm into a list of symbols to manually relocate])
4170cc4920e5Smrg_LT_DECL([global_symbol_to_c_name_address],
4171cc4920e5Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4172cc4920e5Smrg    [Transform the output of nm in a C name address pair])
4173cc4920e5Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4174cc4920e5Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4175cc4920e5Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
4176cc4920e5Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4177cc4920e5Smrg    [The name lister interface])
4178cc4920e5Smrg_LT_DECL([], [nm_file_list_spec], [1],
4179cc4920e5Smrg    [Specify filename containing input files for $NM])
4180cc4920e5Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
4181cc4920e5Smrg
4182cc4920e5Smrg
4183cc4920e5Smrg# _LT_COMPILER_PIC([TAGNAME])
4184cc4920e5Smrg# ---------------------------
4185cc4920e5Smrgm4_defun([_LT_COMPILER_PIC],
4186cc4920e5Smrg[m4_require([_LT_TAG_COMPILER])dnl
4187cc4920e5Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4188cc4920e5Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4189cc4920e5Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
4190cc4920e5Smrg
4191cc4920e5Smrgm4_if([$1], [CXX], [
4192cc4920e5Smrg  # C++ specific cases for pic, static, wl, etc.
4193cc4920e5Smrg  if test yes = "$GXX"; then
4194cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4195cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4196cc4920e5Smrg
4197cc4920e5Smrg    case $host_os in
4198cc4920e5Smrg    aix*)
4199cc4920e5Smrg      # All AIX code is PIC.
4200cc4920e5Smrg      if test ia64 = "$host_cpu"; then
4201cc4920e5Smrg	# AIX 5 now supports IA64 processor
4202cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4203cc4920e5Smrg      fi
4204cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4205cc4920e5Smrg      ;;
4206cc4920e5Smrg
4207cc4920e5Smrg    amigaos*)
4208cc4920e5Smrg      case $host_cpu in
4209cc4920e5Smrg      powerpc)
4210cc4920e5Smrg            # see comment about AmigaOS4 .so support
4211cc4920e5Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4212cc4920e5Smrg        ;;
4213cc4920e5Smrg      m68k)
4214cc4920e5Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
4215cc4920e5Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
4216cc4920e5Smrg            # like '-m68040'.
4217cc4920e5Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4218cc4920e5Smrg        ;;
4219cc4920e5Smrg      esac
4220cc4920e5Smrg      ;;
4221cc4920e5Smrg
4222cc4920e5Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4223cc4920e5Smrg      # PIC is the default for these OSes.
4224cc4920e5Smrg      ;;
4225cc4920e5Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
4226cc4920e5Smrg      # This hack is so that the source file can tell whether it is being
4227cc4920e5Smrg      # built for inclusion in a dll (and should export symbols for example).
4228cc4920e5Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4229cc4920e5Smrg      # (--disable-auto-import) libraries
4230cc4920e5Smrg      m4_if([$1], [GCJ], [],
4231cc4920e5Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4232cc4920e5Smrg      case $host_os in
4233cc4920e5Smrg      os2*)
4234cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4235cc4920e5Smrg	;;
4236cc4920e5Smrg      esac
4237cc4920e5Smrg      ;;
4238cc4920e5Smrg    darwin* | rhapsody*)
4239cc4920e5Smrg      # PIC is the default on this platform
4240cc4920e5Smrg      # Common symbols not allowed in MH_DYLIB files
4241cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4242cc4920e5Smrg      ;;
4243cc4920e5Smrg    *djgpp*)
4244cc4920e5Smrg      # DJGPP does not support shared libraries at all
4245cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4246cc4920e5Smrg      ;;
4247cc4920e5Smrg    haiku*)
4248cc4920e5Smrg      # PIC is the default for Haiku.
4249cc4920e5Smrg      # The "-static" flag exists, but is broken.
4250cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4251cc4920e5Smrg      ;;
4252cc4920e5Smrg    interix[[3-9]]*)
4253cc4920e5Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4254cc4920e5Smrg      # Instead, we relocate shared libraries at runtime.
4255cc4920e5Smrg      ;;
4256cc4920e5Smrg    sysv4*MP*)
4257cc4920e5Smrg      if test -d /usr/nec; then
4258cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4259cc4920e5Smrg      fi
4260cc4920e5Smrg      ;;
4261cc4920e5Smrg    hpux*)
4262cc4920e5Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4263cc4920e5Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4264cc4920e5Smrg      # sets the default TLS model and affects inlining.
4265cc4920e5Smrg      case $host_cpu in
4266cc4920e5Smrg      hppa*64*)
4267cc4920e5Smrg	;;
4268cc4920e5Smrg      *)
4269cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4270cc4920e5Smrg	;;
4271cc4920e5Smrg      esac
4272cc4920e5Smrg      ;;
4273cc4920e5Smrg    *qnx* | *nto*)
4274cc4920e5Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4275cc4920e5Smrg      # it will coredump.
4276cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4277cc4920e5Smrg      ;;
4278cc4920e5Smrg    *)
4279cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4280cc4920e5Smrg      ;;
4281cc4920e5Smrg    esac
4282cc4920e5Smrg  else
4283cc4920e5Smrg    case $host_os in
4284cc4920e5Smrg      aix[[4-9]]*)
4285cc4920e5Smrg	# All AIX code is PIC.
4286cc4920e5Smrg	if test ia64 = "$host_cpu"; then
4287cc4920e5Smrg	  # AIX 5 now supports IA64 processor
4288cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4289cc4920e5Smrg	else
4290cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4291cc4920e5Smrg	fi
4292cc4920e5Smrg	;;
4293cc4920e5Smrg      chorus*)
4294cc4920e5Smrg	case $cc_basename in
4295cc4920e5Smrg	cxch68*)
4296cc4920e5Smrg	  # Green Hills C++ Compiler
4297cc4920e5Smrg	  # _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"
4298cc4920e5Smrg	  ;;
4299cc4920e5Smrg	esac
4300cc4920e5Smrg	;;
4301cc4920e5Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
4302cc4920e5Smrg	# This hack is so that the source file can tell whether it is being
4303cc4920e5Smrg	# built for inclusion in a dll (and should export symbols for example).
4304cc4920e5Smrg	m4_if([$1], [GCJ], [],
4305cc4920e5Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4306cc4920e5Smrg	;;
4307cc4920e5Smrg      dgux*)
4308cc4920e5Smrg	case $cc_basename in
4309cc4920e5Smrg	  ec++*)
4310cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4311cc4920e5Smrg	    ;;
4312cc4920e5Smrg	  ghcx*)
4313cc4920e5Smrg	    # Green Hills C++ Compiler
4314cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4315cc4920e5Smrg	    ;;
4316cc4920e5Smrg	  *)
4317cc4920e5Smrg	    ;;
4318cc4920e5Smrg	esac
4319cc4920e5Smrg	;;
4320cc4920e5Smrg      freebsd* | dragonfly*)
4321cc4920e5Smrg	# FreeBSD uses GNU C++
4322cc4920e5Smrg	;;
4323cc4920e5Smrg      hpux9* | hpux10* | hpux11*)
4324cc4920e5Smrg	case $cc_basename in
4325cc4920e5Smrg	  CC*)
4326cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4327cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4328cc4920e5Smrg	    if test ia64 != "$host_cpu"; then
4329cc4920e5Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4330cc4920e5Smrg	    fi
4331cc4920e5Smrg	    ;;
4332cc4920e5Smrg	  aCC*)
4333cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4334cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4335cc4920e5Smrg	    case $host_cpu in
4336cc4920e5Smrg	    hppa*64*|ia64*)
4337cc4920e5Smrg	      # +Z the default
4338cc4920e5Smrg	      ;;
4339cc4920e5Smrg	    *)
4340cc4920e5Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4341cc4920e5Smrg	      ;;
4342cc4920e5Smrg	    esac
4343cc4920e5Smrg	    ;;
4344cc4920e5Smrg	  *)
4345cc4920e5Smrg	    ;;
4346cc4920e5Smrg	esac
4347cc4920e5Smrg	;;
4348cc4920e5Smrg      interix*)
4349cc4920e5Smrg	# This is c89, which is MS Visual C++ (no shared libs)
4350cc4920e5Smrg	# Anyone wants to do a port?
4351cc4920e5Smrg	;;
4352cc4920e5Smrg      irix5* | irix6* | nonstopux*)
4353cc4920e5Smrg	case $cc_basename in
4354cc4920e5Smrg	  CC*)
4355cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4356cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4357cc4920e5Smrg	    # CC pic flag -KPIC is the default.
4358cc4920e5Smrg	    ;;
4359cc4920e5Smrg	  *)
4360cc4920e5Smrg	    ;;
4361cc4920e5Smrg	esac
4362cc4920e5Smrg	;;
4363cc4920e5Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4364cc4920e5Smrg	case $cc_basename in
4365cc4920e5Smrg	  KCC*)
4366cc4920e5Smrg	    # KAI C++ Compiler
4367cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4368cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4369cc4920e5Smrg	    ;;
4370cc4920e5Smrg	  ecpc* )
4371cc4920e5Smrg	    # old Intel C++ for x86_64, which still supported -KPIC.
4372cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4373cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4374cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4375cc4920e5Smrg	    ;;
4376cc4920e5Smrg	  icpc* )
4377cc4920e5Smrg	    # Intel C++, used to be incompatible with GCC.
4378cc4920e5Smrg	    # ICC 10 doesn't accept -KPIC any more.
4379cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4380cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4381cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4382cc4920e5Smrg	    ;;
4383cc4920e5Smrg	  pgCC* | pgcpp*)
4384cc4920e5Smrg	    # Portland Group C++ compiler
4385cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4387cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4388cc4920e5Smrg	    ;;
4389cc4920e5Smrg	  cxx*)
4390cc4920e5Smrg	    # Compaq C++
4391cc4920e5Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4392cc4920e5Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4393cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4394cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4395cc4920e5Smrg	    ;;
4396cc4920e5Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4397cc4920e5Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4398cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4399cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4400cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4401cc4920e5Smrg	    ;;
4402cc4920e5Smrg	  *)
4403cc4920e5Smrg	    case `$CC -V 2>&1 | sed 5q` in
4404cc4920e5Smrg	    *Sun\ C*)
4405cc4920e5Smrg	      # Sun C++ 5.9
4406cc4920e5Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4407cc4920e5Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4408cc4920e5Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4409cc4920e5Smrg	      ;;
4410cc4920e5Smrg	    esac
4411cc4920e5Smrg	    ;;
4412cc4920e5Smrg	esac
4413cc4920e5Smrg	;;
4414cc4920e5Smrg      lynxos*)
4415cc4920e5Smrg	;;
4416cc4920e5Smrg      m88k*)
4417cc4920e5Smrg	;;
4418cc4920e5Smrg      mvs*)
4419cc4920e5Smrg	case $cc_basename in
4420cc4920e5Smrg	  cxx*)
4421cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4422cc4920e5Smrg	    ;;
4423cc4920e5Smrg	  *)
4424cc4920e5Smrg	    ;;
4425cc4920e5Smrg	esac
4426cc4920e5Smrg	;;
4427cc4920e5Smrg      netbsd*)
4428cc4920e5Smrg	;;
4429cc4920e5Smrg      *qnx* | *nto*)
4430cc4920e5Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
4431cc4920e5Smrg        # it will coredump.
4432cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4433cc4920e5Smrg        ;;
4434cc4920e5Smrg      osf3* | osf4* | osf5*)
4435cc4920e5Smrg	case $cc_basename in
4436cc4920e5Smrg	  KCC*)
4437cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4438cc4920e5Smrg	    ;;
4439cc4920e5Smrg	  RCC*)
4440cc4920e5Smrg	    # Rational C++ 2.4.1
4441cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4442cc4920e5Smrg	    ;;
4443cc4920e5Smrg	  cxx*)
4444cc4920e5Smrg	    # Digital/Compaq C++
4445cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4446cc4920e5Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4447cc4920e5Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4448cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4449cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4450cc4920e5Smrg	    ;;
4451cc4920e5Smrg	  *)
4452cc4920e5Smrg	    ;;
4453cc4920e5Smrg	esac
4454cc4920e5Smrg	;;
4455cc4920e5Smrg      psos*)
4456cc4920e5Smrg	;;
4457cc4920e5Smrg      solaris*)
4458cc4920e5Smrg	case $cc_basename in
4459cc4920e5Smrg	  CC* | sunCC*)
4460cc4920e5Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
4461cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4462cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4463cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4464cc4920e5Smrg	    ;;
4465cc4920e5Smrg	  gcx*)
4466cc4920e5Smrg	    # Green Hills C++ Compiler
4467cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4468cc4920e5Smrg	    ;;
4469cc4920e5Smrg	  *)
4470cc4920e5Smrg	    ;;
4471cc4920e5Smrg	esac
4472cc4920e5Smrg	;;
4473cc4920e5Smrg      sunos4*)
4474cc4920e5Smrg	case $cc_basename in
4475cc4920e5Smrg	  CC*)
4476cc4920e5Smrg	    # Sun C++ 4.x
4477cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4478cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4479cc4920e5Smrg	    ;;
4480cc4920e5Smrg	  lcc*)
4481cc4920e5Smrg	    # Lucid
4482cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4483cc4920e5Smrg	    ;;
4484cc4920e5Smrg	  *)
4485cc4920e5Smrg	    ;;
4486cc4920e5Smrg	esac
4487cc4920e5Smrg	;;
4488cc4920e5Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4489cc4920e5Smrg	case $cc_basename in
4490cc4920e5Smrg	  CC*)
4491cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4492cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4493cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4494cc4920e5Smrg	    ;;
4495cc4920e5Smrg	esac
4496cc4920e5Smrg	;;
4497cc4920e5Smrg      tandem*)
4498cc4920e5Smrg	case $cc_basename in
4499cc4920e5Smrg	  NCC*)
4500cc4920e5Smrg	    # NonStop-UX NCC 3.20
4501cc4920e5Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4502cc4920e5Smrg	    ;;
4503cc4920e5Smrg	  *)
4504cc4920e5Smrg	    ;;
4505cc4920e5Smrg	esac
4506cc4920e5Smrg	;;
4507cc4920e5Smrg      vxworks*)
4508cc4920e5Smrg	;;
4509cc4920e5Smrg      *)
4510cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4511cc4920e5Smrg	;;
4512cc4920e5Smrg    esac
4513cc4920e5Smrg  fi
4514cc4920e5Smrg],
4515cc4920e5Smrg[
4516cc4920e5Smrg  if test yes = "$GCC"; then
4517cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4518cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4519cc4920e5Smrg
4520cc4920e5Smrg    case $host_os in
4521cc4920e5Smrg      aix*)
4522cc4920e5Smrg      # All AIX code is PIC.
4523cc4920e5Smrg      if test ia64 = "$host_cpu"; then
4524cc4920e5Smrg	# AIX 5 now supports IA64 processor
4525cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4526cc4920e5Smrg      fi
4527cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4528cc4920e5Smrg      ;;
4529cc4920e5Smrg
4530cc4920e5Smrg    amigaos*)
4531cc4920e5Smrg      case $host_cpu in
4532cc4920e5Smrg      powerpc)
4533cc4920e5Smrg            # see comment about AmigaOS4 .so support
4534cc4920e5Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4535cc4920e5Smrg        ;;
4536cc4920e5Smrg      m68k)
4537cc4920e5Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
4538cc4920e5Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
4539cc4920e5Smrg            # like '-m68040'.
4540cc4920e5Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4541cc4920e5Smrg        ;;
4542cc4920e5Smrg      esac
4543cc4920e5Smrg      ;;
4544cc4920e5Smrg
4545cc4920e5Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4546cc4920e5Smrg      # PIC is the default for these OSes.
4547cc4920e5Smrg      ;;
4548cc4920e5Smrg
4549cc4920e5Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
4550cc4920e5Smrg      # This hack is so that the source file can tell whether it is being
4551cc4920e5Smrg      # built for inclusion in a dll (and should export symbols for example).
4552cc4920e5Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4553cc4920e5Smrg      # (--disable-auto-import) libraries
4554cc4920e5Smrg      m4_if([$1], [GCJ], [],
4555cc4920e5Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4556cc4920e5Smrg      case $host_os in
4557cc4920e5Smrg      os2*)
4558cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4559cc4920e5Smrg	;;
4560cc4920e5Smrg      esac
4561cc4920e5Smrg      ;;
4562cc4920e5Smrg
4563cc4920e5Smrg    darwin* | rhapsody*)
4564cc4920e5Smrg      # PIC is the default on this platform
4565cc4920e5Smrg      # Common symbols not allowed in MH_DYLIB files
4566cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4567cc4920e5Smrg      ;;
4568cc4920e5Smrg
4569cc4920e5Smrg    haiku*)
4570cc4920e5Smrg      # PIC is the default for Haiku.
4571cc4920e5Smrg      # The "-static" flag exists, but is broken.
4572cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4573cc4920e5Smrg      ;;
4574cc4920e5Smrg
4575cc4920e5Smrg    hpux*)
4576cc4920e5Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4577cc4920e5Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4578cc4920e5Smrg      # sets the default TLS model and affects inlining.
4579cc4920e5Smrg      case $host_cpu in
4580cc4920e5Smrg      hppa*64*)
4581cc4920e5Smrg	# +Z the default
4582cc4920e5Smrg	;;
4583cc4920e5Smrg      *)
4584cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4585cc4920e5Smrg	;;
4586cc4920e5Smrg      esac
4587cc4920e5Smrg      ;;
4588cc4920e5Smrg
4589cc4920e5Smrg    interix[[3-9]]*)
4590cc4920e5Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4591cc4920e5Smrg      # Instead, we relocate shared libraries at runtime.
4592cc4920e5Smrg      ;;
4593cc4920e5Smrg
4594cc4920e5Smrg    msdosdjgpp*)
4595cc4920e5Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
4596cc4920e5Smrg      # on systems that don't support them.
4597cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4598cc4920e5Smrg      enable_shared=no
4599cc4920e5Smrg      ;;
4600cc4920e5Smrg
4601cc4920e5Smrg    *nto* | *qnx*)
4602cc4920e5Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4603cc4920e5Smrg      # it will coredump.
4604cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4605cc4920e5Smrg      ;;
4606cc4920e5Smrg
4607cc4920e5Smrg    sysv4*MP*)
4608cc4920e5Smrg      if test -d /usr/nec; then
4609cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4610cc4920e5Smrg      fi
4611cc4920e5Smrg      ;;
4612cc4920e5Smrg
4613cc4920e5Smrg    *)
4614cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4615cc4920e5Smrg      ;;
4616cc4920e5Smrg    esac
4617cc4920e5Smrg
4618cc4920e5Smrg    case $cc_basename in
4619cc4920e5Smrg    nvcc*) # Cuda Compiler Driver 2.2
4620cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4621cc4920e5Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4622cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4623cc4920e5Smrg      fi
4624cc4920e5Smrg      ;;
4625cc4920e5Smrg    esac
4626cc4920e5Smrg  else
4627cc4920e5Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
4628cc4920e5Smrg    case $host_os in
4629cc4920e5Smrg    aix*)
4630cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4631cc4920e5Smrg      if test ia64 = "$host_cpu"; then
4632cc4920e5Smrg	# AIX 5 now supports IA64 processor
4633cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4634cc4920e5Smrg      else
4635cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4636cc4920e5Smrg      fi
4637cc4920e5Smrg      ;;
4638cc4920e5Smrg
4639cc4920e5Smrg    darwin* | rhapsody*)
4640cc4920e5Smrg      # PIC is the default on this platform
4641cc4920e5Smrg      # Common symbols not allowed in MH_DYLIB files
4642cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4643cc4920e5Smrg      case $cc_basename in
4644cc4920e5Smrg      nagfor*)
4645cc4920e5Smrg        # NAG Fortran compiler
4646cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4647cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4648cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4649cc4920e5Smrg        ;;
4650cc4920e5Smrg      esac
4651cc4920e5Smrg      ;;
4652cc4920e5Smrg
4653cc4920e5Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
4654cc4920e5Smrg      # This hack is so that the source file can tell whether it is being
4655cc4920e5Smrg      # built for inclusion in a dll (and should export symbols for example).
4656cc4920e5Smrg      m4_if([$1], [GCJ], [],
4657cc4920e5Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4658cc4920e5Smrg      case $host_os in
4659cc4920e5Smrg      os2*)
4660cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4661cc4920e5Smrg	;;
4662cc4920e5Smrg      esac
4663cc4920e5Smrg      ;;
4664cc4920e5Smrg
4665cc4920e5Smrg    hpux9* | hpux10* | hpux11*)
4666cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4667cc4920e5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4668cc4920e5Smrg      # not for PA HP-UX.
4669cc4920e5Smrg      case $host_cpu in
4670cc4920e5Smrg      hppa*64*|ia64*)
4671cc4920e5Smrg	# +Z the default
4672cc4920e5Smrg	;;
4673cc4920e5Smrg      *)
4674cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4675cc4920e5Smrg	;;
4676cc4920e5Smrg      esac
4677cc4920e5Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4678cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4679cc4920e5Smrg      ;;
4680cc4920e5Smrg
4681cc4920e5Smrg    irix5* | irix6* | nonstopux*)
4682cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4683cc4920e5Smrg      # PIC (with -KPIC) is the default.
4684cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4685cc4920e5Smrg      ;;
4686cc4920e5Smrg
4687cc4920e5Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4688cc4920e5Smrg      case $cc_basename in
4689cc4920e5Smrg      # old Intel for x86_64, which still supported -KPIC.
4690cc4920e5Smrg      ecc*)
4691cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4692cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4693cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4694cc4920e5Smrg        ;;
4695cc4920e5Smrg      # icc used to be incompatible with GCC.
4696cc4920e5Smrg      # ICC 10 doesn't accept -KPIC any more.
4697cc4920e5Smrg      icc* | ifort*)
4698cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4699cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4700cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4701cc4920e5Smrg        ;;
4702cc4920e5Smrg      # Lahey Fortran 8.1.
4703cc4920e5Smrg      lf95*)
4704cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4705cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4706cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4707cc4920e5Smrg	;;
4708cc4920e5Smrg      nagfor*)
4709cc4920e5Smrg	# NAG Fortran compiler
4710cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4711cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4712cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4713cc4920e5Smrg	;;
4714cc4920e5Smrg      tcc*)
4715cc4920e5Smrg	# Fabrice Bellard et al's Tiny C Compiler
4716cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4717cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4718cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4719cc4920e5Smrg	;;
4720cc4920e5Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4721cc4920e5Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4722cc4920e5Smrg	# which looks to be a dead project)
4723cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4724cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4725cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4726cc4920e5Smrg        ;;
4727cc4920e5Smrg      ccc*)
4728cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4729cc4920e5Smrg        # All Alpha code is PIC.
4730cc4920e5Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4731cc4920e5Smrg        ;;
4732cc4920e5Smrg      xl* | bgxl* | bgf* | mpixl*)
4733cc4920e5Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4734cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4736cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4737cc4920e5Smrg	;;
4738cc4920e5Smrg      *)
4739cc4920e5Smrg	case `$CC -V 2>&1 | sed 5q` in
4740cc4920e5Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4741cc4920e5Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4742cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4743cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4744cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4745cc4920e5Smrg	  ;;
4746cc4920e5Smrg	*Sun\ F* | *Sun*Fortran*)
4747cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4748cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4749cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4750cc4920e5Smrg	  ;;
4751cc4920e5Smrg	*Sun\ C*)
4752cc4920e5Smrg	  # Sun C 5.9
4753cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4754cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4755cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4756cc4920e5Smrg	  ;;
4757cc4920e5Smrg        *Intel*\ [[CF]]*Compiler*)
4758cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4759cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4760cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4761cc4920e5Smrg	  ;;
4762cc4920e5Smrg	*Portland\ Group*)
4763cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4764cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4765cc4920e5Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4766cc4920e5Smrg	  ;;
4767cc4920e5Smrg	esac
4768cc4920e5Smrg	;;
4769cc4920e5Smrg      esac
4770cc4920e5Smrg      ;;
4771cc4920e5Smrg
4772cc4920e5Smrg    newsos6)
4773cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4774cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4775cc4920e5Smrg      ;;
4776cc4920e5Smrg
4777cc4920e5Smrg    *nto* | *qnx*)
4778cc4920e5Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4779cc4920e5Smrg      # it will coredump.
4780cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4781cc4920e5Smrg      ;;
4782cc4920e5Smrg
4783cc4920e5Smrg    osf3* | osf4* | osf5*)
4784cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4785cc4920e5Smrg      # All OSF/1 code is PIC.
4786cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4787cc4920e5Smrg      ;;
4788cc4920e5Smrg
4789cc4920e5Smrg    rdos*)
4790cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4791cc4920e5Smrg      ;;
4792cc4920e5Smrg
4793cc4920e5Smrg    solaris*)
4794cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4795cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4796cc4920e5Smrg      case $cc_basename in
4797cc4920e5Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4798cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4799cc4920e5Smrg      *)
4800cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4801cc4920e5Smrg      esac
4802cc4920e5Smrg      ;;
4803cc4920e5Smrg
4804cc4920e5Smrg    sunos4*)
4805cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4806cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4807cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4808cc4920e5Smrg      ;;
4809cc4920e5Smrg
4810cc4920e5Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4811cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4812cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4813cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4814cc4920e5Smrg      ;;
4815cc4920e5Smrg
4816cc4920e5Smrg    sysv4*MP*)
4817cc4920e5Smrg      if test -d /usr/nec; then
4818cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4819cc4920e5Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4820cc4920e5Smrg      fi
4821cc4920e5Smrg      ;;
4822cc4920e5Smrg
4823cc4920e5Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4824cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4825cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4826cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4827cc4920e5Smrg      ;;
4828cc4920e5Smrg
4829cc4920e5Smrg    unicos*)
4830cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4831cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4832cc4920e5Smrg      ;;
4833cc4920e5Smrg
4834cc4920e5Smrg    uts4*)
4835cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4836cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4837cc4920e5Smrg      ;;
4838cc4920e5Smrg
4839cc4920e5Smrg    *)
4840cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4841cc4920e5Smrg      ;;
4842cc4920e5Smrg    esac
4843cc4920e5Smrg  fi
4844cc4920e5Smrg])
4845cc4920e5Smrgcase $host_os in
4846cc4920e5Smrg  # For platforms that do not support PIC, -DPIC is meaningless:
4847cc4920e5Smrg  *djgpp*)
4848cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4849cc4920e5Smrg    ;;
4850cc4920e5Smrg  *)
4851cc4920e5Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4852cc4920e5Smrg    ;;
4853cc4920e5Smrgesac
4854cc4920e5Smrg
4855cc4920e5SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
4856cc4920e5Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4857cc4920e5Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4858cc4920e5Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4859cc4920e5Smrg
4860cc4920e5Smrg#
4861cc4920e5Smrg# Check to make sure the PIC flag actually works.
4862cc4920e5Smrg#
4863cc4920e5Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4864cc4920e5Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4865cc4920e5Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4866cc4920e5Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4867cc4920e5Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4868cc4920e5Smrg     "" | " "*) ;;
4869cc4920e5Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4870cc4920e5Smrg     esac],
4871cc4920e5Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4872cc4920e5Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4873cc4920e5Smrgfi
4874cc4920e5Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4875cc4920e5Smrg	[Additional compiler flags for building library objects])
4876cc4920e5Smrg
4877cc4920e5Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4878cc4920e5Smrg	[How to pass a linker flag through the compiler])
4879cc4920e5Smrg#
4880cc4920e5Smrg# Check to make sure the static flag actually works.
4881cc4920e5Smrg#
4882cc4920e5Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4883cc4920e5Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4884cc4920e5Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4885cc4920e5Smrg  $lt_tmp_static_flag,
4886cc4920e5Smrg  [],
4887cc4920e5Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4888cc4920e5Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4889cc4920e5Smrg	[Compiler flag to prevent dynamic linking])
4890cc4920e5Smrg])# _LT_COMPILER_PIC
4891cc4920e5Smrg
4892cc4920e5Smrg
4893cc4920e5Smrg# _LT_LINKER_SHLIBS([TAGNAME])
4894cc4920e5Smrg# ----------------------------
4895cc4920e5Smrg# See if the linker supports building shared libraries.
4896cc4920e5Smrgm4_defun([_LT_LINKER_SHLIBS],
4897cc4920e5Smrg[AC_REQUIRE([LT_PATH_LD])dnl
4898cc4920e5SmrgAC_REQUIRE([LT_PATH_NM])dnl
4899cc4920e5Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4900cc4920e5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4901cc4920e5Smrgm4_require([_LT_DECL_EGREP])dnl
4902cc4920e5Smrgm4_require([_LT_DECL_SED])dnl
4903cc4920e5Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4904cc4920e5Smrgm4_require([_LT_TAG_COMPILER])dnl
4905cc4920e5SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4906cc4920e5Smrgm4_if([$1], [CXX], [
4907cc4920e5Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4908cc4920e5Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4909cc4920e5Smrg  case $host_os in
4910cc4920e5Smrg  aix[[4-9]]*)
4911cc4920e5Smrg    # If we're using GNU nm, then we don't want the "-C" option.
4912cc4920e5Smrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4913cc4920e5Smrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
4914cc4920e5Smrg    # weak defined symbols like other global defined symbols, whereas
4915cc4920e5Smrg    # GNU nm marks them as "W".
4916cc4920e5Smrg    # While the 'weak' keyword is ignored in the Export File, we need
4917cc4920e5Smrg    # it in the Import File for the 'aix-soname' feature, so we have
4918cc4920e5Smrg    # to replace the "-B" option with "-P" for AIX nm.
4919cc4920e5Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4920cc4920e5Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4921cc4920e5Smrg    else
4922cc4920e5Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4923cc4920e5Smrg    fi
4924cc4920e5Smrg    ;;
4925cc4920e5Smrg  pw32*)
4926cc4920e5Smrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4927cc4920e5Smrg    ;;
4928cc4920e5Smrg  cygwin* | mingw* | cegcc*)
4929cc4920e5Smrg    case $cc_basename in
4930cc4920e5Smrg    cl*)
4931cc4920e5Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4932cc4920e5Smrg      ;;
4933cc4920e5Smrg    *)
4934cc4920e5Smrg      _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'
4935cc4920e5Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4936cc4920e5Smrg      ;;
4937cc4920e5Smrg    esac
4938cc4920e5Smrg    ;;
4939cc4920e5Smrg  *)
4940cc4920e5Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4941cc4920e5Smrg    ;;
4942cc4920e5Smrg  esac
4943cc4920e5Smrg], [
4944cc4920e5Smrg  runpath_var=
4945cc4920e5Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4946cc4920e5Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
4947cc4920e5Smrg  _LT_TAGVAR(archive_cmds, $1)=
4948cc4920e5Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4949cc4920e5Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4950cc4920e5Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4951cc4920e5Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4952cc4920e5Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4953cc4920e5Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4954cc4920e5Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
4955cc4920e5Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4956cc4920e5Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4957cc4920e5Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4958cc4920e5Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4959cc4920e5Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4960cc4920e5Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
4961cc4920e5Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4962cc4920e5Smrg  _LT_TAGVAR(module_cmds, $1)=
4963cc4920e5Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4964cc4920e5Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4965cc4920e5Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4966cc4920e5Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4967cc4920e5Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4968cc4920e5Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
4969cc4920e5Smrg  # included in the symbol list
4970cc4920e5Smrg  _LT_TAGVAR(include_expsyms, $1)=
4971cc4920e5Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4972cc4920e5Smrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
4973cc4920e5Smrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4974cc4920e5Smrg  # as well as any symbol that contains 'd'.
4975cc4920e5Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4976cc4920e5Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4977cc4920e5Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4978cc4920e5Smrg  # the symbol is explicitly referenced.  Since portable code cannot
4979cc4920e5Smrg  # rely on this symbol name, it's probably fine to never include it in
4980cc4920e5Smrg  # preloaded symbol tables.
4981cc4920e5Smrg  # Exclude shared library initialization/finalization symbols.
4982cc4920e5Smrgdnl Note also adjust exclude_expsyms for C++ above.
4983cc4920e5Smrg  extract_expsyms_cmds=
4984cc4920e5Smrg
4985cc4920e5Smrg  case $host_os in
4986cc4920e5Smrg  cygwin* | mingw* | pw32* | cegcc*)
4987cc4920e5Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4988cc4920e5Smrg    # When not using gcc, we currently assume that we are using
4989cc4920e5Smrg    # Microsoft Visual C++.
4990cc4920e5Smrg    if test yes != "$GCC"; then
4991cc4920e5Smrg      with_gnu_ld=no
4992cc4920e5Smrg    fi
4993cc4920e5Smrg    ;;
4994cc4920e5Smrg  interix*)
4995cc4920e5Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4996cc4920e5Smrg    with_gnu_ld=yes
4997cc4920e5Smrg    ;;
4998cc4920e5Smrg  openbsd* | bitrig*)
4999cc4920e5Smrg    with_gnu_ld=no
5000cc4920e5Smrg    ;;
5001cc4920e5Smrg  esac
5002cc4920e5Smrg
5003cc4920e5Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
5004cc4920e5Smrg
5005cc4920e5Smrg  # On some targets, GNU ld is compatible enough with the native linker
5006cc4920e5Smrg  # that we're better off using the native interface for both.
5007cc4920e5Smrg  lt_use_gnu_ld_interface=no
5008cc4920e5Smrg  if test yes = "$with_gnu_ld"; then
5009cc4920e5Smrg    case $host_os in
5010cc4920e5Smrg      aix*)
5011cc4920e5Smrg	# The AIX port of GNU ld has always aspired to compatibility
5012cc4920e5Smrg	# with the native linker.  However, as the warning in the GNU ld
5013cc4920e5Smrg	# block says, versions before 2.19.5* couldn't really create working
5014cc4920e5Smrg	# shared libraries, regardless of the interface used.
5015cc4920e5Smrg	case `$LD -v 2>&1` in
5016cc4920e5Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5017cc4920e5Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5018cc4920e5Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5019cc4920e5Smrg	  *)
5020cc4920e5Smrg	    lt_use_gnu_ld_interface=yes
5021cc4920e5Smrg	    ;;
5022cc4920e5Smrg	esac
5023cc4920e5Smrg	;;
5024cc4920e5Smrg      *)
5025cc4920e5Smrg	lt_use_gnu_ld_interface=yes
5026cc4920e5Smrg	;;
5027cc4920e5Smrg    esac
5028cc4920e5Smrg  fi
5029cc4920e5Smrg
5030cc4920e5Smrg  if test yes = "$lt_use_gnu_ld_interface"; then
5031cc4920e5Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5032cc4920e5Smrg    wlarc='$wl'
5033cc4920e5Smrg
5034cc4920e5Smrg    # Set some defaults for GNU ld with shared library support. These
5035cc4920e5Smrg    # are reset later if shared libraries are not supported. Putting them
5036cc4920e5Smrg    # here allows them to be overridden if necessary.
5037cc4920e5Smrg    runpath_var=LD_RUN_PATH
5038cc4920e5Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5039cc4920e5Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5040cc4920e5Smrg    # ancient GNU ld didn't support --whole-archive et. al.
5041cc4920e5Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5042cc4920e5Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5043cc4920e5Smrg    else
5044cc4920e5Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5045cc4920e5Smrg    fi
5046cc4920e5Smrg    supports_anon_versioning=no
5047cc4920e5Smrg    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5048cc4920e5Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
5049cc4920e5Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5050cc4920e5Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5051cc4920e5Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5052cc4920e5Smrg      *\ 2.11.*) ;; # other 2.11 versions
5053cc4920e5Smrg      *) supports_anon_versioning=yes ;;
5054cc4920e5Smrg    esac
5055cc4920e5Smrg
5056cc4920e5Smrg    # See if GNU ld supports shared libraries.
5057cc4920e5Smrg    case $host_os in
5058cc4920e5Smrg    aix[[3-9]]*)
5059cc4920e5Smrg      # On AIX/PPC, the GNU linker is very broken
5060cc4920e5Smrg      if test ia64 != "$host_cpu"; then
5061cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5062cc4920e5Smrg	cat <<_LT_EOF 1>&2
5063cc4920e5Smrg
5064cc4920e5Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
5065cc4920e5Smrg*** to be unable to reliably create shared libraries on AIX.
5066cc4920e5Smrg*** Therefore, libtool is disabling shared libraries support.  If you
5067cc4920e5Smrg*** really care for shared libraries, you may want to install binutils
5068cc4920e5Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5069cc4920e5Smrg*** You will then need to restart the configuration process.
5070cc4920e5Smrg
5071cc4920e5Smrg_LT_EOF
5072cc4920e5Smrg      fi
5073cc4920e5Smrg      ;;
5074cc4920e5Smrg
5075cc4920e5Smrg    amigaos*)
5076cc4920e5Smrg      case $host_cpu in
5077cc4920e5Smrg      powerpc)
5078cc4920e5Smrg            # see comment about AmigaOS4 .so support
5079cc4920e5Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5080cc4920e5Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5081cc4920e5Smrg        ;;
5082cc4920e5Smrg      m68k)
5083cc4920e5Smrg            _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)'
5084cc4920e5Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5085cc4920e5Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5086cc4920e5Smrg        ;;
5087cc4920e5Smrg      esac
5088cc4920e5Smrg      ;;
5089cc4920e5Smrg
5090cc4920e5Smrg    beos*)
5091cc4920e5Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5092cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5093cc4920e5Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5094cc4920e5Smrg	# support --undefined.  This deserves some investigation.  FIXME
5095cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5096cc4920e5Smrg      else
5097cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5098cc4920e5Smrg      fi
5099cc4920e5Smrg      ;;
5100cc4920e5Smrg
5101cc4920e5Smrg    cygwin* | mingw* | pw32* | cegcc*)
5102cc4920e5Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5103cc4920e5Smrg      # as there is no search path for DLLs.
5104cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5105cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5106cc4920e5Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5107cc4920e5Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
5108cc4920e5Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5109cc4920e5Smrg      _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'
5110cc4920e5Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5111cc4920e5Smrg
5112cc4920e5Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5113cc4920e5Smrg        _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'
5114cc4920e5Smrg	# If the export-symbols file already is a .def file, use it as
5115cc4920e5Smrg	# is; otherwise, prepend EXPORTS...
5116cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5117cc4920e5Smrg          cp $export_symbols $output_objdir/$soname.def;
5118cc4920e5Smrg        else
5119cc4920e5Smrg          echo EXPORTS > $output_objdir/$soname.def;
5120cc4920e5Smrg          cat $export_symbols >> $output_objdir/$soname.def;
5121cc4920e5Smrg        fi~
5122cc4920e5Smrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5123cc4920e5Smrg      else
5124cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5125cc4920e5Smrg      fi
5126cc4920e5Smrg      ;;
5127cc4920e5Smrg
5128cc4920e5Smrg    haiku*)
5129cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5130cc4920e5Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5131cc4920e5Smrg      ;;
5132cc4920e5Smrg
5133cc4920e5Smrg    os2*)
5134cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5135cc4920e5Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5136cc4920e5Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5137cc4920e5Smrg      shrext_cmds=.dll
5138cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5139cc4920e5Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5140cc4920e5Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5141cc4920e5Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5142cc4920e5Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5143cc4920e5Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5144cc4920e5Smrg	emximp -o $lib $output_objdir/$libname.def'
5145cc4920e5Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5146cc4920e5Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5147cc4920e5Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5148cc4920e5Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5149cc4920e5Smrg	prefix_cmds="$SED"~
5150cc4920e5Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5151cc4920e5Smrg	  prefix_cmds="$prefix_cmds -e 1d";
5152cc4920e5Smrg	fi~
5153cc4920e5Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5154cc4920e5Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5155cc4920e5Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5156cc4920e5Smrg	emximp -o $lib $output_objdir/$libname.def'
5157cc4920e5Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5158cc4920e5Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5159cc4920e5Smrg      ;;
5160cc4920e5Smrg
5161cc4920e5Smrg    interix[[3-9]]*)
5162cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
5163cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5164cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5165cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5166cc4920e5Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5167cc4920e5Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5168cc4920e5Smrg      # default) and relocated if they conflict, which is a slow very memory
5169cc4920e5Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5170cc4920e5Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5171cc4920e5Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5172cc4920e5Smrg      _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'
5173cc4920e5Smrg      _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'
5174cc4920e5Smrg      ;;
5175cc4920e5Smrg
5176cc4920e5Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5177cc4920e5Smrg      tmp_diet=no
5178cc4920e5Smrg      if test linux-dietlibc = "$host_os"; then
5179cc4920e5Smrg	case $cc_basename in
5180cc4920e5Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5181cc4920e5Smrg	esac
5182cc4920e5Smrg      fi
5183cc4920e5Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5184cc4920e5Smrg	 && test no = "$tmp_diet"
5185cc4920e5Smrg      then
5186cc4920e5Smrg	tmp_addflag=' $pic_flag'
5187cc4920e5Smrg	tmp_sharedflag='-shared'
5188cc4920e5Smrg	case $cc_basename,$host_cpu in
5189cc4920e5Smrg        pgcc*)				# Portland Group C compiler
5190cc4920e5Smrg	  _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'
5191cc4920e5Smrg	  tmp_addflag=' $pic_flag'
5192cc4920e5Smrg	  ;;
5193cc4920e5Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
5194cc4920e5Smrg					# Portland Group f77 and f90 compilers
5195cc4920e5Smrg	  _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'
5196cc4920e5Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5197cc4920e5Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5198cc4920e5Smrg	  tmp_addflag=' -i_dynamic' ;;
5199cc4920e5Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5200cc4920e5Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5201cc4920e5Smrg	ifc* | ifort*)			# Intel Fortran compiler
5202cc4920e5Smrg	  tmp_addflag=' -nofor_main' ;;
5203cc4920e5Smrg	lf95*)				# Lahey Fortran 8.1
5204cc4920e5Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5205cc4920e5Smrg	  tmp_sharedflag='--shared' ;;
5206cc4920e5Smrg        nagfor*)                        # NAGFOR 5.3
5207cc4920e5Smrg          tmp_sharedflag='-Wl,-shared' ;;
5208cc4920e5Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5209cc4920e5Smrg	  tmp_sharedflag='-qmkshrobj'
5210cc4920e5Smrg	  tmp_addflag= ;;
5211cc4920e5Smrg	nvcc*)	# Cuda Compiler Driver 2.2
5212cc4920e5Smrg	  _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'
5213cc4920e5Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5214cc4920e5Smrg	  ;;
5215cc4920e5Smrg	esac
5216cc4920e5Smrg	case `$CC -V 2>&1 | sed 5q` in
5217cc4920e5Smrg	*Sun\ C*)			# Sun C 5.9
5218cc4920e5Smrg	  _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'
5219cc4920e5Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5220cc4920e5Smrg	  tmp_sharedflag='-G' ;;
5221cc4920e5Smrg	*Sun\ F*)			# Sun Fortran 8.3
5222cc4920e5Smrg	  tmp_sharedflag='-G' ;;
5223cc4920e5Smrg	esac
5224cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5225cc4920e5Smrg
5226cc4920e5Smrg        if test yes = "$supports_anon_versioning"; then
5227cc4920e5Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5228cc4920e5Smrg            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5229cc4920e5Smrg            echo "local: *; };" >> $output_objdir/$libname.ver~
5230cc4920e5Smrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5231cc4920e5Smrg        fi
5232cc4920e5Smrg
5233cc4920e5Smrg	case $cc_basename in
5234cc4920e5Smrg	tcc*)
5235cc4920e5Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5236cc4920e5Smrg	  ;;
5237cc4920e5Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
5238cc4920e5Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5239cc4920e5Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5240cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5241cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5242cc4920e5Smrg	  if test yes = "$supports_anon_versioning"; then
5243cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5244cc4920e5Smrg              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5245cc4920e5Smrg              echo "local: *; };" >> $output_objdir/$libname.ver~
5246cc4920e5Smrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5247cc4920e5Smrg	  fi
5248cc4920e5Smrg	  ;;
5249cc4920e5Smrg	esac
5250cc4920e5Smrg      else
5251cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5252cc4920e5Smrg      fi
5253cc4920e5Smrg      ;;
5254cc4920e5Smrg
5255cc4920e5Smrg    netbsd*)
5256cc4920e5Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5257cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5258cc4920e5Smrg	wlarc=
5259cc4920e5Smrg      else
5260cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5261cc4920e5Smrg	_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'
5262cc4920e5Smrg      fi
5263cc4920e5Smrg      ;;
5264cc4920e5Smrg
5265cc4920e5Smrg    solaris*)
5266cc4920e5Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5267cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5268cc4920e5Smrg	cat <<_LT_EOF 1>&2
5269cc4920e5Smrg
5270cc4920e5Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5271cc4920e5Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
5272cc4920e5Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5273cc4920e5Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5274cc4920e5Smrg*** your PATH or compiler configuration so that the native linker is
5275cc4920e5Smrg*** used, and then restart.
5276cc4920e5Smrg
5277cc4920e5Smrg_LT_EOF
5278cc4920e5Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5279cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5280cc4920e5Smrg	_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'
5281cc4920e5Smrg      else
5282cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5283cc4920e5Smrg      fi
5284cc4920e5Smrg      ;;
5285cc4920e5Smrg
5286cc4920e5Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5287cc4920e5Smrg      case `$LD -v 2>&1` in
5288cc4920e5Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5289cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5290cc4920e5Smrg	cat <<_LT_EOF 1>&2
5291cc4920e5Smrg
5292cc4920e5Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5293cc4920e5Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5294cc4920e5Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5295cc4920e5Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5296cc4920e5Smrg*** your PATH or compiler configuration so that the native linker is
5297cc4920e5Smrg*** used, and then restart.
5298cc4920e5Smrg
5299cc4920e5Smrg_LT_EOF
5300cc4920e5Smrg	;;
5301cc4920e5Smrg	*)
5302cc4920e5Smrg	  # For security reasons, it is highly recommended that you always
5303cc4920e5Smrg	  # use absolute paths for naming shared libraries, and exclude the
5304cc4920e5Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
5305cc4920e5Smrg	  # requires that you compile everything twice, which is a pain.
5306cc4920e5Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5307cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5308cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5309cc4920e5Smrg	    _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'
5310cc4920e5Smrg	  else
5311cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5312cc4920e5Smrg	  fi
5313cc4920e5Smrg	;;
5314cc4920e5Smrg      esac
5315cc4920e5Smrg      ;;
5316cc4920e5Smrg
5317cc4920e5Smrg    sunos4*)
5318cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5319cc4920e5Smrg      wlarc=
5320cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5321cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5322cc4920e5Smrg      ;;
5323cc4920e5Smrg
5324cc4920e5Smrg    *)
5325cc4920e5Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5326cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5327cc4920e5Smrg	_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'
5328cc4920e5Smrg      else
5329cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5330cc4920e5Smrg      fi
5331cc4920e5Smrg      ;;
5332cc4920e5Smrg    esac
5333cc4920e5Smrg
5334cc4920e5Smrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5335cc4920e5Smrg      runpath_var=
5336cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5337cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5338cc4920e5Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5339cc4920e5Smrg    fi
5340cc4920e5Smrg  else
5341cc4920e5Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
5342cc4920e5Smrg    case $host_os in
5343cc4920e5Smrg    aix3*)
5344cc4920e5Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5345cc4920e5Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5346cc4920e5Smrg      _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'
5347cc4920e5Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
5348cc4920e5Smrg      # are no directories specified by -L.
5349cc4920e5Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5350cc4920e5Smrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5351cc4920e5Smrg	# Neither direct hardcoding nor static linking is supported with a
5352cc4920e5Smrg	# broken collect2.
5353cc4920e5Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5354cc4920e5Smrg      fi
5355cc4920e5Smrg      ;;
5356cc4920e5Smrg
5357cc4920e5Smrg    aix[[4-9]]*)
5358cc4920e5Smrg      if test ia64 = "$host_cpu"; then
5359cc4920e5Smrg	# On IA64, the linker does run time linking by default, so we don't
5360cc4920e5Smrg	# have to do anything special.
5361cc4920e5Smrg	aix_use_runtimelinking=no
5362cc4920e5Smrg	exp_sym_flag='-Bexport'
5363cc4920e5Smrg	no_entry_flag=
5364cc4920e5Smrg      else
5365cc4920e5Smrg	# If we're using GNU nm, then we don't want the "-C" option.
5366cc4920e5Smrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5367cc4920e5Smrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
5368cc4920e5Smrg	# weak defined symbols like other global defined symbols, whereas
5369cc4920e5Smrg	# GNU nm marks them as "W".
5370cc4920e5Smrg	# While the 'weak' keyword is ignored in the Export File, we need
5371cc4920e5Smrg	# it in the Import File for the 'aix-soname' feature, so we have
5372cc4920e5Smrg	# to replace the "-B" option with "-P" for AIX nm.
5373cc4920e5Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5374cc4920e5Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5375cc4920e5Smrg	else
5376cc4920e5Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5377cc4920e5Smrg	fi
5378cc4920e5Smrg	aix_use_runtimelinking=no
5379cc4920e5Smrg
5380cc4920e5Smrg	# Test if we are trying to use run time linking or normal
5381cc4920e5Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5382cc4920e5Smrg	# have runtime linking enabled, and use it for executables.
5383cc4920e5Smrg	# For shared libraries, we enable/disable runtime linking
5384cc4920e5Smrg	# depending on the kind of the shared library created -
5385cc4920e5Smrg	# when "with_aix_soname,aix_use_runtimelinking" is:
5386cc4920e5Smrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5387cc4920e5Smrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5388cc4920e5Smrg	#            lib.a           static archive
5389cc4920e5Smrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5390cc4920e5Smrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5391cc4920e5Smrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5392cc4920e5Smrg	#            lib.a(lib.so.V) shared, rtl:no
5393cc4920e5Smrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5394cc4920e5Smrg	#            lib.a           static archive
5395cc4920e5Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5396cc4920e5Smrg	  for ld_flag in $LDFLAGS; do
5397cc4920e5Smrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5398cc4920e5Smrg	    aix_use_runtimelinking=yes
5399cc4920e5Smrg	    break
5400cc4920e5Smrg	  fi
5401cc4920e5Smrg	  done
5402cc4920e5Smrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5403cc4920e5Smrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5404cc4920e5Smrg	    # so we don't have lib.a shared libs to link our executables.
5405cc4920e5Smrg	    # We have to force runtime linking in this case.
5406cc4920e5Smrg	    aix_use_runtimelinking=yes
5407cc4920e5Smrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5408cc4920e5Smrg	  fi
5409cc4920e5Smrg	  ;;
5410cc4920e5Smrg	esac
5411cc4920e5Smrg
5412cc4920e5Smrg	exp_sym_flag='-bexport'
5413cc4920e5Smrg	no_entry_flag='-bnoentry'
5414cc4920e5Smrg      fi
5415cc4920e5Smrg
5416cc4920e5Smrg      # When large executables or shared objects are built, AIX ld can
5417cc4920e5Smrg      # have problems creating the table of contents.  If linking a library
5418cc4920e5Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
5419cc4920e5Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5420cc4920e5Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5421cc4920e5Smrg
5422cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)=''
5423cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5424cc4920e5Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5425cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5426cc4920e5Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5427cc4920e5Smrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5428cc4920e5Smrg      case $with_aix_soname,$aix_use_runtimelinking in
5429cc4920e5Smrg      aix,*) ;; # traditional, no import file
5430cc4920e5Smrg      svr4,* | *,yes) # use import file
5431cc4920e5Smrg	# The Import File defines what to hardcode.
5432cc4920e5Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
5433cc4920e5Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5434cc4920e5Smrg	;;
5435cc4920e5Smrg      esac
5436cc4920e5Smrg
5437cc4920e5Smrg      if test yes = "$GCC"; then
5438cc4920e5Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5439cc4920e5Smrg	# We only want to do this on AIX 4.2 and lower, the check
5440cc4920e5Smrg	# below for broken collect2 doesn't work under 4.3+
5441cc4920e5Smrg	  collect2name=`$CC -print-prog-name=collect2`
5442cc4920e5Smrg	  if test -f "$collect2name" &&
5443cc4920e5Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5444cc4920e5Smrg	  then
5445cc4920e5Smrg	  # We have reworked collect2
5446cc4920e5Smrg	  :
5447cc4920e5Smrg	  else
5448cc4920e5Smrg	  # We have old collect2
5449cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5450cc4920e5Smrg	  # It fails to find uninstalled libraries when the uninstalled
5451cc4920e5Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
5452cc4920e5Smrg	  # to unsupported forces relinking
5453cc4920e5Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5454cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5455cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5456cc4920e5Smrg	  fi
5457cc4920e5Smrg	  ;;
5458cc4920e5Smrg	esac
5459cc4920e5Smrg	shared_flag='-shared'
5460cc4920e5Smrg	if test yes = "$aix_use_runtimelinking"; then
5461cc4920e5Smrg	  shared_flag="$shared_flag "'$wl-G'
5462cc4920e5Smrg	fi
5463cc4920e5Smrg	# Need to ensure runtime linking is disabled for the traditional
5464cc4920e5Smrg	# shared library, or the linker may eventually find shared libraries
5465cc4920e5Smrg	# /with/ Import File - we do not want to mix them.
5466cc4920e5Smrg	shared_flag_aix='-shared'
5467cc4920e5Smrg	shared_flag_svr4='-shared $wl-G'
5468cc4920e5Smrg      else
5469cc4920e5Smrg	# not using gcc
5470cc4920e5Smrg	if test ia64 = "$host_cpu"; then
5471cc4920e5Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5472cc4920e5Smrg	# chokes on -Wl,-G. The following line is correct:
5473cc4920e5Smrg	  shared_flag='-G'
5474cc4920e5Smrg	else
5475cc4920e5Smrg	  if test yes = "$aix_use_runtimelinking"; then
5476cc4920e5Smrg	    shared_flag='$wl-G'
5477cc4920e5Smrg	  else
5478cc4920e5Smrg	    shared_flag='$wl-bM:SRE'
5479cc4920e5Smrg	  fi
5480cc4920e5Smrg	  shared_flag_aix='$wl-bM:SRE'
5481cc4920e5Smrg	  shared_flag_svr4='$wl-G'
5482cc4920e5Smrg	fi
5483cc4920e5Smrg      fi
5484cc4920e5Smrg
5485cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5486cc4920e5Smrg      # It seems that -bexpall does not export symbols beginning with
5487cc4920e5Smrg      # underscore (_), so it is better to generate a list of symbols to export.
5488cc4920e5Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5489cc4920e5Smrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5490cc4920e5Smrg	# Warning - without using the other runtime loading flags (-brtl),
5491cc4920e5Smrg	# -berok will link without error, but may produce a broken library.
5492cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5493cc4920e5Smrg        # Determine the default libpath from the value encoded in an
5494cc4920e5Smrg        # empty executable.
5495cc4920e5Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
5496cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5497cc4920e5Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5498cc4920e5Smrg      else
5499cc4920e5Smrg	if test ia64 = "$host_cpu"; then
5500cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5501cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5502cc4920e5Smrg	  _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"
5503cc4920e5Smrg	else
5504cc4920e5Smrg	 # Determine the default libpath from the value encoded in an
5505cc4920e5Smrg	 # empty executable.
5506cc4920e5Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
5507cc4920e5Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5508cc4920e5Smrg	  # Warning - without using the other run time loading flags,
5509cc4920e5Smrg	  # -berok will link without error, but may produce a broken library.
5510cc4920e5Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5511cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5512cc4920e5Smrg	  if test yes = "$with_gnu_ld"; then
5513cc4920e5Smrg	    # We only use this code for GNU lds that support --whole-archive.
5514cc4920e5Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5515cc4920e5Smrg	  else
5516cc4920e5Smrg	    # Exported symbols can be pulled into shared objects from archives
5517cc4920e5Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5518cc4920e5Smrg	  fi
5519cc4920e5Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5520cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5521cc4920e5Smrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5522cc4920e5Smrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5523cc4920e5Smrg	  if test svr4 != "$with_aix_soname"; then
5524cc4920e5Smrg	    # This is similar to how AIX traditionally builds its shared libraries.
5525cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5526cc4920e5Smrg	  fi
5527cc4920e5Smrg	  if test aix != "$with_aix_soname"; then
5528cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5529cc4920e5Smrg	  else
5530cc4920e5Smrg	    # used by -dlpreopen to get the symbols
5531cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5532cc4920e5Smrg	  fi
5533cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5534cc4920e5Smrg	fi
5535cc4920e5Smrg      fi
5536cc4920e5Smrg      ;;
5537cc4920e5Smrg
5538cc4920e5Smrg    amigaos*)
5539cc4920e5Smrg      case $host_cpu in
5540cc4920e5Smrg      powerpc)
5541cc4920e5Smrg            # see comment about AmigaOS4 .so support
5542cc4920e5Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5543cc4920e5Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5544cc4920e5Smrg        ;;
5545cc4920e5Smrg      m68k)
5546cc4920e5Smrg            _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)'
5547cc4920e5Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5548cc4920e5Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5549cc4920e5Smrg        ;;
5550cc4920e5Smrg      esac
5551cc4920e5Smrg      ;;
5552cc4920e5Smrg
5553cc4920e5Smrg    bsdi[[45]]*)
5554cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5555cc4920e5Smrg      ;;
5556cc4920e5Smrg
5557cc4920e5Smrg    cygwin* | mingw* | pw32* | cegcc*)
5558cc4920e5Smrg      # When not using gcc, we currently assume that we are using
5559cc4920e5Smrg      # Microsoft Visual C++.
5560cc4920e5Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5561cc4920e5Smrg      # no search path for DLLs.
5562cc4920e5Smrg      case $cc_basename in
5563cc4920e5Smrg      cl*)
5564cc4920e5Smrg	# Native MSVC
5565cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5566cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5567cc4920e5Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
5568cc4920e5Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
5569cc4920e5Smrg	# Tell ltmain to make .lib files, not .a files.
5570cc4920e5Smrg	libext=lib
5571cc4920e5Smrg	# Tell ltmain to make .dll files, not .so files.
5572cc4920e5Smrg	shrext_cmds=.dll
5573cc4920e5Smrg	# FIXME: Setting linknames here is a bad hack.
5574cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5575cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5576cc4920e5Smrg            cp "$export_symbols" "$output_objdir/$soname.def";
5577cc4920e5Smrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5578cc4920e5Smrg          else
5579cc4920e5Smrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5580cc4920e5Smrg          fi~
5581cc4920e5Smrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5582cc4920e5Smrg          linknames='
5583cc4920e5Smrg	# The linker will not automatically build a static lib if we build a DLL.
5584cc4920e5Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5585cc4920e5Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5586cc4920e5Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5587cc4920e5Smrg	_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'
5588cc4920e5Smrg	# Don't use ranlib
5589cc4920e5Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5590cc4920e5Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5591cc4920e5Smrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
5592cc4920e5Smrg          case $lt_outputfile in
5593cc4920e5Smrg            *.exe|*.EXE) ;;
5594cc4920e5Smrg            *)
5595cc4920e5Smrg              lt_outputfile=$lt_outputfile.exe
5596cc4920e5Smrg              lt_tool_outputfile=$lt_tool_outputfile.exe
5597cc4920e5Smrg              ;;
5598cc4920e5Smrg          esac~
5599cc4920e5Smrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5600cc4920e5Smrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5601cc4920e5Smrg            $RM "$lt_outputfile.manifest";
5602cc4920e5Smrg          fi'
5603cc4920e5Smrg	;;
5604cc4920e5Smrg      *)
5605cc4920e5Smrg	# Assume MSVC wrapper
5606cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5607cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5608cc4920e5Smrg	# Tell ltmain to make .lib files, not .a files.
5609cc4920e5Smrg	libext=lib
5610cc4920e5Smrg	# Tell ltmain to make .dll files, not .so files.
5611cc4920e5Smrg	shrext_cmds=.dll
5612cc4920e5Smrg	# FIXME: Setting linknames here is a bad hack.
5613cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5614cc4920e5Smrg	# The linker will automatically build a .lib file if we build a DLL.
5615cc4920e5Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5616cc4920e5Smrg	# FIXME: Should let the user specify the lib program.
5617cc4920e5Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5618cc4920e5Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5619cc4920e5Smrg	;;
5620cc4920e5Smrg      esac
5621cc4920e5Smrg      ;;
5622cc4920e5Smrg
5623cc4920e5Smrg    darwin* | rhapsody*)
5624cc4920e5Smrg      _LT_DARWIN_LINKER_FEATURES($1)
5625cc4920e5Smrg      ;;
5626cc4920e5Smrg
5627cc4920e5Smrg    dgux*)
5628cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5629cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5630cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5631cc4920e5Smrg      ;;
5632cc4920e5Smrg
5633cc4920e5Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5634cc4920e5Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
5635cc4920e5Smrg    # does not break anything, and helps significantly (at the cost of a little
5636cc4920e5Smrg    # extra space).
5637cc4920e5Smrg    freebsd2.2*)
5638cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5639cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5640cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5641cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5642cc4920e5Smrg      ;;
5643cc4920e5Smrg
5644cc4920e5Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5645cc4920e5Smrg    freebsd2.*)
5646cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5647cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5648cc4920e5Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5649cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5650cc4920e5Smrg      ;;
5651cc4920e5Smrg
5652cc4920e5Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5653cc4920e5Smrg    freebsd* | dragonfly*)
5654cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5655cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5656cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5657cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5658cc4920e5Smrg      ;;
5659cc4920e5Smrg
5660cc4920e5Smrg    hpux9*)
5661cc4920e5Smrg      if test yes = "$GCC"; then
5662cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5663cc4920e5Smrg      else
5664cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5665cc4920e5Smrg      fi
5666cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5667cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5668cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5669cc4920e5Smrg
5670cc4920e5Smrg      # hardcode_minus_L: Not really in the search PATH,
5671cc4920e5Smrg      # but as the default location of the library.
5672cc4920e5Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5673cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5674cc4920e5Smrg      ;;
5675cc4920e5Smrg
5676cc4920e5Smrg    hpux10*)
5677cc4920e5Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
5678cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5679cc4920e5Smrg      else
5680cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5681cc4920e5Smrg      fi
5682cc4920e5Smrg      if test no = "$with_gnu_ld"; then
5683cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5684cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5685cc4920e5Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
5686cc4920e5Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5687cc4920e5Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5688cc4920e5Smrg	# hardcode_minus_L: Not really in the search PATH,
5689cc4920e5Smrg	# but as the default location of the library.
5690cc4920e5Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5691cc4920e5Smrg      fi
5692cc4920e5Smrg      ;;
5693cc4920e5Smrg
5694cc4920e5Smrg    hpux11*)
5695cc4920e5Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
5696cc4920e5Smrg	case $host_cpu in
5697cc4920e5Smrg	hppa*64*)
5698cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5699cc4920e5Smrg	  ;;
5700cc4920e5Smrg	ia64*)
5701cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5702cc4920e5Smrg	  ;;
5703cc4920e5Smrg	*)
5704cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5705cc4920e5Smrg	  ;;
5706cc4920e5Smrg	esac
5707cc4920e5Smrg      else
5708cc4920e5Smrg	case $host_cpu in
5709cc4920e5Smrg	hppa*64*)
5710cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5711cc4920e5Smrg	  ;;
5712cc4920e5Smrg	ia64*)
5713cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5714cc4920e5Smrg	  ;;
5715cc4920e5Smrg	*)
5716cc4920e5Smrg	m4_if($1, [], [
5717cc4920e5Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
5718cc4920e5Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5719cc4920e5Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
5720cc4920e5Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5721cc4920e5Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5722cc4920e5Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5723cc4920e5Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5724cc4920e5Smrg	  ;;
5725cc4920e5Smrg	esac
5726cc4920e5Smrg      fi
5727cc4920e5Smrg      if test no = "$with_gnu_ld"; then
5728cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5729cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5730cc4920e5Smrg
5731cc4920e5Smrg	case $host_cpu in
5732cc4920e5Smrg	hppa*64*|ia64*)
5733cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5734cc4920e5Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5735cc4920e5Smrg	  ;;
5736cc4920e5Smrg	*)
5737cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
5738cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5739cc4920e5Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5740cc4920e5Smrg
5741cc4920e5Smrg	  # hardcode_minus_L: Not really in the search PATH,
5742cc4920e5Smrg	  # but as the default location of the library.
5743cc4920e5Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5744cc4920e5Smrg	  ;;
5745cc4920e5Smrg	esac
5746cc4920e5Smrg      fi
5747cc4920e5Smrg      ;;
5748cc4920e5Smrg
5749cc4920e5Smrg    irix5* | irix6* | nonstopux*)
5750cc4920e5Smrg      if test yes = "$GCC"; then
5751cc4920e5Smrg	_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'
5752cc4920e5Smrg	# Try to use the -exported_symbol ld option, if it does not
5753cc4920e5Smrg	# work, assume that -exports_file does not work either and
5754cc4920e5Smrg	# implicitly export all symbols.
5755cc4920e5Smrg	# This should be the same for all languages, so no per-tag cache variable.
5756cc4920e5Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5757cc4920e5Smrg	  [lt_cv_irix_exported_symbol],
5758cc4920e5Smrg	  [save_LDFLAGS=$LDFLAGS
5759cc4920e5Smrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5760cc4920e5Smrg	   AC_LINK_IFELSE(
5761cc4920e5Smrg	     [AC_LANG_SOURCE(
5762cc4920e5Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5763cc4920e5Smrg			      [C++], [[int foo (void) { return 0; }]],
5764cc4920e5Smrg			      [Fortran 77], [[
5765cc4920e5Smrg      subroutine foo
5766cc4920e5Smrg      end]],
5767cc4920e5Smrg			      [Fortran], [[
5768cc4920e5Smrg      subroutine foo
5769cc4920e5Smrg      end]])])],
5770cc4920e5Smrg	      [lt_cv_irix_exported_symbol=yes],
5771cc4920e5Smrg	      [lt_cv_irix_exported_symbol=no])
5772cc4920e5Smrg           LDFLAGS=$save_LDFLAGS])
5773cc4920e5Smrg	if test yes = "$lt_cv_irix_exported_symbol"; then
5774cc4920e5Smrg          _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'
5775cc4920e5Smrg	fi
5776cc4920e5Smrg      else
5777cc4920e5Smrg	_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'
5778cc4920e5Smrg	_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'
5779cc4920e5Smrg      fi
5780cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5781cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5782cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5783cc4920e5Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
5784cc4920e5Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5785cc4920e5Smrg      ;;
5786cc4920e5Smrg
5787cc4920e5Smrg    linux*)
5788cc4920e5Smrg      case $cc_basename in
5789cc4920e5Smrg      tcc*)
5790cc4920e5Smrg	# Fabrice Bellard et al's Tiny C Compiler
5791cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5792cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5793cc4920e5Smrg	;;
5794cc4920e5Smrg      esac
5795cc4920e5Smrg      ;;
5796cc4920e5Smrg
5797cc4920e5Smrg    netbsd*)
5798cc4920e5Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5799cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5800cc4920e5Smrg      else
5801cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5802cc4920e5Smrg      fi
5803cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5804cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5805cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5806cc4920e5Smrg      ;;
5807cc4920e5Smrg
5808cc4920e5Smrg    newsos6)
5809cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5810cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5811cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5812cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5813cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5814cc4920e5Smrg      ;;
5815cc4920e5Smrg
5816cc4920e5Smrg    *nto* | *qnx*)
5817cc4920e5Smrg      ;;
5818cc4920e5Smrg
5819cc4920e5Smrg    openbsd* | bitrig*)
5820cc4920e5Smrg      if test -f /usr/libexec/ld.so; then
5821cc4920e5Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
5822cc4920e5Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5823cc4920e5Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5824cc4920e5Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5825cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5826cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5827cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5828cc4920e5Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5829cc4920e5Smrg	else
5830cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5831cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5832cc4920e5Smrg	fi
5833cc4920e5Smrg      else
5834cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
5835cc4920e5Smrg      fi
5836cc4920e5Smrg      ;;
5837cc4920e5Smrg
5838cc4920e5Smrg    os2*)
5839cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5840cc4920e5Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5841cc4920e5Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5842cc4920e5Smrg      shrext_cmds=.dll
5843cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5844cc4920e5Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5845cc4920e5Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5846cc4920e5Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5847cc4920e5Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5848cc4920e5Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5849cc4920e5Smrg	emximp -o $lib $output_objdir/$libname.def'
5850cc4920e5Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5851cc4920e5Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5852cc4920e5Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5853cc4920e5Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5854cc4920e5Smrg	prefix_cmds="$SED"~
5855cc4920e5Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5856cc4920e5Smrg	  prefix_cmds="$prefix_cmds -e 1d";
5857cc4920e5Smrg	fi~
5858cc4920e5Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5859cc4920e5Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5860cc4920e5Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5861cc4920e5Smrg	emximp -o $lib $output_objdir/$libname.def'
5862cc4920e5Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5863cc4920e5Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5864cc4920e5Smrg      ;;
5865cc4920e5Smrg
5866cc4920e5Smrg    osf3*)
5867cc4920e5Smrg      if test yes = "$GCC"; then
5868cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5869cc4920e5Smrg	_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'
5870cc4920e5Smrg      else
5871cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5872cc4920e5Smrg	_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'
5873cc4920e5Smrg      fi
5874cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5875cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5876cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5877cc4920e5Smrg      ;;
5878cc4920e5Smrg
5879cc4920e5Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5880cc4920e5Smrg      if test yes = "$GCC"; then
5881cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5882cc4920e5Smrg	_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'
5883cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5884cc4920e5Smrg      else
5885cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5886cc4920e5Smrg	_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'
5887cc4920e5Smrg	_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~
5888cc4920e5Smrg          $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'
5889cc4920e5Smrg
5890cc4920e5Smrg	# Both c and cxx compiler support -rpath directly
5891cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5892cc4920e5Smrg      fi
5893cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5894cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5895cc4920e5Smrg      ;;
5896cc4920e5Smrg
5897cc4920e5Smrg    solaris*)
5898cc4920e5Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5899cc4920e5Smrg      if test yes = "$GCC"; then
5900cc4920e5Smrg	wlarc='$wl'
5901cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5902cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5903cc4920e5Smrg          $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'
5904cc4920e5Smrg      else
5905cc4920e5Smrg	case `$CC -V 2>&1` in
5906cc4920e5Smrg	*"Compilers 5.0"*)
5907cc4920e5Smrg	  wlarc=''
5908cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5909cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5910cc4920e5Smrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5911cc4920e5Smrg	  ;;
5912cc4920e5Smrg	*)
5913cc4920e5Smrg	  wlarc='$wl'
5914cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5915cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5916cc4920e5Smrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5917cc4920e5Smrg	  ;;
5918cc4920e5Smrg	esac
5919cc4920e5Smrg      fi
5920cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5921cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5922cc4920e5Smrg      case $host_os in
5923cc4920e5Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5924cc4920e5Smrg      *)
5925cc4920e5Smrg	# The compiler driver will combine and reorder linker options,
5926cc4920e5Smrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
5927cc4920e5Smrg	# but is careful enough not to reorder.
5928cc4920e5Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
5929cc4920e5Smrg	if test yes = "$GCC"; then
5930cc4920e5Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5931cc4920e5Smrg	else
5932cc4920e5Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5933cc4920e5Smrg	fi
5934cc4920e5Smrg	;;
5935cc4920e5Smrg      esac
5936cc4920e5Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5937cc4920e5Smrg      ;;
5938cc4920e5Smrg
5939cc4920e5Smrg    sunos4*)
5940cc4920e5Smrg      if test sequent = "$host_vendor"; then
5941cc4920e5Smrg	# Use $CC to link under sequent, because it throws in some extra .o
5942cc4920e5Smrg	# files that make .init and .fini sections work.
5943cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5944cc4920e5Smrg      else
5945cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5946cc4920e5Smrg      fi
5947cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5948cc4920e5Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5949cc4920e5Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5950cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5951cc4920e5Smrg      ;;
5952cc4920e5Smrg
5953cc4920e5Smrg    sysv4)
5954cc4920e5Smrg      case $host_vendor in
5955cc4920e5Smrg	sni)
5956cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5957cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5958cc4920e5Smrg	;;
5959cc4920e5Smrg	siemens)
5960cc4920e5Smrg	  ## LD is ld it makes a PLAMLIB
5961cc4920e5Smrg	  ## CC just makes a GrossModule.
5962cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5963cc4920e5Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5964cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5965cc4920e5Smrg        ;;
5966cc4920e5Smrg	motorola)
5967cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5969cc4920e5Smrg	;;
5970cc4920e5Smrg      esac
5971cc4920e5Smrg      runpath_var='LD_RUN_PATH'
5972cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5973cc4920e5Smrg      ;;
5974cc4920e5Smrg
5975cc4920e5Smrg    sysv4.3*)
5976cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5978cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5979cc4920e5Smrg      ;;
5980cc4920e5Smrg
5981cc4920e5Smrg    sysv4*MP*)
5982cc4920e5Smrg      if test -d /usr/nec; then
5983cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5984cc4920e5Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5985cc4920e5Smrg	runpath_var=LD_RUN_PATH
5986cc4920e5Smrg	hardcode_runpath_var=yes
5987cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5988cc4920e5Smrg      fi
5989cc4920e5Smrg      ;;
5990cc4920e5Smrg
5991cc4920e5Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5992cc4920e5Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
5993cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5994cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5995cc4920e5Smrg      runpath_var='LD_RUN_PATH'
5996cc4920e5Smrg
5997cc4920e5Smrg      if test yes = "$GCC"; then
5998cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5999cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6000cc4920e5Smrg      else
6001cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6002cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6003cc4920e5Smrg      fi
6004cc4920e5Smrg      ;;
6005cc4920e5Smrg
6006cc4920e5Smrg    sysv5* | sco3.2v5* | sco5v6*)
6007cc4920e5Smrg      # Note: We CANNOT use -z defs as we might desire, because we do not
6008cc4920e5Smrg      # link with -lc, and that would cause any symbols used from libc to
6009cc4920e5Smrg      # always be unresolved, which means just about no library would
6010cc4920e5Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
6011cc4920e5Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
6012cc4920e5Smrg      # as -z defs.
6013cc4920e5Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6014cc4920e5Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6015cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6016cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6017cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6018cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6019cc4920e5Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6020cc4920e5Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6021cc4920e5Smrg      runpath_var='LD_RUN_PATH'
6022cc4920e5Smrg
6023cc4920e5Smrg      if test yes = "$GCC"; then
6024cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6025cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6026cc4920e5Smrg      else
6027cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6028cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6029cc4920e5Smrg      fi
6030cc4920e5Smrg      ;;
6031cc4920e5Smrg
6032cc4920e5Smrg    uts4*)
6033cc4920e5Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034cc4920e5Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6035cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6036cc4920e5Smrg      ;;
6037cc4920e5Smrg
6038cc4920e5Smrg    *)
6039cc4920e5Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
6040cc4920e5Smrg      ;;
6041cc4920e5Smrg    esac
6042cc4920e5Smrg
6043cc4920e5Smrg    if test sni = "$host_vendor"; then
6044cc4920e5Smrg      case $host in
6045cc4920e5Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6046cc4920e5Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6047cc4920e5Smrg	;;
6048cc4920e5Smrg      esac
6049cc4920e5Smrg    fi
6050cc4920e5Smrg  fi
6051cc4920e5Smrg])
6052cc4920e5SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6053cc4920e5Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6054cc4920e5Smrg
6055cc4920e5Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6056cc4920e5Smrg
6057cc4920e5Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6058cc4920e5Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6059cc4920e5Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
6060cc4920e5Smrg    [The commands to extract the exported symbol list from a shared archive])
6061cc4920e5Smrg
6062cc4920e5Smrg#
6063cc4920e5Smrg# Do we need to explicitly link libc?
6064cc4920e5Smrg#
6065cc4920e5Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6066cc4920e5Smrgx|xyes)
6067cc4920e5Smrg  # Assume -lc should be added
6068cc4920e5Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6069cc4920e5Smrg
6070cc4920e5Smrg  if test yes,yes = "$GCC,$enable_shared"; then
6071cc4920e5Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
6072cc4920e5Smrg    *'~'*)
6073cc4920e5Smrg      # FIXME: we may have to deal with multi-command sequences.
6074cc4920e5Smrg      ;;
6075cc4920e5Smrg    '$CC '*)
6076cc4920e5Smrg      # Test whether the compiler implicitly links with -lc since on some
6077cc4920e5Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6078cc4920e5Smrg      # to ld, don't add -lc before -lgcc.
6079cc4920e5Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6080cc4920e5Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6081cc4920e5Smrg	[$RM conftest*
6082cc4920e5Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6083cc4920e5Smrg
6084cc4920e5Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6085cc4920e5Smrg	  soname=conftest
6086cc4920e5Smrg	  lib=conftest
6087cc4920e5Smrg	  libobjs=conftest.$ac_objext
6088cc4920e5Smrg	  deplibs=
6089cc4920e5Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6090cc4920e5Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6091cc4920e5Smrg	  compiler_flags=-v
6092cc4920e5Smrg	  linker_flags=-v
6093cc4920e5Smrg	  verstring=
6094cc4920e5Smrg	  output_objdir=.
6095cc4920e5Smrg	  libname=conftest
6096cc4920e5Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6097cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
6098cc4920e5Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6099cc4920e5Smrg	  then
6100cc4920e5Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6101cc4920e5Smrg	  else
6102cc4920e5Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6103cc4920e5Smrg	  fi
6104cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6105cc4920e5Smrg	else
6106cc4920e5Smrg	  cat conftest.err 1>&5
6107cc4920e5Smrg	fi
6108cc4920e5Smrg	$RM conftest*
6109cc4920e5Smrg	])
6110cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6111cc4920e5Smrg      ;;
6112cc4920e5Smrg    esac
6113cc4920e5Smrg  fi
6114cc4920e5Smrg  ;;
6115cc4920e5Smrgesac
6116cc4920e5Smrg
6117cc4920e5Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6118cc4920e5Smrg    [Whether or not to add -lc for building shared libraries])
6119cc4920e5Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6120cc4920e5Smrg    [enable_shared_with_static_runtimes], [0],
6121cc4920e5Smrg    [Whether or not to disallow shared libs when runtime libs are static])
6122cc4920e5Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6123cc4920e5Smrg    [Compiler flag to allow reflexive dlopens])
6124cc4920e5Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6125cc4920e5Smrg    [Compiler flag to generate shared objects directly from archives])
6126cc4920e5Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
6127cc4920e5Smrg    [Whether the compiler copes with passing no objects directly])
6128cc4920e5Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6129cc4920e5Smrg    [Create an old-style archive from a shared archive])
6130cc4920e5Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6131cc4920e5Smrg    [Create a temporary old-style archive to link instead of a shared archive])
6132cc4920e5Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6133cc4920e5Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
6134cc4920e5Smrg_LT_TAGDECL([], [module_cmds], [2],
6135cc4920e5Smrg    [Commands used to build a loadable module if different from building
6136cc4920e5Smrg    a shared archive.])
6137cc4920e5Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
6138cc4920e5Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
6139cc4920e5Smrg    [Whether we are building with GNU ld or not])
6140cc4920e5Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
6141cc4920e5Smrg    [Flag that allows shared libraries with undefined symbols to be built])
6142cc4920e5Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
6143cc4920e5Smrg    [Flag that enforces no undefined symbols])
6144cc4920e5Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6145cc4920e5Smrg    [Flag to hardcode $libdir into a binary during linking.
6146cc4920e5Smrg    This must work even if $libdir does not exist])
6147cc4920e5Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6148cc4920e5Smrg    [Whether we need a single "-rpath" flag with a separated argument])
6149cc4920e5Smrg_LT_TAGDECL([], [hardcode_direct], [0],
6150cc4920e5Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6151cc4920e5Smrg    DIR into the resulting binary])
6152cc4920e5Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6153cc4920e5Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6154cc4920e5Smrg    DIR into the resulting binary and the resulting library dependency is
6155cc4920e5Smrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
6156cc4920e5Smrg    library is relocated])
6157cc4920e5Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
6158cc4920e5Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6159cc4920e5Smrg    into the resulting binary])
6160cc4920e5Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6161cc4920e5Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6162cc4920e5Smrg    into the resulting binary])
6163cc4920e5Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
6164cc4920e5Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
6165cc4920e5Smrg    into the library and all subsequent libraries and executables linked
6166cc4920e5Smrg    against it])
6167cc4920e5Smrg_LT_TAGDECL([], [inherit_rpath], [0],
6168cc4920e5Smrg    [Set to yes if linker adds runtime paths of dependent libraries
6169cc4920e5Smrg    to runtime path list])
6170cc4920e5Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
6171cc4920e5Smrg    [Whether libtool must link a program against all its dependency libraries])
6172cc4920e5Smrg_LT_TAGDECL([], [always_export_symbols], [0],
6173cc4920e5Smrg    [Set to "yes" if exported symbols are required])
6174cc4920e5Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
6175cc4920e5Smrg    [The commands to list exported symbols])
6176cc4920e5Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
6177cc4920e5Smrg    [Symbols that should not be listed in the preloaded symbols])
6178cc4920e5Smrg_LT_TAGDECL([], [include_expsyms], [1],
6179cc4920e5Smrg    [Symbols that must always be exported])
6180cc4920e5Smrg_LT_TAGDECL([], [prelink_cmds], [2],
6181cc4920e5Smrg    [Commands necessary for linking programs (against libraries) with templates])
6182cc4920e5Smrg_LT_TAGDECL([], [postlink_cmds], [2],
6183cc4920e5Smrg    [Commands necessary for finishing linking programs])
6184cc4920e5Smrg_LT_TAGDECL([], [file_list_spec], [1],
6185cc4920e5Smrg    [Specify filename containing input files])
6186cc4920e5Smrgdnl FIXME: Not yet implemented
6187cc4920e5Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6188cc4920e5Smrgdnl    [Compiler flag to generate thread safe objects])
6189cc4920e5Smrg])# _LT_LINKER_SHLIBS
6190cc4920e5Smrg
6191cc4920e5Smrg
6192cc4920e5Smrg# _LT_LANG_C_CONFIG([TAG])
6193cc4920e5Smrg# ------------------------
6194cc4920e5Smrg# Ensure that the configuration variables for a C compiler are suitably
6195cc4920e5Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6196cc4920e5Smrg# the compiler configuration to 'libtool'.
6197cc4920e5Smrgm4_defun([_LT_LANG_C_CONFIG],
6198cc4920e5Smrg[m4_require([_LT_DECL_EGREP])dnl
6199cc4920e5Smrglt_save_CC=$CC
6200cc4920e5SmrgAC_LANG_PUSH(C)
6201cc4920e5Smrg
6202cc4920e5Smrg# Source file extension for C test sources.
6203cc4920e5Smrgac_ext=c
6204cc4920e5Smrg
6205cc4920e5Smrg# Object file extension for compiled C test sources.
6206cc4920e5Smrgobjext=o
6207cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
6208cc4920e5Smrg
6209cc4920e5Smrg# Code to be used in simple compile tests
6210cc4920e5Smrglt_simple_compile_test_code="int some_variable = 0;"
6211cc4920e5Smrg
6212cc4920e5Smrg# Code to be used in simple link tests
6213cc4920e5Smrglt_simple_link_test_code='int main(){return(0);}'
6214cc4920e5Smrg
6215cc4920e5Smrg_LT_TAG_COMPILER
6216cc4920e5Smrg# Save the default compiler, since it gets overwritten when the other
6217cc4920e5Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6218cc4920e5Smrgcompiler_DEFAULT=$CC
6219cc4920e5Smrg
6220cc4920e5Smrg# save warnings/boilerplate of simple test code
6221cc4920e5Smrg_LT_COMPILER_BOILERPLATE
6222cc4920e5Smrg_LT_LINKER_BOILERPLATE
6223cc4920e5Smrg
6224cc4920e5Smrg## CAVEAT EMPTOR:
6225cc4920e5Smrg## There is no encapsulation within the following macros, do not change
6226cc4920e5Smrg## the running order or otherwise move them around unless you know exactly
6227cc4920e5Smrg## what you are doing...
6228cc4920e5Smrgif test -n "$compiler"; then
6229cc4920e5Smrg  _LT_COMPILER_NO_RTTI($1)
6230cc4920e5Smrg  _LT_COMPILER_PIC($1)
6231cc4920e5Smrg  _LT_COMPILER_C_O($1)
6232cc4920e5Smrg  _LT_COMPILER_FILE_LOCKS($1)
6233cc4920e5Smrg  _LT_LINKER_SHLIBS($1)
6234cc4920e5Smrg  _LT_SYS_DYNAMIC_LINKER($1)
6235cc4920e5Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6236cc4920e5Smrg  LT_SYS_DLOPEN_SELF
6237cc4920e5Smrg  _LT_CMD_STRIPLIB
6238cc4920e5Smrg
6239cc4920e5Smrg  # Report what library types will actually be built
6240cc4920e5Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
6241cc4920e5Smrg  AC_MSG_RESULT([$can_build_shared])
6242cc4920e5Smrg
6243cc4920e5Smrg  AC_MSG_CHECKING([whether to build shared libraries])
6244cc4920e5Smrg  test no = "$can_build_shared" && enable_shared=no
6245cc4920e5Smrg
6246cc4920e5Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
6247cc4920e5Smrg  # are all built from PIC.
6248cc4920e5Smrg  case $host_os in
6249cc4920e5Smrg  aix3*)
6250cc4920e5Smrg    test yes = "$enable_shared" && enable_static=no
6251cc4920e5Smrg    if test -n "$RANLIB"; then
6252cc4920e5Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6253cc4920e5Smrg      postinstall_cmds='$RANLIB $lib'
6254cc4920e5Smrg    fi
6255cc4920e5Smrg    ;;
6256cc4920e5Smrg
6257cc4920e5Smrg  aix[[4-9]]*)
6258cc4920e5Smrg    if test ia64 != "$host_cpu"; then
6259cc4920e5Smrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6260cc4920e5Smrg      yes,aix,yes) ;;			# shared object as lib.so file only
6261cc4920e5Smrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
6262cc4920e5Smrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6263cc4920e5Smrg      esac
6264cc4920e5Smrg    fi
6265cc4920e5Smrg    ;;
6266cc4920e5Smrg  esac
6267cc4920e5Smrg  AC_MSG_RESULT([$enable_shared])
6268cc4920e5Smrg
6269cc4920e5Smrg  AC_MSG_CHECKING([whether to build static libraries])
6270cc4920e5Smrg  # Make sure either enable_shared or enable_static is yes.
6271cc4920e5Smrg  test yes = "$enable_shared" || enable_static=yes
6272cc4920e5Smrg  AC_MSG_RESULT([$enable_static])
6273cc4920e5Smrg
6274cc4920e5Smrg  _LT_CONFIG($1)
6275cc4920e5Smrgfi
6276cc4920e5SmrgAC_LANG_POP
6277cc4920e5SmrgCC=$lt_save_CC
6278cc4920e5Smrg])# _LT_LANG_C_CONFIG
6279cc4920e5Smrg
6280cc4920e5Smrg
6281cc4920e5Smrg# _LT_LANG_CXX_CONFIG([TAG])
6282cc4920e5Smrg# --------------------------
6283cc4920e5Smrg# Ensure that the configuration variables for a C++ compiler are suitably
6284cc4920e5Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6285cc4920e5Smrg# the compiler configuration to 'libtool'.
6286cc4920e5Smrgm4_defun([_LT_LANG_CXX_CONFIG],
6287cc4920e5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6288cc4920e5Smrgm4_require([_LT_DECL_EGREP])dnl
6289cc4920e5Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6290cc4920e5Smrgif test -n "$CXX" && ( test no != "$CXX" &&
6291cc4920e5Smrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6292cc4920e5Smrg    (test g++ != "$CXX"))); then
6293cc4920e5Smrg  AC_PROG_CXXCPP
6294cc4920e5Smrgelse
6295cc4920e5Smrg  _lt_caught_CXX_error=yes
6296cc4920e5Smrgfi
6297cc4920e5Smrg
6298cc4920e5SmrgAC_LANG_PUSH(C++)
6299cc4920e5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6300cc4920e5Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6301cc4920e5Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6302cc4920e5Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6303cc4920e5Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
6304cc4920e5Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6305cc4920e5Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6306cc4920e5Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6307cc4920e5Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6308cc4920e5Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6309cc4920e5Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6310cc4920e5Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6311cc4920e5Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6312cc4920e5Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6313cc4920e5Smrg_LT_TAGVAR(module_cmds, $1)=
6314cc4920e5Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6315cc4920e5Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6316cc4920e5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6317cc4920e5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
6318cc4920e5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6319cc4920e5Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6320cc4920e5Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6321cc4920e5Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6322cc4920e5Smrg
6323cc4920e5Smrg# Source file extension for C++ test sources.
6324cc4920e5Smrgac_ext=cpp
6325cc4920e5Smrg
6326cc4920e5Smrg# Object file extension for compiled C++ test sources.
6327cc4920e5Smrgobjext=o
6328cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
6329cc4920e5Smrg
6330cc4920e5Smrg# No sense in running all these tests if we already determined that
6331cc4920e5Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
6332cc4920e5Smrg# are currently assumed to apply to all compilers on this platform,
6333cc4920e5Smrg# and will be corrupted by setting them based on a non-working compiler.
6334cc4920e5Smrgif test yes != "$_lt_caught_CXX_error"; then
6335cc4920e5Smrg  # Code to be used in simple compile tests
6336cc4920e5Smrg  lt_simple_compile_test_code="int some_variable = 0;"
6337cc4920e5Smrg
6338cc4920e5Smrg  # Code to be used in simple link tests
6339cc4920e5Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6340cc4920e5Smrg
6341cc4920e5Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6342cc4920e5Smrg  _LT_TAG_COMPILER
6343cc4920e5Smrg
6344cc4920e5Smrg  # save warnings/boilerplate of simple test code
6345cc4920e5Smrg  _LT_COMPILER_BOILERPLATE
6346cc4920e5Smrg  _LT_LINKER_BOILERPLATE
6347cc4920e5Smrg
6348cc4920e5Smrg  # Allow CC to be a program name with arguments.
6349cc4920e5Smrg  lt_save_CC=$CC
6350cc4920e5Smrg  lt_save_CFLAGS=$CFLAGS
6351cc4920e5Smrg  lt_save_LD=$LD
6352cc4920e5Smrg  lt_save_GCC=$GCC
6353cc4920e5Smrg  GCC=$GXX
6354cc4920e5Smrg  lt_save_with_gnu_ld=$with_gnu_ld
6355cc4920e5Smrg  lt_save_path_LD=$lt_cv_path_LD
6356cc4920e5Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6357cc4920e5Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6358cc4920e5Smrg  else
6359cc4920e5Smrg    $as_unset lt_cv_prog_gnu_ld
6360cc4920e5Smrg  fi
6361cc4920e5Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
6362cc4920e5Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
6363cc4920e5Smrg  else
6364cc4920e5Smrg    $as_unset lt_cv_path_LD
6365cc4920e5Smrg  fi
6366cc4920e5Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
6367cc4920e5Smrg  CC=${CXX-"c++"}
6368cc4920e5Smrg  CFLAGS=$CXXFLAGS
6369cc4920e5Smrg  compiler=$CC
6370cc4920e5Smrg  _LT_TAGVAR(compiler, $1)=$CC
6371cc4920e5Smrg  _LT_CC_BASENAME([$compiler])
6372cc4920e5Smrg
6373cc4920e5Smrg  if test -n "$compiler"; then
6374cc4920e5Smrg    # We don't want -fno-exception when compiling C++ code, so set the
6375cc4920e5Smrg    # no_builtin_flag separately
6376cc4920e5Smrg    if test yes = "$GXX"; then
6377cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6378cc4920e5Smrg    else
6379cc4920e5Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6380cc4920e5Smrg    fi
6381cc4920e5Smrg
6382cc4920e5Smrg    if test yes = "$GXX"; then
6383cc4920e5Smrg      # Set up default GNU C++ configuration
6384cc4920e5Smrg
6385cc4920e5Smrg      LT_PATH_LD
6386cc4920e5Smrg
6387cc4920e5Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6388cc4920e5Smrg      # archiving commands below assume that GNU ld is being used.
6389cc4920e5Smrg      if test yes = "$with_gnu_ld"; then
6390cc4920e5Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6391cc4920e5Smrg        _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'
6392cc4920e5Smrg
6393cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6394cc4920e5Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6395cc4920e5Smrg
6396cc4920e5Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
6397cc4920e5Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6398cc4920e5Smrg        #     investigate it a little bit more. (MM)
6399cc4920e5Smrg        wlarc='$wl'
6400cc4920e5Smrg
6401cc4920e5Smrg        # ancient GNU ld didn't support --whole-archive et. al.
6402cc4920e5Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6403cc4920e5Smrg	  $GREP 'no-whole-archive' > /dev/null; then
6404cc4920e5Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6405cc4920e5Smrg        else
6406cc4920e5Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6407cc4920e5Smrg        fi
6408cc4920e5Smrg      else
6409cc4920e5Smrg        with_gnu_ld=no
6410cc4920e5Smrg        wlarc=
6411cc4920e5Smrg
6412cc4920e5Smrg        # A generic and very simple default shared library creation
6413cc4920e5Smrg        # command for GNU C++ for the case where it uses the native
6414cc4920e5Smrg        # linker, instead of GNU ld.  If possible, this setting should
6415cc4920e5Smrg        # overridden to take advantage of the native linker features on
6416cc4920e5Smrg        # the platform it is being used on.
6417cc4920e5Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6418cc4920e5Smrg      fi
6419cc4920e5Smrg
6420cc4920e5Smrg      # Commands to make compiler produce verbose output that lists
6421cc4920e5Smrg      # what "hidden" libraries, object files and flags are used when
6422cc4920e5Smrg      # linking a shared library.
6423cc4920e5Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6424cc4920e5Smrg
6425cc4920e5Smrg    else
6426cc4920e5Smrg      GXX=no
6427cc4920e5Smrg      with_gnu_ld=no
6428cc4920e5Smrg      wlarc=
6429cc4920e5Smrg    fi
6430cc4920e5Smrg
6431cc4920e5Smrg    # PORTME: fill in a description of your system's C++ link characteristics
6432cc4920e5Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6433cc4920e5Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
6434cc4920e5Smrg    case $host_os in
6435cc4920e5Smrg      aix3*)
6436cc4920e5Smrg        # FIXME: insert proper C++ library support
6437cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6438cc4920e5Smrg        ;;
6439cc4920e5Smrg      aix[[4-9]]*)
6440cc4920e5Smrg        if test ia64 = "$host_cpu"; then
6441cc4920e5Smrg          # On IA64, the linker does run time linking by default, so we don't
6442cc4920e5Smrg          # have to do anything special.
6443cc4920e5Smrg          aix_use_runtimelinking=no
6444cc4920e5Smrg          exp_sym_flag='-Bexport'
6445cc4920e5Smrg          no_entry_flag=
6446cc4920e5Smrg        else
6447cc4920e5Smrg          aix_use_runtimelinking=no
6448cc4920e5Smrg
6449cc4920e5Smrg          # Test if we are trying to use run time linking or normal
6450cc4920e5Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6451cc4920e5Smrg          # have runtime linking enabled, and use it for executables.
6452cc4920e5Smrg          # For shared libraries, we enable/disable runtime linking
6453cc4920e5Smrg          # depending on the kind of the shared library created -
6454cc4920e5Smrg          # when "with_aix_soname,aix_use_runtimelinking" is:
6455cc4920e5Smrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6456cc4920e5Smrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6457cc4920e5Smrg          #            lib.a           static archive
6458cc4920e5Smrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6459cc4920e5Smrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6460cc4920e5Smrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6461cc4920e5Smrg          #            lib.a(lib.so.V) shared, rtl:no
6462cc4920e5Smrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6463cc4920e5Smrg          #            lib.a           static archive
6464cc4920e5Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6465cc4920e5Smrg	    for ld_flag in $LDFLAGS; do
6466cc4920e5Smrg	      case $ld_flag in
6467cc4920e5Smrg	      *-brtl*)
6468cc4920e5Smrg	        aix_use_runtimelinking=yes
6469cc4920e5Smrg	        break
6470cc4920e5Smrg	        ;;
6471cc4920e5Smrg	      esac
6472cc4920e5Smrg	    done
6473cc4920e5Smrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6474cc4920e5Smrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6475cc4920e5Smrg	      # so we don't have lib.a shared libs to link our executables.
6476cc4920e5Smrg	      # We have to force runtime linking in this case.
6477cc4920e5Smrg	      aix_use_runtimelinking=yes
6478cc4920e5Smrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6479cc4920e5Smrg	    fi
6480cc4920e5Smrg	    ;;
6481cc4920e5Smrg          esac
6482cc4920e5Smrg
6483cc4920e5Smrg          exp_sym_flag='-bexport'
6484cc4920e5Smrg          no_entry_flag='-bnoentry'
6485cc4920e5Smrg        fi
6486cc4920e5Smrg
6487cc4920e5Smrg        # When large executables or shared objects are built, AIX ld can
6488cc4920e5Smrg        # have problems creating the table of contents.  If linking a library
6489cc4920e5Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
6490cc4920e5Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6491cc4920e5Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6492cc4920e5Smrg
6493cc4920e5Smrg        _LT_TAGVAR(archive_cmds, $1)=''
6494cc4920e5Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6495cc4920e5Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6496cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6497cc4920e5Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6498cc4920e5Smrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6499cc4920e5Smrg        case $with_aix_soname,$aix_use_runtimelinking in
6500cc4920e5Smrg        aix,*) ;;	# no import file
6501cc4920e5Smrg        svr4,* | *,yes) # use import file
6502cc4920e5Smrg          # The Import File defines what to hardcode.
6503cc4920e5Smrg          _LT_TAGVAR(hardcode_direct, $1)=no
6504cc4920e5Smrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6505cc4920e5Smrg          ;;
6506cc4920e5Smrg        esac
6507cc4920e5Smrg
6508cc4920e5Smrg        if test yes = "$GXX"; then
6509cc4920e5Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6510cc4920e5Smrg          # We only want to do this on AIX 4.2 and lower, the check
6511cc4920e5Smrg          # below for broken collect2 doesn't work under 4.3+
6512cc4920e5Smrg	  collect2name=`$CC -print-prog-name=collect2`
6513cc4920e5Smrg	  if test -f "$collect2name" &&
6514cc4920e5Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6515cc4920e5Smrg	  then
6516cc4920e5Smrg	    # We have reworked collect2
6517cc4920e5Smrg	    :
6518cc4920e5Smrg	  else
6519cc4920e5Smrg	    # We have old collect2
6520cc4920e5Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6521cc4920e5Smrg	    # It fails to find uninstalled libraries when the uninstalled
6522cc4920e5Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
6523cc4920e5Smrg	    # to unsupported forces relinking
6524cc4920e5Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6525cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6526cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6527cc4920e5Smrg	  fi
6528cc4920e5Smrg          esac
6529cc4920e5Smrg          shared_flag='-shared'
6530cc4920e5Smrg	  if test yes = "$aix_use_runtimelinking"; then
6531cc4920e5Smrg	    shared_flag=$shared_flag' $wl-G'
6532cc4920e5Smrg	  fi
6533cc4920e5Smrg	  # Need to ensure runtime linking is disabled for the traditional
6534cc4920e5Smrg	  # shared library, or the linker may eventually find shared libraries
6535cc4920e5Smrg	  # /with/ Import File - we do not want to mix them.
6536cc4920e5Smrg	  shared_flag_aix='-shared'
6537cc4920e5Smrg	  shared_flag_svr4='-shared $wl-G'
6538cc4920e5Smrg        else
6539cc4920e5Smrg          # not using gcc
6540cc4920e5Smrg          if test ia64 = "$host_cpu"; then
6541cc4920e5Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6542cc4920e5Smrg	  # chokes on -Wl,-G. The following line is correct:
6543cc4920e5Smrg	  shared_flag='-G'
6544cc4920e5Smrg          else
6545cc4920e5Smrg	    if test yes = "$aix_use_runtimelinking"; then
6546cc4920e5Smrg	      shared_flag='$wl-G'
6547cc4920e5Smrg	    else
6548cc4920e5Smrg	      shared_flag='$wl-bM:SRE'
6549cc4920e5Smrg	    fi
6550cc4920e5Smrg	    shared_flag_aix='$wl-bM:SRE'
6551cc4920e5Smrg	    shared_flag_svr4='$wl-G'
6552cc4920e5Smrg          fi
6553cc4920e5Smrg        fi
6554cc4920e5Smrg
6555cc4920e5Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6556cc4920e5Smrg        # It seems that -bexpall does not export symbols beginning with
6557cc4920e5Smrg        # underscore (_), so it is better to generate a list of symbols to
6558cc4920e5Smrg	# export.
6559cc4920e5Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
6560cc4920e5Smrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6561cc4920e5Smrg          # Warning - without using the other runtime loading flags (-brtl),
6562cc4920e5Smrg          # -berok will link without error, but may produce a broken library.
6563cc4920e5Smrg          # The "-G" linker flag allows undefined symbols.
6564cc4920e5Smrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6565cc4920e5Smrg          # Determine the default libpath from the value encoded in an empty
6566cc4920e5Smrg          # executable.
6567cc4920e5Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
6568cc4920e5Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6569cc4920e5Smrg
6570cc4920e5Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6571cc4920e5Smrg        else
6572cc4920e5Smrg          if test ia64 = "$host_cpu"; then
6573cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6574cc4920e5Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6575cc4920e5Smrg	    _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"
6576cc4920e5Smrg          else
6577cc4920e5Smrg	    # Determine the default libpath from the value encoded in an
6578cc4920e5Smrg	    # empty executable.
6579cc4920e5Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
6580cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6581cc4920e5Smrg	    # Warning - without using the other run time loading flags,
6582cc4920e5Smrg	    # -berok will link without error, but may produce a broken library.
6583cc4920e5Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6584cc4920e5Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6585cc4920e5Smrg	    if test yes = "$with_gnu_ld"; then
6586cc4920e5Smrg	      # We only use this code for GNU lds that support --whole-archive.
6587cc4920e5Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6588cc4920e5Smrg	    else
6589cc4920e5Smrg	      # Exported symbols can be pulled into shared objects from archives
6590cc4920e5Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6591cc4920e5Smrg	    fi
6592cc4920e5Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6593cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6594cc4920e5Smrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6595cc4920e5Smrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6596cc4920e5Smrg	    if test svr4 != "$with_aix_soname"; then
6597cc4920e5Smrg	      # This is similar to how AIX traditionally builds its shared
6598cc4920e5Smrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6599cc4920e5Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6600cc4920e5Smrg	    fi
6601cc4920e5Smrg	    if test aix != "$with_aix_soname"; then
6602cc4920e5Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6603cc4920e5Smrg	    else
6604cc4920e5Smrg	      # used by -dlpreopen to get the symbols
6605cc4920e5Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6606cc4920e5Smrg	    fi
6607cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6608cc4920e5Smrg          fi
6609cc4920e5Smrg        fi
6610cc4920e5Smrg        ;;
6611cc4920e5Smrg
6612cc4920e5Smrg      beos*)
6613cc4920e5Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6614cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6615cc4920e5Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6616cc4920e5Smrg	  # support --undefined.  This deserves some investigation.  FIXME
6617cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6618cc4920e5Smrg	else
6619cc4920e5Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6620cc4920e5Smrg	fi
6621cc4920e5Smrg	;;
6622cc4920e5Smrg
6623cc4920e5Smrg      chorus*)
6624cc4920e5Smrg        case $cc_basename in
6625cc4920e5Smrg          *)
6626cc4920e5Smrg	  # FIXME: insert proper C++ library support
6627cc4920e5Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6628cc4920e5Smrg	  ;;
6629cc4920e5Smrg        esac
6630cc4920e5Smrg        ;;
6631cc4920e5Smrg
6632cc4920e5Smrg      cygwin* | mingw* | pw32* | cegcc*)
6633cc4920e5Smrg	case $GXX,$cc_basename in
6634cc4920e5Smrg	,cl* | no,cl*)
6635cc4920e5Smrg	  # Native MSVC
6636cc4920e5Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6637cc4920e5Smrg	  # no search path for DLLs.
6638cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6639cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6640cc4920e5Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
6641cc4920e5Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
6642cc4920e5Smrg	  # Tell ltmain to make .lib files, not .a files.
6643cc4920e5Smrg	  libext=lib
6644cc4920e5Smrg	  # Tell ltmain to make .dll files, not .so files.
6645cc4920e5Smrg	  shrext_cmds=.dll
6646cc4920e5Smrg	  # FIXME: Setting linknames here is a bad hack.
6647cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6648cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6649cc4920e5Smrg              cp "$export_symbols" "$output_objdir/$soname.def";
6650cc4920e5Smrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6651cc4920e5Smrg            else
6652cc4920e5Smrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6653cc4920e5Smrg            fi~
6654cc4920e5Smrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6655cc4920e5Smrg            linknames='
6656cc4920e5Smrg	  # The linker will not automatically build a static lib if we build a DLL.
6657cc4920e5Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6658cc4920e5Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6659cc4920e5Smrg	  # Don't use ranlib
6660cc4920e5Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6661cc4920e5Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6662cc4920e5Smrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
6663cc4920e5Smrg            case $lt_outputfile in
6664cc4920e5Smrg              *.exe|*.EXE) ;;
6665cc4920e5Smrg              *)
6666cc4920e5Smrg                lt_outputfile=$lt_outputfile.exe
6667cc4920e5Smrg                lt_tool_outputfile=$lt_tool_outputfile.exe
6668cc4920e5Smrg                ;;
6669cc4920e5Smrg            esac~
6670cc4920e5Smrg            func_to_tool_file "$lt_outputfile"~
6671cc4920e5Smrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6672cc4920e5Smrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6673cc4920e5Smrg              $RM "$lt_outputfile.manifest";
6674cc4920e5Smrg            fi'
6675cc4920e5Smrg	  ;;
6676cc4920e5Smrg	*)
6677cc4920e5Smrg	  # g++
6678cc4920e5Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6679cc4920e5Smrg	  # as there is no search path for DLLs.
6680cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6681cc4920e5Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6682cc4920e5Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6683cc4920e5Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
6684cc4920e5Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6685cc4920e5Smrg
6686cc4920e5Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6687cc4920e5Smrg	    _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'
6688cc4920e5Smrg	    # If the export-symbols file already is a .def file, use it as
6689cc4920e5Smrg	    # is; otherwise, prepend EXPORTS...
6690cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6691cc4920e5Smrg              cp $export_symbols $output_objdir/$soname.def;
6692cc4920e5Smrg            else
6693cc4920e5Smrg              echo EXPORTS > $output_objdir/$soname.def;
6694cc4920e5Smrg              cat $export_symbols >> $output_objdir/$soname.def;
6695cc4920e5Smrg            fi~
6696cc4920e5Smrg            $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'
6697cc4920e5Smrg	  else
6698cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6699cc4920e5Smrg	  fi
6700cc4920e5Smrg	  ;;
6701cc4920e5Smrg	esac
6702cc4920e5Smrg	;;
6703cc4920e5Smrg      darwin* | rhapsody*)
6704cc4920e5Smrg        _LT_DARWIN_LINKER_FEATURES($1)
6705cc4920e5Smrg	;;
6706cc4920e5Smrg
6707cc4920e5Smrg      os2*)
6708cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6709cc4920e5Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6710cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6711cc4920e5Smrg	shrext_cmds=.dll
6712cc4920e5Smrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6713cc4920e5Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6714cc4920e5Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6715cc4920e5Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6716cc4920e5Smrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6717cc4920e5Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6718cc4920e5Smrg	  emximp -o $lib $output_objdir/$libname.def'
6719cc4920e5Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6720cc4920e5Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6721cc4920e5Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6722cc4920e5Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6723cc4920e5Smrg	  prefix_cmds="$SED"~
6724cc4920e5Smrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6725cc4920e5Smrg	    prefix_cmds="$prefix_cmds -e 1d";
6726cc4920e5Smrg	  fi~
6727cc4920e5Smrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6728cc4920e5Smrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6729cc4920e5Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6730cc4920e5Smrg	  emximp -o $lib $output_objdir/$libname.def'
6731cc4920e5Smrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6732cc4920e5Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6733cc4920e5Smrg	;;
6734cc4920e5Smrg
6735cc4920e5Smrg      dgux*)
6736cc4920e5Smrg        case $cc_basename in
6737cc4920e5Smrg          ec++*)
6738cc4920e5Smrg	    # FIXME: insert proper C++ library support
6739cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6740cc4920e5Smrg	    ;;
6741cc4920e5Smrg          ghcx*)
6742cc4920e5Smrg	    # Green Hills C++ Compiler
6743cc4920e5Smrg	    # FIXME: insert proper C++ library support
6744cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6745cc4920e5Smrg	    ;;
6746cc4920e5Smrg          *)
6747cc4920e5Smrg	    # FIXME: insert proper C++ library support
6748cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6749cc4920e5Smrg	    ;;
6750cc4920e5Smrg        esac
6751cc4920e5Smrg        ;;
6752cc4920e5Smrg
6753cc4920e5Smrg      freebsd2.*)
6754cc4920e5Smrg        # C++ shared libraries reported to be fairly broken before
6755cc4920e5Smrg	# switch to ELF
6756cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6757cc4920e5Smrg        ;;
6758cc4920e5Smrg
6759cc4920e5Smrg      freebsd-elf*)
6760cc4920e5Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6761cc4920e5Smrg        ;;
6762cc4920e5Smrg
6763cc4920e5Smrg      freebsd* | dragonfly*)
6764cc4920e5Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6765cc4920e5Smrg        # conventions
6766cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6767cc4920e5Smrg        ;;
6768cc4920e5Smrg
6769cc4920e5Smrg      haiku*)
6770cc4920e5Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6771cc4920e5Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6772cc4920e5Smrg        ;;
6773cc4920e5Smrg
6774cc4920e5Smrg      hpux9*)
6775cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6776cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6777cc4920e5Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6778cc4920e5Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6779cc4920e5Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6780cc4920e5Smrg				             # but as the default
6781cc4920e5Smrg				             # location of the library.
6782cc4920e5Smrg
6783cc4920e5Smrg        case $cc_basename in
6784cc4920e5Smrg          CC*)
6785cc4920e5Smrg            # FIXME: insert proper C++ library support
6786cc4920e5Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
6787cc4920e5Smrg            ;;
6788cc4920e5Smrg          aCC*)
6789cc4920e5Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6790cc4920e5Smrg            # Commands to make compiler produce verbose output that lists
6791cc4920e5Smrg            # what "hidden" libraries, object files and flags are used when
6792cc4920e5Smrg            # linking a shared library.
6793cc4920e5Smrg            #
6794cc4920e5Smrg            # There doesn't appear to be a way to prevent this compiler from
6795cc4920e5Smrg            # explicitly linking system object files so we need to strip them
6796cc4920e5Smrg            # from the output so that they don't get included in the library
6797cc4920e5Smrg            # dependencies.
6798cc4920e5Smrg            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"'
6799cc4920e5Smrg            ;;
6800cc4920e5Smrg          *)
6801cc4920e5Smrg            if test yes = "$GXX"; then
6802cc4920e5Smrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6803cc4920e5Smrg            else
6804cc4920e5Smrg              # FIXME: insert proper C++ library support
6805cc4920e5Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
6806cc4920e5Smrg            fi
6807cc4920e5Smrg            ;;
6808cc4920e5Smrg        esac
6809cc4920e5Smrg        ;;
6810cc4920e5Smrg
6811cc4920e5Smrg      hpux10*|hpux11*)
6812cc4920e5Smrg        if test no = "$with_gnu_ld"; then
6813cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6814cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6815cc4920e5Smrg
6816cc4920e5Smrg          case $host_cpu in
6817cc4920e5Smrg            hppa*64*|ia64*)
6818cc4920e5Smrg              ;;
6819cc4920e5Smrg            *)
6820cc4920e5Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6821cc4920e5Smrg              ;;
6822cc4920e5Smrg          esac
6823cc4920e5Smrg        fi
6824cc4920e5Smrg        case $host_cpu in
6825cc4920e5Smrg          hppa*64*|ia64*)
6826cc4920e5Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
6827cc4920e5Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6828cc4920e5Smrg            ;;
6829cc4920e5Smrg          *)
6830cc4920e5Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
6831cc4920e5Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6832cc4920e5Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6833cc4920e5Smrg					         # but as the default
6834cc4920e5Smrg					         # location of the library.
6835cc4920e5Smrg            ;;
6836cc4920e5Smrg        esac
6837cc4920e5Smrg
6838cc4920e5Smrg        case $cc_basename in
6839cc4920e5Smrg          CC*)
6840cc4920e5Smrg	    # FIXME: insert proper C++ library support
6841cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6842cc4920e5Smrg	    ;;
6843cc4920e5Smrg          aCC*)
6844cc4920e5Smrg	    case $host_cpu in
6845cc4920e5Smrg	      hppa*64*)
6846cc4920e5Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6847cc4920e5Smrg	        ;;
6848cc4920e5Smrg	      ia64*)
6849cc4920e5Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6850cc4920e5Smrg	        ;;
6851cc4920e5Smrg	      *)
6852cc4920e5Smrg	        _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'
6853cc4920e5Smrg	        ;;
6854cc4920e5Smrg	    esac
6855cc4920e5Smrg	    # Commands to make compiler produce verbose output that lists
6856cc4920e5Smrg	    # what "hidden" libraries, object files and flags are used when
6857cc4920e5Smrg	    # linking a shared library.
6858cc4920e5Smrg	    #
6859cc4920e5Smrg	    # There doesn't appear to be a way to prevent this compiler from
6860cc4920e5Smrg	    # explicitly linking system object files so we need to strip them
6861cc4920e5Smrg	    # from the output so that they don't get included in the library
6862cc4920e5Smrg	    # dependencies.
6863cc4920e5Smrg	    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"'
6864cc4920e5Smrg	    ;;
6865cc4920e5Smrg          *)
6866cc4920e5Smrg	    if test yes = "$GXX"; then
6867cc4920e5Smrg	      if test no = "$with_gnu_ld"; then
6868cc4920e5Smrg	        case $host_cpu in
6869cc4920e5Smrg	          hppa*64*)
6870cc4920e5Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6871cc4920e5Smrg	            ;;
6872cc4920e5Smrg	          ia64*)
6873cc4920e5Smrg	            _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'
6874cc4920e5Smrg	            ;;
6875cc4920e5Smrg	          *)
6876cc4920e5Smrg	            _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'
6877cc4920e5Smrg	            ;;
6878cc4920e5Smrg	        esac
6879cc4920e5Smrg	      fi
6880cc4920e5Smrg	    else
6881cc4920e5Smrg	      # FIXME: insert proper C++ library support
6882cc4920e5Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6883cc4920e5Smrg	    fi
6884cc4920e5Smrg	    ;;
6885cc4920e5Smrg        esac
6886cc4920e5Smrg        ;;
6887cc4920e5Smrg
6888cc4920e5Smrg      interix[[3-9]]*)
6889cc4920e5Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
6890cc4920e5Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6891cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6892cc4920e5Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6893cc4920e5Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6894cc4920e5Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
6895cc4920e5Smrg	# default) and relocated if they conflict, which is a slow very memory
6896cc4920e5Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
6897cc4920e5Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6898cc4920e5Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6899cc4920e5Smrg	_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'
6900cc4920e5Smrg	_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'
6901cc4920e5Smrg	;;
6902cc4920e5Smrg      irix5* | irix6*)
6903cc4920e5Smrg        case $cc_basename in
6904cc4920e5Smrg          CC*)
6905cc4920e5Smrg	    # SGI C++
6906cc4920e5Smrg	    _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'
6907cc4920e5Smrg
6908cc4920e5Smrg	    # Archives containing C++ object files must be created using
6909cc4920e5Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6910cc4920e5Smrg	    # necessary to make sure instantiated templates are included
6911cc4920e5Smrg	    # in the archive.
6912cc4920e5Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6913cc4920e5Smrg	    ;;
6914cc4920e5Smrg          *)
6915cc4920e5Smrg	    if test yes = "$GXX"; then
6916cc4920e5Smrg	      if test no = "$with_gnu_ld"; then
6917cc4920e5Smrg	        _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'
6918cc4920e5Smrg	      else
6919cc4920e5Smrg	        _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'
6920cc4920e5Smrg	      fi
6921cc4920e5Smrg	    fi
6922cc4920e5Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6923cc4920e5Smrg	    ;;
6924cc4920e5Smrg        esac
6925cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6926cc4920e5Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6927cc4920e5Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
6928cc4920e5Smrg        ;;
6929cc4920e5Smrg
6930cc4920e5Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6931cc4920e5Smrg        case $cc_basename in
6932cc4920e5Smrg          KCC*)
6933cc4920e5Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6934cc4920e5Smrg
6935cc4920e5Smrg	    # KCC will only create a shared library if the output file
6936cc4920e5Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6937cc4920e5Smrg	    # to its proper name (with version) after linking.
6938cc4920e5Smrg	    _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'
6939cc4920e5Smrg	    _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'
6940cc4920e5Smrg	    # Commands to make compiler produce verbose output that lists
6941cc4920e5Smrg	    # what "hidden" libraries, object files and flags are used when
6942cc4920e5Smrg	    # linking a shared library.
6943cc4920e5Smrg	    #
6944cc4920e5Smrg	    # There doesn't appear to be a way to prevent this compiler from
6945cc4920e5Smrg	    # explicitly linking system object files so we need to strip them
6946cc4920e5Smrg	    # from the output so that they don't get included in the library
6947cc4920e5Smrg	    # dependencies.
6948cc4920e5Smrg	    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"'
6949cc4920e5Smrg
6950cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6951cc4920e5Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6952cc4920e5Smrg
6953cc4920e5Smrg	    # Archives containing C++ object files must be created using
6954cc4920e5Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6955cc4920e5Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6956cc4920e5Smrg	    ;;
6957cc4920e5Smrg	  icpc* | ecpc* )
6958cc4920e5Smrg	    # Intel C++
6959cc4920e5Smrg	    with_gnu_ld=yes
6960cc4920e5Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
6961cc4920e5Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6962cc4920e5Smrg	    # earlier do not add the objects themselves.
6963cc4920e5Smrg	    case `$CC -V 2>&1` in
6964cc4920e5Smrg	      *"Version 7."*)
6965cc4920e5Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6966cc4920e5Smrg		_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'
6967cc4920e5Smrg		;;
6968cc4920e5Smrg	      *)  # Version 8.0 or newer
6969cc4920e5Smrg	        tmp_idyn=
6970cc4920e5Smrg	        case $host_cpu in
6971cc4920e5Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
6972cc4920e5Smrg		esac
6973cc4920e5Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6974cc4920e5Smrg		_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'
6975cc4920e5Smrg		;;
6976cc4920e5Smrg	    esac
6977cc4920e5Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6978cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6979cc4920e5Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6980cc4920e5Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6981cc4920e5Smrg	    ;;
6982cc4920e5Smrg          pgCC* | pgcpp*)
6983cc4920e5Smrg            # Portland Group C++ compiler
6984cc4920e5Smrg	    case `$CC -V` in
6985cc4920e5Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6986cc4920e5Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6987cc4920e5Smrg               rm -rf $tpldir~
6988cc4920e5Smrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6989cc4920e5Smrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6990cc4920e5Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6991cc4920e5Smrg                rm -rf $tpldir~
6992cc4920e5Smrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6993cc4920e5Smrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6994cc4920e5Smrg                $RANLIB $oldlib'
6995cc4920e5Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6996cc4920e5Smrg                rm -rf $tpldir~
6997cc4920e5Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6998cc4920e5Smrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6999cc4920e5Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7000cc4920e5Smrg                rm -rf $tpldir~
7001cc4920e5Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7002cc4920e5Smrg                $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'
7003cc4920e5Smrg	      ;;
7004cc4920e5Smrg	    *) # Version 6 and above use weak symbols
7005cc4920e5Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7006cc4920e5Smrg	      _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'
7007cc4920e5Smrg	      ;;
7008cc4920e5Smrg	    esac
7009cc4920e5Smrg
7010cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7011cc4920e5Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7012cc4920e5Smrg	    _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'
7013cc4920e5Smrg            ;;
7014cc4920e5Smrg	  cxx*)
7015cc4920e5Smrg	    # Compaq C++
7016cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7017cc4920e5Smrg	    _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'
7018cc4920e5Smrg
7019cc4920e5Smrg	    runpath_var=LD_RUN_PATH
7020cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7021cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7022cc4920e5Smrg
7023cc4920e5Smrg	    # Commands to make compiler produce verbose output that lists
7024cc4920e5Smrg	    # what "hidden" libraries, object files and flags are used when
7025cc4920e5Smrg	    # linking a shared library.
7026cc4920e5Smrg	    #
7027cc4920e5Smrg	    # There doesn't appear to be a way to prevent this compiler from
7028cc4920e5Smrg	    # explicitly linking system object files so we need to strip them
7029cc4920e5Smrg	    # from the output so that they don't get included in the library
7030cc4920e5Smrg	    # dependencies.
7031cc4920e5Smrg	    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'
7032cc4920e5Smrg	    ;;
7033cc4920e5Smrg	  xl* | mpixl* | bgxl*)
7034cc4920e5Smrg	    # IBM XL 8.0 on PPC, with GNU ld
7035cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7036cc4920e5Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7037cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7038cc4920e5Smrg	    if test yes = "$supports_anon_versioning"; then
7039cc4920e5Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7040cc4920e5Smrg                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7041cc4920e5Smrg                echo "local: *; };" >> $output_objdir/$libname.ver~
7042cc4920e5Smrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7043cc4920e5Smrg	    fi
7044cc4920e5Smrg	    ;;
7045cc4920e5Smrg	  *)
7046cc4920e5Smrg	    case `$CC -V 2>&1 | sed 5q` in
7047cc4920e5Smrg	    *Sun\ C*)
7048cc4920e5Smrg	      # Sun C++ 5.9
7049cc4920e5Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7050cc4920e5Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7051cc4920e5Smrg	      _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'
7052cc4920e5Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7053cc4920e5Smrg	      _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'
7054cc4920e5Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7055cc4920e5Smrg
7056cc4920e5Smrg	      # Not sure whether something based on
7057cc4920e5Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7058cc4920e5Smrg	      # would be better.
7059cc4920e5Smrg	      output_verbose_link_cmd='func_echo_all'
7060cc4920e5Smrg
7061cc4920e5Smrg	      # Archives containing C++ object files must be created using
7062cc4920e5Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7063cc4920e5Smrg	      # necessary to make sure instantiated templates are included
7064cc4920e5Smrg	      # in the archive.
7065cc4920e5Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7066cc4920e5Smrg	      ;;
7067cc4920e5Smrg	    esac
7068cc4920e5Smrg	    ;;
7069cc4920e5Smrg	esac
7070cc4920e5Smrg	;;
7071cc4920e5Smrg
7072cc4920e5Smrg      lynxos*)
7073cc4920e5Smrg        # FIXME: insert proper C++ library support
7074cc4920e5Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
7075cc4920e5Smrg	;;
7076cc4920e5Smrg
7077cc4920e5Smrg      m88k*)
7078cc4920e5Smrg        # FIXME: insert proper C++ library support
7079cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
7080cc4920e5Smrg	;;
7081cc4920e5Smrg
7082cc4920e5Smrg      mvs*)
7083cc4920e5Smrg        case $cc_basename in
7084cc4920e5Smrg          cxx*)
7085cc4920e5Smrg	    # FIXME: insert proper C++ library support
7086cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7087cc4920e5Smrg	    ;;
7088cc4920e5Smrg	  *)
7089cc4920e5Smrg	    # FIXME: insert proper C++ library support
7090cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7091cc4920e5Smrg	    ;;
7092cc4920e5Smrg	esac
7093cc4920e5Smrg	;;
7094cc4920e5Smrg
7095cc4920e5Smrg      netbsd*)
7096cc4920e5Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7097cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7098cc4920e5Smrg	  wlarc=
7099cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7100cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7101cc4920e5Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7102cc4920e5Smrg	fi
7103cc4920e5Smrg	# Workaround some broken pre-1.5 toolchains
7104cc4920e5Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7105cc4920e5Smrg	;;
7106cc4920e5Smrg
7107cc4920e5Smrg      *nto* | *qnx*)
7108cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
7109cc4920e5Smrg	;;
7110cc4920e5Smrg
7111cc4920e5Smrg      openbsd* | bitrig*)
7112cc4920e5Smrg	if test -f /usr/libexec/ld.so; then
7113cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7114cc4920e5Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7115cc4920e5Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7116cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7117cc4920e5Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7118cc4920e5Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7119cc4920e5Smrg	    _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'
7120cc4920e5Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7121cc4920e5Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7122cc4920e5Smrg	  fi
7123cc4920e5Smrg	  output_verbose_link_cmd=func_echo_all
7124cc4920e5Smrg	else
7125cc4920e5Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
7126cc4920e5Smrg	fi
7127cc4920e5Smrg	;;
7128cc4920e5Smrg
7129cc4920e5Smrg      osf3* | osf4* | osf5*)
7130cc4920e5Smrg        case $cc_basename in
7131cc4920e5Smrg          KCC*)
7132cc4920e5Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7133cc4920e5Smrg
7134cc4920e5Smrg	    # KCC will only create a shared library if the output file
7135cc4920e5Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7136cc4920e5Smrg	    # to its proper name (with version) after linking.
7137cc4920e5Smrg	    _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'
7138cc4920e5Smrg
7139cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7140cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7141cc4920e5Smrg
7142cc4920e5Smrg	    # Archives containing C++ object files must be created using
7143cc4920e5Smrg	    # the KAI C++ compiler.
7144cc4920e5Smrg	    case $host in
7145cc4920e5Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7146cc4920e5Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7147cc4920e5Smrg	    esac
7148cc4920e5Smrg	    ;;
7149cc4920e5Smrg          RCC*)
7150cc4920e5Smrg	    # Rational C++ 2.4.1
7151cc4920e5Smrg	    # FIXME: insert proper C++ library support
7152cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7153cc4920e5Smrg	    ;;
7154cc4920e5Smrg          cxx*)
7155cc4920e5Smrg	    case $host in
7156cc4920e5Smrg	      osf3*)
7157cc4920e5Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7158cc4920e5Smrg	        _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'
7159cc4920e5Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7160cc4920e5Smrg		;;
7161cc4920e5Smrg	      *)
7162cc4920e5Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7163cc4920e5Smrg	        _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'
7164cc4920e5Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7165cc4920e5Smrg                  echo "-hidden">> $lib.exp~
7166cc4920e5Smrg                  $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~
7167cc4920e5Smrg                  $RM $lib.exp'
7168cc4920e5Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7169cc4920e5Smrg		;;
7170cc4920e5Smrg	    esac
7171cc4920e5Smrg
7172cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7173cc4920e5Smrg
7174cc4920e5Smrg	    # Commands to make compiler produce verbose output that lists
7175cc4920e5Smrg	    # what "hidden" libraries, object files and flags are used when
7176cc4920e5Smrg	    # linking a shared library.
7177cc4920e5Smrg	    #
7178cc4920e5Smrg	    # There doesn't appear to be a way to prevent this compiler from
7179cc4920e5Smrg	    # explicitly linking system object files so we need to strip them
7180cc4920e5Smrg	    # from the output so that they don't get included in the library
7181cc4920e5Smrg	    # dependencies.
7182cc4920e5Smrg	    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"'
7183cc4920e5Smrg	    ;;
7184cc4920e5Smrg	  *)
7185cc4920e5Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
7186cc4920e5Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7187cc4920e5Smrg	      case $host in
7188cc4920e5Smrg	        osf3*)
7189cc4920e5Smrg	          _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'
7190cc4920e5Smrg		  ;;
7191cc4920e5Smrg	        *)
7192cc4920e5Smrg	          _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'
7193cc4920e5Smrg		  ;;
7194cc4920e5Smrg	      esac
7195cc4920e5Smrg
7196cc4920e5Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7197cc4920e5Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7198cc4920e5Smrg
7199cc4920e5Smrg	      # Commands to make compiler produce verbose output that lists
7200cc4920e5Smrg	      # what "hidden" libraries, object files and flags are used when
7201cc4920e5Smrg	      # linking a shared library.
7202cc4920e5Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7203cc4920e5Smrg
7204cc4920e5Smrg	    else
7205cc4920e5Smrg	      # FIXME: insert proper C++ library support
7206cc4920e5Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
7207cc4920e5Smrg	    fi
7208cc4920e5Smrg	    ;;
7209cc4920e5Smrg        esac
7210cc4920e5Smrg        ;;
7211cc4920e5Smrg
7212cc4920e5Smrg      psos*)
7213cc4920e5Smrg        # FIXME: insert proper C++ library support
7214cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
7215cc4920e5Smrg        ;;
7216cc4920e5Smrg
7217cc4920e5Smrg      sunos4*)
7218cc4920e5Smrg        case $cc_basename in
7219cc4920e5Smrg          CC*)
7220cc4920e5Smrg	    # Sun C++ 4.x
7221cc4920e5Smrg	    # FIXME: insert proper C++ library support
7222cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7223cc4920e5Smrg	    ;;
7224cc4920e5Smrg          lcc*)
7225cc4920e5Smrg	    # Lucid
7226cc4920e5Smrg	    # FIXME: insert proper C++ library support
7227cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7228cc4920e5Smrg	    ;;
7229cc4920e5Smrg          *)
7230cc4920e5Smrg	    # FIXME: insert proper C++ library support
7231cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7232cc4920e5Smrg	    ;;
7233cc4920e5Smrg        esac
7234cc4920e5Smrg        ;;
7235cc4920e5Smrg
7236cc4920e5Smrg      solaris*)
7237cc4920e5Smrg        case $cc_basename in
7238cc4920e5Smrg          CC* | sunCC*)
7239cc4920e5Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
7240cc4920e5Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7241cc4920e5Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7242cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7243cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7244cc4920e5Smrg              $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'
7245cc4920e5Smrg
7246cc4920e5Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7247cc4920e5Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7248cc4920e5Smrg	    case $host_os in
7249cc4920e5Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7250cc4920e5Smrg	      *)
7251cc4920e5Smrg		# The compiler driver will combine and reorder linker options,
7252cc4920e5Smrg		# but understands '-z linker_flag'.
7253cc4920e5Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7254cc4920e5Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7255cc4920e5Smrg	        ;;
7256cc4920e5Smrg	    esac
7257cc4920e5Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7258cc4920e5Smrg
7259cc4920e5Smrg	    output_verbose_link_cmd='func_echo_all'
7260cc4920e5Smrg
7261cc4920e5Smrg	    # Archives containing C++ object files must be created using
7262cc4920e5Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7263cc4920e5Smrg	    # necessary to make sure instantiated templates are included
7264cc4920e5Smrg	    # in the archive.
7265cc4920e5Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7266cc4920e5Smrg	    ;;
7267cc4920e5Smrg          gcx*)
7268cc4920e5Smrg	    # Green Hills C++ Compiler
7269cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7270cc4920e5Smrg
7271cc4920e5Smrg	    # The C++ compiler must be used to create the archive.
7272cc4920e5Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7273cc4920e5Smrg	    ;;
7274cc4920e5Smrg          *)
7275cc4920e5Smrg	    # GNU C++ compiler with Solaris linker
7276cc4920e5Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
7277cc4920e5Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7278cc4920e5Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7279cc4920e5Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7280cc4920e5Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7281cc4920e5Smrg                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7282cc4920e5Smrg
7283cc4920e5Smrg	        # Commands to make compiler produce verbose output that lists
7284cc4920e5Smrg	        # what "hidden" libraries, object files and flags are used when
7285cc4920e5Smrg	        # linking a shared library.
7286cc4920e5Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7287cc4920e5Smrg	      else
7288cc4920e5Smrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7289cc4920e5Smrg	        # platform.
7290cc4920e5Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7291cc4920e5Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7292cc4920e5Smrg                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7293cc4920e5Smrg
7294cc4920e5Smrg	        # Commands to make compiler produce verbose output that lists
7295cc4920e5Smrg	        # what "hidden" libraries, object files and flags are used when
7296cc4920e5Smrg	        # linking a shared library.
7297cc4920e5Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7298cc4920e5Smrg	      fi
7299cc4920e5Smrg
7300cc4920e5Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7301cc4920e5Smrg	      case $host_os in
7302cc4920e5Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7303cc4920e5Smrg		*)
7304cc4920e5Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7305cc4920e5Smrg		  ;;
7306cc4920e5Smrg	      esac
7307cc4920e5Smrg	    fi
7308cc4920e5Smrg	    ;;
7309cc4920e5Smrg        esac
7310cc4920e5Smrg        ;;
7311cc4920e5Smrg
7312cc4920e5Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7313cc4920e5Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7314cc4920e5Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7315cc4920e5Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7316cc4920e5Smrg      runpath_var='LD_RUN_PATH'
7317cc4920e5Smrg
7318cc4920e5Smrg      case $cc_basename in
7319cc4920e5Smrg        CC*)
7320cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7321cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7322cc4920e5Smrg	  ;;
7323cc4920e5Smrg	*)
7324cc4920e5Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7325cc4920e5Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7326cc4920e5Smrg	  ;;
7327cc4920e5Smrg      esac
7328cc4920e5Smrg      ;;
7329cc4920e5Smrg
7330cc4920e5Smrg      sysv5* | sco3.2v5* | sco5v6*)
7331cc4920e5Smrg	# Note: We CANNOT use -z defs as we might desire, because we do not
7332cc4920e5Smrg	# link with -lc, and that would cause any symbols used from libc to
7333cc4920e5Smrg	# always be unresolved, which means just about no library would
7334cc4920e5Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
7335cc4920e5Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
7336cc4920e5Smrg	# as -z defs.
7337cc4920e5Smrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7338cc4920e5Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7339cc4920e5Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7340cc4920e5Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7341cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7342cc4920e5Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7343cc4920e5Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
7344cc4920e5Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7345cc4920e5Smrg	runpath_var='LD_RUN_PATH'
7346cc4920e5Smrg
7347cc4920e5Smrg	case $cc_basename in
7348cc4920e5Smrg          CC*)
7349cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7350cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7351cc4920e5Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7352cc4920e5Smrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7353cc4920e5Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7354cc4920e5Smrg              '"$_LT_TAGVAR(reload_cmds, $1)"
7355cc4920e5Smrg	    ;;
7356cc4920e5Smrg	  *)
7357cc4920e5Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7358cc4920e5Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7359cc4920e5Smrg	    ;;
7360cc4920e5Smrg	esac
7361cc4920e5Smrg      ;;
7362cc4920e5Smrg
7363cc4920e5Smrg      tandem*)
7364cc4920e5Smrg        case $cc_basename in
7365cc4920e5Smrg          NCC*)
7366cc4920e5Smrg	    # NonStop-UX NCC 3.20
7367cc4920e5Smrg	    # FIXME: insert proper C++ library support
7368cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7369cc4920e5Smrg	    ;;
7370cc4920e5Smrg          *)
7371cc4920e5Smrg	    # FIXME: insert proper C++ library support
7372cc4920e5Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7373cc4920e5Smrg	    ;;
7374cc4920e5Smrg        esac
7375cc4920e5Smrg        ;;
7376cc4920e5Smrg
7377cc4920e5Smrg      vxworks*)
7378cc4920e5Smrg        # FIXME: insert proper C++ library support
7379cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
7380cc4920e5Smrg        ;;
7381cc4920e5Smrg
7382cc4920e5Smrg      *)
7383cc4920e5Smrg        # FIXME: insert proper C++ library support
7384cc4920e5Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
7385cc4920e5Smrg        ;;
7386cc4920e5Smrg    esac
7387cc4920e5Smrg
7388cc4920e5Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7389cc4920e5Smrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7390cc4920e5Smrg
7391cc4920e5Smrg    _LT_TAGVAR(GCC, $1)=$GXX
7392cc4920e5Smrg    _LT_TAGVAR(LD, $1)=$LD
7393cc4920e5Smrg
7394cc4920e5Smrg    ## CAVEAT EMPTOR:
7395cc4920e5Smrg    ## There is no encapsulation within the following macros, do not change
7396cc4920e5Smrg    ## the running order or otherwise move them around unless you know exactly
7397cc4920e5Smrg    ## what you are doing...
7398cc4920e5Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
7399cc4920e5Smrg    _LT_COMPILER_PIC($1)
7400cc4920e5Smrg    _LT_COMPILER_C_O($1)
7401cc4920e5Smrg    _LT_COMPILER_FILE_LOCKS($1)
7402cc4920e5Smrg    _LT_LINKER_SHLIBS($1)
7403cc4920e5Smrg    _LT_SYS_DYNAMIC_LINKER($1)
7404cc4920e5Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7405cc4920e5Smrg
7406cc4920e5Smrg    _LT_CONFIG($1)
7407cc4920e5Smrg  fi # test -n "$compiler"
7408cc4920e5Smrg
7409cc4920e5Smrg  CC=$lt_save_CC
7410cc4920e5Smrg  CFLAGS=$lt_save_CFLAGS
7411cc4920e5Smrg  LDCXX=$LD
7412cc4920e5Smrg  LD=$lt_save_LD
7413cc4920e5Smrg  GCC=$lt_save_GCC
7414cc4920e5Smrg  with_gnu_ld=$lt_save_with_gnu_ld
7415cc4920e5Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
7416cc4920e5Smrg  lt_cv_path_LD=$lt_save_path_LD
7417cc4920e5Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7418cc4920e5Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7419cc4920e5Smrgfi # test yes != "$_lt_caught_CXX_error"
7420cc4920e5Smrg
7421cc4920e5SmrgAC_LANG_POP
7422cc4920e5Smrg])# _LT_LANG_CXX_CONFIG
7423cc4920e5Smrg
7424cc4920e5Smrg
7425cc4920e5Smrg# _LT_FUNC_STRIPNAME_CNF
7426cc4920e5Smrg# ----------------------
7427cc4920e5Smrg# func_stripname_cnf prefix suffix name
7428cc4920e5Smrg# strip PREFIX and SUFFIX off of NAME.
7429cc4920e5Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7430cc4920e5Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7431cc4920e5Smrg# dot (in which case that matches only a dot).
7432cc4920e5Smrg#
7433cc4920e5Smrg# This function is identical to the (non-XSI) version of func_stripname,
7434cc4920e5Smrg# except this one can be used by m4 code that may be executed by configure,
7435cc4920e5Smrg# rather than the libtool script.
7436cc4920e5Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7437cc4920e5SmrgAC_REQUIRE([_LT_DECL_SED])
7438cc4920e5SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7439cc4920e5Smrgfunc_stripname_cnf ()
7440cc4920e5Smrg{
7441cc4920e5Smrg  case @S|@2 in
7442cc4920e5Smrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7443cc4920e5Smrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7444cc4920e5Smrg  esac
7445cc4920e5Smrg} # func_stripname_cnf
7446cc4920e5Smrg])# _LT_FUNC_STRIPNAME_CNF
7447cc4920e5Smrg
7448cc4920e5Smrg
7449cc4920e5Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7450cc4920e5Smrg# ---------------------------------
7451cc4920e5Smrg# Figure out "hidden" library dependencies from verbose
7452cc4920e5Smrg# compiler output when linking a shared library.
7453cc4920e5Smrg# Parse the compiler output and extract the necessary
7454cc4920e5Smrg# objects, libraries and library flags.
7455cc4920e5Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7456cc4920e5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7457cc4920e5SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7458cc4920e5Smrg# Dependencies to place before and after the object being linked:
7459cc4920e5Smrg_LT_TAGVAR(predep_objects, $1)=
7460cc4920e5Smrg_LT_TAGVAR(postdep_objects, $1)=
7461cc4920e5Smrg_LT_TAGVAR(predeps, $1)=
7462cc4920e5Smrg_LT_TAGVAR(postdeps, $1)=
7463cc4920e5Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
7464cc4920e5Smrg
7465cc4920e5Smrgdnl we can't use the lt_simple_compile_test_code here,
7466cc4920e5Smrgdnl because it contains code intended for an executable,
7467cc4920e5Smrgdnl not a library.  It's possible we should let each
7468cc4920e5Smrgdnl tag define a new lt_????_link_test_code variable,
7469cc4920e5Smrgdnl but it's only used here...
7470cc4920e5Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7471cc4920e5Smrgint a;
7472cc4920e5Smrgvoid foo (void) { a = 0; }
7473cc4920e5Smrg_LT_EOF
7474cc4920e5Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7475cc4920e5Smrgclass Foo
7476cc4920e5Smrg{
7477cc4920e5Smrgpublic:
7478cc4920e5Smrg  Foo (void) { a = 0; }
7479cc4920e5Smrgprivate:
7480cc4920e5Smrg  int a;
7481cc4920e5Smrg};
7482cc4920e5Smrg_LT_EOF
7483cc4920e5Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7484cc4920e5Smrg      subroutine foo
7485cc4920e5Smrg      implicit none
7486cc4920e5Smrg      integer*4 a
7487cc4920e5Smrg      a=0
7488cc4920e5Smrg      return
7489cc4920e5Smrg      end
7490cc4920e5Smrg_LT_EOF
7491cc4920e5Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7492cc4920e5Smrg      subroutine foo
7493cc4920e5Smrg      implicit none
7494cc4920e5Smrg      integer a
7495cc4920e5Smrg      a=0
7496cc4920e5Smrg      return
7497cc4920e5Smrg      end
7498cc4920e5Smrg_LT_EOF
7499cc4920e5Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7500cc4920e5Smrgpublic class foo {
7501cc4920e5Smrg  private int a;
7502cc4920e5Smrg  public void bar (void) {
7503cc4920e5Smrg    a = 0;
7504cc4920e5Smrg  }
7505cc4920e5Smrg};
7506cc4920e5Smrg_LT_EOF
7507cc4920e5Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7508cc4920e5Smrgpackage foo
7509cc4920e5Smrgfunc foo() {
7510cc4920e5Smrg}
7511cc4920e5Smrg_LT_EOF
7512cc4920e5Smrg])
7513cc4920e5Smrg
7514cc4920e5Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
7515cc4920e5Smrgcase "$CC $CFLAGS " in #(
7516cc4920e5Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7517cc4920e5Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7518cc4920e5Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7519cc4920e5Smrgesac
7520cc4920e5Smrg
7521cc4920e5Smrgdnl Parse the compiler output and extract the necessary
7522cc4920e5Smrgdnl objects, libraries and library flags.
7523cc4920e5Smrgif AC_TRY_EVAL(ac_compile); then
7524cc4920e5Smrg  # Parse the compiler output and extract the necessary
7525cc4920e5Smrg  # objects, libraries and library flags.
7526cc4920e5Smrg
7527cc4920e5Smrg  # Sentinel used to keep track of whether or not we are before
7528cc4920e5Smrg  # the conftest object file.
7529cc4920e5Smrg  pre_test_object_deps_done=no
7530cc4920e5Smrg
7531cc4920e5Smrg  for p in `eval "$output_verbose_link_cmd"`; do
7532cc4920e5Smrg    case $prev$p in
7533cc4920e5Smrg
7534cc4920e5Smrg    -L* | -R* | -l*)
7535cc4920e5Smrg       # Some compilers place space between "-{L,R}" and the path.
7536cc4920e5Smrg       # Remove the space.
7537cc4920e5Smrg       if test x-L = "$p" ||
7538cc4920e5Smrg          test x-R = "$p"; then
7539cc4920e5Smrg	 prev=$p
7540cc4920e5Smrg	 continue
7541cc4920e5Smrg       fi
7542cc4920e5Smrg
7543cc4920e5Smrg       # Expand the sysroot to ease extracting the directories later.
7544cc4920e5Smrg       if test -z "$prev"; then
7545cc4920e5Smrg         case $p in
7546cc4920e5Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7547cc4920e5Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7548cc4920e5Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7549cc4920e5Smrg         esac
7550cc4920e5Smrg       fi
7551cc4920e5Smrg       case $p in
7552cc4920e5Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7553cc4920e5Smrg       esac
7554cc4920e5Smrg       if test no = "$pre_test_object_deps_done"; then
7555cc4920e5Smrg	 case $prev in
7556cc4920e5Smrg	 -L | -R)
7557cc4920e5Smrg	   # Internal compiler library paths should come after those
7558cc4920e5Smrg	   # provided the user.  The postdeps already come after the
7559cc4920e5Smrg	   # user supplied libs so there is no need to process them.
7560cc4920e5Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7561cc4920e5Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7562cc4920e5Smrg	   else
7563cc4920e5Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7564cc4920e5Smrg	   fi
7565cc4920e5Smrg	   ;;
7566cc4920e5Smrg	 # The "-l" case would never come before the object being
7567cc4920e5Smrg	 # linked, so don't bother handling this case.
7568cc4920e5Smrg	 esac
7569cc4920e5Smrg       else
7570cc4920e5Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7571cc4920e5Smrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
7572cc4920e5Smrg	 else
7573cc4920e5Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7574cc4920e5Smrg	 fi
7575cc4920e5Smrg       fi
7576cc4920e5Smrg       prev=
7577cc4920e5Smrg       ;;
7578cc4920e5Smrg
7579cc4920e5Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
7580cc4920e5Smrg    *.$objext)
7581cc4920e5Smrg       # This assumes that the test object file only shows up
7582cc4920e5Smrg       # once in the compiler output.
7583cc4920e5Smrg       if test "$p" = "conftest.$objext"; then
7584cc4920e5Smrg	 pre_test_object_deps_done=yes
7585cc4920e5Smrg	 continue
7586cc4920e5Smrg       fi
7587cc4920e5Smrg
7588cc4920e5Smrg       if test no = "$pre_test_object_deps_done"; then
7589cc4920e5Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7590cc4920e5Smrg	   _LT_TAGVAR(predep_objects, $1)=$p
7591cc4920e5Smrg	 else
7592cc4920e5Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7593cc4920e5Smrg	 fi
7594cc4920e5Smrg       else
7595cc4920e5Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7596cc4920e5Smrg	   _LT_TAGVAR(postdep_objects, $1)=$p
7597cc4920e5Smrg	 else
7598cc4920e5Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7599cc4920e5Smrg	 fi
7600cc4920e5Smrg       fi
7601cc4920e5Smrg       ;;
7602cc4920e5Smrg
7603cc4920e5Smrg    *) ;; # Ignore the rest.
7604cc4920e5Smrg
7605cc4920e5Smrg    esac
7606cc4920e5Smrg  done
7607cc4920e5Smrg
7608cc4920e5Smrg  # Clean up.
7609cc4920e5Smrg  rm -f a.out a.exe
7610cc4920e5Smrgelse
7611cc4920e5Smrg  echo "libtool.m4: error: problem compiling $1 test program"
7612cc4920e5Smrgfi
7613cc4920e5Smrg
7614cc4920e5Smrg$RM -f confest.$objext
7615cc4920e5SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
7616cc4920e5Smrg
7617cc4920e5Smrg# PORTME: override above test on systems where it is broken
7618cc4920e5Smrgm4_if([$1], [CXX],
7619cc4920e5Smrg[case $host_os in
7620cc4920e5Smrginterix[[3-9]]*)
7621cc4920e5Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7622cc4920e5Smrg  # hack all around it, let's just trust "g++" to DTRT.
7623cc4920e5Smrg  _LT_TAGVAR(predep_objects,$1)=
7624cc4920e5Smrg  _LT_TAGVAR(postdep_objects,$1)=
7625cc4920e5Smrg  _LT_TAGVAR(postdeps,$1)=
7626cc4920e5Smrg  ;;
7627cc4920e5Smrgesac
7628cc4920e5Smrg])
7629cc4920e5Smrg
7630cc4920e5Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
7631cc4920e5Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7632cc4920e5Smrgesac
7633cc4920e5Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7634cc4920e5Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7635cc4920e5Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7636cc4920e5Smrgfi
7637cc4920e5Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7638cc4920e5Smrg    [The directories searched by this compiler when creating a shared library])
7639cc4920e5Smrg_LT_TAGDECL([], [predep_objects], [1],
7640cc4920e5Smrg    [Dependencies to place before and after the objects being linked to
7641cc4920e5Smrg    create a shared library])
7642cc4920e5Smrg_LT_TAGDECL([], [postdep_objects], [1])
7643cc4920e5Smrg_LT_TAGDECL([], [predeps], [1])
7644cc4920e5Smrg_LT_TAGDECL([], [postdeps], [1])
7645cc4920e5Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
7646cc4920e5Smrg    [The library search path used internally by the compiler when linking
7647cc4920e5Smrg    a shared library])
7648cc4920e5Smrg])# _LT_SYS_HIDDEN_LIBDEPS
7649cc4920e5Smrg
7650cc4920e5Smrg
7651cc4920e5Smrg# _LT_LANG_F77_CONFIG([TAG])
7652cc4920e5Smrg# --------------------------
7653cc4920e5Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
7654cc4920e5Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7655cc4920e5Smrg# to write the compiler configuration to 'libtool'.
7656cc4920e5Smrgm4_defun([_LT_LANG_F77_CONFIG],
7657cc4920e5Smrg[AC_LANG_PUSH(Fortran 77)
7658cc4920e5Smrgif test -z "$F77" || test no = "$F77"; then
7659cc4920e5Smrg  _lt_disable_F77=yes
7660cc4920e5Smrgfi
7661cc4920e5Smrg
7662cc4920e5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7663cc4920e5Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
7664cc4920e5Smrg_LT_TAGVAR(always_export_symbols, $1)=no
7665cc4920e5Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7666cc4920e5Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7667cc4920e5Smrg_LT_TAGVAR(hardcode_direct, $1)=no
7668cc4920e5Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7669cc4920e5Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7670cc4920e5Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7671cc4920e5Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7672cc4920e5Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
7673cc4920e5Smrg_LT_TAGVAR(inherit_rpath, $1)=no
7674cc4920e5Smrg_LT_TAGVAR(module_cmds, $1)=
7675cc4920e5Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
7676cc4920e5Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7677cc4920e5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7678cc4920e5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7679cc4920e5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7680cc4920e5Smrg_LT_TAGVAR(no_undefined_flag, $1)=
7681cc4920e5Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7682cc4920e5Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7683cc4920e5Smrg
7684cc4920e5Smrg# Source file extension for f77 test sources.
7685cc4920e5Smrgac_ext=f
7686cc4920e5Smrg
7687cc4920e5Smrg# Object file extension for compiled f77 test sources.
7688cc4920e5Smrgobjext=o
7689cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
7690cc4920e5Smrg
7691cc4920e5Smrg# No sense in running all these tests if we already determined that
7692cc4920e5Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
7693cc4920e5Smrg# are currently assumed to apply to all compilers on this platform,
7694cc4920e5Smrg# and will be corrupted by setting them based on a non-working compiler.
7695cc4920e5Smrgif test yes != "$_lt_disable_F77"; then
7696cc4920e5Smrg  # Code to be used in simple compile tests
7697cc4920e5Smrg  lt_simple_compile_test_code="\
7698cc4920e5Smrg      subroutine t
7699cc4920e5Smrg      return
7700cc4920e5Smrg      end
7701cc4920e5Smrg"
7702cc4920e5Smrg
7703cc4920e5Smrg  # Code to be used in simple link tests
7704cc4920e5Smrg  lt_simple_link_test_code="\
7705cc4920e5Smrg      program t
7706cc4920e5Smrg      end
7707cc4920e5Smrg"
7708cc4920e5Smrg
7709cc4920e5Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7710cc4920e5Smrg  _LT_TAG_COMPILER
7711cc4920e5Smrg
7712cc4920e5Smrg  # save warnings/boilerplate of simple test code
7713cc4920e5Smrg  _LT_COMPILER_BOILERPLATE
7714cc4920e5Smrg  _LT_LINKER_BOILERPLATE
7715cc4920e5Smrg
7716cc4920e5Smrg  # Allow CC to be a program name with arguments.
7717cc4920e5Smrg  lt_save_CC=$CC
7718cc4920e5Smrg  lt_save_GCC=$GCC
7719cc4920e5Smrg  lt_save_CFLAGS=$CFLAGS
7720cc4920e5Smrg  CC=${F77-"f77"}
7721cc4920e5Smrg  CFLAGS=$FFLAGS
7722cc4920e5Smrg  compiler=$CC
7723cc4920e5Smrg  _LT_TAGVAR(compiler, $1)=$CC
7724cc4920e5Smrg  _LT_CC_BASENAME([$compiler])
7725cc4920e5Smrg  GCC=$G77
7726cc4920e5Smrg  if test -n "$compiler"; then
7727cc4920e5Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
7728cc4920e5Smrg    AC_MSG_RESULT([$can_build_shared])
7729cc4920e5Smrg
7730cc4920e5Smrg    AC_MSG_CHECKING([whether to build shared libraries])
7731cc4920e5Smrg    test no = "$can_build_shared" && enable_shared=no
7732cc4920e5Smrg
7733cc4920e5Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
7734cc4920e5Smrg    # are all built from PIC.
7735cc4920e5Smrg    case $host_os in
7736cc4920e5Smrg      aix3*)
7737cc4920e5Smrg        test yes = "$enable_shared" && enable_static=no
7738cc4920e5Smrg        if test -n "$RANLIB"; then
7739cc4920e5Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7740cc4920e5Smrg          postinstall_cmds='$RANLIB $lib'
7741cc4920e5Smrg        fi
7742cc4920e5Smrg        ;;
7743cc4920e5Smrg      aix[[4-9]]*)
7744cc4920e5Smrg	if test ia64 != "$host_cpu"; then
7745cc4920e5Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7746cc4920e5Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
7747cc4920e5Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7748cc4920e5Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7749cc4920e5Smrg	  esac
7750cc4920e5Smrg	fi
7751cc4920e5Smrg        ;;
7752cc4920e5Smrg    esac
7753cc4920e5Smrg    AC_MSG_RESULT([$enable_shared])
7754cc4920e5Smrg
7755cc4920e5Smrg    AC_MSG_CHECKING([whether to build static libraries])
7756cc4920e5Smrg    # Make sure either enable_shared or enable_static is yes.
7757cc4920e5Smrg    test yes = "$enable_shared" || enable_static=yes
7758cc4920e5Smrg    AC_MSG_RESULT([$enable_static])
7759cc4920e5Smrg
7760cc4920e5Smrg    _LT_TAGVAR(GCC, $1)=$G77
7761cc4920e5Smrg    _LT_TAGVAR(LD, $1)=$LD
7762cc4920e5Smrg
7763cc4920e5Smrg    ## CAVEAT EMPTOR:
7764cc4920e5Smrg    ## There is no encapsulation within the following macros, do not change
7765cc4920e5Smrg    ## the running order or otherwise move them around unless you know exactly
7766cc4920e5Smrg    ## what you are doing...
7767cc4920e5Smrg    _LT_COMPILER_PIC($1)
7768cc4920e5Smrg    _LT_COMPILER_C_O($1)
7769cc4920e5Smrg    _LT_COMPILER_FILE_LOCKS($1)
7770cc4920e5Smrg    _LT_LINKER_SHLIBS($1)
7771cc4920e5Smrg    _LT_SYS_DYNAMIC_LINKER($1)
7772cc4920e5Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7773cc4920e5Smrg
7774cc4920e5Smrg    _LT_CONFIG($1)
7775cc4920e5Smrg  fi # test -n "$compiler"
7776cc4920e5Smrg
7777cc4920e5Smrg  GCC=$lt_save_GCC
7778cc4920e5Smrg  CC=$lt_save_CC
7779cc4920e5Smrg  CFLAGS=$lt_save_CFLAGS
7780cc4920e5Smrgfi # test yes != "$_lt_disable_F77"
7781cc4920e5Smrg
7782cc4920e5SmrgAC_LANG_POP
7783cc4920e5Smrg])# _LT_LANG_F77_CONFIG
7784cc4920e5Smrg
7785cc4920e5Smrg
7786cc4920e5Smrg# _LT_LANG_FC_CONFIG([TAG])
7787cc4920e5Smrg# -------------------------
7788cc4920e5Smrg# Ensure that the configuration variables for a Fortran compiler are
7789cc4920e5Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7790cc4920e5Smrg# to write the compiler configuration to 'libtool'.
7791cc4920e5Smrgm4_defun([_LT_LANG_FC_CONFIG],
7792cc4920e5Smrg[AC_LANG_PUSH(Fortran)
7793cc4920e5Smrg
7794cc4920e5Smrgif test -z "$FC" || test no = "$FC"; then
7795cc4920e5Smrg  _lt_disable_FC=yes
7796cc4920e5Smrgfi
7797cc4920e5Smrg
7798cc4920e5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7799cc4920e5Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
7800cc4920e5Smrg_LT_TAGVAR(always_export_symbols, $1)=no
7801cc4920e5Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7802cc4920e5Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7803cc4920e5Smrg_LT_TAGVAR(hardcode_direct, $1)=no
7804cc4920e5Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7805cc4920e5Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7806cc4920e5Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7807cc4920e5Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7808cc4920e5Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
7809cc4920e5Smrg_LT_TAGVAR(inherit_rpath, $1)=no
7810cc4920e5Smrg_LT_TAGVAR(module_cmds, $1)=
7811cc4920e5Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
7812cc4920e5Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7813cc4920e5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7814cc4920e5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7815cc4920e5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7816cc4920e5Smrg_LT_TAGVAR(no_undefined_flag, $1)=
7817cc4920e5Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7818cc4920e5Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7819cc4920e5Smrg
7820cc4920e5Smrg# Source file extension for fc test sources.
7821cc4920e5Smrgac_ext=${ac_fc_srcext-f}
7822cc4920e5Smrg
7823cc4920e5Smrg# Object file extension for compiled fc test sources.
7824cc4920e5Smrgobjext=o
7825cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
7826cc4920e5Smrg
7827cc4920e5Smrg# No sense in running all these tests if we already determined that
7828cc4920e5Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
7829cc4920e5Smrg# are currently assumed to apply to all compilers on this platform,
7830cc4920e5Smrg# and will be corrupted by setting them based on a non-working compiler.
7831cc4920e5Smrgif test yes != "$_lt_disable_FC"; then
7832cc4920e5Smrg  # Code to be used in simple compile tests
7833cc4920e5Smrg  lt_simple_compile_test_code="\
7834cc4920e5Smrg      subroutine t
7835cc4920e5Smrg      return
7836cc4920e5Smrg      end
7837cc4920e5Smrg"
7838cc4920e5Smrg
7839cc4920e5Smrg  # Code to be used in simple link tests
7840cc4920e5Smrg  lt_simple_link_test_code="\
7841cc4920e5Smrg      program t
7842cc4920e5Smrg      end
7843cc4920e5Smrg"
7844cc4920e5Smrg
7845cc4920e5Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7846cc4920e5Smrg  _LT_TAG_COMPILER
7847cc4920e5Smrg
7848cc4920e5Smrg  # save warnings/boilerplate of simple test code
7849cc4920e5Smrg  _LT_COMPILER_BOILERPLATE
7850cc4920e5Smrg  _LT_LINKER_BOILERPLATE
7851cc4920e5Smrg
7852cc4920e5Smrg  # Allow CC to be a program name with arguments.
7853cc4920e5Smrg  lt_save_CC=$CC
7854cc4920e5Smrg  lt_save_GCC=$GCC
7855cc4920e5Smrg  lt_save_CFLAGS=$CFLAGS
7856cc4920e5Smrg  CC=${FC-"f95"}
7857cc4920e5Smrg  CFLAGS=$FCFLAGS
7858cc4920e5Smrg  compiler=$CC
7859cc4920e5Smrg  GCC=$ac_cv_fc_compiler_gnu
7860cc4920e5Smrg
7861cc4920e5Smrg  _LT_TAGVAR(compiler, $1)=$CC
7862cc4920e5Smrg  _LT_CC_BASENAME([$compiler])
7863cc4920e5Smrg
7864cc4920e5Smrg  if test -n "$compiler"; then
7865cc4920e5Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
7866cc4920e5Smrg    AC_MSG_RESULT([$can_build_shared])
7867cc4920e5Smrg
7868cc4920e5Smrg    AC_MSG_CHECKING([whether to build shared libraries])
7869cc4920e5Smrg    test no = "$can_build_shared" && enable_shared=no
7870cc4920e5Smrg
7871cc4920e5Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
7872cc4920e5Smrg    # are all built from PIC.
7873cc4920e5Smrg    case $host_os in
7874cc4920e5Smrg      aix3*)
7875cc4920e5Smrg        test yes = "$enable_shared" && enable_static=no
7876cc4920e5Smrg        if test -n "$RANLIB"; then
7877cc4920e5Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7878cc4920e5Smrg          postinstall_cmds='$RANLIB $lib'
7879cc4920e5Smrg        fi
7880cc4920e5Smrg        ;;
7881cc4920e5Smrg      aix[[4-9]]*)
7882cc4920e5Smrg	if test ia64 != "$host_cpu"; then
7883cc4920e5Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7884cc4920e5Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
7885cc4920e5Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7886cc4920e5Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7887cc4920e5Smrg	  esac
7888cc4920e5Smrg	fi
7889cc4920e5Smrg        ;;
7890cc4920e5Smrg    esac
7891cc4920e5Smrg    AC_MSG_RESULT([$enable_shared])
7892cc4920e5Smrg
7893cc4920e5Smrg    AC_MSG_CHECKING([whether to build static libraries])
7894cc4920e5Smrg    # Make sure either enable_shared or enable_static is yes.
7895cc4920e5Smrg    test yes = "$enable_shared" || enable_static=yes
7896cc4920e5Smrg    AC_MSG_RESULT([$enable_static])
7897cc4920e5Smrg
7898cc4920e5Smrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7899cc4920e5Smrg    _LT_TAGVAR(LD, $1)=$LD
7900cc4920e5Smrg
7901cc4920e5Smrg    ## CAVEAT EMPTOR:
7902cc4920e5Smrg    ## There is no encapsulation within the following macros, do not change
7903cc4920e5Smrg    ## the running order or otherwise move them around unless you know exactly
7904cc4920e5Smrg    ## what you are doing...
7905cc4920e5Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
7906cc4920e5Smrg    _LT_COMPILER_PIC($1)
7907cc4920e5Smrg    _LT_COMPILER_C_O($1)
7908cc4920e5Smrg    _LT_COMPILER_FILE_LOCKS($1)
7909cc4920e5Smrg    _LT_LINKER_SHLIBS($1)
7910cc4920e5Smrg    _LT_SYS_DYNAMIC_LINKER($1)
7911cc4920e5Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7912cc4920e5Smrg
7913cc4920e5Smrg    _LT_CONFIG($1)
7914cc4920e5Smrg  fi # test -n "$compiler"
7915cc4920e5Smrg
7916cc4920e5Smrg  GCC=$lt_save_GCC
7917cc4920e5Smrg  CC=$lt_save_CC
7918cc4920e5Smrg  CFLAGS=$lt_save_CFLAGS
7919cc4920e5Smrgfi # test yes != "$_lt_disable_FC"
7920cc4920e5Smrg
7921cc4920e5SmrgAC_LANG_POP
7922cc4920e5Smrg])# _LT_LANG_FC_CONFIG
7923cc4920e5Smrg
7924cc4920e5Smrg
7925cc4920e5Smrg# _LT_LANG_GCJ_CONFIG([TAG])
7926cc4920e5Smrg# --------------------------
7927cc4920e5Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
7928cc4920e5Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7929cc4920e5Smrg# to write the compiler configuration to 'libtool'.
7930cc4920e5Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
7931cc4920e5Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
7932cc4920e5SmrgAC_LANG_SAVE
7933cc4920e5Smrg
7934cc4920e5Smrg# Source file extension for Java test sources.
7935cc4920e5Smrgac_ext=java
7936cc4920e5Smrg
7937cc4920e5Smrg# Object file extension for compiled Java test sources.
7938cc4920e5Smrgobjext=o
7939cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
7940cc4920e5Smrg
7941cc4920e5Smrg# Code to be used in simple compile tests
7942cc4920e5Smrglt_simple_compile_test_code="class foo {}"
7943cc4920e5Smrg
7944cc4920e5Smrg# Code to be used in simple link tests
7945cc4920e5Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7946cc4920e5Smrg
7947cc4920e5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7948cc4920e5Smrg_LT_TAG_COMPILER
7949cc4920e5Smrg
7950cc4920e5Smrg# save warnings/boilerplate of simple test code
7951cc4920e5Smrg_LT_COMPILER_BOILERPLATE
7952cc4920e5Smrg_LT_LINKER_BOILERPLATE
7953cc4920e5Smrg
7954cc4920e5Smrg# Allow CC to be a program name with arguments.
7955cc4920e5Smrglt_save_CC=$CC
7956cc4920e5Smrglt_save_CFLAGS=$CFLAGS
7957cc4920e5Smrglt_save_GCC=$GCC
7958cc4920e5SmrgGCC=yes
7959cc4920e5SmrgCC=${GCJ-"gcj"}
7960cc4920e5SmrgCFLAGS=$GCJFLAGS
7961cc4920e5Smrgcompiler=$CC
7962cc4920e5Smrg_LT_TAGVAR(compiler, $1)=$CC
7963cc4920e5Smrg_LT_TAGVAR(LD, $1)=$LD
7964cc4920e5Smrg_LT_CC_BASENAME([$compiler])
7965cc4920e5Smrg
7966cc4920e5Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
7967cc4920e5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7968cc4920e5Smrg
7969cc4920e5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7970cc4920e5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7971cc4920e5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7972cc4920e5Smrg
7973cc4920e5Smrg## CAVEAT EMPTOR:
7974cc4920e5Smrg## There is no encapsulation within the following macros, do not change
7975cc4920e5Smrg## the running order or otherwise move them around unless you know exactly
7976cc4920e5Smrg## what you are doing...
7977cc4920e5Smrgif test -n "$compiler"; then
7978cc4920e5Smrg  _LT_COMPILER_NO_RTTI($1)
7979cc4920e5Smrg  _LT_COMPILER_PIC($1)
7980cc4920e5Smrg  _LT_COMPILER_C_O($1)
7981cc4920e5Smrg  _LT_COMPILER_FILE_LOCKS($1)
7982cc4920e5Smrg  _LT_LINKER_SHLIBS($1)
7983cc4920e5Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
7984cc4920e5Smrg
7985cc4920e5Smrg  _LT_CONFIG($1)
7986cc4920e5Smrgfi
7987cc4920e5Smrg
7988cc4920e5SmrgAC_LANG_RESTORE
7989cc4920e5Smrg
7990cc4920e5SmrgGCC=$lt_save_GCC
7991cc4920e5SmrgCC=$lt_save_CC
7992cc4920e5SmrgCFLAGS=$lt_save_CFLAGS
7993cc4920e5Smrg])# _LT_LANG_GCJ_CONFIG
7994cc4920e5Smrg
7995cc4920e5Smrg
7996cc4920e5Smrg# _LT_LANG_GO_CONFIG([TAG])
7997cc4920e5Smrg# --------------------------
7998cc4920e5Smrg# Ensure that the configuration variables for the GNU Go compiler
7999cc4920e5Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8000cc4920e5Smrg# to write the compiler configuration to 'libtool'.
8001cc4920e5Smrgm4_defun([_LT_LANG_GO_CONFIG],
8002cc4920e5Smrg[AC_REQUIRE([LT_PROG_GO])dnl
8003cc4920e5SmrgAC_LANG_SAVE
8004cc4920e5Smrg
8005cc4920e5Smrg# Source file extension for Go test sources.
8006cc4920e5Smrgac_ext=go
8007cc4920e5Smrg
8008cc4920e5Smrg# Object file extension for compiled Go test sources.
8009cc4920e5Smrgobjext=o
8010cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
8011cc4920e5Smrg
8012cc4920e5Smrg# Code to be used in simple compile tests
8013cc4920e5Smrglt_simple_compile_test_code="package main; func main() { }"
8014cc4920e5Smrg
8015cc4920e5Smrg# Code to be used in simple link tests
8016cc4920e5Smrglt_simple_link_test_code='package main; func main() { }'
8017cc4920e5Smrg
8018cc4920e5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8019cc4920e5Smrg_LT_TAG_COMPILER
8020cc4920e5Smrg
8021cc4920e5Smrg# save warnings/boilerplate of simple test code
8022cc4920e5Smrg_LT_COMPILER_BOILERPLATE
8023cc4920e5Smrg_LT_LINKER_BOILERPLATE
8024cc4920e5Smrg
8025cc4920e5Smrg# Allow CC to be a program name with arguments.
8026cc4920e5Smrglt_save_CC=$CC
8027cc4920e5Smrglt_save_CFLAGS=$CFLAGS
8028cc4920e5Smrglt_save_GCC=$GCC
8029cc4920e5SmrgGCC=yes
8030cc4920e5SmrgCC=${GOC-"gccgo"}
8031cc4920e5SmrgCFLAGS=$GOFLAGS
8032cc4920e5Smrgcompiler=$CC
8033cc4920e5Smrg_LT_TAGVAR(compiler, $1)=$CC
8034cc4920e5Smrg_LT_TAGVAR(LD, $1)=$LD
8035cc4920e5Smrg_LT_CC_BASENAME([$compiler])
8036cc4920e5Smrg
8037cc4920e5Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
8038cc4920e5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8039cc4920e5Smrg
8040cc4920e5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8041cc4920e5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
8042cc4920e5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8043cc4920e5Smrg
8044cc4920e5Smrg## CAVEAT EMPTOR:
8045cc4920e5Smrg## There is no encapsulation within the following macros, do not change
8046cc4920e5Smrg## the running order or otherwise move them around unless you know exactly
8047cc4920e5Smrg## what you are doing...
8048cc4920e5Smrgif test -n "$compiler"; then
8049cc4920e5Smrg  _LT_COMPILER_NO_RTTI($1)
8050cc4920e5Smrg  _LT_COMPILER_PIC($1)
8051cc4920e5Smrg  _LT_COMPILER_C_O($1)
8052cc4920e5Smrg  _LT_COMPILER_FILE_LOCKS($1)
8053cc4920e5Smrg  _LT_LINKER_SHLIBS($1)
8054cc4920e5Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8055cc4920e5Smrg
8056cc4920e5Smrg  _LT_CONFIG($1)
8057cc4920e5Smrgfi
8058cc4920e5Smrg
8059cc4920e5SmrgAC_LANG_RESTORE
8060cc4920e5Smrg
8061cc4920e5SmrgGCC=$lt_save_GCC
8062cc4920e5SmrgCC=$lt_save_CC
8063cc4920e5SmrgCFLAGS=$lt_save_CFLAGS
8064cc4920e5Smrg])# _LT_LANG_GO_CONFIG
8065cc4920e5Smrg
8066cc4920e5Smrg
8067cc4920e5Smrg# _LT_LANG_RC_CONFIG([TAG])
8068cc4920e5Smrg# -------------------------
8069cc4920e5Smrg# Ensure that the configuration variables for the Windows resource compiler
8070cc4920e5Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8071cc4920e5Smrg# to write the compiler configuration to 'libtool'.
8072cc4920e5Smrgm4_defun([_LT_LANG_RC_CONFIG],
8073cc4920e5Smrg[AC_REQUIRE([LT_PROG_RC])dnl
8074cc4920e5SmrgAC_LANG_SAVE
8075cc4920e5Smrg
8076cc4920e5Smrg# Source file extension for RC test sources.
8077cc4920e5Smrgac_ext=rc
8078cc4920e5Smrg
8079cc4920e5Smrg# Object file extension for compiled RC test sources.
8080cc4920e5Smrgobjext=o
8081cc4920e5Smrg_LT_TAGVAR(objext, $1)=$objext
8082cc4920e5Smrg
8083cc4920e5Smrg# Code to be used in simple compile tests
8084cc4920e5Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8085cc4920e5Smrg
8086cc4920e5Smrg# Code to be used in simple link tests
8087cc4920e5Smrglt_simple_link_test_code=$lt_simple_compile_test_code
8088cc4920e5Smrg
8089cc4920e5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8090cc4920e5Smrg_LT_TAG_COMPILER
8091cc4920e5Smrg
8092cc4920e5Smrg# save warnings/boilerplate of simple test code
8093cc4920e5Smrg_LT_COMPILER_BOILERPLATE
8094cc4920e5Smrg_LT_LINKER_BOILERPLATE
8095cc4920e5Smrg
8096cc4920e5Smrg# Allow CC to be a program name with arguments.
8097cc4920e5Smrglt_save_CC=$CC
8098cc4920e5Smrglt_save_CFLAGS=$CFLAGS
8099cc4920e5Smrglt_save_GCC=$GCC
8100cc4920e5SmrgGCC=
8101cc4920e5SmrgCC=${RC-"windres"}
8102cc4920e5SmrgCFLAGS=
8103cc4920e5Smrgcompiler=$CC
8104cc4920e5Smrg_LT_TAGVAR(compiler, $1)=$CC
8105cc4920e5Smrg_LT_CC_BASENAME([$compiler])
8106cc4920e5Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8107cc4920e5Smrg
8108cc4920e5Smrgif test -n "$compiler"; then
8109cc4920e5Smrg  :
8110cc4920e5Smrg  _LT_CONFIG($1)
8111cc4920e5Smrgfi
8112cc4920e5Smrg
8113cc4920e5SmrgGCC=$lt_save_GCC
8114cc4920e5SmrgAC_LANG_RESTORE
8115cc4920e5SmrgCC=$lt_save_CC
8116cc4920e5SmrgCFLAGS=$lt_save_CFLAGS
8117cc4920e5Smrg])# _LT_LANG_RC_CONFIG
8118cc4920e5Smrg
8119cc4920e5Smrg
8120cc4920e5Smrg# LT_PROG_GCJ
8121cc4920e5Smrg# -----------
8122cc4920e5SmrgAC_DEFUN([LT_PROG_GCJ],
8123cc4920e5Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8124cc4920e5Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8125cc4920e5Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
8126cc4920e5Smrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8127cc4920e5Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
8128cc4920e5Smrg])
8129cc4920e5Smrg
8130cc4920e5Smrg# Old name:
8131cc4920e5SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8132cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
8133cc4920e5Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8134cc4920e5Smrg
8135cc4920e5Smrg
8136cc4920e5Smrg# LT_PROG_GO
8137cc4920e5Smrg# ----------
8138cc4920e5SmrgAC_DEFUN([LT_PROG_GO],
8139cc4920e5Smrg[AC_CHECK_TOOL(GOC, gccgo,)
8140cc4920e5Smrg])
8141cc4920e5Smrg
8142cc4920e5Smrg
8143cc4920e5Smrg# LT_PROG_RC
8144cc4920e5Smrg# ----------
8145cc4920e5SmrgAC_DEFUN([LT_PROG_RC],
8146cc4920e5Smrg[AC_CHECK_TOOL(RC, windres,)
8147cc4920e5Smrg])
8148cc4920e5Smrg
8149cc4920e5Smrg# Old name:
8150cc4920e5SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8151cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
8152cc4920e5Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
8153cc4920e5Smrg
8154cc4920e5Smrg
8155cc4920e5Smrg# _LT_DECL_EGREP
8156cc4920e5Smrg# --------------
8157cc4920e5Smrg# If we don't have a new enough Autoconf to choose the best grep
8158cc4920e5Smrg# available, choose the one first in the user's PATH.
8159cc4920e5Smrgm4_defun([_LT_DECL_EGREP],
8160cc4920e5Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
8161cc4920e5SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
8162cc4920e5Smrgtest -z "$GREP" && GREP=grep
8163cc4920e5Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8164cc4920e5Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
8165cc4920e5Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
8166cc4920e5Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8167cc4920e5SmrgAC_SUBST([GREP])
8168cc4920e5Smrg])
8169cc4920e5Smrg
8170cc4920e5Smrg
8171cc4920e5Smrg# _LT_DECL_OBJDUMP
8172cc4920e5Smrg# --------------
8173cc4920e5Smrg# If we don't have a new enough Autoconf to choose the best objdump
8174cc4920e5Smrg# available, choose the one first in the user's PATH.
8175cc4920e5Smrgm4_defun([_LT_DECL_OBJDUMP],
8176cc4920e5Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8177cc4920e5Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
8178cc4920e5Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8179cc4920e5SmrgAC_SUBST([OBJDUMP])
8180cc4920e5Smrg])
8181cc4920e5Smrg
8182cc4920e5Smrg# _LT_DECL_DLLTOOL
8183cc4920e5Smrg# ----------------
8184cc4920e5Smrg# Ensure DLLTOOL variable is set.
8185cc4920e5Smrgm4_defun([_LT_DECL_DLLTOOL],
8186cc4920e5Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8187cc4920e5Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
8188cc4920e5Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8189cc4920e5SmrgAC_SUBST([DLLTOOL])
8190cc4920e5Smrg])
8191cc4920e5Smrg
8192cc4920e5Smrg# _LT_DECL_SED
8193cc4920e5Smrg# ------------
8194cc4920e5Smrg# Check for a fully-functional sed program, that truncates
8195cc4920e5Smrg# as few characters as possible.  Prefer GNU sed if found.
8196cc4920e5Smrgm4_defun([_LT_DECL_SED],
8197cc4920e5Smrg[AC_PROG_SED
8198cc4920e5Smrgtest -z "$SED" && SED=sed
8199cc4920e5SmrgXsed="$SED -e 1s/^X//"
8200cc4920e5Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8201cc4920e5Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8202cc4920e5Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8203cc4920e5Smrg])# _LT_DECL_SED
8204cc4920e5Smrg
8205cc4920e5Smrgm4_ifndef([AC_PROG_SED], [
8206cc4920e5Smrg############################################################
8207cc4920e5Smrg# NOTE: This macro has been submitted for inclusion into   #
8208cc4920e5Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8209cc4920e5Smrg#  a released version of Autoconf we should remove this    #
8210cc4920e5Smrg#  macro and use it instead.                               #
8211cc4920e5Smrg############################################################
8212cc4920e5Smrg
8213cc4920e5Smrgm4_defun([AC_PROG_SED],
8214cc4920e5Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
8215cc4920e5SmrgAC_CACHE_VAL(lt_cv_path_SED,
8216cc4920e5Smrg[# Loop through the user's path and test for sed and gsed.
8217cc4920e5Smrg# Then use that list of sed's as ones to test for truncation.
8218cc4920e5Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8219cc4920e5Smrgfor as_dir in $PATH
8220cc4920e5Smrgdo
8221cc4920e5Smrg  IFS=$as_save_IFS
8222cc4920e5Smrg  test -z "$as_dir" && as_dir=.
8223cc4920e5Smrg  for lt_ac_prog in sed gsed; do
8224cc4920e5Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
8225cc4920e5Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8226cc4920e5Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8227cc4920e5Smrg      fi
8228cc4920e5Smrg    done
8229cc4920e5Smrg  done
8230cc4920e5Smrgdone
8231cc4920e5SmrgIFS=$as_save_IFS
8232cc4920e5Smrglt_ac_max=0
8233cc4920e5Smrglt_ac_count=0
8234cc4920e5Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8235cc4920e5Smrg# along with /bin/sed that truncates output.
8236cc4920e5Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8237cc4920e5Smrg  test ! -f "$lt_ac_sed" && continue
8238cc4920e5Smrg  cat /dev/null > conftest.in
8239cc4920e5Smrg  lt_ac_count=0
8240cc4920e5Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8241cc4920e5Smrg  # Check for GNU sed and select it if it is found.
8242cc4920e5Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8243cc4920e5Smrg    lt_cv_path_SED=$lt_ac_sed
8244cc4920e5Smrg    break
8245cc4920e5Smrg  fi
8246cc4920e5Smrg  while true; do
8247cc4920e5Smrg    cat conftest.in conftest.in >conftest.tmp
8248cc4920e5Smrg    mv conftest.tmp conftest.in
8249cc4920e5Smrg    cp conftest.in conftest.nl
8250cc4920e5Smrg    echo >>conftest.nl
8251cc4920e5Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8252cc4920e5Smrg    cmp -s conftest.out conftest.nl || break
8253cc4920e5Smrg    # 10000 chars as input seems more than enough
8254cc4920e5Smrg    test 10 -lt "$lt_ac_count" && break
8255cc4920e5Smrg    lt_ac_count=`expr $lt_ac_count + 1`
8256cc4920e5Smrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8257cc4920e5Smrg      lt_ac_max=$lt_ac_count
8258cc4920e5Smrg      lt_cv_path_SED=$lt_ac_sed
8259cc4920e5Smrg    fi
8260cc4920e5Smrg  done
8261cc4920e5Smrgdone
8262cc4920e5Smrg])
8263cc4920e5SmrgSED=$lt_cv_path_SED
8264cc4920e5SmrgAC_SUBST([SED])
8265cc4920e5SmrgAC_MSG_RESULT([$SED])
8266cc4920e5Smrg])#AC_PROG_SED
8267cc4920e5Smrg])#m4_ifndef
8268cc4920e5Smrg
8269cc4920e5Smrg# Old name:
8270cc4920e5SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8271cc4920e5Smrgdnl aclocal-1.4 backwards compatibility:
8272cc4920e5Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
8273cc4920e5Smrg
8274cc4920e5Smrg
8275cc4920e5Smrg# _LT_CHECK_SHELL_FEATURES
8276cc4920e5Smrg# ------------------------
8277cc4920e5Smrg# Find out whether the shell is Bourne or XSI compatible,
8278cc4920e5Smrg# or has some other useful features.
8279cc4920e5Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
8280cc4920e5Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8281cc4920e5Smrg  lt_unset=unset
8282cc4920e5Smrgelse
8283cc4920e5Smrg  lt_unset=false
8284cc4920e5Smrgfi
8285cc4920e5Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8286cc4920e5Smrg
8287cc4920e5Smrg# test EBCDIC or ASCII
8288cc4920e5Smrgcase `echo X|tr X '\101'` in
8289cc4920e5Smrg A) # ASCII based system
8290cc4920e5Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8291cc4920e5Smrg  lt_SP2NL='tr \040 \012'
8292cc4920e5Smrg  lt_NL2SP='tr \015\012 \040\040'
8293cc4920e5Smrg  ;;
8294cc4920e5Smrg *) # EBCDIC based system
8295cc4920e5Smrg  lt_SP2NL='tr \100 \n'
8296cc4920e5Smrg  lt_NL2SP='tr \r\n \100\100'
8297cc4920e5Smrg  ;;
8298cc4920e5Smrgesac
8299cc4920e5Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8300cc4920e5Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8301cc4920e5Smrg])# _LT_CHECK_SHELL_FEATURES
8302cc4920e5Smrg
8303cc4920e5Smrg
8304cc4920e5Smrg# _LT_PATH_CONVERSION_FUNCTIONS
8305cc4920e5Smrg# -----------------------------
8306cc4920e5Smrg# Determine what file name conversion functions should be used by
8307cc4920e5Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8308cc4920e5Smrg# for certain cross-compile configurations and native mingw.
8309cc4920e5Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8310cc4920e5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8311cc4920e5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
8312cc4920e5SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
8313cc4920e5SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
8314cc4920e5Smrg[case $host in
8315cc4920e5Smrg  *-*-mingw* )
8316cc4920e5Smrg    case $build in
8317cc4920e5Smrg      *-*-mingw* ) # actually msys
8318cc4920e5Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8319cc4920e5Smrg        ;;
8320cc4920e5Smrg      *-*-cygwin* )
8321cc4920e5Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8322cc4920e5Smrg        ;;
8323cc4920e5Smrg      * ) # otherwise, assume *nix
8324cc4920e5Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8325cc4920e5Smrg        ;;
8326cc4920e5Smrg    esac
8327cc4920e5Smrg    ;;
8328cc4920e5Smrg  *-*-cygwin* )
8329cc4920e5Smrg    case $build in
8330cc4920e5Smrg      *-*-mingw* ) # actually msys
8331cc4920e5Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8332cc4920e5Smrg        ;;
8333cc4920e5Smrg      *-*-cygwin* )
8334cc4920e5Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
8335cc4920e5Smrg        ;;
8336cc4920e5Smrg      * ) # otherwise, assume *nix
8337cc4920e5Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8338cc4920e5Smrg        ;;
8339cc4920e5Smrg    esac
8340cc4920e5Smrg    ;;
8341cc4920e5Smrg  * ) # unhandled hosts (and "normal" native builds)
8342cc4920e5Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
8343cc4920e5Smrg    ;;
8344cc4920e5Smrgesac
8345cc4920e5Smrg])
8346cc4920e5Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
8347cc4920e5SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8348cc4920e5Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8349cc4920e5Smrg         [0], [convert $build file names to $host format])dnl
8350cc4920e5Smrg
8351cc4920e5SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
8352cc4920e5SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8353cc4920e5Smrg[#assume ordinary cross tools, or native build.
8354cc4920e5Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
8355cc4920e5Smrgcase $host in
8356cc4920e5Smrg  *-*-mingw* )
8357cc4920e5Smrg    case $build in
8358cc4920e5Smrg      *-*-mingw* ) # actually msys
8359cc4920e5Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8360cc4920e5Smrg        ;;
8361cc4920e5Smrg    esac
8362cc4920e5Smrg    ;;
8363cc4920e5Smrgesac
8364cc4920e5Smrg])
8365cc4920e5Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
8366cc4920e5SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8367cc4920e5Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8368cc4920e5Smrg         [0], [convert $build files to toolchain format])dnl
8369cc4920e5Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
8370