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