1428d7b3dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2428d7b3dSmrg#
3428d7b3dSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4428d7b3dSmrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5428d7b3dSmrg#                 Foundation, Inc.
6428d7b3dSmrg#   Written by Gordon Matzigkeit, 1996
7428d7b3dSmrg#
8428d7b3dSmrg# This file is free software; the Free Software Foundation gives
9428d7b3dSmrg# unlimited permission to copy and/or distribute it, with or without
10428d7b3dSmrg# modifications, as long as this notice is preserved.
11428d7b3dSmrg
12428d7b3dSmrgm4_define([_LT_COPYING], [dnl
13428d7b3dSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14428d7b3dSmrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
15428d7b3dSmrg#                 Foundation, Inc.
16428d7b3dSmrg#   Written by Gordon Matzigkeit, 1996
17428d7b3dSmrg#
18428d7b3dSmrg#   This file is part of GNU Libtool.
19428d7b3dSmrg#
20428d7b3dSmrg# GNU Libtool is free software; you can redistribute it and/or
21428d7b3dSmrg# modify it under the terms of the GNU General Public License as
22428d7b3dSmrg# published by the Free Software Foundation; either version 2 of
23428d7b3dSmrg# the License, or (at your option) any later version.
24428d7b3dSmrg#
25428d7b3dSmrg# As a special exception to the GNU General Public License,
26428d7b3dSmrg# if you distribute this file as part of a program or library that
27428d7b3dSmrg# is built using GNU Libtool, you may include this file under the
28428d7b3dSmrg# same distribution terms that you use for the rest of that program.
29428d7b3dSmrg#
30428d7b3dSmrg# GNU Libtool is distributed in the hope that it will be useful,
31428d7b3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
32428d7b3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33428d7b3dSmrg# GNU General Public License for more details.
34428d7b3dSmrg#
35428d7b3dSmrg# You should have received a copy of the GNU General Public License
36428d7b3dSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
37428d7b3dSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
38428d7b3dSmrg# obtained by writing to the Free Software Foundation, Inc.,
39428d7b3dSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
40428d7b3dSmrg])
41428d7b3dSmrg
42428d7b3dSmrg# serial 57 LT_INIT
43428d7b3dSmrg
44428d7b3dSmrg
45428d7b3dSmrg# LT_PREREQ(VERSION)
46428d7b3dSmrg# ------------------
47428d7b3dSmrg# Complain and exit if this libtool version is less that VERSION.
48428d7b3dSmrgm4_defun([LT_PREREQ],
49428d7b3dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
50428d7b3dSmrg       [m4_default([$3],
51428d7b3dSmrg		   [m4_fatal([Libtool version $1 or higher is required],
52428d7b3dSmrg		             63)])],
53428d7b3dSmrg       [$2])])
54428d7b3dSmrg
55428d7b3dSmrg
56428d7b3dSmrg# _LT_CHECK_BUILDDIR
57428d7b3dSmrg# ------------------
58428d7b3dSmrg# Complain if the absolute build directory name contains unusual characters
59428d7b3dSmrgm4_defun([_LT_CHECK_BUILDDIR],
60428d7b3dSmrg[case `pwd` in
61428d7b3dSmrg  *\ * | *\	*)
62428d7b3dSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
63428d7b3dSmrgesac
64428d7b3dSmrg])
65428d7b3dSmrg
66428d7b3dSmrg
67428d7b3dSmrg# LT_INIT([OPTIONS])
68428d7b3dSmrg# ------------------
69428d7b3dSmrgAC_DEFUN([LT_INIT],
70428d7b3dSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
71428d7b3dSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
72428d7b3dSmrgAC_BEFORE([$0], [LT_LANG])dnl
73428d7b3dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
74428d7b3dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
75428d7b3dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
76428d7b3dSmrg
77428d7b3dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
78428d7b3dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
79428d7b3dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
80428d7b3dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
81428d7b3dSmrgdnl unless we require an AC_DEFUNed macro:
82428d7b3dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
83428d7b3dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
84428d7b3dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
85428d7b3dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
86428d7b3dSmrgm4_require([_LT_PROG_LTMAIN])dnl
87428d7b3dSmrg
88428d7b3dSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
89428d7b3dSmrg
90428d7b3dSmrgdnl Parse OPTIONS
91428d7b3dSmrg_LT_SET_OPTIONS([$0], [$1])
92428d7b3dSmrg
93428d7b3dSmrg# This can be used to rebuild libtool when needed
94428d7b3dSmrgLIBTOOL_DEPS="$ltmain"
95428d7b3dSmrg
96428d7b3dSmrg# Always use our own libtool.
97428d7b3dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
98428d7b3dSmrgAC_SUBST(LIBTOOL)dnl
99428d7b3dSmrg
100428d7b3dSmrg_LT_SETUP
101428d7b3dSmrg
102428d7b3dSmrg# Only expand once:
103428d7b3dSmrgm4_define([LT_INIT])
104428d7b3dSmrg])# LT_INIT
105428d7b3dSmrg
106428d7b3dSmrg# Old names:
107428d7b3dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
108428d7b3dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
109428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
110428d7b3dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
111428d7b3dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
112428d7b3dSmrg
113428d7b3dSmrg
114428d7b3dSmrg# _LT_CC_BASENAME(CC)
115428d7b3dSmrg# -------------------
116428d7b3dSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
117428d7b3dSmrgm4_defun([_LT_CC_BASENAME],
118428d7b3dSmrg[for cc_temp in $1""; do
119428d7b3dSmrg  case $cc_temp in
120428d7b3dSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
121428d7b3dSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
122428d7b3dSmrg    \-*) ;;
123428d7b3dSmrg    *) break;;
124428d7b3dSmrg  esac
125428d7b3dSmrgdone
126428d7b3dSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
127428d7b3dSmrg])
128428d7b3dSmrg
129428d7b3dSmrg
130428d7b3dSmrg# _LT_FILEUTILS_DEFAULTS
131428d7b3dSmrg# ----------------------
132428d7b3dSmrg# It is okay to use these file commands and assume they have been set
133428d7b3dSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
134428d7b3dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
135428d7b3dSmrg[: ${CP="cp -f"}
136428d7b3dSmrg: ${MV="mv -f"}
137428d7b3dSmrg: ${RM="rm -f"}
138428d7b3dSmrg])# _LT_FILEUTILS_DEFAULTS
139428d7b3dSmrg
140428d7b3dSmrg
141428d7b3dSmrg# _LT_SETUP
142428d7b3dSmrg# ---------
143428d7b3dSmrgm4_defun([_LT_SETUP],
144428d7b3dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
145428d7b3dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
146428d7b3dSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
147428d7b3dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
148428d7b3dSmrg
149428d7b3dSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
150428d7b3dSmrgdnl
151428d7b3dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
152428d7b3dSmrg_LT_DECL([], [host], [0])dnl
153428d7b3dSmrg_LT_DECL([], [host_os], [0])dnl
154428d7b3dSmrgdnl
155428d7b3dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
156428d7b3dSmrg_LT_DECL([], [build], [0])dnl
157428d7b3dSmrg_LT_DECL([], [build_os], [0])dnl
158428d7b3dSmrgdnl
159428d7b3dSmrgAC_REQUIRE([AC_PROG_CC])dnl
160428d7b3dSmrgAC_REQUIRE([LT_PATH_LD])dnl
161428d7b3dSmrgAC_REQUIRE([LT_PATH_NM])dnl
162428d7b3dSmrgdnl
163428d7b3dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
164428d7b3dSmrgtest -z "$LN_S" && LN_S="ln -s"
165428d7b3dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
166428d7b3dSmrgdnl
167428d7b3dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
168428d7b3dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
169428d7b3dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
170428d7b3dSmrgdnl
171428d7b3dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
172428d7b3dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
173428d7b3dSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
174428d7b3dSmrgm4_require([_LT_CMD_RELOAD])dnl
175428d7b3dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
176428d7b3dSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
177428d7b3dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
178428d7b3dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
179428d7b3dSmrgm4_require([_LT_WITH_SYSROOT])dnl
180428d7b3dSmrg
181428d7b3dSmrg_LT_CONFIG_LIBTOOL_INIT([
182428d7b3dSmrg# See if we are running on zsh, and set the options which allow our
183428d7b3dSmrg# commands through without removal of \ escapes INIT.
184428d7b3dSmrgif test -n "\${ZSH_VERSION+set}" ; then
185428d7b3dSmrg   setopt NO_GLOB_SUBST
186428d7b3dSmrgfi
187428d7b3dSmrg])
188428d7b3dSmrgif test -n "${ZSH_VERSION+set}" ; then
189428d7b3dSmrg   setopt NO_GLOB_SUBST
190428d7b3dSmrgfi
191428d7b3dSmrg
192428d7b3dSmrg_LT_CHECK_OBJDIR
193428d7b3dSmrg
194428d7b3dSmrgm4_require([_LT_TAG_COMPILER])dnl
195428d7b3dSmrg
196428d7b3dSmrgcase $host_os in
197428d7b3dSmrgaix3*)
198428d7b3dSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
199428d7b3dSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
200428d7b3dSmrg  # vanish in a puff of smoke.
201428d7b3dSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
202428d7b3dSmrg    COLLECT_NAMES=
203428d7b3dSmrg    export COLLECT_NAMES
204428d7b3dSmrg  fi
205428d7b3dSmrg  ;;
206428d7b3dSmrgesac
207428d7b3dSmrg
208428d7b3dSmrg# Global variables:
209428d7b3dSmrgofile=libtool
210428d7b3dSmrgcan_build_shared=yes
211428d7b3dSmrg
212428d7b3dSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
213428d7b3dSmrg# which needs '.lib').
214428d7b3dSmrglibext=a
215428d7b3dSmrg
216428d7b3dSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
217428d7b3dSmrg
218428d7b3dSmrgold_CC="$CC"
219428d7b3dSmrgold_CFLAGS="$CFLAGS"
220428d7b3dSmrg
221428d7b3dSmrg# Set sane defaults for various variables
222428d7b3dSmrgtest -z "$CC" && CC=cc
223428d7b3dSmrgtest -z "$LTCC" && LTCC=$CC
224428d7b3dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
225428d7b3dSmrgtest -z "$LD" && LD=ld
226428d7b3dSmrgtest -z "$ac_objext" && ac_objext=o
227428d7b3dSmrg
228428d7b3dSmrg_LT_CC_BASENAME([$compiler])
229428d7b3dSmrg
230428d7b3dSmrg# Only perform the check for file, if the check method requires it
231428d7b3dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
232428d7b3dSmrgcase $deplibs_check_method in
233428d7b3dSmrgfile_magic*)
234428d7b3dSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
235428d7b3dSmrg    _LT_PATH_MAGIC
236428d7b3dSmrg  fi
237428d7b3dSmrg  ;;
238428d7b3dSmrgesac
239428d7b3dSmrg
240428d7b3dSmrg# Use C for the default configuration in the libtool script
241428d7b3dSmrgLT_SUPPORTED_TAG([CC])
242428d7b3dSmrg_LT_LANG_C_CONFIG
243428d7b3dSmrg_LT_LANG_DEFAULT_CONFIG
244428d7b3dSmrg_LT_CONFIG_COMMANDS
245428d7b3dSmrg])# _LT_SETUP
246428d7b3dSmrg
247428d7b3dSmrg
248428d7b3dSmrg# _LT_PREPARE_SED_QUOTE_VARS
249428d7b3dSmrg# --------------------------
250428d7b3dSmrg# Define a few sed substitution that help us do robust quoting.
251428d7b3dSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
252428d7b3dSmrg[# Backslashify metacharacters that are still active within
253428d7b3dSmrg# double-quoted strings.
254428d7b3dSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
255428d7b3dSmrg
256428d7b3dSmrg# Same as above, but do not quote variable references.
257428d7b3dSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
258428d7b3dSmrg
259428d7b3dSmrg# Sed substitution to delay expansion of an escaped shell variable in a
260428d7b3dSmrg# double_quote_subst'ed string.
261428d7b3dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
262428d7b3dSmrg
263428d7b3dSmrg# Sed substitution to delay expansion of an escaped single quote.
264428d7b3dSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
265428d7b3dSmrg
266428d7b3dSmrg# Sed substitution to avoid accidental globbing in evaled expressions
267428d7b3dSmrgno_glob_subst='s/\*/\\\*/g'
268428d7b3dSmrg])
269428d7b3dSmrg
270428d7b3dSmrg# _LT_PROG_LTMAIN
271428d7b3dSmrg# ---------------
272428d7b3dSmrg# Note that this code is called both from `configure', and `config.status'
273428d7b3dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
274428d7b3dSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
275428d7b3dSmrg# so we pass a copy along to make sure it has a sensible value anyway.
276428d7b3dSmrgm4_defun([_LT_PROG_LTMAIN],
277428d7b3dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
278428d7b3dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
279428d7b3dSmrgltmain="$ac_aux_dir/ltmain.sh"
280428d7b3dSmrg])# _LT_PROG_LTMAIN
281428d7b3dSmrg
282428d7b3dSmrg
283428d7b3dSmrg## ------------------------------------- ##
284428d7b3dSmrg## Accumulate code for creating libtool. ##
285428d7b3dSmrg## ------------------------------------- ##
286428d7b3dSmrg
287428d7b3dSmrg# So that we can recreate a full libtool script including additional
288428d7b3dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
289428d7b3dSmrg# in macros and then make a single call at the end using the `libtool'
290428d7b3dSmrg# label.
291428d7b3dSmrg
292428d7b3dSmrg
293428d7b3dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
294428d7b3dSmrg# ----------------------------------------
295428d7b3dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
296428d7b3dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
297428d7b3dSmrg[m4_ifval([$1],
298428d7b3dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
299428d7b3dSmrg                     [$1
300428d7b3dSmrg])])])
301428d7b3dSmrg
302428d7b3dSmrg# Initialize.
303428d7b3dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
304428d7b3dSmrg
305428d7b3dSmrg
306428d7b3dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
307428d7b3dSmrg# ------------------------------
308428d7b3dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
309428d7b3dSmrgm4_define([_LT_CONFIG_LIBTOOL],
310428d7b3dSmrg[m4_ifval([$1],
311428d7b3dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
312428d7b3dSmrg                     [$1
313428d7b3dSmrg])])])
314428d7b3dSmrg
315428d7b3dSmrg# Initialize.
316428d7b3dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
317428d7b3dSmrg
318428d7b3dSmrg
319428d7b3dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
320428d7b3dSmrg# -----------------------------------------------------
321428d7b3dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
322428d7b3dSmrg[_LT_CONFIG_LIBTOOL([$1])
323428d7b3dSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
324428d7b3dSmrg])
325428d7b3dSmrg
326428d7b3dSmrg
327428d7b3dSmrg# _LT_FORMAT_COMMENT([COMMENT])
328428d7b3dSmrg# -----------------------------
329428d7b3dSmrg# Add leading comment marks to the start of each line, and a trailing
330428d7b3dSmrg# full-stop to the whole comment if one is not present already.
331428d7b3dSmrgm4_define([_LT_FORMAT_COMMENT],
332428d7b3dSmrg[m4_ifval([$1], [
333428d7b3dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
334428d7b3dSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
335428d7b3dSmrg)])
336428d7b3dSmrg
337428d7b3dSmrg
338428d7b3dSmrg
339428d7b3dSmrg## ------------------------ ##
340428d7b3dSmrg## FIXME: Eliminate VARNAME ##
341428d7b3dSmrg## ------------------------ ##
342428d7b3dSmrg
343428d7b3dSmrg
344428d7b3dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
345428d7b3dSmrg# -------------------------------------------------------------------
346428d7b3dSmrg# CONFIGNAME is the name given to the value in the libtool script.
347428d7b3dSmrg# VARNAME is the (base) name used in the configure script.
348428d7b3dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
349428d7b3dSmrg# VARNAME.  Any other value will be used directly.
350428d7b3dSmrgm4_define([_LT_DECL],
351428d7b3dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
352428d7b3dSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
353428d7b3dSmrg	[m4_ifval([$1], [$1], [$2])])
354428d7b3dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
355428d7b3dSmrg    m4_ifval([$4],
356428d7b3dSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
357428d7b3dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
358428d7b3dSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
359428d7b3dSmrg])
360428d7b3dSmrg
361428d7b3dSmrg
362428d7b3dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
363428d7b3dSmrg# --------------------------------------------------------
364428d7b3dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
365428d7b3dSmrg
366428d7b3dSmrg
367428d7b3dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
368428d7b3dSmrg# ------------------------------------------------
369428d7b3dSmrgm4_define([lt_decl_tag_varnames],
370428d7b3dSmrg[_lt_decl_filter([tagged?], [yes], $@)])
371428d7b3dSmrg
372428d7b3dSmrg
373428d7b3dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
374428d7b3dSmrg# ---------------------------------------------------------
375428d7b3dSmrgm4_define([_lt_decl_filter],
376428d7b3dSmrg[m4_case([$#],
377428d7b3dSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
378428d7b3dSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
379428d7b3dSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
380428d7b3dSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
381428d7b3dSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
382428d7b3dSmrg])
383428d7b3dSmrg
384428d7b3dSmrg
385428d7b3dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
386428d7b3dSmrg# --------------------------------------------------
387428d7b3dSmrgm4_define([lt_decl_quote_varnames],
388428d7b3dSmrg[_lt_decl_filter([value], [1], $@)])
389428d7b3dSmrg
390428d7b3dSmrg
391428d7b3dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
392428d7b3dSmrg# ---------------------------------------------------
393428d7b3dSmrgm4_define([lt_decl_dquote_varnames],
394428d7b3dSmrg[_lt_decl_filter([value], [2], $@)])
395428d7b3dSmrg
396428d7b3dSmrg
397428d7b3dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
398428d7b3dSmrg# ---------------------------------------------------
399428d7b3dSmrgm4_define([lt_decl_varnames_tagged],
400428d7b3dSmrg[m4_assert([$# <= 2])dnl
401428d7b3dSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
402428d7b3dSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
403428d7b3dSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
404428d7b3dSmrgm4_define([_lt_decl_varnames_tagged],
405428d7b3dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
406428d7b3dSmrg
407428d7b3dSmrg
408428d7b3dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
409428d7b3dSmrg# ------------------------------------------------
410428d7b3dSmrgm4_define([lt_decl_all_varnames],
411428d7b3dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
412428d7b3dSmrg     m4_if([$2], [],
413428d7b3dSmrg	   m4_quote(lt_decl_varnames),
414428d7b3dSmrg	m4_quote(m4_shift($@))))[]dnl
415428d7b3dSmrg])
416428d7b3dSmrgm4_define([_lt_decl_all_varnames],
417428d7b3dSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
418428d7b3dSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
419428d7b3dSmrg])
420428d7b3dSmrg
421428d7b3dSmrg
422428d7b3dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
423428d7b3dSmrg# ------------------------------------
424428d7b3dSmrg# Quote a variable value, and forward it to `config.status' so that its
425428d7b3dSmrg# declaration there will have the same value as in `configure'.  VARNAME
426428d7b3dSmrg# must have a single quote delimited value for this to work.
427428d7b3dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
428428d7b3dSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
429428d7b3dSmrg
430428d7b3dSmrg
431428d7b3dSmrg# _LT_CONFIG_STATUS_DECLARATIONS
432428d7b3dSmrg# ------------------------------
433428d7b3dSmrg# We delimit libtool config variables with single quotes, so when
434428d7b3dSmrg# we write them to config.status, we have to be sure to quote all
435428d7b3dSmrg# embedded single quotes properly.  In configure, this macro expands
436428d7b3dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
437428d7b3dSmrg#
438428d7b3dSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
439428d7b3dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
440428d7b3dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
441428d7b3dSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
442428d7b3dSmrg
443428d7b3dSmrg
444428d7b3dSmrg# _LT_LIBTOOL_TAGS
445428d7b3dSmrg# ----------------
446428d7b3dSmrg# Output comment and list of tags supported by the script
447428d7b3dSmrgm4_defun([_LT_LIBTOOL_TAGS],
448428d7b3dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
449428d7b3dSmrgavailable_tags="_LT_TAGS"dnl
450428d7b3dSmrg])
451428d7b3dSmrg
452428d7b3dSmrg
453428d7b3dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
454428d7b3dSmrg# -----------------------------------
455428d7b3dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
456428d7b3dSmrg# expand to a commented shell variable setting:
457428d7b3dSmrg#
458428d7b3dSmrg#    # Some comment about what VAR is for.
459428d7b3dSmrg#    visible_name=$lt_internal_name
460428d7b3dSmrgm4_define([_LT_LIBTOOL_DECLARE],
461428d7b3dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
462428d7b3dSmrg					   [description])))[]dnl
463428d7b3dSmrgm4_pushdef([_libtool_name],
464428d7b3dSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
465428d7b3dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
466428d7b3dSmrg    [0], [_libtool_name=[$]$1],
467428d7b3dSmrg    [1], [_libtool_name=$lt_[]$1],
468428d7b3dSmrg    [2], [_libtool_name=$lt_[]$1],
469428d7b3dSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
470428d7b3dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
471428d7b3dSmrg])
472428d7b3dSmrg
473428d7b3dSmrg
474428d7b3dSmrg# _LT_LIBTOOL_CONFIG_VARS
475428d7b3dSmrg# -----------------------
476428d7b3dSmrg# Produce commented declarations of non-tagged libtool config variables
477428d7b3dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
478428d7b3dSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
479428d7b3dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
480428d7b3dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
481428d7b3dSmrg[m4_foreach([_lt_var],
482428d7b3dSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
483428d7b3dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
484428d7b3dSmrg
485428d7b3dSmrg
486428d7b3dSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
487428d7b3dSmrg# -------------------------
488428d7b3dSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
489428d7b3dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
490428d7b3dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
491428d7b3dSmrg
492428d7b3dSmrg
493428d7b3dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
494428d7b3dSmrg# ------------------------------
495428d7b3dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
496428d7b3dSmrg
497428d7b3dSmrg
498428d7b3dSmrg# _LT_CONFIG_COMMANDS
499428d7b3dSmrg# -------------------
500428d7b3dSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
501428d7b3dSmrg# variables for single and double quote escaping we saved from calls
502428d7b3dSmrg# to _LT_DECL, we can put quote escaped variables declarations
503428d7b3dSmrg# into `config.status', and then the shell code to quote escape them in
504428d7b3dSmrg# for loops in `config.status'.  Finally, any additional code accumulated
505428d7b3dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
506428d7b3dSmrgm4_defun([_LT_CONFIG_COMMANDS],
507428d7b3dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
508428d7b3dSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
509428d7b3dSmrg	dnl instead of duplicating it all over again into config.status,
510428d7b3dSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
511428d7b3dSmrg	dnl needs to know what name is stored there:
512428d7b3dSmrg        [AC_CONFIG_COMMANDS([libtool],
513428d7b3dSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
514428d7b3dSmrg    dnl If the libtool generation code is destined for config.status,
515428d7b3dSmrg    dnl expand the accumulated commands and init code now:
516428d7b3dSmrg    [AC_CONFIG_COMMANDS([libtool],
517428d7b3dSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
518428d7b3dSmrg])#_LT_CONFIG_COMMANDS
519428d7b3dSmrg
520428d7b3dSmrg
521428d7b3dSmrg# Initialize.
522428d7b3dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
523428d7b3dSmrg[
524428d7b3dSmrg
525428d7b3dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
526428d7b3dSmrg# if CDPATH is set.
527428d7b3dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
528428d7b3dSmrg
529428d7b3dSmrgsed_quote_subst='$sed_quote_subst'
530428d7b3dSmrgdouble_quote_subst='$double_quote_subst'
531428d7b3dSmrgdelay_variable_subst='$delay_variable_subst'
532428d7b3dSmrg_LT_CONFIG_STATUS_DECLARATIONS
533428d7b3dSmrgLTCC='$LTCC'
534428d7b3dSmrgLTCFLAGS='$LTCFLAGS'
535428d7b3dSmrgcompiler='$compiler_DEFAULT'
536428d7b3dSmrg
537428d7b3dSmrg# A function that is used when there is no print builtin or printf.
538428d7b3dSmrgfunc_fallback_echo ()
539428d7b3dSmrg{
540428d7b3dSmrg  eval 'cat <<_LTECHO_EOF
541428d7b3dSmrg\$[]1
542428d7b3dSmrg_LTECHO_EOF'
543428d7b3dSmrg}
544428d7b3dSmrg
545428d7b3dSmrg# Quote evaled strings.
546428d7b3dSmrgfor var in lt_decl_all_varnames([[ \
547428d7b3dSmrg]], lt_decl_quote_varnames); do
548428d7b3dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
549428d7b3dSmrg    *[[\\\\\\\`\\"\\\$]]*)
550428d7b3dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
551428d7b3dSmrg      ;;
552428d7b3dSmrg    *)
553428d7b3dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
554428d7b3dSmrg      ;;
555428d7b3dSmrg    esac
556428d7b3dSmrgdone
557428d7b3dSmrg
558428d7b3dSmrg# Double-quote double-evaled strings.
559428d7b3dSmrgfor var in lt_decl_all_varnames([[ \
560428d7b3dSmrg]], lt_decl_dquote_varnames); do
561428d7b3dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
562428d7b3dSmrg    *[[\\\\\\\`\\"\\\$]]*)
563428d7b3dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
564428d7b3dSmrg      ;;
565428d7b3dSmrg    *)
566428d7b3dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
567428d7b3dSmrg      ;;
568428d7b3dSmrg    esac
569428d7b3dSmrgdone
570428d7b3dSmrg
571428d7b3dSmrg_LT_OUTPUT_LIBTOOL_INIT
572428d7b3dSmrg])
573428d7b3dSmrg
574428d7b3dSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
575428d7b3dSmrg# ------------------------------------
576428d7b3dSmrg# Generate a child script FILE with all initialization necessary to
577428d7b3dSmrg# reuse the environment learned by the parent script, and make the
578428d7b3dSmrg# file executable.  If COMMENT is supplied, it is inserted after the
579428d7b3dSmrg# `#!' sequence but before initialization text begins.  After this
580428d7b3dSmrg# macro, additional text can be appended to FILE to form the body of
581428d7b3dSmrg# the child script.  The macro ends with non-zero status if the
582428d7b3dSmrg# file could not be fully written (such as if the disk is full).
583428d7b3dSmrgm4_ifdef([AS_INIT_GENERATED],
584428d7b3dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
585428d7b3dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
586428d7b3dSmrg[m4_require([AS_PREPARE])]dnl
587428d7b3dSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
588428d7b3dSmrg[lt_write_fail=0
589428d7b3dSmrgcat >$1 <<_ASEOF || lt_write_fail=1
590428d7b3dSmrg#! $SHELL
591428d7b3dSmrg# Generated by $as_me.
592428d7b3dSmrg$2
593428d7b3dSmrgSHELL=\${CONFIG_SHELL-$SHELL}
594428d7b3dSmrgexport SHELL
595428d7b3dSmrg_ASEOF
596428d7b3dSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
597428d7b3dSmrgAS_SHELL_SANITIZE
598428d7b3dSmrg_AS_PREPARE
599428d7b3dSmrgexec AS_MESSAGE_FD>&1
600428d7b3dSmrg_ASEOF
601428d7b3dSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
602428d7b3dSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
603428d7b3dSmrg
604428d7b3dSmrg# LT_OUTPUT
605428d7b3dSmrg# ---------
606428d7b3dSmrg# This macro allows early generation of the libtool script (before
607428d7b3dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
608428d7b3dSmrg# tests.
609428d7b3dSmrgAC_DEFUN([LT_OUTPUT],
610428d7b3dSmrg[: ${CONFIG_LT=./config.lt}
611428d7b3dSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
612428d7b3dSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
613428d7b3dSmrg[# Run this file to recreate a libtool stub with the current configuration.])
614428d7b3dSmrg
615428d7b3dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
616428d7b3dSmrglt_cl_silent=false
617428d7b3dSmrgexec AS_MESSAGE_LOG_FD>>config.log
618428d7b3dSmrg{
619428d7b3dSmrg  echo
620428d7b3dSmrg  AS_BOX([Running $as_me.])
621428d7b3dSmrg} >&AS_MESSAGE_LOG_FD
622428d7b3dSmrg
623428d7b3dSmrglt_cl_help="\
624428d7b3dSmrg\`$as_me' creates a local libtool stub from the current configuration,
625428d7b3dSmrgfor use in further configure time tests before the real libtool is
626428d7b3dSmrggenerated.
627428d7b3dSmrg
628428d7b3dSmrgUsage: $[0] [[OPTIONS]]
629428d7b3dSmrg
630428d7b3dSmrg  -h, --help      print this help, then exit
631428d7b3dSmrg  -V, --version   print version number, then exit
632428d7b3dSmrg  -q, --quiet     do not print progress messages
633428d7b3dSmrg  -d, --debug     don't remove temporary files
634428d7b3dSmrg
635428d7b3dSmrgReport bugs to <bug-libtool@gnu.org>."
636428d7b3dSmrg
637428d7b3dSmrglt_cl_version="\
638428d7b3dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
639428d7b3dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
640428d7b3dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
641428d7b3dSmrg
642428d7b3dSmrgCopyright (C) 2011 Free Software Foundation, Inc.
643428d7b3dSmrgThis config.lt script is free software; the Free Software Foundation
644428d7b3dSmrggives unlimited permision to copy, distribute and modify it."
645428d7b3dSmrg
646428d7b3dSmrgwhile test $[#] != 0
647428d7b3dSmrgdo
648428d7b3dSmrg  case $[1] in
649428d7b3dSmrg    --version | --v* | -V )
650428d7b3dSmrg      echo "$lt_cl_version"; exit 0 ;;
651428d7b3dSmrg    --help | --h* | -h )
652428d7b3dSmrg      echo "$lt_cl_help"; exit 0 ;;
653428d7b3dSmrg    --debug | --d* | -d )
654428d7b3dSmrg      debug=: ;;
655428d7b3dSmrg    --quiet | --q* | --silent | --s* | -q )
656428d7b3dSmrg      lt_cl_silent=: ;;
657428d7b3dSmrg
658428d7b3dSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
659428d7b3dSmrgTry \`$[0] --help' for more information.]) ;;
660428d7b3dSmrg
661428d7b3dSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
662428d7b3dSmrgTry \`$[0] --help' for more information.]) ;;
663428d7b3dSmrg  esac
664428d7b3dSmrg  shift
665428d7b3dSmrgdone
666428d7b3dSmrg
667428d7b3dSmrgif $lt_cl_silent; then
668428d7b3dSmrg  exec AS_MESSAGE_FD>/dev/null
669428d7b3dSmrgfi
670428d7b3dSmrg_LTEOF
671428d7b3dSmrg
672428d7b3dSmrgcat >>"$CONFIG_LT" <<_LTEOF
673428d7b3dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
674428d7b3dSmrg_LTEOF
675428d7b3dSmrg
676428d7b3dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
677428d7b3dSmrgAC_MSG_NOTICE([creating $ofile])
678428d7b3dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
679428d7b3dSmrgAS_EXIT(0)
680428d7b3dSmrg_LTEOF
681428d7b3dSmrgchmod +x "$CONFIG_LT"
682428d7b3dSmrg
683428d7b3dSmrg# configure is writing to config.log, but config.lt does its own redirection,
684428d7b3dSmrg# appending to config.log, which fails on DOS, as config.log is still kept
685428d7b3dSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
686428d7b3dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
687428d7b3dSmrglt_cl_success=:
688428d7b3dSmrgtest "$silent" = yes &&
689428d7b3dSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
690428d7b3dSmrgexec AS_MESSAGE_LOG_FD>/dev/null
691428d7b3dSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
692428d7b3dSmrgexec AS_MESSAGE_LOG_FD>>config.log
693428d7b3dSmrg$lt_cl_success || AS_EXIT(1)
694428d7b3dSmrg])# LT_OUTPUT
695428d7b3dSmrg
696428d7b3dSmrg
697428d7b3dSmrg# _LT_CONFIG(TAG)
698428d7b3dSmrg# ---------------
699428d7b3dSmrg# If TAG is the built-in tag, create an initial libtool script with a
700428d7b3dSmrg# default configuration from the untagged config vars.  Otherwise add code
701428d7b3dSmrg# to config.status for appending the configuration named by TAG from the
702428d7b3dSmrg# matching tagged config vars.
703428d7b3dSmrgm4_defun([_LT_CONFIG],
704428d7b3dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
705428d7b3dSmrg_LT_CONFIG_SAVE_COMMANDS([
706428d7b3dSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
707428d7b3dSmrg  m4_if(_LT_TAG, [C], [
708428d7b3dSmrg    # See if we are running on zsh, and set the options which allow our
709428d7b3dSmrg    # commands through without removal of \ escapes.
710428d7b3dSmrg    if test -n "${ZSH_VERSION+set}" ; then
711428d7b3dSmrg      setopt NO_GLOB_SUBST
712428d7b3dSmrg    fi
713428d7b3dSmrg
714428d7b3dSmrg    cfgfile="${ofile}T"
715428d7b3dSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
716428d7b3dSmrg    $RM "$cfgfile"
717428d7b3dSmrg
718428d7b3dSmrg    cat <<_LT_EOF >> "$cfgfile"
719428d7b3dSmrg#! $SHELL
720428d7b3dSmrg
721428d7b3dSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
722428d7b3dSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
723428d7b3dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
724428d7b3dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
725428d7b3dSmrg#
726428d7b3dSmrg_LT_COPYING
727428d7b3dSmrg_LT_LIBTOOL_TAGS
728428d7b3dSmrg
729428d7b3dSmrg# ### BEGIN LIBTOOL CONFIG
730428d7b3dSmrg_LT_LIBTOOL_CONFIG_VARS
731428d7b3dSmrg_LT_LIBTOOL_TAG_VARS
732428d7b3dSmrg# ### END LIBTOOL CONFIG
733428d7b3dSmrg
734428d7b3dSmrg_LT_EOF
735428d7b3dSmrg
736428d7b3dSmrg  case $host_os in
737428d7b3dSmrg  aix3*)
738428d7b3dSmrg    cat <<\_LT_EOF >> "$cfgfile"
739428d7b3dSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
740428d7b3dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
741428d7b3dSmrg# vanish in a puff of smoke.
742428d7b3dSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
743428d7b3dSmrg  COLLECT_NAMES=
744428d7b3dSmrg  export COLLECT_NAMES
745428d7b3dSmrgfi
746428d7b3dSmrg_LT_EOF
747428d7b3dSmrg    ;;
748428d7b3dSmrg  esac
749428d7b3dSmrg
750428d7b3dSmrg  _LT_PROG_LTMAIN
751428d7b3dSmrg
752428d7b3dSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
753428d7b3dSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
754428d7b3dSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
755428d7b3dSmrg  # is reportedly fixed, but why not run on old versions too?
756428d7b3dSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
757428d7b3dSmrg     || (rm -f "$cfgfile"; exit 1)
758428d7b3dSmrg
759428d7b3dSmrg  _LT_PROG_REPLACE_SHELLFNS
760428d7b3dSmrg
761428d7b3dSmrg   mv -f "$cfgfile" "$ofile" ||
762428d7b3dSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
763428d7b3dSmrg  chmod +x "$ofile"
764428d7b3dSmrg],
765428d7b3dSmrg[cat <<_LT_EOF >> "$ofile"
766428d7b3dSmrg
767428d7b3dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
768428d7b3dSmrgdnl in a comment (ie after a #).
769428d7b3dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
770428d7b3dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
771428d7b3dSmrg# ### END LIBTOOL TAG CONFIG: $1
772428d7b3dSmrg_LT_EOF
773428d7b3dSmrg])dnl /m4_if
774428d7b3dSmrg],
775428d7b3dSmrg[m4_if([$1], [], [
776428d7b3dSmrg    PACKAGE='$PACKAGE'
777428d7b3dSmrg    VERSION='$VERSION'
778428d7b3dSmrg    TIMESTAMP='$TIMESTAMP'
779428d7b3dSmrg    RM='$RM'
780428d7b3dSmrg    ofile='$ofile'], [])
781428d7b3dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
782428d7b3dSmrg])# _LT_CONFIG
783428d7b3dSmrg
784428d7b3dSmrg
785428d7b3dSmrg# LT_SUPPORTED_TAG(TAG)
786428d7b3dSmrg# ---------------------
787428d7b3dSmrg# Trace this macro to discover what tags are supported by the libtool
788428d7b3dSmrg# --tag option, using:
789428d7b3dSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
790428d7b3dSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
791428d7b3dSmrg
792428d7b3dSmrg
793428d7b3dSmrg# C support is built-in for now
794428d7b3dSmrgm4_define([_LT_LANG_C_enabled], [])
795428d7b3dSmrgm4_define([_LT_TAGS], [])
796428d7b3dSmrg
797428d7b3dSmrg
798428d7b3dSmrg# LT_LANG(LANG)
799428d7b3dSmrg# -------------
800428d7b3dSmrg# Enable libtool support for the given language if not already enabled.
801428d7b3dSmrgAC_DEFUN([LT_LANG],
802428d7b3dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
803428d7b3dSmrgm4_case([$1],
804428d7b3dSmrg  [C],			[_LT_LANG(C)],
805428d7b3dSmrg  [C++],		[_LT_LANG(CXX)],
806428d7b3dSmrg  [Go],			[_LT_LANG(GO)],
807428d7b3dSmrg  [Java],		[_LT_LANG(GCJ)],
808428d7b3dSmrg  [Fortran 77],		[_LT_LANG(F77)],
809428d7b3dSmrg  [Fortran],		[_LT_LANG(FC)],
810428d7b3dSmrg  [Windows Resource],	[_LT_LANG(RC)],
811428d7b3dSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
812428d7b3dSmrg    [_LT_LANG($1)],
813428d7b3dSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
814428d7b3dSmrg])# LT_LANG
815428d7b3dSmrg
816428d7b3dSmrg
817428d7b3dSmrg# _LT_LANG(LANGNAME)
818428d7b3dSmrg# ------------------
819428d7b3dSmrgm4_defun([_LT_LANG],
820428d7b3dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
821428d7b3dSmrg  [LT_SUPPORTED_TAG([$1])dnl
822428d7b3dSmrg  m4_append([_LT_TAGS], [$1 ])dnl
823428d7b3dSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
824428d7b3dSmrg  _LT_LANG_$1_CONFIG($1)])dnl
825428d7b3dSmrg])# _LT_LANG
826428d7b3dSmrg
827428d7b3dSmrg
828428d7b3dSmrgm4_ifndef([AC_PROG_GO], [
829428d7b3dSmrg############################################################
830428d7b3dSmrg# NOTE: This macro has been submitted for inclusion into   #
831428d7b3dSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
832428d7b3dSmrg#  a released version of Autoconf we should remove this    #
833428d7b3dSmrg#  macro and use it instead.                               #
834428d7b3dSmrg############################################################
835428d7b3dSmrgm4_defun([AC_PROG_GO],
836428d7b3dSmrg[AC_LANG_PUSH(Go)dnl
837428d7b3dSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
838428d7b3dSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
839428d7b3dSmrg_AC_ARG_VAR_LDFLAGS()dnl
840428d7b3dSmrgAC_CHECK_TOOL(GOC, gccgo)
841428d7b3dSmrgif test -z "$GOC"; then
842428d7b3dSmrg  if test -n "$ac_tool_prefix"; then
843428d7b3dSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
844428d7b3dSmrg  fi
845428d7b3dSmrgfi
846428d7b3dSmrgif test -z "$GOC"; then
847428d7b3dSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
848428d7b3dSmrgfi
849428d7b3dSmrg])#m4_defun
850428d7b3dSmrg])#m4_ifndef
851428d7b3dSmrg
852428d7b3dSmrg
853428d7b3dSmrg# _LT_LANG_DEFAULT_CONFIG
854428d7b3dSmrg# -----------------------
855428d7b3dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
856428d7b3dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
857428d7b3dSmrg  [LT_LANG(CXX)],
858428d7b3dSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
859428d7b3dSmrg
860428d7b3dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
861428d7b3dSmrg  [LT_LANG(F77)],
862428d7b3dSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
863428d7b3dSmrg
864428d7b3dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
865428d7b3dSmrg  [LT_LANG(FC)],
866428d7b3dSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
867428d7b3dSmrg
868428d7b3dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
869428d7b3dSmrgdnl pulling things in needlessly.
870428d7b3dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
871428d7b3dSmrg  [LT_LANG(GCJ)],
872428d7b3dSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
873428d7b3dSmrg    [LT_LANG(GCJ)],
874428d7b3dSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
875428d7b3dSmrg      [LT_LANG(GCJ)],
876428d7b3dSmrg      [m4_ifdef([AC_PROG_GCJ],
877428d7b3dSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
878428d7b3dSmrg       m4_ifdef([A][M_PROG_GCJ],
879428d7b3dSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
880428d7b3dSmrg       m4_ifdef([LT_PROG_GCJ],
881428d7b3dSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
882428d7b3dSmrg
883428d7b3dSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
884428d7b3dSmrg  [LT_LANG(GO)],
885428d7b3dSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
886428d7b3dSmrg
887428d7b3dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
888428d7b3dSmrg  [LT_LANG(RC)],
889428d7b3dSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
890428d7b3dSmrg])# _LT_LANG_DEFAULT_CONFIG
891428d7b3dSmrg
892428d7b3dSmrg# Obsolete macros:
893428d7b3dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
894428d7b3dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
895428d7b3dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
896428d7b3dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
897428d7b3dSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
898428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
899428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
900428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
901428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
902428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
903428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
904428d7b3dSmrg
905428d7b3dSmrg
906428d7b3dSmrg# _LT_TAG_COMPILER
907428d7b3dSmrg# ----------------
908428d7b3dSmrgm4_defun([_LT_TAG_COMPILER],
909428d7b3dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
910428d7b3dSmrg
911428d7b3dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
912428d7b3dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
913428d7b3dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
914428d7b3dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
915428d7b3dSmrg
916428d7b3dSmrg# If no C compiler was specified, use CC.
917428d7b3dSmrgLTCC=${LTCC-"$CC"}
918428d7b3dSmrg
919428d7b3dSmrg# If no C compiler flags were specified, use CFLAGS.
920428d7b3dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
921428d7b3dSmrg
922428d7b3dSmrg# Allow CC to be a program name with arguments.
923428d7b3dSmrgcompiler=$CC
924428d7b3dSmrg])# _LT_TAG_COMPILER
925428d7b3dSmrg
926428d7b3dSmrg
927428d7b3dSmrg# _LT_COMPILER_BOILERPLATE
928428d7b3dSmrg# ------------------------
929428d7b3dSmrg# Check for compiler boilerplate output or warnings with
930428d7b3dSmrg# the simple compiler test code.
931428d7b3dSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
932428d7b3dSmrg[m4_require([_LT_DECL_SED])dnl
933428d7b3dSmrgac_outfile=conftest.$ac_objext
934428d7b3dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
935428d7b3dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
936428d7b3dSmrg_lt_compiler_boilerplate=`cat conftest.err`
937428d7b3dSmrg$RM conftest*
938428d7b3dSmrg])# _LT_COMPILER_BOILERPLATE
939428d7b3dSmrg
940428d7b3dSmrg
941428d7b3dSmrg# _LT_LINKER_BOILERPLATE
942428d7b3dSmrg# ----------------------
943428d7b3dSmrg# Check for linker boilerplate output or warnings with
944428d7b3dSmrg# the simple link test code.
945428d7b3dSmrgm4_defun([_LT_LINKER_BOILERPLATE],
946428d7b3dSmrg[m4_require([_LT_DECL_SED])dnl
947428d7b3dSmrgac_outfile=conftest.$ac_objext
948428d7b3dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
949428d7b3dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
950428d7b3dSmrg_lt_linker_boilerplate=`cat conftest.err`
951428d7b3dSmrg$RM -r conftest*
952428d7b3dSmrg])# _LT_LINKER_BOILERPLATE
953428d7b3dSmrg
954428d7b3dSmrg# _LT_REQUIRED_DARWIN_CHECKS
955428d7b3dSmrg# -------------------------
956428d7b3dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
957428d7b3dSmrg  case $host_os in
958428d7b3dSmrg    rhapsody* | darwin*)
959428d7b3dSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
960428d7b3dSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
961428d7b3dSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
962428d7b3dSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
963428d7b3dSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
964428d7b3dSmrg    _LT_DECL([], [DSYMUTIL], [1],
965428d7b3dSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
966428d7b3dSmrg    _LT_DECL([], [NMEDIT], [1],
967428d7b3dSmrg      [Tool to change global to local symbols on Mac OS X])
968428d7b3dSmrg    _LT_DECL([], [LIPO], [1],
969428d7b3dSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
970428d7b3dSmrg    _LT_DECL([], [OTOOL], [1],
971428d7b3dSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
972428d7b3dSmrg    _LT_DECL([], [OTOOL64], [1],
973428d7b3dSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
974428d7b3dSmrg
975428d7b3dSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
976428d7b3dSmrg      [lt_cv_apple_cc_single_mod=no
977428d7b3dSmrg      if test -z "${LT_MULTI_MODULE}"; then
978428d7b3dSmrg	# By default we will add the -single_module flag. You can override
979428d7b3dSmrg	# by either setting the environment variable LT_MULTI_MODULE
980428d7b3dSmrg	# non-empty at configure time, or by adding -multi_module to the
981428d7b3dSmrg	# link flags.
982428d7b3dSmrg	rm -rf libconftest.dylib*
983428d7b3dSmrg	echo "int foo(void){return 1;}" > conftest.c
984428d7b3dSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
985428d7b3dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
986428d7b3dSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
987428d7b3dSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
988428d7b3dSmrg        _lt_result=$?
989428d7b3dSmrg	# If there is a non-empty error log, and "single_module"
990428d7b3dSmrg	# appears in it, assume the flag caused a linker warning
991428d7b3dSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
992428d7b3dSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
993428d7b3dSmrg	# Otherwise, if the output was created with a 0 exit code from
994428d7b3dSmrg	# the compiler, it worked.
995428d7b3dSmrg	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
996428d7b3dSmrg	  lt_cv_apple_cc_single_mod=yes
997428d7b3dSmrg	else
998428d7b3dSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
999428d7b3dSmrg	fi
1000428d7b3dSmrg	rm -rf libconftest.dylib*
1001428d7b3dSmrg	rm -f conftest.*
1002428d7b3dSmrg      fi])
1003428d7b3dSmrg
1004428d7b3dSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1005428d7b3dSmrg      [lt_cv_ld_exported_symbols_list],
1006428d7b3dSmrg      [lt_cv_ld_exported_symbols_list=no
1007428d7b3dSmrg      save_LDFLAGS=$LDFLAGS
1008428d7b3dSmrg      echo "_main" > conftest.sym
1009428d7b3dSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1010428d7b3dSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1011428d7b3dSmrg	[lt_cv_ld_exported_symbols_list=yes],
1012428d7b3dSmrg	[lt_cv_ld_exported_symbols_list=no])
1013428d7b3dSmrg	LDFLAGS="$save_LDFLAGS"
1014428d7b3dSmrg    ])
1015428d7b3dSmrg
1016428d7b3dSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1017428d7b3dSmrg      [lt_cv_ld_force_load=no
1018428d7b3dSmrg      cat > conftest.c << _LT_EOF
1019428d7b3dSmrgint forced_loaded() { return 2;}
1020428d7b3dSmrg_LT_EOF
1021428d7b3dSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1022428d7b3dSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1023428d7b3dSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1024428d7b3dSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1025428d7b3dSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1026428d7b3dSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1027428d7b3dSmrg      cat > conftest.c << _LT_EOF
1028428d7b3dSmrgint main() { return 0;}
1029428d7b3dSmrg_LT_EOF
1030428d7b3dSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1031428d7b3dSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1032428d7b3dSmrg      _lt_result=$?
1033428d7b3dSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
1034428d7b3dSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1035428d7b3dSmrg      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1036428d7b3dSmrg	lt_cv_ld_force_load=yes
1037428d7b3dSmrg      else
1038428d7b3dSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1039428d7b3dSmrg      fi
1040428d7b3dSmrg        rm -f conftest.err libconftest.a conftest conftest.c
1041428d7b3dSmrg        rm -rf conftest.dSYM
1042428d7b3dSmrg    ])
1043428d7b3dSmrg    case $host_os in
1044428d7b3dSmrg    rhapsody* | darwin1.[[012]])
1045428d7b3dSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1046428d7b3dSmrg    darwin1.*)
1047428d7b3dSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1048428d7b3dSmrg    darwin*) # darwin 5.x on
1049428d7b3dSmrg      # if running on 10.5 or later, the deployment target defaults
1050428d7b3dSmrg      # to the OS version, if on x86, and 10.4, the deployment
1051428d7b3dSmrg      # target defaults to 10.4. Don't you love it?
1052428d7b3dSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1053428d7b3dSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1054428d7b3dSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1055428d7b3dSmrg	10.[[012]]*)
1056428d7b3dSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1057428d7b3dSmrg	10.*)
1058428d7b3dSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1059428d7b3dSmrg      esac
1060428d7b3dSmrg    ;;
1061428d7b3dSmrg  esac
1062428d7b3dSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1063428d7b3dSmrg      _lt_dar_single_mod='$single_module'
1064428d7b3dSmrg    fi
1065428d7b3dSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1066428d7b3dSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1067428d7b3dSmrg    else
1068428d7b3dSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1069428d7b3dSmrg    fi
1070428d7b3dSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1071428d7b3dSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
1072428d7b3dSmrg    else
1073428d7b3dSmrg      _lt_dsymutil=
1074428d7b3dSmrg    fi
1075428d7b3dSmrg    ;;
1076428d7b3dSmrg  esac
1077428d7b3dSmrg])
1078428d7b3dSmrg
1079428d7b3dSmrg
1080428d7b3dSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
1081428d7b3dSmrg# ---------------------------------
1082428d7b3dSmrg# Checks for linker and compiler features on darwin
1083428d7b3dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
1084428d7b3dSmrg[
1085428d7b3dSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1086428d7b3dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1087428d7b3dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
1088428d7b3dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1089428d7b3dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1090428d7b3dSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
1091428d7b3dSmrg    _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\"`'
1092428d7b3dSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1093428d7b3dSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1094428d7b3dSmrg  else
1095428d7b3dSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1096428d7b3dSmrg  fi
1097428d7b3dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1098428d7b3dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1099428d7b3dSmrg  case $cc_basename in
1100428d7b3dSmrg     ifort*) _lt_dar_can_shared=yes ;;
1101428d7b3dSmrg     *) _lt_dar_can_shared=$GCC ;;
1102428d7b3dSmrg  esac
1103428d7b3dSmrg  if test "$_lt_dar_can_shared" = "yes"; then
1104428d7b3dSmrg    output_verbose_link_cmd=func_echo_all
1105428d7b3dSmrg    _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}"
1106428d7b3dSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1107428d7b3dSmrg    _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}"
1108428d7b3dSmrg    _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}"
1109428d7b3dSmrg    m4_if([$1], [CXX],
1110428d7b3dSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1111428d7b3dSmrg      _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}"
1112428d7b3dSmrg      _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}"
1113428d7b3dSmrg    fi
1114428d7b3dSmrg],[])
1115428d7b3dSmrg  else
1116428d7b3dSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
1117428d7b3dSmrg  fi
1118428d7b3dSmrg])
1119428d7b3dSmrg
1120428d7b3dSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1121428d7b3dSmrg# ----------------------------------
1122428d7b3dSmrg# Links a minimal program and checks the executable
1123428d7b3dSmrg# for the system default hardcoded library path. In most cases,
1124428d7b3dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1125428d7b3dSmrg# the location of the communication and MPI libs are included too.
1126428d7b3dSmrg# If we don't find anything, use the default library path according
1127428d7b3dSmrg# to the aix ld manual.
1128428d7b3dSmrg# Store the results from the different compilers for each TAGNAME.
1129428d7b3dSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
1130428d7b3dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1131428d7b3dSmrg[m4_require([_LT_DECL_SED])dnl
1132428d7b3dSmrgif test "${lt_cv_aix_libpath+set}" = set; then
1133428d7b3dSmrg  aix_libpath=$lt_cv_aix_libpath
1134428d7b3dSmrgelse
1135428d7b3dSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1136428d7b3dSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1137428d7b3dSmrg  lt_aix_libpath_sed='[
1138428d7b3dSmrg      /Import File Strings/,/^$/ {
1139428d7b3dSmrg	  /^0/ {
1140428d7b3dSmrg	      s/^0  *\([^ ]*\) *$/\1/
1141428d7b3dSmrg	      p
1142428d7b3dSmrg	  }
1143428d7b3dSmrg      }]'
1144428d7b3dSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1145428d7b3dSmrg  # Check for a 64-bit object if we didn't find anything.
1146428d7b3dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1147428d7b3dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1148428d7b3dSmrg  fi],[])
1149428d7b3dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1150428d7b3dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1151428d7b3dSmrg  fi
1152428d7b3dSmrg  ])
1153428d7b3dSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1154428d7b3dSmrgfi
1155428d7b3dSmrg])# _LT_SYS_MODULE_PATH_AIX
1156428d7b3dSmrg
1157428d7b3dSmrg
1158428d7b3dSmrg# _LT_SHELL_INIT(ARG)
1159428d7b3dSmrg# -------------------
1160428d7b3dSmrgm4_define([_LT_SHELL_INIT],
1161428d7b3dSmrg[m4_divert_text([M4SH-INIT], [$1
1162428d7b3dSmrg])])# _LT_SHELL_INIT
1163428d7b3dSmrg
1164428d7b3dSmrg
1165428d7b3dSmrg
1166428d7b3dSmrg# _LT_PROG_ECHO_BACKSLASH
1167428d7b3dSmrg# -----------------------
1168428d7b3dSmrg# Find how we can fake an echo command that does not interpret backslash.
1169428d7b3dSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
1170428d7b3dSmrg# of the generated configure script which will find a shell with a builtin
1171428d7b3dSmrg# printf (which we can use as an echo command).
1172428d7b3dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1173428d7b3dSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1174428d7b3dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1175428d7b3dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1176428d7b3dSmrg
1177428d7b3dSmrgAC_MSG_CHECKING([how to print strings])
1178428d7b3dSmrg# Test print first, because it will be a builtin if present.
1179428d7b3dSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1180428d7b3dSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1181428d7b3dSmrg  ECHO='print -r --'
1182428d7b3dSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1183428d7b3dSmrg  ECHO='printf %s\n'
1184428d7b3dSmrgelse
1185428d7b3dSmrg  # Use this function as a fallback that always works.
1186428d7b3dSmrg  func_fallback_echo ()
1187428d7b3dSmrg  {
1188428d7b3dSmrg    eval 'cat <<_LTECHO_EOF
1189428d7b3dSmrg$[]1
1190428d7b3dSmrg_LTECHO_EOF'
1191428d7b3dSmrg  }
1192428d7b3dSmrg  ECHO='func_fallback_echo'
1193428d7b3dSmrgfi
1194428d7b3dSmrg
1195428d7b3dSmrg# func_echo_all arg...
1196428d7b3dSmrg# Invoke $ECHO with all args, space-separated.
1197428d7b3dSmrgfunc_echo_all ()
1198428d7b3dSmrg{
1199428d7b3dSmrg    $ECHO "$*" 
1200428d7b3dSmrg}
1201428d7b3dSmrg
1202428d7b3dSmrgcase "$ECHO" in
1203428d7b3dSmrg  printf*) AC_MSG_RESULT([printf]) ;;
1204428d7b3dSmrg  print*) AC_MSG_RESULT([print -r]) ;;
1205428d7b3dSmrg  *) AC_MSG_RESULT([cat]) ;;
1206428d7b3dSmrgesac
1207428d7b3dSmrg
1208428d7b3dSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
1209428d7b3dSmrg[_AS_DETECT_SUGGESTED([
1210428d7b3dSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1211428d7b3dSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1212428d7b3dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1213428d7b3dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1214428d7b3dSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
1215428d7b3dSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
1216428d7b3dSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1217428d7b3dSmrg
1218428d7b3dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1219428d7b3dSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1220428d7b3dSmrg])# _LT_PROG_ECHO_BACKSLASH
1221428d7b3dSmrg
1222428d7b3dSmrg
1223428d7b3dSmrg# _LT_WITH_SYSROOT
1224428d7b3dSmrg# ----------------
1225428d7b3dSmrgAC_DEFUN([_LT_WITH_SYSROOT],
1226428d7b3dSmrg[AC_MSG_CHECKING([for sysroot])
1227428d7b3dSmrgAC_ARG_WITH([sysroot],
1228428d7b3dSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1229428d7b3dSmrg                        (or the compiler's sysroot if not specified).],
1230428d7b3dSmrg[], [with_sysroot=no])
1231428d7b3dSmrg
1232428d7b3dSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
1233428d7b3dSmrgdnl in case the user passed a directory name.
1234428d7b3dSmrglt_sysroot=
1235428d7b3dSmrgcase ${with_sysroot} in #(
1236428d7b3dSmrg yes)
1237428d7b3dSmrg   if test "$GCC" = yes; then
1238428d7b3dSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1239428d7b3dSmrg   fi
1240428d7b3dSmrg   ;; #(
1241428d7b3dSmrg /*)
1242428d7b3dSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1243428d7b3dSmrg   ;; #(
1244428d7b3dSmrg no|'')
1245428d7b3dSmrg   ;; #(
1246428d7b3dSmrg *)
1247428d7b3dSmrg   AC_MSG_RESULT([${with_sysroot}])
1248428d7b3dSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
1249428d7b3dSmrg   ;;
1250428d7b3dSmrgesac
1251428d7b3dSmrg
1252428d7b3dSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
1253428d7b3dSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1254428d7b3dSmrg[dependent libraries, and in which our libraries should be installed.])])
1255428d7b3dSmrg
1256428d7b3dSmrg# _LT_ENABLE_LOCK
1257428d7b3dSmrg# ---------------
1258428d7b3dSmrgm4_defun([_LT_ENABLE_LOCK],
1259428d7b3dSmrg[AC_ARG_ENABLE([libtool-lock],
1260428d7b3dSmrg  [AS_HELP_STRING([--disable-libtool-lock],
1261428d7b3dSmrg    [avoid locking (might break parallel builds)])])
1262428d7b3dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1263428d7b3dSmrg
1264428d7b3dSmrg# Some flags need to be propagated to the compiler or linker for good
1265428d7b3dSmrg# libtool support.
1266428d7b3dSmrgcase $host in
1267428d7b3dSmrgia64-*-hpux*)
1268428d7b3dSmrg  # Find out which ABI we are using.
1269428d7b3dSmrg  echo 'int i;' > conftest.$ac_ext
1270428d7b3dSmrg  if AC_TRY_EVAL(ac_compile); then
1271428d7b3dSmrg    case `/usr/bin/file conftest.$ac_objext` in
1272428d7b3dSmrg      *ELF-32*)
1273428d7b3dSmrg	HPUX_IA64_MODE="32"
1274428d7b3dSmrg	;;
1275428d7b3dSmrg      *ELF-64*)
1276428d7b3dSmrg	HPUX_IA64_MODE="64"
1277428d7b3dSmrg	;;
1278428d7b3dSmrg    esac
1279428d7b3dSmrg  fi
1280428d7b3dSmrg  rm -rf conftest*
1281428d7b3dSmrg  ;;
1282428d7b3dSmrg*-*-irix6*)
1283428d7b3dSmrg  # Find out which ABI we are using.
1284428d7b3dSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1285428d7b3dSmrg  if AC_TRY_EVAL(ac_compile); then
1286428d7b3dSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1287428d7b3dSmrg      case `/usr/bin/file conftest.$ac_objext` in
1288428d7b3dSmrg	*32-bit*)
1289428d7b3dSmrg	  LD="${LD-ld} -melf32bsmip"
1290428d7b3dSmrg	  ;;
1291428d7b3dSmrg	*N32*)
1292428d7b3dSmrg	  LD="${LD-ld} -melf32bmipn32"
1293428d7b3dSmrg	  ;;
1294428d7b3dSmrg	*64-bit*)
1295428d7b3dSmrg	  LD="${LD-ld} -melf64bmip"
1296428d7b3dSmrg	;;
1297428d7b3dSmrg      esac
1298428d7b3dSmrg    else
1299428d7b3dSmrg      case `/usr/bin/file conftest.$ac_objext` in
1300428d7b3dSmrg	*32-bit*)
1301428d7b3dSmrg	  LD="${LD-ld} -32"
1302428d7b3dSmrg	  ;;
1303428d7b3dSmrg	*N32*)
1304428d7b3dSmrg	  LD="${LD-ld} -n32"
1305428d7b3dSmrg	  ;;
1306428d7b3dSmrg	*64-bit*)
1307428d7b3dSmrg	  LD="${LD-ld} -64"
1308428d7b3dSmrg	  ;;
1309428d7b3dSmrg      esac
1310428d7b3dSmrg    fi
1311428d7b3dSmrg  fi
1312428d7b3dSmrg  rm -rf conftest*
1313428d7b3dSmrg  ;;
1314428d7b3dSmrg
1315428d7b3dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1316428d7b3dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1317428d7b3dSmrg  # Find out which ABI we are using.
1318428d7b3dSmrg  echo 'int i;' > conftest.$ac_ext
1319428d7b3dSmrg  if AC_TRY_EVAL(ac_compile); then
1320428d7b3dSmrg    case `/usr/bin/file conftest.o` in
1321428d7b3dSmrg      *32-bit*)
1322428d7b3dSmrg	case $host in
1323428d7b3dSmrg	  x86_64-*kfreebsd*-gnu)
1324428d7b3dSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
1325428d7b3dSmrg	    ;;
1326428d7b3dSmrg	  x86_64-*linux*)
1327428d7b3dSmrg	    case `/usr/bin/file conftest.o` in
1328428d7b3dSmrg	      *x86-64*)
1329428d7b3dSmrg		LD="${LD-ld} -m elf32_x86_64"
1330428d7b3dSmrg		;;
1331428d7b3dSmrg	      *)
1332428d7b3dSmrg		LD="${LD-ld} -m elf_i386"
1333428d7b3dSmrg		;;
1334428d7b3dSmrg	    esac
1335428d7b3dSmrg	    ;;
1336428d7b3dSmrg	  powerpc64le-*)
1337428d7b3dSmrg	    LD="${LD-ld} -m elf32lppclinux"
1338428d7b3dSmrg	    ;;
1339428d7b3dSmrg	  powerpc64-*)
1340428d7b3dSmrg	    LD="${LD-ld} -m elf32ppclinux"
1341428d7b3dSmrg	    ;;
1342428d7b3dSmrg	  s390x-*linux*)
1343428d7b3dSmrg	    LD="${LD-ld} -m elf_s390"
1344428d7b3dSmrg	    ;;
1345428d7b3dSmrg	  sparc64-*linux*)
1346428d7b3dSmrg	    LD="${LD-ld} -m elf32_sparc"
1347428d7b3dSmrg	    ;;
1348428d7b3dSmrg	esac
1349428d7b3dSmrg	;;
1350428d7b3dSmrg      *64-bit*)
1351428d7b3dSmrg	case $host in
1352428d7b3dSmrg	  x86_64-*kfreebsd*-gnu)
1353428d7b3dSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1354428d7b3dSmrg	    ;;
1355428d7b3dSmrg	  x86_64-*linux*)
1356428d7b3dSmrg	    LD="${LD-ld} -m elf_x86_64"
1357428d7b3dSmrg	    ;;
1358428d7b3dSmrg	  powerpcle-*)
1359428d7b3dSmrg	    LD="${LD-ld} -m elf64lppc"
1360428d7b3dSmrg	    ;;
1361428d7b3dSmrg	  powerpc-*)
1362428d7b3dSmrg	    LD="${LD-ld} -m elf64ppc"
1363428d7b3dSmrg	    ;;
1364428d7b3dSmrg	  s390*-*linux*|s390*-*tpf*)
1365428d7b3dSmrg	    LD="${LD-ld} -m elf64_s390"
1366428d7b3dSmrg	    ;;
1367428d7b3dSmrg	  sparc*-*linux*)
1368428d7b3dSmrg	    LD="${LD-ld} -m elf64_sparc"
1369428d7b3dSmrg	    ;;
1370428d7b3dSmrg	esac
1371428d7b3dSmrg	;;
1372428d7b3dSmrg    esac
1373428d7b3dSmrg  fi
1374428d7b3dSmrg  rm -rf conftest*
1375428d7b3dSmrg  ;;
1376428d7b3dSmrg
1377428d7b3dSmrg*-*-sco3.2v5*)
1378428d7b3dSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1379428d7b3dSmrg  SAVE_CFLAGS="$CFLAGS"
1380428d7b3dSmrg  CFLAGS="$CFLAGS -belf"
1381428d7b3dSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1382428d7b3dSmrg    [AC_LANG_PUSH(C)
1383428d7b3dSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1384428d7b3dSmrg     AC_LANG_POP])
1385428d7b3dSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1386428d7b3dSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1387428d7b3dSmrg    CFLAGS="$SAVE_CFLAGS"
1388428d7b3dSmrg  fi
1389428d7b3dSmrg  ;;
1390428d7b3dSmrg*-*solaris*)
1391428d7b3dSmrg  # Find out which ABI we are using.
1392428d7b3dSmrg  echo 'int i;' > conftest.$ac_ext
1393428d7b3dSmrg  if AC_TRY_EVAL(ac_compile); then
1394428d7b3dSmrg    case `/usr/bin/file conftest.o` in
1395428d7b3dSmrg    *64-bit*)
1396428d7b3dSmrg      case $lt_cv_prog_gnu_ld in
1397428d7b3dSmrg      yes*)
1398428d7b3dSmrg        case $host in
1399428d7b3dSmrg        i?86-*-solaris*)
1400428d7b3dSmrg          LD="${LD-ld} -m elf_x86_64"
1401428d7b3dSmrg          ;;
1402428d7b3dSmrg        sparc*-*-solaris*)
1403428d7b3dSmrg          LD="${LD-ld} -m elf64_sparc"
1404428d7b3dSmrg          ;;
1405428d7b3dSmrg        esac
1406428d7b3dSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1407428d7b3dSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1408428d7b3dSmrg          LD="${LD-ld}_sol2"
1409428d7b3dSmrg        fi
1410428d7b3dSmrg        ;;
1411428d7b3dSmrg      *)
1412428d7b3dSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1413428d7b3dSmrg	  LD="${LD-ld} -64"
1414428d7b3dSmrg	fi
1415428d7b3dSmrg	;;
1416428d7b3dSmrg      esac
1417428d7b3dSmrg      ;;
1418428d7b3dSmrg    esac
1419428d7b3dSmrg  fi
1420428d7b3dSmrg  rm -rf conftest*
1421428d7b3dSmrg  ;;
1422428d7b3dSmrgesac
1423428d7b3dSmrg
1424428d7b3dSmrgneed_locks="$enable_libtool_lock"
1425428d7b3dSmrg])# _LT_ENABLE_LOCK
1426428d7b3dSmrg
1427428d7b3dSmrg
1428428d7b3dSmrg# _LT_PROG_AR
1429428d7b3dSmrg# -----------
1430428d7b3dSmrgm4_defun([_LT_PROG_AR],
1431428d7b3dSmrg[AC_CHECK_TOOLS(AR, [ar], false)
1432428d7b3dSmrg: ${AR=ar}
1433428d7b3dSmrg: ${AR_FLAGS=cru}
1434428d7b3dSmrg_LT_DECL([], [AR], [1], [The archiver])
1435428d7b3dSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1436428d7b3dSmrg
1437428d7b3dSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1438428d7b3dSmrg  [lt_cv_ar_at_file=no
1439428d7b3dSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1440428d7b3dSmrg     [echo conftest.$ac_objext > conftest.lst
1441428d7b3dSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1442428d7b3dSmrg      AC_TRY_EVAL([lt_ar_try])
1443428d7b3dSmrg      if test "$ac_status" -eq 0; then
1444428d7b3dSmrg	# Ensure the archiver fails upon bogus file names.
1445428d7b3dSmrg	rm -f conftest.$ac_objext libconftest.a
1446428d7b3dSmrg	AC_TRY_EVAL([lt_ar_try])
1447428d7b3dSmrg	if test "$ac_status" -ne 0; then
1448428d7b3dSmrg          lt_cv_ar_at_file=@
1449428d7b3dSmrg        fi
1450428d7b3dSmrg      fi
1451428d7b3dSmrg      rm -f conftest.* libconftest.a
1452428d7b3dSmrg     ])
1453428d7b3dSmrg  ])
1454428d7b3dSmrg
1455428d7b3dSmrgif test "x$lt_cv_ar_at_file" = xno; then
1456428d7b3dSmrg  archiver_list_spec=
1457428d7b3dSmrgelse
1458428d7b3dSmrg  archiver_list_spec=$lt_cv_ar_at_file
1459428d7b3dSmrgfi
1460428d7b3dSmrg_LT_DECL([], [archiver_list_spec], [1],
1461428d7b3dSmrg  [How to feed a file listing to the archiver])
1462428d7b3dSmrg])# _LT_PROG_AR
1463428d7b3dSmrg
1464428d7b3dSmrg
1465428d7b3dSmrg# _LT_CMD_OLD_ARCHIVE
1466428d7b3dSmrg# -------------------
1467428d7b3dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1468428d7b3dSmrg[_LT_PROG_AR
1469428d7b3dSmrg
1470428d7b3dSmrgAC_CHECK_TOOL(STRIP, strip, :)
1471428d7b3dSmrgtest -z "$STRIP" && STRIP=:
1472428d7b3dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1473428d7b3dSmrg
1474428d7b3dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1475428d7b3dSmrgtest -z "$RANLIB" && RANLIB=:
1476428d7b3dSmrg_LT_DECL([], [RANLIB], [1],
1477428d7b3dSmrg    [Commands used to install an old-style archive])
1478428d7b3dSmrg
1479428d7b3dSmrg# Determine commands to create old-style static archives.
1480428d7b3dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1481428d7b3dSmrgold_postinstall_cmds='chmod 644 $oldlib'
1482428d7b3dSmrgold_postuninstall_cmds=
1483428d7b3dSmrg
1484428d7b3dSmrgif test -n "$RANLIB"; then
1485428d7b3dSmrg  case $host_os in
1486428d7b3dSmrg  openbsd*)
1487428d7b3dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1488428d7b3dSmrg    ;;
1489428d7b3dSmrg  *)
1490428d7b3dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1491428d7b3dSmrg    ;;
1492428d7b3dSmrg  esac
1493428d7b3dSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1494428d7b3dSmrgfi
1495428d7b3dSmrg
1496428d7b3dSmrgcase $host_os in
1497428d7b3dSmrg  darwin*)
1498428d7b3dSmrg    lock_old_archive_extraction=yes ;;
1499428d7b3dSmrg  *)
1500428d7b3dSmrg    lock_old_archive_extraction=no ;;
1501428d7b3dSmrgesac
1502428d7b3dSmrg_LT_DECL([], [old_postinstall_cmds], [2])
1503428d7b3dSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
1504428d7b3dSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
1505428d7b3dSmrg    [Commands used to build an old-style archive])
1506428d7b3dSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
1507428d7b3dSmrg    [Whether to use a lock for old archive extraction])
1508428d7b3dSmrg])# _LT_CMD_OLD_ARCHIVE
1509428d7b3dSmrg
1510428d7b3dSmrg
1511428d7b3dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1512428d7b3dSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1513428d7b3dSmrg# ----------------------------------------------------------------
1514428d7b3dSmrg# Check whether the given compiler option works
1515428d7b3dSmrgAC_DEFUN([_LT_COMPILER_OPTION],
1516428d7b3dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1517428d7b3dSmrgm4_require([_LT_DECL_SED])dnl
1518428d7b3dSmrgAC_CACHE_CHECK([$1], [$2],
1519428d7b3dSmrg  [$2=no
1520428d7b3dSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1521428d7b3dSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1522428d7b3dSmrg   lt_compiler_flag="$3"
1523428d7b3dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1524428d7b3dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1525428d7b3dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1526428d7b3dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1527428d7b3dSmrg   # The option is referenced via a variable to avoid confusing sed.
1528428d7b3dSmrg   lt_compile=`echo "$ac_compile" | $SED \
1529428d7b3dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1530428d7b3dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1531428d7b3dSmrg   -e 's:$: $lt_compiler_flag:'`
1532428d7b3dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1533428d7b3dSmrg   (eval "$lt_compile" 2>conftest.err)
1534428d7b3dSmrg   ac_status=$?
1535428d7b3dSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1536428d7b3dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1537428d7b3dSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1538428d7b3dSmrg     # The compiler can only warn and ignore the option if not recognized
1539428d7b3dSmrg     # So say no if there are warnings other than the usual output.
1540428d7b3dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1541428d7b3dSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1542428d7b3dSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1543428d7b3dSmrg       $2=yes
1544428d7b3dSmrg     fi
1545428d7b3dSmrg   fi
1546428d7b3dSmrg   $RM conftest*
1547428d7b3dSmrg])
1548428d7b3dSmrg
1549428d7b3dSmrgif test x"[$]$2" = xyes; then
1550428d7b3dSmrg    m4_if([$5], , :, [$5])
1551428d7b3dSmrgelse
1552428d7b3dSmrg    m4_if([$6], , :, [$6])
1553428d7b3dSmrgfi
1554428d7b3dSmrg])# _LT_COMPILER_OPTION
1555428d7b3dSmrg
1556428d7b3dSmrg# Old name:
1557428d7b3dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1558428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
1559428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1560428d7b3dSmrg
1561428d7b3dSmrg
1562428d7b3dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1563428d7b3dSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1564428d7b3dSmrg# ----------------------------------------------------
1565428d7b3dSmrg# Check whether the given linker option works
1566428d7b3dSmrgAC_DEFUN([_LT_LINKER_OPTION],
1567428d7b3dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1568428d7b3dSmrgm4_require([_LT_DECL_SED])dnl
1569428d7b3dSmrgAC_CACHE_CHECK([$1], [$2],
1570428d7b3dSmrg  [$2=no
1571428d7b3dSmrg   save_LDFLAGS="$LDFLAGS"
1572428d7b3dSmrg   LDFLAGS="$LDFLAGS $3"
1573428d7b3dSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1574428d7b3dSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1575428d7b3dSmrg     # The linker can only warn and ignore the option if not recognized
1576428d7b3dSmrg     # So say no if there are warnings
1577428d7b3dSmrg     if test -s conftest.err; then
1578428d7b3dSmrg       # Append any errors to the config.log.
1579428d7b3dSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1580428d7b3dSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1581428d7b3dSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1582428d7b3dSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1583428d7b3dSmrg         $2=yes
1584428d7b3dSmrg       fi
1585428d7b3dSmrg     else
1586428d7b3dSmrg       $2=yes
1587428d7b3dSmrg     fi
1588428d7b3dSmrg   fi
1589428d7b3dSmrg   $RM -r conftest*
1590428d7b3dSmrg   LDFLAGS="$save_LDFLAGS"
1591428d7b3dSmrg])
1592428d7b3dSmrg
1593428d7b3dSmrgif test x"[$]$2" = xyes; then
1594428d7b3dSmrg    m4_if([$4], , :, [$4])
1595428d7b3dSmrgelse
1596428d7b3dSmrg    m4_if([$5], , :, [$5])
1597428d7b3dSmrgfi
1598428d7b3dSmrg])# _LT_LINKER_OPTION
1599428d7b3dSmrg
1600428d7b3dSmrg# Old name:
1601428d7b3dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1602428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
1603428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1604428d7b3dSmrg
1605428d7b3dSmrg
1606428d7b3dSmrg# LT_CMD_MAX_LEN
1607428d7b3dSmrg#---------------
1608428d7b3dSmrgAC_DEFUN([LT_CMD_MAX_LEN],
1609428d7b3dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1610428d7b3dSmrg# find the maximum length of command line arguments
1611428d7b3dSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1612428d7b3dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1613428d7b3dSmrg  i=0
1614428d7b3dSmrg  teststring="ABCD"
1615428d7b3dSmrg
1616428d7b3dSmrg  case $build_os in
1617428d7b3dSmrg  msdosdjgpp*)
1618428d7b3dSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1619428d7b3dSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1620428d7b3dSmrg    # during glob expansion).  Even if it were fixed, the result of this
1621428d7b3dSmrg    # check would be larger than it should be.
1622428d7b3dSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1623428d7b3dSmrg    ;;
1624428d7b3dSmrg
1625428d7b3dSmrg  gnu*)
1626428d7b3dSmrg    # Under GNU Hurd, this test is not required because there is
1627428d7b3dSmrg    # no limit to the length of command line arguments.
1628428d7b3dSmrg    # Libtool will interpret -1 as no limit whatsoever
1629428d7b3dSmrg    lt_cv_sys_max_cmd_len=-1;
1630428d7b3dSmrg    ;;
1631428d7b3dSmrg
1632428d7b3dSmrg  cygwin* | mingw* | cegcc*)
1633428d7b3dSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1634428d7b3dSmrg    # about 5 minutes as the teststring grows exponentially.
1635428d7b3dSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1636428d7b3dSmrg    # you end up with a "frozen" computer, even though with patience
1637428d7b3dSmrg    # the test eventually succeeds (with a max line length of 256k).
1638428d7b3dSmrg    # Instead, let's just punt: use the minimum linelength reported by
1639428d7b3dSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1640428d7b3dSmrg    lt_cv_sys_max_cmd_len=8192;
1641428d7b3dSmrg    ;;
1642428d7b3dSmrg
1643428d7b3dSmrg  mint*)
1644428d7b3dSmrg    # On MiNT this can take a long time and run out of memory.
1645428d7b3dSmrg    lt_cv_sys_max_cmd_len=8192;
1646428d7b3dSmrg    ;;
1647428d7b3dSmrg
1648428d7b3dSmrg  amigaos*)
1649428d7b3dSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
1650428d7b3dSmrg    # So we just punt and use a minimum line length of 8192.
1651428d7b3dSmrg    lt_cv_sys_max_cmd_len=8192;
1652428d7b3dSmrg    ;;
1653428d7b3dSmrg
1654428d7b3dSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1655428d7b3dSmrg    # This has been around since 386BSD, at least.  Likely further.
1656428d7b3dSmrg    if test -x /sbin/sysctl; then
1657428d7b3dSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1658428d7b3dSmrg    elif test -x /usr/sbin/sysctl; then
1659428d7b3dSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1660428d7b3dSmrg    else
1661428d7b3dSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1662428d7b3dSmrg    fi
1663428d7b3dSmrg    # And add a safety zone
1664428d7b3dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1665428d7b3dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1666428d7b3dSmrg    ;;
1667428d7b3dSmrg
1668428d7b3dSmrg  interix*)
1669428d7b3dSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1670428d7b3dSmrg    lt_cv_sys_max_cmd_len=196608
1671428d7b3dSmrg    ;;
1672428d7b3dSmrg
1673428d7b3dSmrg  os2*)
1674428d7b3dSmrg    # The test takes a long time on OS/2.
1675428d7b3dSmrg    lt_cv_sys_max_cmd_len=8192
1676428d7b3dSmrg    ;;
1677428d7b3dSmrg
1678428d7b3dSmrg  osf*)
1679428d7b3dSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1680428d7b3dSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1681428d7b3dSmrg    # nice to cause kernel panics so lets avoid the loop below.
1682428d7b3dSmrg    # First set a reasonable default.
1683428d7b3dSmrg    lt_cv_sys_max_cmd_len=16384
1684428d7b3dSmrg    #
1685428d7b3dSmrg    if test -x /sbin/sysconfig; then
1686428d7b3dSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1687428d7b3dSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1688428d7b3dSmrg      esac
1689428d7b3dSmrg    fi
1690428d7b3dSmrg    ;;
1691428d7b3dSmrg  sco3.2v5*)
1692428d7b3dSmrg    lt_cv_sys_max_cmd_len=102400
1693428d7b3dSmrg    ;;
1694428d7b3dSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
1695428d7b3dSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1696428d7b3dSmrg    if test -n "$kargmax"; then
1697428d7b3dSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1698428d7b3dSmrg    else
1699428d7b3dSmrg      lt_cv_sys_max_cmd_len=32768
1700428d7b3dSmrg    fi
1701428d7b3dSmrg    ;;
1702428d7b3dSmrg  *)
1703428d7b3dSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1704428d7b3dSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
1705428d7b3dSmrg	test undefined != "$lt_cv_sys_max_cmd_len"; then
1706428d7b3dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1707428d7b3dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1708428d7b3dSmrg    else
1709428d7b3dSmrg      # Make teststring a little bigger before we do anything with it.
1710428d7b3dSmrg      # a 1K string should be a reasonable start.
1711428d7b3dSmrg      for i in 1 2 3 4 5 6 7 8 ; do
1712428d7b3dSmrg        teststring=$teststring$teststring
1713428d7b3dSmrg      done
1714428d7b3dSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1715428d7b3dSmrg      # If test is not a shell built-in, we'll probably end up computing a
1716428d7b3dSmrg      # maximum length that is only half of the actual maximum length, but
1717428d7b3dSmrg      # we can't tell.
1718428d7b3dSmrg      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1719428d7b3dSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1720428d7b3dSmrg	      test $i != 17 # 1/2 MB should be enough
1721428d7b3dSmrg      do
1722428d7b3dSmrg        i=`expr $i + 1`
1723428d7b3dSmrg        teststring=$teststring$teststring
1724428d7b3dSmrg      done
1725428d7b3dSmrg      # Only check the string length outside the loop.
1726428d7b3dSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1727428d7b3dSmrg      teststring=
1728428d7b3dSmrg      # Add a significant safety factor because C++ compilers can tack on
1729428d7b3dSmrg      # massive amounts of additional arguments before passing them to the
1730428d7b3dSmrg      # linker.  It appears as though 1/2 is a usable value.
1731428d7b3dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1732428d7b3dSmrg    fi
1733428d7b3dSmrg    ;;
1734428d7b3dSmrg  esac
1735428d7b3dSmrg])
1736428d7b3dSmrgif test -n $lt_cv_sys_max_cmd_len ; then
1737428d7b3dSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1738428d7b3dSmrgelse
1739428d7b3dSmrg  AC_MSG_RESULT(none)
1740428d7b3dSmrgfi
1741428d7b3dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1742428d7b3dSmrg_LT_DECL([], [max_cmd_len], [0],
1743428d7b3dSmrg    [What is the maximum length of a command?])
1744428d7b3dSmrg])# LT_CMD_MAX_LEN
1745428d7b3dSmrg
1746428d7b3dSmrg# Old name:
1747428d7b3dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1748428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
1749428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1750428d7b3dSmrg
1751428d7b3dSmrg
1752428d7b3dSmrg# _LT_HEADER_DLFCN
1753428d7b3dSmrg# ----------------
1754428d7b3dSmrgm4_defun([_LT_HEADER_DLFCN],
1755428d7b3dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1756428d7b3dSmrg])# _LT_HEADER_DLFCN
1757428d7b3dSmrg
1758428d7b3dSmrg
1759428d7b3dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1760428d7b3dSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1761428d7b3dSmrg# ----------------------------------------------------------------
1762428d7b3dSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
1763428d7b3dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1764428d7b3dSmrgif test "$cross_compiling" = yes; then :
1765428d7b3dSmrg  [$4]
1766428d7b3dSmrgelse
1767428d7b3dSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1768428d7b3dSmrg  lt_status=$lt_dlunknown
1769428d7b3dSmrg  cat > conftest.$ac_ext <<_LT_EOF
1770428d7b3dSmrg[#line $LINENO "configure"
1771428d7b3dSmrg#include "confdefs.h"
1772428d7b3dSmrg
1773428d7b3dSmrg#if HAVE_DLFCN_H
1774428d7b3dSmrg#include <dlfcn.h>
1775428d7b3dSmrg#endif
1776428d7b3dSmrg
1777428d7b3dSmrg#include <stdio.h>
1778428d7b3dSmrg
1779428d7b3dSmrg#ifdef RTLD_GLOBAL
1780428d7b3dSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1781428d7b3dSmrg#else
1782428d7b3dSmrg#  ifdef DL_GLOBAL
1783428d7b3dSmrg#    define LT_DLGLOBAL		DL_GLOBAL
1784428d7b3dSmrg#  else
1785428d7b3dSmrg#    define LT_DLGLOBAL		0
1786428d7b3dSmrg#  endif
1787428d7b3dSmrg#endif
1788428d7b3dSmrg
1789428d7b3dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1790428d7b3dSmrg   find out it does not work in some platform. */
1791428d7b3dSmrg#ifndef LT_DLLAZY_OR_NOW
1792428d7b3dSmrg#  ifdef RTLD_LAZY
1793428d7b3dSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1794428d7b3dSmrg#  else
1795428d7b3dSmrg#    ifdef DL_LAZY
1796428d7b3dSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1797428d7b3dSmrg#    else
1798428d7b3dSmrg#      ifdef RTLD_NOW
1799428d7b3dSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1800428d7b3dSmrg#      else
1801428d7b3dSmrg#        ifdef DL_NOW
1802428d7b3dSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1803428d7b3dSmrg#        else
1804428d7b3dSmrg#          define LT_DLLAZY_OR_NOW	0
1805428d7b3dSmrg#        endif
1806428d7b3dSmrg#      endif
1807428d7b3dSmrg#    endif
1808428d7b3dSmrg#  endif
1809428d7b3dSmrg#endif
1810428d7b3dSmrg
1811428d7b3dSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
1812428d7b3dSmrg   correspondingly for the symbols needed.  */
1813428d7b3dSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1814428d7b3dSmrgint fnord () __attribute__((visibility("default")));
1815428d7b3dSmrg#endif
1816428d7b3dSmrg
1817428d7b3dSmrgint fnord () { return 42; }
1818428d7b3dSmrgint main ()
1819428d7b3dSmrg{
1820428d7b3dSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1821428d7b3dSmrg  int status = $lt_dlunknown;
1822428d7b3dSmrg
1823428d7b3dSmrg  if (self)
1824428d7b3dSmrg    {
1825428d7b3dSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1826428d7b3dSmrg      else
1827428d7b3dSmrg        {
1828428d7b3dSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1829428d7b3dSmrg          else puts (dlerror ());
1830428d7b3dSmrg	}
1831428d7b3dSmrg      /* dlclose (self); */
1832428d7b3dSmrg    }
1833428d7b3dSmrg  else
1834428d7b3dSmrg    puts (dlerror ());
1835428d7b3dSmrg
1836428d7b3dSmrg  return status;
1837428d7b3dSmrg}]
1838428d7b3dSmrg_LT_EOF
1839428d7b3dSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1840428d7b3dSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1841428d7b3dSmrg    lt_status=$?
1842428d7b3dSmrg    case x$lt_status in
1843428d7b3dSmrg      x$lt_dlno_uscore) $1 ;;
1844428d7b3dSmrg      x$lt_dlneed_uscore) $2 ;;
1845428d7b3dSmrg      x$lt_dlunknown|x*) $3 ;;
1846428d7b3dSmrg    esac
1847428d7b3dSmrg  else :
1848428d7b3dSmrg    # compilation failed
1849428d7b3dSmrg    $3
1850428d7b3dSmrg  fi
1851428d7b3dSmrgfi
1852428d7b3dSmrgrm -fr conftest*
1853428d7b3dSmrg])# _LT_TRY_DLOPEN_SELF
1854428d7b3dSmrg
1855428d7b3dSmrg
1856428d7b3dSmrg# LT_SYS_DLOPEN_SELF
1857428d7b3dSmrg# ------------------
1858428d7b3dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1859428d7b3dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1860428d7b3dSmrgif test "x$enable_dlopen" != xyes; then
1861428d7b3dSmrg  enable_dlopen=unknown
1862428d7b3dSmrg  enable_dlopen_self=unknown
1863428d7b3dSmrg  enable_dlopen_self_static=unknown
1864428d7b3dSmrgelse
1865428d7b3dSmrg  lt_cv_dlopen=no
1866428d7b3dSmrg  lt_cv_dlopen_libs=
1867428d7b3dSmrg
1868428d7b3dSmrg  case $host_os in
1869428d7b3dSmrg  beos*)
1870428d7b3dSmrg    lt_cv_dlopen="load_add_on"
1871428d7b3dSmrg    lt_cv_dlopen_libs=
1872428d7b3dSmrg    lt_cv_dlopen_self=yes
1873428d7b3dSmrg    ;;
1874428d7b3dSmrg
1875428d7b3dSmrg  mingw* | pw32* | cegcc*)
1876428d7b3dSmrg    lt_cv_dlopen="LoadLibrary"
1877428d7b3dSmrg    lt_cv_dlopen_libs=
1878428d7b3dSmrg    ;;
1879428d7b3dSmrg
1880428d7b3dSmrg  cygwin*)
1881428d7b3dSmrg    lt_cv_dlopen="dlopen"
1882428d7b3dSmrg    lt_cv_dlopen_libs=
1883428d7b3dSmrg    ;;
1884428d7b3dSmrg
1885428d7b3dSmrg  darwin*)
1886428d7b3dSmrg  # if libdl is installed we need to link against it
1887428d7b3dSmrg    AC_CHECK_LIB([dl], [dlopen],
1888428d7b3dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1889428d7b3dSmrg    lt_cv_dlopen="dyld"
1890428d7b3dSmrg    lt_cv_dlopen_libs=
1891428d7b3dSmrg    lt_cv_dlopen_self=yes
1892428d7b3dSmrg    ])
1893428d7b3dSmrg    ;;
1894428d7b3dSmrg
1895428d7b3dSmrg  *)
1896428d7b3dSmrg    AC_CHECK_FUNC([shl_load],
1897428d7b3dSmrg	  [lt_cv_dlopen="shl_load"],
1898428d7b3dSmrg      [AC_CHECK_LIB([dld], [shl_load],
1899428d7b3dSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1900428d7b3dSmrg	[AC_CHECK_FUNC([dlopen],
1901428d7b3dSmrg	      [lt_cv_dlopen="dlopen"],
1902428d7b3dSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1903428d7b3dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1904428d7b3dSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1905428d7b3dSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1906428d7b3dSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1907428d7b3dSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1908428d7b3dSmrg	      ])
1909428d7b3dSmrg	    ])
1910428d7b3dSmrg	  ])
1911428d7b3dSmrg	])
1912428d7b3dSmrg      ])
1913428d7b3dSmrg    ;;
1914428d7b3dSmrg  esac
1915428d7b3dSmrg
1916428d7b3dSmrg  if test "x$lt_cv_dlopen" != xno; then
1917428d7b3dSmrg    enable_dlopen=yes
1918428d7b3dSmrg  else
1919428d7b3dSmrg    enable_dlopen=no
1920428d7b3dSmrg  fi
1921428d7b3dSmrg
1922428d7b3dSmrg  case $lt_cv_dlopen in
1923428d7b3dSmrg  dlopen)
1924428d7b3dSmrg    save_CPPFLAGS="$CPPFLAGS"
1925428d7b3dSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1926428d7b3dSmrg
1927428d7b3dSmrg    save_LDFLAGS="$LDFLAGS"
1928428d7b3dSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1929428d7b3dSmrg
1930428d7b3dSmrg    save_LIBS="$LIBS"
1931428d7b3dSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1932428d7b3dSmrg
1933428d7b3dSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1934428d7b3dSmrg	  lt_cv_dlopen_self, [dnl
1935428d7b3dSmrg	  _LT_TRY_DLOPEN_SELF(
1936428d7b3dSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1937428d7b3dSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1938428d7b3dSmrg    ])
1939428d7b3dSmrg
1940428d7b3dSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1941428d7b3dSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1942428d7b3dSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1943428d7b3dSmrg	  lt_cv_dlopen_self_static, [dnl
1944428d7b3dSmrg	  _LT_TRY_DLOPEN_SELF(
1945428d7b3dSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1946428d7b3dSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1947428d7b3dSmrg      ])
1948428d7b3dSmrg    fi
1949428d7b3dSmrg
1950428d7b3dSmrg    CPPFLAGS="$save_CPPFLAGS"
1951428d7b3dSmrg    LDFLAGS="$save_LDFLAGS"
1952428d7b3dSmrg    LIBS="$save_LIBS"
1953428d7b3dSmrg    ;;
1954428d7b3dSmrg  esac
1955428d7b3dSmrg
1956428d7b3dSmrg  case $lt_cv_dlopen_self in
1957428d7b3dSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1958428d7b3dSmrg  *) enable_dlopen_self=unknown ;;
1959428d7b3dSmrg  esac
1960428d7b3dSmrg
1961428d7b3dSmrg  case $lt_cv_dlopen_self_static in
1962428d7b3dSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1963428d7b3dSmrg  *) enable_dlopen_self_static=unknown ;;
1964428d7b3dSmrg  esac
1965428d7b3dSmrgfi
1966428d7b3dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1967428d7b3dSmrg	 [Whether dlopen is supported])
1968428d7b3dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1969428d7b3dSmrg	 [Whether dlopen of programs is supported])
1970428d7b3dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1971428d7b3dSmrg	 [Whether dlopen of statically linked programs is supported])
1972428d7b3dSmrg])# LT_SYS_DLOPEN_SELF
1973428d7b3dSmrg
1974428d7b3dSmrg# Old name:
1975428d7b3dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1976428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
1977428d7b3dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1978428d7b3dSmrg
1979428d7b3dSmrg
1980428d7b3dSmrg# _LT_COMPILER_C_O([TAGNAME])
1981428d7b3dSmrg# ---------------------------
1982428d7b3dSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
1983428d7b3dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1984428d7b3dSmrgm4_defun([_LT_COMPILER_C_O],
1985428d7b3dSmrg[m4_require([_LT_DECL_SED])dnl
1986428d7b3dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1987428d7b3dSmrgm4_require([_LT_TAG_COMPILER])dnl
1988428d7b3dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1989428d7b3dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1990428d7b3dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1991428d7b3dSmrg   $RM -r conftest 2>/dev/null
1992428d7b3dSmrg   mkdir conftest
1993428d7b3dSmrg   cd conftest
1994428d7b3dSmrg   mkdir out
1995428d7b3dSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1996428d7b3dSmrg
1997428d7b3dSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1998428d7b3dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1999428d7b3dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2000428d7b3dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2001428d7b3dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2002428d7b3dSmrg   lt_compile=`echo "$ac_compile" | $SED \
2003428d7b3dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2004428d7b3dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2005428d7b3dSmrg   -e 's:$: $lt_compiler_flag:'`
2006428d7b3dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2007428d7b3dSmrg   (eval "$lt_compile" 2>out/conftest.err)
2008428d7b3dSmrg   ac_status=$?
2009428d7b3dSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2010428d7b3dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2011428d7b3dSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2012428d7b3dSmrg   then
2013428d7b3dSmrg     # The compiler can only warn and ignore the option if not recognized
2014428d7b3dSmrg     # So say no if there are warnings
2015428d7b3dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2016428d7b3dSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2017428d7b3dSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2018428d7b3dSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2019428d7b3dSmrg     fi
2020428d7b3dSmrg   fi
2021428d7b3dSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2022428d7b3dSmrg   $RM conftest*
2023428d7b3dSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2024428d7b3dSmrg   # template instantiation
2025428d7b3dSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2026428d7b3dSmrg   $RM out/* && rmdir out
2027428d7b3dSmrg   cd ..
2028428d7b3dSmrg   $RM -r conftest
2029428d7b3dSmrg   $RM conftest*
2030428d7b3dSmrg])
2031428d7b3dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2032428d7b3dSmrg	[Does compiler simultaneously support -c and -o options?])
2033428d7b3dSmrg])# _LT_COMPILER_C_O
2034428d7b3dSmrg
2035428d7b3dSmrg
2036428d7b3dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2037428d7b3dSmrg# ----------------------------------
2038428d7b3dSmrg# Check to see if we can do hard links to lock some files if needed
2039428d7b3dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
2040428d7b3dSmrg[m4_require([_LT_ENABLE_LOCK])dnl
2041428d7b3dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2042428d7b3dSmrg_LT_COMPILER_C_O([$1])
2043428d7b3dSmrg
2044428d7b3dSmrghard_links="nottested"
2045428d7b3dSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2046428d7b3dSmrg  # do not overwrite the value of need_locks provided by the user
2047428d7b3dSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2048428d7b3dSmrg  hard_links=yes
2049428d7b3dSmrg  $RM conftest*
2050428d7b3dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2051428d7b3dSmrg  touch conftest.a
2052428d7b3dSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2053428d7b3dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2054428d7b3dSmrg  AC_MSG_RESULT([$hard_links])
2055428d7b3dSmrg  if test "$hard_links" = no; then
2056428d7b3dSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2057428d7b3dSmrg    need_locks=warn
2058428d7b3dSmrg  fi
2059428d7b3dSmrgelse
2060428d7b3dSmrg  need_locks=no
2061428d7b3dSmrgfi
2062428d7b3dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2063428d7b3dSmrg])# _LT_COMPILER_FILE_LOCKS
2064428d7b3dSmrg
2065428d7b3dSmrg
2066428d7b3dSmrg# _LT_CHECK_OBJDIR
2067428d7b3dSmrg# ----------------
2068428d7b3dSmrgm4_defun([_LT_CHECK_OBJDIR],
2069428d7b3dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2070428d7b3dSmrg[rm -f .libs 2>/dev/null
2071428d7b3dSmrgmkdir .libs 2>/dev/null
2072428d7b3dSmrgif test -d .libs; then
2073428d7b3dSmrg  lt_cv_objdir=.libs
2074428d7b3dSmrgelse
2075428d7b3dSmrg  # MS-DOS does not allow filenames that begin with a dot.
2076428d7b3dSmrg  lt_cv_objdir=_libs
2077428d7b3dSmrgfi
2078428d7b3dSmrgrmdir .libs 2>/dev/null])
2079428d7b3dSmrgobjdir=$lt_cv_objdir
2080428d7b3dSmrg_LT_DECL([], [objdir], [0],
2081428d7b3dSmrg         [The name of the directory that contains temporary libtool files])dnl
2082428d7b3dSmrgm4_pattern_allow([LT_OBJDIR])dnl
2083428d7b3dSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2084428d7b3dSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2085428d7b3dSmrg])# _LT_CHECK_OBJDIR
2086428d7b3dSmrg
2087428d7b3dSmrg
2088428d7b3dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2089428d7b3dSmrg# --------------------------------------
2090428d7b3dSmrg# Check hardcoding attributes.
2091428d7b3dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2092428d7b3dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2093428d7b3dSmrg_LT_TAGVAR(hardcode_action, $1)=
2094428d7b3dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2095428d7b3dSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2096428d7b3dSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2097428d7b3dSmrg
2098428d7b3dSmrg  # We can hardcode non-existent directories.
2099428d7b3dSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2100428d7b3dSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2101428d7b3dSmrg     # have to relink, otherwise we might link with an installed library
2102428d7b3dSmrg     # when we should be linking with a yet-to-be-installed one
2103428d7b3dSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2104428d7b3dSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2105428d7b3dSmrg    # Linking always hardcodes the temporary library directory.
2106428d7b3dSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
2107428d7b3dSmrg  else
2108428d7b3dSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2109428d7b3dSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
2110428d7b3dSmrg  fi
2111428d7b3dSmrgelse
2112428d7b3dSmrg  # We cannot hardcode anything, or else we can only hardcode existing
2113428d7b3dSmrg  # directories.
2114428d7b3dSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
2115428d7b3dSmrgfi
2116428d7b3dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2117428d7b3dSmrg
2118428d7b3dSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2119428d7b3dSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2120428d7b3dSmrg  # Fast installation is not supported
2121428d7b3dSmrg  enable_fast_install=no
2122428d7b3dSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2123428d7b3dSmrg     test "$enable_shared" = no; then
2124428d7b3dSmrg  # Fast installation is not necessary
2125428d7b3dSmrg  enable_fast_install=needless
2126428d7b3dSmrgfi
2127428d7b3dSmrg_LT_TAGDECL([], [hardcode_action], [0],
2128428d7b3dSmrg    [How to hardcode a shared library path into an executable])
2129428d7b3dSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2130428d7b3dSmrg
2131428d7b3dSmrg
2132428d7b3dSmrg# _LT_CMD_STRIPLIB
2133428d7b3dSmrg# ----------------
2134428d7b3dSmrgm4_defun([_LT_CMD_STRIPLIB],
2135428d7b3dSmrg[m4_require([_LT_DECL_EGREP])
2136428d7b3dSmrgstriplib=
2137428d7b3dSmrgold_striplib=
2138428d7b3dSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2139428d7b3dSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2140428d7b3dSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2141428d7b3dSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2142428d7b3dSmrg  AC_MSG_RESULT([yes])
2143428d7b3dSmrgelse
2144428d7b3dSmrg# FIXME - insert some real tests, host_os isn't really good enough
2145428d7b3dSmrg  case $host_os in
2146428d7b3dSmrg  darwin*)
2147428d7b3dSmrg    if test -n "$STRIP" ; then
2148428d7b3dSmrg      striplib="$STRIP -x"
2149428d7b3dSmrg      old_striplib="$STRIP -S"
2150428d7b3dSmrg      AC_MSG_RESULT([yes])
2151428d7b3dSmrg    else
2152428d7b3dSmrg      AC_MSG_RESULT([no])
2153428d7b3dSmrg    fi
2154428d7b3dSmrg    ;;
2155428d7b3dSmrg  *)
2156428d7b3dSmrg    AC_MSG_RESULT([no])
2157428d7b3dSmrg    ;;
2158428d7b3dSmrg  esac
2159428d7b3dSmrgfi
2160428d7b3dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2161428d7b3dSmrg_LT_DECL([], [striplib], [1])
2162428d7b3dSmrg])# _LT_CMD_STRIPLIB
2163428d7b3dSmrg
2164428d7b3dSmrg
2165428d7b3dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2166428d7b3dSmrg# -----------------------------
2167428d7b3dSmrg# PORTME Fill in your ld.so characteristics
2168428d7b3dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2169428d7b3dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2170428d7b3dSmrgm4_require([_LT_DECL_EGREP])dnl
2171428d7b3dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2172428d7b3dSmrgm4_require([_LT_DECL_OBJDUMP])dnl
2173428d7b3dSmrgm4_require([_LT_DECL_SED])dnl
2174428d7b3dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2175428d7b3dSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2176428d7b3dSmrgm4_if([$1],
2177428d7b3dSmrg	[], [
2178428d7b3dSmrgif test "$GCC" = yes; then
2179428d7b3dSmrg  case $host_os in
2180428d7b3dSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2181428d7b3dSmrg    *) lt_awk_arg="/^libraries:/" ;;
2182428d7b3dSmrg  esac
2183428d7b3dSmrg  case $host_os in
2184428d7b3dSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2185428d7b3dSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
2186428d7b3dSmrg  esac
2187428d7b3dSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2188428d7b3dSmrg  case $lt_search_path_spec in
2189428d7b3dSmrg  *\;*)
2190428d7b3dSmrg    # if the path contains ";" then we assume it to be the separator
2191428d7b3dSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2192428d7b3dSmrg    # assumed that no part of a normal pathname contains ";" but that should
2193428d7b3dSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2194428d7b3dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2195428d7b3dSmrg    ;;
2196428d7b3dSmrg  *)
2197428d7b3dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2198428d7b3dSmrg    ;;
2199428d7b3dSmrg  esac
2200428d7b3dSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2201428d7b3dSmrg  # and add multilib dir if necessary.
2202428d7b3dSmrg  lt_tmp_lt_search_path_spec=
2203428d7b3dSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2204428d7b3dSmrg  for lt_sys_path in $lt_search_path_spec; do
2205428d7b3dSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2206428d7b3dSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2207428d7b3dSmrg    else
2208428d7b3dSmrg      test -d "$lt_sys_path" && \
2209428d7b3dSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2210428d7b3dSmrg    fi
2211428d7b3dSmrg  done
2212428d7b3dSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2213428d7b3dSmrgBEGIN {RS=" "; FS="/|\n";} {
2214428d7b3dSmrg  lt_foo="";
2215428d7b3dSmrg  lt_count=0;
2216428d7b3dSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2217428d7b3dSmrg    if ($lt_i != "" && $lt_i != ".") {
2218428d7b3dSmrg      if ($lt_i == "..") {
2219428d7b3dSmrg        lt_count++;
2220428d7b3dSmrg      } else {
2221428d7b3dSmrg        if (lt_count == 0) {
2222428d7b3dSmrg          lt_foo="/" $lt_i lt_foo;
2223428d7b3dSmrg        } else {
2224428d7b3dSmrg          lt_count--;
2225428d7b3dSmrg        }
2226428d7b3dSmrg      }
2227428d7b3dSmrg    }
2228428d7b3dSmrg  }
2229428d7b3dSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2230428d7b3dSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2231428d7b3dSmrg}'`
2232428d7b3dSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
2233428d7b3dSmrg  # for these hosts.
2234428d7b3dSmrg  case $host_os in
2235428d7b3dSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2236428d7b3dSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2237428d7b3dSmrg  esac
2238428d7b3dSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2239428d7b3dSmrgelse
2240428d7b3dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2241428d7b3dSmrgfi])
2242428d7b3dSmrglibrary_names_spec=
2243428d7b3dSmrglibname_spec='lib$name'
2244428d7b3dSmrgsoname_spec=
2245428d7b3dSmrgshrext_cmds=".so"
2246428d7b3dSmrgpostinstall_cmds=
2247428d7b3dSmrgpostuninstall_cmds=
2248428d7b3dSmrgfinish_cmds=
2249428d7b3dSmrgfinish_eval=
2250428d7b3dSmrgshlibpath_var=
2251428d7b3dSmrgshlibpath_overrides_runpath=unknown
2252428d7b3dSmrgversion_type=none
2253428d7b3dSmrgdynamic_linker="$host_os ld.so"
2254428d7b3dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2255428d7b3dSmrgneed_lib_prefix=unknown
2256428d7b3dSmrghardcode_into_libs=no
2257428d7b3dSmrg
2258428d7b3dSmrg# when you set need_version to no, make sure it does not cause -set_version
2259428d7b3dSmrg# flags to be left without arguments
2260428d7b3dSmrgneed_version=unknown
2261428d7b3dSmrg
2262428d7b3dSmrgcase $host_os in
2263428d7b3dSmrgaix3*)
2264428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2265428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2266428d7b3dSmrg  shlibpath_var=LIBPATH
2267428d7b3dSmrg
2268428d7b3dSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2269428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2270428d7b3dSmrg  ;;
2271428d7b3dSmrg
2272428d7b3dSmrgaix[[4-9]]*)
2273428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2274428d7b3dSmrg  need_lib_prefix=no
2275428d7b3dSmrg  need_version=no
2276428d7b3dSmrg  hardcode_into_libs=yes
2277428d7b3dSmrg  if test "$host_cpu" = ia64; then
2278428d7b3dSmrg    # AIX 5 supports IA64
2279428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2280428d7b3dSmrg    shlibpath_var=LD_LIBRARY_PATH
2281428d7b3dSmrg  else
2282428d7b3dSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2283428d7b3dSmrg    # for dependence libraries.  The import file would start with
2284428d7b3dSmrg    # the line `#! .'.  This would cause the generated library to
2285428d7b3dSmrg    # depend on `.', always an invalid library.  This was fixed in
2286428d7b3dSmrg    # development snapshots of GCC prior to 3.0.
2287428d7b3dSmrg    case $host_os in
2288428d7b3dSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2289428d7b3dSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2290428d7b3dSmrg	   echo ' yes '
2291428d7b3dSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2292428d7b3dSmrg	:
2293428d7b3dSmrg      else
2294428d7b3dSmrg	can_build_shared=no
2295428d7b3dSmrg      fi
2296428d7b3dSmrg      ;;
2297428d7b3dSmrg    esac
2298428d7b3dSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2299428d7b3dSmrg    # soname into executable. Probably we can add versioning support to
2300428d7b3dSmrg    # collect2, so additional links can be useful in future.
2301428d7b3dSmrg    if test "$aix_use_runtimelinking" = yes; then
2302428d7b3dSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2303428d7b3dSmrg      # instead of lib<name>.a to let people know that these are not
2304428d7b3dSmrg      # typical AIX shared libraries.
2305428d7b3dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2306428d7b3dSmrg    else
2307428d7b3dSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2308428d7b3dSmrg      # and later when we are not doing run time linking.
2309428d7b3dSmrg      library_names_spec='${libname}${release}.a $libname.a'
2310428d7b3dSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2311428d7b3dSmrg    fi
2312428d7b3dSmrg    shlibpath_var=LIBPATH
2313428d7b3dSmrg  fi
2314428d7b3dSmrg  ;;
2315428d7b3dSmrg
2316428d7b3dSmrgamigaos*)
2317428d7b3dSmrg  case $host_cpu in
2318428d7b3dSmrg  powerpc)
2319428d7b3dSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2320428d7b3dSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2321428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2322428d7b3dSmrg    ;;
2323428d7b3dSmrg  m68k)
2324428d7b3dSmrg    library_names_spec='$libname.ixlibrary $libname.a'
2325428d7b3dSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2326428d7b3dSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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'
2327428d7b3dSmrg    ;;
2328428d7b3dSmrg  esac
2329428d7b3dSmrg  ;;
2330428d7b3dSmrg
2331428d7b3dSmrgbeos*)
2332428d7b3dSmrg  library_names_spec='${libname}${shared_ext}'
2333428d7b3dSmrg  dynamic_linker="$host_os ld.so"
2334428d7b3dSmrg  shlibpath_var=LIBRARY_PATH
2335428d7b3dSmrg  ;;
2336428d7b3dSmrg
2337428d7b3dSmrgbsdi[[45]]*)
2338428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2339428d7b3dSmrg  need_version=no
2340428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2341428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2342428d7b3dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2343428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2344428d7b3dSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2345428d7b3dSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2346428d7b3dSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2347428d7b3dSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2348428d7b3dSmrg  # libtool to hard-code these into programs
2349428d7b3dSmrg  ;;
2350428d7b3dSmrg
2351428d7b3dSmrgcygwin* | mingw* | pw32* | cegcc*)
2352428d7b3dSmrg  version_type=windows
2353428d7b3dSmrg  shrext_cmds=".dll"
2354428d7b3dSmrg  need_version=no
2355428d7b3dSmrg  need_lib_prefix=no
2356428d7b3dSmrg
2357428d7b3dSmrg  case $GCC,$cc_basename in
2358428d7b3dSmrg  yes,*)
2359428d7b3dSmrg    # gcc
2360428d7b3dSmrg    library_names_spec='$libname.dll.a'
2361428d7b3dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2362428d7b3dSmrg    postinstall_cmds='base_file=`basename \${file}`~
2363428d7b3dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2364428d7b3dSmrg      dldir=$destdir/`dirname \$dlpath`~
2365428d7b3dSmrg      test -d \$dldir || mkdir -p \$dldir~
2366428d7b3dSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2367428d7b3dSmrg      chmod a+x \$dldir/$dlname~
2368428d7b3dSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2369428d7b3dSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2370428d7b3dSmrg      fi'
2371428d7b3dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2372428d7b3dSmrg      dlpath=$dir/\$dldll~
2373428d7b3dSmrg       $RM \$dlpath'
2374428d7b3dSmrg    shlibpath_overrides_runpath=yes
2375428d7b3dSmrg
2376428d7b3dSmrg    case $host_os in
2377428d7b3dSmrg    cygwin*)
2378428d7b3dSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2379428d7b3dSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2380428d7b3dSmrgm4_if([$1], [],[
2381428d7b3dSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2382428d7b3dSmrg      ;;
2383428d7b3dSmrg    mingw* | cegcc*)
2384428d7b3dSmrg      # MinGW DLLs use traditional 'lib' prefix
2385428d7b3dSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2386428d7b3dSmrg      ;;
2387428d7b3dSmrg    pw32*)
2388428d7b3dSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2389428d7b3dSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2390428d7b3dSmrg      ;;
2391428d7b3dSmrg    esac
2392428d7b3dSmrg    dynamic_linker='Win32 ld.exe'
2393428d7b3dSmrg    ;;
2394428d7b3dSmrg
2395428d7b3dSmrg  *,cl*)
2396428d7b3dSmrg    # Native MSVC
2397428d7b3dSmrg    libname_spec='$name'
2398428d7b3dSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2399428d7b3dSmrg    library_names_spec='${libname}.dll.lib'
2400428d7b3dSmrg
2401428d7b3dSmrg    case $build_os in
2402428d7b3dSmrg    mingw*)
2403428d7b3dSmrg      sys_lib_search_path_spec=
2404428d7b3dSmrg      lt_save_ifs=$IFS
2405428d7b3dSmrg      IFS=';'
2406428d7b3dSmrg      for lt_path in $LIB
2407428d7b3dSmrg      do
2408428d7b3dSmrg        IFS=$lt_save_ifs
2409428d7b3dSmrg        # Let DOS variable expansion print the short 8.3 style file name.
2410428d7b3dSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2411428d7b3dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2412428d7b3dSmrg      done
2413428d7b3dSmrg      IFS=$lt_save_ifs
2414428d7b3dSmrg      # Convert to MSYS style.
2415428d7b3dSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2416428d7b3dSmrg      ;;
2417428d7b3dSmrg    cygwin*)
2418428d7b3dSmrg      # Convert to unix form, then to dos form, then back to unix form
2419428d7b3dSmrg      # but this time dos style (no spaces!) so that the unix form looks
2420428d7b3dSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
2421428d7b3dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2422428d7b3dSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2423428d7b3dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2424428d7b3dSmrg      ;;
2425428d7b3dSmrg    *)
2426428d7b3dSmrg      sys_lib_search_path_spec="$LIB"
2427428d7b3dSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2428428d7b3dSmrg        # It is most probably a Windows format PATH.
2429428d7b3dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2430428d7b3dSmrg      else
2431428d7b3dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2432428d7b3dSmrg      fi
2433428d7b3dSmrg      # FIXME: find the short name or the path components, as spaces are
2434428d7b3dSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
2435428d7b3dSmrg      ;;
2436428d7b3dSmrg    esac
2437428d7b3dSmrg
2438428d7b3dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2439428d7b3dSmrg    postinstall_cmds='base_file=`basename \${file}`~
2440428d7b3dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2441428d7b3dSmrg      dldir=$destdir/`dirname \$dlpath`~
2442428d7b3dSmrg      test -d \$dldir || mkdir -p \$dldir~
2443428d7b3dSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
2444428d7b3dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2445428d7b3dSmrg      dlpath=$dir/\$dldll~
2446428d7b3dSmrg       $RM \$dlpath'
2447428d7b3dSmrg    shlibpath_overrides_runpath=yes
2448428d7b3dSmrg    dynamic_linker='Win32 link.exe'
2449428d7b3dSmrg    ;;
2450428d7b3dSmrg
2451428d7b3dSmrg  *)
2452428d7b3dSmrg    # Assume MSVC wrapper
2453428d7b3dSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2454428d7b3dSmrg    dynamic_linker='Win32 ld.exe'
2455428d7b3dSmrg    ;;
2456428d7b3dSmrg  esac
2457428d7b3dSmrg  # FIXME: first we should search . and the directory the executable is in
2458428d7b3dSmrg  shlibpath_var=PATH
2459428d7b3dSmrg  ;;
2460428d7b3dSmrg
2461428d7b3dSmrgdarwin* | rhapsody*)
2462428d7b3dSmrg  dynamic_linker="$host_os dyld"
2463428d7b3dSmrg  version_type=darwin
2464428d7b3dSmrg  need_lib_prefix=no
2465428d7b3dSmrg  need_version=no
2466428d7b3dSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2467428d7b3dSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2468428d7b3dSmrg  shlibpath_overrides_runpath=yes
2469428d7b3dSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2470428d7b3dSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2471428d7b3dSmrgm4_if([$1], [],[
2472428d7b3dSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2473428d7b3dSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2474428d7b3dSmrg  ;;
2475428d7b3dSmrg
2476428d7b3dSmrgdgux*)
2477428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2478428d7b3dSmrg  need_lib_prefix=no
2479428d7b3dSmrg  need_version=no
2480428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2481428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2482428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2483428d7b3dSmrg  ;;
2484428d7b3dSmrg
2485428d7b3dSmrgfreebsd* | dragonfly*)
2486428d7b3dSmrg  # DragonFly does not have aout.  When/if they implement a new
2487428d7b3dSmrg  # versioning mechanism, adjust this.
2488428d7b3dSmrg  if test -x /usr/bin/objformat; then
2489428d7b3dSmrg    objformat=`/usr/bin/objformat`
2490428d7b3dSmrg  else
2491428d7b3dSmrg    case $host_os in
2492428d7b3dSmrg    freebsd[[23]].*) objformat=aout ;;
2493428d7b3dSmrg    *) objformat=elf ;;
2494428d7b3dSmrg    esac
2495428d7b3dSmrg  fi
2496428d7b3dSmrg  version_type=freebsd-$objformat
2497428d7b3dSmrg  case $version_type in
2498428d7b3dSmrg    freebsd-elf*)
2499428d7b3dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2500428d7b3dSmrg      need_version=no
2501428d7b3dSmrg      need_lib_prefix=no
2502428d7b3dSmrg      ;;
2503428d7b3dSmrg    freebsd-*)
2504428d7b3dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2505428d7b3dSmrg      need_version=yes
2506428d7b3dSmrg      ;;
2507428d7b3dSmrg  esac
2508428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2509428d7b3dSmrg  case $host_os in
2510428d7b3dSmrg  freebsd2.*)
2511428d7b3dSmrg    shlibpath_overrides_runpath=yes
2512428d7b3dSmrg    ;;
2513428d7b3dSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2514428d7b3dSmrg    shlibpath_overrides_runpath=yes
2515428d7b3dSmrg    hardcode_into_libs=yes
2516428d7b3dSmrg    ;;
2517428d7b3dSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2518428d7b3dSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2519428d7b3dSmrg    shlibpath_overrides_runpath=no
2520428d7b3dSmrg    hardcode_into_libs=yes
2521428d7b3dSmrg    ;;
2522428d7b3dSmrg  *) # from 4.6 on, and DragonFly
2523428d7b3dSmrg    shlibpath_overrides_runpath=yes
2524428d7b3dSmrg    hardcode_into_libs=yes
2525428d7b3dSmrg    ;;
2526428d7b3dSmrg  esac
2527428d7b3dSmrg  ;;
2528428d7b3dSmrg
2529428d7b3dSmrghaiku*)
2530428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2531428d7b3dSmrg  need_lib_prefix=no
2532428d7b3dSmrg  need_version=no
2533428d7b3dSmrg  dynamic_linker="$host_os runtime_loader"
2534428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2535428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2536428d7b3dSmrg  shlibpath_var=LIBRARY_PATH
2537428d7b3dSmrg  shlibpath_overrides_runpath=yes
2538428d7b3dSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2539428d7b3dSmrg  hardcode_into_libs=yes
2540428d7b3dSmrg  ;;
2541428d7b3dSmrg
2542428d7b3dSmrghpux9* | hpux10* | hpux11*)
2543428d7b3dSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2544428d7b3dSmrg  # link against other versions.
2545428d7b3dSmrg  version_type=sunos
2546428d7b3dSmrg  need_lib_prefix=no
2547428d7b3dSmrg  need_version=no
2548428d7b3dSmrg  case $host_cpu in
2549428d7b3dSmrg  ia64*)
2550428d7b3dSmrg    shrext_cmds='.so'
2551428d7b3dSmrg    hardcode_into_libs=yes
2552428d7b3dSmrg    dynamic_linker="$host_os dld.so"
2553428d7b3dSmrg    shlibpath_var=LD_LIBRARY_PATH
2554428d7b3dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2555428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2556428d7b3dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2557428d7b3dSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2558428d7b3dSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2559428d7b3dSmrg    else
2560428d7b3dSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2561428d7b3dSmrg    fi
2562428d7b3dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2563428d7b3dSmrg    ;;
2564428d7b3dSmrg  hppa*64*)
2565428d7b3dSmrg    shrext_cmds='.sl'
2566428d7b3dSmrg    hardcode_into_libs=yes
2567428d7b3dSmrg    dynamic_linker="$host_os dld.sl"
2568428d7b3dSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2569428d7b3dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2570428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2571428d7b3dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2572428d7b3dSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2573428d7b3dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2574428d7b3dSmrg    ;;
2575428d7b3dSmrg  *)
2576428d7b3dSmrg    shrext_cmds='.sl'
2577428d7b3dSmrg    dynamic_linker="$host_os dld.sl"
2578428d7b3dSmrg    shlibpath_var=SHLIB_PATH
2579428d7b3dSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2580428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2581428d7b3dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2582428d7b3dSmrg    ;;
2583428d7b3dSmrg  esac
2584428d7b3dSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2585428d7b3dSmrg  postinstall_cmds='chmod 555 $lib'
2586428d7b3dSmrg  # or fails outright, so override atomically:
2587428d7b3dSmrg  install_override_mode=555
2588428d7b3dSmrg  ;;
2589428d7b3dSmrg
2590428d7b3dSmrginterix[[3-9]]*)
2591428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2592428d7b3dSmrg  need_lib_prefix=no
2593428d7b3dSmrg  need_version=no
2594428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2595428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2596428d7b3dSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2597428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2598428d7b3dSmrg  shlibpath_overrides_runpath=no
2599428d7b3dSmrg  hardcode_into_libs=yes
2600428d7b3dSmrg  ;;
2601428d7b3dSmrg
2602428d7b3dSmrgirix5* | irix6* | nonstopux*)
2603428d7b3dSmrg  case $host_os in
2604428d7b3dSmrg    nonstopux*) version_type=nonstopux ;;
2605428d7b3dSmrg    *)
2606428d7b3dSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2607428d7b3dSmrg		version_type=linux # correct to gnu/linux during the next big refactor
2608428d7b3dSmrg	else
2609428d7b3dSmrg		version_type=irix
2610428d7b3dSmrg	fi ;;
2611428d7b3dSmrg  esac
2612428d7b3dSmrg  need_lib_prefix=no
2613428d7b3dSmrg  need_version=no
2614428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2615428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2616428d7b3dSmrg  case $host_os in
2617428d7b3dSmrg  irix5* | nonstopux*)
2618428d7b3dSmrg    libsuff= shlibsuff=
2619428d7b3dSmrg    ;;
2620428d7b3dSmrg  *)
2621428d7b3dSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2622428d7b3dSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2623428d7b3dSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2624428d7b3dSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2625428d7b3dSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2626428d7b3dSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2627428d7b3dSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2628428d7b3dSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2629428d7b3dSmrg    esac
2630428d7b3dSmrg    ;;
2631428d7b3dSmrg  esac
2632428d7b3dSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2633428d7b3dSmrg  shlibpath_overrides_runpath=no
2634428d7b3dSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2635428d7b3dSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2636428d7b3dSmrg  hardcode_into_libs=yes
2637428d7b3dSmrg  ;;
2638428d7b3dSmrg
2639428d7b3dSmrg# No shared lib support for Linux oldld, aout, or coff.
2640428d7b3dSmrglinux*oldld* | linux*aout* | linux*coff*)
2641428d7b3dSmrg  dynamic_linker=no
2642428d7b3dSmrg  ;;
2643428d7b3dSmrg
2644428d7b3dSmrg# This must be glibc/ELF.
2645428d7b3dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2646428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2647428d7b3dSmrg  need_lib_prefix=no
2648428d7b3dSmrg  need_version=no
2649428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2650428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2651428d7b3dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2652428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2653428d7b3dSmrg  shlibpath_overrides_runpath=no
2654428d7b3dSmrg
2655428d7b3dSmrg  # Some binutils ld are patched to set DT_RUNPATH
2656428d7b3dSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2657428d7b3dSmrg    [lt_cv_shlibpath_overrides_runpath=no
2658428d7b3dSmrg    save_LDFLAGS=$LDFLAGS
2659428d7b3dSmrg    save_libdir=$libdir
2660428d7b3dSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2661428d7b3dSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2662428d7b3dSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2663428d7b3dSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2664428d7b3dSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
2665428d7b3dSmrg    LDFLAGS=$save_LDFLAGS
2666428d7b3dSmrg    libdir=$save_libdir
2667428d7b3dSmrg    ])
2668428d7b3dSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2669428d7b3dSmrg
2670428d7b3dSmrg  # This implies no fast_install, which is unacceptable.
2671428d7b3dSmrg  # Some rework will be needed to allow for fast_install
2672428d7b3dSmrg  # before this can be enabled.
2673428d7b3dSmrg  hardcode_into_libs=yes
2674428d7b3dSmrg
2675428d7b3dSmrg  # Append ld.so.conf contents to the search path
2676428d7b3dSmrg  if test -f /etc/ld.so.conf; then
2677428d7b3dSmrg    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' ' '`
2678428d7b3dSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2679428d7b3dSmrg  fi
2680428d7b3dSmrg
2681428d7b3dSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2682428d7b3dSmrg  # powerpc, because MkLinux only supported shared libraries with the
2683428d7b3dSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2684428d7b3dSmrg  # most powerpc-linux boxes support dynamic linking these days and
2685428d7b3dSmrg  # people can always --disable-shared, the test was removed, and we
2686428d7b3dSmrg  # assume the GNU/Linux dynamic linker is in use.
2687428d7b3dSmrg  dynamic_linker='GNU/Linux ld.so'
2688428d7b3dSmrg  ;;
2689428d7b3dSmrg
2690428d7b3dSmrgnetbsdelf*-gnu)
2691428d7b3dSmrg  version_type=linux
2692428d7b3dSmrg  need_lib_prefix=no
2693428d7b3dSmrg  need_version=no
2694428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2695428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2696428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2697428d7b3dSmrg  shlibpath_overrides_runpath=no
2698428d7b3dSmrg  hardcode_into_libs=yes
2699428d7b3dSmrg  dynamic_linker='NetBSD ld.elf_so'
2700428d7b3dSmrg  ;;
2701428d7b3dSmrg
2702428d7b3dSmrgnetbsd*)
2703428d7b3dSmrg  version_type=sunos
2704428d7b3dSmrg  need_lib_prefix=no
2705428d7b3dSmrg  need_version=no
2706428d7b3dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2707428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2708428d7b3dSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2709428d7b3dSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2710428d7b3dSmrg  else
2711428d7b3dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2712428d7b3dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2713428d7b3dSmrg    dynamic_linker='NetBSD ld.elf_so'
2714428d7b3dSmrg  fi
2715428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2716428d7b3dSmrg  shlibpath_overrides_runpath=yes
2717428d7b3dSmrg  hardcode_into_libs=yes
2718428d7b3dSmrg  ;;
2719428d7b3dSmrg
2720428d7b3dSmrgnewsos6)
2721428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2722428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2723428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2724428d7b3dSmrg  shlibpath_overrides_runpath=yes
2725428d7b3dSmrg  ;;
2726428d7b3dSmrg
2727428d7b3dSmrg*nto* | *qnx*)
2728428d7b3dSmrg  version_type=qnx
2729428d7b3dSmrg  need_lib_prefix=no
2730428d7b3dSmrg  need_version=no
2731428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2732428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2733428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2734428d7b3dSmrg  shlibpath_overrides_runpath=no
2735428d7b3dSmrg  hardcode_into_libs=yes
2736428d7b3dSmrg  dynamic_linker='ldqnx.so'
2737428d7b3dSmrg  ;;
2738428d7b3dSmrg
2739428d7b3dSmrgopenbsd*)
2740428d7b3dSmrg  version_type=sunos
2741428d7b3dSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
2742428d7b3dSmrg  need_lib_prefix=no
2743428d7b3dSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2744428d7b3dSmrg  case $host_os in
2745428d7b3dSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2746428d7b3dSmrg    *)				need_version=no  ;;
2747428d7b3dSmrg  esac
2748428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2749428d7b3dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2750428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2751428d7b3dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2752428d7b3dSmrg    case $host_os in
2753428d7b3dSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2754428d7b3dSmrg	shlibpath_overrides_runpath=no
2755428d7b3dSmrg	;;
2756428d7b3dSmrg      *)
2757428d7b3dSmrg	shlibpath_overrides_runpath=yes
2758428d7b3dSmrg	;;
2759428d7b3dSmrg      esac
2760428d7b3dSmrg  else
2761428d7b3dSmrg    shlibpath_overrides_runpath=yes
2762428d7b3dSmrg  fi
2763428d7b3dSmrg  ;;
2764428d7b3dSmrg
2765428d7b3dSmrgos2*)
2766428d7b3dSmrg  libname_spec='$name'
2767428d7b3dSmrg  shrext_cmds=".dll"
2768428d7b3dSmrg  need_lib_prefix=no
2769428d7b3dSmrg  library_names_spec='$libname${shared_ext} $libname.a'
2770428d7b3dSmrg  dynamic_linker='OS/2 ld.exe'
2771428d7b3dSmrg  shlibpath_var=LIBPATH
2772428d7b3dSmrg  ;;
2773428d7b3dSmrg
2774428d7b3dSmrgosf3* | osf4* | osf5*)
2775428d7b3dSmrg  version_type=osf
2776428d7b3dSmrg  need_lib_prefix=no
2777428d7b3dSmrg  need_version=no
2778428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2779428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2780428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2781428d7b3dSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2782428d7b3dSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2783428d7b3dSmrg  ;;
2784428d7b3dSmrg
2785428d7b3dSmrgrdos*)
2786428d7b3dSmrg  dynamic_linker=no
2787428d7b3dSmrg  ;;
2788428d7b3dSmrg
2789428d7b3dSmrgsolaris*)
2790428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2791428d7b3dSmrg  need_lib_prefix=no
2792428d7b3dSmrg  need_version=no
2793428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2794428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2795428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2796428d7b3dSmrg  shlibpath_overrides_runpath=yes
2797428d7b3dSmrg  hardcode_into_libs=yes
2798428d7b3dSmrg  # ldd complains unless libraries are executable
2799428d7b3dSmrg  postinstall_cmds='chmod +x $lib'
2800428d7b3dSmrg  ;;
2801428d7b3dSmrg
2802428d7b3dSmrgsunos4*)
2803428d7b3dSmrg  version_type=sunos
2804428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2805428d7b3dSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2806428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2807428d7b3dSmrg  shlibpath_overrides_runpath=yes
2808428d7b3dSmrg  if test "$with_gnu_ld" = yes; then
2809428d7b3dSmrg    need_lib_prefix=no
2810428d7b3dSmrg  fi
2811428d7b3dSmrg  need_version=yes
2812428d7b3dSmrg  ;;
2813428d7b3dSmrg
2814428d7b3dSmrgsysv4 | sysv4.3*)
2815428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2816428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2817428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2818428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2819428d7b3dSmrg  case $host_vendor in
2820428d7b3dSmrg    sni)
2821428d7b3dSmrg      shlibpath_overrides_runpath=no
2822428d7b3dSmrg      need_lib_prefix=no
2823428d7b3dSmrg      runpath_var=LD_RUN_PATH
2824428d7b3dSmrg      ;;
2825428d7b3dSmrg    siemens)
2826428d7b3dSmrg      need_lib_prefix=no
2827428d7b3dSmrg      ;;
2828428d7b3dSmrg    motorola)
2829428d7b3dSmrg      need_lib_prefix=no
2830428d7b3dSmrg      need_version=no
2831428d7b3dSmrg      shlibpath_overrides_runpath=no
2832428d7b3dSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2833428d7b3dSmrg      ;;
2834428d7b3dSmrg  esac
2835428d7b3dSmrg  ;;
2836428d7b3dSmrg
2837428d7b3dSmrgsysv4*MP*)
2838428d7b3dSmrg  if test -d /usr/nec ;then
2839428d7b3dSmrg    version_type=linux # correct to gnu/linux during the next big refactor
2840428d7b3dSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2841428d7b3dSmrg    soname_spec='$libname${shared_ext}.$major'
2842428d7b3dSmrg    shlibpath_var=LD_LIBRARY_PATH
2843428d7b3dSmrg  fi
2844428d7b3dSmrg  ;;
2845428d7b3dSmrg
2846428d7b3dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2847428d7b3dSmrg  version_type=freebsd-elf
2848428d7b3dSmrg  need_lib_prefix=no
2849428d7b3dSmrg  need_version=no
2850428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2851428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2852428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2853428d7b3dSmrg  shlibpath_overrides_runpath=yes
2854428d7b3dSmrg  hardcode_into_libs=yes
2855428d7b3dSmrg  if test "$with_gnu_ld" = yes; then
2856428d7b3dSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2857428d7b3dSmrg  else
2858428d7b3dSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2859428d7b3dSmrg    case $host_os in
2860428d7b3dSmrg      sco3.2v5*)
2861428d7b3dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2862428d7b3dSmrg	;;
2863428d7b3dSmrg    esac
2864428d7b3dSmrg  fi
2865428d7b3dSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
2866428d7b3dSmrg  ;;
2867428d7b3dSmrg
2868428d7b3dSmrgtpf*)
2869428d7b3dSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2870428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2871428d7b3dSmrg  need_lib_prefix=no
2872428d7b3dSmrg  need_version=no
2873428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2874428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2875428d7b3dSmrg  shlibpath_overrides_runpath=no
2876428d7b3dSmrg  hardcode_into_libs=yes
2877428d7b3dSmrg  ;;
2878428d7b3dSmrg
2879428d7b3dSmrguts4*)
2880428d7b3dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2881428d7b3dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2882428d7b3dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2883428d7b3dSmrg  shlibpath_var=LD_LIBRARY_PATH
2884428d7b3dSmrg  ;;
2885428d7b3dSmrg
2886428d7b3dSmrg*)
2887428d7b3dSmrg  dynamic_linker=no
2888428d7b3dSmrg  ;;
2889428d7b3dSmrgesac
2890428d7b3dSmrgAC_MSG_RESULT([$dynamic_linker])
2891428d7b3dSmrgtest "$dynamic_linker" = no && can_build_shared=no
2892428d7b3dSmrg
2893428d7b3dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2894428d7b3dSmrgif test "$GCC" = yes; then
2895428d7b3dSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2896428d7b3dSmrgfi
2897428d7b3dSmrg
2898428d7b3dSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2899428d7b3dSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2900428d7b3dSmrgfi
2901428d7b3dSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2902428d7b3dSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2903428d7b3dSmrgfi
2904428d7b3dSmrg
2905428d7b3dSmrg_LT_DECL([], [variables_saved_for_relink], [1],
2906428d7b3dSmrg    [Variables whose values should be saved in libtool wrapper scripts and
2907428d7b3dSmrg    restored at link time])
2908428d7b3dSmrg_LT_DECL([], [need_lib_prefix], [0],
2909428d7b3dSmrg    [Do we need the "lib" prefix for modules?])
2910428d7b3dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2911428d7b3dSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
2912428d7b3dSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2913428d7b3dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2914428d7b3dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2915428d7b3dSmrg    [Is shlibpath searched before the hard-coded library search path?])
2916428d7b3dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2917428d7b3dSmrg_LT_DECL([], [library_names_spec], [1],
2918428d7b3dSmrg    [[List of archive names.  First name is the real one, the rest are links.
2919428d7b3dSmrg    The last name is the one that the linker finds with -lNAME]])
2920428d7b3dSmrg_LT_DECL([], [soname_spec], [1],
2921428d7b3dSmrg    [[The coded name of the library, if different from the real name]])
2922428d7b3dSmrg_LT_DECL([], [install_override_mode], [1],
2923428d7b3dSmrg    [Permission mode override for installation of shared libraries])
2924428d7b3dSmrg_LT_DECL([], [postinstall_cmds], [2],
2925428d7b3dSmrg    [Command to use after installation of a shared archive])
2926428d7b3dSmrg_LT_DECL([], [postuninstall_cmds], [2],
2927428d7b3dSmrg    [Command to use after uninstallation of a shared archive])
2928428d7b3dSmrg_LT_DECL([], [finish_cmds], [2],
2929428d7b3dSmrg    [Commands used to finish a libtool library installation in a directory])
2930428d7b3dSmrg_LT_DECL([], [finish_eval], [1],
2931428d7b3dSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
2932428d7b3dSmrg    not shown]])
2933428d7b3dSmrg_LT_DECL([], [hardcode_into_libs], [0],
2934428d7b3dSmrg    [Whether we should hardcode library paths into libraries])
2935428d7b3dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2936428d7b3dSmrg    [Compile-time system search path for libraries])
2937428d7b3dSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2938428d7b3dSmrg    [Run-time system search path for libraries])
2939428d7b3dSmrg])# _LT_SYS_DYNAMIC_LINKER
2940428d7b3dSmrg
2941428d7b3dSmrg
2942428d7b3dSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
2943428d7b3dSmrg# --------------------------
2944428d7b3dSmrg# find a file program which can recognize shared library
2945428d7b3dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2946428d7b3dSmrg[m4_require([_LT_DECL_EGREP])dnl
2947428d7b3dSmrgAC_MSG_CHECKING([for $1])
2948428d7b3dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2949428d7b3dSmrg[case $MAGIC_CMD in
2950428d7b3dSmrg[[\\/*] |  ?:[\\/]*])
2951428d7b3dSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2952428d7b3dSmrg  ;;
2953428d7b3dSmrg*)
2954428d7b3dSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2955428d7b3dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2956428d7b3dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2957428d7b3dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2958428d7b3dSmrgdnl not every word.  This closes a longstanding sh security hole.
2959428d7b3dSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2960428d7b3dSmrg  for ac_dir in $ac_dummy; do
2961428d7b3dSmrg    IFS="$lt_save_ifs"
2962428d7b3dSmrg    test -z "$ac_dir" && ac_dir=.
2963428d7b3dSmrg    if test -f $ac_dir/$1; then
2964428d7b3dSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2965428d7b3dSmrg      if test -n "$file_magic_test_file"; then
2966428d7b3dSmrg	case $deplibs_check_method in
2967428d7b3dSmrg	"file_magic "*)
2968428d7b3dSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2969428d7b3dSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2970428d7b3dSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2971428d7b3dSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2972428d7b3dSmrg	    :
2973428d7b3dSmrg	  else
2974428d7b3dSmrg	    cat <<_LT_EOF 1>&2
2975428d7b3dSmrg
2976428d7b3dSmrg*** Warning: the command libtool uses to detect shared libraries,
2977428d7b3dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2978428d7b3dSmrg*** The result is that libtool may fail to recognize shared libraries
2979428d7b3dSmrg*** as such.  This will affect the creation of libtool libraries that
2980428d7b3dSmrg*** depend on shared libraries, but programs linked with such libtool
2981428d7b3dSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2982428d7b3dSmrg*** may want to report the problem to your system manager and/or to
2983428d7b3dSmrg*** bug-libtool@gnu.org
2984428d7b3dSmrg
2985428d7b3dSmrg_LT_EOF
2986428d7b3dSmrg	  fi ;;
2987428d7b3dSmrg	esac
2988428d7b3dSmrg      fi
2989428d7b3dSmrg      break
2990428d7b3dSmrg    fi
2991428d7b3dSmrg  done
2992428d7b3dSmrg  IFS="$lt_save_ifs"
2993428d7b3dSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2994428d7b3dSmrg  ;;
2995428d7b3dSmrgesac])
2996428d7b3dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2997428d7b3dSmrgif test -n "$MAGIC_CMD"; then
2998428d7b3dSmrg  AC_MSG_RESULT($MAGIC_CMD)
2999428d7b3dSmrgelse
3000428d7b3dSmrg  AC_MSG_RESULT(no)
3001428d7b3dSmrgfi
3002428d7b3dSmrg_LT_DECL([], [MAGIC_CMD], [0],
3003428d7b3dSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3004428d7b3dSmrg])# _LT_PATH_TOOL_PREFIX
3005428d7b3dSmrg
3006428d7b3dSmrg# Old name:
3007428d7b3dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3008428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
3009428d7b3dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3010428d7b3dSmrg
3011428d7b3dSmrg
3012428d7b3dSmrg# _LT_PATH_MAGIC
3013428d7b3dSmrg# --------------
3014428d7b3dSmrg# find a file program which can recognize a shared library
3015428d7b3dSmrgm4_defun([_LT_PATH_MAGIC],
3016428d7b3dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3017428d7b3dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3018428d7b3dSmrg  if test -n "$ac_tool_prefix"; then
3019428d7b3dSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3020428d7b3dSmrg  else
3021428d7b3dSmrg    MAGIC_CMD=:
3022428d7b3dSmrg  fi
3023428d7b3dSmrgfi
3024428d7b3dSmrg])# _LT_PATH_MAGIC
3025428d7b3dSmrg
3026428d7b3dSmrg
3027428d7b3dSmrg# LT_PATH_LD
3028428d7b3dSmrg# ----------
3029428d7b3dSmrg# find the pathname to the GNU or non-GNU linker
3030428d7b3dSmrgAC_DEFUN([LT_PATH_LD],
3031428d7b3dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3032428d7b3dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3033428d7b3dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3034428d7b3dSmrgm4_require([_LT_DECL_SED])dnl
3035428d7b3dSmrgm4_require([_LT_DECL_EGREP])dnl
3036428d7b3dSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3037428d7b3dSmrg
3038428d7b3dSmrgAC_ARG_WITH([gnu-ld],
3039428d7b3dSmrg    [AS_HELP_STRING([--with-gnu-ld],
3040428d7b3dSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3041428d7b3dSmrg    [test "$withval" = no || with_gnu_ld=yes],
3042428d7b3dSmrg    [with_gnu_ld=no])dnl
3043428d7b3dSmrg
3044428d7b3dSmrgac_prog=ld
3045428d7b3dSmrgif test "$GCC" = yes; then
3046428d7b3dSmrg  # Check if gcc -print-prog-name=ld gives a path.
3047428d7b3dSmrg  AC_MSG_CHECKING([for ld used by $CC])
3048428d7b3dSmrg  case $host in
3049428d7b3dSmrg  *-*-mingw*)
3050428d7b3dSmrg    # gcc leaves a trailing carriage return which upsets mingw
3051428d7b3dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3052428d7b3dSmrg  *)
3053428d7b3dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3054428d7b3dSmrg  esac
3055428d7b3dSmrg  case $ac_prog in
3056428d7b3dSmrg    # Accept absolute paths.
3057428d7b3dSmrg    [[\\/]]* | ?:[[\\/]]*)
3058428d7b3dSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3059428d7b3dSmrg      # Canonicalize the pathname of ld
3060428d7b3dSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3061428d7b3dSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3062428d7b3dSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3063428d7b3dSmrg      done
3064428d7b3dSmrg      test -z "$LD" && LD="$ac_prog"
3065428d7b3dSmrg      ;;
3066428d7b3dSmrg  "")
3067428d7b3dSmrg    # If it fails, then pretend we aren't using GCC.
3068428d7b3dSmrg    ac_prog=ld
3069428d7b3dSmrg    ;;
3070428d7b3dSmrg  *)
3071428d7b3dSmrg    # If it is relative, then search for the first ld in PATH.
3072428d7b3dSmrg    with_gnu_ld=unknown
3073428d7b3dSmrg    ;;
3074428d7b3dSmrg  esac
3075428d7b3dSmrgelif test "$with_gnu_ld" = yes; then
3076428d7b3dSmrg  AC_MSG_CHECKING([for GNU ld])
3077428d7b3dSmrgelse
3078428d7b3dSmrg  AC_MSG_CHECKING([for non-GNU ld])
3079428d7b3dSmrgfi
3080428d7b3dSmrgAC_CACHE_VAL(lt_cv_path_LD,
3081428d7b3dSmrg[if test -z "$LD"; then
3082428d7b3dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3083428d7b3dSmrg  for ac_dir in $PATH; do
3084428d7b3dSmrg    IFS="$lt_save_ifs"
3085428d7b3dSmrg    test -z "$ac_dir" && ac_dir=.
3086428d7b3dSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3087428d7b3dSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
3088428d7b3dSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3089428d7b3dSmrg      # but apparently some variants of GNU ld only accept -v.
3090428d7b3dSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3091428d7b3dSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3092428d7b3dSmrg      *GNU* | *'with BFD'*)
3093428d7b3dSmrg	test "$with_gnu_ld" != no && break
3094428d7b3dSmrg	;;
3095428d7b3dSmrg      *)
3096428d7b3dSmrg	test "$with_gnu_ld" != yes && break
3097428d7b3dSmrg	;;
3098428d7b3dSmrg      esac
3099428d7b3dSmrg    fi
3100428d7b3dSmrg  done
3101428d7b3dSmrg  IFS="$lt_save_ifs"
3102428d7b3dSmrgelse
3103428d7b3dSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3104428d7b3dSmrgfi])
3105428d7b3dSmrgLD="$lt_cv_path_LD"
3106428d7b3dSmrgif test -n "$LD"; then
3107428d7b3dSmrg  AC_MSG_RESULT($LD)
3108428d7b3dSmrgelse
3109428d7b3dSmrg  AC_MSG_RESULT(no)
3110428d7b3dSmrgfi
3111428d7b3dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3112428d7b3dSmrg_LT_PATH_LD_GNU
3113428d7b3dSmrgAC_SUBST([LD])
3114428d7b3dSmrg
3115428d7b3dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3116428d7b3dSmrg])# LT_PATH_LD
3117428d7b3dSmrg
3118428d7b3dSmrg# Old names:
3119428d7b3dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3120428d7b3dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3121428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
3122428d7b3dSmrgdnl AC_DEFUN([AM_PROG_LD], [])
3123428d7b3dSmrgdnl AC_DEFUN([AC_PROG_LD], [])
3124428d7b3dSmrg
3125428d7b3dSmrg
3126428d7b3dSmrg# _LT_PATH_LD_GNU
3127428d7b3dSmrg#- --------------
3128428d7b3dSmrgm4_defun([_LT_PATH_LD_GNU],
3129428d7b3dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3130428d7b3dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3131428d7b3dSmrgcase `$LD -v 2>&1 </dev/null` in
3132428d7b3dSmrg*GNU* | *'with BFD'*)
3133428d7b3dSmrg  lt_cv_prog_gnu_ld=yes
3134428d7b3dSmrg  ;;
3135428d7b3dSmrg*)
3136428d7b3dSmrg  lt_cv_prog_gnu_ld=no
3137428d7b3dSmrg  ;;
3138428d7b3dSmrgesac])
3139428d7b3dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3140428d7b3dSmrg])# _LT_PATH_LD_GNU
3141428d7b3dSmrg
3142428d7b3dSmrg
3143428d7b3dSmrg# _LT_CMD_RELOAD
3144428d7b3dSmrg# --------------
3145428d7b3dSmrg# find reload flag for linker
3146428d7b3dSmrg#   -- PORTME Some linkers may need a different reload flag.
3147428d7b3dSmrgm4_defun([_LT_CMD_RELOAD],
3148428d7b3dSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
3149428d7b3dSmrg  lt_cv_ld_reload_flag,
3150428d7b3dSmrg  [lt_cv_ld_reload_flag='-r'])
3151428d7b3dSmrgreload_flag=$lt_cv_ld_reload_flag
3152428d7b3dSmrgcase $reload_flag in
3153428d7b3dSmrg"" | " "*) ;;
3154428d7b3dSmrg*) reload_flag=" $reload_flag" ;;
3155428d7b3dSmrgesac
3156428d7b3dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3157428d7b3dSmrgcase $host_os in
3158428d7b3dSmrg  cygwin* | mingw* | pw32* | cegcc*)
3159428d7b3dSmrg    if test "$GCC" != yes; then
3160428d7b3dSmrg      reload_cmds=false
3161428d7b3dSmrg    fi
3162428d7b3dSmrg    ;;
3163428d7b3dSmrg  darwin*)
3164428d7b3dSmrg    if test "$GCC" = yes; then
3165428d7b3dSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3166428d7b3dSmrg    else
3167428d7b3dSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3168428d7b3dSmrg    fi
3169428d7b3dSmrg    ;;
3170428d7b3dSmrgesac
3171428d7b3dSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3172428d7b3dSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
3173428d7b3dSmrg])# _LT_CMD_RELOAD
3174428d7b3dSmrg
3175428d7b3dSmrg
3176428d7b3dSmrg# _LT_CHECK_MAGIC_METHOD
3177428d7b3dSmrg# ----------------------
3178428d7b3dSmrg# how to check for library dependencies
3179428d7b3dSmrg#  -- PORTME fill in with the dynamic library characteristics
3180428d7b3dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
3181428d7b3dSmrg[m4_require([_LT_DECL_EGREP])
3182428d7b3dSmrgm4_require([_LT_DECL_OBJDUMP])
3183428d7b3dSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
3184428d7b3dSmrglt_cv_deplibs_check_method,
3185428d7b3dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3186428d7b3dSmrglt_cv_file_magic_test_file=
3187428d7b3dSmrglt_cv_deplibs_check_method='unknown'
3188428d7b3dSmrg# Need to set the preceding variable on all platforms that support
3189428d7b3dSmrg# interlibrary dependencies.
3190428d7b3dSmrg# 'none' -- dependencies not supported.
3191428d7b3dSmrg# `unknown' -- same as none, but documents that we really don't know.
3192428d7b3dSmrg# 'pass_all' -- all dependencies passed with no checks.
3193428d7b3dSmrg# 'test_compile' -- check by making test program.
3194428d7b3dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3195428d7b3dSmrg# which responds to the $file_magic_cmd with a given extended regex.
3196428d7b3dSmrg# If you have `file' or equivalent on your system and you're not sure
3197428d7b3dSmrg# whether `pass_all' will *always* work, you probably want this one.
3198428d7b3dSmrg
3199428d7b3dSmrgcase $host_os in
3200428d7b3dSmrgaix[[4-9]]*)
3201428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3202428d7b3dSmrg  ;;
3203428d7b3dSmrg
3204428d7b3dSmrgbeos*)
3205428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3206428d7b3dSmrg  ;;
3207428d7b3dSmrg
3208428d7b3dSmrgbsdi[[45]]*)
3209428d7b3dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3210428d7b3dSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3211428d7b3dSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3212428d7b3dSmrg  ;;
3213428d7b3dSmrg
3214428d7b3dSmrgcygwin*)
3215428d7b3dSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3216428d7b3dSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3217428d7b3dSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3218428d7b3dSmrg  ;;
3219428d7b3dSmrg
3220428d7b3dSmrgmingw* | pw32*)
3221428d7b3dSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3222428d7b3dSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3223428d7b3dSmrg  # unless we find 'file', for example because we are cross-compiling.
3224428d7b3dSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3225428d7b3dSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3226428d7b3dSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3227428d7b3dSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3228428d7b3dSmrg  else
3229428d7b3dSmrg    # Keep this pattern in sync with the one in func_win32_libid.
3230428d7b3dSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3231428d7b3dSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3232428d7b3dSmrg  fi
3233428d7b3dSmrg  ;;
3234428d7b3dSmrg
3235428d7b3dSmrgcegcc*)
3236428d7b3dSmrg  # use the weaker test based on 'objdump'. See mingw*.
3237428d7b3dSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3238428d7b3dSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3239428d7b3dSmrg  ;;
3240428d7b3dSmrg
3241428d7b3dSmrgdarwin* | rhapsody*)
3242428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3243428d7b3dSmrg  ;;
3244428d7b3dSmrg
3245428d7b3dSmrgfreebsd* | dragonfly*)
3246428d7b3dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3247428d7b3dSmrg    case $host_cpu in
3248428d7b3dSmrg    i*86 )
3249428d7b3dSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3250428d7b3dSmrg      # Let's accept both of them until this is cleared up.
3251428d7b3dSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3252428d7b3dSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3253428d7b3dSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3254428d7b3dSmrg      ;;
3255428d7b3dSmrg    esac
3256428d7b3dSmrg  else
3257428d7b3dSmrg    lt_cv_deplibs_check_method=pass_all
3258428d7b3dSmrg  fi
3259428d7b3dSmrg  ;;
3260428d7b3dSmrg
3261428d7b3dSmrghaiku*)
3262428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3263428d7b3dSmrg  ;;
3264428d7b3dSmrg
3265428d7b3dSmrghpux10.20* | hpux11*)
3266428d7b3dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3267428d7b3dSmrg  case $host_cpu in
3268428d7b3dSmrg  ia64*)
3269428d7b3dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3270428d7b3dSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3271428d7b3dSmrg    ;;
3272428d7b3dSmrg  hppa*64*)
3273428d7b3dSmrg    [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]']
3274428d7b3dSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3275428d7b3dSmrg    ;;
3276428d7b3dSmrg  *)
3277428d7b3dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3278428d7b3dSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3279428d7b3dSmrg    ;;
3280428d7b3dSmrg  esac
3281428d7b3dSmrg  ;;
3282428d7b3dSmrg
3283428d7b3dSmrginterix[[3-9]]*)
3284428d7b3dSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3285428d7b3dSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3286428d7b3dSmrg  ;;
3287428d7b3dSmrg
3288428d7b3dSmrgirix5* | irix6* | nonstopux*)
3289428d7b3dSmrg  case $LD in
3290428d7b3dSmrg  *-32|*"-32 ") libmagic=32-bit;;
3291428d7b3dSmrg  *-n32|*"-n32 ") libmagic=N32;;
3292428d7b3dSmrg  *-64|*"-64 ") libmagic=64-bit;;
3293428d7b3dSmrg  *) libmagic=never-match;;
3294428d7b3dSmrg  esac
3295428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3296428d7b3dSmrg  ;;
3297428d7b3dSmrg
3298428d7b3dSmrg# This must be glibc/ELF.
3299428d7b3dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3300428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3301428d7b3dSmrg  ;;
3302428d7b3dSmrg
3303428d7b3dSmrgnetbsd* | netbsdelf*-gnu)
3304428d7b3dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3305428d7b3dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3306428d7b3dSmrg  else
3307428d7b3dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3308428d7b3dSmrg  fi
3309428d7b3dSmrg  ;;
3310428d7b3dSmrg
3311428d7b3dSmrgnewos6*)
3312428d7b3dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3313428d7b3dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3314428d7b3dSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3315428d7b3dSmrg  ;;
3316428d7b3dSmrg
3317428d7b3dSmrg*nto* | *qnx*)
3318428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3319428d7b3dSmrg  ;;
3320428d7b3dSmrg
3321428d7b3dSmrgopenbsd*)
3322428d7b3dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3323428d7b3dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3324428d7b3dSmrg  else
3325428d7b3dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3326428d7b3dSmrg  fi
3327428d7b3dSmrg  ;;
3328428d7b3dSmrg
3329428d7b3dSmrgosf3* | osf4* | osf5*)
3330428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3331428d7b3dSmrg  ;;
3332428d7b3dSmrg
3333428d7b3dSmrgrdos*)
3334428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3335428d7b3dSmrg  ;;
3336428d7b3dSmrg
3337428d7b3dSmrgsolaris*)
3338428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3339428d7b3dSmrg  ;;
3340428d7b3dSmrg
3341428d7b3dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3342428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3343428d7b3dSmrg  ;;
3344428d7b3dSmrg
3345428d7b3dSmrgsysv4 | sysv4.3*)
3346428d7b3dSmrg  case $host_vendor in
3347428d7b3dSmrg  motorola)
3348428d7b3dSmrg    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]]'
3349428d7b3dSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3350428d7b3dSmrg    ;;
3351428d7b3dSmrg  ncr)
3352428d7b3dSmrg    lt_cv_deplibs_check_method=pass_all
3353428d7b3dSmrg    ;;
3354428d7b3dSmrg  sequent)
3355428d7b3dSmrg    lt_cv_file_magic_cmd='/bin/file'
3356428d7b3dSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3357428d7b3dSmrg    ;;
3358428d7b3dSmrg  sni)
3359428d7b3dSmrg    lt_cv_file_magic_cmd='/bin/file'
3360428d7b3dSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3361428d7b3dSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3362428d7b3dSmrg    ;;
3363428d7b3dSmrg  siemens)
3364428d7b3dSmrg    lt_cv_deplibs_check_method=pass_all
3365428d7b3dSmrg    ;;
3366428d7b3dSmrg  pc)
3367428d7b3dSmrg    lt_cv_deplibs_check_method=pass_all
3368428d7b3dSmrg    ;;
3369428d7b3dSmrg  esac
3370428d7b3dSmrg  ;;
3371428d7b3dSmrg
3372428d7b3dSmrgtpf*)
3373428d7b3dSmrg  lt_cv_deplibs_check_method=pass_all
3374428d7b3dSmrg  ;;
3375428d7b3dSmrgesac
3376428d7b3dSmrg])
3377428d7b3dSmrg
3378428d7b3dSmrgfile_magic_glob=
3379428d7b3dSmrgwant_nocaseglob=no
3380428d7b3dSmrgif test "$build" = "$host"; then
3381428d7b3dSmrg  case $host_os in
3382428d7b3dSmrg  mingw* | pw32*)
3383428d7b3dSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3384428d7b3dSmrg      want_nocaseglob=yes
3385428d7b3dSmrg    else
3386428d7b3dSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3387428d7b3dSmrg    fi
3388428d7b3dSmrg    ;;
3389428d7b3dSmrg  esac
3390428d7b3dSmrgfi
3391428d7b3dSmrg
3392428d7b3dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3393428d7b3dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3394428d7b3dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3395428d7b3dSmrg
3396428d7b3dSmrg_LT_DECL([], [deplibs_check_method], [1],
3397428d7b3dSmrg    [Method to check whether dependent libraries are shared objects])
3398428d7b3dSmrg_LT_DECL([], [file_magic_cmd], [1],
3399428d7b3dSmrg    [Command to use when deplibs_check_method = "file_magic"])
3400428d7b3dSmrg_LT_DECL([], [file_magic_glob], [1],
3401428d7b3dSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
3402428d7b3dSmrg_LT_DECL([], [want_nocaseglob], [1],
3403428d7b3dSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3404428d7b3dSmrg])# _LT_CHECK_MAGIC_METHOD
3405428d7b3dSmrg
3406428d7b3dSmrg
3407428d7b3dSmrg# LT_PATH_NM
3408428d7b3dSmrg# ----------
3409428d7b3dSmrg# find the pathname to a BSD- or MS-compatible name lister
3410428d7b3dSmrgAC_DEFUN([LT_PATH_NM],
3411428d7b3dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3412428d7b3dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3413428d7b3dSmrg[if test -n "$NM"; then
3414428d7b3dSmrg  # Let the user override the test.
3415428d7b3dSmrg  lt_cv_path_NM="$NM"
3416428d7b3dSmrgelse
3417428d7b3dSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3418428d7b3dSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3419428d7b3dSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3420428d7b3dSmrg  fi
3421428d7b3dSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3422428d7b3dSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3423428d7b3dSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3424428d7b3dSmrg      IFS="$lt_save_ifs"
3425428d7b3dSmrg      test -z "$ac_dir" && ac_dir=.
3426428d7b3dSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3427428d7b3dSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3428428d7b3dSmrg	# Check to see if the nm accepts a BSD-compat flag.
3429428d7b3dSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3430428d7b3dSmrg	#   nm: unknown option "B" ignored
3431428d7b3dSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3432428d7b3dSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3433428d7b3dSmrg	*/dev/null* | *'Invalid file or object type'*)
3434428d7b3dSmrg	  lt_cv_path_NM="$tmp_nm -B"
3435428d7b3dSmrg	  break
3436428d7b3dSmrg	  ;;
3437428d7b3dSmrg	*)
3438428d7b3dSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3439428d7b3dSmrg	  */dev/null*)
3440428d7b3dSmrg	    lt_cv_path_NM="$tmp_nm -p"
3441428d7b3dSmrg	    break
3442428d7b3dSmrg	    ;;
3443428d7b3dSmrg	  *)
3444428d7b3dSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3445428d7b3dSmrg	    continue # so that we can try to find one that supports BSD flags
3446428d7b3dSmrg	    ;;
3447428d7b3dSmrg	  esac
3448428d7b3dSmrg	  ;;
3449428d7b3dSmrg	esac
3450428d7b3dSmrg      fi
3451428d7b3dSmrg    done
3452428d7b3dSmrg    IFS="$lt_save_ifs"
3453428d7b3dSmrg  done
3454428d7b3dSmrg  : ${lt_cv_path_NM=no}
3455428d7b3dSmrgfi])
3456428d7b3dSmrgif test "$lt_cv_path_NM" != "no"; then
3457428d7b3dSmrg  NM="$lt_cv_path_NM"
3458428d7b3dSmrgelse
3459428d7b3dSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3460428d7b3dSmrg  if test -n "$DUMPBIN"; then :
3461428d7b3dSmrg    # Let the user override the test.
3462428d7b3dSmrg  else
3463428d7b3dSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3464428d7b3dSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3465428d7b3dSmrg    *COFF*)
3466428d7b3dSmrg      DUMPBIN="$DUMPBIN -symbols"
3467428d7b3dSmrg      ;;
3468428d7b3dSmrg    *)
3469428d7b3dSmrg      DUMPBIN=:
3470428d7b3dSmrg      ;;
3471428d7b3dSmrg    esac
3472428d7b3dSmrg  fi
3473428d7b3dSmrg  AC_SUBST([DUMPBIN])
3474428d7b3dSmrg  if test "$DUMPBIN" != ":"; then
3475428d7b3dSmrg    NM="$DUMPBIN"
3476428d7b3dSmrg  fi
3477428d7b3dSmrgfi
3478428d7b3dSmrgtest -z "$NM" && NM=nm
3479428d7b3dSmrgAC_SUBST([NM])
3480428d7b3dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3481428d7b3dSmrg
3482428d7b3dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3483428d7b3dSmrg  [lt_cv_nm_interface="BSD nm"
3484428d7b3dSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
3485428d7b3dSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3486428d7b3dSmrg  (eval "$ac_compile" 2>conftest.err)
3487428d7b3dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3488428d7b3dSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3489428d7b3dSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3490428d7b3dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3491428d7b3dSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3492428d7b3dSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3493428d7b3dSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3494428d7b3dSmrg    lt_cv_nm_interface="MS dumpbin"
3495428d7b3dSmrg  fi
3496428d7b3dSmrg  rm -f conftest*])
3497428d7b3dSmrg])# LT_PATH_NM
3498428d7b3dSmrg
3499428d7b3dSmrg# Old names:
3500428d7b3dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3501428d7b3dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3502428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
3503428d7b3dSmrgdnl AC_DEFUN([AM_PROG_NM], [])
3504428d7b3dSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3505428d7b3dSmrg
3506428d7b3dSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3507428d7b3dSmrg# --------------------------------
3508428d7b3dSmrg# how to determine the name of the shared library
3509428d7b3dSmrg# associated with a specific link library.
3510428d7b3dSmrg#  -- PORTME fill in with the dynamic library characteristics
3511428d7b3dSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3512428d7b3dSmrg[m4_require([_LT_DECL_EGREP])
3513428d7b3dSmrgm4_require([_LT_DECL_OBJDUMP])
3514428d7b3dSmrgm4_require([_LT_DECL_DLLTOOL])
3515428d7b3dSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
3516428d7b3dSmrglt_cv_sharedlib_from_linklib_cmd,
3517428d7b3dSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
3518428d7b3dSmrg
3519428d7b3dSmrgcase $host_os in
3520428d7b3dSmrgcygwin* | mingw* | pw32* | cegcc*)
3521428d7b3dSmrg  # two different shell functions defined in ltmain.sh
3522428d7b3dSmrg  # decide which to use based on capabilities of $DLLTOOL
3523428d7b3dSmrg  case `$DLLTOOL --help 2>&1` in
3524428d7b3dSmrg  *--identify-strict*)
3525428d7b3dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3526428d7b3dSmrg    ;;
3527428d7b3dSmrg  *)
3528428d7b3dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3529428d7b3dSmrg    ;;
3530428d7b3dSmrg  esac
3531428d7b3dSmrg  ;;
3532428d7b3dSmrg*)
3533428d7b3dSmrg  # fallback: assume linklib IS sharedlib
3534428d7b3dSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3535428d7b3dSmrg  ;;
3536428d7b3dSmrgesac
3537428d7b3dSmrg])
3538428d7b3dSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3539428d7b3dSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3540428d7b3dSmrg
3541428d7b3dSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3542428d7b3dSmrg    [Command to associate shared and link libraries])
3543428d7b3dSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3544428d7b3dSmrg
3545428d7b3dSmrg
3546428d7b3dSmrg# _LT_PATH_MANIFEST_TOOL
3547428d7b3dSmrg# ----------------------
3548428d7b3dSmrg# locate the manifest tool
3549428d7b3dSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
3550428d7b3dSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3551428d7b3dSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3552428d7b3dSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3553428d7b3dSmrg  [lt_cv_path_mainfest_tool=no
3554428d7b3dSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3555428d7b3dSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3556428d7b3dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3557428d7b3dSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3558428d7b3dSmrg    lt_cv_path_mainfest_tool=yes
3559428d7b3dSmrg  fi
3560428d7b3dSmrg  rm -f conftest*])
3561428d7b3dSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
3562428d7b3dSmrg  MANIFEST_TOOL=:
3563428d7b3dSmrgfi
3564428d7b3dSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3565428d7b3dSmrg])# _LT_PATH_MANIFEST_TOOL
3566428d7b3dSmrg
3567428d7b3dSmrg
3568428d7b3dSmrg# LT_LIB_M
3569428d7b3dSmrg# --------
3570428d7b3dSmrg# check for math library
3571428d7b3dSmrgAC_DEFUN([LT_LIB_M],
3572428d7b3dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3573428d7b3dSmrgLIBM=
3574428d7b3dSmrgcase $host in
3575428d7b3dSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3576428d7b3dSmrg  # These system don't have libm, or don't need it
3577428d7b3dSmrg  ;;
3578428d7b3dSmrg*-ncr-sysv4.3*)
3579428d7b3dSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3580428d7b3dSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3581428d7b3dSmrg  ;;
3582428d7b3dSmrg*)
3583428d7b3dSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3584428d7b3dSmrg  ;;
3585428d7b3dSmrgesac
3586428d7b3dSmrgAC_SUBST([LIBM])
3587428d7b3dSmrg])# LT_LIB_M
3588428d7b3dSmrg
3589428d7b3dSmrg# Old name:
3590428d7b3dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3591428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
3592428d7b3dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3593428d7b3dSmrg
3594428d7b3dSmrg
3595428d7b3dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3596428d7b3dSmrg# -------------------------------
3597428d7b3dSmrgm4_defun([_LT_COMPILER_NO_RTTI],
3598428d7b3dSmrg[m4_require([_LT_TAG_COMPILER])dnl
3599428d7b3dSmrg
3600428d7b3dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3601428d7b3dSmrg
3602428d7b3dSmrgif test "$GCC" = yes; then
3603428d7b3dSmrg  case $cc_basename in
3604428d7b3dSmrg  nvcc*)
3605428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3606428d7b3dSmrg  *)
3607428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3608428d7b3dSmrg  esac
3609428d7b3dSmrg
3610428d7b3dSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3611428d7b3dSmrg    lt_cv_prog_compiler_rtti_exceptions,
3612428d7b3dSmrg    [-fno-rtti -fno-exceptions], [],
3613428d7b3dSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3614428d7b3dSmrgfi
3615428d7b3dSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3616428d7b3dSmrg	[Compiler flag to turn off builtin functions])
3617428d7b3dSmrg])# _LT_COMPILER_NO_RTTI
3618428d7b3dSmrg
3619428d7b3dSmrg
3620428d7b3dSmrg# _LT_CMD_GLOBAL_SYMBOLS
3621428d7b3dSmrg# ----------------------
3622428d7b3dSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3623428d7b3dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3624428d7b3dSmrgAC_REQUIRE([AC_PROG_CC])dnl
3625428d7b3dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
3626428d7b3dSmrgAC_REQUIRE([LT_PATH_NM])dnl
3627428d7b3dSmrgAC_REQUIRE([LT_PATH_LD])dnl
3628428d7b3dSmrgm4_require([_LT_DECL_SED])dnl
3629428d7b3dSmrgm4_require([_LT_DECL_EGREP])dnl
3630428d7b3dSmrgm4_require([_LT_TAG_COMPILER])dnl
3631428d7b3dSmrg
3632428d7b3dSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3633428d7b3dSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3634428d7b3dSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3635428d7b3dSmrg[
3636428d7b3dSmrg# These are sane defaults that work on at least a few old systems.
3637428d7b3dSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3638428d7b3dSmrg
3639428d7b3dSmrg# Character class describing NM global symbol codes.
3640428d7b3dSmrgsymcode='[[BCDEGRST]]'
3641428d7b3dSmrg
3642428d7b3dSmrg# Regexp to match symbols that can be accessed directly from C.
3643428d7b3dSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3644428d7b3dSmrg
3645428d7b3dSmrg# Define system-specific variables.
3646428d7b3dSmrgcase $host_os in
3647428d7b3dSmrgaix*)
3648428d7b3dSmrg  symcode='[[BCDT]]'
3649428d7b3dSmrg  ;;
3650428d7b3dSmrgcygwin* | mingw* | pw32* | cegcc*)
3651428d7b3dSmrg  symcode='[[ABCDGISTW]]'
3652428d7b3dSmrg  ;;
3653428d7b3dSmrghpux*)
3654428d7b3dSmrg  if test "$host_cpu" = ia64; then
3655428d7b3dSmrg    symcode='[[ABCDEGRST]]'
3656428d7b3dSmrg  fi
3657428d7b3dSmrg  ;;
3658428d7b3dSmrgirix* | nonstopux*)
3659428d7b3dSmrg  symcode='[[BCDEGRST]]'
3660428d7b3dSmrg  ;;
3661428d7b3dSmrgosf*)
3662428d7b3dSmrg  symcode='[[BCDEGQRST]]'
3663428d7b3dSmrg  ;;
3664428d7b3dSmrgsolaris*)
3665428d7b3dSmrg  symcode='[[BDRT]]'
3666428d7b3dSmrg  ;;
3667428d7b3dSmrgsco3.2v5*)
3668428d7b3dSmrg  symcode='[[DT]]'
3669428d7b3dSmrg  ;;
3670428d7b3dSmrgsysv4.2uw2*)
3671428d7b3dSmrg  symcode='[[DT]]'
3672428d7b3dSmrg  ;;
3673428d7b3dSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3674428d7b3dSmrg  symcode='[[ABDT]]'
3675428d7b3dSmrg  ;;
3676428d7b3dSmrgsysv4)
3677428d7b3dSmrg  symcode='[[DFNSTU]]'
3678428d7b3dSmrg  ;;
3679428d7b3dSmrgesac
3680428d7b3dSmrg
3681428d7b3dSmrg# If we're using GNU nm, then use its standard symbol codes.
3682428d7b3dSmrgcase `$NM -V 2>&1` in
3683428d7b3dSmrg*GNU* | *'with BFD'*)
3684428d7b3dSmrg  symcode='[[ABCDGIRSTW]]' ;;
3685428d7b3dSmrgesac
3686428d7b3dSmrg
3687428d7b3dSmrg# Transform an extracted symbol line into a proper C declaration.
3688428d7b3dSmrg# Some systems (esp. on ia64) link data and code symbols differently,
3689428d7b3dSmrg# so use this general approach.
3690428d7b3dSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3691428d7b3dSmrg
3692428d7b3dSmrg# Transform an extracted symbol line into symbol name and symbol address
3693428d7b3dSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3694428d7b3dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
3695428d7b3dSmrg
3696428d7b3dSmrg# Handle CRLF in mingw tool chain
3697428d7b3dSmrgopt_cr=
3698428d7b3dSmrgcase $build_os in
3699428d7b3dSmrgmingw*)
3700428d7b3dSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3701428d7b3dSmrg  ;;
3702428d7b3dSmrgesac
3703428d7b3dSmrg
3704428d7b3dSmrg# Try without a prefix underscore, then with it.
3705428d7b3dSmrgfor ac_symprfx in "" "_"; do
3706428d7b3dSmrg
3707428d7b3dSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3708428d7b3dSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3709428d7b3dSmrg
3710428d7b3dSmrg  # Write the raw and C identifiers.
3711428d7b3dSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3712428d7b3dSmrg    # Fake it for dumpbin and say T for any non-static function
3713428d7b3dSmrg    # and D for any global variable.
3714428d7b3dSmrg    # Also find C++ and __fastcall symbols from MSVC++,
3715428d7b3dSmrg    # which start with @ or ?.
3716428d7b3dSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3717428d7b3dSmrg"     {last_section=section; section=\$ 3};"\
3718428d7b3dSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3719428d7b3dSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3720428d7b3dSmrg"     \$ 0!~/External *\|/{next};"\
3721428d7b3dSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3722428d7b3dSmrg"     {if(hide[section]) next};"\
3723428d7b3dSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3724428d7b3dSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3725428d7b3dSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3726428d7b3dSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3727428d7b3dSmrg"     ' prfx=^$ac_symprfx]"
3728428d7b3dSmrg  else
3729428d7b3dSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3730428d7b3dSmrg  fi
3731428d7b3dSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3732428d7b3dSmrg
3733428d7b3dSmrg  # Check to see that the pipe works correctly.
3734428d7b3dSmrg  pipe_works=no
3735428d7b3dSmrg
3736428d7b3dSmrg  rm -f conftest*
3737428d7b3dSmrg  cat > conftest.$ac_ext <<_LT_EOF
3738428d7b3dSmrg#ifdef __cplusplus
3739428d7b3dSmrgextern "C" {
3740428d7b3dSmrg#endif
3741428d7b3dSmrgchar nm_test_var;
3742428d7b3dSmrgvoid nm_test_func(void);
3743428d7b3dSmrgvoid nm_test_func(void){}
3744428d7b3dSmrg#ifdef __cplusplus
3745428d7b3dSmrg}
3746428d7b3dSmrg#endif
3747428d7b3dSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
3748428d7b3dSmrg_LT_EOF
3749428d7b3dSmrg
3750428d7b3dSmrg  if AC_TRY_EVAL(ac_compile); then
3751428d7b3dSmrg    # Now try to grab the symbols.
3752428d7b3dSmrg    nlist=conftest.nm
3753428d7b3dSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3754428d7b3dSmrg      # Try sorting and uniquifying the output.
3755428d7b3dSmrg      if sort "$nlist" | uniq > "$nlist"T; then
3756428d7b3dSmrg	mv -f "$nlist"T "$nlist"
3757428d7b3dSmrg      else
3758428d7b3dSmrg	rm -f "$nlist"T
3759428d7b3dSmrg      fi
3760428d7b3dSmrg
3761428d7b3dSmrg      # Make sure that we snagged all the symbols we need.
3762428d7b3dSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3763428d7b3dSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3764428d7b3dSmrg	  cat <<_LT_EOF > conftest.$ac_ext
3765428d7b3dSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
3766428d7b3dSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3767428d7b3dSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
3768428d7b3dSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
3769428d7b3dSmrg# define LT@&t@_DLSYM_CONST
3770428d7b3dSmrg#elif defined(__osf__)
3771428d7b3dSmrg/* This system does not cope well with relocations in const data.  */
3772428d7b3dSmrg# define LT@&t@_DLSYM_CONST
3773428d7b3dSmrg#else
3774428d7b3dSmrg# define LT@&t@_DLSYM_CONST const
3775428d7b3dSmrg#endif
3776428d7b3dSmrg
3777428d7b3dSmrg#ifdef __cplusplus
3778428d7b3dSmrgextern "C" {
3779428d7b3dSmrg#endif
3780428d7b3dSmrg
3781428d7b3dSmrg_LT_EOF
3782428d7b3dSmrg	  # Now generate the symbol file.
3783428d7b3dSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3784428d7b3dSmrg
3785428d7b3dSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
3786428d7b3dSmrg
3787428d7b3dSmrg/* The mapping between symbol names and symbols.  */
3788428d7b3dSmrgLT@&t@_DLSYM_CONST struct {
3789428d7b3dSmrg  const char *name;
3790428d7b3dSmrg  void       *address;
3791428d7b3dSmrg}
3792428d7b3dSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3793428d7b3dSmrg{
3794428d7b3dSmrg  { "@PROGRAM@", (void *) 0 },
3795428d7b3dSmrg_LT_EOF
3796428d7b3dSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3797428d7b3dSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3798428d7b3dSmrg  {0, (void *) 0}
3799428d7b3dSmrg};
3800428d7b3dSmrg
3801428d7b3dSmrg/* This works around a problem in FreeBSD linker */
3802428d7b3dSmrg#ifdef FREEBSD_WORKAROUND
3803428d7b3dSmrgstatic const void *lt_preloaded_setup() {
3804428d7b3dSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
3805428d7b3dSmrg}
3806428d7b3dSmrg#endif
3807428d7b3dSmrg
3808428d7b3dSmrg#ifdef __cplusplus
3809428d7b3dSmrg}
3810428d7b3dSmrg#endif
3811428d7b3dSmrg_LT_EOF
3812428d7b3dSmrg	  # Now try linking the two files.
3813428d7b3dSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
3814428d7b3dSmrg	  lt_globsym_save_LIBS=$LIBS
3815428d7b3dSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
3816428d7b3dSmrg	  LIBS="conftstm.$ac_objext"
3817428d7b3dSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3818428d7b3dSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3819428d7b3dSmrg	    pipe_works=yes
3820428d7b3dSmrg	  fi
3821428d7b3dSmrg	  LIBS=$lt_globsym_save_LIBS
3822428d7b3dSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
3823428d7b3dSmrg	else
3824428d7b3dSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3825428d7b3dSmrg	fi
3826428d7b3dSmrg      else
3827428d7b3dSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3828428d7b3dSmrg      fi
3829428d7b3dSmrg    else
3830428d7b3dSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3831428d7b3dSmrg    fi
3832428d7b3dSmrg  else
3833428d7b3dSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3834428d7b3dSmrg    cat conftest.$ac_ext >&5
3835428d7b3dSmrg  fi
3836428d7b3dSmrg  rm -rf conftest* conftst*
3837428d7b3dSmrg
3838428d7b3dSmrg  # Do not use the global_symbol_pipe unless it works.
3839428d7b3dSmrg  if test "$pipe_works" = yes; then
3840428d7b3dSmrg    break
3841428d7b3dSmrg  else
3842428d7b3dSmrg    lt_cv_sys_global_symbol_pipe=
3843428d7b3dSmrg  fi
3844428d7b3dSmrgdone
3845428d7b3dSmrg])
3846428d7b3dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3847428d7b3dSmrg  lt_cv_sys_global_symbol_to_cdecl=
3848428d7b3dSmrgfi
3849428d7b3dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3850428d7b3dSmrg  AC_MSG_RESULT(failed)
3851428d7b3dSmrgelse
3852428d7b3dSmrg  AC_MSG_RESULT(ok)
3853428d7b3dSmrgfi
3854428d7b3dSmrg
3855428d7b3dSmrg# Response file support.
3856428d7b3dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3857428d7b3dSmrg  nm_file_list_spec='@'
3858428d7b3dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3859428d7b3dSmrg  nm_file_list_spec='@'
3860428d7b3dSmrgfi
3861428d7b3dSmrg
3862428d7b3dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3863428d7b3dSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
3864428d7b3dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3865428d7b3dSmrg    [Transform the output of nm in a proper C declaration])
3866428d7b3dSmrg_LT_DECL([global_symbol_to_c_name_address],
3867428d7b3dSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3868428d7b3dSmrg    [Transform the output of nm in a C name address pair])
3869428d7b3dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3870428d7b3dSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3871428d7b3dSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3872428d7b3dSmrg_LT_DECL([], [nm_file_list_spec], [1],
3873428d7b3dSmrg    [Specify filename containing input files for $NM])
3874428d7b3dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
3875428d7b3dSmrg
3876428d7b3dSmrg
3877428d7b3dSmrg# _LT_COMPILER_PIC([TAGNAME])
3878428d7b3dSmrg# ---------------------------
3879428d7b3dSmrgm4_defun([_LT_COMPILER_PIC],
3880428d7b3dSmrg[m4_require([_LT_TAG_COMPILER])dnl
3881428d7b3dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3882428d7b3dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3883428d7b3dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3884428d7b3dSmrg
3885428d7b3dSmrgm4_if([$1], [CXX], [
3886428d7b3dSmrg  # C++ specific cases for pic, static, wl, etc.
3887428d7b3dSmrg  if test "$GXX" = yes; then
3888428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3889428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3890428d7b3dSmrg
3891428d7b3dSmrg    case $host_os in
3892428d7b3dSmrg    aix*)
3893428d7b3dSmrg      # All AIX code is PIC.
3894428d7b3dSmrg      if test "$host_cpu" = ia64; then
3895428d7b3dSmrg	# AIX 5 now supports IA64 processor
3896428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3897428d7b3dSmrg      fi
3898428d7b3dSmrg      ;;
3899428d7b3dSmrg
3900428d7b3dSmrg    amigaos*)
3901428d7b3dSmrg      case $host_cpu in
3902428d7b3dSmrg      powerpc)
3903428d7b3dSmrg            # see comment about AmigaOS4 .so support
3904428d7b3dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3905428d7b3dSmrg        ;;
3906428d7b3dSmrg      m68k)
3907428d7b3dSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3908428d7b3dSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3909428d7b3dSmrg            # like `-m68040'.
3910428d7b3dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3911428d7b3dSmrg        ;;
3912428d7b3dSmrg      esac
3913428d7b3dSmrg      ;;
3914428d7b3dSmrg
3915428d7b3dSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3916428d7b3dSmrg      # PIC is the default for these OSes.
3917428d7b3dSmrg      ;;
3918428d7b3dSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3919428d7b3dSmrg      # This hack is so that the source file can tell whether it is being
3920428d7b3dSmrg      # built for inclusion in a dll (and should export symbols for example).
3921428d7b3dSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3922428d7b3dSmrg      # (--disable-auto-import) libraries
3923428d7b3dSmrg      m4_if([$1], [GCJ], [],
3924428d7b3dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3925428d7b3dSmrg      ;;
3926428d7b3dSmrg    darwin* | rhapsody*)
3927428d7b3dSmrg      # PIC is the default on this platform
3928428d7b3dSmrg      # Common symbols not allowed in MH_DYLIB files
3929428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3930428d7b3dSmrg      ;;
3931428d7b3dSmrg    *djgpp*)
3932428d7b3dSmrg      # DJGPP does not support shared libraries at all
3933428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3934428d7b3dSmrg      ;;
3935428d7b3dSmrg    haiku*)
3936428d7b3dSmrg      # PIC is the default for Haiku.
3937428d7b3dSmrg      # The "-static" flag exists, but is broken.
3938428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
3939428d7b3dSmrg      ;;
3940428d7b3dSmrg    interix[[3-9]]*)
3941428d7b3dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3942428d7b3dSmrg      # Instead, we relocate shared libraries at runtime.
3943428d7b3dSmrg      ;;
3944428d7b3dSmrg    sysv4*MP*)
3945428d7b3dSmrg      if test -d /usr/nec; then
3946428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3947428d7b3dSmrg      fi
3948428d7b3dSmrg      ;;
3949428d7b3dSmrg    hpux*)
3950428d7b3dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3951428d7b3dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3952428d7b3dSmrg      # sets the default TLS model and affects inlining.
3953428d7b3dSmrg      case $host_cpu in
3954428d7b3dSmrg      hppa*64*)
3955428d7b3dSmrg	;;
3956428d7b3dSmrg      *)
3957428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3958428d7b3dSmrg	;;
3959428d7b3dSmrg      esac
3960428d7b3dSmrg      ;;
3961428d7b3dSmrg    *qnx* | *nto*)
3962428d7b3dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3963428d7b3dSmrg      # it will coredump.
3964428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3965428d7b3dSmrg      ;;
3966428d7b3dSmrg    *)
3967428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3968428d7b3dSmrg      ;;
3969428d7b3dSmrg    esac
3970428d7b3dSmrg  else
3971428d7b3dSmrg    case $host_os in
3972428d7b3dSmrg      aix[[4-9]]*)
3973428d7b3dSmrg	# All AIX code is PIC.
3974428d7b3dSmrg	if test "$host_cpu" = ia64; then
3975428d7b3dSmrg	  # AIX 5 now supports IA64 processor
3976428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3977428d7b3dSmrg	else
3978428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3979428d7b3dSmrg	fi
3980428d7b3dSmrg	;;
3981428d7b3dSmrg      chorus*)
3982428d7b3dSmrg	case $cc_basename in
3983428d7b3dSmrg	cxch68*)
3984428d7b3dSmrg	  # Green Hills C++ Compiler
3985428d7b3dSmrg	  # _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"
3986428d7b3dSmrg	  ;;
3987428d7b3dSmrg	esac
3988428d7b3dSmrg	;;
3989428d7b3dSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
3990428d7b3dSmrg	# This hack is so that the source file can tell whether it is being
3991428d7b3dSmrg	# built for inclusion in a dll (and should export symbols for example).
3992428d7b3dSmrg	m4_if([$1], [GCJ], [],
3993428d7b3dSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3994428d7b3dSmrg	;;
3995428d7b3dSmrg      dgux*)
3996428d7b3dSmrg	case $cc_basename in
3997428d7b3dSmrg	  ec++*)
3998428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3999428d7b3dSmrg	    ;;
4000428d7b3dSmrg	  ghcx*)
4001428d7b3dSmrg	    # Green Hills C++ Compiler
4002428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4003428d7b3dSmrg	    ;;
4004428d7b3dSmrg	  *)
4005428d7b3dSmrg	    ;;
4006428d7b3dSmrg	esac
4007428d7b3dSmrg	;;
4008428d7b3dSmrg      freebsd* | dragonfly*)
4009428d7b3dSmrg	# FreeBSD uses GNU C++
4010428d7b3dSmrg	;;
4011428d7b3dSmrg      hpux9* | hpux10* | hpux11*)
4012428d7b3dSmrg	case $cc_basename in
4013428d7b3dSmrg	  CC*)
4014428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4016428d7b3dSmrg	    if test "$host_cpu" != ia64; then
4017428d7b3dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4018428d7b3dSmrg	    fi
4019428d7b3dSmrg	    ;;
4020428d7b3dSmrg	  aCC*)
4021428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4022428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4023428d7b3dSmrg	    case $host_cpu in
4024428d7b3dSmrg	    hppa*64*|ia64*)
4025428d7b3dSmrg	      # +Z the default
4026428d7b3dSmrg	      ;;
4027428d7b3dSmrg	    *)
4028428d7b3dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4029428d7b3dSmrg	      ;;
4030428d7b3dSmrg	    esac
4031428d7b3dSmrg	    ;;
4032428d7b3dSmrg	  *)
4033428d7b3dSmrg	    ;;
4034428d7b3dSmrg	esac
4035428d7b3dSmrg	;;
4036428d7b3dSmrg      interix*)
4037428d7b3dSmrg	# This is c89, which is MS Visual C++ (no shared libs)
4038428d7b3dSmrg	# Anyone wants to do a port?
4039428d7b3dSmrg	;;
4040428d7b3dSmrg      irix5* | irix6* | nonstopux*)
4041428d7b3dSmrg	case $cc_basename in
4042428d7b3dSmrg	  CC*)
4043428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4045428d7b3dSmrg	    # CC pic flag -KPIC is the default.
4046428d7b3dSmrg	    ;;
4047428d7b3dSmrg	  *)
4048428d7b3dSmrg	    ;;
4049428d7b3dSmrg	esac
4050428d7b3dSmrg	;;
4051428d7b3dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4052428d7b3dSmrg	case $cc_basename in
4053428d7b3dSmrg	  KCC*)
4054428d7b3dSmrg	    # KAI C++ Compiler
4055428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4056428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4057428d7b3dSmrg	    ;;
4058428d7b3dSmrg	  ecpc* )
4059428d7b3dSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
4060428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4061428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4062428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4063428d7b3dSmrg	    ;;
4064428d7b3dSmrg	  icpc* )
4065428d7b3dSmrg	    # Intel C++, used to be incompatible with GCC.
4066428d7b3dSmrg	    # ICC 10 doesn't accept -KPIC any more.
4067428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4068428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4069428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4070428d7b3dSmrg	    ;;
4071428d7b3dSmrg	  pgCC* | pgcpp*)
4072428d7b3dSmrg	    # Portland Group C++ compiler
4073428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4074428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4075428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4076428d7b3dSmrg	    ;;
4077428d7b3dSmrg	  cxx*)
4078428d7b3dSmrg	    # Compaq C++
4079428d7b3dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4080428d7b3dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4081428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4082428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4083428d7b3dSmrg	    ;;
4084428d7b3dSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4085428d7b3dSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4086428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4087428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4088428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4089428d7b3dSmrg	    ;;
4090428d7b3dSmrg	  *)
4091428d7b3dSmrg	    case `$CC -V 2>&1 | sed 5q` in
4092428d7b3dSmrg	    *Sun\ C*)
4093428d7b3dSmrg	      # Sun C++ 5.9
4094428d7b3dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4095428d7b3dSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4096428d7b3dSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4097428d7b3dSmrg	      ;;
4098428d7b3dSmrg	    esac
4099428d7b3dSmrg	    ;;
4100428d7b3dSmrg	esac
4101428d7b3dSmrg	;;
4102428d7b3dSmrg      lynxos*)
4103428d7b3dSmrg	;;
4104428d7b3dSmrg      m88k*)
4105428d7b3dSmrg	;;
4106428d7b3dSmrg      mvs*)
4107428d7b3dSmrg	case $cc_basename in
4108428d7b3dSmrg	  cxx*)
4109428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4110428d7b3dSmrg	    ;;
4111428d7b3dSmrg	  *)
4112428d7b3dSmrg	    ;;
4113428d7b3dSmrg	esac
4114428d7b3dSmrg	;;
4115428d7b3dSmrg      netbsd* | netbsdelf*-gnu)
4116428d7b3dSmrg	;;
4117428d7b3dSmrg      *qnx* | *nto*)
4118428d7b3dSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
4119428d7b3dSmrg        # it will coredump.
4120428d7b3dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4121428d7b3dSmrg        ;;
4122428d7b3dSmrg      osf3* | osf4* | osf5*)
4123428d7b3dSmrg	case $cc_basename in
4124428d7b3dSmrg	  KCC*)
4125428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4126428d7b3dSmrg	    ;;
4127428d7b3dSmrg	  RCC*)
4128428d7b3dSmrg	    # Rational C++ 2.4.1
4129428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4130428d7b3dSmrg	    ;;
4131428d7b3dSmrg	  cxx*)
4132428d7b3dSmrg	    # Digital/Compaq C++
4133428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4134428d7b3dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4135428d7b3dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4136428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4137428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4138428d7b3dSmrg	    ;;
4139428d7b3dSmrg	  *)
4140428d7b3dSmrg	    ;;
4141428d7b3dSmrg	esac
4142428d7b3dSmrg	;;
4143428d7b3dSmrg      psos*)
4144428d7b3dSmrg	;;
4145428d7b3dSmrg      solaris*)
4146428d7b3dSmrg	case $cc_basename in
4147428d7b3dSmrg	  CC* | sunCC*)
4148428d7b3dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
4149428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4150428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4151428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4152428d7b3dSmrg	    ;;
4153428d7b3dSmrg	  gcx*)
4154428d7b3dSmrg	    # Green Hills C++ Compiler
4155428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4156428d7b3dSmrg	    ;;
4157428d7b3dSmrg	  *)
4158428d7b3dSmrg	    ;;
4159428d7b3dSmrg	esac
4160428d7b3dSmrg	;;
4161428d7b3dSmrg      sunos4*)
4162428d7b3dSmrg	case $cc_basename in
4163428d7b3dSmrg	  CC*)
4164428d7b3dSmrg	    # Sun C++ 4.x
4165428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4166428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4167428d7b3dSmrg	    ;;
4168428d7b3dSmrg	  lcc*)
4169428d7b3dSmrg	    # Lucid
4170428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4171428d7b3dSmrg	    ;;
4172428d7b3dSmrg	  *)
4173428d7b3dSmrg	    ;;
4174428d7b3dSmrg	esac
4175428d7b3dSmrg	;;
4176428d7b3dSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4177428d7b3dSmrg	case $cc_basename in
4178428d7b3dSmrg	  CC*)
4179428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4180428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4181428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4182428d7b3dSmrg	    ;;
4183428d7b3dSmrg	esac
4184428d7b3dSmrg	;;
4185428d7b3dSmrg      tandem*)
4186428d7b3dSmrg	case $cc_basename in
4187428d7b3dSmrg	  NCC*)
4188428d7b3dSmrg	    # NonStop-UX NCC 3.20
4189428d7b3dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4190428d7b3dSmrg	    ;;
4191428d7b3dSmrg	  *)
4192428d7b3dSmrg	    ;;
4193428d7b3dSmrg	esac
4194428d7b3dSmrg	;;
4195428d7b3dSmrg      vxworks*)
4196428d7b3dSmrg	;;
4197428d7b3dSmrg      *)
4198428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4199428d7b3dSmrg	;;
4200428d7b3dSmrg    esac
4201428d7b3dSmrg  fi
4202428d7b3dSmrg],
4203428d7b3dSmrg[
4204428d7b3dSmrg  if test "$GCC" = yes; then
4205428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4206428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4207428d7b3dSmrg
4208428d7b3dSmrg    case $host_os in
4209428d7b3dSmrg      aix*)
4210428d7b3dSmrg      # All AIX code is PIC.
4211428d7b3dSmrg      if test "$host_cpu" = ia64; then
4212428d7b3dSmrg	# AIX 5 now supports IA64 processor
4213428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4214428d7b3dSmrg      fi
4215428d7b3dSmrg      ;;
4216428d7b3dSmrg
4217428d7b3dSmrg    amigaos*)
4218428d7b3dSmrg      case $host_cpu in
4219428d7b3dSmrg      powerpc)
4220428d7b3dSmrg            # see comment about AmigaOS4 .so support
4221428d7b3dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4222428d7b3dSmrg        ;;
4223428d7b3dSmrg      m68k)
4224428d7b3dSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
4225428d7b3dSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
4226428d7b3dSmrg            # like `-m68040'.
4227428d7b3dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4228428d7b3dSmrg        ;;
4229428d7b3dSmrg      esac
4230428d7b3dSmrg      ;;
4231428d7b3dSmrg
4232428d7b3dSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4233428d7b3dSmrg      # PIC is the default for these OSes.
4234428d7b3dSmrg      ;;
4235428d7b3dSmrg
4236428d7b3dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
4237428d7b3dSmrg      # This hack is so that the source file can tell whether it is being
4238428d7b3dSmrg      # built for inclusion in a dll (and should export symbols for example).
4239428d7b3dSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4240428d7b3dSmrg      # (--disable-auto-import) libraries
4241428d7b3dSmrg      m4_if([$1], [GCJ], [],
4242428d7b3dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4243428d7b3dSmrg      ;;
4244428d7b3dSmrg
4245428d7b3dSmrg    darwin* | rhapsody*)
4246428d7b3dSmrg      # PIC is the default on this platform
4247428d7b3dSmrg      # Common symbols not allowed in MH_DYLIB files
4248428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4249428d7b3dSmrg      ;;
4250428d7b3dSmrg
4251428d7b3dSmrg    haiku*)
4252428d7b3dSmrg      # PIC is the default for Haiku.
4253428d7b3dSmrg      # The "-static" flag exists, but is broken.
4254428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4255428d7b3dSmrg      ;;
4256428d7b3dSmrg
4257428d7b3dSmrg    hpux*)
4258428d7b3dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4259428d7b3dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4260428d7b3dSmrg      # sets the default TLS model and affects inlining.
4261428d7b3dSmrg      case $host_cpu in
4262428d7b3dSmrg      hppa*64*)
4263428d7b3dSmrg	# +Z the default
4264428d7b3dSmrg	;;
4265428d7b3dSmrg      *)
4266428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4267428d7b3dSmrg	;;
4268428d7b3dSmrg      esac
4269428d7b3dSmrg      ;;
4270428d7b3dSmrg
4271428d7b3dSmrg    interix[[3-9]]*)
4272428d7b3dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4273428d7b3dSmrg      # Instead, we relocate shared libraries at runtime.
4274428d7b3dSmrg      ;;
4275428d7b3dSmrg
4276428d7b3dSmrg    msdosdjgpp*)
4277428d7b3dSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
4278428d7b3dSmrg      # on systems that don't support them.
4279428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4280428d7b3dSmrg      enable_shared=no
4281428d7b3dSmrg      ;;
4282428d7b3dSmrg
4283428d7b3dSmrg    *nto* | *qnx*)
4284428d7b3dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4285428d7b3dSmrg      # it will coredump.
4286428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4287428d7b3dSmrg      ;;
4288428d7b3dSmrg
4289428d7b3dSmrg    sysv4*MP*)
4290428d7b3dSmrg      if test -d /usr/nec; then
4291428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4292428d7b3dSmrg      fi
4293428d7b3dSmrg      ;;
4294428d7b3dSmrg
4295428d7b3dSmrg    *)
4296428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4297428d7b3dSmrg      ;;
4298428d7b3dSmrg    esac
4299428d7b3dSmrg
4300428d7b3dSmrg    case $cc_basename in
4301428d7b3dSmrg    nvcc*) # Cuda Compiler Driver 2.2
4302428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4303428d7b3dSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4304428d7b3dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4305428d7b3dSmrg      fi
4306428d7b3dSmrg      ;;
4307428d7b3dSmrg    esac
4308428d7b3dSmrg  else
4309428d7b3dSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
4310428d7b3dSmrg    case $host_os in
4311428d7b3dSmrg    aix*)
4312428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4313428d7b3dSmrg      if test "$host_cpu" = ia64; then
4314428d7b3dSmrg	# AIX 5 now supports IA64 processor
4315428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4316428d7b3dSmrg      else
4317428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4318428d7b3dSmrg      fi
4319428d7b3dSmrg      ;;
4320428d7b3dSmrg
4321428d7b3dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
4322428d7b3dSmrg      # This hack is so that the source file can tell whether it is being
4323428d7b3dSmrg      # built for inclusion in a dll (and should export symbols for example).
4324428d7b3dSmrg      m4_if([$1], [GCJ], [],
4325428d7b3dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4326428d7b3dSmrg      ;;
4327428d7b3dSmrg
4328428d7b3dSmrg    hpux9* | hpux10* | hpux11*)
4329428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4330428d7b3dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4331428d7b3dSmrg      # not for PA HP-UX.
4332428d7b3dSmrg      case $host_cpu in
4333428d7b3dSmrg      hppa*64*|ia64*)
4334428d7b3dSmrg	# +Z the default
4335428d7b3dSmrg	;;
4336428d7b3dSmrg      *)
4337428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4338428d7b3dSmrg	;;
4339428d7b3dSmrg      esac
4340428d7b3dSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4341428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4342428d7b3dSmrg      ;;
4343428d7b3dSmrg
4344428d7b3dSmrg    irix5* | irix6* | nonstopux*)
4345428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4346428d7b3dSmrg      # PIC (with -KPIC) is the default.
4347428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4348428d7b3dSmrg      ;;
4349428d7b3dSmrg
4350428d7b3dSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4351428d7b3dSmrg      case $cc_basename in
4352428d7b3dSmrg      # old Intel for x86_64 which still supported -KPIC.
4353428d7b3dSmrg      ecc*)
4354428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4355428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4356428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4357428d7b3dSmrg        ;;
4358428d7b3dSmrg      # icc used to be incompatible with GCC.
4359428d7b3dSmrg      # ICC 10 doesn't accept -KPIC any more.
4360428d7b3dSmrg      icc* | ifort*)
4361428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4362428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4363428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4364428d7b3dSmrg        ;;
4365428d7b3dSmrg      # Lahey Fortran 8.1.
4366428d7b3dSmrg      lf95*)
4367428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4368428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4369428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4370428d7b3dSmrg	;;
4371428d7b3dSmrg      nagfor*)
4372428d7b3dSmrg	# NAG Fortran compiler
4373428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4374428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4375428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4376428d7b3dSmrg	;;
4377428d7b3dSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4378428d7b3dSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4379428d7b3dSmrg	# which looks to be a dead project)
4380428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4381428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4382428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4383428d7b3dSmrg        ;;
4384428d7b3dSmrg      ccc*)
4385428d7b3dSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386428d7b3dSmrg        # All Alpha code is PIC.
4387428d7b3dSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4388428d7b3dSmrg        ;;
4389428d7b3dSmrg      xl* | bgxl* | bgf* | mpixl*)
4390428d7b3dSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4391428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4392428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4393428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4394428d7b3dSmrg	;;
4395428d7b3dSmrg      *)
4396428d7b3dSmrg	case `$CC -V 2>&1 | sed 5q` in
4397428d7b3dSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4398428d7b3dSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4399428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4400428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4401428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4402428d7b3dSmrg	  ;;
4403428d7b3dSmrg	*Sun\ F* | *Sun*Fortran*)
4404428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4405428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4406428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4407428d7b3dSmrg	  ;;
4408428d7b3dSmrg	*Sun\ C*)
4409428d7b3dSmrg	  # Sun C 5.9
4410428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4411428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4412428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4413428d7b3dSmrg	  ;;
4414428d7b3dSmrg        *Intel*\ [[CF]]*Compiler*)
4415428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4416428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4417428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4418428d7b3dSmrg	  ;;
4419428d7b3dSmrg	*Portland\ Group*)
4420428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4421428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4422428d7b3dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4423428d7b3dSmrg	  ;;
4424428d7b3dSmrg	esac
4425428d7b3dSmrg	;;
4426428d7b3dSmrg      esac
4427428d7b3dSmrg      ;;
4428428d7b3dSmrg
4429428d7b3dSmrg    newsos6)
4430428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4431428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4432428d7b3dSmrg      ;;
4433428d7b3dSmrg
4434428d7b3dSmrg    *nto* | *qnx*)
4435428d7b3dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4436428d7b3dSmrg      # it will coredump.
4437428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4438428d7b3dSmrg      ;;
4439428d7b3dSmrg
4440428d7b3dSmrg    osf3* | osf4* | osf5*)
4441428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4442428d7b3dSmrg      # All OSF/1 code is PIC.
4443428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4444428d7b3dSmrg      ;;
4445428d7b3dSmrg
4446428d7b3dSmrg    rdos*)
4447428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4448428d7b3dSmrg      ;;
4449428d7b3dSmrg
4450428d7b3dSmrg    solaris*)
4451428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4452428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4453428d7b3dSmrg      case $cc_basename in
4454428d7b3dSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4455428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4456428d7b3dSmrg      *)
4457428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4458428d7b3dSmrg      esac
4459428d7b3dSmrg      ;;
4460428d7b3dSmrg
4461428d7b3dSmrg    sunos4*)
4462428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4463428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4464428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4465428d7b3dSmrg      ;;
4466428d7b3dSmrg
4467428d7b3dSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4468428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4469428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4470428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4471428d7b3dSmrg      ;;
4472428d7b3dSmrg
4473428d7b3dSmrg    sysv4*MP*)
4474428d7b3dSmrg      if test -d /usr/nec ;then
4475428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4476428d7b3dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4477428d7b3dSmrg      fi
4478428d7b3dSmrg      ;;
4479428d7b3dSmrg
4480428d7b3dSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4481428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4482428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4483428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4484428d7b3dSmrg      ;;
4485428d7b3dSmrg
4486428d7b3dSmrg    unicos*)
4487428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4488428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4489428d7b3dSmrg      ;;
4490428d7b3dSmrg
4491428d7b3dSmrg    uts4*)
4492428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4493428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4494428d7b3dSmrg      ;;
4495428d7b3dSmrg
4496428d7b3dSmrg    *)
4497428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4498428d7b3dSmrg      ;;
4499428d7b3dSmrg    esac
4500428d7b3dSmrg  fi
4501428d7b3dSmrg])
4502428d7b3dSmrgcase $host_os in
4503428d7b3dSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
4504428d7b3dSmrg  *djgpp*)
4505428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4506428d7b3dSmrg    ;;
4507428d7b3dSmrg  *)
4508428d7b3dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4509428d7b3dSmrg    ;;
4510428d7b3dSmrgesac
4511428d7b3dSmrg
4512428d7b3dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
4513428d7b3dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4514428d7b3dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4515428d7b3dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4516428d7b3dSmrg
4517428d7b3dSmrg#
4518428d7b3dSmrg# Check to make sure the PIC flag actually works.
4519428d7b3dSmrg#
4520428d7b3dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4521428d7b3dSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4522428d7b3dSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4523428d7b3dSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4524428d7b3dSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4525428d7b3dSmrg     "" | " "*) ;;
4526428d7b3dSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4527428d7b3dSmrg     esac],
4528428d7b3dSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4529428d7b3dSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4530428d7b3dSmrgfi
4531428d7b3dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4532428d7b3dSmrg	[Additional compiler flags for building library objects])
4533428d7b3dSmrg
4534428d7b3dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4535428d7b3dSmrg	[How to pass a linker flag through the compiler])
4536428d7b3dSmrg#
4537428d7b3dSmrg# Check to make sure the static flag actually works.
4538428d7b3dSmrg#
4539428d7b3dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4540428d7b3dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4541428d7b3dSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4542428d7b3dSmrg  $lt_tmp_static_flag,
4543428d7b3dSmrg  [],
4544428d7b3dSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4545428d7b3dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4546428d7b3dSmrg	[Compiler flag to prevent dynamic linking])
4547428d7b3dSmrg])# _LT_COMPILER_PIC
4548428d7b3dSmrg
4549428d7b3dSmrg
4550428d7b3dSmrg# _LT_LINKER_SHLIBS([TAGNAME])
4551428d7b3dSmrg# ----------------------------
4552428d7b3dSmrg# See if the linker supports building shared libraries.
4553428d7b3dSmrgm4_defun([_LT_LINKER_SHLIBS],
4554428d7b3dSmrg[AC_REQUIRE([LT_PATH_LD])dnl
4555428d7b3dSmrgAC_REQUIRE([LT_PATH_NM])dnl
4556428d7b3dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4557428d7b3dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4558428d7b3dSmrgm4_require([_LT_DECL_EGREP])dnl
4559428d7b3dSmrgm4_require([_LT_DECL_SED])dnl
4560428d7b3dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4561428d7b3dSmrgm4_require([_LT_TAG_COMPILER])dnl
4562428d7b3dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4563428d7b3dSmrgm4_if([$1], [CXX], [
4564428d7b3dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4565428d7b3dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4566428d7b3dSmrg  case $host_os in
4567428d7b3dSmrg  aix[[4-9]]*)
4568428d7b3dSmrg    # If we're using GNU nm, then we don't want the "-C" option.
4569428d7b3dSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4570428d7b3dSmrg    # Also, AIX nm treats weak defined symbols like other global defined
4571428d7b3dSmrg    # symbols, whereas GNU nm marks them as "W".
4572428d7b3dSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4573428d7b3dSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4574428d7b3dSmrg    else
4575428d7b3dSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4576428d7b3dSmrg    fi
4577428d7b3dSmrg    ;;
4578428d7b3dSmrg  pw32*)
4579428d7b3dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4580428d7b3dSmrg    ;;
4581428d7b3dSmrg  cygwin* | mingw* | cegcc*)
4582428d7b3dSmrg    case $cc_basename in
4583428d7b3dSmrg    cl*)
4584428d7b3dSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4585428d7b3dSmrg      ;;
4586428d7b3dSmrg    *)
4587428d7b3dSmrg      _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'
4588428d7b3dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4589428d7b3dSmrg      ;;
4590428d7b3dSmrg    esac
4591428d7b3dSmrg    ;;
4592428d7b3dSmrg  linux* | k*bsd*-gnu | gnu*)
4593428d7b3dSmrg    _LT_TAGVAR(link_all_deplibs, $1)=no
4594428d7b3dSmrg    ;;
4595428d7b3dSmrg  *)
4596428d7b3dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4597428d7b3dSmrg    ;;
4598428d7b3dSmrg  esac
4599428d7b3dSmrg], [
4600428d7b3dSmrg  runpath_var=
4601428d7b3dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4602428d7b3dSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
4603428d7b3dSmrg  _LT_TAGVAR(archive_cmds, $1)=
4604428d7b3dSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4605428d7b3dSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4606428d7b3dSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4607428d7b3dSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4608428d7b3dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4609428d7b3dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4610428d7b3dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
4611428d7b3dSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4612428d7b3dSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4613428d7b3dSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4614428d7b3dSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4615428d7b3dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4616428d7b3dSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
4617428d7b3dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4618428d7b3dSmrg  _LT_TAGVAR(module_cmds, $1)=
4619428d7b3dSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4620428d7b3dSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4621428d7b3dSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4622428d7b3dSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4623428d7b3dSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4624428d7b3dSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
4625428d7b3dSmrg  # included in the symbol list
4626428d7b3dSmrg  _LT_TAGVAR(include_expsyms, $1)=
4627428d7b3dSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4628428d7b3dSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4629428d7b3dSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4630428d7b3dSmrg  # as well as any symbol that contains `d'.
4631428d7b3dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4632428d7b3dSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4633428d7b3dSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4634428d7b3dSmrg  # the symbol is explicitly referenced.  Since portable code cannot
4635428d7b3dSmrg  # rely on this symbol name, it's probably fine to never include it in
4636428d7b3dSmrg  # preloaded symbol tables.
4637428d7b3dSmrg  # Exclude shared library initialization/finalization symbols.
4638428d7b3dSmrgdnl Note also adjust exclude_expsyms for C++ above.
4639428d7b3dSmrg  extract_expsyms_cmds=
4640428d7b3dSmrg
4641428d7b3dSmrg  case $host_os in
4642428d7b3dSmrg  cygwin* | mingw* | pw32* | cegcc*)
4643428d7b3dSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4644428d7b3dSmrg    # When not using gcc, we currently assume that we are using
4645428d7b3dSmrg    # Microsoft Visual C++.
4646428d7b3dSmrg    if test "$GCC" != yes; then
4647428d7b3dSmrg      with_gnu_ld=no
4648428d7b3dSmrg    fi
4649428d7b3dSmrg    ;;
4650428d7b3dSmrg  interix*)
4651428d7b3dSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4652428d7b3dSmrg    with_gnu_ld=yes
4653428d7b3dSmrg    ;;
4654428d7b3dSmrg  openbsd*)
4655428d7b3dSmrg    with_gnu_ld=no
4656428d7b3dSmrg    ;;
4657428d7b3dSmrg  linux* | k*bsd*-gnu | gnu*)
4658428d7b3dSmrg    _LT_TAGVAR(link_all_deplibs, $1)=no
4659428d7b3dSmrg    ;;
4660428d7b3dSmrg  esac
4661428d7b3dSmrg
4662428d7b3dSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4663428d7b3dSmrg
4664428d7b3dSmrg  # On some targets, GNU ld is compatible enough with the native linker
4665428d7b3dSmrg  # that we're better off using the native interface for both.
4666428d7b3dSmrg  lt_use_gnu_ld_interface=no
4667428d7b3dSmrg  if test "$with_gnu_ld" = yes; then
4668428d7b3dSmrg    case $host_os in
4669428d7b3dSmrg      aix*)
4670428d7b3dSmrg	# The AIX port of GNU ld has always aspired to compatibility
4671428d7b3dSmrg	# with the native linker.  However, as the warning in the GNU ld
4672428d7b3dSmrg	# block says, versions before 2.19.5* couldn't really create working
4673428d7b3dSmrg	# shared libraries, regardless of the interface used.
4674428d7b3dSmrg	case `$LD -v 2>&1` in
4675428d7b3dSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4676428d7b3dSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4677428d7b3dSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4678428d7b3dSmrg	  *)
4679428d7b3dSmrg	    lt_use_gnu_ld_interface=yes
4680428d7b3dSmrg	    ;;
4681428d7b3dSmrg	esac
4682428d7b3dSmrg	;;
4683428d7b3dSmrg      *)
4684428d7b3dSmrg	lt_use_gnu_ld_interface=yes
4685428d7b3dSmrg	;;
4686428d7b3dSmrg    esac
4687428d7b3dSmrg  fi
4688428d7b3dSmrg
4689428d7b3dSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
4690428d7b3dSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4691428d7b3dSmrg    wlarc='${wl}'
4692428d7b3dSmrg
4693428d7b3dSmrg    # Set some defaults for GNU ld with shared library support. These
4694428d7b3dSmrg    # are reset later if shared libraries are not supported. Putting them
4695428d7b3dSmrg    # here allows them to be overridden if necessary.
4696428d7b3dSmrg    runpath_var=LD_RUN_PATH
4697428d7b3dSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4698428d7b3dSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4699428d7b3dSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4700428d7b3dSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4701428d7b3dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4702428d7b3dSmrg    else
4703428d7b3dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4704428d7b3dSmrg    fi
4705428d7b3dSmrg    supports_anon_versioning=no
4706428d7b3dSmrg    case `$LD -v 2>&1` in
4707428d7b3dSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
4708428d7b3dSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4709428d7b3dSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4710428d7b3dSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4711428d7b3dSmrg      *\ 2.11.*) ;; # other 2.11 versions
4712428d7b3dSmrg      *) supports_anon_versioning=yes ;;
4713428d7b3dSmrg    esac
4714428d7b3dSmrg
4715428d7b3dSmrg    # See if GNU ld supports shared libraries.
4716428d7b3dSmrg    case $host_os in
4717428d7b3dSmrg    aix[[3-9]]*)
4718428d7b3dSmrg      # On AIX/PPC, the GNU linker is very broken
4719428d7b3dSmrg      if test "$host_cpu" != ia64; then
4720428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4721428d7b3dSmrg	cat <<_LT_EOF 1>&2
4722428d7b3dSmrg
4723428d7b3dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
4724428d7b3dSmrg*** to be unable to reliably create shared libraries on AIX.
4725428d7b3dSmrg*** Therefore, libtool is disabling shared libraries support.  If you
4726428d7b3dSmrg*** really care for shared libraries, you may want to install binutils
4727428d7b3dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4728428d7b3dSmrg*** You will then need to restart the configuration process.
4729428d7b3dSmrg
4730428d7b3dSmrg_LT_EOF
4731428d7b3dSmrg      fi
4732428d7b3dSmrg      ;;
4733428d7b3dSmrg
4734428d7b3dSmrg    amigaos*)
4735428d7b3dSmrg      case $host_cpu in
4736428d7b3dSmrg      powerpc)
4737428d7b3dSmrg            # see comment about AmigaOS4 .so support
4738428d7b3dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4739428d7b3dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4740428d7b3dSmrg        ;;
4741428d7b3dSmrg      m68k)
4742428d7b3dSmrg            _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)'
4743428d7b3dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4744428d7b3dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745428d7b3dSmrg        ;;
4746428d7b3dSmrg      esac
4747428d7b3dSmrg      ;;
4748428d7b3dSmrg
4749428d7b3dSmrg    beos*)
4750428d7b3dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4751428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4752428d7b3dSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4753428d7b3dSmrg	# support --undefined.  This deserves some investigation.  FIXME
4754428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4755428d7b3dSmrg      else
4756428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4757428d7b3dSmrg      fi
4758428d7b3dSmrg      ;;
4759428d7b3dSmrg
4760428d7b3dSmrg    cygwin* | mingw* | pw32* | cegcc*)
4761428d7b3dSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4762428d7b3dSmrg      # as there is no search path for DLLs.
4763428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4764428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4765428d7b3dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4766428d7b3dSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
4767428d7b3dSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4768428d7b3dSmrg      _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'
4769428d7b3dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4770428d7b3dSmrg
4771428d7b3dSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4772428d7b3dSmrg        _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'
4773428d7b3dSmrg	# If the export-symbols file already is a .def file (1st line
4774428d7b3dSmrg	# is EXPORTS), use it as is; otherwise, prepend...
4775428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4776428d7b3dSmrg	  cp $export_symbols $output_objdir/$soname.def;
4777428d7b3dSmrg	else
4778428d7b3dSmrg	  echo EXPORTS > $output_objdir/$soname.def;
4779428d7b3dSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
4780428d7b3dSmrg	fi~
4781428d7b3dSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4782428d7b3dSmrg      else
4783428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4784428d7b3dSmrg      fi
4785428d7b3dSmrg      ;;
4786428d7b3dSmrg
4787428d7b3dSmrg    haiku*)
4788428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4789428d7b3dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4790428d7b3dSmrg      ;;
4791428d7b3dSmrg
4792428d7b3dSmrg    interix[[3-9]]*)
4793428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
4794428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4795428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4796428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4797428d7b3dSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4798428d7b3dSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4799428d7b3dSmrg      # default) and relocated if they conflict, which is a slow very memory
4800428d7b3dSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4801428d7b3dSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4802428d7b3dSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4803428d7b3dSmrg      _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'
4804428d7b3dSmrg      _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'
4805428d7b3dSmrg      ;;
4806428d7b3dSmrg
4807428d7b3dSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4808428d7b3dSmrg      tmp_diet=no
4809428d7b3dSmrg      if test "$host_os" = linux-dietlibc; then
4810428d7b3dSmrg	case $cc_basename in
4811428d7b3dSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4812428d7b3dSmrg	esac
4813428d7b3dSmrg      fi
4814428d7b3dSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4815428d7b3dSmrg	 && test "$tmp_diet" = no
4816428d7b3dSmrg      then
4817428d7b3dSmrg	tmp_addflag=' $pic_flag'
4818428d7b3dSmrg	tmp_sharedflag='-shared'
4819428d7b3dSmrg	case $cc_basename,$host_cpu in
4820428d7b3dSmrg        pgcc*)				# Portland Group C compiler
4821428d7b3dSmrg	  _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'
4822428d7b3dSmrg	  tmp_addflag=' $pic_flag'
4823428d7b3dSmrg	  ;;
4824428d7b3dSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
4825428d7b3dSmrg					# Portland Group f77 and f90 compilers
4826428d7b3dSmrg	  _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'
4827428d7b3dSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4828428d7b3dSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4829428d7b3dSmrg	  tmp_addflag=' -i_dynamic' ;;
4830428d7b3dSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4831428d7b3dSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4832428d7b3dSmrg	ifc* | ifort*)			# Intel Fortran compiler
4833428d7b3dSmrg	  tmp_addflag=' -nofor_main' ;;
4834428d7b3dSmrg	lf95*)				# Lahey Fortran 8.1
4835428d7b3dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4836428d7b3dSmrg	  tmp_sharedflag='--shared' ;;
4837428d7b3dSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4838428d7b3dSmrg	  tmp_sharedflag='-qmkshrobj'
4839428d7b3dSmrg	  tmp_addflag= ;;
4840428d7b3dSmrg	nvcc*)	# Cuda Compiler Driver 2.2
4841428d7b3dSmrg	  _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'
4842428d7b3dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4843428d7b3dSmrg	  ;;
4844428d7b3dSmrg	esac
4845428d7b3dSmrg	case `$CC -V 2>&1 | sed 5q` in
4846428d7b3dSmrg	*Sun\ C*)			# Sun C 5.9
4847428d7b3dSmrg	  _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'
4848428d7b3dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4849428d7b3dSmrg	  tmp_sharedflag='-G' ;;
4850428d7b3dSmrg	*Sun\ F*)			# Sun Fortran 8.3
4851428d7b3dSmrg	  tmp_sharedflag='-G' ;;
4852428d7b3dSmrg	esac
4853428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4854428d7b3dSmrg
4855428d7b3dSmrg        if test "x$supports_anon_versioning" = xyes; then
4856428d7b3dSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4857428d7b3dSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4858428d7b3dSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4859428d7b3dSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4860428d7b3dSmrg        fi
4861428d7b3dSmrg
4862428d7b3dSmrg	case $cc_basename in
4863428d7b3dSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
4864428d7b3dSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4865428d7b3dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4866428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4867428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4868428d7b3dSmrg	  if test "x$supports_anon_versioning" = xyes; then
4869428d7b3dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4870428d7b3dSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4871428d7b3dSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4872428d7b3dSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4873428d7b3dSmrg	  fi
4874428d7b3dSmrg	  ;;
4875428d7b3dSmrg	esac
4876428d7b3dSmrg      else
4877428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
4878428d7b3dSmrg      fi
4879428d7b3dSmrg      ;;
4880428d7b3dSmrg
4881428d7b3dSmrg    netbsd* | netbsdelf*-gnu)
4882428d7b3dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4883428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4884428d7b3dSmrg	wlarc=
4885428d7b3dSmrg      else
4886428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4887428d7b3dSmrg	_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'
4888428d7b3dSmrg      fi
4889428d7b3dSmrg      ;;
4890428d7b3dSmrg
4891428d7b3dSmrg    solaris*)
4892428d7b3dSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4893428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4894428d7b3dSmrg	cat <<_LT_EOF 1>&2
4895428d7b3dSmrg
4896428d7b3dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4897428d7b3dSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
4898428d7b3dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4899428d7b3dSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4900428d7b3dSmrg*** your PATH or compiler configuration so that the native linker is
4901428d7b3dSmrg*** used, and then restart.
4902428d7b3dSmrg
4903428d7b3dSmrg_LT_EOF
4904428d7b3dSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4905428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4906428d7b3dSmrg	_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'
4907428d7b3dSmrg      else
4908428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4909428d7b3dSmrg      fi
4910428d7b3dSmrg      ;;
4911428d7b3dSmrg
4912428d7b3dSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4913428d7b3dSmrg      case `$LD -v 2>&1` in
4914428d7b3dSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4915428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4916428d7b3dSmrg	cat <<_LT_EOF 1>&2
4917428d7b3dSmrg
4918428d7b3dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4919428d7b3dSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4920428d7b3dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4921428d7b3dSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4922428d7b3dSmrg*** your PATH or compiler configuration so that the native linker is
4923428d7b3dSmrg*** used, and then restart.
4924428d7b3dSmrg
4925428d7b3dSmrg_LT_EOF
4926428d7b3dSmrg	;;
4927428d7b3dSmrg	*)
4928428d7b3dSmrg	  # For security reasons, it is highly recommended that you always
4929428d7b3dSmrg	  # use absolute paths for naming shared libraries, and exclude the
4930428d7b3dSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4931428d7b3dSmrg	  # requires that you compile everything twice, which is a pain.
4932428d7b3dSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4933428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4934428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4935428d7b3dSmrg	    _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'
4936428d7b3dSmrg	  else
4937428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4938428d7b3dSmrg	  fi
4939428d7b3dSmrg	;;
4940428d7b3dSmrg      esac
4941428d7b3dSmrg      ;;
4942428d7b3dSmrg
4943428d7b3dSmrg    sunos4*)
4944428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4945428d7b3dSmrg      wlarc=
4946428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4947428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4948428d7b3dSmrg      ;;
4949428d7b3dSmrg
4950428d7b3dSmrg    *)
4951428d7b3dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4952428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4953428d7b3dSmrg	_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'
4954428d7b3dSmrg      else
4955428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4956428d7b3dSmrg      fi
4957428d7b3dSmrg      ;;
4958428d7b3dSmrg    esac
4959428d7b3dSmrg
4960428d7b3dSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4961428d7b3dSmrg      runpath_var=
4962428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4963428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4964428d7b3dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4965428d7b3dSmrg    fi
4966428d7b3dSmrg  else
4967428d7b3dSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
4968428d7b3dSmrg    case $host_os in
4969428d7b3dSmrg    aix3*)
4970428d7b3dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4971428d7b3dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4972428d7b3dSmrg      _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'
4973428d7b3dSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
4974428d7b3dSmrg      # are no directories specified by -L.
4975428d7b3dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4976428d7b3dSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4977428d7b3dSmrg	# Neither direct hardcoding nor static linking is supported with a
4978428d7b3dSmrg	# broken collect2.
4979428d7b3dSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4980428d7b3dSmrg      fi
4981428d7b3dSmrg      ;;
4982428d7b3dSmrg
4983428d7b3dSmrg    aix[[4-9]]*)
4984428d7b3dSmrg      if test "$host_cpu" = ia64; then
4985428d7b3dSmrg	# On IA64, the linker does run time linking by default, so we don't
4986428d7b3dSmrg	# have to do anything special.
4987428d7b3dSmrg	aix_use_runtimelinking=no
4988428d7b3dSmrg	exp_sym_flag='-Bexport'
4989428d7b3dSmrg	no_entry_flag=""
4990428d7b3dSmrg      else
4991428d7b3dSmrg	# If we're using GNU nm, then we don't want the "-C" option.
4992428d7b3dSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4993428d7b3dSmrg	# Also, AIX nm treats weak defined symbols like other global
4994428d7b3dSmrg	# defined symbols, whereas GNU nm marks them as "W".
4995428d7b3dSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4996428d7b3dSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4997428d7b3dSmrg	else
4998428d7b3dSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4999428d7b3dSmrg	fi
5000428d7b3dSmrg	aix_use_runtimelinking=no
5001428d7b3dSmrg
5002428d7b3dSmrg	# Test if we are trying to use run time linking or normal
5003428d7b3dSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5004428d7b3dSmrg	# need to do runtime linking.
5005428d7b3dSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5006428d7b3dSmrg	  for ld_flag in $LDFLAGS; do
5007428d7b3dSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5008428d7b3dSmrg	    aix_use_runtimelinking=yes
5009428d7b3dSmrg	    break
5010428d7b3dSmrg	  fi
5011428d7b3dSmrg	  done
5012428d7b3dSmrg	  ;;
5013428d7b3dSmrg	esac
5014428d7b3dSmrg
5015428d7b3dSmrg	exp_sym_flag='-bexport'
5016428d7b3dSmrg	no_entry_flag='-bnoentry'
5017428d7b3dSmrg      fi
5018428d7b3dSmrg
5019428d7b3dSmrg      # When large executables or shared objects are built, AIX ld can
5020428d7b3dSmrg      # have problems creating the table of contents.  If linking a library
5021428d7b3dSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5022428d7b3dSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5023428d7b3dSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5024428d7b3dSmrg
5025428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)=''
5026428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5027428d7b3dSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5028428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5029428d7b3dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5030428d7b3dSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5031428d7b3dSmrg
5032428d7b3dSmrg      if test "$GCC" = yes; then
5033428d7b3dSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5034428d7b3dSmrg	# We only want to do this on AIX 4.2 and lower, the check
5035428d7b3dSmrg	# below for broken collect2 doesn't work under 4.3+
5036428d7b3dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5037428d7b3dSmrg	  if test -f "$collect2name" &&
5038428d7b3dSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5039428d7b3dSmrg	  then
5040428d7b3dSmrg	  # We have reworked collect2
5041428d7b3dSmrg	  :
5042428d7b3dSmrg	  else
5043428d7b3dSmrg	  # We have old collect2
5044428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5045428d7b3dSmrg	  # It fails to find uninstalled libraries when the uninstalled
5046428d7b3dSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
5047428d7b3dSmrg	  # to unsupported forces relinking
5048428d7b3dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5049428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5050428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5051428d7b3dSmrg	  fi
5052428d7b3dSmrg	  ;;
5053428d7b3dSmrg	esac
5054428d7b3dSmrg	shared_flag='-shared'
5055428d7b3dSmrg	if test "$aix_use_runtimelinking" = yes; then
5056428d7b3dSmrg	  shared_flag="$shared_flag "'${wl}-G'
5057428d7b3dSmrg	fi
5058428d7b3dSmrg	_LT_TAGVAR(link_all_deplibs, $1)=no
5059428d7b3dSmrg      else
5060428d7b3dSmrg	# not using gcc
5061428d7b3dSmrg	if test "$host_cpu" = ia64; then
5062428d7b3dSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5063428d7b3dSmrg	# chokes on -Wl,-G. The following line is correct:
5064428d7b3dSmrg	  shared_flag='-G'
5065428d7b3dSmrg	else
5066428d7b3dSmrg	  if test "$aix_use_runtimelinking" = yes; then
5067428d7b3dSmrg	    shared_flag='${wl}-G'
5068428d7b3dSmrg	  else
5069428d7b3dSmrg	    shared_flag='${wl}-bM:SRE'
5070428d7b3dSmrg	  fi
5071428d7b3dSmrg	fi
5072428d7b3dSmrg      fi
5073428d7b3dSmrg
5074428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5075428d7b3dSmrg      # It seems that -bexpall does not export symbols beginning with
5076428d7b3dSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5077428d7b3dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5078428d7b3dSmrg      if test "$aix_use_runtimelinking" = yes; then
5079428d7b3dSmrg	# Warning - without using the other runtime loading flags (-brtl),
5080428d7b3dSmrg	# -berok will link without error, but may produce a broken library.
5081428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5082428d7b3dSmrg        # Determine the default libpath from the value encoded in an
5083428d7b3dSmrg        # empty executable.
5084428d7b3dSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
5085428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5086428d7b3dSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5087428d7b3dSmrg      else
5088428d7b3dSmrg	if test "$host_cpu" = ia64; then
5089428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5090428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5091428d7b3dSmrg	  _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"
5092428d7b3dSmrg	else
5093428d7b3dSmrg	 # Determine the default libpath from the value encoded in an
5094428d7b3dSmrg	 # empty executable.
5095428d7b3dSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
5096428d7b3dSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5097428d7b3dSmrg	  # Warning - without using the other run time loading flags,
5098428d7b3dSmrg	  # -berok will link without error, but may produce a broken library.
5099428d7b3dSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5100428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5101428d7b3dSmrg	  if test "$with_gnu_ld" = yes; then
5102428d7b3dSmrg	    # We only use this code for GNU lds that support --whole-archive.
5103428d7b3dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5104428d7b3dSmrg	  else
5105428d7b3dSmrg	    # Exported symbols can be pulled into shared objects from archives
5106428d7b3dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5107428d7b3dSmrg	  fi
5108428d7b3dSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5109428d7b3dSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
5110428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5111428d7b3dSmrg	fi
5112428d7b3dSmrg      fi
5113428d7b3dSmrg      ;;
5114428d7b3dSmrg
5115428d7b3dSmrg    amigaos*)
5116428d7b3dSmrg      case $host_cpu in
5117428d7b3dSmrg      powerpc)
5118428d7b3dSmrg            # see comment about AmigaOS4 .so support
5119428d7b3dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5120428d7b3dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5121428d7b3dSmrg        ;;
5122428d7b3dSmrg      m68k)
5123428d7b3dSmrg            _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)'
5124428d7b3dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5125428d7b3dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5126428d7b3dSmrg        ;;
5127428d7b3dSmrg      esac
5128428d7b3dSmrg      ;;
5129428d7b3dSmrg
5130428d7b3dSmrg    bsdi[[45]]*)
5131428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5132428d7b3dSmrg      ;;
5133428d7b3dSmrg
5134428d7b3dSmrg    cygwin* | mingw* | pw32* | cegcc*)
5135428d7b3dSmrg      # When not using gcc, we currently assume that we are using
5136428d7b3dSmrg      # Microsoft Visual C++.
5137428d7b3dSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5138428d7b3dSmrg      # no search path for DLLs.
5139428d7b3dSmrg      case $cc_basename in
5140428d7b3dSmrg      cl*)
5141428d7b3dSmrg	# Native MSVC
5142428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5143428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5144428d7b3dSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
5145428d7b3dSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
5146428d7b3dSmrg	# Tell ltmain to make .lib files, not .a files.
5147428d7b3dSmrg	libext=lib
5148428d7b3dSmrg	# Tell ltmain to make .dll files, not .so files.
5149428d7b3dSmrg	shrext_cmds=".dll"
5150428d7b3dSmrg	# FIXME: Setting linknames here is a bad hack.
5151428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5152428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5153428d7b3dSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5154428d7b3dSmrg	  else
5155428d7b3dSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5156428d7b3dSmrg	  fi~
5157428d7b3dSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5158428d7b3dSmrg	  linknames='
5159428d7b3dSmrg	# The linker will not automatically build a static lib if we build a DLL.
5160428d7b3dSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5161428d7b3dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5162428d7b3dSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5163428d7b3dSmrg	_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'
5164428d7b3dSmrg	# Don't use ranlib
5165428d7b3dSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5166428d7b3dSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5167428d7b3dSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
5168428d7b3dSmrg	  case $lt_outputfile in
5169428d7b3dSmrg	    *.exe|*.EXE) ;;
5170428d7b3dSmrg	    *)
5171428d7b3dSmrg	      lt_outputfile="$lt_outputfile.exe"
5172428d7b3dSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
5173428d7b3dSmrg	      ;;
5174428d7b3dSmrg	  esac~
5175428d7b3dSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5176428d7b3dSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5177428d7b3dSmrg	    $RM "$lt_outputfile.manifest";
5178428d7b3dSmrg	  fi'
5179428d7b3dSmrg	;;
5180428d7b3dSmrg      *)
5181428d7b3dSmrg	# Assume MSVC wrapper
5182428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5183428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5184428d7b3dSmrg	# Tell ltmain to make .lib files, not .a files.
5185428d7b3dSmrg	libext=lib
5186428d7b3dSmrg	# Tell ltmain to make .dll files, not .so files.
5187428d7b3dSmrg	shrext_cmds=".dll"
5188428d7b3dSmrg	# FIXME: Setting linknames here is a bad hack.
5189428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5190428d7b3dSmrg	# The linker will automatically build a .lib file if we build a DLL.
5191428d7b3dSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5192428d7b3dSmrg	# FIXME: Should let the user specify the lib program.
5193428d7b3dSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5194428d7b3dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5195428d7b3dSmrg	;;
5196428d7b3dSmrg      esac
5197428d7b3dSmrg      ;;
5198428d7b3dSmrg
5199428d7b3dSmrg    darwin* | rhapsody*)
5200428d7b3dSmrg      _LT_DARWIN_LINKER_FEATURES($1)
5201428d7b3dSmrg      ;;
5202428d7b3dSmrg
5203428d7b3dSmrg    dgux*)
5204428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5205428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5206428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5207428d7b3dSmrg      ;;
5208428d7b3dSmrg
5209428d7b3dSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5210428d7b3dSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
5211428d7b3dSmrg    # does not break anything, and helps significantly (at the cost of a little
5212428d7b3dSmrg    # extra space).
5213428d7b3dSmrg    freebsd2.2*)
5214428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5215428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5216428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5217428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5218428d7b3dSmrg      ;;
5219428d7b3dSmrg
5220428d7b3dSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5221428d7b3dSmrg    freebsd2.*)
5222428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5223428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5224428d7b3dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5225428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5226428d7b3dSmrg      ;;
5227428d7b3dSmrg
5228428d7b3dSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5229428d7b3dSmrg    freebsd* | dragonfly*)
5230428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5231428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5232428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5233428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5234428d7b3dSmrg      ;;
5235428d7b3dSmrg
5236428d7b3dSmrg    hpux9*)
5237428d7b3dSmrg      if test "$GCC" = yes; then
5238428d7b3dSmrg	_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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5239428d7b3dSmrg      else
5240428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5241428d7b3dSmrg      fi
5242428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5243428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5244428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5245428d7b3dSmrg
5246428d7b3dSmrg      # hardcode_minus_L: Not really in the search PATH,
5247428d7b3dSmrg      # but as the default location of the library.
5248428d7b3dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5249428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5250428d7b3dSmrg      ;;
5251428d7b3dSmrg
5252428d7b3dSmrg    hpux10*)
5253428d7b3dSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5254428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5255428d7b3dSmrg      else
5256428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5257428d7b3dSmrg      fi
5258428d7b3dSmrg      if test "$with_gnu_ld" = no; then
5259428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5260428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5261428d7b3dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
5262428d7b3dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5263428d7b3dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5264428d7b3dSmrg	# hardcode_minus_L: Not really in the search PATH,
5265428d7b3dSmrg	# but as the default location of the library.
5266428d7b3dSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5267428d7b3dSmrg      fi
5268428d7b3dSmrg      ;;
5269428d7b3dSmrg
5270428d7b3dSmrg    hpux11*)
5271428d7b3dSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5272428d7b3dSmrg	case $host_cpu in
5273428d7b3dSmrg	hppa*64*)
5274428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5275428d7b3dSmrg	  ;;
5276428d7b3dSmrg	ia64*)
5277428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5278428d7b3dSmrg	  ;;
5279428d7b3dSmrg	*)
5280428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5281428d7b3dSmrg	  ;;
5282428d7b3dSmrg	esac
5283428d7b3dSmrg      else
5284428d7b3dSmrg	case $host_cpu in
5285428d7b3dSmrg	hppa*64*)
5286428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5287428d7b3dSmrg	  ;;
5288428d7b3dSmrg	ia64*)
5289428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5290428d7b3dSmrg	  ;;
5291428d7b3dSmrg	*)
5292428d7b3dSmrg	m4_if($1, [], [
5293428d7b3dSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
5294428d7b3dSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5295428d7b3dSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
5296428d7b3dSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5297428d7b3dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5298428d7b3dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5299428d7b3dSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5300428d7b3dSmrg	  ;;
5301428d7b3dSmrg	esac
5302428d7b3dSmrg      fi
5303428d7b3dSmrg      if test "$with_gnu_ld" = no; then
5304428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5305428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5306428d7b3dSmrg
5307428d7b3dSmrg	case $host_cpu in
5308428d7b3dSmrg	hppa*64*|ia64*)
5309428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5310428d7b3dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5311428d7b3dSmrg	  ;;
5312428d7b3dSmrg	*)
5313428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
5314428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5315428d7b3dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5316428d7b3dSmrg
5317428d7b3dSmrg	  # hardcode_minus_L: Not really in the search PATH,
5318428d7b3dSmrg	  # but as the default location of the library.
5319428d7b3dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5320428d7b3dSmrg	  ;;
5321428d7b3dSmrg	esac
5322428d7b3dSmrg      fi
5323428d7b3dSmrg      ;;
5324428d7b3dSmrg
5325428d7b3dSmrg    irix5* | irix6* | nonstopux*)
5326428d7b3dSmrg      if test "$GCC" = yes; then
5327428d7b3dSmrg	_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'
5328428d7b3dSmrg	# Try to use the -exported_symbol ld option, if it does not
5329428d7b3dSmrg	# work, assume that -exports_file does not work either and
5330428d7b3dSmrg	# implicitly export all symbols.
5331428d7b3dSmrg	# This should be the same for all languages, so no per-tag cache variable.
5332428d7b3dSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5333428d7b3dSmrg	  [lt_cv_irix_exported_symbol],
5334428d7b3dSmrg	  [save_LDFLAGS="$LDFLAGS"
5335428d7b3dSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5336428d7b3dSmrg	   AC_LINK_IFELSE(
5337428d7b3dSmrg	     [AC_LANG_SOURCE(
5338428d7b3dSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5339428d7b3dSmrg			      [C++], [[int foo (void) { return 0; }]],
5340428d7b3dSmrg			      [Fortran 77], [[
5341428d7b3dSmrg      subroutine foo
5342428d7b3dSmrg      end]],
5343428d7b3dSmrg			      [Fortran], [[
5344428d7b3dSmrg      subroutine foo
5345428d7b3dSmrg      end]])])],
5346428d7b3dSmrg	      [lt_cv_irix_exported_symbol=yes],
5347428d7b3dSmrg	      [lt_cv_irix_exported_symbol=no])
5348428d7b3dSmrg           LDFLAGS="$save_LDFLAGS"])
5349428d7b3dSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
5350428d7b3dSmrg          _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'
5351428d7b3dSmrg	fi
5352428d7b3dSmrg      else
5353428d7b3dSmrg	_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'
5354428d7b3dSmrg	_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'
5355428d7b3dSmrg      fi
5356428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5357428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5358428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5359428d7b3dSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
5360428d7b3dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5361428d7b3dSmrg      ;;
5362428d7b3dSmrg
5363428d7b3dSmrg    netbsd* | netbsdelf*-gnu)
5364428d7b3dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5365428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5366428d7b3dSmrg      else
5367428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5368428d7b3dSmrg      fi
5369428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5370428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5371428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5372428d7b3dSmrg      ;;
5373428d7b3dSmrg
5374428d7b3dSmrg    newsos6)
5375428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5376428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5377428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5378428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5379428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5380428d7b3dSmrg      ;;
5381428d7b3dSmrg
5382428d7b3dSmrg    *nto* | *qnx*)
5383428d7b3dSmrg      ;;
5384428d7b3dSmrg
5385428d7b3dSmrg    openbsd*)
5386428d7b3dSmrg      if test -f /usr/libexec/ld.so; then
5387428d7b3dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
5388428d7b3dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5389428d7b3dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5390428d7b3dSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5391428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5392428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5393428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5394428d7b3dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5395428d7b3dSmrg	else
5396428d7b3dSmrg	  case $host_os in
5397428d7b3dSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5398428d7b3dSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5399428d7b3dSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5400428d7b3dSmrg	     ;;
5401428d7b3dSmrg	   *)
5402428d7b3dSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5403428d7b3dSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5404428d7b3dSmrg	     ;;
5405428d7b3dSmrg	  esac
5406428d7b3dSmrg	fi
5407428d7b3dSmrg      else
5408428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5409428d7b3dSmrg      fi
5410428d7b3dSmrg      ;;
5411428d7b3dSmrg
5412428d7b3dSmrg    os2*)
5413428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5414428d7b3dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5415428d7b3dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5416428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5417428d7b3dSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5418428d7b3dSmrg      ;;
5419428d7b3dSmrg
5420428d7b3dSmrg    osf3*)
5421428d7b3dSmrg      if test "$GCC" = yes; then
5422428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5423428d7b3dSmrg	_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'
5424428d7b3dSmrg      else
5425428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5426428d7b3dSmrg	_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'
5427428d7b3dSmrg      fi
5428428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5429428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5430428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5431428d7b3dSmrg      ;;
5432428d7b3dSmrg
5433428d7b3dSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5434428d7b3dSmrg      if test "$GCC" = yes; then
5435428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5436428d7b3dSmrg	_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'
5437428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5438428d7b3dSmrg      else
5439428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5440428d7b3dSmrg	_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'
5441428d7b3dSmrg	_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~
5442428d7b3dSmrg	$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'
5443428d7b3dSmrg
5444428d7b3dSmrg	# Both c and cxx compiler support -rpath directly
5445428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5446428d7b3dSmrg      fi
5447428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5448428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5449428d7b3dSmrg      ;;
5450428d7b3dSmrg
5451428d7b3dSmrg    solaris*)
5452428d7b3dSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5453428d7b3dSmrg      if test "$GCC" = yes; then
5454428d7b3dSmrg	wlarc='${wl}'
5455428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5456428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5457428d7b3dSmrg	  $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'
5458428d7b3dSmrg      else
5459428d7b3dSmrg	case `$CC -V 2>&1` in
5460428d7b3dSmrg	*"Compilers 5.0"*)
5461428d7b3dSmrg	  wlarc=''
5462428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5463428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5464428d7b3dSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5465428d7b3dSmrg	  ;;
5466428d7b3dSmrg	*)
5467428d7b3dSmrg	  wlarc='${wl}'
5468428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5469428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5470428d7b3dSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5471428d7b3dSmrg	  ;;
5472428d7b3dSmrg	esac
5473428d7b3dSmrg      fi
5474428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5475428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5476428d7b3dSmrg      case $host_os in
5477428d7b3dSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5478428d7b3dSmrg      *)
5479428d7b3dSmrg	# The compiler driver will combine and reorder linker options,
5480428d7b3dSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5481428d7b3dSmrg	# but is careful enough not to reorder.
5482428d7b3dSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
5483428d7b3dSmrg	if test "$GCC" = yes; then
5484428d7b3dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5485428d7b3dSmrg	else
5486428d7b3dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5487428d7b3dSmrg	fi
5488428d7b3dSmrg	;;
5489428d7b3dSmrg      esac
5490428d7b3dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5491428d7b3dSmrg      ;;
5492428d7b3dSmrg
5493428d7b3dSmrg    sunos4*)
5494428d7b3dSmrg      if test "x$host_vendor" = xsequent; then
5495428d7b3dSmrg	# Use $CC to link under sequent, because it throws in some extra .o
5496428d7b3dSmrg	# files that make .init and .fini sections work.
5497428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5498428d7b3dSmrg      else
5499428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5500428d7b3dSmrg      fi
5501428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5502428d7b3dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5503428d7b3dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5504428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5505428d7b3dSmrg      ;;
5506428d7b3dSmrg
5507428d7b3dSmrg    sysv4)
5508428d7b3dSmrg      case $host_vendor in
5509428d7b3dSmrg	sni)
5510428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5511428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5512428d7b3dSmrg	;;
5513428d7b3dSmrg	siemens)
5514428d7b3dSmrg	  ## LD is ld it makes a PLAMLIB
5515428d7b3dSmrg	  ## CC just makes a GrossModule.
5516428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5517428d7b3dSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5518428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5519428d7b3dSmrg        ;;
5520428d7b3dSmrg	motorola)
5521428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5522428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5523428d7b3dSmrg	;;
5524428d7b3dSmrg      esac
5525428d7b3dSmrg      runpath_var='LD_RUN_PATH'
5526428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5527428d7b3dSmrg      ;;
5528428d7b3dSmrg
5529428d7b3dSmrg    sysv4.3*)
5530428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5531428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5532428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5533428d7b3dSmrg      ;;
5534428d7b3dSmrg
5535428d7b3dSmrg    sysv4*MP*)
5536428d7b3dSmrg      if test -d /usr/nec; then
5537428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5538428d7b3dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5539428d7b3dSmrg	runpath_var=LD_RUN_PATH
5540428d7b3dSmrg	hardcode_runpath_var=yes
5541428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5542428d7b3dSmrg      fi
5543428d7b3dSmrg      ;;
5544428d7b3dSmrg
5545428d7b3dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5546428d7b3dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5547428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5548428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5549428d7b3dSmrg      runpath_var='LD_RUN_PATH'
5550428d7b3dSmrg
5551428d7b3dSmrg      if test "$GCC" = yes; then
5552428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5553428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5554428d7b3dSmrg      else
5555428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5556428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5557428d7b3dSmrg      fi
5558428d7b3dSmrg      ;;
5559428d7b3dSmrg
5560428d7b3dSmrg    sysv5* | sco3.2v5* | sco5v6*)
5561428d7b3dSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
5562428d7b3dSmrg      # link with -lc, and that would cause any symbols used from libc to
5563428d7b3dSmrg      # always be unresolved, which means just about no library would
5564428d7b3dSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
5565428d7b3dSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
5566428d7b3dSmrg      # as -z defs.
5567428d7b3dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5568428d7b3dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5569428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5570428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5571428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5572428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5573428d7b3dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5574428d7b3dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5575428d7b3dSmrg      runpath_var='LD_RUN_PATH'
5576428d7b3dSmrg
5577428d7b3dSmrg      if test "$GCC" = yes; then
5578428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5579428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5580428d7b3dSmrg      else
5581428d7b3dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5582428d7b3dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5583428d7b3dSmrg      fi
5584428d7b3dSmrg      ;;
5585428d7b3dSmrg
5586428d7b3dSmrg    uts4*)
5587428d7b3dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5588428d7b3dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5589428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5590428d7b3dSmrg      ;;
5591428d7b3dSmrg
5592428d7b3dSmrg    *)
5593428d7b3dSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
5594428d7b3dSmrg      ;;
5595428d7b3dSmrg    esac
5596428d7b3dSmrg
5597428d7b3dSmrg    if test x$host_vendor = xsni; then
5598428d7b3dSmrg      case $host in
5599428d7b3dSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5600428d7b3dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5601428d7b3dSmrg	;;
5602428d7b3dSmrg      esac
5603428d7b3dSmrg    fi
5604428d7b3dSmrg  fi
5605428d7b3dSmrg])
5606428d7b3dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5607428d7b3dSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5608428d7b3dSmrg
5609428d7b3dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5610428d7b3dSmrg
5611428d7b3dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5612428d7b3dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5613428d7b3dSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
5614428d7b3dSmrg    [The commands to extract the exported symbol list from a shared archive])
5615428d7b3dSmrg
5616428d7b3dSmrg#
5617428d7b3dSmrg# Do we need to explicitly link libc?
5618428d7b3dSmrg#
5619428d7b3dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5620428d7b3dSmrgx|xyes)
5621428d7b3dSmrg  # Assume -lc should be added
5622428d7b3dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5623428d7b3dSmrg
5624428d7b3dSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5625428d7b3dSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
5626428d7b3dSmrg    *'~'*)
5627428d7b3dSmrg      # FIXME: we may have to deal with multi-command sequences.
5628428d7b3dSmrg      ;;
5629428d7b3dSmrg    '$CC '*)
5630428d7b3dSmrg      # Test whether the compiler implicitly links with -lc since on some
5631428d7b3dSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5632428d7b3dSmrg      # to ld, don't add -lc before -lgcc.
5633428d7b3dSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5634428d7b3dSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5635428d7b3dSmrg	[$RM conftest*
5636428d7b3dSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5637428d7b3dSmrg
5638428d7b3dSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5639428d7b3dSmrg	  soname=conftest
5640428d7b3dSmrg	  lib=conftest
5641428d7b3dSmrg	  libobjs=conftest.$ac_objext
5642428d7b3dSmrg	  deplibs=
5643428d7b3dSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5644428d7b3dSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5645428d7b3dSmrg	  compiler_flags=-v
5646428d7b3dSmrg	  linker_flags=-v
5647428d7b3dSmrg	  verstring=
5648428d7b3dSmrg	  output_objdir=.
5649428d7b3dSmrg	  libname=conftest
5650428d7b3dSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5651428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
5652428d7b3dSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5653428d7b3dSmrg	  then
5654428d7b3dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5655428d7b3dSmrg	  else
5656428d7b3dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5657428d7b3dSmrg	  fi
5658428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5659428d7b3dSmrg	else
5660428d7b3dSmrg	  cat conftest.err 1>&5
5661428d7b3dSmrg	fi
5662428d7b3dSmrg	$RM conftest*
5663428d7b3dSmrg	])
5664428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5665428d7b3dSmrg      ;;
5666428d7b3dSmrg    esac
5667428d7b3dSmrg  fi
5668428d7b3dSmrg  ;;
5669428d7b3dSmrgesac
5670428d7b3dSmrg
5671428d7b3dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5672428d7b3dSmrg    [Whether or not to add -lc for building shared libraries])
5673428d7b3dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5674428d7b3dSmrg    [enable_shared_with_static_runtimes], [0],
5675428d7b3dSmrg    [Whether or not to disallow shared libs when runtime libs are static])
5676428d7b3dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5677428d7b3dSmrg    [Compiler flag to allow reflexive dlopens])
5678428d7b3dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5679428d7b3dSmrg    [Compiler flag to generate shared objects directly from archives])
5680428d7b3dSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
5681428d7b3dSmrg    [Whether the compiler copes with passing no objects directly])
5682428d7b3dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5683428d7b3dSmrg    [Create an old-style archive from a shared archive])
5684428d7b3dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5685428d7b3dSmrg    [Create a temporary old-style archive to link instead of a shared archive])
5686428d7b3dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5687428d7b3dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5688428d7b3dSmrg_LT_TAGDECL([], [module_cmds], [2],
5689428d7b3dSmrg    [Commands used to build a loadable module if different from building
5690428d7b3dSmrg    a shared archive.])
5691428d7b3dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5692428d7b3dSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
5693428d7b3dSmrg    [Whether we are building with GNU ld or not])
5694428d7b3dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5695428d7b3dSmrg    [Flag that allows shared libraries with undefined symbols to be built])
5696428d7b3dSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
5697428d7b3dSmrg    [Flag that enforces no undefined symbols])
5698428d7b3dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5699428d7b3dSmrg    [Flag to hardcode $libdir into a binary during linking.
5700428d7b3dSmrg    This must work even if $libdir does not exist])
5701428d7b3dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5702428d7b3dSmrg    [Whether we need a single "-rpath" flag with a separated argument])
5703428d7b3dSmrg_LT_TAGDECL([], [hardcode_direct], [0],
5704428d7b3dSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5705428d7b3dSmrg    DIR into the resulting binary])
5706428d7b3dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5707428d7b3dSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5708428d7b3dSmrg    DIR into the resulting binary and the resulting library dependency is
5709428d7b3dSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5710428d7b3dSmrg    library is relocated])
5711428d7b3dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5712428d7b3dSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5713428d7b3dSmrg    into the resulting binary])
5714428d7b3dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5715428d7b3dSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5716428d7b3dSmrg    into the resulting binary])
5717428d7b3dSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
5718428d7b3dSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5719428d7b3dSmrg    into the library and all subsequent libraries and executables linked
5720428d7b3dSmrg    against it])
5721428d7b3dSmrg_LT_TAGDECL([], [inherit_rpath], [0],
5722428d7b3dSmrg    [Set to yes if linker adds runtime paths of dependent libraries
5723428d7b3dSmrg    to runtime path list])
5724428d7b3dSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
5725428d7b3dSmrg    [Whether libtool must link a program against all its dependency libraries])
5726428d7b3dSmrg_LT_TAGDECL([], [always_export_symbols], [0],
5727428d7b3dSmrg    [Set to "yes" if exported symbols are required])
5728428d7b3dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5729428d7b3dSmrg    [The commands to list exported symbols])
5730428d7b3dSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
5731428d7b3dSmrg    [Symbols that should not be listed in the preloaded symbols])
5732428d7b3dSmrg_LT_TAGDECL([], [include_expsyms], [1],
5733428d7b3dSmrg    [Symbols that must always be exported])
5734428d7b3dSmrg_LT_TAGDECL([], [prelink_cmds], [2],
5735428d7b3dSmrg    [Commands necessary for linking programs (against libraries) with templates])
5736428d7b3dSmrg_LT_TAGDECL([], [postlink_cmds], [2],
5737428d7b3dSmrg    [Commands necessary for finishing linking programs])
5738428d7b3dSmrg_LT_TAGDECL([], [file_list_spec], [1],
5739428d7b3dSmrg    [Specify filename containing input files])
5740428d7b3dSmrgdnl FIXME: Not yet implemented
5741428d7b3dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5742428d7b3dSmrgdnl    [Compiler flag to generate thread safe objects])
5743428d7b3dSmrg])# _LT_LINKER_SHLIBS
5744428d7b3dSmrg
5745428d7b3dSmrg
5746428d7b3dSmrg# _LT_LANG_C_CONFIG([TAG])
5747428d7b3dSmrg# ------------------------
5748428d7b3dSmrg# Ensure that the configuration variables for a C compiler are suitably
5749428d7b3dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5750428d7b3dSmrg# the compiler configuration to `libtool'.
5751428d7b3dSmrgm4_defun([_LT_LANG_C_CONFIG],
5752428d7b3dSmrg[m4_require([_LT_DECL_EGREP])dnl
5753428d7b3dSmrglt_save_CC="$CC"
5754428d7b3dSmrgAC_LANG_PUSH(C)
5755428d7b3dSmrg
5756428d7b3dSmrg# Source file extension for C test sources.
5757428d7b3dSmrgac_ext=c
5758428d7b3dSmrg
5759428d7b3dSmrg# Object file extension for compiled C test sources.
5760428d7b3dSmrgobjext=o
5761428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
5762428d7b3dSmrg
5763428d7b3dSmrg# Code to be used in simple compile tests
5764428d7b3dSmrglt_simple_compile_test_code="int some_variable = 0;"
5765428d7b3dSmrg
5766428d7b3dSmrg# Code to be used in simple link tests
5767428d7b3dSmrglt_simple_link_test_code='int main(){return(0);}'
5768428d7b3dSmrg
5769428d7b3dSmrg_LT_TAG_COMPILER
5770428d7b3dSmrg# Save the default compiler, since it gets overwritten when the other
5771428d7b3dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5772428d7b3dSmrgcompiler_DEFAULT=$CC
5773428d7b3dSmrg
5774428d7b3dSmrg# save warnings/boilerplate of simple test code
5775428d7b3dSmrg_LT_COMPILER_BOILERPLATE
5776428d7b3dSmrg_LT_LINKER_BOILERPLATE
5777428d7b3dSmrg
5778428d7b3dSmrg## CAVEAT EMPTOR:
5779428d7b3dSmrg## There is no encapsulation within the following macros, do not change
5780428d7b3dSmrg## the running order or otherwise move them around unless you know exactly
5781428d7b3dSmrg## what you are doing...
5782428d7b3dSmrgif test -n "$compiler"; then
5783428d7b3dSmrg  _LT_COMPILER_NO_RTTI($1)
5784428d7b3dSmrg  _LT_COMPILER_PIC($1)
5785428d7b3dSmrg  _LT_COMPILER_C_O($1)
5786428d7b3dSmrg  _LT_COMPILER_FILE_LOCKS($1)
5787428d7b3dSmrg  _LT_LINKER_SHLIBS($1)
5788428d7b3dSmrg  _LT_SYS_DYNAMIC_LINKER($1)
5789428d7b3dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5790428d7b3dSmrg  LT_SYS_DLOPEN_SELF
5791428d7b3dSmrg  _LT_CMD_STRIPLIB
5792428d7b3dSmrg
5793428d7b3dSmrg  # Report which library types will actually be built
5794428d7b3dSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5795428d7b3dSmrg  AC_MSG_RESULT([$can_build_shared])
5796428d7b3dSmrg
5797428d7b3dSmrg  AC_MSG_CHECKING([whether to build shared libraries])
5798428d7b3dSmrg  test "$can_build_shared" = "no" && enable_shared=no
5799428d7b3dSmrg
5800428d7b3dSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
5801428d7b3dSmrg  # are all built from PIC.
5802428d7b3dSmrg  case $host_os in
5803428d7b3dSmrg  aix3*)
5804428d7b3dSmrg    test "$enable_shared" = yes && enable_static=no
5805428d7b3dSmrg    if test -n "$RANLIB"; then
5806428d7b3dSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5807428d7b3dSmrg      postinstall_cmds='$RANLIB $lib'
5808428d7b3dSmrg    fi
5809428d7b3dSmrg    ;;
5810428d7b3dSmrg
5811428d7b3dSmrg  aix[[4-9]]*)
5812428d7b3dSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5813428d7b3dSmrg      test "$enable_shared" = yes && enable_static=no
5814428d7b3dSmrg    fi
5815428d7b3dSmrg    ;;
5816428d7b3dSmrg  esac
5817428d7b3dSmrg  AC_MSG_RESULT([$enable_shared])
5818428d7b3dSmrg
5819428d7b3dSmrg  AC_MSG_CHECKING([whether to build static libraries])
5820428d7b3dSmrg  # Make sure either enable_shared or enable_static is yes.
5821428d7b3dSmrg  test "$enable_shared" = yes || enable_static=yes
5822428d7b3dSmrg  AC_MSG_RESULT([$enable_static])
5823428d7b3dSmrg
5824428d7b3dSmrg  _LT_CONFIG($1)
5825428d7b3dSmrgfi
5826428d7b3dSmrgAC_LANG_POP
5827428d7b3dSmrgCC="$lt_save_CC"
5828428d7b3dSmrg])# _LT_LANG_C_CONFIG
5829428d7b3dSmrg
5830428d7b3dSmrg
5831428d7b3dSmrg# _LT_LANG_CXX_CONFIG([TAG])
5832428d7b3dSmrg# --------------------------
5833428d7b3dSmrg# Ensure that the configuration variables for a C++ compiler are suitably
5834428d7b3dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5835428d7b3dSmrg# the compiler configuration to `libtool'.
5836428d7b3dSmrgm4_defun([_LT_LANG_CXX_CONFIG],
5837428d7b3dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5838428d7b3dSmrgm4_require([_LT_DECL_EGREP])dnl
5839428d7b3dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
5840428d7b3dSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5841428d7b3dSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5842428d7b3dSmrg    (test "X$CXX" != "Xg++"))) ; then
5843428d7b3dSmrg  AC_PROG_CXXCPP
5844428d7b3dSmrgelse
5845428d7b3dSmrg  _lt_caught_CXX_error=yes
5846428d7b3dSmrgfi
5847428d7b3dSmrg
5848428d7b3dSmrgAC_LANG_PUSH(C++)
5849428d7b3dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5850428d7b3dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
5851428d7b3dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
5852428d7b3dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5853428d7b3dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
5854428d7b3dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5855428d7b3dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
5856428d7b3dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5857428d7b3dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5858428d7b3dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5859428d7b3dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5860428d7b3dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5861428d7b3dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
5862428d7b3dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
5863428d7b3dSmrg_LT_TAGVAR(module_cmds, $1)=
5864428d7b3dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
5865428d7b3dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5866428d7b3dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5867428d7b3dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
5868428d7b3dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5869428d7b3dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
5870428d7b3dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5871428d7b3dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5872428d7b3dSmrg
5873428d7b3dSmrg# Source file extension for C++ test sources.
5874428d7b3dSmrgac_ext=cpp
5875428d7b3dSmrg
5876428d7b3dSmrg# Object file extension for compiled C++ test sources.
5877428d7b3dSmrgobjext=o
5878428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
5879428d7b3dSmrg
5880428d7b3dSmrg# No sense in running all these tests if we already determined that
5881428d7b3dSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5882428d7b3dSmrg# are currently assumed to apply to all compilers on this platform,
5883428d7b3dSmrg# and will be corrupted by setting them based on a non-working compiler.
5884428d7b3dSmrgif test "$_lt_caught_CXX_error" != yes; then
5885428d7b3dSmrg  # Code to be used in simple compile tests
5886428d7b3dSmrg  lt_simple_compile_test_code="int some_variable = 0;"
5887428d7b3dSmrg
5888428d7b3dSmrg  # Code to be used in simple link tests
5889428d7b3dSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5890428d7b3dSmrg
5891428d7b3dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5892428d7b3dSmrg  _LT_TAG_COMPILER
5893428d7b3dSmrg
5894428d7b3dSmrg  # save warnings/boilerplate of simple test code
5895428d7b3dSmrg  _LT_COMPILER_BOILERPLATE
5896428d7b3dSmrg  _LT_LINKER_BOILERPLATE
5897428d7b3dSmrg
5898428d7b3dSmrg  # Allow CC to be a program name with arguments.
5899428d7b3dSmrg  lt_save_CC=$CC
5900428d7b3dSmrg  lt_save_CFLAGS=$CFLAGS
5901428d7b3dSmrg  lt_save_LD=$LD
5902428d7b3dSmrg  lt_save_GCC=$GCC
5903428d7b3dSmrg  GCC=$GXX
5904428d7b3dSmrg  lt_save_with_gnu_ld=$with_gnu_ld
5905428d7b3dSmrg  lt_save_path_LD=$lt_cv_path_LD
5906428d7b3dSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5907428d7b3dSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5908428d7b3dSmrg  else
5909428d7b3dSmrg    $as_unset lt_cv_prog_gnu_ld
5910428d7b3dSmrg  fi
5911428d7b3dSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5912428d7b3dSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5913428d7b3dSmrg  else
5914428d7b3dSmrg    $as_unset lt_cv_path_LD
5915428d7b3dSmrg  fi
5916428d7b3dSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
5917428d7b3dSmrg  CC=${CXX-"c++"}
5918428d7b3dSmrg  CFLAGS=$CXXFLAGS
5919428d7b3dSmrg  compiler=$CC
5920428d7b3dSmrg  _LT_TAGVAR(compiler, $1)=$CC
5921428d7b3dSmrg  _LT_CC_BASENAME([$compiler])
5922428d7b3dSmrg
5923428d7b3dSmrg  if test -n "$compiler"; then
5924428d7b3dSmrg    # We don't want -fno-exception when compiling C++ code, so set the
5925428d7b3dSmrg    # no_builtin_flag separately
5926428d7b3dSmrg    if test "$GXX" = yes; then
5927428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5928428d7b3dSmrg    else
5929428d7b3dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5930428d7b3dSmrg    fi
5931428d7b3dSmrg
5932428d7b3dSmrg    if test "$GXX" = yes; then
5933428d7b3dSmrg      # Set up default GNU C++ configuration
5934428d7b3dSmrg
5935428d7b3dSmrg      LT_PATH_LD
5936428d7b3dSmrg
5937428d7b3dSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5938428d7b3dSmrg      # archiving commands below assume that GNU ld is being used.
5939428d7b3dSmrg      if test "$with_gnu_ld" = yes; then
5940428d7b3dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5941428d7b3dSmrg        _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'
5942428d7b3dSmrg
5943428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5944428d7b3dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5945428d7b3dSmrg
5946428d7b3dSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5947428d7b3dSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5948428d7b3dSmrg        #     investigate it a little bit more. (MM)
5949428d7b3dSmrg        wlarc='${wl}'
5950428d7b3dSmrg
5951428d7b3dSmrg        # ancient GNU ld didn't support --whole-archive et. al.
5952428d7b3dSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5953428d7b3dSmrg	  $GREP 'no-whole-archive' > /dev/null; then
5954428d7b3dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5955428d7b3dSmrg        else
5956428d7b3dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5957428d7b3dSmrg        fi
5958428d7b3dSmrg      else
5959428d7b3dSmrg        with_gnu_ld=no
5960428d7b3dSmrg        wlarc=
5961428d7b3dSmrg
5962428d7b3dSmrg        # A generic and very simple default shared library creation
5963428d7b3dSmrg        # command for GNU C++ for the case where it uses the native
5964428d7b3dSmrg        # linker, instead of GNU ld.  If possible, this setting should
5965428d7b3dSmrg        # overridden to take advantage of the native linker features on
5966428d7b3dSmrg        # the platform it is being used on.
5967428d7b3dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5968428d7b3dSmrg      fi
5969428d7b3dSmrg
5970428d7b3dSmrg      # Commands to make compiler produce verbose output that lists
5971428d7b3dSmrg      # what "hidden" libraries, object files and flags are used when
5972428d7b3dSmrg      # linking a shared library.
5973428d7b3dSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5974428d7b3dSmrg
5975428d7b3dSmrg    else
5976428d7b3dSmrg      GXX=no
5977428d7b3dSmrg      with_gnu_ld=no
5978428d7b3dSmrg      wlarc=
5979428d7b3dSmrg    fi
5980428d7b3dSmrg
5981428d7b3dSmrg    # PORTME: fill in a description of your system's C++ link characteristics
5982428d7b3dSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5983428d7b3dSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5984428d7b3dSmrg    case $host_os in
5985428d7b3dSmrg      aix3*)
5986428d7b3dSmrg        # FIXME: insert proper C++ library support
5987428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5988428d7b3dSmrg        ;;
5989428d7b3dSmrg      aix[[4-9]]*)
5990428d7b3dSmrg        if test "$host_cpu" = ia64; then
5991428d7b3dSmrg          # On IA64, the linker does run time linking by default, so we don't
5992428d7b3dSmrg          # have to do anything special.
5993428d7b3dSmrg          aix_use_runtimelinking=no
5994428d7b3dSmrg          exp_sym_flag='-Bexport'
5995428d7b3dSmrg          no_entry_flag=""
5996428d7b3dSmrg        else
5997428d7b3dSmrg          aix_use_runtimelinking=no
5998428d7b3dSmrg
5999428d7b3dSmrg          # Test if we are trying to use run time linking or normal
6000428d7b3dSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6001428d7b3dSmrg          # need to do runtime linking.
6002428d7b3dSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6003428d7b3dSmrg	    for ld_flag in $LDFLAGS; do
6004428d7b3dSmrg	      case $ld_flag in
6005428d7b3dSmrg	      *-brtl*)
6006428d7b3dSmrg	        aix_use_runtimelinking=yes
6007428d7b3dSmrg	        break
6008428d7b3dSmrg	        ;;
6009428d7b3dSmrg	      esac
6010428d7b3dSmrg	    done
6011428d7b3dSmrg	    ;;
6012428d7b3dSmrg          esac
6013428d7b3dSmrg
6014428d7b3dSmrg          exp_sym_flag='-bexport'
6015428d7b3dSmrg          no_entry_flag='-bnoentry'
6016428d7b3dSmrg        fi
6017428d7b3dSmrg
6018428d7b3dSmrg        # When large executables or shared objects are built, AIX ld can
6019428d7b3dSmrg        # have problems creating the table of contents.  If linking a library
6020428d7b3dSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
6021428d7b3dSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6022428d7b3dSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6023428d7b3dSmrg
6024428d7b3dSmrg        _LT_TAGVAR(archive_cmds, $1)=''
6025428d7b3dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6026428d7b3dSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6027428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6028428d7b3dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6029428d7b3dSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6030428d7b3dSmrg
6031428d7b3dSmrg        if test "$GXX" = yes; then
6032428d7b3dSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6033428d7b3dSmrg          # We only want to do this on AIX 4.2 and lower, the check
6034428d7b3dSmrg          # below for broken collect2 doesn't work under 4.3+
6035428d7b3dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
6036428d7b3dSmrg	  if test -f "$collect2name" &&
6037428d7b3dSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6038428d7b3dSmrg	  then
6039428d7b3dSmrg	    # We have reworked collect2
6040428d7b3dSmrg	    :
6041428d7b3dSmrg	  else
6042428d7b3dSmrg	    # We have old collect2
6043428d7b3dSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6044428d7b3dSmrg	    # It fails to find uninstalled libraries when the uninstalled
6045428d7b3dSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
6046428d7b3dSmrg	    # to unsupported forces relinking
6047428d7b3dSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6048428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6049428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6050428d7b3dSmrg	  fi
6051428d7b3dSmrg          esac
6052428d7b3dSmrg          shared_flag='-shared'
6053428d7b3dSmrg	  if test "$aix_use_runtimelinking" = yes; then
6054428d7b3dSmrg	    shared_flag="$shared_flag "'${wl}-G'
6055428d7b3dSmrg	  fi
6056428d7b3dSmrg        else
6057428d7b3dSmrg          # not using gcc
6058428d7b3dSmrg          if test "$host_cpu" = ia64; then
6059428d7b3dSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6060428d7b3dSmrg	  # chokes on -Wl,-G. The following line is correct:
6061428d7b3dSmrg	  shared_flag='-G'
6062428d7b3dSmrg          else
6063428d7b3dSmrg	    if test "$aix_use_runtimelinking" = yes; then
6064428d7b3dSmrg	      shared_flag='${wl}-G'
6065428d7b3dSmrg	    else
6066428d7b3dSmrg	      shared_flag='${wl}-bM:SRE'
6067428d7b3dSmrg	    fi
6068428d7b3dSmrg          fi
6069428d7b3dSmrg        fi
6070428d7b3dSmrg
6071428d7b3dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6072428d7b3dSmrg        # It seems that -bexpall does not export symbols beginning with
6073428d7b3dSmrg        # underscore (_), so it is better to generate a list of symbols to
6074428d7b3dSmrg	# export.
6075428d7b3dSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
6076428d7b3dSmrg        if test "$aix_use_runtimelinking" = yes; then
6077428d7b3dSmrg          # Warning - without using the other runtime loading flags (-brtl),
6078428d7b3dSmrg          # -berok will link without error, but may produce a broken library.
6079428d7b3dSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6080428d7b3dSmrg          # Determine the default libpath from the value encoded in an empty
6081428d7b3dSmrg          # executable.
6082428d7b3dSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
6083428d7b3dSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6084428d7b3dSmrg
6085428d7b3dSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6086428d7b3dSmrg        else
6087428d7b3dSmrg          if test "$host_cpu" = ia64; then
6088428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6089428d7b3dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6090428d7b3dSmrg	    _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"
6091428d7b3dSmrg          else
6092428d7b3dSmrg	    # Determine the default libpath from the value encoded in an
6093428d7b3dSmrg	    # empty executable.
6094428d7b3dSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
6095428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6096428d7b3dSmrg	    # Warning - without using the other run time loading flags,
6097428d7b3dSmrg	    # -berok will link without error, but may produce a broken library.
6098428d7b3dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6099428d7b3dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6100428d7b3dSmrg	    if test "$with_gnu_ld" = yes; then
6101428d7b3dSmrg	      # We only use this code for GNU lds that support --whole-archive.
6102428d7b3dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6103428d7b3dSmrg	    else
6104428d7b3dSmrg	      # Exported symbols can be pulled into shared objects from archives
6105428d7b3dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6106428d7b3dSmrg	    fi
6107428d7b3dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6108428d7b3dSmrg	    # This is similar to how AIX traditionally builds its shared
6109428d7b3dSmrg	    # libraries.
6110428d7b3dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6111428d7b3dSmrg          fi
6112428d7b3dSmrg        fi
6113428d7b3dSmrg        ;;
6114428d7b3dSmrg
6115428d7b3dSmrg      beos*)
6116428d7b3dSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6117428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6118428d7b3dSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6119428d7b3dSmrg	  # support --undefined.  This deserves some investigation.  FIXME
6120428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6121428d7b3dSmrg	else
6122428d7b3dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6123428d7b3dSmrg	fi
6124428d7b3dSmrg	;;
6125428d7b3dSmrg
6126428d7b3dSmrg      chorus*)
6127428d7b3dSmrg        case $cc_basename in
6128428d7b3dSmrg          *)
6129428d7b3dSmrg	  # FIXME: insert proper C++ library support
6130428d7b3dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6131428d7b3dSmrg	  ;;
6132428d7b3dSmrg        esac
6133428d7b3dSmrg        ;;
6134428d7b3dSmrg
6135428d7b3dSmrg      cygwin* | mingw* | pw32* | cegcc*)
6136428d7b3dSmrg	case $GXX,$cc_basename in
6137428d7b3dSmrg	,cl* | no,cl*)
6138428d7b3dSmrg	  # Native MSVC
6139428d7b3dSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6140428d7b3dSmrg	  # no search path for DLLs.
6141428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6142428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6143428d7b3dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
6144428d7b3dSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
6145428d7b3dSmrg	  # Tell ltmain to make .lib files, not .a files.
6146428d7b3dSmrg	  libext=lib
6147428d7b3dSmrg	  # Tell ltmain to make .dll files, not .so files.
6148428d7b3dSmrg	  shrext_cmds=".dll"
6149428d7b3dSmrg	  # FIXME: Setting linknames here is a bad hack.
6150428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6151428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6152428d7b3dSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6153428d7b3dSmrg	    else
6154428d7b3dSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6155428d7b3dSmrg	    fi~
6156428d7b3dSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6157428d7b3dSmrg	    linknames='
6158428d7b3dSmrg	  # The linker will not automatically build a static lib if we build a DLL.
6159428d7b3dSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6160428d7b3dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6161428d7b3dSmrg	  # Don't use ranlib
6162428d7b3dSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6163428d7b3dSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6164428d7b3dSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
6165428d7b3dSmrg	    case $lt_outputfile in
6166428d7b3dSmrg	      *.exe|*.EXE) ;;
6167428d7b3dSmrg	      *)
6168428d7b3dSmrg		lt_outputfile="$lt_outputfile.exe"
6169428d7b3dSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
6170428d7b3dSmrg		;;
6171428d7b3dSmrg	    esac~
6172428d7b3dSmrg	    func_to_tool_file "$lt_outputfile"~
6173428d7b3dSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6174428d7b3dSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6175428d7b3dSmrg	      $RM "$lt_outputfile.manifest";
6176428d7b3dSmrg	    fi'
6177428d7b3dSmrg	  ;;
6178428d7b3dSmrg	*)
6179428d7b3dSmrg	  # g++
6180428d7b3dSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6181428d7b3dSmrg	  # as there is no search path for DLLs.
6182428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6183428d7b3dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6184428d7b3dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6185428d7b3dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
6186428d7b3dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6187428d7b3dSmrg
6188428d7b3dSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6189428d7b3dSmrg	    _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'
6190428d7b3dSmrg	    # If the export-symbols file already is a .def file (1st line
6191428d7b3dSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
6192428d7b3dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6193428d7b3dSmrg	      cp $export_symbols $output_objdir/$soname.def;
6194428d7b3dSmrg	    else
6195428d7b3dSmrg	      echo EXPORTS > $output_objdir/$soname.def;
6196428d7b3dSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
6197428d7b3dSmrg	    fi~
6198428d7b3dSmrg	    $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'
6199428d7b3dSmrg	  else
6200428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6201428d7b3dSmrg	  fi
6202428d7b3dSmrg	  ;;
6203428d7b3dSmrg	esac
6204428d7b3dSmrg	;;
6205428d7b3dSmrg      darwin* | rhapsody*)
6206428d7b3dSmrg        _LT_DARWIN_LINKER_FEATURES($1)
6207428d7b3dSmrg	;;
6208428d7b3dSmrg
6209428d7b3dSmrg      dgux*)
6210428d7b3dSmrg        case $cc_basename in
6211428d7b3dSmrg          ec++*)
6212428d7b3dSmrg	    # FIXME: insert proper C++ library support
6213428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6214428d7b3dSmrg	    ;;
6215428d7b3dSmrg          ghcx*)
6216428d7b3dSmrg	    # Green Hills C++ Compiler
6217428d7b3dSmrg	    # FIXME: insert proper C++ library support
6218428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6219428d7b3dSmrg	    ;;
6220428d7b3dSmrg          *)
6221428d7b3dSmrg	    # FIXME: insert proper C++ library support
6222428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6223428d7b3dSmrg	    ;;
6224428d7b3dSmrg        esac
6225428d7b3dSmrg        ;;
6226428d7b3dSmrg
6227428d7b3dSmrg      freebsd2.*)
6228428d7b3dSmrg        # C++ shared libraries reported to be fairly broken before
6229428d7b3dSmrg	# switch to ELF
6230428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6231428d7b3dSmrg        ;;
6232428d7b3dSmrg
6233428d7b3dSmrg      freebsd-elf*)
6234428d7b3dSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6235428d7b3dSmrg        ;;
6236428d7b3dSmrg
6237428d7b3dSmrg      freebsd* | dragonfly*)
6238428d7b3dSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6239428d7b3dSmrg        # conventions
6240428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6241428d7b3dSmrg        ;;
6242428d7b3dSmrg
6243428d7b3dSmrg      haiku*)
6244428d7b3dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6245428d7b3dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6246428d7b3dSmrg        ;;
6247428d7b3dSmrg
6248428d7b3dSmrg      hpux9*)
6249428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6250428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6251428d7b3dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6252428d7b3dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6253428d7b3dSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6254428d7b3dSmrg				             # but as the default
6255428d7b3dSmrg				             # location of the library.
6256428d7b3dSmrg
6257428d7b3dSmrg        case $cc_basename in
6258428d7b3dSmrg          CC*)
6259428d7b3dSmrg            # FIXME: insert proper C++ library support
6260428d7b3dSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
6261428d7b3dSmrg            ;;
6262428d7b3dSmrg          aCC*)
6263428d7b3dSmrg            _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6264428d7b3dSmrg            # Commands to make compiler produce verbose output that lists
6265428d7b3dSmrg            # what "hidden" libraries, object files and flags are used when
6266428d7b3dSmrg            # linking a shared library.
6267428d7b3dSmrg            #
6268428d7b3dSmrg            # There doesn't appear to be a way to prevent this compiler from
6269428d7b3dSmrg            # explicitly linking system object files so we need to strip them
6270428d7b3dSmrg            # from the output so that they don't get included in the library
6271428d7b3dSmrg            # dependencies.
6272428d7b3dSmrg            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"'
6273428d7b3dSmrg            ;;
6274428d7b3dSmrg          *)
6275428d7b3dSmrg            if test "$GXX" = yes; then
6276428d7b3dSmrg              _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6277428d7b3dSmrg            else
6278428d7b3dSmrg              # FIXME: insert proper C++ library support
6279428d7b3dSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
6280428d7b3dSmrg            fi
6281428d7b3dSmrg            ;;
6282428d7b3dSmrg        esac
6283428d7b3dSmrg        ;;
6284428d7b3dSmrg
6285428d7b3dSmrg      hpux10*|hpux11*)
6286428d7b3dSmrg        if test $with_gnu_ld = no; then
6287428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6288428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6289428d7b3dSmrg
6290428d7b3dSmrg          case $host_cpu in
6291428d7b3dSmrg            hppa*64*|ia64*)
6292428d7b3dSmrg              ;;
6293428d7b3dSmrg            *)
6294428d7b3dSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6295428d7b3dSmrg              ;;
6296428d7b3dSmrg          esac
6297428d7b3dSmrg        fi
6298428d7b3dSmrg        case $host_cpu in
6299428d7b3dSmrg          hppa*64*|ia64*)
6300428d7b3dSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
6301428d7b3dSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6302428d7b3dSmrg            ;;
6303428d7b3dSmrg          *)
6304428d7b3dSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
6305428d7b3dSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6306428d7b3dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6307428d7b3dSmrg					         # but as the default
6308428d7b3dSmrg					         # location of the library.
6309428d7b3dSmrg            ;;
6310428d7b3dSmrg        esac
6311428d7b3dSmrg
6312428d7b3dSmrg        case $cc_basename in
6313428d7b3dSmrg          CC*)
6314428d7b3dSmrg	    # FIXME: insert proper C++ library support
6315428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6316428d7b3dSmrg	    ;;
6317428d7b3dSmrg          aCC*)
6318428d7b3dSmrg	    case $host_cpu in
6319428d7b3dSmrg	      hppa*64*)
6320428d7b3dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6321428d7b3dSmrg	        ;;
6322428d7b3dSmrg	      ia64*)
6323428d7b3dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6324428d7b3dSmrg	        ;;
6325428d7b3dSmrg	      *)
6326428d7b3dSmrg	        _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'
6327428d7b3dSmrg	        ;;
6328428d7b3dSmrg	    esac
6329428d7b3dSmrg	    # Commands to make compiler produce verbose output that lists
6330428d7b3dSmrg	    # what "hidden" libraries, object files and flags are used when
6331428d7b3dSmrg	    # linking a shared library.
6332428d7b3dSmrg	    #
6333428d7b3dSmrg	    # There doesn't appear to be a way to prevent this compiler from
6334428d7b3dSmrg	    # explicitly linking system object files so we need to strip them
6335428d7b3dSmrg	    # from the output so that they don't get included in the library
6336428d7b3dSmrg	    # dependencies.
6337428d7b3dSmrg	    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"'
6338428d7b3dSmrg	    ;;
6339428d7b3dSmrg          *)
6340428d7b3dSmrg	    if test "$GXX" = yes; then
6341428d7b3dSmrg	      if test $with_gnu_ld = no; then
6342428d7b3dSmrg	        case $host_cpu in
6343428d7b3dSmrg	          hppa*64*)
6344428d7b3dSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6345428d7b3dSmrg	            ;;
6346428d7b3dSmrg	          ia64*)
6347428d7b3dSmrg	            _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'
6348428d7b3dSmrg	            ;;
6349428d7b3dSmrg	          *)
6350428d7b3dSmrg	            _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'
6351428d7b3dSmrg	            ;;
6352428d7b3dSmrg	        esac
6353428d7b3dSmrg	      fi
6354428d7b3dSmrg	    else
6355428d7b3dSmrg	      # FIXME: insert proper C++ library support
6356428d7b3dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6357428d7b3dSmrg	    fi
6358428d7b3dSmrg	    ;;
6359428d7b3dSmrg        esac
6360428d7b3dSmrg        ;;
6361428d7b3dSmrg
6362428d7b3dSmrg      interix[[3-9]]*)
6363428d7b3dSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
6364428d7b3dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6365428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6366428d7b3dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6367428d7b3dSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6368428d7b3dSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
6369428d7b3dSmrg	# default) and relocated if they conflict, which is a slow very memory
6370428d7b3dSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
6371428d7b3dSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6372428d7b3dSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6373428d7b3dSmrg	_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'
6374428d7b3dSmrg	_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'
6375428d7b3dSmrg	;;
6376428d7b3dSmrg      irix5* | irix6*)
6377428d7b3dSmrg        case $cc_basename in
6378428d7b3dSmrg          CC*)
6379428d7b3dSmrg	    # SGI C++
6380428d7b3dSmrg	    _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'
6381428d7b3dSmrg
6382428d7b3dSmrg	    # Archives containing C++ object files must be created using
6383428d7b3dSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6384428d7b3dSmrg	    # necessary to make sure instantiated templates are included
6385428d7b3dSmrg	    # in the archive.
6386428d7b3dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6387428d7b3dSmrg	    ;;
6388428d7b3dSmrg          *)
6389428d7b3dSmrg	    if test "$GXX" = yes; then
6390428d7b3dSmrg	      if test "$with_gnu_ld" = no; then
6391428d7b3dSmrg	        _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'
6392428d7b3dSmrg	      else
6393428d7b3dSmrg	        _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'
6394428d7b3dSmrg	      fi
6395428d7b3dSmrg	    fi
6396428d7b3dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6397428d7b3dSmrg	    ;;
6398428d7b3dSmrg        esac
6399428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6400428d7b3dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6401428d7b3dSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
6402428d7b3dSmrg        ;;
6403428d7b3dSmrg
6404428d7b3dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6405428d7b3dSmrg        case $cc_basename in
6406428d7b3dSmrg          KCC*)
6407428d7b3dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6408428d7b3dSmrg
6409428d7b3dSmrg	    # KCC will only create a shared library if the output file
6410428d7b3dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6411428d7b3dSmrg	    # to its proper name (with version) after linking.
6412428d7b3dSmrg	    _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'
6413428d7b3dSmrg	    _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'
6414428d7b3dSmrg	    # Commands to make compiler produce verbose output that lists
6415428d7b3dSmrg	    # what "hidden" libraries, object files and flags are used when
6416428d7b3dSmrg	    # linking a shared library.
6417428d7b3dSmrg	    #
6418428d7b3dSmrg	    # There doesn't appear to be a way to prevent this compiler from
6419428d7b3dSmrg	    # explicitly linking system object files so we need to strip them
6420428d7b3dSmrg	    # from the output so that they don't get included in the library
6421428d7b3dSmrg	    # dependencies.
6422428d7b3dSmrg	    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"'
6423428d7b3dSmrg
6424428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6425428d7b3dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6426428d7b3dSmrg
6427428d7b3dSmrg	    # Archives containing C++ object files must be created using
6428428d7b3dSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6429428d7b3dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6430428d7b3dSmrg	    ;;
6431428d7b3dSmrg	  icpc* | ecpc* )
6432428d7b3dSmrg	    # Intel C++
6433428d7b3dSmrg	    with_gnu_ld=yes
6434428d7b3dSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
6435428d7b3dSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6436428d7b3dSmrg	    # earlier do not add the objects themselves.
6437428d7b3dSmrg	    case `$CC -V 2>&1` in
6438428d7b3dSmrg	      *"Version 7."*)
6439428d7b3dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6440428d7b3dSmrg		_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'
6441428d7b3dSmrg		;;
6442428d7b3dSmrg	      *)  # Version 8.0 or newer
6443428d7b3dSmrg	        tmp_idyn=
6444428d7b3dSmrg	        case $host_cpu in
6445428d7b3dSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
6446428d7b3dSmrg		esac
6447428d7b3dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6448428d7b3dSmrg		_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'
6449428d7b3dSmrg		;;
6450428d7b3dSmrg	    esac
6451428d7b3dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6452428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6453428d7b3dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6454428d7b3dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6455428d7b3dSmrg	    ;;
6456428d7b3dSmrg          pgCC* | pgcpp*)
6457428d7b3dSmrg            # Portland Group C++ compiler
6458428d7b3dSmrg	    case `$CC -V` in
6459428d7b3dSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6460428d7b3dSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6461428d7b3dSmrg		rm -rf $tpldir~
6462428d7b3dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6463428d7b3dSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6464428d7b3dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6465428d7b3dSmrg		rm -rf $tpldir~
6466428d7b3dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6467428d7b3dSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6468428d7b3dSmrg		$RANLIB $oldlib'
6469428d7b3dSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6470428d7b3dSmrg		rm -rf $tpldir~
6471428d7b3dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6472428d7b3dSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6473428d7b3dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6474428d7b3dSmrg		rm -rf $tpldir~
6475428d7b3dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6476428d7b3dSmrg		$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'
6477428d7b3dSmrg	      ;;
6478428d7b3dSmrg	    *) # Version 6 and above use weak symbols
6479428d7b3dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6480428d7b3dSmrg	      _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'
6481428d7b3dSmrg	      ;;
6482428d7b3dSmrg	    esac
6483428d7b3dSmrg
6484428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6485428d7b3dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6486428d7b3dSmrg	    _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'
6487428d7b3dSmrg            ;;
6488428d7b3dSmrg	  cxx*)
6489428d7b3dSmrg	    # Compaq C++
6490428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6491428d7b3dSmrg	    _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'
6492428d7b3dSmrg
6493428d7b3dSmrg	    runpath_var=LD_RUN_PATH
6494428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6495428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6496428d7b3dSmrg
6497428d7b3dSmrg	    # Commands to make compiler produce verbose output that lists
6498428d7b3dSmrg	    # what "hidden" libraries, object files and flags are used when
6499428d7b3dSmrg	    # linking a shared library.
6500428d7b3dSmrg	    #
6501428d7b3dSmrg	    # There doesn't appear to be a way to prevent this compiler from
6502428d7b3dSmrg	    # explicitly linking system object files so we need to strip them
6503428d7b3dSmrg	    # from the output so that they don't get included in the library
6504428d7b3dSmrg	    # dependencies.
6505428d7b3dSmrg	    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'
6506428d7b3dSmrg	    ;;
6507428d7b3dSmrg	  xl* | mpixl* | bgxl*)
6508428d7b3dSmrg	    # IBM XL 8.0 on PPC, with GNU ld
6509428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6510428d7b3dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6511428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6512428d7b3dSmrg	    if test "x$supports_anon_versioning" = xyes; then
6513428d7b3dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6514428d7b3dSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6515428d7b3dSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
6516428d7b3dSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6517428d7b3dSmrg	    fi
6518428d7b3dSmrg	    ;;
6519428d7b3dSmrg	  *)
6520428d7b3dSmrg	    case `$CC -V 2>&1 | sed 5q` in
6521428d7b3dSmrg	    *Sun\ C*)
6522428d7b3dSmrg	      # Sun C++ 5.9
6523428d7b3dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6524428d7b3dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6525428d7b3dSmrg	      _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'
6526428d7b3dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6527428d7b3dSmrg	      _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'
6528428d7b3dSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6529428d7b3dSmrg
6530428d7b3dSmrg	      # Not sure whether something based on
6531428d7b3dSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6532428d7b3dSmrg	      # would be better.
6533428d7b3dSmrg	      output_verbose_link_cmd='func_echo_all'
6534428d7b3dSmrg
6535428d7b3dSmrg	      # Archives containing C++ object files must be created using
6536428d7b3dSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6537428d7b3dSmrg	      # necessary to make sure instantiated templates are included
6538428d7b3dSmrg	      # in the archive.
6539428d7b3dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6540428d7b3dSmrg	      ;;
6541428d7b3dSmrg	    esac
6542428d7b3dSmrg	    ;;
6543428d7b3dSmrg	esac
6544428d7b3dSmrg	;;
6545428d7b3dSmrg
6546428d7b3dSmrg      lynxos*)
6547428d7b3dSmrg        # FIXME: insert proper C++ library support
6548428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6549428d7b3dSmrg	;;
6550428d7b3dSmrg
6551428d7b3dSmrg      m88k*)
6552428d7b3dSmrg        # FIXME: insert proper C++ library support
6553428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6554428d7b3dSmrg	;;
6555428d7b3dSmrg
6556428d7b3dSmrg      mvs*)
6557428d7b3dSmrg        case $cc_basename in
6558428d7b3dSmrg          cxx*)
6559428d7b3dSmrg	    # FIXME: insert proper C++ library support
6560428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6561428d7b3dSmrg	    ;;
6562428d7b3dSmrg	  *)
6563428d7b3dSmrg	    # FIXME: insert proper C++ library support
6564428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6565428d7b3dSmrg	    ;;
6566428d7b3dSmrg	esac
6567428d7b3dSmrg	;;
6568428d7b3dSmrg
6569428d7b3dSmrg      netbsd*)
6570428d7b3dSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6571428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6572428d7b3dSmrg	  wlarc=
6573428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6574428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6575428d7b3dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6576428d7b3dSmrg	fi
6577428d7b3dSmrg	# Workaround some broken pre-1.5 toolchains
6578428d7b3dSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6579428d7b3dSmrg	;;
6580428d7b3dSmrg
6581428d7b3dSmrg      *nto* | *qnx*)
6582428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6583428d7b3dSmrg	;;
6584428d7b3dSmrg
6585428d7b3dSmrg      openbsd2*)
6586428d7b3dSmrg        # C++ shared libraries are fairly broken
6587428d7b3dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6588428d7b3dSmrg	;;
6589428d7b3dSmrg
6590428d7b3dSmrg      openbsd*)
6591428d7b3dSmrg	if test -f /usr/libexec/ld.so; then
6592428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6593428d7b3dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6594428d7b3dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6595428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6596428d7b3dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6597428d7b3dSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6598428d7b3dSmrg	    _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'
6599428d7b3dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6600428d7b3dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6601428d7b3dSmrg	  fi
6602428d7b3dSmrg	  output_verbose_link_cmd=func_echo_all
6603428d7b3dSmrg	else
6604428d7b3dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6605428d7b3dSmrg	fi
6606428d7b3dSmrg	;;
6607428d7b3dSmrg
6608428d7b3dSmrg      osf3* | osf4* | osf5*)
6609428d7b3dSmrg        case $cc_basename in
6610428d7b3dSmrg          KCC*)
6611428d7b3dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6612428d7b3dSmrg
6613428d7b3dSmrg	    # KCC will only create a shared library if the output file
6614428d7b3dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6615428d7b3dSmrg	    # to its proper name (with version) after linking.
6616428d7b3dSmrg	    _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'
6617428d7b3dSmrg
6618428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6619428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6620428d7b3dSmrg
6621428d7b3dSmrg	    # Archives containing C++ object files must be created using
6622428d7b3dSmrg	    # the KAI C++ compiler.
6623428d7b3dSmrg	    case $host in
6624428d7b3dSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6625428d7b3dSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6626428d7b3dSmrg	    esac
6627428d7b3dSmrg	    ;;
6628428d7b3dSmrg          RCC*)
6629428d7b3dSmrg	    # Rational C++ 2.4.1
6630428d7b3dSmrg	    # FIXME: insert proper C++ library support
6631428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6632428d7b3dSmrg	    ;;
6633428d7b3dSmrg          cxx*)
6634428d7b3dSmrg	    case $host in
6635428d7b3dSmrg	      osf3*)
6636428d7b3dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6637428d7b3dSmrg	        _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'
6638428d7b3dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6639428d7b3dSmrg		;;
6640428d7b3dSmrg	      *)
6641428d7b3dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6642428d7b3dSmrg	        _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'
6643428d7b3dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6644428d7b3dSmrg	          echo "-hidden">> $lib.exp~
6645428d7b3dSmrg	          $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~
6646428d7b3dSmrg	          $RM $lib.exp'
6647428d7b3dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6648428d7b3dSmrg		;;
6649428d7b3dSmrg	    esac
6650428d7b3dSmrg
6651428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6652428d7b3dSmrg
6653428d7b3dSmrg	    # Commands to make compiler produce verbose output that lists
6654428d7b3dSmrg	    # what "hidden" libraries, object files and flags are used when
6655428d7b3dSmrg	    # linking a shared library.
6656428d7b3dSmrg	    #
6657428d7b3dSmrg	    # There doesn't appear to be a way to prevent this compiler from
6658428d7b3dSmrg	    # explicitly linking system object files so we need to strip them
6659428d7b3dSmrg	    # from the output so that they don't get included in the library
6660428d7b3dSmrg	    # dependencies.
6661428d7b3dSmrg	    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"'
6662428d7b3dSmrg	    ;;
6663428d7b3dSmrg	  *)
6664428d7b3dSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6665428d7b3dSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6666428d7b3dSmrg	      case $host in
6667428d7b3dSmrg	        osf3*)
6668428d7b3dSmrg	          _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'
6669428d7b3dSmrg		  ;;
6670428d7b3dSmrg	        *)
6671428d7b3dSmrg	          _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'
6672428d7b3dSmrg		  ;;
6673428d7b3dSmrg	      esac
6674428d7b3dSmrg
6675428d7b3dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6676428d7b3dSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6677428d7b3dSmrg
6678428d7b3dSmrg	      # Commands to make compiler produce verbose output that lists
6679428d7b3dSmrg	      # what "hidden" libraries, object files and flags are used when
6680428d7b3dSmrg	      # linking a shared library.
6681428d7b3dSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6682428d7b3dSmrg
6683428d7b3dSmrg	    else
6684428d7b3dSmrg	      # FIXME: insert proper C++ library support
6685428d7b3dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6686428d7b3dSmrg	    fi
6687428d7b3dSmrg	    ;;
6688428d7b3dSmrg        esac
6689428d7b3dSmrg        ;;
6690428d7b3dSmrg
6691428d7b3dSmrg      psos*)
6692428d7b3dSmrg        # FIXME: insert proper C++ library support
6693428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6694428d7b3dSmrg        ;;
6695428d7b3dSmrg
6696428d7b3dSmrg      sunos4*)
6697428d7b3dSmrg        case $cc_basename in
6698428d7b3dSmrg          CC*)
6699428d7b3dSmrg	    # Sun C++ 4.x
6700428d7b3dSmrg	    # FIXME: insert proper C++ library support
6701428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6702428d7b3dSmrg	    ;;
6703428d7b3dSmrg          lcc*)
6704428d7b3dSmrg	    # Lucid
6705428d7b3dSmrg	    # FIXME: insert proper C++ library support
6706428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6707428d7b3dSmrg	    ;;
6708428d7b3dSmrg          *)
6709428d7b3dSmrg	    # FIXME: insert proper C++ library support
6710428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6711428d7b3dSmrg	    ;;
6712428d7b3dSmrg        esac
6713428d7b3dSmrg        ;;
6714428d7b3dSmrg
6715428d7b3dSmrg      solaris*)
6716428d7b3dSmrg        case $cc_basename in
6717428d7b3dSmrg          CC* | sunCC*)
6718428d7b3dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6719428d7b3dSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6720428d7b3dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6721428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6722428d7b3dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6723428d7b3dSmrg	      $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'
6724428d7b3dSmrg
6725428d7b3dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6726428d7b3dSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6727428d7b3dSmrg	    case $host_os in
6728428d7b3dSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6729428d7b3dSmrg	      *)
6730428d7b3dSmrg		# The compiler driver will combine and reorder linker options,
6731428d7b3dSmrg		# but understands `-z linker_flag'.
6732428d7b3dSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6733428d7b3dSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6734428d7b3dSmrg	        ;;
6735428d7b3dSmrg	    esac
6736428d7b3dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6737428d7b3dSmrg
6738428d7b3dSmrg	    output_verbose_link_cmd='func_echo_all'
6739428d7b3dSmrg
6740428d7b3dSmrg	    # Archives containing C++ object files must be created using
6741428d7b3dSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6742428d7b3dSmrg	    # necessary to make sure instantiated templates are included
6743428d7b3dSmrg	    # in the archive.
6744428d7b3dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6745428d7b3dSmrg	    ;;
6746428d7b3dSmrg          gcx*)
6747428d7b3dSmrg	    # Green Hills C++ Compiler
6748428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6749428d7b3dSmrg
6750428d7b3dSmrg	    # The C++ compiler must be used to create the archive.
6751428d7b3dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6752428d7b3dSmrg	    ;;
6753428d7b3dSmrg          *)
6754428d7b3dSmrg	    # GNU C++ compiler with Solaris linker
6755428d7b3dSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6756428d7b3dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6757428d7b3dSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6758428d7b3dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6759428d7b3dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6760428d7b3dSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6761428d7b3dSmrg
6762428d7b3dSmrg	        # Commands to make compiler produce verbose output that lists
6763428d7b3dSmrg	        # what "hidden" libraries, object files and flags are used when
6764428d7b3dSmrg	        # linking a shared library.
6765428d7b3dSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6766428d7b3dSmrg	      else
6767428d7b3dSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6768428d7b3dSmrg	        # platform.
6769428d7b3dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6770428d7b3dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6771428d7b3dSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6772428d7b3dSmrg
6773428d7b3dSmrg	        # Commands to make compiler produce verbose output that lists
6774428d7b3dSmrg	        # what "hidden" libraries, object files and flags are used when
6775428d7b3dSmrg	        # linking a shared library.
6776428d7b3dSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6777428d7b3dSmrg	      fi
6778428d7b3dSmrg
6779428d7b3dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6780428d7b3dSmrg	      case $host_os in
6781428d7b3dSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6782428d7b3dSmrg		*)
6783428d7b3dSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6784428d7b3dSmrg		  ;;
6785428d7b3dSmrg	      esac
6786428d7b3dSmrg	    fi
6787428d7b3dSmrg	    ;;
6788428d7b3dSmrg        esac
6789428d7b3dSmrg        ;;
6790428d7b3dSmrg
6791428d7b3dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6792428d7b3dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6793428d7b3dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6794428d7b3dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6795428d7b3dSmrg      runpath_var='LD_RUN_PATH'
6796428d7b3dSmrg
6797428d7b3dSmrg      case $cc_basename in
6798428d7b3dSmrg        CC*)
6799428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6800428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6801428d7b3dSmrg	  ;;
6802428d7b3dSmrg	*)
6803428d7b3dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6804428d7b3dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6805428d7b3dSmrg	  ;;
6806428d7b3dSmrg      esac
6807428d7b3dSmrg      ;;
6808428d7b3dSmrg
6809428d7b3dSmrg      sysv5* | sco3.2v5* | sco5v6*)
6810428d7b3dSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
6811428d7b3dSmrg	# link with -lc, and that would cause any symbols used from libc to
6812428d7b3dSmrg	# always be unresolved, which means just about no library would
6813428d7b3dSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
6814428d7b3dSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
6815428d7b3dSmrg	# as -z defs.
6816428d7b3dSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6817428d7b3dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6818428d7b3dSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6819428d7b3dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6820428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6821428d7b3dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6822428d7b3dSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6823428d7b3dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6824428d7b3dSmrg	runpath_var='LD_RUN_PATH'
6825428d7b3dSmrg
6826428d7b3dSmrg	case $cc_basename in
6827428d7b3dSmrg          CC*)
6828428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6829428d7b3dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6830428d7b3dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6831428d7b3dSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
6832428d7b3dSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6833428d7b3dSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
6834428d7b3dSmrg	    ;;
6835428d7b3dSmrg	  *)
6836428d7b3dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6837428d7b3dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6838428d7b3dSmrg	    ;;
6839428d7b3dSmrg	esac
6840428d7b3dSmrg      ;;
6841428d7b3dSmrg
6842428d7b3dSmrg      tandem*)
6843428d7b3dSmrg        case $cc_basename in
6844428d7b3dSmrg          NCC*)
6845428d7b3dSmrg	    # NonStop-UX NCC 3.20
6846428d7b3dSmrg	    # FIXME: insert proper C++ library support
6847428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6848428d7b3dSmrg	    ;;
6849428d7b3dSmrg          *)
6850428d7b3dSmrg	    # FIXME: insert proper C++ library support
6851428d7b3dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6852428d7b3dSmrg	    ;;
6853428d7b3dSmrg        esac
6854428d7b3dSmrg        ;;
6855428d7b3dSmrg
6856428d7b3dSmrg      vxworks*)
6857428d7b3dSmrg        # FIXME: insert proper C++ library support
6858428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6859428d7b3dSmrg        ;;
6860428d7b3dSmrg
6861428d7b3dSmrg      *)
6862428d7b3dSmrg        # FIXME: insert proper C++ library support
6863428d7b3dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6864428d7b3dSmrg        ;;
6865428d7b3dSmrg    esac
6866428d7b3dSmrg
6867428d7b3dSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6868428d7b3dSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6869428d7b3dSmrg
6870428d7b3dSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
6871428d7b3dSmrg    _LT_TAGVAR(LD, $1)="$LD"
6872428d7b3dSmrg
6873428d7b3dSmrg    ## CAVEAT EMPTOR:
6874428d7b3dSmrg    ## There is no encapsulation within the following macros, do not change
6875428d7b3dSmrg    ## the running order or otherwise move them around unless you know exactly
6876428d7b3dSmrg    ## what you are doing...
6877428d7b3dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6878428d7b3dSmrg    _LT_COMPILER_PIC($1)
6879428d7b3dSmrg    _LT_COMPILER_C_O($1)
6880428d7b3dSmrg    _LT_COMPILER_FILE_LOCKS($1)
6881428d7b3dSmrg    _LT_LINKER_SHLIBS($1)
6882428d7b3dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6883428d7b3dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6884428d7b3dSmrg
6885428d7b3dSmrg    _LT_CONFIG($1)
6886428d7b3dSmrg  fi # test -n "$compiler"
6887428d7b3dSmrg
6888428d7b3dSmrg  CC=$lt_save_CC
6889428d7b3dSmrg  CFLAGS=$lt_save_CFLAGS
6890428d7b3dSmrg  LDCXX=$LD
6891428d7b3dSmrg  LD=$lt_save_LD
6892428d7b3dSmrg  GCC=$lt_save_GCC
6893428d7b3dSmrg  with_gnu_ld=$lt_save_with_gnu_ld
6894428d7b3dSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6895428d7b3dSmrg  lt_cv_path_LD=$lt_save_path_LD
6896428d7b3dSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6897428d7b3dSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6898428d7b3dSmrgfi # test "$_lt_caught_CXX_error" != yes
6899428d7b3dSmrg
6900428d7b3dSmrgAC_LANG_POP
6901428d7b3dSmrg])# _LT_LANG_CXX_CONFIG
6902428d7b3dSmrg
6903428d7b3dSmrg
6904428d7b3dSmrg# _LT_FUNC_STRIPNAME_CNF
6905428d7b3dSmrg# ----------------------
6906428d7b3dSmrg# func_stripname_cnf prefix suffix name
6907428d7b3dSmrg# strip PREFIX and SUFFIX off of NAME.
6908428d7b3dSmrg# PREFIX and SUFFIX must not contain globbing or regex special
6909428d7b3dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
6910428d7b3dSmrg# dot (in which case that matches only a dot).
6911428d7b3dSmrg#
6912428d7b3dSmrg# This function is identical to the (non-XSI) version of func_stripname,
6913428d7b3dSmrg# except this one can be used by m4 code that may be executed by configure,
6914428d7b3dSmrg# rather than the libtool script.
6915428d7b3dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6916428d7b3dSmrgAC_REQUIRE([_LT_DECL_SED])
6917428d7b3dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6918428d7b3dSmrgfunc_stripname_cnf ()
6919428d7b3dSmrg{
6920428d7b3dSmrg  case ${2} in
6921428d7b3dSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6922428d7b3dSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6923428d7b3dSmrg  esac
6924428d7b3dSmrg} # func_stripname_cnf
6925428d7b3dSmrg])# _LT_FUNC_STRIPNAME_CNF
6926428d7b3dSmrg
6927428d7b3dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6928428d7b3dSmrg# ---------------------------------
6929428d7b3dSmrg# Figure out "hidden" library dependencies from verbose
6930428d7b3dSmrg# compiler output when linking a shared library.
6931428d7b3dSmrg# Parse the compiler output and extract the necessary
6932428d7b3dSmrg# objects, libraries and library flags.
6933428d7b3dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6934428d7b3dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6935428d7b3dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6936428d7b3dSmrg# Dependencies to place before and after the object being linked:
6937428d7b3dSmrg_LT_TAGVAR(predep_objects, $1)=
6938428d7b3dSmrg_LT_TAGVAR(postdep_objects, $1)=
6939428d7b3dSmrg_LT_TAGVAR(predeps, $1)=
6940428d7b3dSmrg_LT_TAGVAR(postdeps, $1)=
6941428d7b3dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6942428d7b3dSmrg
6943428d7b3dSmrgdnl we can't use the lt_simple_compile_test_code here,
6944428d7b3dSmrgdnl because it contains code intended for an executable,
6945428d7b3dSmrgdnl not a library.  It's possible we should let each
6946428d7b3dSmrgdnl tag define a new lt_????_link_test_code variable,
6947428d7b3dSmrgdnl but it's only used here...
6948428d7b3dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6949428d7b3dSmrgint a;
6950428d7b3dSmrgvoid foo (void) { a = 0; }
6951428d7b3dSmrg_LT_EOF
6952428d7b3dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6953428d7b3dSmrgclass Foo
6954428d7b3dSmrg{
6955428d7b3dSmrgpublic:
6956428d7b3dSmrg  Foo (void) { a = 0; }
6957428d7b3dSmrgprivate:
6958428d7b3dSmrg  int a;
6959428d7b3dSmrg};
6960428d7b3dSmrg_LT_EOF
6961428d7b3dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6962428d7b3dSmrg      subroutine foo
6963428d7b3dSmrg      implicit none
6964428d7b3dSmrg      integer*4 a
6965428d7b3dSmrg      a=0
6966428d7b3dSmrg      return
6967428d7b3dSmrg      end
6968428d7b3dSmrg_LT_EOF
6969428d7b3dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6970428d7b3dSmrg      subroutine foo
6971428d7b3dSmrg      implicit none
6972428d7b3dSmrg      integer a
6973428d7b3dSmrg      a=0
6974428d7b3dSmrg      return
6975428d7b3dSmrg      end
6976428d7b3dSmrg_LT_EOF
6977428d7b3dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6978428d7b3dSmrgpublic class foo {
6979428d7b3dSmrg  private int a;
6980428d7b3dSmrg  public void bar (void) {
6981428d7b3dSmrg    a = 0;
6982428d7b3dSmrg  }
6983428d7b3dSmrg};
6984428d7b3dSmrg_LT_EOF
6985428d7b3dSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6986428d7b3dSmrgpackage foo
6987428d7b3dSmrgfunc foo() {
6988428d7b3dSmrg}
6989428d7b3dSmrg_LT_EOF
6990428d7b3dSmrg])
6991428d7b3dSmrg
6992428d7b3dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
6993428d7b3dSmrgcase "$CC $CFLAGS " in #(
6994428d7b3dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6995428d7b3dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6996428d7b3dSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6997428d7b3dSmrgesac
6998428d7b3dSmrg
6999428d7b3dSmrgdnl Parse the compiler output and extract the necessary
7000428d7b3dSmrgdnl objects, libraries and library flags.
7001428d7b3dSmrgif AC_TRY_EVAL(ac_compile); then
7002428d7b3dSmrg  # Parse the compiler output and extract the necessary
7003428d7b3dSmrg  # objects, libraries and library flags.
7004428d7b3dSmrg
7005428d7b3dSmrg  # Sentinel used to keep track of whether or not we are before
7006428d7b3dSmrg  # the conftest object file.
7007428d7b3dSmrg  pre_test_object_deps_done=no
7008428d7b3dSmrg
7009428d7b3dSmrg  for p in `eval "$output_verbose_link_cmd"`; do
7010428d7b3dSmrg    case ${prev}${p} in
7011428d7b3dSmrg
7012428d7b3dSmrg    -L* | -R* | -l*)
7013428d7b3dSmrg       # Some compilers place space between "-{L,R}" and the path.
7014428d7b3dSmrg       # Remove the space.
7015428d7b3dSmrg       if test $p = "-L" ||
7016428d7b3dSmrg          test $p = "-R"; then
7017428d7b3dSmrg	 prev=$p
7018428d7b3dSmrg	 continue
7019428d7b3dSmrg       fi
7020428d7b3dSmrg
7021428d7b3dSmrg       # Expand the sysroot to ease extracting the directories later.
7022428d7b3dSmrg       if test -z "$prev"; then
7023428d7b3dSmrg         case $p in
7024428d7b3dSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7025428d7b3dSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7026428d7b3dSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7027428d7b3dSmrg         esac
7028428d7b3dSmrg       fi
7029428d7b3dSmrg       case $p in
7030428d7b3dSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7031428d7b3dSmrg       esac
7032428d7b3dSmrg       if test "$pre_test_object_deps_done" = no; then
7033428d7b3dSmrg	 case ${prev} in
7034428d7b3dSmrg	 -L | -R)
7035428d7b3dSmrg	   # Internal compiler library paths should come after those
7036428d7b3dSmrg	   # provided the user.  The postdeps already come after the
7037428d7b3dSmrg	   # user supplied libs so there is no need to process them.
7038428d7b3dSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7039428d7b3dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7040428d7b3dSmrg	   else
7041428d7b3dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7042428d7b3dSmrg	   fi
7043428d7b3dSmrg	   ;;
7044428d7b3dSmrg	 # The "-l" case would never come before the object being
7045428d7b3dSmrg	 # linked, so don't bother handling this case.
7046428d7b3dSmrg	 esac
7047428d7b3dSmrg       else
7048428d7b3dSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7049428d7b3dSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7050428d7b3dSmrg	 else
7051428d7b3dSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7052428d7b3dSmrg	 fi
7053428d7b3dSmrg       fi
7054428d7b3dSmrg       prev=
7055428d7b3dSmrg       ;;
7056428d7b3dSmrg
7057428d7b3dSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
7058428d7b3dSmrg    *.$objext)
7059428d7b3dSmrg       # This assumes that the test object file only shows up
7060428d7b3dSmrg       # once in the compiler output.
7061428d7b3dSmrg       if test "$p" = "conftest.$objext"; then
7062428d7b3dSmrg	 pre_test_object_deps_done=yes
7063428d7b3dSmrg	 continue
7064428d7b3dSmrg       fi
7065428d7b3dSmrg
7066428d7b3dSmrg       if test "$pre_test_object_deps_done" = no; then
7067428d7b3dSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7068428d7b3dSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
7069428d7b3dSmrg	 else
7070428d7b3dSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7071428d7b3dSmrg	 fi
7072428d7b3dSmrg       else
7073428d7b3dSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7074428d7b3dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
7075428d7b3dSmrg	 else
7076428d7b3dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7077428d7b3dSmrg	 fi
7078428d7b3dSmrg       fi
7079428d7b3dSmrg       ;;
7080428d7b3dSmrg
7081428d7b3dSmrg    *) ;; # Ignore the rest.
7082428d7b3dSmrg
7083428d7b3dSmrg    esac
7084428d7b3dSmrg  done
7085428d7b3dSmrg
7086428d7b3dSmrg  # Clean up.
7087428d7b3dSmrg  rm -f a.out a.exe
7088428d7b3dSmrgelse
7089428d7b3dSmrg  echo "libtool.m4: error: problem compiling $1 test program"
7090428d7b3dSmrgfi
7091428d7b3dSmrg
7092428d7b3dSmrg$RM -f confest.$objext
7093428d7b3dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
7094428d7b3dSmrg
7095428d7b3dSmrg# PORTME: override above test on systems where it is broken
7096428d7b3dSmrgm4_if([$1], [CXX],
7097428d7b3dSmrg[case $host_os in
7098428d7b3dSmrginterix[[3-9]]*)
7099428d7b3dSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7100428d7b3dSmrg  # hack all around it, let's just trust "g++" to DTRT.
7101428d7b3dSmrg  _LT_TAGVAR(predep_objects,$1)=
7102428d7b3dSmrg  _LT_TAGVAR(postdep_objects,$1)=
7103428d7b3dSmrg  _LT_TAGVAR(postdeps,$1)=
7104428d7b3dSmrg  ;;
7105428d7b3dSmrg
7106428d7b3dSmrglinux*)
7107428d7b3dSmrg  case `$CC -V 2>&1 | sed 5q` in
7108428d7b3dSmrg  *Sun\ C*)
7109428d7b3dSmrg    # Sun C++ 5.9
7110428d7b3dSmrg
7111428d7b3dSmrg    # The more standards-conforming stlport4 library is
7112428d7b3dSmrg    # incompatible with the Cstd library. Avoid specifying
7113428d7b3dSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
7114428d7b3dSmrg    # -library=stlport4 depends on it.
7115428d7b3dSmrg    case " $CXX $CXXFLAGS " in
7116428d7b3dSmrg    *" -library=stlport4 "*)
7117428d7b3dSmrg      solaris_use_stlport4=yes
7118428d7b3dSmrg      ;;
7119428d7b3dSmrg    esac
7120428d7b3dSmrg
7121428d7b3dSmrg    if test "$solaris_use_stlport4" != yes; then
7122428d7b3dSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7123428d7b3dSmrg    fi
7124428d7b3dSmrg    ;;
7125428d7b3dSmrg  esac
7126428d7b3dSmrg  ;;
7127428d7b3dSmrg
7128428d7b3dSmrgsolaris*)
7129428d7b3dSmrg  case $cc_basename in
7130428d7b3dSmrg  CC* | sunCC*)
7131428d7b3dSmrg    # The more standards-conforming stlport4 library is
7132428d7b3dSmrg    # incompatible with the Cstd library. Avoid specifying
7133428d7b3dSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
7134428d7b3dSmrg    # -library=stlport4 depends on it.
7135428d7b3dSmrg    case " $CXX $CXXFLAGS " in
7136428d7b3dSmrg    *" -library=stlport4 "*)
7137428d7b3dSmrg      solaris_use_stlport4=yes
7138428d7b3dSmrg      ;;
7139428d7b3dSmrg    esac
7140428d7b3dSmrg
7141428d7b3dSmrg    # Adding this requires a known-good setup of shared libraries for
7142428d7b3dSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
7143428d7b3dSmrg    # archive will be linked into the output, leading to subtle bugs.
7144428d7b3dSmrg    if test "$solaris_use_stlport4" != yes; then
7145428d7b3dSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7146428d7b3dSmrg    fi
7147428d7b3dSmrg    ;;
7148428d7b3dSmrg  esac
7149428d7b3dSmrg  ;;
7150428d7b3dSmrgesac
7151428d7b3dSmrg])
7152428d7b3dSmrg
7153428d7b3dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
7154428d7b3dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7155428d7b3dSmrgesac
7156428d7b3dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7157428d7b3dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7158428d7b3dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7159428d7b3dSmrgfi
7160428d7b3dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7161428d7b3dSmrg    [The directories searched by this compiler when creating a shared library])
7162428d7b3dSmrg_LT_TAGDECL([], [predep_objects], [1],
7163428d7b3dSmrg    [Dependencies to place before and after the objects being linked to
7164428d7b3dSmrg    create a shared library])
7165428d7b3dSmrg_LT_TAGDECL([], [postdep_objects], [1])
7166428d7b3dSmrg_LT_TAGDECL([], [predeps], [1])
7167428d7b3dSmrg_LT_TAGDECL([], [postdeps], [1])
7168428d7b3dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
7169428d7b3dSmrg    [The library search path used internally by the compiler when linking
7170428d7b3dSmrg    a shared library])
7171428d7b3dSmrg])# _LT_SYS_HIDDEN_LIBDEPS
7172428d7b3dSmrg
7173428d7b3dSmrg
7174428d7b3dSmrg# _LT_LANG_F77_CONFIG([TAG])
7175428d7b3dSmrg# --------------------------
7176428d7b3dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
7177428d7b3dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7178428d7b3dSmrg# to write the compiler configuration to `libtool'.
7179428d7b3dSmrgm4_defun([_LT_LANG_F77_CONFIG],
7180428d7b3dSmrg[AC_LANG_PUSH(Fortran 77)
7181428d7b3dSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
7182428d7b3dSmrg  _lt_disable_F77=yes
7183428d7b3dSmrgfi
7184428d7b3dSmrg
7185428d7b3dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7186428d7b3dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
7187428d7b3dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
7188428d7b3dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7189428d7b3dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7190428d7b3dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
7191428d7b3dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7192428d7b3dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7193428d7b3dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7194428d7b3dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7195428d7b3dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
7196428d7b3dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
7197428d7b3dSmrg_LT_TAGVAR(module_cmds, $1)=
7198428d7b3dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
7199428d7b3dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7200428d7b3dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7201428d7b3dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7202428d7b3dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7203428d7b3dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
7204428d7b3dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7205428d7b3dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7206428d7b3dSmrg
7207428d7b3dSmrg# Source file extension for f77 test sources.
7208428d7b3dSmrgac_ext=f
7209428d7b3dSmrg
7210428d7b3dSmrg# Object file extension for compiled f77 test sources.
7211428d7b3dSmrgobjext=o
7212428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
7213428d7b3dSmrg
7214428d7b3dSmrg# No sense in running all these tests if we already determined that
7215428d7b3dSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
7216428d7b3dSmrg# are currently assumed to apply to all compilers on this platform,
7217428d7b3dSmrg# and will be corrupted by setting them based on a non-working compiler.
7218428d7b3dSmrgif test "$_lt_disable_F77" != yes; then
7219428d7b3dSmrg  # Code to be used in simple compile tests
7220428d7b3dSmrg  lt_simple_compile_test_code="\
7221428d7b3dSmrg      subroutine t
7222428d7b3dSmrg      return
7223428d7b3dSmrg      end
7224428d7b3dSmrg"
7225428d7b3dSmrg
7226428d7b3dSmrg  # Code to be used in simple link tests
7227428d7b3dSmrg  lt_simple_link_test_code="\
7228428d7b3dSmrg      program t
7229428d7b3dSmrg      end
7230428d7b3dSmrg"
7231428d7b3dSmrg
7232428d7b3dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7233428d7b3dSmrg  _LT_TAG_COMPILER
7234428d7b3dSmrg
7235428d7b3dSmrg  # save warnings/boilerplate of simple test code
7236428d7b3dSmrg  _LT_COMPILER_BOILERPLATE
7237428d7b3dSmrg  _LT_LINKER_BOILERPLATE
7238428d7b3dSmrg
7239428d7b3dSmrg  # Allow CC to be a program name with arguments.
7240428d7b3dSmrg  lt_save_CC="$CC"
7241428d7b3dSmrg  lt_save_GCC=$GCC
7242428d7b3dSmrg  lt_save_CFLAGS=$CFLAGS
7243428d7b3dSmrg  CC=${F77-"f77"}
7244428d7b3dSmrg  CFLAGS=$FFLAGS
7245428d7b3dSmrg  compiler=$CC
7246428d7b3dSmrg  _LT_TAGVAR(compiler, $1)=$CC
7247428d7b3dSmrg  _LT_CC_BASENAME([$compiler])
7248428d7b3dSmrg  GCC=$G77
7249428d7b3dSmrg  if test -n "$compiler"; then
7250428d7b3dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
7251428d7b3dSmrg    AC_MSG_RESULT([$can_build_shared])
7252428d7b3dSmrg
7253428d7b3dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
7254428d7b3dSmrg    test "$can_build_shared" = "no" && enable_shared=no
7255428d7b3dSmrg
7256428d7b3dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
7257428d7b3dSmrg    # are all built from PIC.
7258428d7b3dSmrg    case $host_os in
7259428d7b3dSmrg      aix3*)
7260428d7b3dSmrg        test "$enable_shared" = yes && enable_static=no
7261428d7b3dSmrg        if test -n "$RANLIB"; then
7262428d7b3dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7263428d7b3dSmrg          postinstall_cmds='$RANLIB $lib'
7264428d7b3dSmrg        fi
7265428d7b3dSmrg        ;;
7266428d7b3dSmrg      aix[[4-9]]*)
7267428d7b3dSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7268428d7b3dSmrg	  test "$enable_shared" = yes && enable_static=no
7269428d7b3dSmrg	fi
7270428d7b3dSmrg        ;;
7271428d7b3dSmrg    esac
7272428d7b3dSmrg    AC_MSG_RESULT([$enable_shared])
7273428d7b3dSmrg
7274428d7b3dSmrg    AC_MSG_CHECKING([whether to build static libraries])
7275428d7b3dSmrg    # Make sure either enable_shared or enable_static is yes.
7276428d7b3dSmrg    test "$enable_shared" = yes || enable_static=yes
7277428d7b3dSmrg    AC_MSG_RESULT([$enable_static])
7278428d7b3dSmrg
7279428d7b3dSmrg    _LT_TAGVAR(GCC, $1)="$G77"
7280428d7b3dSmrg    _LT_TAGVAR(LD, $1)="$LD"
7281428d7b3dSmrg
7282428d7b3dSmrg    ## CAVEAT EMPTOR:
7283428d7b3dSmrg    ## There is no encapsulation within the following macros, do not change
7284428d7b3dSmrg    ## the running order or otherwise move them around unless you know exactly
7285428d7b3dSmrg    ## what you are doing...
7286428d7b3dSmrg    _LT_COMPILER_PIC($1)
7287428d7b3dSmrg    _LT_COMPILER_C_O($1)
7288428d7b3dSmrg    _LT_COMPILER_FILE_LOCKS($1)
7289428d7b3dSmrg    _LT_LINKER_SHLIBS($1)
7290428d7b3dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
7291428d7b3dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7292428d7b3dSmrg
7293428d7b3dSmrg    _LT_CONFIG($1)
7294428d7b3dSmrg  fi # test -n "$compiler"
7295428d7b3dSmrg
7296428d7b3dSmrg  GCC=$lt_save_GCC
7297428d7b3dSmrg  CC="$lt_save_CC"
7298428d7b3dSmrg  CFLAGS="$lt_save_CFLAGS"
7299428d7b3dSmrgfi # test "$_lt_disable_F77" != yes
7300428d7b3dSmrg
7301428d7b3dSmrgAC_LANG_POP
7302428d7b3dSmrg])# _LT_LANG_F77_CONFIG
7303428d7b3dSmrg
7304428d7b3dSmrg
7305428d7b3dSmrg# _LT_LANG_FC_CONFIG([TAG])
7306428d7b3dSmrg# -------------------------
7307428d7b3dSmrg# Ensure that the configuration variables for a Fortran compiler are
7308428d7b3dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7309428d7b3dSmrg# to write the compiler configuration to `libtool'.
7310428d7b3dSmrgm4_defun([_LT_LANG_FC_CONFIG],
7311428d7b3dSmrg[AC_LANG_PUSH(Fortran)
7312428d7b3dSmrg
7313428d7b3dSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
7314428d7b3dSmrg  _lt_disable_FC=yes
7315428d7b3dSmrgfi
7316428d7b3dSmrg
7317428d7b3dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7318428d7b3dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
7319428d7b3dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
7320428d7b3dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7321428d7b3dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7322428d7b3dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
7323428d7b3dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7324428d7b3dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7325428d7b3dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7326428d7b3dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7327428d7b3dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
7328428d7b3dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
7329428d7b3dSmrg_LT_TAGVAR(module_cmds, $1)=
7330428d7b3dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
7331428d7b3dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7332428d7b3dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7333428d7b3dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7334428d7b3dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7335428d7b3dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
7336428d7b3dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7337428d7b3dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7338428d7b3dSmrg
7339428d7b3dSmrg# Source file extension for fc test sources.
7340428d7b3dSmrgac_ext=${ac_fc_srcext-f}
7341428d7b3dSmrg
7342428d7b3dSmrg# Object file extension for compiled fc test sources.
7343428d7b3dSmrgobjext=o
7344428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
7345428d7b3dSmrg
7346428d7b3dSmrg# No sense in running all these tests if we already determined that
7347428d7b3dSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
7348428d7b3dSmrg# are currently assumed to apply to all compilers on this platform,
7349428d7b3dSmrg# and will be corrupted by setting them based on a non-working compiler.
7350428d7b3dSmrgif test "$_lt_disable_FC" != yes; then
7351428d7b3dSmrg  # Code to be used in simple compile tests
7352428d7b3dSmrg  lt_simple_compile_test_code="\
7353428d7b3dSmrg      subroutine t
7354428d7b3dSmrg      return
7355428d7b3dSmrg      end
7356428d7b3dSmrg"
7357428d7b3dSmrg
7358428d7b3dSmrg  # Code to be used in simple link tests
7359428d7b3dSmrg  lt_simple_link_test_code="\
7360428d7b3dSmrg      program t
7361428d7b3dSmrg      end
7362428d7b3dSmrg"
7363428d7b3dSmrg
7364428d7b3dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7365428d7b3dSmrg  _LT_TAG_COMPILER
7366428d7b3dSmrg
7367428d7b3dSmrg  # save warnings/boilerplate of simple test code
7368428d7b3dSmrg  _LT_COMPILER_BOILERPLATE
7369428d7b3dSmrg  _LT_LINKER_BOILERPLATE
7370428d7b3dSmrg
7371428d7b3dSmrg  # Allow CC to be a program name with arguments.
7372428d7b3dSmrg  lt_save_CC="$CC"
7373428d7b3dSmrg  lt_save_GCC=$GCC
7374428d7b3dSmrg  lt_save_CFLAGS=$CFLAGS
7375428d7b3dSmrg  CC=${FC-"f95"}
7376428d7b3dSmrg  CFLAGS=$FCFLAGS
7377428d7b3dSmrg  compiler=$CC
7378428d7b3dSmrg  GCC=$ac_cv_fc_compiler_gnu
7379428d7b3dSmrg
7380428d7b3dSmrg  _LT_TAGVAR(compiler, $1)=$CC
7381428d7b3dSmrg  _LT_CC_BASENAME([$compiler])
7382428d7b3dSmrg
7383428d7b3dSmrg  if test -n "$compiler"; then
7384428d7b3dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
7385428d7b3dSmrg    AC_MSG_RESULT([$can_build_shared])
7386428d7b3dSmrg
7387428d7b3dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
7388428d7b3dSmrg    test "$can_build_shared" = "no" && enable_shared=no
7389428d7b3dSmrg
7390428d7b3dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
7391428d7b3dSmrg    # are all built from PIC.
7392428d7b3dSmrg    case $host_os in
7393428d7b3dSmrg      aix3*)
7394428d7b3dSmrg        test "$enable_shared" = yes && enable_static=no
7395428d7b3dSmrg        if test -n "$RANLIB"; then
7396428d7b3dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7397428d7b3dSmrg          postinstall_cmds='$RANLIB $lib'
7398428d7b3dSmrg        fi
7399428d7b3dSmrg        ;;
7400428d7b3dSmrg      aix[[4-9]]*)
7401428d7b3dSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7402428d7b3dSmrg	  test "$enable_shared" = yes && enable_static=no
7403428d7b3dSmrg	fi
7404428d7b3dSmrg        ;;
7405428d7b3dSmrg    esac
7406428d7b3dSmrg    AC_MSG_RESULT([$enable_shared])
7407428d7b3dSmrg
7408428d7b3dSmrg    AC_MSG_CHECKING([whether to build static libraries])
7409428d7b3dSmrg    # Make sure either enable_shared or enable_static is yes.
7410428d7b3dSmrg    test "$enable_shared" = yes || enable_static=yes
7411428d7b3dSmrg    AC_MSG_RESULT([$enable_static])
7412428d7b3dSmrg
7413428d7b3dSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7414428d7b3dSmrg    _LT_TAGVAR(LD, $1)="$LD"
7415428d7b3dSmrg
7416428d7b3dSmrg    ## CAVEAT EMPTOR:
7417428d7b3dSmrg    ## There is no encapsulation within the following macros, do not change
7418428d7b3dSmrg    ## the running order or otherwise move them around unless you know exactly
7419428d7b3dSmrg    ## what you are doing...
7420428d7b3dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
7421428d7b3dSmrg    _LT_COMPILER_PIC($1)
7422428d7b3dSmrg    _LT_COMPILER_C_O($1)
7423428d7b3dSmrg    _LT_COMPILER_FILE_LOCKS($1)
7424428d7b3dSmrg    _LT_LINKER_SHLIBS($1)
7425428d7b3dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
7426428d7b3dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7427428d7b3dSmrg
7428428d7b3dSmrg    _LT_CONFIG($1)
7429428d7b3dSmrg  fi # test -n "$compiler"
7430428d7b3dSmrg
7431428d7b3dSmrg  GCC=$lt_save_GCC
7432428d7b3dSmrg  CC=$lt_save_CC
7433428d7b3dSmrg  CFLAGS=$lt_save_CFLAGS
7434428d7b3dSmrgfi # test "$_lt_disable_FC" != yes
7435428d7b3dSmrg
7436428d7b3dSmrgAC_LANG_POP
7437428d7b3dSmrg])# _LT_LANG_FC_CONFIG
7438428d7b3dSmrg
7439428d7b3dSmrg
7440428d7b3dSmrg# _LT_LANG_GCJ_CONFIG([TAG])
7441428d7b3dSmrg# --------------------------
7442428d7b3dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
7443428d7b3dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7444428d7b3dSmrg# to write the compiler configuration to `libtool'.
7445428d7b3dSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
7446428d7b3dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
7447428d7b3dSmrgAC_LANG_SAVE
7448428d7b3dSmrg
7449428d7b3dSmrg# Source file extension for Java test sources.
7450428d7b3dSmrgac_ext=java
7451428d7b3dSmrg
7452428d7b3dSmrg# Object file extension for compiled Java test sources.
7453428d7b3dSmrgobjext=o
7454428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
7455428d7b3dSmrg
7456428d7b3dSmrg# Code to be used in simple compile tests
7457428d7b3dSmrglt_simple_compile_test_code="class foo {}"
7458428d7b3dSmrg
7459428d7b3dSmrg# Code to be used in simple link tests
7460428d7b3dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7461428d7b3dSmrg
7462428d7b3dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7463428d7b3dSmrg_LT_TAG_COMPILER
7464428d7b3dSmrg
7465428d7b3dSmrg# save warnings/boilerplate of simple test code
7466428d7b3dSmrg_LT_COMPILER_BOILERPLATE
7467428d7b3dSmrg_LT_LINKER_BOILERPLATE
7468428d7b3dSmrg
7469428d7b3dSmrg# Allow CC to be a program name with arguments.
7470428d7b3dSmrglt_save_CC=$CC
7471428d7b3dSmrglt_save_CFLAGS=$CFLAGS
7472428d7b3dSmrglt_save_GCC=$GCC
7473428d7b3dSmrgGCC=yes
7474428d7b3dSmrgCC=${GCJ-"gcj"}
7475428d7b3dSmrgCFLAGS=$GCJFLAGS
7476428d7b3dSmrgcompiler=$CC
7477428d7b3dSmrg_LT_TAGVAR(compiler, $1)=$CC
7478428d7b3dSmrg_LT_TAGVAR(LD, $1)="$LD"
7479428d7b3dSmrg_LT_CC_BASENAME([$compiler])
7480428d7b3dSmrg
7481428d7b3dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
7482428d7b3dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7483428d7b3dSmrg
7484428d7b3dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7485428d7b3dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7486428d7b3dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7487428d7b3dSmrg
7488428d7b3dSmrg## CAVEAT EMPTOR:
7489428d7b3dSmrg## There is no encapsulation within the following macros, do not change
7490428d7b3dSmrg## the running order or otherwise move them around unless you know exactly
7491428d7b3dSmrg## what you are doing...
7492428d7b3dSmrgif test -n "$compiler"; then
7493428d7b3dSmrg  _LT_COMPILER_NO_RTTI($1)
7494428d7b3dSmrg  _LT_COMPILER_PIC($1)
7495428d7b3dSmrg  _LT_COMPILER_C_O($1)
7496428d7b3dSmrg  _LT_COMPILER_FILE_LOCKS($1)
7497428d7b3dSmrg  _LT_LINKER_SHLIBS($1)
7498428d7b3dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
7499428d7b3dSmrg
7500428d7b3dSmrg  _LT_CONFIG($1)
7501428d7b3dSmrgfi
7502428d7b3dSmrg
7503428d7b3dSmrgAC_LANG_RESTORE
7504428d7b3dSmrg
7505428d7b3dSmrgGCC=$lt_save_GCC
7506428d7b3dSmrgCC=$lt_save_CC
7507428d7b3dSmrgCFLAGS=$lt_save_CFLAGS
7508428d7b3dSmrg])# _LT_LANG_GCJ_CONFIG
7509428d7b3dSmrg
7510428d7b3dSmrg
7511428d7b3dSmrg# _LT_LANG_GO_CONFIG([TAG])
7512428d7b3dSmrg# --------------------------
7513428d7b3dSmrg# Ensure that the configuration variables for the GNU Go compiler
7514428d7b3dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7515428d7b3dSmrg# to write the compiler configuration to `libtool'.
7516428d7b3dSmrgm4_defun([_LT_LANG_GO_CONFIG],
7517428d7b3dSmrg[AC_REQUIRE([LT_PROG_GO])dnl
7518428d7b3dSmrgAC_LANG_SAVE
7519428d7b3dSmrg
7520428d7b3dSmrg# Source file extension for Go test sources.
7521428d7b3dSmrgac_ext=go
7522428d7b3dSmrg
7523428d7b3dSmrg# Object file extension for compiled Go test sources.
7524428d7b3dSmrgobjext=o
7525428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
7526428d7b3dSmrg
7527428d7b3dSmrg# Code to be used in simple compile tests
7528428d7b3dSmrglt_simple_compile_test_code="package main; func main() { }"
7529428d7b3dSmrg
7530428d7b3dSmrg# Code to be used in simple link tests
7531428d7b3dSmrglt_simple_link_test_code='package main; func main() { }'
7532428d7b3dSmrg
7533428d7b3dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7534428d7b3dSmrg_LT_TAG_COMPILER
7535428d7b3dSmrg
7536428d7b3dSmrg# save warnings/boilerplate of simple test code
7537428d7b3dSmrg_LT_COMPILER_BOILERPLATE
7538428d7b3dSmrg_LT_LINKER_BOILERPLATE
7539428d7b3dSmrg
7540428d7b3dSmrg# Allow CC to be a program name with arguments.
7541428d7b3dSmrglt_save_CC=$CC
7542428d7b3dSmrglt_save_CFLAGS=$CFLAGS
7543428d7b3dSmrglt_save_GCC=$GCC
7544428d7b3dSmrgGCC=yes
7545428d7b3dSmrgCC=${GOC-"gccgo"}
7546428d7b3dSmrgCFLAGS=$GOFLAGS
7547428d7b3dSmrgcompiler=$CC
7548428d7b3dSmrg_LT_TAGVAR(compiler, $1)=$CC
7549428d7b3dSmrg_LT_TAGVAR(LD, $1)="$LD"
7550428d7b3dSmrg_LT_CC_BASENAME([$compiler])
7551428d7b3dSmrg
7552428d7b3dSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
7553428d7b3dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7554428d7b3dSmrg
7555428d7b3dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7556428d7b3dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7557428d7b3dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7558428d7b3dSmrg
7559428d7b3dSmrg## CAVEAT EMPTOR:
7560428d7b3dSmrg## There is no encapsulation within the following macros, do not change
7561428d7b3dSmrg## the running order or otherwise move them around unless you know exactly
7562428d7b3dSmrg## what you are doing...
7563428d7b3dSmrgif test -n "$compiler"; then
7564428d7b3dSmrg  _LT_COMPILER_NO_RTTI($1)
7565428d7b3dSmrg  _LT_COMPILER_PIC($1)
7566428d7b3dSmrg  _LT_COMPILER_C_O($1)
7567428d7b3dSmrg  _LT_COMPILER_FILE_LOCKS($1)
7568428d7b3dSmrg  _LT_LINKER_SHLIBS($1)
7569428d7b3dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
7570428d7b3dSmrg
7571428d7b3dSmrg  _LT_CONFIG($1)
7572428d7b3dSmrgfi
7573428d7b3dSmrg
7574428d7b3dSmrgAC_LANG_RESTORE
7575428d7b3dSmrg
7576428d7b3dSmrgGCC=$lt_save_GCC
7577428d7b3dSmrgCC=$lt_save_CC
7578428d7b3dSmrgCFLAGS=$lt_save_CFLAGS
7579428d7b3dSmrg])# _LT_LANG_GO_CONFIG
7580428d7b3dSmrg
7581428d7b3dSmrg
7582428d7b3dSmrg# _LT_LANG_RC_CONFIG([TAG])
7583428d7b3dSmrg# -------------------------
7584428d7b3dSmrg# Ensure that the configuration variables for the Windows resource compiler
7585428d7b3dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7586428d7b3dSmrg# to write the compiler configuration to `libtool'.
7587428d7b3dSmrgm4_defun([_LT_LANG_RC_CONFIG],
7588428d7b3dSmrg[AC_REQUIRE([LT_PROG_RC])dnl
7589428d7b3dSmrgAC_LANG_SAVE
7590428d7b3dSmrg
7591428d7b3dSmrg# Source file extension for RC test sources.
7592428d7b3dSmrgac_ext=rc
7593428d7b3dSmrg
7594428d7b3dSmrg# Object file extension for compiled RC test sources.
7595428d7b3dSmrgobjext=o
7596428d7b3dSmrg_LT_TAGVAR(objext, $1)=$objext
7597428d7b3dSmrg
7598428d7b3dSmrg# Code to be used in simple compile tests
7599428d7b3dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7600428d7b3dSmrg
7601428d7b3dSmrg# Code to be used in simple link tests
7602428d7b3dSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
7603428d7b3dSmrg
7604428d7b3dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7605428d7b3dSmrg_LT_TAG_COMPILER
7606428d7b3dSmrg
7607428d7b3dSmrg# save warnings/boilerplate of simple test code
7608428d7b3dSmrg_LT_COMPILER_BOILERPLATE
7609428d7b3dSmrg_LT_LINKER_BOILERPLATE
7610428d7b3dSmrg
7611428d7b3dSmrg# Allow CC to be a program name with arguments.
7612428d7b3dSmrglt_save_CC="$CC"
7613428d7b3dSmrglt_save_CFLAGS=$CFLAGS
7614428d7b3dSmrglt_save_GCC=$GCC
7615428d7b3dSmrgGCC=
7616428d7b3dSmrgCC=${RC-"windres"}
7617428d7b3dSmrgCFLAGS=
7618428d7b3dSmrgcompiler=$CC
7619428d7b3dSmrg_LT_TAGVAR(compiler, $1)=$CC
7620428d7b3dSmrg_LT_CC_BASENAME([$compiler])
7621428d7b3dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7622428d7b3dSmrg
7623428d7b3dSmrgif test -n "$compiler"; then
7624428d7b3dSmrg  :
7625428d7b3dSmrg  _LT_CONFIG($1)
7626428d7b3dSmrgfi
7627428d7b3dSmrg
7628428d7b3dSmrgGCC=$lt_save_GCC
7629428d7b3dSmrgAC_LANG_RESTORE
7630428d7b3dSmrgCC=$lt_save_CC
7631428d7b3dSmrgCFLAGS=$lt_save_CFLAGS
7632428d7b3dSmrg])# _LT_LANG_RC_CONFIG
7633428d7b3dSmrg
7634428d7b3dSmrg
7635428d7b3dSmrg# LT_PROG_GCJ
7636428d7b3dSmrg# -----------
7637428d7b3dSmrgAC_DEFUN([LT_PROG_GCJ],
7638428d7b3dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7639428d7b3dSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7640428d7b3dSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
7641428d7b3dSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7642428d7b3dSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
7643428d7b3dSmrg])
7644428d7b3dSmrg
7645428d7b3dSmrg# Old name:
7646428d7b3dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7647428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
7648428d7b3dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7649428d7b3dSmrg
7650428d7b3dSmrg
7651428d7b3dSmrg# LT_PROG_GO
7652428d7b3dSmrg# ----------
7653428d7b3dSmrgAC_DEFUN([LT_PROG_GO],
7654428d7b3dSmrg[AC_CHECK_TOOL(GOC, gccgo,)
7655428d7b3dSmrg])
7656428d7b3dSmrg
7657428d7b3dSmrg
7658428d7b3dSmrg# LT_PROG_RC
7659428d7b3dSmrg# ----------
7660428d7b3dSmrgAC_DEFUN([LT_PROG_RC],
7661428d7b3dSmrg[AC_CHECK_TOOL(RC, windres,)
7662428d7b3dSmrg])
7663428d7b3dSmrg
7664428d7b3dSmrg# Old name:
7665428d7b3dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7666428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
7667428d7b3dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7668428d7b3dSmrg
7669428d7b3dSmrg
7670428d7b3dSmrg# _LT_DECL_EGREP
7671428d7b3dSmrg# --------------
7672428d7b3dSmrg# If we don't have a new enough Autoconf to choose the best grep
7673428d7b3dSmrg# available, choose the one first in the user's PATH.
7674428d7b3dSmrgm4_defun([_LT_DECL_EGREP],
7675428d7b3dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7676428d7b3dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7677428d7b3dSmrgtest -z "$GREP" && GREP=grep
7678428d7b3dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7679428d7b3dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7680428d7b3dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7681428d7b3dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7682428d7b3dSmrgAC_SUBST([GREP])
7683428d7b3dSmrg])
7684428d7b3dSmrg
7685428d7b3dSmrg
7686428d7b3dSmrg# _LT_DECL_OBJDUMP
7687428d7b3dSmrg# --------------
7688428d7b3dSmrg# If we don't have a new enough Autoconf to choose the best objdump
7689428d7b3dSmrg# available, choose the one first in the user's PATH.
7690428d7b3dSmrgm4_defun([_LT_DECL_OBJDUMP],
7691428d7b3dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7692428d7b3dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7693428d7b3dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7694428d7b3dSmrgAC_SUBST([OBJDUMP])
7695428d7b3dSmrg])
7696428d7b3dSmrg
7697428d7b3dSmrg# _LT_DECL_DLLTOOL
7698428d7b3dSmrg# ----------------
7699428d7b3dSmrg# Ensure DLLTOOL variable is set.
7700428d7b3dSmrgm4_defun([_LT_DECL_DLLTOOL],
7701428d7b3dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7702428d7b3dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7703428d7b3dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7704428d7b3dSmrgAC_SUBST([DLLTOOL])
7705428d7b3dSmrg])
7706428d7b3dSmrg
7707428d7b3dSmrg# _LT_DECL_SED
7708428d7b3dSmrg# ------------
7709428d7b3dSmrg# Check for a fully-functional sed program, that truncates
7710428d7b3dSmrg# as few characters as possible.  Prefer GNU sed if found.
7711428d7b3dSmrgm4_defun([_LT_DECL_SED],
7712428d7b3dSmrg[AC_PROG_SED
7713428d7b3dSmrgtest -z "$SED" && SED=sed
7714428d7b3dSmrgXsed="$SED -e 1s/^X//"
7715428d7b3dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7716428d7b3dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7717428d7b3dSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7718428d7b3dSmrg])# _LT_DECL_SED
7719428d7b3dSmrg
7720428d7b3dSmrgm4_ifndef([AC_PROG_SED], [
7721428d7b3dSmrg############################################################
7722428d7b3dSmrg# NOTE: This macro has been submitted for inclusion into   #
7723428d7b3dSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7724428d7b3dSmrg#  a released version of Autoconf we should remove this    #
7725428d7b3dSmrg#  macro and use it instead.                               #
7726428d7b3dSmrg############################################################
7727428d7b3dSmrg
7728428d7b3dSmrgm4_defun([AC_PROG_SED],
7729428d7b3dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7730428d7b3dSmrgAC_CACHE_VAL(lt_cv_path_SED,
7731428d7b3dSmrg[# Loop through the user's path and test for sed and gsed.
7732428d7b3dSmrg# Then use that list of sed's as ones to test for truncation.
7733428d7b3dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7734428d7b3dSmrgfor as_dir in $PATH
7735428d7b3dSmrgdo
7736428d7b3dSmrg  IFS=$as_save_IFS
7737428d7b3dSmrg  test -z "$as_dir" && as_dir=.
7738428d7b3dSmrg  for lt_ac_prog in sed gsed; do
7739428d7b3dSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7740428d7b3dSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7741428d7b3dSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7742428d7b3dSmrg      fi
7743428d7b3dSmrg    done
7744428d7b3dSmrg  done
7745428d7b3dSmrgdone
7746428d7b3dSmrgIFS=$as_save_IFS
7747428d7b3dSmrglt_ac_max=0
7748428d7b3dSmrglt_ac_count=0
7749428d7b3dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7750428d7b3dSmrg# along with /bin/sed that truncates output.
7751428d7b3dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7752428d7b3dSmrg  test ! -f $lt_ac_sed && continue
7753428d7b3dSmrg  cat /dev/null > conftest.in
7754428d7b3dSmrg  lt_ac_count=0
7755428d7b3dSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7756428d7b3dSmrg  # Check for GNU sed and select it if it is found.
7757428d7b3dSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7758428d7b3dSmrg    lt_cv_path_SED=$lt_ac_sed
7759428d7b3dSmrg    break
7760428d7b3dSmrg  fi
7761428d7b3dSmrg  while true; do
7762428d7b3dSmrg    cat conftest.in conftest.in >conftest.tmp
7763428d7b3dSmrg    mv conftest.tmp conftest.in
7764428d7b3dSmrg    cp conftest.in conftest.nl
7765428d7b3dSmrg    echo >>conftest.nl
7766428d7b3dSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7767428d7b3dSmrg    cmp -s conftest.out conftest.nl || break
7768428d7b3dSmrg    # 10000 chars as input seems more than enough
7769428d7b3dSmrg    test $lt_ac_count -gt 10 && break
7770428d7b3dSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7771428d7b3dSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7772428d7b3dSmrg      lt_ac_max=$lt_ac_count
7773428d7b3dSmrg      lt_cv_path_SED=$lt_ac_sed
7774428d7b3dSmrg    fi
7775428d7b3dSmrg  done
7776428d7b3dSmrgdone
7777428d7b3dSmrg])
7778428d7b3dSmrgSED=$lt_cv_path_SED
7779428d7b3dSmrgAC_SUBST([SED])
7780428d7b3dSmrgAC_MSG_RESULT([$SED])
7781428d7b3dSmrg])#AC_PROG_SED
7782428d7b3dSmrg])#m4_ifndef
7783428d7b3dSmrg
7784428d7b3dSmrg# Old name:
7785428d7b3dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7786428d7b3dSmrgdnl aclocal-1.4 backwards compatibility:
7787428d7b3dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7788428d7b3dSmrg
7789428d7b3dSmrg
7790428d7b3dSmrg# _LT_CHECK_SHELL_FEATURES
7791428d7b3dSmrg# ------------------------
7792428d7b3dSmrg# Find out whether the shell is Bourne or XSI compatible,
7793428d7b3dSmrg# or has some other useful features.
7794428d7b3dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7795428d7b3dSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7796428d7b3dSmrg# Try some XSI features
7797428d7b3dSmrgxsi_shell=no
7798428d7b3dSmrg( _lt_dummy="a/b/c"
7799428d7b3dSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7800428d7b3dSmrg      = c,a/b,b/c, \
7801428d7b3dSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7802428d7b3dSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7803428d7b3dSmrg  && xsi_shell=yes
7804428d7b3dSmrgAC_MSG_RESULT([$xsi_shell])
7805428d7b3dSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7806428d7b3dSmrg
7807428d7b3dSmrgAC_MSG_CHECKING([whether the shell understands "+="])
7808428d7b3dSmrglt_shell_append=no
7809428d7b3dSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7810428d7b3dSmrg    >/dev/null 2>&1 \
7811428d7b3dSmrg  && lt_shell_append=yes
7812428d7b3dSmrgAC_MSG_RESULT([$lt_shell_append])
7813428d7b3dSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7814428d7b3dSmrg
7815428d7b3dSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7816428d7b3dSmrg  lt_unset=unset
7817428d7b3dSmrgelse
7818428d7b3dSmrg  lt_unset=false
7819428d7b3dSmrgfi
7820428d7b3dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7821428d7b3dSmrg
7822428d7b3dSmrg# test EBCDIC or ASCII
7823428d7b3dSmrgcase `echo X|tr X '\101'` in
7824428d7b3dSmrg A) # ASCII based system
7825428d7b3dSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7826428d7b3dSmrg  lt_SP2NL='tr \040 \012'
7827428d7b3dSmrg  lt_NL2SP='tr \015\012 \040\040'
7828428d7b3dSmrg  ;;
7829428d7b3dSmrg *) # EBCDIC based system
7830428d7b3dSmrg  lt_SP2NL='tr \100 \n'
7831428d7b3dSmrg  lt_NL2SP='tr \r\n \100\100'
7832428d7b3dSmrg  ;;
7833428d7b3dSmrgesac
7834428d7b3dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7835428d7b3dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7836428d7b3dSmrg])# _LT_CHECK_SHELL_FEATURES
7837428d7b3dSmrg
7838428d7b3dSmrg
7839428d7b3dSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7840428d7b3dSmrg# ------------------------------------------------------
7841428d7b3dSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7842428d7b3dSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7843428d7b3dSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
7844428d7b3dSmrg[dnl {
7845428d7b3dSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
7846428d7b3dSmrg$1 ()\
7847428d7b3dSmrg{\
7848428d7b3dSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
7849428d7b3dSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7850428d7b3dSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
7851428d7b3dSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7852428d7b3dSmrgtest 0 -eq $? || _lt_function_replace_fail=:
7853428d7b3dSmrg])
7854428d7b3dSmrg
7855428d7b3dSmrg
7856428d7b3dSmrg# _LT_PROG_REPLACE_SHELLFNS
7857428d7b3dSmrg# -------------------------
7858428d7b3dSmrg# Replace existing portable implementations of several shell functions with
7859428d7b3dSmrg# equivalent extended shell implementations where those features are available..
7860428d7b3dSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
7861428d7b3dSmrg[if test x"$xsi_shell" = xyes; then
7862428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7863428d7b3dSmrg    case ${1} in
7864428d7b3dSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
7865428d7b3dSmrg      *  ) func_dirname_result="${3}" ;;
7866428d7b3dSmrg    esac])
7867428d7b3dSmrg
7868428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7869428d7b3dSmrg    func_basename_result="${1##*/}"])
7870428d7b3dSmrg
7871428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7872428d7b3dSmrg    case ${1} in
7873428d7b3dSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
7874428d7b3dSmrg      *  ) func_dirname_result="${3}" ;;
7875428d7b3dSmrg    esac
7876428d7b3dSmrg    func_basename_result="${1##*/}"])
7877428d7b3dSmrg
7878428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7879428d7b3dSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7880428d7b3dSmrg    # positional parameters, so assign one to ordinary parameter first.
7881428d7b3dSmrg    func_stripname_result=${3}
7882428d7b3dSmrg    func_stripname_result=${func_stripname_result#"${1}"}
7883428d7b3dSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
7884428d7b3dSmrg
7885428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7886428d7b3dSmrg    func_split_long_opt_name=${1%%=*}
7887428d7b3dSmrg    func_split_long_opt_arg=${1#*=}])
7888428d7b3dSmrg
7889428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7890428d7b3dSmrg    func_split_short_opt_arg=${1#??}
7891428d7b3dSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7892428d7b3dSmrg
7893428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7894428d7b3dSmrg    case ${1} in
7895428d7b3dSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7896428d7b3dSmrg      *)    func_lo2o_result=${1} ;;
7897428d7b3dSmrg    esac])
7898428d7b3dSmrg
7899428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
7900428d7b3dSmrg
7901428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
7902428d7b3dSmrg
7903428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
7904428d7b3dSmrgfi
7905428d7b3dSmrg
7906428d7b3dSmrgif test x"$lt_shell_append" = xyes; then
7907428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
7908428d7b3dSmrg
7909428d7b3dSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7910428d7b3dSmrg    func_quote_for_eval "${2}"
7911428d7b3dSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7912428d7b3dSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7913428d7b3dSmrg
7914428d7b3dSmrg  # Save a `func_append' function call where possible by direct use of '+='
7915428d7b3dSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7916428d7b3dSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
7917428d7b3dSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7918428d7b3dSmrg  test 0 -eq $? || _lt_function_replace_fail=:
7919428d7b3dSmrgelse
7920428d7b3dSmrg  # Save a `func_append' function call even when '+=' is not available
7921428d7b3dSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7922428d7b3dSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
7923428d7b3dSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7924428d7b3dSmrg  test 0 -eq $? || _lt_function_replace_fail=:
7925428d7b3dSmrgfi
7926428d7b3dSmrg
7927428d7b3dSmrgif test x"$_lt_function_replace_fail" = x":"; then
7928428d7b3dSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7929428d7b3dSmrgfi
7930428d7b3dSmrg])
7931428d7b3dSmrg
7932428d7b3dSmrg# _LT_PATH_CONVERSION_FUNCTIONS
7933428d7b3dSmrg# -----------------------------
7934428d7b3dSmrg# Determine which file name conversion functions should be used by
7935428d7b3dSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
7936428d7b3dSmrg# for certain cross-compile configurations and native mingw.
7937428d7b3dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7938428d7b3dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7939428d7b3dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
7940428d7b3dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
7941428d7b3dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
7942428d7b3dSmrg[case $host in
7943428d7b3dSmrg  *-*-mingw* )
7944428d7b3dSmrg    case $build in
7945428d7b3dSmrg      *-*-mingw* ) # actually msys
7946428d7b3dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7947428d7b3dSmrg        ;;
7948428d7b3dSmrg      *-*-cygwin* )
7949428d7b3dSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7950428d7b3dSmrg        ;;
7951428d7b3dSmrg      * ) # otherwise, assume *nix
7952428d7b3dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7953428d7b3dSmrg        ;;
7954428d7b3dSmrg    esac
7955428d7b3dSmrg    ;;
7956428d7b3dSmrg  *-*-cygwin* )
7957428d7b3dSmrg    case $build in
7958428d7b3dSmrg      *-*-mingw* ) # actually msys
7959428d7b3dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7960428d7b3dSmrg        ;;
7961428d7b3dSmrg      *-*-cygwin* )
7962428d7b3dSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
7963428d7b3dSmrg        ;;
7964428d7b3dSmrg      * ) # otherwise, assume *nix
7965428d7b3dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7966428d7b3dSmrg        ;;
7967428d7b3dSmrg    esac
7968428d7b3dSmrg    ;;
7969428d7b3dSmrg  * ) # unhandled hosts (and "normal" native builds)
7970428d7b3dSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
7971428d7b3dSmrg    ;;
7972428d7b3dSmrgesac
7973428d7b3dSmrg])
7974428d7b3dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
7975428d7b3dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7976428d7b3dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7977428d7b3dSmrg         [0], [convert $build file names to $host format])dnl
7978428d7b3dSmrg
7979428d7b3dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
7980428d7b3dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7981428d7b3dSmrg[#assume ordinary cross tools, or native build.
7982428d7b3dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
7983428d7b3dSmrgcase $host in
7984428d7b3dSmrg  *-*-mingw* )
7985428d7b3dSmrg    case $build in
7986428d7b3dSmrg      *-*-mingw* ) # actually msys
7987428d7b3dSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7988428d7b3dSmrg        ;;
7989428d7b3dSmrg    esac
7990428d7b3dSmrg    ;;
7991428d7b3dSmrgesac
7992428d7b3dSmrg])
7993428d7b3dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
7994428d7b3dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7995428d7b3dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7996428d7b3dSmrg         [0], [convert $build files to toolchain format])dnl
7997428d7b3dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
7998