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