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