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