1218822Sdim# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2218822Sdim#
3218822Sdim# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4218822Sdim# 2006, 2007 Free Software Foundation, Inc.
5218822Sdim#
6218822Sdim# This file is part of GNU Libtool:
7218822Sdim# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8218822Sdim#
9218822Sdim# This file is free software; the Free Software Foundation gives
10218822Sdim# unlimited permission to copy and/or distribute it, with or without
11218822Sdim# modifications, as long as this notice is preserved.
1285815Sobrien
13218822Sdimm4_define([_LT_COPYING], [dnl
14218822Sdim# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15218822Sdim# 2006, 2007 Free Software Foundation, Inc.
16218822Sdim#
17218822Sdim# This file is part of GNU Libtool:
18218822Sdim# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
19218822Sdim#
20218822Sdim# This program is free software; you can redistribute it and/or modify
21218822Sdim# it under the terms of the GNU General Public License as published by
22218822Sdim# the Free Software Foundation; either version 2 of the License, or
23218822Sdim# (at your option) any later version.
24218822Sdim#
25218822Sdim# This program is distributed in the hope that it will be useful, but
26218822Sdim# WITHOUT ANY WARRANTY; without even the implied warranty of
27218822Sdim# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28218822Sdim# General Public License for more details.
29218822Sdim#
30218822Sdim# You should have received a copy of the GNU General Public License
31218822Sdim# along with this program; if not, a copy can be downloaded from
32218822Sdim# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
33218822Sdim# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
34218822Sdim# MA 02110-1301, USA.
35218822Sdim#
36218822Sdim# As a special exception to the GNU General Public License, if you
37218822Sdim# distribute this file as part of a program that contains a
38218822Sdim# configuration script generated by Autoconf, you may include it under
39218822Sdim# the same distribution terms that you use for the rest of that program.
40218822Sdim])
4185815Sobrien
42218822Sdim# serial 53 LT_INIT
4385815Sobrien
4485815Sobrien
45218822Sdim# LT_PREREQ(VERSION)
46218822Sdim# ------------------
47218822Sdim# Complain and exit if this libtool version is less that VERSION.
48218822Sdimm4_defun([LT_PREREQ],
49218822Sdim[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
50218822Sdim       [m4_default([$3],
51218822Sdim		   [m4_fatal([Libtool version $1 or higher is required],
52218822Sdim		             63)])],
53218822Sdim       [$2])])
5485815Sobrien
5585815Sobrien
56218822Sdim# LT_INIT([OPTIONS])
57218822Sdim# ------------------
58218822SdimAC_DEFUN([LT_INIT],
59218822Sdim[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
60218822SdimAC_BEFORE([$0], [LT_LANG])dnl
61218822SdimAC_BEFORE([$0], [LT_OUTPUT])dnl
6285815Sobrien
63218822Sdimdnl Autoconf doesn't catch unexpanded LT_ macros by default:
64218822Sdimm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
65218822Sdimm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
66218822Sdimdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
67218822Sdimdnl unless we require an AC_DEFUNed macro:
68218822SdimAC_REQUIRE([LTOPTIONS_VERSION])dnl
69218822SdimAC_REQUIRE([LTSUGAR_VERSION])dnl
70218822SdimAC_REQUIRE([LTVERSION_VERSION])dnl
71218822Sdimm4_require([_LT_PROG_LTMAIN])dnl
72218822Sdimm4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
73218822Sdim
7485815Sobrien# This can be used to rebuild libtool when needed
75218822SdimLIBTOOL_DEPS="$ltmain"
7685815Sobrien
7785815Sobrien# Always use our own libtool.
7885815SobrienLIBTOOL='$(SHELL) $(top_builddir)/libtool'
7985815SobrienAC_SUBST(LIBTOOL)dnl
8085815Sobrien
81218822Sdim_LT_SETUP
82218822Sdim
83218822Sdim# Only expand once:
84218822Sdimm4_define([LT_INIT])
85218822Sdim])# _LT_INIT
86218822Sdim
87218822Sdim# Old names:
88218822SdimAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
89218822SdimAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
90218822Sdimdnl aclocal-1.4 backwards compatibility:
91218822Sdimdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
92218822Sdimdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
93218822Sdim
94218822Sdim
95218822Sdim# _LT_CC_BASENAME(CC)
96218822Sdim# -------------------
97218822Sdim# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
98218822Sdimm4_defun([_LT_CC_BASENAME],
99218822Sdim[for cc_temp in $1""; do
100218822Sdim  case $cc_temp in
101218822Sdim    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
102218822Sdim    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
103218822Sdim    \-*) ;;
104218822Sdim    *) break;;
105218822Sdim  esac
106218822Sdimdone
107218822Sdimcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
10885815Sobrien])
10985815Sobrien
110218822Sdim
111218822Sdim# _LT_FILEUTILS_DEFAULTS
112218822Sdim# ----------------------
113218822Sdim# It is okay to use these file commands and assume they have been set
114218822Sdim# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
115218822Sdimm4_defun([_LT_FILEUTILS_DEFAULTS],
116218822Sdim[: ${CP="cp -f"}
117218822Sdim: ${MV="mv -f"}
118218822Sdim: ${RM="rm -f"}
119218822Sdim])# _LT_FILEUTILS_DEFAULTS
120218822Sdim
121218822Sdim
122218822Sdim# _LT_SETUP
123218822Sdim# ---------
124218822Sdimm4_defun([_LT_SETUP],
125218822Sdim[AC_REQUIRE([AC_CANONICAL_HOST])dnl
12685815SobrienAC_REQUIRE([AC_CANONICAL_BUILD])dnl
127218822Sdim_LT_DECL([], [host_alias], [0], [The host system])dnl
128218822Sdim_LT_DECL([], [host], [0])dnl
129218822Sdim_LT_DECL([], [host_os], [0])dnl
130218822Sdimdnl
131218822Sdim_LT_DECL([], [build_alias], [0], [The build system])dnl
132218822Sdim_LT_DECL([], [build], [0])dnl
133218822Sdim_LT_DECL([], [build_os], [0])dnl
134218822Sdimdnl
13585815SobrienAC_REQUIRE([AC_PROG_CC])dnl
136218822SdimAC_REQUIRE([LT_PATH_LD])dnl
137218822SdimAC_REQUIRE([LT_PATH_NM])dnl
138218822Sdimdnl
13985815SobrienAC_REQUIRE([AC_PROG_LN_S])dnl
140218822Sdimtest -z "$LN_S" && LN_S="ln -s"
141218822Sdim_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
142218822Sdimdnl
143218822SdimAC_REQUIRE([LT_CMD_MAX_LEN])dnl
14485815SobrienAC_REQUIRE([AC_OBJEXT])dnl
145218822Sdim_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
14685815SobrienAC_REQUIRE([AC_EXEEXT])dnl
147218822Sdim_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
14885815Sobriendnl
149218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
150218822Sdimm4_require([_LT_CHECK_SHELL_FEATURES])dnl
151218822Sdimm4_require([_LT_CMD_RELOAD])dnl
152218822Sdimm4_require([_LT_CHECK_MAGIC_METHOD])dnl
153218822Sdimm4_require([_LT_CMD_OLD_ARCHIVE])dnl
154218822Sdimm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
15585815Sobrien
156218822Sdim_LT_CONFIG_LIBTOOL_INIT([
157218822Sdim# See if we are running on zsh, and set the options which allow our
158218822Sdim# commands through without removal of \ escapes INIT.
159218822Sdimif test -n "\${ZSH_VERSION+set}" ; then
160218822Sdim   setopt NO_GLOB_SUBST
161218822Sdimfi
162218822Sdim])
163218822Sdimif test -n "${ZSH_VERSION+set}" ; then
164218822Sdim   setopt NO_GLOB_SUBST
165218822Sdimfi
166218822Sdim
167218822Sdim_LT_CHECK_OBJDIR
168218822Sdim
169218822Sdimm4_require([_LT_TAG_COMPILER])dnl
170218822Sdim_LT_PROG_ECHO_BACKSLASH
171218822Sdim
172218822Sdimcase $host_os in
173218822Sdimaix3*)
174218822Sdim  # AIX sometimes has problems with the GCC collect2 program.  For some
175218822Sdim  # reason, if we set the COLLECT_NAMES environment variable, the problems
176218822Sdim  # vanish in a puff of smoke.
177218822Sdim  if test "X${COLLECT_NAMES+set}" != Xset; then
178218822Sdim    COLLECT_NAMES=
179218822Sdim    export COLLECT_NAMES
180218822Sdim  fi
181218822Sdim  ;;
182218822Sdimesac
183218822Sdim
184218822Sdim# Sed substitution that helps us do robust quoting.  It backslashifies
185218822Sdim# metacharacters that are still active within double-quoted strings.
186218822Sdimsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
187218822Sdim
188218822Sdim# Same as above, but do not quote variable references.
189218822Sdimdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
190218822Sdim
191218822Sdim# Sed substitution to delay expansion of an escaped shell variable in a
192218822Sdim# double_quote_subst'ed string.
193218822Sdimdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
194218822Sdim
195218822Sdim# Sed substitution to delay expansion of an escaped single quote.
196218822Sdimdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
197218822Sdim
198218822Sdim# Sed substitution to avoid accidental globbing in evaled expressions
199218822Sdimno_glob_subst='s/\*/\\\*/g'
200218822Sdim
201218822Sdim# Global variables:
202218822Sdimofile=libtool
203218822Sdimcan_build_shared=yes
204218822Sdim
205218822Sdim# All known linkers require a `.a' archive for static linking (except MSVC,
206218822Sdim# which needs '.lib').
207218822Sdimlibext=a
208218822Sdim
209218822Sdimwith_gnu_ld="$lt_cv_prog_gnu_ld"
210218822Sdim
211218822Sdimold_CC="$CC"
212218822Sdimold_CFLAGS="$CFLAGS"
213218822Sdim
214218822Sdim# Set sane defaults for various variables
215218822Sdimtest -z "$CC" && CC=cc
216218822Sdimtest -z "$LTCC" && LTCC=$CC
217218822Sdimtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
218218822Sdimtest -z "$LD" && LD=ld
219218822Sdimtest -z "$ac_objext" && ac_objext=o
220218822Sdim
221218822Sdim_LT_CC_BASENAME([$compiler])
222218822Sdim
22385815Sobrien# Only perform the check for file, if the check method requires it
224218822Sdimtest -z "$MAGIC_CMD" && MAGIC_CMD=file
22589857Sobriencase $deplibs_check_method in
22685815Sobrienfile_magic*)
22785815Sobrien  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
228218822Sdim    _LT_PATH_MAGIC
22985815Sobrien  fi
23085815Sobrien  ;;
23185815Sobrienesac
23285815Sobrien
233218822Sdim# Use C for the default configuration in the libtool script
234218822SdimLT_SUPPORTED_TAG([CC])
235218822Sdim_LT_LANG_C_CONFIG
236218822Sdim_LT_LANG_DEFAULT_CONFIG
237218822Sdim_LT_CONFIG_COMMANDS
238218822Sdim])# _LT_SETUP
23985815Sobrien
24085815Sobrien
241218822Sdim# _LT_PROG_LTMAIN
242218822Sdim# ---------------
243218822Sdim# Note that this code is called both from `configure', and `config.status'
244218822Sdim# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
245218822Sdim# `config.status' has no value for ac_aux_dir unless we are using Automake,
246218822Sdim# so we pass a copy along to make sure it has a sensible value anyway.
247218822Sdimm4_defun([_LT_PROG_LTMAIN],
248218822Sdim[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
249218822Sdim_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
250218822Sdimltmain="$ac_aux_dir/ltmain.sh"
251218822Sdim])# _LT_PROG_LTMAIN
25285815Sobrien
253218822Sdim
254218822Sdim## ------------------------------------- ##
255218822Sdim## Accumulate code for creating libtool. ##
256218822Sdim## ------------------------------------- ##
257218822Sdim
258218822Sdim# So that we can recreate a full libtool script including additional
259218822Sdim# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
260218822Sdim# in macros and then make a single call at the end using the `libtool'
261218822Sdim# label.
262218822Sdim
263218822Sdim
264218822Sdim# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
265218822Sdim# ----------------------------------------
266218822Sdim# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
267218822Sdimm4_define([_LT_CONFIG_LIBTOOL_INIT],
268218822Sdim[m4_ifval([$1],
269218822Sdim          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
270218822Sdim                     [$1
271218822Sdim])])])
272218822Sdim
273218822Sdim# Initialize.
274218822Sdimm4_define([_LT_OUTPUT_LIBTOOL_INIT])
275218822Sdim
276218822Sdim
277218822Sdim# _LT_CONFIG_LIBTOOL([COMMANDS])
278218822Sdim# ------------------------------
279218822Sdim# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
280218822Sdimm4_define([_LT_CONFIG_LIBTOOL],
281218822Sdim[m4_ifval([$1],
282218822Sdim          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
283218822Sdim                     [$1
284218822Sdim])])])
285218822Sdim
286218822Sdim# Initialize.
287218822Sdimm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
288218822Sdim
289218822Sdim
290218822Sdim# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
291218822Sdim# -----------------------------------------------------
292218822Sdimm4_defun([_LT_CONFIG_SAVE_COMMANDS],
293218822Sdim[_LT_CONFIG_LIBTOOL([$1])
294218822Sdim_LT_CONFIG_LIBTOOL_INIT([$2])
295218822Sdim])
296218822Sdim
297218822Sdim
298218822Sdim# _LT_FORMAT_COMMENT([COMMENT])
299218822Sdim# -----------------------------
300218822Sdim# Add leading comment marks to the start of each line, and a trailing
301218822Sdim# full-stop to the whole comment if one is not present already.
302218822Sdimm4_define([_LT_FORMAT_COMMENT],
303218822Sdim[m4_ifval([$1], [
304218822Sdimm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
305218822Sdim              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
306218822Sdim)])
307218822Sdim
308218822Sdim
309218822Sdim
310218822Sdim## ------------------------ ##
311218822Sdim## FIXME: Eliminate VARNAME ##
312218822Sdim## ------------------------ ##
313218822Sdim
314218822Sdim
315218822Sdim# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
316218822Sdim# -------------------------------------------------------------------
317218822Sdim# CONFIGNAME is the name given to the value in the libtool script.
318218822Sdim# VARNAME is the (base) name used in the configure script.
319218822Sdim# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
320218822Sdim# VARNAME.  Any other value will be used directly.
321218822Sdimm4_define([_LT_DECL],
322218822Sdim[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
323218822Sdim    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
324218822Sdim	[m4_ifval([$1], [$1], [$2])])
325218822Sdim    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
326218822Sdim    m4_ifval([$4],
327218822Sdim	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
328218822Sdim    lt_dict_add_subkey([lt_decl_dict], [$2],
329218822Sdim	[tagged?], [m4_ifval([$5], [yes], [no])])])
330218822Sdim])
331218822Sdim
332218822Sdim
333218822Sdim# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
334218822Sdim# --------------------------------------------------------
335218822Sdimm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
336218822Sdim
337218822Sdim
338218822Sdim# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
339218822Sdim# ------------------------------------------------
340218822Sdimm4_define([lt_decl_tag_varnames],
341218822Sdim[_lt_decl_filter([tagged?], [yes], $@)])
342218822Sdim
343218822Sdim
344218822Sdim# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
345218822Sdim# ---------------------------------------------------------
346218822Sdimm4_define([_lt_decl_filter],
347218822Sdim[m4_case([$#],
348218822Sdim  [0], [m4_fatal([$0: too few arguments: $#])],
349218822Sdim  [1], [m4_fatal([$0: too few arguments: $#: $1])],
350218822Sdim  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
351218822Sdim  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
352218822Sdim  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
353218822Sdim])
354218822Sdim
355218822Sdim
356218822Sdim# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
357218822Sdim# --------------------------------------------------
358218822Sdimm4_define([lt_decl_quote_varnames],
359218822Sdim[_lt_decl_filter([value], [1], $@)])
360218822Sdim
361218822Sdim
362218822Sdim# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
363218822Sdim# ---------------------------------------------------
364218822Sdimm4_define([lt_decl_dquote_varnames],
365218822Sdim[_lt_decl_filter([value], [2], $@)])
366218822Sdim
367218822Sdim
368218822Sdim# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
369218822Sdim# ---------------------------------------------------
370218822Sdimm4_define([lt_decl_varnames_tagged],
371218822Sdim[_$0(m4_quote(m4_default([$1], [[, ]])),
372218822Sdim     m4_quote(m4_if([$2], [],
373218822Sdim		     m4_quote(lt_decl_tag_varnames),
374218822Sdim		  m4_quote(m4_shift($@)))),
375218822Sdim     m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
376218822Sdimm4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
377218822Sdim
378218822Sdim
379218822Sdim# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
380218822Sdim# ------------------------------------------------
381218822Sdimm4_define([lt_decl_all_varnames],
382218822Sdim[_$0(m4_quote(m4_default([$1], [[, ]])),
383218822Sdim     m4_if([$2], [],
384218822Sdim	   m4_quote(lt_decl_varnames),
385218822Sdim	m4_quote(m4_shift($@))))[]dnl
386218822Sdim])
387218822Sdimm4_define([_lt_decl_all_varnames],
388218822Sdim[lt_join($@, lt_decl_varnames_tagged([$1],
389218822Sdim			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
390218822Sdim])
391218822Sdim
392218822Sdim
393218822Sdim# _LT_CONFIG_STATUS_DECLARE([VARNAME])
394218822Sdim# ------------------------------------
395218822Sdim# Quote a variable value, and forward it to `config.status' so that its
396218822Sdim# declaration there will have the same value as in `configure'.  VARNAME
397218822Sdim# must have a single quote delimited value for this to work.
398218822Sdimm4_define([_LT_CONFIG_STATUS_DECLARE],
399218822Sdim[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
400218822Sdim
401218822Sdim
402218822Sdim# _LT_CONFIG_STATUS_DECLARATIONS
403218822Sdim# ------------------------------
404218822Sdim# We delimit libtool config variables with single quotes, so when
405218822Sdim# we write them to config.status, we have to be sure to quote all
406218822Sdim# embedded single quotes properly.  In configure, this macro expands
407218822Sdim# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
408218822Sdim#
409218822Sdim#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
410218822Sdimm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
411218822Sdim[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
412218822Sdim    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
413218822Sdim
414218822Sdim
415218822Sdim# _LT_LIBTOOL_TAGS
416218822Sdim# ----------------
417218822Sdim# Output comment and list of tags supported by the script
418218822Sdimm4_defun([_LT_LIBTOOL_TAGS],
419218822Sdim[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
420218822Sdimavailable_tags="_LT_TAGS"dnl
421218822Sdim])
422218822Sdim
423218822Sdim
424218822Sdim# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
425218822Sdim# -----------------------------------
426218822Sdim# Extract the dictionary values for VARNAME (optionally with TAG) and
427218822Sdim# expand to a commented shell variable setting:
428218822Sdim#
429218822Sdim#    # Some comment about what VAR is for.
430218822Sdim#    visible_name=$lt_internal_name
431218822Sdimm4_define([_LT_LIBTOOL_DECLARE],
432218822Sdim[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
433218822Sdim					   [description])))[]dnl
434218822Sdimm4_pushdef([_libtool_name],
435218822Sdim    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
436218822Sdimm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
437218822Sdim    [0], [_libtool_name=[$]$1],
438218822Sdim    [1], [_libtool_name=$lt_[]$1],
439218822Sdim    [2], [_libtool_name=$lt_[]$1],
440218822Sdim    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
441218822Sdimm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
442218822Sdim])
443218822Sdim
444218822Sdim
445218822Sdim# _LT_LIBTOOL_CONFIG_VARS
446218822Sdim# -----------------------
447218822Sdim# Produce commented declarations of non-tagged libtool config variables
448218822Sdim# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
449218822Sdim# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
450218822Sdim# section) are produced by _LT_LIBTOOL_TAG_VARS.
451218822Sdimm4_defun([_LT_LIBTOOL_CONFIG_VARS],
452218822Sdim[m4_foreach([_lt_var],
453218822Sdim    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
454218822Sdim    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
455218822Sdim
456218822Sdim
457218822Sdim# _LT_LIBTOOL_TAG_VARS(TAG)
458218822Sdim# -------------------------
459218822Sdimm4_define([_LT_LIBTOOL_TAG_VARS],
460218822Sdim[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
461218822Sdim    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
462218822Sdim
463218822Sdim
464218822Sdim# _LT_TAGVAR(VARNAME, [TAGNAME])
465218822Sdim# ------------------------------
466218822Sdimm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
467218822Sdim
468218822Sdim
469218822Sdim# _LT_CONFIG_COMMANDS
470218822Sdim# -------------------
471218822Sdim# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
472218822Sdim# variables for single and double quote escaping we saved from calls
473218822Sdim# to _LT_DECL, we can put quote escaped variables declarations
474218822Sdim# into `config.status', and then the shell code to quote escape them in
475218822Sdim# for loops in `config.status'.  Finally, any additional code accumulated
476218822Sdim# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
477218822Sdimm4_defun([_LT_CONFIG_COMMANDS],
478218822Sdim[AC_PROVIDE_IFELSE([LT_OUTPUT],
479218822Sdim	dnl If the libtool generation code has been placed in $CONFIG_LT,
480218822Sdim	dnl instead of duplicating it all over again into config.status,
481218822Sdim	dnl then we will have config.status run $CONFIG_LT later, so it
482218822Sdim	dnl needs to know what name is stored there:
483218822Sdim        [AC_CONFIG_COMMANDS([libtool],
484218822Sdim            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
485218822Sdim    dnl If the libtool generation code is destined for config.status,
486218822Sdim    dnl expand the accumulated commands and init code now:
487218822Sdim    [AC_CONFIG_COMMANDS([libtool],
488218822Sdim        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
489218822Sdim])#_LT_CONFIG_COMMANDS
490218822Sdim
491218822Sdim
492218822Sdim# Initialize.
493218822Sdimm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
494218822Sdim[
495218822Sdim
496218822Sdim# The HP-UX ksh and POSIX shell print the target directory to stdout
497218822Sdim# if CDPATH is set.
498218822Sdim(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
499218822Sdim
500218822Sdimsed_quote_subst='$sed_quote_subst'
501218822Sdimdouble_quote_subst='$double_quote_subst'
502218822Sdimdelay_variable_subst='$delay_variable_subst'
503218822Sdim_LT_CONFIG_STATUS_DECLARATIONS
504218822SdimLTCC='$LTCC'
505218822SdimLTCFLAGS='$LTCFLAGS'
506218822Sdimcompiler='$compiler_DEFAULT'
507218822Sdim
508218822Sdim# Quote evaled strings.
509218822Sdimfor var in lt_decl_all_varnames([[ \
510218822Sdim]], lt_decl_quote_varnames); do
511218822Sdim    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
512218822Sdim    *[[\\\\\\\`\\"\\\$]]*)
513218822Sdim      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
514218822Sdim      ;;
515218822Sdim    *)
516218822Sdim      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
517218822Sdim      ;;
518218822Sdim    esac
519218822Sdimdone
520218822Sdim
521218822Sdim# Double-quote double-evaled strings.
522218822Sdimfor var in lt_decl_all_varnames([[ \
523218822Sdim]], lt_decl_dquote_varnames); do
524218822Sdim    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
525218822Sdim    *[[\\\\\\\`\\"\\\$]]*)
526218822Sdim      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
527218822Sdim      ;;
528218822Sdim    *)
529218822Sdim      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
530218822Sdim      ;;
531218822Sdim    esac
532218822Sdimdone
533218822Sdim
534218822Sdim# Fix-up fallback echo if it was mangled by the above quoting rules.
535218822Sdimcase \$lt_ECHO in
536218822Sdim*'\\\[$]0 --fallback-echo"')dnl "
537218822Sdim  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
538218822Sdim  ;;
539218822Sdimesac
540218822Sdim
541218822Sdim_LT_OUTPUT_LIBTOOL_INIT
542218822Sdim])
543218822Sdim
544218822Sdim
545218822Sdim# LT_OUTPUT
546218822Sdim# ---------
547218822Sdim# This macro allows early generation of the libtool script (before
548218822Sdim# AC_OUTPUT is called), incase it is used in configure for compilation
549218822Sdim# tests.
550218822SdimAC_DEFUN([LT_OUTPUT],
551218822Sdim[: ${CONFIG_LT=./config.lt}
552218822SdimAC_MSG_NOTICE([creating $CONFIG_LT])
553218822Sdimcat >"$CONFIG_LT" <<_LTEOF
554218822Sdim#! $SHELL
555218822Sdim# Generated by $as_me.
556218822Sdim# Run this file to recreate a libtool stub with the current configuration.
557218822Sdim
558218822Sdimlt_cl_silent=false
559218822SdimSHELL=\${CONFIG_SHELL-$SHELL}
560218822Sdim_LTEOF
561218822Sdim
562218822Sdimcat >>"$CONFIG_LT" <<\_LTEOF
563218822SdimAS_SHELL_SANITIZE
564218822Sdim_AS_PREPARE
565218822Sdim
566218822Sdimexec AS_MESSAGE_FD>&1
567218822Sdimexec AS_MESSAGE_LOG_FD>>config.log
568218822Sdim{
569218822Sdim  echo
570218822Sdim  AS_BOX([Running $as_me.])
571218822Sdim} >&AS_MESSAGE_LOG_FD
572218822Sdim
573218822Sdimlt_cl_help="\
574218822Sdim\`$as_me' creates a local libtool stub from the current configuration,
575218822Sdimfor use in further configure time tests before the real libtool is
576218822Sdimgenerated.
577218822Sdim
578218822SdimUsage: $[0] [[OPTIONS]]
579218822Sdim
580218822Sdim  -h, --help      print this help, then exit
581218822Sdim  -V, --version   print version number, then exit
582218822Sdim  -q, --quiet     do not print progress messages
583218822Sdim  -d, --debug     don't remove temporary files
584218822Sdim
585218822SdimReport bugs to <bug-libtool@gnu.org>."
586218822Sdim
587218822Sdimlt_cl_version="\
588218822Sdimm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
589218822Sdimm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
590218822Sdimconfigured by $[0], generated by m4_PACKAGE_STRING.
591218822Sdim
592218822SdimCopyright (C) 2007 Free Software Foundation, Inc.
593218822SdimThis config.lt script is free software; the Free Software Foundation
594218822Sdimgives unlimited permision to copy, distribute and modify it."
595218822Sdim
596218822Sdimwhile test $[#] != 0
597218822Sdimdo
598218822Sdim  case $[1] in
599218822Sdim    --version | --v* | -V )
600218822Sdim      echo "$lt_cl_version"; exit 0 ;;
601218822Sdim    --help | --h* | -h )
602218822Sdim      echo "$lt_cl_help"; exit 0 ;;
603218822Sdim    --debug | --d* | -d )
604218822Sdim      debug=: ;;
605218822Sdim    --quiet | --q* | --silent | --s* | -q )
606218822Sdim      lt_cl_silent=: ;;
607218822Sdim
608218822Sdim    -*) AC_MSG_ERROR([unrecognized option: $[1]
609218822SdimTry `$[0] --help' for more information.]) ;;
610218822Sdim
611218822Sdim    *) AC_MSG_ERROR([unrecognized argument: $[1]
612218822SdimTry `$[0] --help for more information.]) ;;
613218822Sdim  esac
614218822Sdim  shift
615218822Sdimdone
616218822Sdim
617218822Sdimif $lt_cl_silent; then
618218822Sdim  exec AS_MESSAGE_FD>/dev/null
619218822Sdimfi
620218822Sdim_LTEOF
621218822Sdim
622218822Sdimcat >>"$CONFIG_LT" <<_LTEOF
623218822Sdim_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
624218822Sdim_LTEOF
625218822Sdim
626218822Sdimcat >>"$CONFIG_LT" <<\_LTEOF
627218822SdimAC_MSG_NOTICE([creating $ofile])
628218822Sdim_LT_OUTPUT_LIBTOOL_COMMANDS
629218822SdimAS_EXIT(0)
630218822Sdim_LTEOF
631218822Sdimchmod +x "$CONFIG_LT"
632218822Sdim
633218822Sdim# configure is writing to config.log, but config.lt does its own redirection,
634218822Sdim# appending to config.log, which fails on DOS, as config.log is still kept
635218822Sdim# open by configure.  Here we exec the FD to /dev/null, effectively closing
636218822Sdim# config.log, so it can be properly (re)opened and appended to by config.lt.
637218822Sdimif test "$no_create" != yes; then
638218822Sdim  lt_cl_success=:
639218822Sdim  test "$silent" = yes &&
640218822Sdim    lt_config_lt_args="$lt_config_lt_args --quiet"
641218822Sdim  exec AS_MESSAGE_LOG_FD>/dev/null
642218822Sdim  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
643218822Sdim  exec AS_MESSAGE_LOG_FD>>config.log
644218822Sdim  $lt_cl_success || AS_EXIT(1)
645218822Sdimfi
646218822Sdim])# LT_OUTPUT
647218822Sdim
648218822Sdim
649218822Sdim# _LT_CONFIG(TAG)
650218822Sdim# ---------------
651218822Sdim# If TAG is the built-in tag, create an initial libtool script with a
652218822Sdim# default configuration from the untagged config vars.  Otherwise add code
653218822Sdim# to config.status for appending the configuration named by TAG from the
654218822Sdim# matching tagged config vars.
655218822Sdimm4_defun([_LT_CONFIG],
656218822Sdim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
657218822Sdim_LT_CONFIG_SAVE_COMMANDS([
658218822Sdim  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
659218822Sdim  m4_if(_LT_TAG, [C], [
660218822Sdim    # See if we are running on zsh, and set the options which allow our
661218822Sdim    # commands through without removal of \ escapes.
662218822Sdim    if test -n "${ZSH_VERSION+set}" ; then
663218822Sdim      setopt NO_GLOB_SUBST
664218822Sdim    fi
665218822Sdim
666218822Sdim    cfgfile="${ofile}T"
667218822Sdim    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
668218822Sdim    $RM "$cfgfile"
669218822Sdim
670218822Sdim    cat <<_LT_EOF >> "$cfgfile"
671218822Sdim#! $SHELL
672218822Sdim
673218822Sdim# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
674218822Sdim# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
675218822Sdim# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
676218822Sdim# NOTE: Changes made to this file will be lost: look at ltmain.sh.
677218822Sdim#
678218822Sdim_LT_COPYING
679218822Sdim_LT_LIBTOOL_TAGS
680218822Sdim
681218822Sdim# ### BEGIN LIBTOOL CONFIG
682218822Sdim_LT_LIBTOOL_CONFIG_VARS
683218822Sdim_LT_LIBTOOL_TAG_VARS
684218822Sdim# ### END LIBTOOL CONFIG
685218822Sdim
686218822Sdim_LT_EOF
687218822Sdim
688218822Sdim  case $host_os in
689218822Sdim  aix3*)
690218822Sdim    cat <<\_LT_EOF >> "$cfgfile"
691218822Sdim# AIX sometimes has problems with the GCC collect2 program.  For some
692218822Sdim# reason, if we set the COLLECT_NAMES environment variable, the problems
693218822Sdim# vanish in a puff of smoke.
694218822Sdimif test "X${COLLECT_NAMES+set}" != Xset; then
695218822Sdim  COLLECT_NAMES=
696218822Sdim  export COLLECT_NAMES
697218822Sdimfi
698218822Sdim_LT_EOF
699218822Sdim    ;;
700218822Sdim  esac
701218822Sdim
702218822Sdim  _LT_PROG_LTMAIN
703218822Sdim
704218822Sdim  # We use sed instead of cat because bash on DJGPP gets confused if
705218822Sdim  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
706218822Sdim  # text mode, it properly converts lines to CR/LF.  This bash problem
707218822Sdim  # is reportedly fixed, but why not run on old versions too?
708218822Sdim  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
709218822Sdim    || (rm -f "$cfgfile"; exit 1)
710218822Sdim
711218822Sdim  _LT_PROG_XSI_SHELLFNS
712218822Sdim
713218822Sdim  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
714218822Sdim    || (rm -f "$cfgfile"; exit 1)
715218822Sdim
716218822Sdim  mv -f "$cfgfile" "$ofile" ||
717218822Sdim    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
718218822Sdim  chmod +x "$ofile"
719218822Sdim],
720218822Sdim[cat <<_LT_EOF >> "$ofile"
721218822Sdim
722218822Sdimdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
723218822Sdimdnl in a comment (ie after a #).
724218822Sdim# ### BEGIN LIBTOOL TAG CONFIG: $1
725218822Sdim_LT_LIBTOOL_TAG_VARS(_LT_TAG)
726218822Sdim# ### END LIBTOOL TAG CONFIG: $1
727218822Sdim_LT_EOF
728218822Sdim])dnl /m4_if
729218822Sdim],
730218822Sdim[m4_if([$1], [], [
731218822Sdim    PACKAGE='$PACKAGE'
732218822Sdim    VERSION='$VERSION'
733218822Sdim    TIMESTAMP='$TIMESTAMP'
734218822Sdim    RM='$RM'
735218822Sdim    ofile='$ofile'], [])
736218822Sdim])dnl /_LT_CONFIG_SAVE_COMMANDS
737218822Sdim])# _LT_CONFIG
738218822Sdim
739218822Sdim
740218822Sdim# LT_SUPPORTED_TAG(TAG)
741218822Sdim# ---------------------
742218822Sdim# Trace this macro to discover what tags are supported by the libtool
743218822Sdim# --tag option, using:
744218822Sdim#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
745218822SdimAC_DEFUN([LT_SUPPORTED_TAG], [])
746218822Sdim
747218822Sdim
748218822Sdim# C support is built-in for now
749218822Sdimm4_define([_LT_LANG_C_enabled], [])
750218822Sdimm4_define([_LT_TAGS], [])
751218822Sdim
752218822Sdim
753218822Sdim# LT_LANG(LANG)
754218822Sdim# -------------
755218822Sdim# Enable libtool support for the given language if not already enabled.
756218822SdimAC_DEFUN([LT_LANG],
757218822Sdim[AC_BEFORE([$0], [LT_OUTPUT])dnl
758218822Sdimm4_case([$1],
759218822Sdim  [C],			[_LT_LANG(C)],
760218822Sdim  [C++],		[_LT_LANG(CXX)],
761218822Sdim  [Java],		[_LT_LANG(GCJ)],
762218822Sdim  [Fortran 77],		[_LT_LANG(F77)],
763218822Sdim  [Fortran],		[_LT_LANG(FC)],
764218822Sdim  [Windows Resource],	[_LT_LANG(RC)],
765218822Sdim  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
766218822Sdim    [_LT_LANG($1)],
767218822Sdim    [m4_fatal([$0: unsupported language: "$1"])])])dnl
768218822Sdim])# LT_LANG
769218822Sdim
770218822Sdim
771218822Sdim# _LT_LANG(LANGNAME)
772218822Sdim# ------------------
773218822Sdimm4_defun([_LT_LANG],
774218822Sdim[m4_ifdef([_LT_LANG_]$1[_enabled], [],
775218822Sdim  [LT_SUPPORTED_TAG([$1])dnl
776218822Sdim  m4_append([_LT_TAGS], [$1 ])dnl
777218822Sdim  m4_define([_LT_LANG_]$1[_enabled], [])dnl
778218822Sdim  _LT_LANG_$1_CONFIG($1)])dnl
779218822Sdim])# _LT_LANG
780218822Sdim
781218822Sdim
782218822Sdim# _LT_LANG_DEFAULT_CONFIG
783218822Sdim# -----------------------
784218822Sdimm4_defun([_LT_LANG_DEFAULT_CONFIG],
785218822Sdim[AC_PROVIDE_IFELSE([AC_PROG_CXX],
786218822Sdim  [LT_LANG(CXX)],
787218822Sdim  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
788218822Sdim
789218822SdimAC_PROVIDE_IFELSE([AC_PROG_F77],
790218822Sdim  [LT_LANG(F77)],
791218822Sdim  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
792218822Sdim
793218822SdimAC_PROVIDE_IFELSE([AC_PROG_FC],
794218822Sdim  [LT_LANG(FC)],
795218822Sdim  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
796218822Sdim
797218822Sdimdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
798218822Sdimdnl pulling things in needlessly.
799218822SdimAC_PROVIDE_IFELSE([AC_PROG_GCJ],
800218822Sdim  [LT_LANG(GCJ)],
801218822Sdim  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
802218822Sdim    [LT_LANG(GCJ)],
803218822Sdim    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
804218822Sdim      [LT_LANG(GCJ)],
805218822Sdim      [m4_ifdef([AC_PROG_GCJ],
806218822Sdim	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
807218822Sdim       m4_ifdef([A][M_PROG_GCJ],
808218822Sdim	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
809218822Sdim       m4_ifdef([LT_PROG_GCJ],
810218822Sdim	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
811218822Sdim
812218822SdimAC_PROVIDE_IFELSE([LT_PROG_RC],
813218822Sdim  [LT_LANG(RC)],
814218822Sdim  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
815218822Sdim])# _LT_LANG_DEFAULT_CONFIG
816218822Sdim
817218822Sdim# Obsolete macros:
818218822SdimAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
819218822SdimAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
820218822SdimAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
821218822SdimAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
822218822Sdimdnl aclocal-1.4 backwards compatibility:
823218822Sdimdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
824218822Sdimdnl AC_DEFUN([AC_LIBTOOL_F77], [])
825218822Sdimdnl AC_DEFUN([AC_LIBTOOL_FC], [])
826218822Sdimdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
827218822Sdim
828218822Sdim
829218822Sdim# _LT_TAG_COMPILER
830218822Sdim# ----------------
831218822Sdimm4_defun([_LT_TAG_COMPILER],
832218822Sdim[AC_REQUIRE([AC_PROG_CC])dnl
833218822Sdim
834218822Sdim_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
835218822Sdim_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
836218822Sdim_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
837218822Sdim_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
838218822Sdim
839218822Sdim# If no C compiler was specified, use CC.
840218822SdimLTCC=${LTCC-"$CC"}
841218822Sdim
842218822Sdim# If no C compiler flags were specified, use CFLAGS.
843218822SdimLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
844218822Sdim
845218822Sdim# Allow CC to be a program name with arguments.
846218822Sdimcompiler=$CC
847218822Sdim])# _LT_TAG_COMPILER
848218822Sdim
849218822Sdim
850218822Sdim# _LT_COMPILER_BOILERPLATE
851218822Sdim# ------------------------
852218822Sdim# Check for compiler boilerplate output or warnings with
853218822Sdim# the simple compiler test code.
854218822Sdimm4_defun([_LT_COMPILER_BOILERPLATE],
855218822Sdim[m4_require([_LT_DECL_SED])dnl
856218822Sdimac_outfile=conftest.$ac_objext
857218822Sdimecho "$lt_simple_compile_test_code" >conftest.$ac_ext
858218822Sdimeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
859218822Sdim_lt_compiler_boilerplate=`cat conftest.err`
860218822Sdim$RM conftest*
861218822Sdim])# _LT_COMPILER_BOILERPLATE
862218822Sdim
863218822Sdim
864218822Sdim# _LT_LINKER_BOILERPLATE
865218822Sdim# ----------------------
866218822Sdim# Check for linker boilerplate output or warnings with
867218822Sdim# the simple link test code.
868218822Sdimm4_defun([_LT_LINKER_BOILERPLATE],
869218822Sdim[m4_require([_LT_DECL_SED])dnl
870218822Sdimac_outfile=conftest.$ac_objext
871218822Sdimecho "$lt_simple_link_test_code" >conftest.$ac_ext
872218822Sdimeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
873218822Sdim_lt_linker_boilerplate=`cat conftest.err`
874218822Sdim$RM conftest*
875218822Sdim])# _LT_LINKER_BOILERPLATE
876218822Sdim
877218822Sdim
878218822Sdim# _LT_SYS_MODULE_PATH_AIX
879218822Sdim# -----------------------
880218822Sdim# Links a minimal program and checks the executable
881218822Sdim# for the system default hardcoded library path. In most cases,
882218822Sdim# this is /usr/lib:/lib, but when the MPI compilers are used
883218822Sdim# the location of the communication and MPI libs are included too.
884218822Sdim# If we don't find anything, use the default library path according
885218822Sdim# to the aix ld manual.
886218822Sdimm4_defun([_LT_SYS_MODULE_PATH_AIX],
887218822Sdim[m4_require([_LT_DECL_SED])dnl
888218822SdimAC_LINK_IFELSE(AC_LANG_PROGRAM,[
889218822Sdimlt_aix_libpath_sed='
890218822Sdim    /Import File Strings/,/^$/ {
891218822Sdim	/^0/ {
892218822Sdim	    s/^0  *\(.*\)$/\1/
893218822Sdim	    p
894218822Sdim	}
895218822Sdim    }'
896218822Sdimaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
897218822Sdim# Check for a 64-bit object if we didn't find anything.
898218822Sdimif test -z "$aix_libpath"; then
899218822Sdim  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
900218822Sdimfi],[])
901218822Sdimif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
902218822Sdim])# _LT_SYS_MODULE_PATH_AIX
903218822Sdim
904218822Sdim
905218822Sdim# _LT_SHELL_INIT(ARG)
906218822Sdim# -------------------
907218822Sdimm4_define([_LT_SHELL_INIT],
908218822Sdim[ifdef([AC_DIVERSION_NOTICE],
909218822Sdim	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
910218822Sdim	 [AC_DIVERT_PUSH(NOTICE)])
911218822Sdim$1
912218822SdimAC_DIVERT_POP
913218822Sdim])# _LT_SHELL_INIT
914218822Sdim
915218822Sdim
916218822Sdim# _LT_PROG_ECHO_BACKSLASH
917218822Sdim# -----------------------
918218822Sdim# Add some code to the start of the generated configure script which
919218822Sdim# will find an echo command which doesn't interpret backslashes.
920218822Sdimm4_defun([_LT_PROG_ECHO_BACKSLASH],
921218822Sdim[_LT_SHELL_INIT([
922218822Sdim# Check that we are running under the correct shell.
923218822SdimSHELL=${CONFIG_SHELL-/bin/sh}
924218822Sdim
925218822Sdimcase X$lt_ECHO in
926218822SdimX*--fallback-echo)
927218822Sdim  # Remove one level of quotation (which was required for Make).
928218822Sdim  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
929218822Sdim  ;;
930218822Sdimesac
931218822Sdim
932218822SdimECHO=${lt_ECHO-echo}
933218822Sdimif test "X[$]1" = X--no-reexec; then
934218822Sdim  # Discard the --no-reexec flag, and continue.
935218822Sdim  shift
936218822Sdimelif test "X[$]1" = X--fallback-echo; then
937218822Sdim  # Avoid inline document here, it may be left over
938218822Sdim  :
939218822Sdimelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
940218822Sdim  # Yippee, $ECHO works!
941218822Sdim  :
942218822Sdimelse
943218822Sdim  # Restart under the correct shell.
944218822Sdim  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
945218822Sdimfi
946218822Sdim
947218822Sdimif test "X[$]1" = X--fallback-echo; then
948218822Sdim  # used as fallback echo
949218822Sdim  shift
950218822Sdim  cat <<_LT_EOF
951218822Sdim[$]*
952218822Sdim_LT_EOF
953218822Sdim  exit 0
954218822Sdimfi
955218822Sdim
956218822Sdim# The HP-UX ksh and POSIX shell print the target directory to stdout
957218822Sdim# if CDPATH is set.
958218822Sdim(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
959218822Sdim
960218822Sdimif test -z "$lt_ECHO"; then
961218822Sdim  if test "X${echo_test_string+set}" != Xset; then
962218822Sdim    # find a string as large as possible, as long as the shell can cope with it
963218822Sdim    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
964218822Sdim      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
965218822Sdim      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
966218822Sdim	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
967218822Sdim      then
968218822Sdim        break
969218822Sdim      fi
970218822Sdim    done
971218822Sdim  fi
972218822Sdim
973218822Sdim  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
974218822Sdim     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
975218822Sdim     test "X$echo_testing_string" = "X$echo_test_string"; then
976218822Sdim    :
977218822Sdim  else
978218822Sdim    # The Solaris, AIX, and Digital Unix default echo programs unquote
979218822Sdim    # backslashes.  This makes it impossible to quote backslashes using
980218822Sdim    #   echo "$something" | sed 's/\\/\\\\/g'
981218822Sdim    #
982218822Sdim    # So, first we look for a working echo in the user's PATH.
983218822Sdim
984218822Sdim    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
985218822Sdim    for dir in $PATH /usr/ucb; do
986218822Sdim      IFS="$lt_save_ifs"
987218822Sdim      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
988218822Sdim         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
989218822Sdim         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
990218822Sdim         test "X$echo_testing_string" = "X$echo_test_string"; then
991218822Sdim        ECHO="$dir/echo"
992218822Sdim        break
993218822Sdim      fi
994218822Sdim    done
995218822Sdim    IFS="$lt_save_ifs"
996218822Sdim
997218822Sdim    if test "X$ECHO" = Xecho; then
998218822Sdim      # We didn't find a better echo, so look for alternatives.
999218822Sdim      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1000218822Sdim         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1001218822Sdim         test "X$echo_testing_string" = "X$echo_test_string"; then
1002218822Sdim        # This shell has a builtin print -r that does the trick.
1003218822Sdim        ECHO='print -r'
1004218822Sdim      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1005218822Sdim	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1006218822Sdim        # If we have ksh, try running configure again with it.
1007218822Sdim        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1008218822Sdim        export ORIGINAL_CONFIG_SHELL
1009218822Sdim        CONFIG_SHELL=/bin/ksh
1010218822Sdim        export CONFIG_SHELL
1011218822Sdim        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1012218822Sdim      else
1013218822Sdim        # Try using printf.
1014218822Sdim        ECHO='printf %s\n'
1015218822Sdim        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1016218822Sdim	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1017218822Sdim	   test "X$echo_testing_string" = "X$echo_test_string"; then
1018218822Sdim	  # Cool, printf works
1019218822Sdim	  :
1020218822Sdim        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1021218822Sdim	     test "X$echo_testing_string" = 'X\t' &&
1022218822Sdim	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1023218822Sdim	     test "X$echo_testing_string" = "X$echo_test_string"; then
1024218822Sdim	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1025218822Sdim	  export CONFIG_SHELL
1026218822Sdim	  SHELL="$CONFIG_SHELL"
1027218822Sdim	  export SHELL
1028218822Sdim	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1029218822Sdim        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1030218822Sdim	     test "X$echo_testing_string" = 'X\t' &&
1031218822Sdim	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1032218822Sdim	     test "X$echo_testing_string" = "X$echo_test_string"; then
1033218822Sdim	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1034218822Sdim        else
1035218822Sdim	  # maybe with a smaller string...
1036218822Sdim	  prev=:
1037218822Sdim
1038218822Sdim	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1039218822Sdim	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1040218822Sdim	    then
1041218822Sdim	      break
1042218822Sdim	    fi
1043218822Sdim	    prev="$cmd"
1044218822Sdim	  done
1045218822Sdim
1046218822Sdim	  if test "$prev" != 'sed 50q "[$]0"'; then
1047218822Sdim	    echo_test_string=`eval $prev`
1048218822Sdim	    export echo_test_string
1049218822Sdim	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1050218822Sdim	  else
1051218822Sdim	    # Oops.  We lost completely, so just stick with echo.
1052218822Sdim	    ECHO=echo
1053218822Sdim	  fi
1054218822Sdim        fi
1055218822Sdim      fi
1056218822Sdim    fi
1057218822Sdim  fi
1058218822Sdimfi
1059218822Sdim
1060218822Sdim# Copy echo and quote the copy suitably for passing to libtool from
1061218822Sdim# the Makefile, instead of quoting the original, which is used later.
1062218822Sdimlt_ECHO=$ECHO
1063218822Sdimif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1064218822Sdim   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1065218822Sdimfi
1066218822Sdim
1067218822SdimAC_SUBST(lt_ECHO)
1068218822Sdim])
1069218822Sdim_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1070218822Sdim_LT_DECL([], [ECHO], [1],
1071218822Sdim    [An echo program that does not interpret backslashes])
1072218822Sdim])# _LT_PROG_ECHO_BACKSLASH
1073218822Sdim
1074218822Sdim
1075218822Sdim# _LT_ENABLE_LOCK
1076218822Sdim# ---------------
1077218822Sdimm4_defun([_LT_ENABLE_LOCK],
1078218822Sdim[AC_REQUIRE([AC_OBJEXT])dnl
1079218822SdimAC_ARG_ENABLE([libtool-lock],
1080218822Sdim  [AS_HELP_STRING([--disable-libtool-lock],
1081218822Sdim    [avoid locking (might break parallel builds)])])
1082218822Sdimtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1083218822Sdim
108485815Sobrien# Some flags need to be propagated to the compiler or linker for good
108585815Sobrien# libtool support.
108689857Sobriencase $host in
1087218822Sdimia64-*-hpux*)
108885815Sobrien  # Find out which ABI we are using.
1089218822Sdim  echo 'int i;' > conftest.$ac_ext
109085815Sobrien  if AC_TRY_EVAL(ac_compile); then
109189857Sobrien    case `/usr/bin/file conftest.$ac_objext` in
1092218822Sdim      *ELF-32*)
1093218822Sdim	HPUX_IA64_MODE="32"
1094218822Sdim	;;
1095218822Sdim      *ELF-64*)
1096218822Sdim	HPUX_IA64_MODE="64"
1097218822Sdim	;;
1098130561Sobrien    esac
109985815Sobrien  fi
110085815Sobrien  rm -rf conftest*
110185815Sobrien  ;;
1102218822Sdim*-*-irix6*)
1103218822Sdim  # Find out which ABI we are using.
1104218822Sdim  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1105218822Sdim  if AC_TRY_EVAL(ac_compile); then
1106218822Sdim    if test "$lt_cv_prog_gnu_ld" = yes; then
1107218822Sdim      case `/usr/bin/file conftest.$ac_objext` in
1108218822Sdim	*32-bit*)
1109218822Sdim	  LD="${LD-ld} -melf32bsmip"
1110218822Sdim	  ;;
1111218822Sdim	*N32*)
1112218822Sdim	  LD="${LD-ld} -melf32bmipn32"
1113218822Sdim	  ;;
1114218822Sdim	*64-bit*)
1115218822Sdim	  LD="${LD-ld} -melf64bmip"
1116218822Sdim	;;
1117218822Sdim      esac
1118218822Sdim    else
1119218822Sdim      case `/usr/bin/file conftest.$ac_objext` in
1120218822Sdim	*32-bit*)
1121218822Sdim	  LD="${LD-ld} -32"
1122218822Sdim	  ;;
1123218822Sdim	*N32*)
1124218822Sdim	  LD="${LD-ld} -n32"
1125218822Sdim	  ;;
1126218822Sdim	*64-bit*)
1127218822Sdim	  LD="${LD-ld} -64"
1128218822Sdim	  ;;
1129218822Sdim      esac
1130218822Sdim    fi
1131218822Sdim  fi
1132218822Sdim  rm -rf conftest*
1133218822Sdim  ;;
113485815Sobrien
1135218822Sdimx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1136218822Sdims390*-*linux*|s390*-*tpf*|sparc*-*linux*)
113791041Sobrien  # Find out which ABI we are using.
113891041Sobrien  echo 'int i;' > conftest.$ac_ext
113991041Sobrien  if AC_TRY_EVAL(ac_compile); then
1140218822Sdim    case `/usr/bin/file conftest.o` in
1141218822Sdim      *32-bit*)
1142218822Sdim	case $host in
1143218822Sdim	  x86_64-*kfreebsd*-gnu)
1144218822Sdim	    LD="${LD-ld} -m elf_i386_fbsd"
1145218822Sdim	    ;;
1146218822Sdim	  x86_64-*linux*)
1147218822Sdim	    LD="${LD-ld} -m elf_i386"
1148218822Sdim	    ;;
1149218822Sdim	  ppc64-*linux*|powerpc64-*linux*)
1150218822Sdim	    LD="${LD-ld} -m elf32ppclinux"
1151218822Sdim	    ;;
1152218822Sdim	  s390x-*linux*)
1153218822Sdim	    LD="${LD-ld} -m elf_s390"
1154218822Sdim	    ;;
1155218822Sdim	  sparc64-*linux*)
1156218822Sdim	    LD="${LD-ld} -m elf32_sparc"
1157218822Sdim	    ;;
1158218822Sdim	esac
1159218822Sdim	;;
1160218822Sdim      *64-bit*)
1161218822Sdim	case $host in
1162218822Sdim	  x86_64-*kfreebsd*-gnu)
1163218822Sdim	    LD="${LD-ld} -m elf_x86_64_fbsd"
1164218822Sdim	    ;;
1165218822Sdim	  x86_64-*linux*)
1166218822Sdim	    LD="${LD-ld} -m elf_x86_64"
1167218822Sdim	    ;;
1168218822Sdim	  ppc*-*linux*|powerpc*-*linux*)
1169218822Sdim	    LD="${LD-ld} -m elf64ppc"
1170218822Sdim	    ;;
1171218822Sdim	  s390*-*linux*|s390*-*tpf*)
1172218822Sdim	    LD="${LD-ld} -m elf64_s390"
1173218822Sdim	    ;;
1174218822Sdim	  sparc*-*linux*)
1175218822Sdim	    LD="${LD-ld} -m elf64_sparc"
1176218822Sdim	    ;;
1177218822Sdim	esac
1178218822Sdim	;;
117991041Sobrien    esac
118091041Sobrien  fi
118191041Sobrien  rm -rf conftest*
118291041Sobrien  ;;
118391041Sobrien
118485815Sobrien*-*-sco3.2v5*)
118585815Sobrien  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
118685815Sobrien  SAVE_CFLAGS="$CFLAGS"
118785815Sobrien  CFLAGS="$CFLAGS -belf"
118885815Sobrien  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1189218822Sdim    [AC_LANG_PUSH(C)
1190218822Sdim     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1191218822Sdim     AC_LANG_POP])
119285815Sobrien  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
119385815Sobrien    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
119485815Sobrien    CFLAGS="$SAVE_CFLAGS"
119585815Sobrien  fi
119685815Sobrien  ;;
1197218822Sdimsparc*-*solaris*)
1198218822Sdim  # Find out which ABI we are using.
1199218822Sdim  echo 'int i;' > conftest.$ac_ext
1200218822Sdim  if AC_TRY_EVAL(ac_compile); then
1201218822Sdim    case `/usr/bin/file conftest.o` in
1202218822Sdim    *64-bit*)
1203218822Sdim      case $lt_cv_prog_gnu_ld in
1204218822Sdim      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1205218822Sdim      *)    LD="${LD-ld} -64" ;;
1206218822Sdim      esac
1207218822Sdim      ;;
1208218822Sdim    esac
1209218822Sdim  fi
1210218822Sdim  rm -rf conftest*
1211218822Sdim  ;;
1212218822Sdimesac
121385815Sobrien
1214218822Sdimneed_locks="$enable_libtool_lock"
1215218822Sdim])# _LT_ENABLE_LOCK
121685815Sobrien
121785815Sobrien
1218218822Sdim# _LT_CMD_OLD_ARCHIVE
1219218822Sdim# -------------------
1220218822Sdimm4_defun([_LT_CMD_OLD_ARCHIVE],
1221218822Sdim[AC_CHECK_TOOL(AR, ar, false)
1222218822Sdimtest -z "$AR" && AR=ar
1223218822Sdimtest -z "$AR_FLAGS" && AR_FLAGS=cru
1224218822Sdim_LT_DECL([], [AR], [1], [The archiver])
1225218822Sdim_LT_DECL([], [AR_FLAGS], [1])
1226218822Sdim
1227218822SdimAC_CHECK_TOOL(STRIP, strip, :)
1228218822Sdimtest -z "$STRIP" && STRIP=:
1229218822Sdim_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1230218822Sdim
1231218822SdimAC_CHECK_TOOL(RANLIB, ranlib, :)
1232218822Sdimtest -z "$RANLIB" && RANLIB=:
1233218822Sdim_LT_DECL([], [RANLIB], [1],
1234218822Sdim    [Commands used to install an old-style archive])
1235218822Sdim
1236218822Sdim# Determine commands to create old-style static archives.
1237218822Sdimold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1238218822Sdimold_postinstall_cmds='chmod 644 $oldlib'
1239218822Sdimold_postuninstall_cmds=
1240218822Sdim
1241218822Sdimif test -n "$RANLIB"; then
1242218822Sdim  case $host_os in
1243218822Sdim  openbsd*)
1244218822Sdim    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1245218822Sdim    ;;
1246218822Sdim  *)
1247218822Sdim    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1248218822Sdim    ;;
124985815Sobrien  esac
1250218822Sdim  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1251218822Sdimfi
1252218822Sdim_LT_DECL([], [old_postinstall_cmds], [2])
1253218822Sdim_LT_DECL([], [old_postuninstall_cmds], [2])
1254218822Sdim_LT_TAGDECL([], [old_archive_cmds], [2],
1255218822Sdim    [Commands used to build an old-style archive])
1256218822Sdim])# _LT_CMD_OLD_ARCHIVE
1257218822Sdim
1258218822Sdim
1259218822Sdim# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1260218822Sdim#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1261218822Sdim# ----------------------------------------------------------------
1262218822Sdim# Check whether the given compiler option works
1263218822SdimAC_DEFUN([_LT_COMPILER_OPTION],
1264218822Sdim[AC_REQUIRE([AC_OBJEXT])dnl
1265218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1266218822Sdimm4_require([_LT_DECL_SED])dnl
1267218822SdimAC_CACHE_CHECK([$1], [$2],
1268218822Sdim  [$2=no
1269218822Sdim   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1270218822Sdim   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1271218822Sdim   lt_compiler_flag="$3"
1272218822Sdim   # Insert the option either (1) after the last *FLAGS variable, or
1273218822Sdim   # (2) before a word containing "conftest.", or (3) at the end.
1274218822Sdim   # Note that $ac_compile itself does not contain backslashes and begins
1275218822Sdim   # with a dollar sign (not a hyphen), so the echo should work correctly.
1276218822Sdim   # The option is referenced via a variable to avoid confusing sed.
1277218822Sdim   lt_compile=`echo "$ac_compile" | $SED \
1278218822Sdim   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1279218822Sdim   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1280218822Sdim   -e 's:$: $lt_compiler_flag:'`
1281218822Sdim   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1282218822Sdim   (eval "$lt_compile" 2>conftest.err)
1283218822Sdim   ac_status=$?
1284218822Sdim   cat conftest.err >&AS_MESSAGE_LOG_FD
1285218822Sdim   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1286218822Sdim   if (exit $ac_status) && test -s "$ac_outfile"; then
1287218822Sdim     # The compiler can only warn and ignore the option if not recognized
1288218822Sdim     # So say no if there are warnings other than the usual output.
1289218822Sdim     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1290218822Sdim     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1291218822Sdim     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1292218822Sdim       $2=yes
1293218822Sdim     fi
1294218822Sdim   fi
1295218822Sdim   $RM conftest*
129685815Sobrien])
129785815Sobrien
1298218822Sdimif test x"[$]$2" = xyes; then
1299218822Sdim    m4_if([$5], , :, [$5])
1300218822Sdimelse
1301218822Sdim    m4_if([$6], , :, [$6])
1302218822Sdimfi
1303218822Sdim])# _LT_COMPILER_OPTION
130485815Sobrien
1305218822Sdim# Old name:
1306218822SdimAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1307218822Sdimdnl aclocal-1.4 backwards compatibility:
1308218822Sdimdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
130985815Sobrien
1310218822Sdim
1311218822Sdim# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1312218822Sdim#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1313218822Sdim# ----------------------------------------------------
1314218822Sdim# Check whether the given linker option works
1315218822SdimAC_DEFUN([_LT_LINKER_OPTION],
1316218822Sdim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1317218822Sdimm4_require([_LT_DECL_SED])dnl
1318218822SdimAC_CACHE_CHECK([$1], [$2],
1319218822Sdim  [$2=no
1320218822Sdim   save_LDFLAGS="$LDFLAGS"
1321218822Sdim   LDFLAGS="$LDFLAGS $3"
1322218822Sdim   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1323218822Sdim   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1324218822Sdim     # The linker can only warn and ignore the option if not recognized
1325218822Sdim     # So say no if there are warnings
1326218822Sdim     if test -s conftest.err; then
1327218822Sdim       # Append any errors to the config.log.
1328218822Sdim       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1329218822Sdim       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1330218822Sdim       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1331218822Sdim       if diff conftest.exp conftest.er2 >/dev/null; then
1332218822Sdim         $2=yes
1333218822Sdim       fi
1334218822Sdim     else
1335218822Sdim       $2=yes
1336218822Sdim     fi
1337218822Sdim   fi
1338218822Sdim   $RM conftest*
1339218822Sdim   LDFLAGS="$save_LDFLAGS"
1340218822Sdim])
1341218822Sdim
1342218822Sdimif test x"[$]$2" = xyes; then
1343218822Sdim    m4_if([$4], , :, [$4])
1344218822Sdimelse
1345218822Sdim    m4_if([$5], , :, [$5])
1346218822Sdimfi
1347218822Sdim])# _LT_LINKER_OPTION
1348218822Sdim
1349218822Sdim# Old name:
1350218822SdimAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1351218822Sdimdnl aclocal-1.4 backwards compatibility:
1352218822Sdimdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1353218822Sdim
1354218822Sdim
1355218822Sdim# LT_CMD_MAX_LEN
1356218822Sdim#---------------
1357218822SdimAC_DEFUN([LT_CMD_MAX_LEN],
1358218822Sdim[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1359218822Sdim# find the maximum length of command line arguments
1360218822SdimAC_MSG_CHECKING([the maximum length of command line arguments])
1361218822SdimAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1362218822Sdim  i=0
1363218822Sdim  teststring="ABCD"
1364218822Sdim
1365218822Sdim  case $build_os in
1366218822Sdim  msdosdjgpp*)
1367218822Sdim    # On DJGPP, this test can blow up pretty badly due to problems in libc
1368218822Sdim    # (any single argument exceeding 2000 bytes causes a buffer overrun
1369218822Sdim    # during glob expansion).  Even if it were fixed, the result of this
1370218822Sdim    # check would be larger than it should be.
1371218822Sdim    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1372218822Sdim    ;;
1373218822Sdim
1374218822Sdim  gnu*)
1375218822Sdim    # Under GNU Hurd, this test is not required because there is
1376218822Sdim    # no limit to the length of command line arguments.
1377218822Sdim    # Libtool will interpret -1 as no limit whatsoever
1378218822Sdim    lt_cv_sys_max_cmd_len=-1;
1379218822Sdim    ;;
1380218822Sdim
1381218822Sdim  cygwin* | mingw*)
1382218822Sdim    # On Win9x/ME, this test blows up -- it succeeds, but takes
1383218822Sdim    # about 5 minutes as the teststring grows exponentially.
1384218822Sdim    # Worse, since 9x/ME are not pre-emptively multitasking,
1385218822Sdim    # you end up with a "frozen" computer, even though with patience
1386218822Sdim    # the test eventually succeeds (with a max line length of 256k).
1387218822Sdim    # Instead, let's just punt: use the minimum linelength reported by
1388218822Sdim    # all of the supported platforms: 8192 (on NT/2K/XP).
1389218822Sdim    lt_cv_sys_max_cmd_len=8192;
1390218822Sdim    ;;
1391218822Sdim
1392218822Sdim  amigaos*)
1393218822Sdim    # On AmigaOS with pdksh, this test takes hours, literally.
1394218822Sdim    # So we just punt and use a minimum line length of 8192.
1395218822Sdim    lt_cv_sys_max_cmd_len=8192;
1396218822Sdim    ;;
1397218822Sdim
1398218822Sdim  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1399218822Sdim    # This has been around since 386BSD, at least.  Likely further.
1400218822Sdim    if test -x /sbin/sysctl; then
1401218822Sdim      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1402218822Sdim    elif test -x /usr/sbin/sysctl; then
1403218822Sdim      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1404218822Sdim    else
1405218822Sdim      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
140685815Sobrien    fi
1407218822Sdim    # And add a safety zone
1408218822Sdim    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1409218822Sdim    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1410218822Sdim    ;;
1411218822Sdim
1412218822Sdim  interix*)
1413218822Sdim    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1414218822Sdim    lt_cv_sys_max_cmd_len=196608
1415218822Sdim    ;;
1416218822Sdim
1417218822Sdim  osf*)
1418218822Sdim    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1419218822Sdim    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1420218822Sdim    # nice to cause kernel panics so lets avoid the loop below.
1421218822Sdim    # First set a reasonable default.
1422218822Sdim    lt_cv_sys_max_cmd_len=16384
1423218822Sdim    #
1424218822Sdim    if test -x /sbin/sysconfig; then
1425218822Sdim      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1426218822Sdim        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1427218822Sdim      esac
1428218822Sdim    fi
1429218822Sdim    ;;
1430218822Sdim  sco3.2v5*)
1431218822Sdim    lt_cv_sys_max_cmd_len=102400
1432218822Sdim    ;;
1433218822Sdim  sysv5* | sco5v6* | sysv4.2uw2*)
1434218822Sdim    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1435218822Sdim    if test -n "$kargmax"; then
1436218822Sdim      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1437218822Sdim    else
1438218822Sdim      lt_cv_sys_max_cmd_len=32768
1439218822Sdim    fi
1440218822Sdim    ;;
1441218822Sdim  *)
1442218822Sdim    lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
1443218822Sdim    if test -n $lt_cv_sys_max_cmd_len; then
1444218822Sdim      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1445218822Sdim      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1446218822Sdim    else
1447218822Sdim      # Make teststring a little bigger before we do anything with it.
1448218822Sdim      # a 1K string should be a reasonable start.
1449218822Sdim      for i in 1 2 3 4 5 6 7 8 ; do
1450218822Sdim        teststring=$teststring$teststring
1451218822Sdim      done
1452218822Sdim      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1453218822Sdim      # If test is not a shell built-in, we'll probably end up computing a
1454218822Sdim      # maximum length that is only half of the actual maximum length, but
1455218822Sdim      # we can't tell.
1456218822Sdim      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1457218822Sdim	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1458218822Sdim	      test $i != 17 # 1/2 MB should be enough
1459218822Sdim      do
1460218822Sdim        i=`expr $i + 1`
1461218822Sdim        teststring=$teststring$teststring
1462218822Sdim      done
1463218822Sdim      # Only check the string length outside the loop.
1464218822Sdim      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1465218822Sdim      teststring=
1466218822Sdim      # Add a significant safety factor because C++ compilers can tack on
1467218822Sdim      # massive amounts of additional arguments before passing them to the
1468218822Sdim      # linker.  It appears as though 1/2 is a usable value.
1469218822Sdim      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1470218822Sdim    fi
1471218822Sdim    ;;
1472218822Sdim  esac
147385815Sobrien])
1474218822Sdimif test -n $lt_cv_sys_max_cmd_len ; then
1475218822Sdim  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1476218822Sdimelse
1477218822Sdim  AC_MSG_RESULT(none)
1478218822Sdimfi
1479218822Sdimmax_cmd_len=$lt_cv_sys_max_cmd_len
1480218822Sdim_LT_DECL([], [max_cmd_len], [0],
1481218822Sdim    [What is the maximum length of a command?])
1482218822Sdim])# LT_CMD_MAX_LEN
148385815Sobrien
1484218822Sdim# Old name:
1485218822SdimAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1486218822Sdimdnl aclocal-1.4 backwards compatibility:
1487218822Sdimdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
148885815Sobrien
1489218822Sdim
1490218822Sdim# _LT_HEADER_DLFCN
1491218822Sdim# ----------------
1492218822Sdimm4_defun([_LT_HEADER_DLFCN],
1493218822Sdim[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1494218822Sdim])# _LT_HEADER_DLFCN
1495218822Sdim
1496218822Sdim
1497218822Sdim# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1498218822Sdim#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1499218822Sdim# ----------------------------------------------------------------
1500218822Sdimm4_defun([_LT_TRY_DLOPEN_SELF],
1501218822Sdim[m4_require([_LT_HEADER_DLFCN])dnl
1502218822Sdimif test "$cross_compiling" = yes; then :
1503218822Sdim  [$4]
1504218822Sdimelse
1505218822Sdim  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1506218822Sdim  lt_status=$lt_dlunknown
1507218822Sdim  cat > conftest.$ac_ext <<_LT_EOF
1508218822Sdim[#line __oline__ "configure"
1509218822Sdim#include "confdefs.h"
1510218822Sdim
1511218822Sdim#if HAVE_DLFCN_H
1512218822Sdim#include <dlfcn.h>
1513218822Sdim#endif
1514218822Sdim
1515218822Sdim#include <stdio.h>
1516218822Sdim
1517218822Sdim#ifdef RTLD_GLOBAL
1518218822Sdim#  define LT_DLGLOBAL		RTLD_GLOBAL
1519218822Sdim#else
1520218822Sdim#  ifdef DL_GLOBAL
1521218822Sdim#    define LT_DLGLOBAL		DL_GLOBAL
1522218822Sdim#  else
1523218822Sdim#    define LT_DLGLOBAL		0
1524218822Sdim#  endif
1525218822Sdim#endif
1526218822Sdim
1527218822Sdim/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1528218822Sdim   find out it does not work in some platform. */
1529218822Sdim#ifndef LT_DLLAZY_OR_NOW
1530218822Sdim#  ifdef RTLD_LAZY
1531218822Sdim#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1532218822Sdim#  else
1533218822Sdim#    ifdef DL_LAZY
1534218822Sdim#      define LT_DLLAZY_OR_NOW		DL_LAZY
1535218822Sdim#    else
1536218822Sdim#      ifdef RTLD_NOW
1537218822Sdim#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1538218822Sdim#      else
1539218822Sdim#        ifdef DL_NOW
1540218822Sdim#          define LT_DLLAZY_OR_NOW	DL_NOW
1541218822Sdim#        else
1542218822Sdim#          define LT_DLLAZY_OR_NOW	0
1543218822Sdim#        endif
1544218822Sdim#      endif
1545218822Sdim#    endif
1546218822Sdim#  endif
1547218822Sdim#endif
1548218822Sdim
1549218822Sdim#ifdef __cplusplus
1550218822Sdimextern "C" void exit (int);
1551218822Sdim#endif
1552218822Sdim
1553218822Sdimvoid fnord() { int i=42;}
1554218822Sdimint main ()
1555218822Sdim{
1556218822Sdim  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1557218822Sdim  int status = $lt_dlunknown;
1558218822Sdim
1559218822Sdim  if (self)
1560218822Sdim    {
1561218822Sdim      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1562218822Sdim      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1563218822Sdim      /* dlclose (self); */
1564218822Sdim    }
1565218822Sdim  else
1566218822Sdim    puts (dlerror ());
1567218822Sdim
1568218822Sdim    exit (status);
1569218822Sdim}]
1570218822Sdim_LT_EOF
1571218822Sdim  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1572218822Sdim    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1573218822Sdim    lt_status=$?
1574218822Sdim    case x$lt_status in
1575218822Sdim      x$lt_dlno_uscore) $1 ;;
1576218822Sdim      x$lt_dlneed_uscore) $2 ;;
1577218822Sdim      x$lt_dlunknown|x*) $3 ;;
1578218822Sdim    esac
1579218822Sdim  else :
1580218822Sdim    # compilation failed
1581218822Sdim    $3
1582218822Sdim  fi
1583218822Sdimfi
1584218822Sdimrm -fr conftest*
1585218822Sdim])# _LT_TRY_DLOPEN_SELF
1586218822Sdim
1587218822Sdim
1588218822Sdim# LT_SYS_DLOPEN_SELF
1589218822Sdim# ------------------
1590218822SdimAC_DEFUN([LT_SYS_DLOPEN_SELF],
1591218822Sdim[m4_require([_LT_HEADER_DLFCN])dnl
1592218822Sdimif test "x$enable_dlopen" != xyes; then
1593218822Sdim  enable_dlopen=unknown
1594218822Sdim  enable_dlopen_self=unknown
1595218822Sdim  enable_dlopen_self_static=unknown
1596218822Sdimelse
1597218822Sdim  lt_cv_dlopen=no
1598218822Sdim  lt_cv_dlopen_libs=
1599218822Sdim
1600218822Sdim  case $host_os in
1601218822Sdim  beos*)
1602218822Sdim    lt_cv_dlopen="load_add_on"
1603218822Sdim    lt_cv_dlopen_libs=
1604218822Sdim    lt_cv_dlopen_self=yes
1605218822Sdim    ;;
1606218822Sdim
1607218822Sdim  mingw* | pw32*)
1608218822Sdim    lt_cv_dlopen="LoadLibrary"
1609218822Sdim    lt_cv_dlopen_libs=
1610218822Sdim    ;;
1611218822Sdim
1612218822Sdim  cygwin*)
1613218822Sdim    lt_cv_dlopen="dlopen"
1614218822Sdim    lt_cv_dlopen_libs=
1615218822Sdim    ;;
1616218822Sdim
1617218822Sdim  darwin*)
1618218822Sdim  # if libdl is installed we need to link against it
1619218822Sdim    AC_CHECK_LIB([dl], [dlopen],
1620218822Sdim		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1621218822Sdim    lt_cv_dlopen="dyld"
1622218822Sdim    lt_cv_dlopen_libs=
1623218822Sdim    lt_cv_dlopen_self=yes
1624218822Sdim    ])
1625218822Sdim    ;;
1626218822Sdim
1627218822Sdim  *)
1628218822Sdim    AC_CHECK_FUNC([shl_load],
1629218822Sdim	  [lt_cv_dlopen="shl_load"],
1630218822Sdim      [AC_CHECK_LIB([dld], [shl_load],
1631218822Sdim	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1632218822Sdim	[AC_CHECK_FUNC([dlopen],
1633218822Sdim	      [lt_cv_dlopen="dlopen"],
1634218822Sdim	  [AC_CHECK_LIB([dl], [dlopen],
1635218822Sdim		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1636218822Sdim	    [AC_CHECK_LIB([svld], [dlopen],
1637218822Sdim		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1638218822Sdim	      [AC_CHECK_LIB([dld], [dld_link],
1639218822Sdim		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1640218822Sdim	      ])
1641218822Sdim	    ])
1642218822Sdim	  ])
1643218822Sdim	])
1644218822Sdim      ])
1645218822Sdim    ;;
1646218822Sdim  esac
1647218822Sdim
1648218822Sdim  if test "x$lt_cv_dlopen" != xno; then
1649218822Sdim    enable_dlopen=yes
1650218822Sdim  else
1651218822Sdim    enable_dlopen=no
1652218822Sdim  fi
1653218822Sdim
1654218822Sdim  case $lt_cv_dlopen in
1655218822Sdim  dlopen)
1656218822Sdim    save_CPPFLAGS="$CPPFLAGS"
1657218822Sdim    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1658218822Sdim
1659218822Sdim    save_LDFLAGS="$LDFLAGS"
1660218822Sdim    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1661218822Sdim
1662218822Sdim    save_LIBS="$LIBS"
1663218822Sdim    LIBS="$lt_cv_dlopen_libs $LIBS"
1664218822Sdim
1665218822Sdim    AC_CACHE_CHECK([whether a program can dlopen itself],
1666218822Sdim	  lt_cv_dlopen_self, [dnl
1667218822Sdim	  _LT_TRY_DLOPEN_SELF(
1668218822Sdim	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1669218822Sdim	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1670218822Sdim    ])
1671218822Sdim
1672218822Sdim    if test "x$lt_cv_dlopen_self" = xyes; then
1673218822Sdim      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1674218822Sdim      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1675218822Sdim	  lt_cv_dlopen_self_static, [dnl
1676218822Sdim	  _LT_TRY_DLOPEN_SELF(
1677218822Sdim	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1678218822Sdim	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1679218822Sdim      ])
168085815Sobrien    fi
1681218822Sdim
1682218822Sdim    CPPFLAGS="$save_CPPFLAGS"
1683218822Sdim    LDFLAGS="$save_LDFLAGS"
1684218822Sdim    LIBS="$save_LIBS"
1685218822Sdim    ;;
1686218822Sdim  esac
1687218822Sdim
1688218822Sdim  case $lt_cv_dlopen_self in
1689218822Sdim  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1690218822Sdim  *) enable_dlopen_self=unknown ;;
1691218822Sdim  esac
1692218822Sdim
1693218822Sdim  case $lt_cv_dlopen_self_static in
1694218822Sdim  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1695218822Sdim  *) enable_dlopen_self_static=unknown ;;
1696218822Sdim  esac
1697218822Sdimfi
1698218822Sdim_LT_DECL([dlopen_support], [enable_dlopen], [0],
1699218822Sdim	 [Whether dlopen is supported])
1700218822Sdim_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1701218822Sdim	 [Whether dlopen of programs is supported])
1702218822Sdim_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1703218822Sdim	 [Whether dlopen of statically linked programs is supported])
1704218822Sdim])# LT_SYS_DLOPEN_SELF
1705218822Sdim
1706218822Sdim# Old name:
1707218822SdimAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1708218822Sdimdnl aclocal-1.4 backwards compatibility:
1709218822Sdimdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1710218822Sdim
1711218822Sdim
1712218822Sdim# _LT_COMPILER_C_O([TAGNAME])
1713218822Sdim# ---------------------------
1714218822Sdim# Check to see if options -c and -o are simultaneously supported by compiler.
1715218822Sdim# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1716218822Sdimm4_defun([_LT_COMPILER_C_O],
1717218822Sdim[AC_REQUIRE([AC_OBJEXT])dnl
1718218822Sdimm4_require([_LT_DECL_SED])dnl
1719218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1720218822Sdimm4_require([_LT_TAG_COMPILER])dnl
1721218822SdimAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1722218822Sdim  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1723218822Sdim  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1724218822Sdim   $RM -r conftest 2>/dev/null
1725218822Sdim   mkdir conftest
1726218822Sdim   cd conftest
1727218822Sdim   mkdir out
1728218822Sdim   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1729218822Sdim
1730218822Sdim   lt_compiler_flag="-o out/conftest2.$ac_objext"
1731218822Sdim   # Insert the option either (1) after the last *FLAGS variable, or
1732218822Sdim   # (2) before a word containing "conftest.", or (3) at the end.
1733218822Sdim   # Note that $ac_compile itself does not contain backslashes and begins
1734218822Sdim   # with a dollar sign (not a hyphen), so the echo should work correctly.
1735218822Sdim   lt_compile=`echo "$ac_compile" | $SED \
1736218822Sdim   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1737218822Sdim   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1738218822Sdim   -e 's:$: $lt_compiler_flag:'`
1739218822Sdim   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1740218822Sdim   (eval "$lt_compile" 2>out/conftest.err)
1741218822Sdim   ac_status=$?
1742218822Sdim   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1743218822Sdim   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1744218822Sdim   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1745218822Sdim   then
1746218822Sdim     # The compiler can only warn and ignore the option if not recognized
1747218822Sdim     # So say no if there are warnings
1748218822Sdim     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1749218822Sdim     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1750218822Sdim     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1751218822Sdim       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1752218822Sdim     fi
1753218822Sdim   fi
1754218822Sdim   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1755218822Sdim   $RM conftest*
1756218822Sdim   # SGI C++ compiler will create directory out/ii_files/ for
1757218822Sdim   # template instantiation
1758218822Sdim   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1759218822Sdim   $RM out/* && rmdir out
1760218822Sdim   cd ..
1761218822Sdim   $RM -r conftest
1762218822Sdim   $RM conftest*
176385815Sobrien])
1764218822Sdim_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1765218822Sdim	[Does compiler simultaneously support -c and -o options?])
1766218822Sdim])# _LT_COMPILER_C_O
176785815Sobrien
176885815Sobrien
1769218822Sdim# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1770218822Sdim# ----------------------------------
1771218822Sdim# Check to see if we can do hard links to lock some files if needed
1772218822Sdimm4_defun([_LT_COMPILER_FILE_LOCKS],
1773218822Sdim[m4_require([_LT_ENABLE_LOCK])dnl
1774218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1775218822Sdim_LT_COMPILER_C_O([$1])
177685815Sobrien
1777218822Sdimhard_links="nottested"
1778218822Sdimif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1779218822Sdim  # do not overwrite the value of need_locks provided by the user
1780218822Sdim  AC_MSG_CHECKING([if we can lock with hard links])
1781218822Sdim  hard_links=yes
1782218822Sdim  $RM conftest*
1783218822Sdim  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1784218822Sdim  touch conftest.a
1785218822Sdim  ln conftest.a conftest.b 2>&5 || hard_links=no
1786218822Sdim  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1787218822Sdim  AC_MSG_RESULT([$hard_links])
1788218822Sdim  if test "$hard_links" = no; then
1789218822Sdim    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1790218822Sdim    need_locks=warn
1791218822Sdim  fi
1792218822Sdimelse
1793218822Sdim  need_locks=no
1794218822Sdimfi
1795218822Sdim_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1796218822Sdim])# _LT_COMPILER_FILE_LOCKS
1797218822Sdim
1798218822Sdim
1799218822Sdim# _LT_CHECK_OBJDIR
1800218822Sdim# ----------------
1801218822Sdimm4_defun([_LT_CHECK_OBJDIR],
1802218822Sdim[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1803218822Sdim[rm -f .libs 2>/dev/null
1804218822Sdimmkdir .libs 2>/dev/null
1805218822Sdimif test -d .libs; then
1806218822Sdim  lt_cv_objdir=.libs
1807218822Sdimelse
1808218822Sdim  # MS-DOS does not allow filenames that begin with a dot.
1809218822Sdim  lt_cv_objdir=_libs
1810218822Sdimfi
1811218822Sdimrmdir .libs 2>/dev/null])
1812218822Sdimobjdir=$lt_cv_objdir
1813218822Sdim_LT_DECL([], [objdir], [0],
1814218822Sdim         [The name of the directory that contains temporary libtool files])dnl
1815218822Sdimm4_pattern_allow([LT_OBJDIR])dnl
1816218822SdimAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1817218822Sdim  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1818218822Sdim])# _LT_CHECK_OBJDIR
1819218822Sdim
1820218822Sdim
1821218822Sdim# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1822218822Sdim# --------------------------------------
1823218822Sdim# Check hardcoding attributes.
1824218822Sdimm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1825218822Sdim[AC_MSG_CHECKING([how to hardcode library paths into programs])
1826218822Sdim_LT_TAGVAR(hardcode_action, $1)=
1827218822Sdimif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1828218822Sdim   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1829218822Sdim   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1830218822Sdim
1831218822Sdim  # We can hardcode non-existent directories.
1832218822Sdim  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1833218822Sdim     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1834218822Sdim     # have to relink, otherwise we might link with an installed library
1835218822Sdim     # when we should be linking with a yet-to-be-installed one
1836218822Sdim     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1837218822Sdim     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1838218822Sdim    # Linking always hardcodes the temporary library directory.
1839218822Sdim    _LT_TAGVAR(hardcode_action, $1)=relink
1840218822Sdim  else
1841218822Sdim    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1842218822Sdim    _LT_TAGVAR(hardcode_action, $1)=immediate
1843218822Sdim  fi
1844218822Sdimelse
1845218822Sdim  # We cannot hardcode anything, or else we can only hardcode existing
1846218822Sdim  # directories.
1847218822Sdim  _LT_TAGVAR(hardcode_action, $1)=unsupported
1848218822Sdimfi
1849218822SdimAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1850218822Sdim
1851218822Sdimif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1852218822Sdim   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1853218822Sdim  # Fast installation is not supported
185485815Sobrien  enable_fast_install=no
1855218822Sdimelif test "$shlibpath_overrides_runpath" = yes ||
1856218822Sdim     test "$enable_shared" = no; then
1857218822Sdim  # Fast installation is not necessary
1858218822Sdim  enable_fast_install=needless
1859218822Sdimfi
1860218822Sdim_LT_TAGDECL([], [hardcode_action], [0],
1861218822Sdim    [How to hardcode a shared library path into an executable])
1862218822Sdim])# _LT_LINKER_HARDCODE_LIBPATH
1863218822Sdim
1864218822Sdim
1865218822Sdim# _LT_CMD_STRIPLIB
1866218822Sdim# ----------------
1867218822Sdimm4_defun([_LT_CMD_STRIPLIB],
1868218822Sdim[m4_require([_LT_DECL_EGREP])
1869218822Sdimstriplib=
1870218822Sdimold_striplib=
1871218822SdimAC_MSG_CHECKING([whether stripping libraries is possible])
1872218822Sdimif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1873218822Sdim  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1874218822Sdim  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1875218822Sdim  AC_MSG_RESULT([yes])
1876218822Sdimelse
1877218822Sdim# FIXME - insert some real tests, host_os isn't really good enough
1878218822Sdim  case $host_os in
1879218822Sdim  darwin*)
1880218822Sdim    if test -n "$STRIP" ; then
1881218822Sdim      striplib="$STRIP -x"
1882218822Sdim      old_striplib="$STRIP -S"
1883218822Sdim      AC_MSG_RESULT([yes])
1884218822Sdim    else
1885218822Sdim      AC_MSG_RESULT([no])
188685815Sobrien    fi
1887218822Sdim    ;;
1888218822Sdim  *)
1889218822Sdim    AC_MSG_RESULT([no])
1890218822Sdim    ;;
1891218822Sdim  esac
1892218822Sdimfi
1893218822Sdim_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1894218822Sdim_LT_DECL([], [striplib], [1])
1895218822Sdim])# _LT_CMD_STRIPLIB
1896218822Sdim
1897218822Sdim
1898218822Sdim# _LT_SYS_DYNAMIC_LINKER([TAG])
1899218822Sdim# -----------------------------
1900218822Sdim# PORTME Fill in your ld.so characteristics
1901218822Sdimm4_defun([_LT_SYS_DYNAMIC_LINKER],
1902218822Sdim[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1903218822Sdimm4_require([_LT_DECL_EGREP])dnl
1904218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1905218822Sdimm4_require([_LT_DECL_SED])dnl
1906218822SdimAC_MSG_CHECKING([dynamic linker characteristics])
1907218822Sdimm4_case([$1],
1908218822Sdim	[C], [withGCC=$GCC],
1909218822Sdim	[CXX], [withGCC=$GXX],
1910218822Sdim	[F77], [withGCC=$G77],
1911218822Sdim	[FC], [withGCC=$ac_cv_fc_compiler_gnu],
1912218822Sdim	[GCJ], [withGCC=$GCC],
1913218822Sdim	[], [withGCC=$GCC
1914218822Sdimif test "$withGCC" = yes; then
1915218822Sdim  case $host_os in
1916218822Sdim    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1917218822Sdim    *) lt_awk_arg="/^libraries:/" ;;
1918218822Sdim  esac
1919218822Sdim  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1920218822Sdim  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
1921218822Sdim    # if the path contains ";" then we assume it to be the separator
1922218822Sdim    # otherwise default to the standard path separator (i.e. ":") - it is
1923218822Sdim    # assumed that no part of a normal pathname contains ";" but that should
1924218822Sdim    # okay in the real world where ";" in dirpaths is itself problematic.
1925218822Sdim    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1926218822Sdim  else
1927218822Sdim    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1928218822Sdim  fi
1929218822Sdim  # Ok, now we have the path, separated by spaces, we can step through it
1930218822Sdim  # and add multilib dir if necessary.
1931218822Sdim  lt_tmp_lt_search_path_spec=
1932218822Sdim  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1933218822Sdim  for lt_sys_path in $lt_search_path_spec; do
1934218822Sdim    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1935218822Sdim      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1936218822Sdim    else
1937218822Sdim      test -d "$lt_sys_path" && \
1938218822Sdim	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1939218822Sdim    fi
194085815Sobrien  done
1941218822Sdim  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
1942218822SdimBEGIN {RS=" "; FS="/|\n";} {
1943218822Sdim  lt_foo="";
1944218822Sdim  lt_count=0;
1945218822Sdim  for (lt_i = NF; lt_i > 0; lt_i--) {
1946218822Sdim    if ($lt_i != "" && $lt_i != ".") {
1947218822Sdim      if ($lt_i == "..") {
1948218822Sdim        lt_count++;
1949218822Sdim      } else {
1950218822Sdim        if (lt_count == 0) {
1951218822Sdim          lt_foo="/" $lt_i lt_foo;
1952218822Sdim        } else {
1953218822Sdim          lt_count--;
1954218822Sdim        }
1955218822Sdim      }
1956218822Sdim    }
1957218822Sdim  }
1958218822Sdim  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1959218822Sdim  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1960218822Sdim}'`
1961218822Sdim  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
1962218822Sdimelse
1963218822Sdim  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1964218822Sdimfi],
1965218822Sdim[withGCC=$GCC])
1966218822Sdimlibrary_names_spec=
1967218822Sdimlibname_spec='lib$name'
1968218822Sdimsoname_spec=
1969218822Sdimshrext_cmds=".so"
1970218822Sdimpostinstall_cmds=
1971218822Sdimpostuninstall_cmds=
1972218822Sdimfinish_cmds=
1973218822Sdimfinish_eval=
1974218822Sdimshlibpath_var=
1975218822Sdimshlibpath_overrides_runpath=unknown
1976218822Sdimversion_type=none
1977218822Sdimdynamic_linker="$host_os ld.so"
1978218822Sdimsys_lib_dlsearch_path_spec="/lib /usr/lib"
1979218822Sdimneed_lib_prefix=unknown
1980218822Sdimhardcode_into_libs=no
1981218822Sdim
1982218822Sdim# when you set need_version to no, make sure it does not cause -set_version
1983218822Sdim# flags to be left without arguments
1984218822Sdimneed_version=unknown
1985218822Sdim
1986218822Sdimcase $host_os in
1987218822Sdimaix3*)
1988218822Sdim  version_type=linux
1989218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1990218822Sdim  shlibpath_var=LIBPATH
1991218822Sdim
1992218822Sdim  # AIX 3 has no versioning support, so we append a major version to the name.
1993218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
199485815Sobrien  ;;
199585815Sobrien
1996218822Sdimaix4* | aix5*)
1997218822Sdim  version_type=linux
1998218822Sdim  need_lib_prefix=no
1999218822Sdim  need_version=no
2000218822Sdim  hardcode_into_libs=yes
2001218822Sdim  if test "$host_cpu" = ia64; then
2002218822Sdim    # AIX 5 supports IA64
2003218822Sdim    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2004218822Sdim    shlibpath_var=LD_LIBRARY_PATH
2005218822Sdim  else
2006218822Sdim    # With GCC up to 2.95.x, collect2 would create an import file
2007218822Sdim    # for dependence libraries.  The import file would start with
2008218822Sdim    # the line `#! .'.  This would cause the generated library to
2009218822Sdim    # depend on `.', always an invalid library.  This was fixed in
2010218822Sdim    # development snapshots of GCC prior to 3.0.
2011218822Sdim    case $host_os in
2012218822Sdim      aix4 | aix4.[[01]] | aix4.[[01]].*)
2013218822Sdim      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2014218822Sdim	   echo ' yes '
2015218822Sdim	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2016218822Sdim	:
2017218822Sdim      else
2018218822Sdim	can_build_shared=no
2019218822Sdim      fi
2020218822Sdim      ;;
2021218822Sdim    esac
2022218822Sdim    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2023218822Sdim    # soname into executable. Probably we can add versioning support to
2024218822Sdim    # collect2, so additional links can be useful in future.
2025218822Sdim    if test "$aix_use_runtimelinking" = yes; then
2026218822Sdim      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2027218822Sdim      # instead of lib<name>.a to let people know that these are not
2028218822Sdim      # typical AIX shared libraries.
2029218822Sdim      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2030218822Sdim    else
2031218822Sdim      # We preserve .a as extension for shared libraries through AIX4.2
2032218822Sdim      # and later when we are not doing run time linking.
2033218822Sdim      library_names_spec='${libname}${release}.a $libname.a'
2034218822Sdim      soname_spec='${libname}${release}${shared_ext}$major'
2035218822Sdim    fi
2036218822Sdim    shlibpath_var=LIBPATH
2037218822Sdim  fi
2038218822Sdim  ;;
203985815Sobrien
2040218822Sdimamigaos*)
2041218822Sdim  if test "$host_cpu" = m68k; then
2042218822Sdim    library_names_spec='$libname.ixlibrary $libname.a'
2043218822Sdim    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2044218822Sdim    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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'
2045218822Sdim  else
2046218822Sdim    dynamic_linker=no
2047218822Sdim  fi
2048218822Sdim  ;;
204985815Sobrien
2050218822Sdimbeos*)
2051218822Sdim  library_names_spec='${libname}${shared_ext}'
2052218822Sdim  dynamic_linker="$host_os ld.so"
2053218822Sdim  shlibpath_var=LIBRARY_PATH
2054218822Sdim  ;;
205585815Sobrien
2056218822Sdimbsdi[[45]]*)
2057218822Sdim  version_type=linux
2058218822Sdim  need_version=no
2059218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2060218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2061218822Sdim  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2062218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2063218822Sdim  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2064218822Sdim  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2065218822Sdim  # the default ld.so.conf also contains /usr/contrib/lib and
2066218822Sdim  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2067218822Sdim  # libtool to hard-code these into programs
2068218822Sdim  ;;
2069218822Sdim
2070218822Sdimcygwin* | mingw* | pw32*)
2071218822Sdim  version_type=windows
2072218822Sdim  shrext_cmds=".dll"
2073218822Sdim  need_version=no
2074218822Sdim  need_lib_prefix=no
2075218822Sdim
2076218822Sdim  case $withGCC,$host_os in
2077218822Sdim  yes,cygwin* | yes,mingw* | yes,pw32*)
2078218822Sdim    library_names_spec='$libname.dll.a'
2079218822Sdim    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2080218822Sdim    postinstall_cmds='base_file=`basename \${file}`~
2081218822Sdim      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2082218822Sdim      dldir=$destdir/`dirname \$dlpath`~
2083218822Sdim      test -d \$dldir || mkdir -p \$dldir~
2084218822Sdim      $install_prog $dir/$dlname \$dldir/$dlname~
2085218822Sdim      chmod a+x \$dldir/$dlname~
2086218822Sdim      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2087218822Sdim        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2088218822Sdim      fi'
2089218822Sdim    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2090218822Sdim      dlpath=$dir/\$dldll~
2091218822Sdim       $RM \$dlpath'
2092218822Sdim    shlibpath_overrides_runpath=yes
2093218822Sdim
2094218822Sdim    case $host_os in
2095218822Sdim    cygwin*)
2096218822Sdim      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2097218822Sdim      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2098218822Sdim      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2099218822Sdim      ;;
2100218822Sdim    mingw*)
2101218822Sdim      # MinGW DLLs use traditional 'lib' prefix
2102218822Sdim      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2103218822Sdim      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2104218822Sdim      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2105218822Sdim        # It is most probably a Windows format PATH printed by
2106218822Sdim        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2107218822Sdim        # path with ; separators, and with drive letters. We can handle the
2108218822Sdim        # drive letters (cygwin fileutils understands them), so leave them,
2109218822Sdim        # especially as we might pass files found there to a mingw objdump,
2110218822Sdim        # which wouldn't understand a cygwinified path. Ahh.
2111218822Sdim        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2112218822Sdim      else
2113218822Sdim        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2114218822Sdim      fi
2115218822Sdim      ;;
2116218822Sdim    pw32*)
2117218822Sdim      # pw32 DLLs use 'pw' prefix rather than 'lib'
2118218822Sdim      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2119218822Sdim      ;;
2120218822Sdim    esac
2121218822Sdim    ;;
2122218822Sdim
2123218822Sdim  *)
2124218822Sdim    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2125218822Sdim    ;;
2126218822Sdim  esac
2127218822Sdim  dynamic_linker='Win32 ld.exe'
2128218822Sdim  # FIXME: first we should search . and the directory the executable is in
2129218822Sdim  shlibpath_var=PATH
2130218822Sdim  ;;
2131218822Sdim
2132218822Sdimdarwin* | rhapsody*)
2133218822Sdim  dynamic_linker="$host_os dyld"
2134218822Sdim  version_type=darwin
2135218822Sdim  need_lib_prefix=no
2136218822Sdim  need_version=no
2137218822Sdim  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2138218822Sdim  soname_spec='${libname}${release}${major}$shared_ext'
2139218822Sdim  shlibpath_overrides_runpath=yes
2140218822Sdim  shlibpath_var=DYLD_LIBRARY_PATH
2141218822Sdim  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2142218822Sdimm4_if([$1], [],[
2143218822Sdim  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
2144218822Sdim  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2145218822Sdim  ;;
2146218822Sdim
2147218822Sdimdgux*)
2148218822Sdim  version_type=linux
2149218822Sdim  need_lib_prefix=no
2150218822Sdim  need_version=no
2151218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2152218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2153218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2154218822Sdim  ;;
2155218822Sdim
2156218822Sdimfreebsd1*)
2157218822Sdim  dynamic_linker=no
2158218822Sdim  ;;
2159218822Sdim
2160218822Sdimfreebsd* | dragonfly*)
2161218822Sdim  # DragonFly does not have aout.  When/if they implement a new
2162218822Sdim  # versioning mechanism, adjust this.
2163218822Sdim  if test -x /usr/bin/objformat; then
2164218822Sdim    objformat=`/usr/bin/objformat`
2165218822Sdim  else
2166218822Sdim    case $host_os in
2167218822Sdim    freebsd[[123]]*) objformat=aout ;;
2168218822Sdim    *) objformat=elf ;;
2169218822Sdim    esac
2170218822Sdim  fi
2171218822Sdim  version_type=freebsd-$objformat
2172218822Sdim  case $version_type in
2173218822Sdim    freebsd-elf*)
2174218822Sdim      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2175218822Sdim      need_version=no
2176218822Sdim      need_lib_prefix=no
2177218822Sdim      ;;
2178218822Sdim    freebsd-*)
2179218822Sdim      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2180218822Sdim      need_version=yes
2181218822Sdim      ;;
2182218822Sdim  esac
2183218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2184218822Sdim  case $host_os in
2185218822Sdim  freebsd2*)
2186218822Sdim    shlibpath_overrides_runpath=yes
2187218822Sdim    ;;
2188218822Sdim  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2189218822Sdim    shlibpath_overrides_runpath=yes
2190218822Sdim    hardcode_into_libs=yes
2191218822Sdim    ;;
2192218822Sdim  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2193218822Sdim  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2194218822Sdim    shlibpath_overrides_runpath=no
2195218822Sdim    hardcode_into_libs=yes
2196218822Sdim    ;;
2197218822Sdim  *) # from 4.6 on, and DragonFly
2198218822Sdim    shlibpath_overrides_runpath=yes
2199218822Sdim    hardcode_into_libs=yes
2200218822Sdim    ;;
2201218822Sdim  esac
2202218822Sdim  ;;
2203218822Sdim
2204218822Sdimgnu*)
2205218822Sdim  version_type=linux
2206218822Sdim  need_lib_prefix=no
2207218822Sdim  need_version=no
2208218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2209218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2210218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2211218822Sdim  hardcode_into_libs=yes
2212218822Sdim  ;;
2213218822Sdim
2214218822Sdimhpux9* | hpux10* | hpux11*)
2215218822Sdim  # Give a soname corresponding to the major version so that dld.sl refuses to
2216218822Sdim  # link against other versions.
2217218822Sdim  version_type=sunos
2218218822Sdim  need_lib_prefix=no
2219218822Sdim  need_version=no
2220218822Sdim  case $host_cpu in
2221218822Sdim  ia64*)
2222218822Sdim    shrext_cmds='.so'
2223218822Sdim    hardcode_into_libs=yes
2224218822Sdim    dynamic_linker="$host_os dld.so"
2225218822Sdim    shlibpath_var=LD_LIBRARY_PATH
2226218822Sdim    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2227218822Sdim    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2228218822Sdim    soname_spec='${libname}${release}${shared_ext}$major'
2229218822Sdim    if test "X$HPUX_IA64_MODE" = X32; then
2230218822Sdim      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2231218822Sdim    else
2232218822Sdim      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2233218822Sdim    fi
2234218822Sdim    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2235218822Sdim    ;;
2236218822Sdim  hppa*64*)
2237218822Sdim    shrext_cmds='.sl'
2238218822Sdim    hardcode_into_libs=yes
2239218822Sdim    dynamic_linker="$host_os dld.sl"
2240218822Sdim    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2241218822Sdim    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2242218822Sdim    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2243218822Sdim    soname_spec='${libname}${release}${shared_ext}$major'
2244218822Sdim    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2245218822Sdim    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2246218822Sdim    ;;
2247218822Sdim  *)
2248218822Sdim    shrext_cmds='.sl'
2249218822Sdim    dynamic_linker="$host_os dld.sl"
2250218822Sdim    shlibpath_var=SHLIB_PATH
2251218822Sdim    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2252218822Sdim    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2253218822Sdim    soname_spec='${libname}${release}${shared_ext}$major'
2254218822Sdim    ;;
2255218822Sdim  esac
2256218822Sdim  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2257218822Sdim  postinstall_cmds='chmod 555 $lib'
2258218822Sdim  ;;
2259218822Sdim
2260218822Sdiminterix[[3-9]]*)
2261218822Sdim  version_type=linux
2262218822Sdim  need_lib_prefix=no
2263218822Sdim  need_version=no
2264218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2265218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2266218822Sdim  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2267218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2268218822Sdim  shlibpath_overrides_runpath=no
2269218822Sdim  hardcode_into_libs=yes
2270218822Sdim  ;;
2271218822Sdim
2272218822Sdimirix5* | irix6* | nonstopux*)
2273218822Sdim  case $host_os in
2274218822Sdim    nonstopux*) version_type=nonstopux ;;
2275218822Sdim    *)
2276218822Sdim	if test "$lt_cv_prog_gnu_ld" = yes; then
2277218822Sdim		version_type=linux
2278218822Sdim	else
2279218822Sdim		version_type=irix
2280218822Sdim	fi ;;
2281218822Sdim  esac
2282218822Sdim  need_lib_prefix=no
2283218822Sdim  need_version=no
2284218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2285218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2286218822Sdim  case $host_os in
2287218822Sdim  irix5* | nonstopux*)
2288218822Sdim    libsuff= shlibsuff=
2289218822Sdim    ;;
2290218822Sdim  *)
2291218822Sdim    case $LD in # libtool.m4 will add one of these switches to LD
2292218822Sdim    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2293218822Sdim      libsuff= shlibsuff= libmagic=32-bit;;
2294218822Sdim    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2295218822Sdim      libsuff=32 shlibsuff=N32 libmagic=N32;;
2296218822Sdim    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2297218822Sdim      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2298218822Sdim    *) libsuff= shlibsuff= libmagic=never-match;;
2299218822Sdim    esac
2300218822Sdim    ;;
2301218822Sdim  esac
2302218822Sdim  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2303218822Sdim  shlibpath_overrides_runpath=no
2304218822Sdim  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2305218822Sdim  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2306218822Sdim  hardcode_into_libs=yes
2307218822Sdim  ;;
2308218822Sdim
2309218822Sdim# No shared lib support for Linux oldld, aout, or coff.
2310218822Sdimlinux*oldld* | linux*aout* | linux*coff*)
2311218822Sdim  dynamic_linker=no
2312218822Sdim  ;;
2313218822Sdim
2314218822Sdim# This must be Linux ELF.
2315218822Sdimlinux* | k*bsd*-gnu)
2316218822Sdim  version_type=linux
2317218822Sdim  need_lib_prefix=no
2318218822Sdim  need_version=no
2319218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2320218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2321218822Sdim  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2322218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2323218822Sdim  shlibpath_overrides_runpath=no
2324218822Sdim  # Some binutils ld are patched to set DT_RUNPATH 
2325218822Sdim  save_LDFLAGS=$LDFLAGS
2326218822Sdim  save_libdir=$libdir
2327218822Sdim  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2328218822Sdim       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2329218822Sdim  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2330218822Sdim    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"],
2331218822Sdim       [shlibpath_overrides_runpath=yes])])
2332218822Sdim  LDFLAGS=$save_LDFLAGS
2333218822Sdim  libdir=$save_libdir
2334218822Sdim
2335218822Sdim  # This implies no fast_install, which is unacceptable.
2336218822Sdim  # Some rework will be needed to allow for fast_install
2337218822Sdim  # before this can be enabled.
2338218822Sdim  hardcode_into_libs=yes
2339218822Sdim
2340218822Sdim  # Append ld.so.conf contents to the search path
2341218822Sdim  if test -f /etc/ld.so.conf; then
2342218822Sdim    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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2343218822Sdim    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2344218822Sdim  fi
2345218822Sdim
2346218822Sdim  # We used to test for /lib/ld.so.1 and disable shared libraries on
2347218822Sdim  # powerpc, because MkLinux only supported shared libraries with the
2348218822Sdim  # GNU dynamic linker.  Since this was broken with cross compilers,
2349218822Sdim  # most powerpc-linux boxes support dynamic linking these days and
2350218822Sdim  # people can always --disable-shared, the test was removed, and we
2351218822Sdim  # assume the GNU/Linux dynamic linker is in use.
2352218822Sdim  dynamic_linker='GNU/Linux ld.so'
2353218822Sdim  ;;
2354218822Sdim
2355218822Sdimnetbsd*)
2356218822Sdim  version_type=sunos
2357218822Sdim  need_lib_prefix=no
2358218822Sdim  need_version=no
2359218822Sdim  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2360218822Sdim    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2361218822Sdim    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2362218822Sdim    dynamic_linker='NetBSD (a.out) ld.so'
2363218822Sdim  else
2364218822Sdim    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2365218822Sdim    soname_spec='${libname}${release}${shared_ext}$major'
2366218822Sdim    dynamic_linker='NetBSD ld.elf_so'
2367218822Sdim  fi
2368218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2369218822Sdim  shlibpath_overrides_runpath=yes
2370218822Sdim  hardcode_into_libs=yes
2371218822Sdim  ;;
2372218822Sdim
2373218822Sdimnewsos6)
2374218822Sdim  version_type=linux
2375218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2377218822Sdim  shlibpath_overrides_runpath=yes
2378218822Sdim  ;;
2379218822Sdim
2380218822Sdim*nto* | *qnx*)
2381218822Sdim  version_type=qnx
2382218822Sdim  need_lib_prefix=no
2383218822Sdim  need_version=no
2384218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2385218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2386218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2387218822Sdim  shlibpath_overrides_runpath=no
2388218822Sdim  hardcode_into_libs=yes
2389218822Sdim  dynamic_linker='ldqnx.so'
2390218822Sdim  ;;
2391218822Sdim
2392218822Sdimopenbsd*)
2393218822Sdim  version_type=sunos
2394218822Sdim  sys_lib_dlsearch_path_spec="/usr/lib"
2395218822Sdim  need_lib_prefix=no
2396218822Sdim  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2397218822Sdim  case $host_os in
2398218822Sdim    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2399218822Sdim    *)				need_version=no  ;;
2400218822Sdim  esac
2401218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2402218822Sdim  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2403218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2404218822Sdim  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2405218822Sdim    case $host_os in
2406218822Sdim      openbsd2.[[89]] | openbsd2.[[89]].*)
2407218822Sdim	shlibpath_overrides_runpath=no
2408218822Sdim	;;
2409218822Sdim      *)
2410218822Sdim	shlibpath_overrides_runpath=yes
2411218822Sdim	;;
2412218822Sdim      esac
2413218822Sdim  else
2414218822Sdim    shlibpath_overrides_runpath=yes
2415218822Sdim  fi
2416218822Sdim  ;;
2417218822Sdim
2418218822Sdimos2*)
2419218822Sdim  libname_spec='$name'
2420218822Sdim  shrext_cmds=".dll"
2421218822Sdim  need_lib_prefix=no
2422218822Sdim  library_names_spec='$libname${shared_ext} $libname.a'
2423218822Sdim  dynamic_linker='OS/2 ld.exe'
2424218822Sdim  shlibpath_var=LIBPATH
2425218822Sdim  ;;
2426218822Sdim
2427218822Sdimosf3* | osf4* | osf5*)
2428218822Sdim  version_type=osf
2429218822Sdim  need_lib_prefix=no
2430218822Sdim  need_version=no
2431218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2432218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2433218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2434218822Sdim  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2435218822Sdim  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2436218822Sdim  ;;
2437218822Sdim
2438218822Sdimrdos*)
2439218822Sdim  dynamic_linker=no
2440218822Sdim  ;;
2441218822Sdim
2442218822Sdimsolaris*)
2443218822Sdim  version_type=linux
2444218822Sdim  need_lib_prefix=no
2445218822Sdim  need_version=no
2446218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2447218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2448218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2449218822Sdim  shlibpath_overrides_runpath=yes
2450218822Sdim  hardcode_into_libs=yes
2451218822Sdim  # ldd complains unless libraries are executable
2452218822Sdim  postinstall_cmds='chmod +x $lib'
2453218822Sdim  ;;
2454218822Sdim
2455218822Sdimsunos4*)
2456218822Sdim  version_type=sunos
2457218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2458218822Sdim  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2459218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2460218822Sdim  shlibpath_overrides_runpath=yes
2461218822Sdim  if test "$with_gnu_ld" = yes; then
2462218822Sdim    need_lib_prefix=no
2463218822Sdim  fi
2464218822Sdim  need_version=yes
2465218822Sdim  ;;
2466218822Sdim
2467218822Sdimsysv4 | sysv4.3*)
2468218822Sdim  version_type=linux
2469218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2470218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2471218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2472218822Sdim  case $host_vendor in
2473218822Sdim    sni)
2474218822Sdim      shlibpath_overrides_runpath=no
2475218822Sdim      need_lib_prefix=no
2476218822Sdim      runpath_var=LD_RUN_PATH
2477218822Sdim      ;;
2478218822Sdim    siemens)
2479218822Sdim      need_lib_prefix=no
2480218822Sdim      ;;
2481218822Sdim    motorola)
2482218822Sdim      need_lib_prefix=no
2483218822Sdim      need_version=no
2484218822Sdim      shlibpath_overrides_runpath=no
2485218822Sdim      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2486218822Sdim      ;;
2487218822Sdim  esac
2488218822Sdim  ;;
2489218822Sdim
2490218822Sdimsysv4*MP*)
2491218822Sdim  if test -d /usr/nec ;then
2492218822Sdim    version_type=linux
2493218822Sdim    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2494218822Sdim    soname_spec='$libname${shared_ext}.$major'
2495218822Sdim    shlibpath_var=LD_LIBRARY_PATH
2496218822Sdim  fi
2497218822Sdim  ;;
2498218822Sdim
2499218822Sdimsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2500218822Sdim  version_type=freebsd-elf
2501218822Sdim  need_lib_prefix=no
2502218822Sdim  need_version=no
2503218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2504218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2505218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2506218822Sdim  shlibpath_overrides_runpath=yes
2507218822Sdim  hardcode_into_libs=yes
2508218822Sdim  if test "$with_gnu_ld" = yes; then
2509218822Sdim    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2510218822Sdim  else
2511218822Sdim    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2512218822Sdim    case $host_os in
2513218822Sdim      sco3.2v5*)
2514218822Sdim        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2515218822Sdim	;;
2516218822Sdim    esac
2517218822Sdim  fi
2518218822Sdim  sys_lib_dlsearch_path_spec='/usr/lib'
2519218822Sdim  ;;
2520218822Sdim
2521218822Sdimtpf*)
2522218822Sdim  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2523218822Sdim  version_type=linux
2524218822Sdim  need_lib_prefix=no
2525218822Sdim  need_version=no
2526218822Sdim  library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2528218822Sdim  shlibpath_overrides_runpath=no
2529218822Sdim  hardcode_into_libs=yes
2530218822Sdim  ;;
2531218822Sdim
2532218822Sdimuts4*)
2533218822Sdim  version_type=linux
2534218822Sdim  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2535218822Sdim  soname_spec='${libname}${release}${shared_ext}$major'
2536218822Sdim  shlibpath_var=LD_LIBRARY_PATH
2537218822Sdim  ;;
2538218822Sdim
2539218822Sdim*)
2540218822Sdim  dynamic_linker=no
2541218822Sdim  ;;
2542218822Sdimesac
2543218822SdimAC_MSG_RESULT([$dynamic_linker])
2544218822Sdimtest "$dynamic_linker" = no && can_build_shared=no
2545218822Sdim
2546218822Sdimvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2547218822Sdimif test "$GCC" = yes; then
2548218822Sdim  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2549218822Sdimfi
2550218822Sdim
2551218822Sdim_LT_DECL([], [variables_saved_for_relink], [1],
2552218822Sdim    [Variables whose values should be saved in libtool wrapper scripts and
2553218822Sdim    restored at link time])
2554218822Sdim_LT_DECL([], [need_lib_prefix], [0],
2555218822Sdim    [Do we need the "lib" prefix for modules?])
2556218822Sdim_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2557218822Sdim_LT_DECL([], [version_type], [0], [Library versioning type])
2558218822Sdim_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2559218822Sdim_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2560218822Sdim_LT_DECL([], [shlibpath_overrides_runpath], [0],
2561218822Sdim    [Is shlibpath searched before the hard-coded library search path?])
2562218822Sdim_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2563218822Sdim_LT_DECL([], [library_names_spec], [1],
2564218822Sdim    [[List of archive names.  First name is the real one, the rest are links.
2565218822Sdim    The last name is the one that the linker finds with -lNAME]])
2566218822Sdim_LT_DECL([], [soname_spec], [1],
2567218822Sdim    [[The coded name of the library, if different from the real name]])
2568218822Sdim_LT_DECL([], [postinstall_cmds], [2],
2569218822Sdim    [Command to use after installation of a shared archive])
2570218822Sdim_LT_DECL([], [postuninstall_cmds], [2],
2571218822Sdim    [Command to use after uninstallation of a shared archive])
2572218822Sdim_LT_DECL([], [finish_cmds], [2],
2573218822Sdim    [Commands used to finish a libtool library installation in a directory])
2574218822Sdim_LT_DECL([], [finish_eval], [1],
2575218822Sdim    [[As "finish_cmds", except a single script fragment to be evaled but
2576218822Sdim    not shown]])
2577218822Sdim_LT_DECL([], [hardcode_into_libs], [0],
2578218822Sdim    [Whether we should hardcode library paths into libraries])
2579218822Sdim_LT_DECL([], [sys_lib_search_path_spec], [2],
2580218822Sdim    [Compile-time system search path for libraries])
2581218822Sdim_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2582218822Sdim    [Run-time system search path for libraries])
2583218822Sdim])# _LT_SYS_DYNAMIC_LINKER
2584218822Sdim
2585218822Sdim
2586218822Sdim# _LT_PATH_TOOL_PREFIX(TOOL)
2587218822Sdim# --------------------------
2588218822Sdim# find a file program which can recognize shared library
2589218822SdimAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2590218822Sdim[m4_require([_LT_DECL_EGREP])dnl
2591218822SdimAC_MSG_CHECKING([for $1])
259285815SobrienAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
259389857Sobrien[case $MAGIC_CMD in
2594218822Sdim[[\\/*] |  ?:[\\/]*])
259585815Sobrien  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
259685815Sobrien  ;;
2597218822Sdim*)
2598218822Sdim  lt_save_MAGIC_CMD="$MAGIC_CMD"
2599218822Sdim  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
260085815Sobriendnl $ac_dummy forces splitting on constant user-supplied paths.
260185815Sobriendnl POSIX.2 word splitting is done only on the output of word expansions,
260285815Sobriendnl not every word.  This closes a longstanding sh security hole.
2603218822Sdim  ac_dummy="m4_if([$2], , $PATH, [$2])"
260485815Sobrien  for ac_dir in $ac_dummy; do
2605218822Sdim    IFS="$lt_save_ifs"
260685815Sobrien    test -z "$ac_dir" && ac_dir=.
260785815Sobrien    if test -f $ac_dir/$1; then
260885815Sobrien      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
260985815Sobrien      if test -n "$file_magic_test_file"; then
261089857Sobrien	case $deplibs_check_method in
261185815Sobrien	"file_magic "*)
2612218822Sdim	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
261385815Sobrien	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
261485815Sobrien	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2615218822Sdim	    $EGREP "$file_magic_regex" > /dev/null; then
261685815Sobrien	    :
261785815Sobrien	  else
2618218822Sdim	    cat <<_LT_EOF 1>&2
261985815Sobrien
262085815Sobrien*** Warning: the command libtool uses to detect shared libraries,
262185815Sobrien*** $file_magic_cmd, produces output that libtool cannot recognize.
262285815Sobrien*** The result is that libtool may fail to recognize shared libraries
262385815Sobrien*** as such.  This will affect the creation of libtool libraries that
262485815Sobrien*** depend on shared libraries, but programs linked with such libtool
262585815Sobrien*** libraries will work regardless of this problem.  Nevertheless, you
262685815Sobrien*** may want to report the problem to your system manager and/or to
262785815Sobrien*** bug-libtool@gnu.org
262885815Sobrien
2629218822Sdim_LT_EOF
263085815Sobrien	  fi ;;
263185815Sobrien	esac
263285815Sobrien      fi
263385815Sobrien      break
263485815Sobrien    fi
263585815Sobrien  done
2636218822Sdim  IFS="$lt_save_ifs"
2637218822Sdim  MAGIC_CMD="$lt_save_MAGIC_CMD"
263885815Sobrien  ;;
263985815Sobrienesac])
264085815SobrienMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
264185815Sobrienif test -n "$MAGIC_CMD"; then
264285815Sobrien  AC_MSG_RESULT($MAGIC_CMD)
264385815Sobrienelse
264485815Sobrien  AC_MSG_RESULT(no)
264585815Sobrienfi
2646218822Sdim_LT_DECL([], [MAGIC_CMD], [0],
2647218822Sdim	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2648218822Sdim])# _LT_PATH_TOOL_PREFIX
264985815Sobrien
2650218822Sdim# Old name:
2651218822SdimAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2652218822Sdimdnl aclocal-1.4 backwards compatibility:
2653218822Sdimdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
265485815Sobrien
2655218822Sdim
2656218822Sdim# _LT_PATH_MAGIC
2657218822Sdim# --------------
2658218822Sdim# find a file program which can recognize a shared library
2659218822Sdimm4_defun([_LT_PATH_MAGIC],
2660218822Sdim[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
266185815Sobrienif test -z "$lt_cv_path_MAGIC_CMD"; then
266285815Sobrien  if test -n "$ac_tool_prefix"; then
2663218822Sdim    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
266485815Sobrien  else
266585815Sobrien    MAGIC_CMD=:
266685815Sobrien  fi
266785815Sobrienfi
2668218822Sdim])# _LT_PATH_MAGIC
266985815Sobrien
267085815Sobrien
2671218822Sdim# LT_PATH_LD
2672218822Sdim# ----------
2673218822Sdim# find the pathname to the GNU or non-GNU linker
2674218822SdimAC_DEFUN([LT_PATH_LD],
2675218822Sdim[AC_REQUIRE([AC_PROG_CC])dnl
267685815SobrienAC_REQUIRE([AC_CANONICAL_HOST])dnl
267785815SobrienAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2678218822Sdimm4_require([_LT_DECL_SED])dnl
2679218822Sdimm4_require([_LT_DECL_EGREP])dnl
2680218822Sdim
2681218822SdimAC_ARG_WITH([gnu-ld],
2682218822Sdim    [AS_HELP_STRING([--with-gnu-ld],
2683218822Sdim	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2684218822Sdim    [test "$withval" = no || with_gnu_ld=yes],
2685218822Sdim    [with_gnu_ld=no])dnl
2686218822Sdim
268785815Sobrienac_prog=ld
268889857Sobrienif test "$GCC" = yes; then
268985815Sobrien  # Check if gcc -print-prog-name=ld gives a path.
2690218822Sdim  AC_MSG_CHECKING([for ld used by $CC])
269185815Sobrien  case $host in
269285815Sobrien  *-*-mingw*)
269385815Sobrien    # gcc leaves a trailing carriage return which upsets mingw
269485815Sobrien    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
269585815Sobrien  *)
269685815Sobrien    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
269785815Sobrien  esac
269889857Sobrien  case $ac_prog in
269985815Sobrien    # Accept absolute paths.
2700218822Sdim    [[\\/]]* | ?:[[\\/]]*)
2701218822Sdim      re_direlt='/[[^/]][[^/]]*/\.\./'
2702218822Sdim      # Canonicalize the pathname of ld
2703218822Sdim      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2704218822Sdim      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2705218822Sdim	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
270685815Sobrien      done
270785815Sobrien      test -z "$LD" && LD="$ac_prog"
270885815Sobrien      ;;
270985815Sobrien  "")
271085815Sobrien    # If it fails, then pretend we aren't using GCC.
271185815Sobrien    ac_prog=ld
271285815Sobrien    ;;
271385815Sobrien  *)
271485815Sobrien    # If it is relative, then search for the first ld in PATH.
271585815Sobrien    with_gnu_ld=unknown
271685815Sobrien    ;;
271785815Sobrien  esac
271885815Sobrienelif test "$with_gnu_ld" = yes; then
271985815Sobrien  AC_MSG_CHECKING([for GNU ld])
272085815Sobrienelse
272185815Sobrien  AC_MSG_CHECKING([for non-GNU ld])
272285815Sobrienfi
272389857SobrienAC_CACHE_VAL(lt_cv_path_LD,
272485815Sobrien[if test -z "$LD"; then
2725218822Sdim  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
272685815Sobrien  for ac_dir in $PATH; do
2727218822Sdim    IFS="$lt_save_ifs"
272885815Sobrien    test -z "$ac_dir" && ac_dir=.
272985815Sobrien    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
273089857Sobrien      lt_cv_path_LD="$ac_dir/$ac_prog"
273185815Sobrien      # Check to see if the program is GNU ld.  I'd rather use --version,
2732218822Sdim      # but apparently some variants of GNU ld only accept -v.
273385815Sobrien      # Break only if it was the GNU/non-GNU ld that we prefer.
2734218822Sdim      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2735218822Sdim      *GNU* | *'with BFD'*)
273685815Sobrien	test "$with_gnu_ld" != no && break
2737218822Sdim	;;
2738218822Sdim      *)
273985815Sobrien	test "$with_gnu_ld" != yes && break
2740218822Sdim	;;
2741218822Sdim      esac
274285815Sobrien    fi
274385815Sobrien  done
2744218822Sdim  IFS="$lt_save_ifs"
274585815Sobrienelse
274689857Sobrien  lt_cv_path_LD="$LD" # Let the user override the test with a path.
274785815Sobrienfi])
274889857SobrienLD="$lt_cv_path_LD"
274985815Sobrienif test -n "$LD"; then
275085815Sobrien  AC_MSG_RESULT($LD)
275185815Sobrienelse
275285815Sobrien  AC_MSG_RESULT(no)
275385815Sobrienfi
275485815Sobrientest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2755218822Sdim_LT_PATH_LD_GNU
2756218822SdimAC_SUBST([LD])
275785815Sobrien
2758218822Sdim_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2759218822Sdim])# LT_PATH_LD
2760218822Sdim
2761218822Sdim# Old names:
2762218822SdimAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2763218822SdimAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2764218822Sdimdnl aclocal-1.4 backwards compatibility:
2765218822Sdimdnl AC_DEFUN([AM_PROG_LD], [])
2766218822Sdimdnl AC_DEFUN([AC_PROG_LD], [])
2767218822Sdim
2768218822Sdim
2769218822Sdim# _LT_PATH_LD_GNU
2770218822Sdim#- --------------
2771218822Sdimm4_defun([_LT_PATH_LD_GNU],
277289857Sobrien[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2773218822Sdim[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2774218822Sdimcase `$LD -v 2>&1 </dev/null` in
2775218822Sdim*GNU* | *'with BFD'*)
277689857Sobrien  lt_cv_prog_gnu_ld=yes
2777218822Sdim  ;;
2778218822Sdim*)
277989857Sobrien  lt_cv_prog_gnu_ld=no
2780218822Sdim  ;;
2781218822Sdimesac])
278289857Sobrienwith_gnu_ld=$lt_cv_prog_gnu_ld
2783218822Sdim])# _LT_PATH_LD_GNU
278485815Sobrien
2785218822Sdim
2786218822Sdim# _LT_CMD_RELOAD
2787218822Sdim# --------------
2788218822Sdim# find reload flag for linker
278985815Sobrien#   -- PORTME Some linkers may need a different reload flag.
2790218822Sdimm4_defun([_LT_CMD_RELOAD],
2791218822Sdim[AC_CACHE_CHECK([for $LD option to reload object files],
2792218822Sdim  lt_cv_ld_reload_flag,
2793218822Sdim  [lt_cv_ld_reload_flag='-r'])
279485815Sobrienreload_flag=$lt_cv_ld_reload_flag
2795218822Sdimcase $reload_flag in
2796218822Sdim"" | " "*) ;;
2797218822Sdim*) reload_flag=" $reload_flag" ;;
2798218822Sdimesac
2799218822Sdimreload_cmds='$LD$reload_flag -o $output$reload_objs'
2800218822Sdimcase $host_os in
2801218822Sdim  darwin*)
2802218822Sdim    if test "$GCC" = yes; then
2803218822Sdim      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2804218822Sdim    else
2805218822Sdim      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2806218822Sdim    fi
2807218822Sdim    ;;
2808218822Sdimesac
2809218822Sdim_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2810218822Sdim_LT_DECL([], [reload_cmds], [2])dnl
2811218822Sdim])# _LT_CMD_RELOAD
281285815Sobrien
2813218822Sdim
2814218822Sdim# _LT_CHECK_MAGIC_METHOD
2815218822Sdim# ----------------------
2816218822Sdim# how to check for library dependencies
281785815Sobrien#  -- PORTME fill in with the dynamic library characteristics
2818218822Sdimm4_defun([_LT_CHECK_MAGIC_METHOD],
2819218822Sdim[m4_require([_LT_DECL_EGREP])
2820218822SdimAC_CACHE_CHECK([how to recognize dependent libraries],
282185815Sobrienlt_cv_deplibs_check_method,
282285815Sobrien[lt_cv_file_magic_cmd='$MAGIC_CMD'
282385815Sobrienlt_cv_file_magic_test_file=
282485815Sobrienlt_cv_deplibs_check_method='unknown'
282585815Sobrien# Need to set the preceding variable on all platforms that support
282685815Sobrien# interlibrary dependencies.
282785815Sobrien# 'none' -- dependencies not supported.
282885815Sobrien# `unknown' -- same as none, but documents that we really don't know.
282985815Sobrien# 'pass_all' -- all dependencies passed with no checks.
283085815Sobrien# 'test_compile' -- check by making test program.
2831218822Sdim# 'file_magic [[regex]]' -- check by looking for files in library path
2832218822Sdim# which responds to the $file_magic_cmd with a given extended regex.
283385815Sobrien# If you have `file' or equivalent on your system and you're not sure
283485815Sobrien# whether `pass_all' will *always* work, you probably want this one.
283585815Sobrien
283689857Sobriencase $host_os in
2837218822Sdimaix4* | aix5*)
283885815Sobrien  lt_cv_deplibs_check_method=pass_all
283985815Sobrien  ;;
284085815Sobrien
284185815Sobrienbeos*)
284285815Sobrien  lt_cv_deplibs_check_method=pass_all
284385815Sobrien  ;;
284485815Sobrien
2845218822Sdimbsdi[[45]]*)
2846218822Sdim  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
284785815Sobrien  lt_cv_file_magic_cmd='/usr/bin/file -L'
284885815Sobrien  lt_cv_file_magic_test_file=/shlib/libc.so
284985815Sobrien  ;;
285085815Sobrien
2851218822Sdimcygwin*)
2852218822Sdim  # func_win32_libid is a shell function defined in ltmain.sh
2853218822Sdim  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2854218822Sdim  lt_cv_file_magic_cmd='func_win32_libid'
285585815Sobrien  ;;
285685815Sobrien
2857218822Sdimmingw* | pw32*)
2858218822Sdim  # Base MSYS/MinGW do not provide the 'file' command needed by
2859218822Sdim  # func_win32_libid shell function, so use a weaker test based on 'objdump',
2860218822Sdim  # unless we find 'file', for example because we are cross-compiling.
2861218822Sdim  if ( file / ) >/dev/null 2>&1; then
2862218822Sdim    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2863218822Sdim    lt_cv_file_magic_cmd='func_win32_libid'
2864218822Sdim  else
2865218822Sdim    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2866218822Sdim    lt_cv_file_magic_cmd='$OBJDUMP -f'
2867218822Sdim  fi
2868218822Sdim  ;;
2869218822Sdim
287089857Sobriendarwin* | rhapsody*)
2871218822Sdim  lt_cv_deplibs_check_method=pass_all
287289857Sobrien  ;;
287389857Sobrien
2874218822Sdimfreebsd* | dragonfly*)
2875218822Sdim  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
287689857Sobrien    case $host_cpu in
287785815Sobrien    i*86 )
287885815Sobrien      # Not sure whether the presence of OpenBSD here was a mistake.
287985815Sobrien      # Let's accept both of them until this is cleared up.
2880218822Sdim      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
288185815Sobrien      lt_cv_file_magic_cmd=/usr/bin/file
288285815Sobrien      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
288385815Sobrien      ;;
288485815Sobrien    esac
288585815Sobrien  else
288685815Sobrien    lt_cv_deplibs_check_method=pass_all
288785815Sobrien  fi
288885815Sobrien  ;;
288985815Sobrien
289085815Sobriengnu*)
289185815Sobrien  lt_cv_deplibs_check_method=pass_all
289285815Sobrien  ;;
289385815Sobrien
2894218822Sdimhpux10.20* | hpux11*)
2895218822Sdim  lt_cv_file_magic_cmd=/usr/bin/file
289691041Sobrien  case $host_cpu in
289791041Sobrien  ia64*)
2898218822Sdim    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
289991041Sobrien    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
290091041Sobrien    ;;
2901218822Sdim  hppa*64*)
2902218822Sdim    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2903218822Sdim    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
290485815Sobrien    ;;
290585815Sobrien  *)
2906218822Sdim    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2907218822Sdim    lt_cv_file_magic_test_file=/usr/lib/libc.sl
290885815Sobrien    ;;
290985815Sobrien  esac
2910218822Sdim  ;;
2911218822Sdim
2912218822Sdiminterix[[3-9]]*)
2913218822Sdim  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2914218822Sdim  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2915218822Sdim  ;;
2916218822Sdim
2917218822Sdimirix5* | irix6* | nonstopux*)
2918218822Sdim  case $LD in
2919218822Sdim  *-32|*"-32 ") libmagic=32-bit;;
2920218822Sdim  *-n32|*"-n32 ") libmagic=N32;;
2921218822Sdim  *-64|*"-64 ") libmagic=64-bit;;
2922218822Sdim  *) libmagic=never-match;;
2923218822Sdim  esac
292485815Sobrien  lt_cv_deplibs_check_method=pass_all
292585815Sobrien  ;;
292685815Sobrien
292785815Sobrien# This must be Linux ELF.
2928218822Sdimlinux* | k*bsd*-gnu)
2929218822Sdim  lt_cv_deplibs_check_method=pass_all
293085815Sobrien  ;;
293185815Sobrien
293285815Sobriennetbsd*)
2933218822Sdim  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2934218822Sdim    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
293585815Sobrien  else
2936218822Sdim    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
293785815Sobrien  fi
293885815Sobrien  ;;
293985815Sobrien
2940218822Sdimnewos6*)
2941218822Sdim  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
294289857Sobrien  lt_cv_file_magic_cmd=/usr/bin/file
294389857Sobrien  lt_cv_file_magic_test_file=/usr/lib/libnls.so
294489857Sobrien  ;;
294589857Sobrien
2946218822Sdim*nto* | *qnx*)
2947218822Sdim  lt_cv_deplibs_check_method=pass_all
2948218822Sdim  ;;
2949218822Sdim
2950218822Sdimopenbsd*)
2951218822Sdim  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2952218822Sdim    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2953218822Sdim  else
2954218822Sdim    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2955218822Sdim  fi
2956218822Sdim  ;;
2957218822Sdim
295885815Sobrienosf3* | osf4* | osf5*)
295985815Sobrien  lt_cv_deplibs_check_method=pass_all
296085815Sobrien  ;;
296185815Sobrien
2962218822Sdimrdos*)
296385815Sobrien  lt_cv_deplibs_check_method=pass_all
296485815Sobrien  ;;
296585815Sobrien
296685815Sobriensolaris*)
296785815Sobrien  lt_cv_deplibs_check_method=pass_all
296885815Sobrien  ;;
296985815Sobrien
2970218822Sdimsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
297189857Sobrien  lt_cv_deplibs_check_method=pass_all
297289857Sobrien  ;;
297389857Sobrien
2974218822Sdimsysv4 | sysv4.3*)
297589857Sobrien  case $host_vendor in
2976218822Sdim  motorola)
2977218822Sdim    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]]'
2978218822Sdim    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2979218822Sdim    ;;
298085815Sobrien  ncr)
298185815Sobrien    lt_cv_deplibs_check_method=pass_all
298285815Sobrien    ;;
2983218822Sdim  sequent)
2984218822Sdim    lt_cv_file_magic_cmd='/bin/file'
2985218822Sdim    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
298685815Sobrien    ;;
2987218822Sdim  sni)
2988218822Sdim    lt_cv_file_magic_cmd='/bin/file'
2989218822Sdim    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2990218822Sdim    lt_cv_file_magic_test_file=/lib/libc.so
2991218822Sdim    ;;
2992218822Sdim  siemens)
2993218822Sdim    lt_cv_deplibs_check_method=pass_all
2994218822Sdim    ;;
2995218822Sdim  pc)
2996218822Sdim    lt_cv_deplibs_check_method=pass_all
2997218822Sdim    ;;
299885815Sobrien  esac
299985815Sobrien  ;;
3000218822Sdim
3001218822Sdimtpf*)
3002218822Sdim  lt_cv_deplibs_check_method=pass_all
3003218822Sdim  ;;
300485815Sobrienesac
300585815Sobrien])
300685815Sobrienfile_magic_cmd=$lt_cv_file_magic_cmd
300785815Sobriendeplibs_check_method=$lt_cv_deplibs_check_method
3008218822Sdimtest -z "$deplibs_check_method" && deplibs_check_method=unknown
300985815Sobrien
3010218822Sdim_LT_DECL([], [deplibs_check_method], [1],
3011218822Sdim    [Method to check whether dependent libraries are shared objects])
3012218822Sdim_LT_DECL([], [file_magic_cmd], [1],
3013218822Sdim    [Command to use when deplibs_check_method == "file_magic"])
3014218822Sdim])# _LT_CHECK_MAGIC_METHOD
301585815Sobrien
3016218822Sdim
3017218822Sdim# LT_PATH_NM
3018218822Sdim# ----------
3019218822Sdim# find the pathname to a BSD- or MS-compatible name lister
3020218822SdimAC_DEFUN([LT_PATH_NM],
3021218822Sdim[AC_REQUIRE([AC_PROG_CC])dnl
3022218822SdimAC_REQUIRE([AC_OBJEXT])dnl
3023218822SdimAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
302485815Sobrien[if test -n "$NM"; then
302585815Sobrien  # Let the user override the test.
302689857Sobrien  lt_cv_path_NM="$NM"
302785815Sobrienelse
3028218822Sdim  lt_nm_to_check="${ac_tool_prefix}nm"
3029218822Sdim  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3030218822Sdim    lt_nm_to_check="$lt_nm_to_check nm"
3031218822Sdim  fi
3032218822Sdim  for lt_tmp_nm in $lt_nm_to_check; do
3033218822Sdim    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3034218822Sdim    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3035218822Sdim      IFS="$lt_save_ifs"
3036218822Sdim      test -z "$ac_dir" && ac_dir=.
3037218822Sdim      tmp_nm="$ac_dir/$lt_tmp_nm"
3038218822Sdim      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3039218822Sdim	# Check to see if the nm accepts a BSD-compat flag.
3040218822Sdim	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3041218822Sdim	#   nm: unknown option "B" ignored
3042218822Sdim	# Tru64's nm complains that /dev/null is an invalid object file
3043218822Sdim	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3044218822Sdim	*/dev/null* | *'Invalid file or object type'*)
3045218822Sdim	  lt_cv_path_NM="$tmp_nm -B"
3046218822Sdim	  break
3047218822Sdim	  ;;
3048218822Sdim	*)
3049218822Sdim	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3050218822Sdim	  */dev/null*)
3051218822Sdim	    lt_cv_path_NM="$tmp_nm -p"
3052218822Sdim	    break
3053218822Sdim	    ;;
3054218822Sdim	  *)
3055218822Sdim	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3056218822Sdim	    continue # so that we can try to find one that supports BSD flags
3057218822Sdim	    ;;
3058218822Sdim	  esac
3059218822Sdim	  ;;
3060218822Sdim	esac
306185815Sobrien      fi
3062218822Sdim    done
3063218822Sdim    IFS="$lt_save_ifs"
306485815Sobrien  done
3065218822Sdim  : ${lt_cv_path_NM=no}
306685815Sobrienfi])
3067218822Sdimif test "$lt_cv_path_NM" != "no"; then
3068218822Sdim  NM="$lt_cv_path_NM"
3069218822Sdimelse
3070218822Sdim  # Didn't find any BSD compatible name lister, look for dumpbin.
3071218822Sdim  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3072218822Sdim  AC_SUBST([DUMPBIN])
3073218822Sdim  if test "$DUMPBIN" != ":"; then
3074218822Sdim    NM="$DUMPBIN"
3075218822Sdim  fi
3076218822Sdimfi
3077218822Sdimtest -z "$NM" && NM=nm
3078218822SdimAC_SUBST([NM])
3079218822Sdim_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
308085815Sobrien
3081218822SdimAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3082218822Sdim  [lt_cv_nm_interface="BSD nm"
3083218822Sdim  echo "int some_variable = 0;" > conftest.$ac_ext
3084218822Sdim  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3085218822Sdim  (eval "$ac_compile" 2>conftest.err)
3086218822Sdim  cat conftest.err >&AS_MESSAGE_LOG_FD
3087218822Sdim  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3088218822Sdim  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3089218822Sdim  cat conftest.err >&AS_MESSAGE_LOG_FD
3090218822Sdim  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3091218822Sdim  cat conftest.out >&AS_MESSAGE_LOG_FD
3092218822Sdim  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3093218822Sdim    lt_cv_nm_interface="MS dumpbin"
3094218822Sdim  fi
3095218822Sdim  rm -f conftest*])
3096218822Sdim])# LT_PATH_NM
3097218822Sdim
3098218822Sdim# Old names:
3099218822SdimAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3100218822SdimAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3101218822Sdimdnl aclocal-1.4 backwards compatibility:
3102218822Sdimdnl AC_DEFUN([AM_PROG_NM], [])
3103218822Sdimdnl AC_DEFUN([AC_PROG_NM], [])
3104218822Sdim
3105218822Sdim
3106218822Sdim# LT_LIB_M
3107218822Sdim# --------
3108218822Sdim# check for math library
3109218822SdimAC_DEFUN([LT_LIB_M],
311085815Sobrien[AC_REQUIRE([AC_CANONICAL_HOST])dnl
311185815SobrienLIBM=
311289857Sobriencase $host in
3113218822Sdim*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3114218822Sdim  # These system don't have libm, or don't need it
311585815Sobrien  ;;
311685815Sobrien*-ncr-sysv4.3*)
311785815Sobrien  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3118218822Sdim  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
311985815Sobrien  ;;
312085815Sobrien*)
3121218822Sdim  AC_CHECK_LIB(m, cos, LIBM="-lm")
312285815Sobrien  ;;
312385815Sobrienesac
3124218822SdimAC_SUBST([LIBM])
3125218822Sdim])# LT_LIB_M
3126218822Sdim
3127218822Sdim# Old name:
3128218822SdimAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3129218822Sdimdnl aclocal-1.4 backwards compatibility:
3130218822Sdimdnl AC_DEFUN([AC_CHECK_LIBM], [])
3131218822Sdim
3132218822Sdim
3133218822Sdim# _LT_COMPILER_NO_RTTI([TAGNAME])
3134218822Sdim# -------------------------------
3135218822Sdimm4_defun([_LT_COMPILER_NO_RTTI],
3136218822Sdim[m4_require([_LT_TAG_COMPILER])dnl
3137218822Sdim
3138218822Sdim_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3139218822Sdim
3140218822Sdimif test "$GCC" = yes; then
3141218822Sdim  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3142218822Sdim
3143218822Sdim  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3144218822Sdim    lt_cv_prog_compiler_rtti_exceptions,
3145218822Sdim    [-fno-rtti -fno-exceptions], [],
3146218822Sdim    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3147218822Sdimfi
3148218822Sdim_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3149218822Sdim	[Compiler flag to turn off builtin functions])
3150218822Sdim])# _LT_COMPILER_NO_RTTI
3151218822Sdim
3152218822Sdim
3153218822Sdim# _LT_CMD_GLOBAL_SYMBOLS
3154218822Sdim# ----------------------
3155218822Sdimm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3156218822Sdim[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3157218822SdimAC_REQUIRE([AC_PROG_CC])dnl
3158218822SdimAC_REQUIRE([AC_OBJEXT])dnl
3159218822SdimAC_REQUIRE([LT_PATH_NM])dnl
3160218822SdimAC_REQUIRE([LT_PATH_LD])dnl
3161218822Sdimm4_require([_LT_DECL_SED])dnl
3162218822Sdimm4_require([_LT_DECL_EGREP])dnl
3163218822Sdimm4_require([_LT_TAG_COMPILER])dnl
3164218822Sdim
3165218822Sdim# Check for command to grab the raw symbol name followed by C symbol from nm.
3166218822SdimAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3167218822SdimAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3168218822Sdim[
3169218822Sdim# These are sane defaults that work on at least a few old systems.
3170218822Sdim# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3171218822Sdim
3172218822Sdim# Character class describing NM global symbol codes.
3173218822Sdimsymcode='[[BCDEGRST]]'
3174218822Sdim
3175218822Sdim# Regexp to match symbols that can be accessed directly from C.
3176218822Sdimsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3177218822Sdim
3178218822Sdim# Define system-specific variables.
3179218822Sdimcase $host_os in
3180218822Sdimaix*)
3181218822Sdim  symcode='[[BCDT]]'
3182218822Sdim  ;;
3183218822Sdimcygwin* | mingw* | pw32*)
3184218822Sdim  symcode='[[ABCDGISTW]]'
3185218822Sdim  ;;
3186218822Sdimhpux*)
3187218822Sdim  if test "$host_cpu" = ia64; then
3188218822Sdim    symcode='[[ABCDEGRST]]'
3189218822Sdim  fi
3190218822Sdim  ;;
3191218822Sdimirix* | nonstopux*)
3192218822Sdim  symcode='[[BCDEGRST]]'
3193218822Sdim  ;;
3194218822Sdimosf*)
3195218822Sdim  symcode='[[BCDEGQRST]]'
3196218822Sdim  ;;
3197218822Sdimsolaris*)
3198218822Sdim  symcode='[[BDRT]]'
3199218822Sdim  ;;
3200218822Sdimsco3.2v5*)
3201218822Sdim  symcode='[[DT]]'
3202218822Sdim  ;;
3203218822Sdimsysv4.2uw2*)
3204218822Sdim  symcode='[[DT]]'
3205218822Sdim  ;;
3206218822Sdimsysv5* | sco5v6* | unixware* | OpenUNIX*)
3207218822Sdim  symcode='[[ABDT]]'
3208218822Sdim  ;;
3209218822Sdimsysv4)
3210218822Sdim  symcode='[[DFNSTU]]'
3211218822Sdim  ;;
3212218822Sdimesac
3213218822Sdim
3214218822Sdim# If we're using GNU nm, then use its standard symbol codes.
3215218822Sdimcase `$NM -V 2>&1` in
3216218822Sdim*GNU* | *'with BFD'*)
3217218822Sdim  symcode='[[ABCDGIRSTW]]' ;;
3218218822Sdimesac
3219218822Sdim
3220218822Sdim# Transform an extracted symbol line into a proper C declaration.
3221218822Sdim# Some systems (esp. on ia64) link data and code symbols differently,
3222218822Sdim# so use this general approach.
3223218822Sdimlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3224218822Sdim
3225218822Sdim# Transform an extracted symbol line into symbol name and symbol address
3226218822Sdimlt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3227218822Sdim
3228218822Sdim# Handle CRLF in mingw tool chain
3229218822Sdimopt_cr=
3230218822Sdimcase $build_os in
3231218822Sdimmingw*)
3232218822Sdim  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3233218822Sdim  ;;
3234218822Sdimesac
3235218822Sdim
3236218822Sdim# Try without a prefix underscore, then with it.
3237218822Sdimfor ac_symprfx in "" "_"; do
3238218822Sdim
3239218822Sdim  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3240218822Sdim  symxfrm="\\1 $ac_symprfx\\2 \\2"
3241218822Sdim
3242218822Sdim  # Write the raw and C identifiers.
3243218822Sdim  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3244218822Sdim    # Fake it for dumpbin and say T for any non-static function
3245218822Sdim    # and D for any global variable.
3246218822Sdim    # Also find C++ and __fastcall symbols from MSVC++,
3247218822Sdim    # which start with @ or ?.
3248218822Sdim    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3249218822Sdim"     {last_section=section; section=\$ 3};"\
3250218822Sdim"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3251218822Sdim"     \$ 0!~/External *\|/{next};"\
3252218822Sdim"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3253218822Sdim"     {if(hide[section]) next};"\
3254218822Sdim"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3255218822Sdim"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3256218822Sdim"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3257218822Sdim"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3258218822Sdim"     ' prfx=^$ac_symprfx]"
3259218822Sdim  else
3260218822Sdim    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3261218822Sdim  fi
3262218822Sdim
3263218822Sdim  # Check to see that the pipe works correctly.
3264218822Sdim  pipe_works=no
3265218822Sdim
3266218822Sdim  rm -f conftest*
3267218822Sdim  cat > conftest.$ac_ext <<_LT_EOF
3268218822Sdim#ifdef __cplusplus
3269218822Sdimextern "C" {
3270218822Sdim#endif
3271218822Sdimchar nm_test_var;
3272218822Sdimvoid nm_test_func(void);
3273218822Sdimvoid nm_test_func(void){}
3274218822Sdim#ifdef __cplusplus
3275218822Sdim}
3276218822Sdim#endif
3277218822Sdimint main(){nm_test_var='a';nm_test_func();return(0);}
3278218822Sdim_LT_EOF
3279218822Sdim
3280218822Sdim  if AC_TRY_EVAL(ac_compile); then
3281218822Sdim    # Now try to grab the symbols.
3282218822Sdim    nlist=conftest.nm
3283218822Sdim    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3284218822Sdim      # Try sorting and uniquifying the output.
3285218822Sdim      if sort "$nlist" | uniq > "$nlist"T; then
3286218822Sdim	mv -f "$nlist"T "$nlist"
3287218822Sdim      else
3288218822Sdim	rm -f "$nlist"T
3289218822Sdim      fi
3290218822Sdim
3291218822Sdim      # Make sure that we snagged all the symbols we need.
3292218822Sdim      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3293218822Sdim	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3294218822Sdim	  cat <<_LT_EOF > conftest.$ac_ext
3295218822Sdim#ifdef __cplusplus
3296218822Sdimextern "C" {
3297218822Sdim#endif
3298218822Sdim
3299218822Sdim_LT_EOF
3300218822Sdim	  # Now generate the symbol file.
3301218822Sdim	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3302218822Sdim
3303218822Sdim	  cat <<_LT_EOF >> conftest.$ac_ext
3304218822Sdim
3305218822Sdim/* The mapping between symbol names and symbols.  */
3306218822Sdimconst struct {
3307218822Sdim  const char *name;
3308218822Sdim  void       *address;
3309218822Sdim}
3310218822Sdimlt__PROGRAM__LTX_preloaded_symbols[[]] =
3311218822Sdim{
3312218822Sdim  { "@PROGRAM@", (void *) 0 },
3313218822Sdim_LT_EOF
3314218822Sdim	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3315218822Sdim	  cat <<\_LT_EOF >> conftest.$ac_ext
3316218822Sdim  {0, (void *) 0}
3317218822Sdim};
3318218822Sdim
3319218822Sdim/* This works around a problem in FreeBSD linker */
3320218822Sdim#ifdef FREEBSD_WORKAROUND
3321218822Sdimstatic const void *lt_preloaded_setup() {
3322218822Sdim  return lt__PROGRAM__LTX_preloaded_symbols;
3323218822Sdim}
3324218822Sdim#endif
3325218822Sdim
3326218822Sdim#ifdef __cplusplus
3327218822Sdim}
3328218822Sdim#endif
3329218822Sdim_LT_EOF
3330218822Sdim	  # Now try linking the two files.
3331218822Sdim	  mv conftest.$ac_objext conftstm.$ac_objext
3332218822Sdim	  lt_save_LIBS="$LIBS"
3333218822Sdim	  lt_save_CFLAGS="$CFLAGS"
3334218822Sdim	  LIBS="conftstm.$ac_objext"
3335218822Sdim	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3336218822Sdim	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3337218822Sdim	    pipe_works=yes
3338218822Sdim	  fi
3339218822Sdim	  LIBS="$lt_save_LIBS"
3340218822Sdim	  CFLAGS="$lt_save_CFLAGS"
3341218822Sdim	else
3342218822Sdim	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3343218822Sdim	fi
3344218822Sdim      else
3345218822Sdim	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3346218822Sdim      fi
3347218822Sdim    else
3348218822Sdim      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3349218822Sdim    fi
3350218822Sdim  else
3351218822Sdim    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3352218822Sdim    cat conftest.$ac_ext >&5
3353218822Sdim  fi
3354218822Sdim  rm -f conftest* conftst*
3355218822Sdim
3356218822Sdim  # Do not use the global_symbol_pipe unless it works.
3357218822Sdim  if test "$pipe_works" = yes; then
3358218822Sdim    break
3359218822Sdim  else
3360218822Sdim    lt_cv_sys_global_symbol_pipe=
3361218822Sdim  fi
3362218822Sdimdone
336385815Sobrien])
3364218822Sdimif test -z "$lt_cv_sys_global_symbol_pipe"; then
3365218822Sdim  lt_cv_sys_global_symbol_to_cdecl=
3366218822Sdimfi
3367218822Sdimif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3368218822Sdim  AC_MSG_RESULT(failed)
3369218822Sdimelse
3370218822Sdim  AC_MSG_RESULT(ok)
3371218822Sdimfi
337285815Sobrien
3373218822Sdim_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3374218822Sdim    [Take the output of nm and produce a listing of raw symbols and C names])
3375218822Sdim_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3376218822Sdim    [Transform the output of nm in a proper C declaration])
3377218822Sdim_LT_DECL([global_symbol_to_c_name_address],
3378218822Sdim    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3379218822Sdim    [Transform the output of nm in a C name address pair])
3380218822Sdim]) # _LT_CMD_GLOBAL_SYMBOLS
3381218822Sdim
3382218822Sdim
3383218822Sdim# _LT_COMPILER_PIC([TAGNAME])
3384218822Sdim# ---------------------------
3385218822Sdimm4_defun([_LT_COMPILER_PIC],
3386218822Sdim[m4_require([_LT_TAG_COMPILER])dnl
3387218822Sdim_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3388218822Sdim_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3389218822Sdim_LT_TAGVAR(lt_prog_compiler_static, $1)=
3390218822Sdim
3391218822SdimAC_MSG_CHECKING([for $compiler option to produce PIC])
3392218822Sdimm4_if([$1], [CXX], [
3393218822Sdim  # C++ specific cases for pic, static, wl, etc.
3394218822Sdim  if test "$GXX" = yes; then
3395218822Sdim    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3396218822Sdim    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3397218822Sdim
3398218822Sdim    case $host_os in
3399218822Sdim    aix*)
3400218822Sdim      # All AIX code is PIC.
3401218822Sdim      if test "$host_cpu" = ia64; then
3402218822Sdim	# AIX 5 now supports IA64 processor
3403218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3404218822Sdim      fi
3405218822Sdim      ;;
3406218822Sdim    amigaos*)
3407218822Sdim      if test "$host_cpu" = m68k; then
3408218822Sdim        # FIXME: we need at least 68020 code to build shared libraries, but
3409218822Sdim        # adding the `-m68020' flag to GCC prevents building anything better,
3410218822Sdim        # like `-m68040'.
3411218822Sdim        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3412218822Sdim      fi
3413218822Sdim      ;;
3414218822Sdim    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3415218822Sdim      # PIC is the default for these OSes.
3416218822Sdim      ;;
3417218822Sdim    mingw* | cygwin* | os2* | pw32*)
3418218822Sdim      # This hack is so that the source file can tell whether it is being
3419218822Sdim      # built for inclusion in a dll (and should export symbols for example).
3420218822Sdim      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3421218822Sdim      # (--disable-auto-import) libraries
3422218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3423218822Sdim      ;;
3424218822Sdim    darwin* | rhapsody*)
3425218822Sdim      # PIC is the default on this platform
3426218822Sdim      # Common symbols not allowed in MH_DYLIB files
3427218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3428218822Sdim      ;;
3429218822Sdim    *djgpp*)
3430218822Sdim      # DJGPP does not support shared libraries at all
3431218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3432218822Sdim      ;;
3433218822Sdim    interix[[3-9]]*)
3434218822Sdim      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3435218822Sdim      # Instead, we relocate shared libraries at runtime.
3436218822Sdim      ;;
3437218822Sdim    sysv4*MP*)
3438218822Sdim      if test -d /usr/nec; then
3439218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3440218822Sdim      fi
3441218822Sdim      ;;
3442218822Sdim    hpux*)
3443218822Sdim      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3444218822Sdim      # not for PA HP-UX.
3445218822Sdim      case $host_cpu in
3446218822Sdim      hppa*64*|ia64*)
3447218822Sdim	;;
3448218822Sdim      *)
3449218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3450218822Sdim	;;
3451218822Sdim      esac
3452218822Sdim      ;;
3453218822Sdim    *qnx* | *nto*)
3454218822Sdim      # QNX uses GNU C++, but need to define -shared option too, otherwise
3455218822Sdim      # it will coredump.
3456218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3457218822Sdim      ;;
3458218822Sdim    *)
3459218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3460218822Sdim      ;;
3461218822Sdim    esac
3462218822Sdim  else
3463218822Sdim    case $host_os in
3464218822Sdim      aix4* | aix5*)
3465218822Sdim	# All AIX code is PIC.
3466218822Sdim	if test "$host_cpu" = ia64; then
3467218822Sdim	  # AIX 5 now supports IA64 processor
3468218822Sdim	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3469218822Sdim	else
3470218822Sdim	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3471218822Sdim	fi
3472218822Sdim	;;
3473218822Sdim      chorus*)
3474218822Sdim	case $cc_basename in
3475218822Sdim	cxch68*)
3476218822Sdim	  # Green Hills C++ Compiler
3477218822Sdim	  # _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"
3478218822Sdim	  ;;
3479218822Sdim	esac
3480218822Sdim	;;
3481218822Sdim      darwin*)
3482218822Sdim        # PIC is the default on this platform
3483218822Sdim        # Common symbols not allowed in MH_DYLIB files
3484218822Sdim        case $cc_basename in
3485218822Sdim          xlc*)
3486218822Sdim          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3487218822Sdim          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3488218822Sdim          ;;
3489218822Sdim        esac
3490218822Sdim        ;;
3491218822Sdim      dgux*)
3492218822Sdim	case $cc_basename in
3493218822Sdim	  ec++*)
3494218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3495218822Sdim	    ;;
3496218822Sdim	  ghcx*)
3497218822Sdim	    # Green Hills C++ Compiler
3498218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3499218822Sdim	    ;;
3500218822Sdim	  *)
3501218822Sdim	    ;;
3502218822Sdim	esac
3503218822Sdim	;;
3504218822Sdim      freebsd* | dragonfly*)
3505218822Sdim	# FreeBSD uses GNU C++
3506218822Sdim	;;
3507218822Sdim      hpux9* | hpux10* | hpux11*)
3508218822Sdim	case $cc_basename in
3509218822Sdim	  CC*)
3510218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3511218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3512218822Sdim	    if test "$host_cpu" != ia64; then
3513218822Sdim	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3514218822Sdim	    fi
3515218822Sdim	    ;;
3516218822Sdim	  aCC*)
3517218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3518218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3519218822Sdim	    case $host_cpu in
3520218822Sdim	    hppa*64*|ia64*)
3521218822Sdim	      # +Z the default
3522218822Sdim	      ;;
3523218822Sdim	    *)
3524218822Sdim	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3525218822Sdim	      ;;
3526218822Sdim	    esac
3527218822Sdim	    ;;
3528218822Sdim	  *)
3529218822Sdim	    ;;
3530218822Sdim	esac
3531218822Sdim	;;
3532218822Sdim      interix*)
3533218822Sdim	# This is c89, which is MS Visual C++ (no shared libs)
3534218822Sdim	# Anyone wants to do a port?
3535218822Sdim	;;
3536218822Sdim      irix5* | irix6* | nonstopux*)
3537218822Sdim	case $cc_basename in
3538218822Sdim	  CC*)
3539218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3540218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3541218822Sdim	    # CC pic flag -KPIC is the default.
3542218822Sdim	    ;;
3543218822Sdim	  *)
3544218822Sdim	    ;;
3545218822Sdim	esac
3546218822Sdim	;;
3547218822Sdim      linux* | k*bsd*-gnu)
3548218822Sdim	case $cc_basename in
3549218822Sdim	  KCC*)
3550218822Sdim	    # KAI C++ Compiler
3551218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3552218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3553218822Sdim	    ;;
3554218822Sdim	  icpc* | ecpc* )
3555218822Sdim	    # Intel C++
3556218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3557218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3558218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3559218822Sdim	    ;;
3560218822Sdim	  pgCC*)
3561218822Sdim	    # Portland Group C++ compiler
3562218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3564218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3565218822Sdim	    ;;
3566218822Sdim	  cxx*)
3567218822Sdim	    # Compaq C++
3568218822Sdim	    # Make sure the PIC flag is empty.  It appears that all Alpha
3569218822Sdim	    # Linux and Compaq Tru64 Unix objects are PIC.
3570218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3571218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3572218822Sdim	    ;;
3573218822Sdim	  *)
3574218822Sdim	    case `$CC -V 2>&1 | sed 5q` in
3575218822Sdim	    *Sun\ C*)
3576218822Sdim	      # Sun C++ 5.9
3577218822Sdim	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3578218822Sdim	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3579218822Sdim	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3580218822Sdim	      ;;
3581218822Sdim	    esac
3582218822Sdim	    ;;
3583218822Sdim	esac
3584218822Sdim	;;
3585218822Sdim      lynxos*)
3586218822Sdim	;;
3587218822Sdim      m88k*)
3588218822Sdim	;;
3589218822Sdim      mvs*)
3590218822Sdim	case $cc_basename in
3591218822Sdim	  cxx*)
3592218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3593218822Sdim	    ;;
3594218822Sdim	  *)
3595218822Sdim	    ;;
3596218822Sdim	esac
3597218822Sdim	;;
3598218822Sdim      netbsd*)
3599218822Sdim	;;
3600218822Sdim      *qnx* | *nto*)
3601218822Sdim        # QNX uses GNU C++, but need to define -shared option too, otherwise
3602218822Sdim        # it will coredump.
3603218822Sdim        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3604218822Sdim        ;;
3605218822Sdim      osf3* | osf4* | osf5*)
3606218822Sdim	case $cc_basename in
3607218822Sdim	  KCC*)
3608218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3609218822Sdim	    ;;
3610218822Sdim	  RCC*)
3611218822Sdim	    # Rational C++ 2.4.1
3612218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3613218822Sdim	    ;;
3614218822Sdim	  cxx*)
3615218822Sdim	    # Digital/Compaq C++
3616218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3617218822Sdim	    # Make sure the PIC flag is empty.  It appears that all Alpha
3618218822Sdim	    # Linux and Compaq Tru64 Unix objects are PIC.
3619218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3620218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3621218822Sdim	    ;;
3622218822Sdim	  *)
3623218822Sdim	    ;;
3624218822Sdim	esac
3625218822Sdim	;;
3626218822Sdim      psos*)
3627218822Sdim	;;
3628218822Sdim      solaris*)
3629218822Sdim	case $cc_basename in
3630218822Sdim	  CC*)
3631218822Sdim	    # Sun C++ 4.2, 5.x and Centerline C++
3632218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3633218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3634218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3635218822Sdim	    ;;
3636218822Sdim	  gcx*)
3637218822Sdim	    # Green Hills C++ Compiler
3638218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3639218822Sdim	    ;;
3640218822Sdim	  *)
3641218822Sdim	    ;;
3642218822Sdim	esac
3643218822Sdim	;;
3644218822Sdim      sunos4*)
3645218822Sdim	case $cc_basename in
3646218822Sdim	  CC*)
3647218822Sdim	    # Sun C++ 4.x
3648218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3649218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3650218822Sdim	    ;;
3651218822Sdim	  lcc*)
3652218822Sdim	    # Lucid
3653218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3654218822Sdim	    ;;
3655218822Sdim	  *)
3656218822Sdim	    ;;
3657218822Sdim	esac
3658218822Sdim	;;
3659218822Sdim      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3660218822Sdim	case $cc_basename in
3661218822Sdim	  CC*)
3662218822Sdim	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3663218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3664218822Sdim	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3665218822Sdim	    ;;
3666218822Sdim	esac
3667218822Sdim	;;
3668218822Sdim      tandem*)
3669218822Sdim	case $cc_basename in
3670218822Sdim	  NCC*)
3671218822Sdim	    # NonStop-UX NCC 3.20
3672218822Sdim	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3673218822Sdim	    ;;
3674218822Sdim	  *)
3675218822Sdim	    ;;
3676218822Sdim	esac
3677218822Sdim	;;
3678218822Sdim      vxworks*)
3679218822Sdim	;;
3680218822Sdim      *)
3681218822Sdim	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3682218822Sdim	;;
3683218822Sdim    esac
3684218822Sdim  fi
3685218822Sdim],
3686218822Sdim[
3687218822Sdim  if test "$GCC" = yes; then
3688218822Sdim    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3689218822Sdim    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3690218822Sdim
3691218822Sdim    case $host_os in
3692218822Sdim      aix*)
3693218822Sdim      # All AIX code is PIC.
3694218822Sdim      if test "$host_cpu" = ia64; then
3695218822Sdim	# AIX 5 now supports IA64 processor
3696218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3697218822Sdim      fi
3698218822Sdim      ;;
3699218822Sdim
3700218822Sdim    amigaos*)
3701218822Sdim      if test "$host_cpu" = m68k; then
3702218822Sdim        # FIXME: we need at least 68020 code to build shared libraries, but
3703218822Sdim        # adding the `-m68020' flag to GCC prevents building anything better,
3704218822Sdim        # like `-m68040'.
3705218822Sdim        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3706218822Sdim      fi
3707218822Sdim      ;;
3708218822Sdim
3709218822Sdim    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3710218822Sdim      # PIC is the default for these OSes.
3711218822Sdim      ;;
3712218822Sdim
3713218822Sdim    mingw* | cygwin* | pw32* | os2*)
3714218822Sdim      # This hack is so that the source file can tell whether it is being
3715218822Sdim      # built for inclusion in a dll (and should export symbols for example).
3716218822Sdim      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3717218822Sdim      # (--disable-auto-import) libraries
3718218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3719218822Sdim      ;;
3720218822Sdim
3721218822Sdim    darwin* | rhapsody*)
3722218822Sdim      # PIC is the default on this platform
3723218822Sdim      # Common symbols not allowed in MH_DYLIB files
3724218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3725218822Sdim      ;;
3726218822Sdim
3727218822Sdim    hpux*)
3728218822Sdim      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3729218822Sdim      # not for PA HP-UX.
3730218822Sdim      case $host_cpu in
3731218822Sdim      hppa*64*|ia64*)
3732218822Sdim	# +Z the default
3733218822Sdim	;;
3734218822Sdim      *)
3735218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3736218822Sdim	;;
3737218822Sdim      esac
3738218822Sdim      ;;
3739218822Sdim
3740218822Sdim    interix[[3-9]]*)
3741218822Sdim      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3742218822Sdim      # Instead, we relocate shared libraries at runtime.
3743218822Sdim      ;;
3744218822Sdim
3745218822Sdim    msdosdjgpp*)
3746218822Sdim      # Just because we use GCC doesn't mean we suddenly get shared libraries
3747218822Sdim      # on systems that don't support them.
3748218822Sdim      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3749218822Sdim      enable_shared=no
3750218822Sdim      ;;
3751218822Sdim
3752218822Sdim    *nto* | *qnx*)
3753218822Sdim      # QNX uses GNU C++, but need to define -shared option too, otherwise
3754218822Sdim      # it will coredump.
3755218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3756218822Sdim      ;;
3757218822Sdim
3758218822Sdim    sysv4*MP*)
3759218822Sdim      if test -d /usr/nec; then
3760218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3761218822Sdim      fi
3762218822Sdim      ;;
3763218822Sdim
3764218822Sdim    *)
3765218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3766218822Sdim      ;;
3767218822Sdim    esac
3768218822Sdim  else
3769218822Sdim    # PORTME Check for flag to pass linker flags through the system compiler.
3770218822Sdim    case $host_os in
3771218822Sdim    aix*)
3772218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3773218822Sdim      if test "$host_cpu" = ia64; then
3774218822Sdim	# AIX 5 now supports IA64 processor
3775218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3776218822Sdim      else
3777218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3778218822Sdim      fi
3779218822Sdim      ;;
3780218822Sdim    darwin*)
3781218822Sdim      # PIC is the default on this platform
3782218822Sdim      # Common symbols not allowed in MH_DYLIB files
3783218822Sdim      case $cc_basename in
3784218822Sdim      xlc*)
3785218822Sdim        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3786218822Sdim        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3787218822Sdim        ;;
3788218822Sdim      esac
3789218822Sdim      ;;
3790218822Sdim
3791218822Sdim    mingw* | cygwin* | pw32* | os2*)
3792218822Sdim      # This hack is so that the source file can tell whether it is being
3793218822Sdim      # built for inclusion in a dll (and should export symbols for example).
3794218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3795218822Sdim      ;;
3796218822Sdim
3797218822Sdim    hpux9* | hpux10* | hpux11*)
3798218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3799218822Sdim      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3800218822Sdim      # not for PA HP-UX.
3801218822Sdim      case $host_cpu in
3802218822Sdim      hppa*64*|ia64*)
3803218822Sdim	# +Z the default
3804218822Sdim	;;
3805218822Sdim      *)
3806218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3807218822Sdim	;;
3808218822Sdim      esac
3809218822Sdim      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3810218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3811218822Sdim      ;;
3812218822Sdim
3813218822Sdim    irix5* | irix6* | nonstopux*)
3814218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3815218822Sdim      # PIC (with -KPIC) is the default.
3816218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3817218822Sdim      ;;
3818218822Sdim
3819218822Sdim    linux* | k*bsd*-gnu)
3820218822Sdim      case $cc_basename in
3821218822Sdim      icc* | ecc*)
3822218822Sdim	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3823218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3824218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3825218822Sdim        ;;
3826218822Sdim      pgcc* | pgf77* | pgf90* | pgf95*)
3827218822Sdim        # Portland Group compilers (*not* the Pentium gcc compiler,
3828218822Sdim	# which looks to be a dead project)
3829218822Sdim	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3830218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3831218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3832218822Sdim        ;;
3833218822Sdim      ccc*)
3834218822Sdim        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3835218822Sdim        # All Alpha code is PIC.
3836218822Sdim        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3837218822Sdim        ;;
3838218822Sdim      *)
3839218822Sdim	case `$CC -V 2>&1 | sed 5q` in
3840218822Sdim	*Sun\ C*)
3841218822Sdim	  # Sun C 5.9
3842218822Sdim	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3843218822Sdim	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3844218822Sdim	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3845218822Sdim	  ;;
3846218822Sdim	*Sun\ F*)
3847218822Sdim	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
3848218822Sdim	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3849218822Sdim	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3850218822Sdim	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
3851218822Sdim	  ;;
3852218822Sdim	esac
3853218822Sdim	;;
3854218822Sdim      esac
3855218822Sdim      ;;
3856218822Sdim
3857218822Sdim    newsos6)
3858218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3859218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3860218822Sdim      ;;
3861218822Sdim
3862218822Sdim    *nto* | *qnx*)
3863218822Sdim      # QNX uses GNU C++, but need to define -shared option too, otherwise
3864218822Sdim      # it will coredump.
3865218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3866218822Sdim      ;;
3867218822Sdim
3868218822Sdim    osf3* | osf4* | osf5*)
3869218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3870218822Sdim      # All OSF/1 code is PIC.
3871218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3872218822Sdim      ;;
3873218822Sdim
3874218822Sdim    rdos*)
3875218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3876218822Sdim      ;;
3877218822Sdim
3878218822Sdim    solaris*)
3879218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3880218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3881218822Sdim      case $cc_basename in
3882218822Sdim      f77* | f90* | f95*)
3883218822Sdim	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3884218822Sdim      *)
3885218822Sdim	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3886218822Sdim      esac
3887218822Sdim      ;;
3888218822Sdim
3889218822Sdim    sunos4*)
3890218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3891218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3892218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3893218822Sdim      ;;
3894218822Sdim
3895218822Sdim    sysv4 | sysv4.2uw2* | sysv4.3*)
3896218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3897218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3898218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3899218822Sdim      ;;
3900218822Sdim
3901218822Sdim    sysv4*MP*)
3902218822Sdim      if test -d /usr/nec ;then
3903218822Sdim	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3904218822Sdim	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3905218822Sdim      fi
3906218822Sdim      ;;
3907218822Sdim
3908218822Sdim    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3909218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3910218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3911218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3912218822Sdim      ;;
3913218822Sdim
3914218822Sdim    unicos*)
3915218822Sdim      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3916218822Sdim      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3917218822Sdim      ;;
3918218822Sdim
3919218822Sdim    uts4*)
3920218822Sdim      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3921218822Sdim      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3922218822Sdim      ;;
3923218822Sdim
3924218822Sdim    *)
3925218822Sdim      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3926218822Sdim      ;;
3927218822Sdim    esac
3928218822Sdim  fi
392985815Sobrien])
3930218822Sdimcase $host_os in
3931218822Sdim  # For platforms which do not support PIC, -DPIC is meaningless:
3932218822Sdim  *djgpp*)
3933218822Sdim    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3934218822Sdim    ;;
3935218822Sdim  *)
3936218822Sdim    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
3937218822Sdim    ;;
3938218822Sdimesac
3939218822SdimAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
3940218822Sdim_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3941218822Sdim	[How to pass a linker flag through the compiler])
394285815Sobrien
3943218822Sdim#
3944218822Sdim# Check to make sure the PIC flag actually works.
3945218822Sdim#
3946218822Sdimif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
3947218822Sdim  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
3948218822Sdim    [_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
3949218822Sdim    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3950218822Sdim    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
3951218822Sdim     "" | " "*) ;;
3952218822Sdim     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3953218822Sdim     esac],
3954218822Sdim    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3955218822Sdim     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3956218822Sdimfi
3957218822Sdim_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3958218822Sdim	[Additional compiler flags for building library objects])
3959218822Sdim
3960218822Sdim#
3961218822Sdim# Check to make sure the static flag actually works.
3962218822Sdim#
3963218822Sdimwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
3964218822Sdim_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3965218822Sdim  _LT_TAGVAR(lt_prog_compiler_static_works, $1),
3966218822Sdim  $lt_tmp_static_flag,
3967218822Sdim  [],
3968218822Sdim  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
3969218822Sdim_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3970218822Sdim	[Compiler flag to prevent dynamic linking])
3971218822Sdim])# _LT_COMPILER_PIC
3972218822Sdim
3973218822Sdim
3974218822Sdim# _LT_LINKER_SHLIBS([TAGNAME])
3975218822Sdim# ----------------------------
3976218822Sdim# See if the linker supports building shared libraries.
3977218822Sdimm4_defun([_LT_LINKER_SHLIBS],
3978218822Sdim[AC_REQUIRE([LT_PATH_LD])dnl
3979218822SdimAC_REQUIRE([LT_PATH_NM])dnl
3980218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
3981218822Sdimm4_require([_LT_DECL_EGREP])dnl
3982218822Sdimm4_require([_LT_DECL_SED])dnl
3983218822Sdimm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3984218822Sdimm4_require([_LT_TAG_COMPILER])dnl
3985218822SdimAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3986218822Sdimm4_if([$1], [CXX], [
3987218822Sdim  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3988218822Sdim  case $host_os in
3989218822Sdim  aix4* | aix5*)
3990218822Sdim    # If we're using GNU nm, then we don't want the "-C" option.
3991218822Sdim    # -C means demangle to AIX nm, but means don't demangle with GNU nm
3992218822Sdim    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3993218822Sdim      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
3994218822Sdim    else
3995218822Sdim      _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'
3996218822Sdim    fi
3997218822Sdim    ;;
3998218822Sdim  pw32*)
3999218822Sdim    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4000218822Sdim  ;;
4001218822Sdim  cygwin* | mingw*)
4002218822Sdim    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4003218822Sdim  ;;
4004218822Sdim  *)
4005218822Sdim    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4006218822Sdim  ;;
4007218822Sdim  esac
4008218822Sdim], [
4009218822Sdim  runpath_var=
4010218822Sdim  _LT_TAGVAR(allow_undefined_flag, $1)=
4011218822Sdim  _LT_TAGVAR(always_export_symbols, $1)=no
4012218822Sdim  _LT_TAGVAR(archive_cmds, $1)=
4013218822Sdim  _LT_TAGVAR(archive_expsym_cmds, $1)=
4014218822Sdim  _LT_TAGVAR(compiler_needs_object, $1)=no
4015218822Sdim  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4016218822Sdim  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4017218822Sdim  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4018218822Sdim  _LT_TAGVAR(hardcode_automatic, $1)=no
4019218822Sdim  _LT_TAGVAR(hardcode_direct, $1)=no
4020218822Sdim  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4021218822Sdim  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4022218822Sdim  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4023218822Sdim  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4024218822Sdim  _LT_TAGVAR(hardcode_minus_L, $1)=no
4025218822Sdim  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4026218822Sdim  _LT_TAGVAR(inherit_rpath, $1)=no
4027218822Sdim  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4028218822Sdim  _LT_TAGVAR(module_cmds, $1)=
4029218822Sdim  _LT_TAGVAR(module_expsym_cmds, $1)=
4030218822Sdim  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4031218822Sdim  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4032218822Sdim  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4033218822Sdim  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4034218822Sdim  # include_expsyms should be a list of space-separated symbols to be *always*
4035218822Sdim  # included in the symbol list
4036218822Sdim  _LT_TAGVAR(include_expsyms, $1)=
4037218822Sdim  # exclude_expsyms can be an extended regexp of symbols to exclude
4038218822Sdim  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4039218822Sdim  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4040218822Sdim  # as well as any symbol that contains `d'.
4041218822Sdim  _LT_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4042218822Sdim  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4043218822Sdim  # platforms (ab)use it in PIC code, but their linkers get confused if
4044218822Sdim  # the symbol is explicitly referenced.  Since portable code cannot
4045218822Sdim  # rely on this symbol name, it's probably fine to never include it in
4046218822Sdim  # preloaded symbol tables.
4047218822Sdim  extract_expsyms_cmds=
4048218822Sdim
4049218822Sdim  case $host_os in
4050218822Sdim  cygwin* | mingw* | pw32*)
4051218822Sdim    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4052218822Sdim    # When not using gcc, we currently assume that we are using
4053218822Sdim    # Microsoft Visual C++.
4054218822Sdim    if test "$GCC" != yes; then
4055218822Sdim      with_gnu_ld=no
4056218822Sdim    fi
4057218822Sdim    ;;
4058218822Sdim  interix*)
4059218822Sdim    # we just hope/assume this is gcc and not c89 (= MSVC++)
4060218822Sdim    with_gnu_ld=yes
4061218822Sdim    ;;
4062218822Sdim  openbsd*)
4063218822Sdim    with_gnu_ld=no
4064218822Sdim    ;;
4065218822Sdim  esac
4066218822Sdim
4067218822Sdim  _LT_TAGVAR(ld_shlibs, $1)=yes
4068218822Sdim  if test "$with_gnu_ld" = yes; then
4069218822Sdim    # If archive_cmds runs LD, not CC, wlarc should be empty
4070218822Sdim    wlarc='${wl}'
4071218822Sdim
4072218822Sdim    # Set some defaults for GNU ld with shared library support. These
4073218822Sdim    # are reset later if shared libraries are not supported. Putting them
4074218822Sdim    # here allows them to be overridden if necessary.
4075218822Sdim    runpath_var=LD_RUN_PATH
4076218822Sdim    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4077218822Sdim    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4078218822Sdim    # ancient GNU ld didn't support --whole-archive et. al.
4079218822Sdim    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4080218822Sdim      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4081218822Sdim    else
4082218822Sdim      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4083218822Sdim    fi
4084218822Sdim    supports_anon_versioning=no
4085218822Sdim    case `$LD -v 2>&1` in
4086218822Sdim      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4087218822Sdim      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4088218822Sdim      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4089218822Sdim      *\ 2.11.*) ;; # other 2.11 versions
4090218822Sdim      *) supports_anon_versioning=yes ;;
4091218822Sdim    esac
4092218822Sdim
4093218822Sdim    # See if GNU ld supports shared libraries.
4094218822Sdim    case $host_os in
4095218822Sdim    aix3* | aix4* | aix5*)
4096218822Sdim      # On AIX/PPC, the GNU linker is very broken
4097218822Sdim      if test "$host_cpu" != ia64; then
4098218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4099218822Sdim	cat <<_LT_EOF 1>&2
4100218822Sdim
4101218822Sdim*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4102218822Sdim*** to be unable to reliably create shared libraries on AIX.
4103218822Sdim*** Therefore, libtool is disabling shared libraries support.  If you
4104218822Sdim*** really care for shared libraries, you may want to modify your PATH
4105218822Sdim*** so that a non-GNU linker is found, and then restart.
4106218822Sdim
4107218822Sdim_LT_EOF
4108218822Sdim      fi
4109218822Sdim      ;;
4110218822Sdim
4111218822Sdim    amigaos*)
4112218822Sdim      if test "$host_cpu" = m68k; then
4113218822Sdim        _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)'
4114218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4115218822Sdim        _LT_TAGVAR(hardcode_minus_L, $1)=yes
4116218822Sdim      fi
4117218822Sdim
4118218822Sdim      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4119218822Sdim      # that the semantics of dynamic libraries on AmigaOS, at least up
4120218822Sdim      # to version 4, is to share data among multiple programs linked
4121218822Sdim      # with the same dynamic library.  Since this doesn't match the
4122218822Sdim      # behavior of shared libraries on other platforms, we can't use
4123218822Sdim      # them.
4124218822Sdim      _LT_TAGVAR(ld_shlibs, $1)=no
4125218822Sdim      ;;
4126218822Sdim
4127218822Sdim    beos*)
4128218822Sdim      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4129218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4130218822Sdim	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4131218822Sdim	# support --undefined.  This deserves some investigation.  FIXME
4132218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4133218822Sdim      else
4134218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4135218822Sdim      fi
4136218822Sdim      ;;
4137218822Sdim
4138218822Sdim    cygwin* | mingw* | pw32*)
4139218822Sdim      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4140218822Sdim      # as there is no search path for DLLs.
4141218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4142218822Sdim      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4143218822Sdim      _LT_TAGVAR(always_export_symbols, $1)=no
4144218822Sdim      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4145218822Sdim      _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'
4146218822Sdim
4147218822Sdim      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4148218822Sdim        _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'
4149218822Sdim	# If the export-symbols file already is a .def file (1st line
4150218822Sdim	# is EXPORTS), use it as is; otherwise, prepend...
4151218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4152218822Sdim	  cp $export_symbols $output_objdir/$soname.def;
4153218822Sdim	else
4154218822Sdim	  echo EXPORTS > $output_objdir/$soname.def;
4155218822Sdim	  cat $export_symbols >> $output_objdir/$soname.def;
4156218822Sdim	fi~
4157218822Sdim	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4158218822Sdim      else
4159218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4160218822Sdim      fi
4161218822Sdim      ;;
4162218822Sdim
4163218822Sdim    interix[[3-9]]*)
4164218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=no
4165218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4166218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4167218822Sdim      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4168218822Sdim      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4169218822Sdim      # Instead, shared libraries are loaded at an image base (0x10000000 by
4170218822Sdim      # default) and relocated if they conflict, which is a slow very memory
4171218822Sdim      # consuming and fragmenting process.  To avoid this, we pick a random,
4172218822Sdim      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4173218822Sdim      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4174218822Sdim      _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'
4175218822Sdim      _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'
4176218822Sdim      ;;
4177218822Sdim
4178218822Sdim    gnu* | linux* | tpf* | k*bsd*-gnu)
4179218822Sdim      tmp_diet=no
4180218822Sdim      if test "$host_os" = linux-dietlibc; then
4181218822Sdim	case $cc_basename in
4182218822Sdim	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4183218822Sdim	esac
4184218822Sdim      fi
4185218822Sdim      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4186218822Sdim	 && test "$tmp_diet" = no
4187218822Sdim      then
4188218822Sdim	tmp_addflag=
4189218822Sdim	case $cc_basename,$host_cpu in
4190218822Sdim        pgcc*)				# Portland Group C compiler
4191218822Sdim	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4192218822Sdim	  tmp_addflag=' $pic_flag'
4193218822Sdim	  ;;
4194218822Sdim	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4195218822Sdim	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4196218822Sdim	  tmp_addflag=' $pic_flag -Mnomain' ;;
4197218822Sdim	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4198218822Sdim	  tmp_addflag=' -i_dynamic' ;;
4199218822Sdim	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4200218822Sdim	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4201218822Sdim	ifc* | ifort*)			# Intel Fortran compiler
4202218822Sdim	  tmp_addflag=' -nofor_main' ;;
4203218822Sdim	esac
4204218822Sdim	case `$CC -V 2>&1 | sed 5q` in
4205218822Sdim	*Sun\ C*)			# Sun C 5.9
4206218822Sdim	  _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4207218822Sdim	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4208218822Sdim	  tmp_sharedflag='-G' ;;
4209218822Sdim	*Sun\ F*)			# Sun Fortran 8.3
4210218822Sdim	  tmp_sharedflag='-G' ;;
4211218822Sdim	*)
4212218822Sdim	  tmp_sharedflag='-shared' ;;
4213218822Sdim	esac
4214218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4215218822Sdim
4216218822Sdim        if test "x$supports_anon_versioning" = xyes; then
4217218822Sdim          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4218218822Sdim	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4219218822Sdim	    echo "local: *; };" >> $output_objdir/$libname.ver~
4220218822Sdim	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4221218822Sdim        fi
4222218822Sdim      else
4223218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
4224218822Sdim      fi
4225218822Sdim      ;;
4226218822Sdim
4227218822Sdim    netbsd*)
4228218822Sdim      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4229218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4230218822Sdim	wlarc=
4231218822Sdim      else
4232218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4233218822Sdim	_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'
4234218822Sdim      fi
4235218822Sdim      ;;
4236218822Sdim
4237218822Sdim    solaris*)
4238218822Sdim      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4239218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4240218822Sdim	cat <<_LT_EOF 1>&2
4241218822Sdim
4242218822Sdim*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4243218822Sdim*** create shared libraries on Solaris systems.  Therefore, libtool
4244218822Sdim*** is disabling shared libraries support.  We urge you to upgrade GNU
4245218822Sdim*** binutils to release 2.9.1 or newer.  Another option is to modify
4246218822Sdim*** your PATH or compiler configuration so that the native linker is
4247218822Sdim*** used, and then restart.
4248218822Sdim
4249218822Sdim_LT_EOF
4250218822Sdim      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4251218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4252218822Sdim	_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'
4253218822Sdim      else
4254218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4255218822Sdim      fi
4256218822Sdim      ;;
4257218822Sdim
4258218822Sdim    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4259218822Sdim      case `$LD -v 2>&1` in
4260218822Sdim        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4261218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4262218822Sdim	cat <<_LT_EOF 1>&2
4263218822Sdim
4264218822Sdim*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4265218822Sdim*** reliably create shared libraries on SCO systems.  Therefore, libtool
4266218822Sdim*** is disabling shared libraries support.  We urge you to upgrade GNU
4267218822Sdim*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4268218822Sdim*** your PATH or compiler configuration so that the native linker is
4269218822Sdim*** used, and then restart.
4270218822Sdim
4271218822Sdim_LT_EOF
4272218822Sdim	;;
4273218822Sdim	*)
4274218822Sdim	  # For security reasons, it is highly recommended that you always
4275218822Sdim	  # use absolute paths for naming shared libraries, and exclude the
4276218822Sdim	  # DT_RUNPATH tag from executables and libraries.  But doing so
4277218822Sdim	  # requires that you compile everything twice, which is a pain.
4278218822Sdim	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4279218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4280218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4281218822Sdim	    _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'
4282218822Sdim	  else
4283218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
4284218822Sdim	  fi
4285218822Sdim	;;
4286218822Sdim      esac
4287218822Sdim      ;;
4288218822Sdim
4289218822Sdim    sunos4*)
4290218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4291218822Sdim      wlarc=
4292218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4293218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4294218822Sdim      ;;
4295218822Sdim
4296218822Sdim    *)
4297218822Sdim      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4298218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4299218822Sdim	_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'
4300218822Sdim      else
4301218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
4302218822Sdim      fi
4303218822Sdim      ;;
4304218822Sdim    esac
4305218822Sdim
4306218822Sdim    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4307218822Sdim      runpath_var=
4308218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4309218822Sdim      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4310218822Sdim      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4311218822Sdim    fi
431285815Sobrien  else
4313218822Sdim    # PORTME fill in a description of your system's linker (not GNU ld)
4314218822Sdim    case $host_os in
4315218822Sdim    aix3*)
4316218822Sdim      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4317218822Sdim      _LT_TAGVAR(always_export_symbols, $1)=yes
4318218822Sdim      _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'
4319218822Sdim      # Note: this linker hardcodes the directories in LIBPATH if there
4320218822Sdim      # are no directories specified by -L.
4321218822Sdim      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4322218822Sdim      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4323218822Sdim	# Neither direct hardcoding nor static linking is supported with a
4324218822Sdim	# broken collect2.
4325218822Sdim	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4326218822Sdim      fi
4327218822Sdim      ;;
4328218822Sdim
4329218822Sdim    aix4* | aix5*)
4330218822Sdim      if test "$host_cpu" = ia64; then
4331218822Sdim	# On IA64, the linker does run time linking by default, so we don't
4332218822Sdim	# have to do anything special.
4333218822Sdim	aix_use_runtimelinking=no
4334218822Sdim	exp_sym_flag='-Bexport'
4335218822Sdim	no_entry_flag=""
4336218822Sdim      else
4337218822Sdim	# If we're using GNU nm, then we don't want the "-C" option.
4338218822Sdim	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4339218822Sdim	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4340218822Sdim	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4341218822Sdim	else
4342218822Sdim	  _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'
4343218822Sdim	fi
4344218822Sdim	aix_use_runtimelinking=no
4345218822Sdim
4346218822Sdim	# Test if we are trying to use run time linking or normal
4347218822Sdim	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4348218822Sdim	# need to do runtime linking.
4349218822Sdim	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4350218822Sdim	  for ld_flag in $LDFLAGS; do
4351218822Sdim	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4352218822Sdim	    aix_use_runtimelinking=yes
4353218822Sdim	    break
4354218822Sdim	  fi
4355218822Sdim	  done
4356218822Sdim	  ;;
4357218822Sdim	esac
4358218822Sdim
4359218822Sdim	exp_sym_flag='-bexport'
4360218822Sdim	no_entry_flag='-bnoentry'
4361218822Sdim      fi
4362218822Sdim
4363218822Sdim      # When large executables or shared objects are built, AIX ld can
4364218822Sdim      # have problems creating the table of contents.  If linking a library
4365218822Sdim      # or program results in "error TOC overflow" add -mminimal-toc to
4366218822Sdim      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4367218822Sdim      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4368218822Sdim
4369218822Sdim      _LT_TAGVAR(archive_cmds, $1)=''
4370218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4371218822Sdim      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4372218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4373218822Sdim      _LT_TAGVAR(link_all_deplibs, $1)=yes
4374218822Sdim      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4375218822Sdim
4376218822Sdim      if test "$GCC" = yes; then
4377218822Sdim	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4378218822Sdim	# We only want to do this on AIX 4.2 and lower, the check
4379218822Sdim	# below for broken collect2 doesn't work under 4.3+
4380218822Sdim	  collect2name=`${CC} -print-prog-name=collect2`
4381218822Sdim	  if test -f "$collect2name" &&
4382218822Sdim	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4383218822Sdim	  then
4384218822Sdim	  # We have reworked collect2
4385218822Sdim	  :
4386218822Sdim	  else
4387218822Sdim	  # We have old collect2
4388218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4389218822Sdim	  # It fails to find uninstalled libraries when the uninstalled
4390218822Sdim	  # path is not listed in the libpath.  Setting hardcode_minus_L
4391218822Sdim	  # to unsupported forces relinking
4392218822Sdim	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4393218822Sdim	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4394218822Sdim	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4395218822Sdim	  fi
4396218822Sdim	  ;;
4397218822Sdim	esac
4398218822Sdim	shared_flag='-shared'
4399218822Sdim	if test "$aix_use_runtimelinking" = yes; then
4400218822Sdim	  shared_flag="$shared_flag "'${wl}-G'
4401218822Sdim	fi
4402218822Sdim      else
4403218822Sdim	# not using gcc
4404218822Sdim	if test "$host_cpu" = ia64; then
4405218822Sdim	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4406218822Sdim	# chokes on -Wl,-G. The following line is correct:
4407218822Sdim	  shared_flag='-G'
4408218822Sdim	else
4409218822Sdim	  if test "$aix_use_runtimelinking" = yes; then
4410218822Sdim	    shared_flag='${wl}-G'
4411218822Sdim	  else
4412218822Sdim	    shared_flag='${wl}-bM:SRE'
4413218822Sdim	  fi
4414218822Sdim	fi
4415218822Sdim      fi
4416218822Sdim
4417218822Sdim      # It seems that -bexpall does not export symbols beginning with
4418218822Sdim      # underscore (_), so it is better to generate a list of symbols to export.
4419218822Sdim      _LT_TAGVAR(always_export_symbols, $1)=yes
4420218822Sdim      if test "$aix_use_runtimelinking" = yes; then
4421218822Sdim	# Warning - without using the other runtime loading flags (-brtl),
4422218822Sdim	# -berok will link without error, but may produce a broken library.
4423218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4424218822Sdim        # Determine the default libpath from the value encoded in an
4425218822Sdim        # empty executable.
4426218822Sdim        _LT_SYS_MODULE_PATH_AIX
4427218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4428218822Sdim        _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4429218822Sdim      else
4430218822Sdim	if test "$host_cpu" = ia64; then
4431218822Sdim	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4432218822Sdim	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4433218822Sdim	  _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"
4434218822Sdim	else
4435218822Sdim	 # Determine the default libpath from the value encoded in an
4436218822Sdim	 # empty executable.
4437218822Sdim	 _LT_SYS_MODULE_PATH_AIX
4438218822Sdim	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4439218822Sdim	  # Warning - without using the other run time loading flags,
4440218822Sdim	  # -berok will link without error, but may produce a broken library.
4441218822Sdim	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4442218822Sdim	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4443218822Sdim	  # Exported symbols can be pulled into shared objects from archives
4444218822Sdim	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4445218822Sdim	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4446218822Sdim	  # This is similar to how AIX traditionally builds its shared libraries.
4447218822Sdim	  _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'
4448218822Sdim	fi
4449218822Sdim      fi
4450218822Sdim      ;;
4451218822Sdim
4452218822Sdim    amigaos*)
4453218822Sdim      if test "$host_cpu" = m68k; then
4454218822Sdim        _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)'
4455218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4456218822Sdim        _LT_TAGVAR(hardcode_minus_L, $1)=yes
4457218822Sdim      fi
4458218822Sdim      # see comment about different semantics on the GNU ld section
4459218822Sdim      _LT_TAGVAR(ld_shlibs, $1)=no
4460218822Sdim      ;;
4461218822Sdim
4462218822Sdim    bsdi[[45]]*)
4463218822Sdim      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4464218822Sdim      ;;
4465218822Sdim
4466218822Sdim    cygwin* | mingw* | pw32*)
4467218822Sdim      # When not using gcc, we currently assume that we are using
4468218822Sdim      # Microsoft Visual C++.
4469218822Sdim      # hardcode_libdir_flag_spec is actually meaningless, as there is
4470218822Sdim      # no search path for DLLs.
4471218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4472218822Sdim      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4473218822Sdim      # Tell ltmain to make .lib files, not .a files.
4474218822Sdim      libext=lib
4475218822Sdim      # Tell ltmain to make .dll files, not .so files.
4476218822Sdim      shrext_cmds=".dll"
4477218822Sdim      # FIXME: Setting linknames here is a bad hack.
4478218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4479218822Sdim      # The linker will automatically build a .lib file if we build a DLL.
4480218822Sdim      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4481218822Sdim      # FIXME: Should let the user specify the lib program.
4482218822Sdim      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4483218822Sdim      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4484218822Sdim      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4485218822Sdim      ;;
4486218822Sdim
4487218822Sdim    darwin* | rhapsody*)
4488218822Sdim      case $host_os in
4489218822Sdim      rhapsody* | darwin1.[[012]])
4490218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4491218822Sdim	;;
4492218822Sdim      *) # Darwin 1.3 on
4493218822Sdim	case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
4494218822Sdim	10.[[012]])
4495218822Sdim	  _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4496218822Sdim	  ;;
4497218822Sdim	10.*)
4498218822Sdim	  _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4499218822Sdim	  ;;
4500218822Sdim	esac
4501218822Sdim	;;
4502218822Sdim      esac
4503218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4504218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=no
4505218822Sdim      _LT_TAGVAR(hardcode_automatic, $1)=yes
4506218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4507218822Sdim      _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4508218822Sdim      _LT_TAGVAR(link_all_deplibs, $1)=yes
4509218822Sdim      if test "$GCC" = yes ; then
4510218822Sdim	AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
4511218822Sdim	[lt_cv_apple_cc_single_mod=no
4512218822Sdim	if test -z "${LT_MULTI_MODULE}"; then
4513218822Sdim	  # By default we will add the -single_module flag. You can override
4514218822Sdim	  # by either setting the environment variable LT_MULTI_MODULE
4515218822Sdim	  # non-empty at configure time, or by adding -multi-module to the
4516218822Sdim	  # link flags.
4517218822Sdim	  echo "int foo(void){return 1;}" > conftest.c
4518218822Sdim	  $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4519218822Sdim	      -dynamiclib ${wl}-single_module conftest.c
4520218822Sdim	  if test -f libconftest.dylib; then
4521218822Sdim	      lt_cv_apple_cc_single_mod=yes
4522218822Sdim	      rm libconftest.dylib
4523218822Sdim	  fi
4524218822Sdim	  rm conftest.$ac_ext
4525218822Sdim	fi])
4526218822Sdim	output_verbose_link_cmd=echo
4527218822Sdim	if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
4528218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4529218822Sdim	  _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4530218822Sdim	else
4531218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4532218822Sdim	  _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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4533218822Sdim	fi
4534218822Sdim	_LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4535218822Sdim	_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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4536218822Sdim      else
4537218822Sdim	case $cc_basename in
4538218822Sdim	xlc*)
4539218822Sdim	  output_verbose_link_cmd=echo
4540218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
4541218822Sdim	  _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4542218822Sdim	  # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4543218822Sdim	  _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4544218822Sdim	  _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4545218822Sdim	  ;;
4546218822Sdim	*)
4547218822Sdim	  _LT_TAGVAR(ld_shlibs, $1)=no
4548218822Sdim	  ;;
4549218822Sdim	esac
4550218822Sdim      fi
4551218822Sdim      ;;
4552218822Sdim
4553218822Sdim    dgux*)
4554218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4555218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4556218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4557218822Sdim      ;;
4558218822Sdim
4559218822Sdim    freebsd1*)
4560218822Sdim      _LT_TAGVAR(ld_shlibs, $1)=no
4561218822Sdim      ;;
4562218822Sdim
4563218822Sdim    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4564218822Sdim    # support.  Future versions do this automatically, but an explicit c++rt0.o
4565218822Sdim    # does not break anything, and helps significantly (at the cost of a little
4566218822Sdim    # extra space).
4567218822Sdim    freebsd2.2*)
4568218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4569218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4570218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4571218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4572218822Sdim      ;;
4573218822Sdim
4574218822Sdim    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4575218822Sdim    freebsd2*)
4576218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4577218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4578218822Sdim      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4579218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4580218822Sdim      ;;
4581218822Sdim
4582218822Sdim    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4583218822Sdim    freebsd* | dragonfly*)
4584218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4585218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4586218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4587218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4588218822Sdim      ;;
4589218822Sdim
4590218822Sdim    hpux9*)
4591218822Sdim      if test "$GCC" = yes; then
4592218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4593218822Sdim      else
4594218822Sdim	_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'
4595218822Sdim      fi
4596218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4597218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4598218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4599218822Sdim
4600218822Sdim      # hardcode_minus_L: Not really in the search PATH,
4601218822Sdim      # but as the default location of the library.
4602218822Sdim      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4603218822Sdim      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4604218822Sdim      ;;
4605218822Sdim
4606218822Sdim    hpux10*)
4607218822Sdim      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4608218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4609218822Sdim      else
4610218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4611218822Sdim      fi
4612218822Sdim      if test "$with_gnu_ld" = no; then
4613218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4614218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4615218822Sdim	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4616218822Sdim	_LT_TAGVAR(hardcode_direct, $1)=yes
4617218822Sdim	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4618218822Sdim	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4619218822Sdim	# hardcode_minus_L: Not really in the search PATH,
4620218822Sdim	# but as the default location of the library.
4621218822Sdim	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4622218822Sdim      fi
4623218822Sdim      ;;
4624218822Sdim
4625218822Sdim    hpux11*)
4626218822Sdim      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4627218822Sdim	case $host_cpu in
4628218822Sdim	hppa*64*)
4629218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4630218822Sdim	  ;;
4631218822Sdim	ia64*)
4632218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4633218822Sdim	  ;;
4634218822Sdim	*)
4635218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4636218822Sdim	  ;;
4637218822Sdim	esac
4638218822Sdim      else
4639218822Sdim	case $host_cpu in
4640218822Sdim	hppa*64*)
4641218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4642218822Sdim	  ;;
4643218822Sdim	ia64*)
4644218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4645218822Sdim	  ;;
4646218822Sdim	*)
4647218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4648218822Sdim	  ;;
4649218822Sdim	esac
4650218822Sdim      fi
4651218822Sdim      if test "$with_gnu_ld" = no; then
4652218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4653218822Sdim	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4654218822Sdim
4655218822Sdim	case $host_cpu in
4656218822Sdim	hppa*64*|ia64*)
4657218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=no
4658218822Sdim	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4659218822Sdim	  ;;
4660218822Sdim	*)
4661218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=yes
4662218822Sdim	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4663218822Sdim	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4664218822Sdim
4665218822Sdim	  # hardcode_minus_L: Not really in the search PATH,
4666218822Sdim	  # but as the default location of the library.
4667218822Sdim	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4668218822Sdim	  ;;
4669218822Sdim	esac
4670218822Sdim      fi
4671218822Sdim      ;;
4672218822Sdim
4673218822Sdim    irix5* | irix6* | nonstopux*)
4674218822Sdim      if test "$GCC" = yes; then
4675218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4676218822Sdim	# Try to use the -exported_symbol ld option, if it does not
4677218822Sdim	# work, assume that -exports_file does not work either and
4678218822Sdim	# implicitly export all symbols.
4679218822Sdim        save_LDFLAGS="$LDFLAGS"
4680218822Sdim        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4681218822Sdim        AC_LINK_IFELSE(int foo(void) {},
4682218822Sdim          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4683218822Sdim        )
4684218822Sdim        LDFLAGS="$save_LDFLAGS"
4685218822Sdim      else
4686218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4687218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4688218822Sdim      fi
4689218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4690218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4691218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4692218822Sdim      _LT_TAGVAR(inherit_rpath, $1)=yes
4693218822Sdim      _LT_TAGVAR(link_all_deplibs, $1)=yes
4694218822Sdim      ;;
4695218822Sdim
4696218822Sdim    netbsd*)
4697218822Sdim      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4698218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4699218822Sdim      else
4700218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4701218822Sdim      fi
4702218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4703218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4704218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4705218822Sdim      ;;
4706218822Sdim
4707218822Sdim    newsos6)
4708218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4709218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4710218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4711218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4712218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4713218822Sdim      ;;
4714218822Sdim
4715218822Sdim    *nto* | *qnx*)
4716218822Sdim      ;;
4717218822Sdim
4718218822Sdim    openbsd*)
4719218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4720218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4721218822Sdim      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4722218822Sdim      if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4723218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4724218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4725218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4726218822Sdim	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4727218822Sdim      else
4728218822Sdim        case $host_os in
4729218822Sdim	openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4730218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4731218822Sdim	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4732218822Sdim	  ;;
4733218822Sdim	*)
4734218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4735218822Sdim	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4736218822Sdim	  ;;
4737218822Sdim        esac
4738218822Sdim      fi
4739218822Sdim      ;;
4740218822Sdim
4741218822Sdim    os2*)
4742218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4743218822Sdim      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4744218822Sdim      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4745218822Sdim      _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'
4746218822Sdim      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4747218822Sdim      ;;
4748218822Sdim
4749218822Sdim    osf3*)
4750218822Sdim      if test "$GCC" = yes; then
4751218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4752218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4753218822Sdim      else
4754218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4755218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4756218822Sdim      fi
4757218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4758218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4759218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4760218822Sdim      ;;
4761218822Sdim
4762218822Sdim    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4763218822Sdim      if test "$GCC" = yes; then
4764218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4765218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4766218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4767218822Sdim      else
4768218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4769218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4770218822Sdim	_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~
4771218822Sdim	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4772218822Sdim
4773218822Sdim	# Both c and cxx compiler support -rpath directly
4774218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4775218822Sdim      fi
4776218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4777218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4778218822Sdim      ;;
4779218822Sdim
4780218822Sdim    solaris*)
4781218822Sdim      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4782218822Sdim      if test "$GCC" = yes; then
4783218822Sdim	wlarc='${wl}'
4784218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4785218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4786218822Sdim	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4787218822Sdim      else
4788218822Sdim	case `$CC -V 2>&1` in
4789218822Sdim	*"Compilers 5.0"*)
4790218822Sdim	  wlarc=''
4791218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4792218822Sdim	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4793218822Sdim	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4794218822Sdim	  ;;
4795218822Sdim	*)
4796218822Sdim	  wlarc='${wl}'
4797218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4798218822Sdim	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4799218822Sdim	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4800218822Sdim	  ;;
4801218822Sdim	esac
4802218822Sdim      fi
4803218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4804218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4805218822Sdim      case $host_os in
4806218822Sdim      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4807218822Sdim      *)
4808218822Sdim	# The compiler driver will combine and reorder linker options,
4809218822Sdim	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4810218822Sdim	# but is careful enough not to reorder.
4811218822Sdim	# Supported since Solaris 2.6 (maybe 2.5.1?)
4812218822Sdim	if test "$GCC" = yes; then
4813218822Sdim	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4814218822Sdim	else
4815218822Sdim	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4816218822Sdim	fi
4817218822Sdim	;;
4818218822Sdim      esac
4819218822Sdim      _LT_TAGVAR(link_all_deplibs, $1)=yes
4820218822Sdim      ;;
4821218822Sdim
4822218822Sdim    sunos4*)
4823218822Sdim      if test "x$host_vendor" = xsequent; then
4824218822Sdim	# Use $CC to link under sequent, because it throws in some extra .o
4825218822Sdim	# files that make .init and .fini sections work.
4826218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4827218822Sdim      else
4828218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4829218822Sdim      fi
4830218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4831218822Sdim      _LT_TAGVAR(hardcode_direct, $1)=yes
4832218822Sdim      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4833218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4834218822Sdim      ;;
4835218822Sdim
4836218822Sdim    sysv4)
4837218822Sdim      case $host_vendor in
4838218822Sdim	sni)
4839218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4840218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4841218822Sdim	;;
4842218822Sdim	siemens)
4843218822Sdim	  ## LD is ld it makes a PLAMLIB
4844218822Sdim	  ## CC just makes a GrossModule.
4845218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4846218822Sdim	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4847218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=no
4848218822Sdim        ;;
4849218822Sdim	motorola)
4850218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4851218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4852218822Sdim	;;
4853218822Sdim      esac
4854218822Sdim      runpath_var='LD_RUN_PATH'
4855218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4856218822Sdim      ;;
4857218822Sdim
4858218822Sdim    sysv4.3*)
4859218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4860218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4861218822Sdim      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4862218822Sdim      ;;
4863218822Sdim
4864218822Sdim    sysv4*MP*)
4865218822Sdim      if test -d /usr/nec; then
4866218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4867218822Sdim	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4868218822Sdim	runpath_var=LD_RUN_PATH
4869218822Sdim	hardcode_runpath_var=yes
4870218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=yes
4871218822Sdim      fi
4872218822Sdim      ;;
4873218822Sdim
4874218822Sdim    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4875218822Sdim      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4876218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4877218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4878218822Sdim      runpath_var='LD_RUN_PATH'
4879218822Sdim
4880218822Sdim      if test "$GCC" = yes; then
4881218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4882218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4883218822Sdim      else
4884218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4885218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4886218822Sdim      fi
4887218822Sdim      ;;
4888218822Sdim
4889218822Sdim    sysv5* | sco3.2v5* | sco5v6*)
4890218822Sdim      # Note: We can NOT use -z defs as we might desire, because we do not
4891218822Sdim      # link with -lc, and that would cause any symbols used from libc to
4892218822Sdim      # always be unresolved, which means just about no library would
4893218822Sdim      # ever link correctly.  If we're not using GNU ld we use -z text
4894218822Sdim      # though, which does catch some bad symbols but isn't as heavy-handed
4895218822Sdim      # as -z defs.
4896218822Sdim      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4897218822Sdim      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4898218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4899218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4900218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
4901218822Sdim      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4902218822Sdim      _LT_TAGVAR(link_all_deplibs, $1)=yes
4903218822Sdim      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4904218822Sdim      runpath_var='LD_RUN_PATH'
4905218822Sdim
4906218822Sdim      if test "$GCC" = yes; then
4907218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4908218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4909218822Sdim      else
4910218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4911218822Sdim	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4912218822Sdim      fi
4913218822Sdim      ;;
4914218822Sdim
4915218822Sdim    uts4*)
4916218822Sdim      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4917218822Sdim      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4918218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4919218822Sdim      ;;
4920218822Sdim
4921218822Sdim    *)
4922218822Sdim      _LT_TAGVAR(ld_shlibs, $1)=no
4923218822Sdim      ;;
4924218822Sdim    esac
4925218822Sdim
4926218822Sdim    if test x$host_vendor = xsni; then
4927218822Sdim      case $host in
4928218822Sdim      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4929218822Sdim	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
4930218822Sdim	;;
4931218822Sdim      esac
4932218822Sdim    fi
493385815Sobrien  fi
493485815Sobrien])
4935218822SdimAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
4936218822Sdimtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
493785815Sobrien
4938218822Sdim_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
493985815Sobrien
4940218822Sdim_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4941218822Sdim_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4942218822Sdim_LT_DECL([], [extract_expsyms_cmds], [2],
4943218822Sdim    [The commands to extract the exported symbol list from a shared archive])
494489857Sobrien
4945218822Sdim#
4946218822Sdim# Do we need to explicitly link libc?
4947218822Sdim#
4948218822Sdimcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
4949218822Sdimx|xyes)
4950218822Sdim  # Assume -lc should be added
4951218822Sdim  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4952218822Sdim
4953218822Sdim  if test "$enable_shared" = yes && test "$GCC" = yes; then
4954218822Sdim    case $_LT_TAGVAR(archive_cmds, $1) in
4955218822Sdim    *'~'*)
4956218822Sdim      # FIXME: we may have to deal with multi-command sequences.
4957218822Sdim      ;;
4958218822Sdim    '$CC '*)
4959218822Sdim      # Test whether the compiler implicitly links with -lc since on some
4960218822Sdim      # systems, -lgcc has to come before -lc. If gcc already passes -lc
4961218822Sdim      # to ld, don't add -lc before -lgcc.
4962218822Sdim      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4963218822Sdim      $RM conftest*
4964218822Sdim      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4965218822Sdim
4966218822Sdim      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4967218822Sdim        soname=conftest
4968218822Sdim        lib=conftest
4969218822Sdim        libobjs=conftest.$ac_objext
4970218822Sdim        deplibs=
4971218822Sdim        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
4972218822Sdim	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
4973218822Sdim        compiler_flags=-v
4974218822Sdim        linker_flags=-v
4975218822Sdim        verstring=
4976218822Sdim        output_objdir=.
4977218822Sdim        libname=conftest
4978218822Sdim        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
4979218822Sdim        _LT_TAGVAR(allow_undefined_flag, $1)=
4980218822Sdim        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4981218822Sdim        then
4982218822Sdim	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4983218822Sdim        else
4984218822Sdim	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4985218822Sdim        fi
4986218822Sdim        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4987218822Sdim      else
4988218822Sdim        cat conftest.err 1>&5
4989218822Sdim      fi
4990218822Sdim      $RM conftest*
4991218822Sdim      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
4992218822Sdim      ;;
4993218822Sdim    esac
4994218822Sdim  fi
4995218822Sdim  ;;
4996218822Sdimesac
4997218822Sdim
4998218822Sdim_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4999218822Sdim    [Whether or not to add -lc for building shared libraries])
5000218822Sdim_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5001218822Sdim    [enable_shared_with_static_runtimes], [0],
5002218822Sdim    [Whether or not to disallow shared libs when runtime libs are static])
5003218822Sdim_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5004218822Sdim    [Compiler flag to allow reflexive dlopens])
5005218822Sdim_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5006218822Sdim    [Compiler flag to generate shared objects directly from archives])
5007218822Sdim_LT_TAGDECL([], [compiler_needs_object], [1],
5008218822Sdim    [Whether the compiler copes with passing no objects directly])
5009218822Sdim_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5010218822Sdim    [Create an old-style archive from a shared archive])
5011218822Sdim_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5012218822Sdim    [Create a temporary old-style archive to link instead of a shared archive])
5013218822Sdim_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5014218822Sdim_LT_TAGDECL([], [archive_expsym_cmds], [2])
5015218822Sdim_LT_TAGDECL([], [module_cmds], [2],
5016218822Sdim    [Commands used to build a loadable module if different from building
5017218822Sdim    a shared archive.])
5018218822Sdim_LT_TAGDECL([], [module_expsym_cmds], [2])
5019218822Sdim_LT_TAGDECL([], [with_gnu_ld], [1],
5020218822Sdim    [Whether we are building with GNU ld or not])
5021218822Sdim_LT_TAGDECL([], [allow_undefined_flag], [1],
5022218822Sdim    [Flag that allows shared libraries with undefined symbols to be built])
5023218822Sdim_LT_TAGDECL([], [no_undefined_flag], [1],
5024218822Sdim    [Flag that enforces no undefined symbols])
5025218822Sdim_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5026218822Sdim    [Flag to hardcode $libdir into a binary during linking.
5027218822Sdim    This must work even if $libdir does not exist])
5028218822Sdim_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5029218822Sdim    [[If ld is used when linking, flag to hardcode $libdir into a binary
5030218822Sdim    during linking.  This must work even if $libdir does not exist]])
5031218822Sdim_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5032218822Sdim    [Whether we need a single "-rpath" flag with a separated argument])
5033218822Sdim_LT_TAGDECL([], [hardcode_direct], [0],
5034218822Sdim    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5035218822Sdim    DIR into the resulting binary])
5036218822Sdim_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5037218822Sdim    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5038218822Sdim    DIR into the resulting binary and the resulting library dependency is
5039218822Sdim    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5040218822Sdim    library is relocated])
5041218822Sdim_LT_TAGDECL([], [hardcode_minus_L], [0],
5042218822Sdim    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5043218822Sdim    into the resulting binary])
5044218822Sdim_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5045218822Sdim    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5046218822Sdim    into the resulting binary])
5047218822Sdim_LT_TAGDECL([], [hardcode_automatic], [0],
5048218822Sdim    [Set to "yes" if building a shared library automatically hardcodes DIR
5049218822Sdim    into the library and all subsequent libraries and executables linked
5050218822Sdim    against it])
5051218822Sdim_LT_TAGDECL([], [inherit_rpath], [0],
5052218822Sdim    [Set to yes if linker adds runtime paths of dependent libraries
5053218822Sdim    to runtime path list])
5054218822Sdim_LT_TAGDECL([], [link_all_deplibs], [0],
5055218822Sdim    [Whether libtool must link a program against all its dependency libraries])
5056218822Sdim_LT_TAGDECL([], [fix_srcfile_path], [1],
5057218822Sdim    [Fix the shell variable $srcfile for the compiler])
5058218822Sdim_LT_TAGDECL([], [always_export_symbols], [0],
5059218822Sdim    [Set to "yes" if exported symbols are required])
5060218822Sdim_LT_TAGDECL([], [export_symbols_cmds], [2],
5061218822Sdim    [The commands to list exported symbols])
5062218822Sdim_LT_TAGDECL([], [exclude_expsyms], [1],
5063218822Sdim    [Symbols that should not be listed in the preloaded symbols])
5064218822Sdim_LT_TAGDECL([], [include_expsyms], [1],
5065218822Sdim    [Symbols that must always be exported])
5066218822Sdim_LT_TAGDECL([], [prelink_cmds], [2],
5067218822Sdim    [Commands necessary for linking programs (against libraries) with templates])
5068218822Sdim_LT_TAGDECL([], [file_list_spec], [1],
5069218822Sdim    [Specify filename containing input files])
5070218822Sdimdnl FIXME: Not yet implemented
5071218822Sdimdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5072218822Sdimdnl    [Compiler flag to generate thread safe objects])
5073218822Sdim])# _LT_LINKER_SHLIBS
5074218822Sdim
5075218822Sdim
5076218822Sdim# _LT_LANG_C_CONFIG([TAG])
5077218822Sdim# ------------------------
5078218822Sdim# Ensure that the configuration variables for a C compiler are suitably
5079218822Sdim# defined.  These variables are subsequently used by _LT_CONFIG to write
5080218822Sdim# the compiler configuration to `libtool'.
5081218822Sdimm4_defun([_LT_LANG_C_CONFIG],
5082218822Sdim[m4_require([_LT_DECL_EGREP])dnl
508385815Sobrienlt_save_CC="$CC"
5084218822SdimAC_LANG_PUSH(C)
5085218822Sdim
5086218822Sdim# Source file extension for C test sources.
5087218822Sdimac_ext=c
5088218822Sdim
5089218822Sdim# Object file extension for compiled C test sources.
5090218822Sdimobjext=o
5091218822Sdim_LT_TAGVAR(objext, $1)=$objext
5092218822Sdim
5093218822Sdim# Code to be used in simple compile tests
5094218822Sdimlt_simple_compile_test_code="int some_variable = 0;"
5095218822Sdim
5096218822Sdim# Code to be used in simple link tests
5097218822Sdimlt_simple_link_test_code='int main(){return(0);}'
5098218822Sdim
5099218822Sdim_LT_TAG_COMPILER
5100218822Sdim# Save the default compiler, since it gets overwritten when the other
5101218822Sdim# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5102218822Sdimcompiler_DEFAULT=$CC
5103218822Sdim
5104218822Sdim# save warnings/boilerplate of simple test code
5105218822Sdim_LT_COMPILER_BOILERPLATE
5106218822Sdim_LT_LINKER_BOILERPLATE
5107218822Sdim
5108218822Sdim## CAVEAT EMPTOR:
5109218822Sdim## There is no encapsulation within the following macros, do not change
5110218822Sdim## the running order or otherwise move them around unless you know exactly
5111218822Sdim## what you are doing...
5112218822Sdimif test -n "$compiler"; then
5113218822Sdim  _LT_COMPILER_NO_RTTI($1)
5114218822Sdim  _LT_COMPILER_PIC($1)
5115218822Sdim  _LT_COMPILER_C_O($1)
5116218822Sdim  _LT_COMPILER_FILE_LOCKS($1)
5117218822Sdim  _LT_LINKER_SHLIBS($1)
5118218822Sdim  _LT_SYS_DYNAMIC_LINKER($1)
5119218822Sdim  _LT_LINKER_HARDCODE_LIBPATH($1)
5120218822Sdim  LT_SYS_DLOPEN_SELF
5121218822Sdim  _LT_CMD_STRIPLIB
5122218822Sdim
5123218822Sdim  # Report which library types will actually be built
5124218822Sdim  AC_MSG_CHECKING([if libtool supports shared libraries])
5125218822Sdim  AC_MSG_RESULT([$can_build_shared])
5126218822Sdim
5127218822Sdim  AC_MSG_CHECKING([whether to build shared libraries])
5128218822Sdim  test "$can_build_shared" = "no" && enable_shared=no
5129218822Sdim
5130218822Sdim  # On AIX, shared libraries and static libraries use the same namespace, and
5131218822Sdim  # are all built from PIC.
5132218822Sdim  case $host_os in
5133218822Sdim  aix3*)
5134218822Sdim    test "$enable_shared" = yes && enable_static=no
5135218822Sdim    if test -n "$RANLIB"; then
5136218822Sdim      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5137218822Sdim      postinstall_cmds='$RANLIB $lib'
5138218822Sdim    fi
5139218822Sdim    ;;
5140218822Sdim
5141218822Sdim  aix4* | aix5*)
5142218822Sdim    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5143218822Sdim      test "$enable_shared" = yes && enable_static=no
5144218822Sdim    fi
5145218822Sdim    ;;
5146218822Sdim  esac
5147218822Sdim  AC_MSG_RESULT([$enable_shared])
5148218822Sdim
5149218822Sdim  AC_MSG_CHECKING([whether to build static libraries])
5150218822Sdim  # Make sure either enable_shared or enable_static is yes.
5151218822Sdim  test "$enable_shared" = yes || enable_static=yes
5152218822Sdim  AC_MSG_RESULT([$enable_static])
5153218822Sdim
5154218822Sdim  _LT_CONFIG($1)
5155218822Sdimfi
5156218822SdimAC_LANG_POP
515785815SobrienCC="$lt_save_CC"
5158218822Sdim])# _LT_LANG_C_CONFIG
515985815Sobrien
5160218822Sdim
5161218822Sdim# _LT_PROG_CXX
5162218822Sdim# ------------
5163218822Sdim# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5164218822Sdim# compiler, we have our own version here.
5165218822Sdimm4_defun([_LT_PROG_CXX],
5166218822Sdim[
5167218822Sdimpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5168218822SdimAC_PROG_CXX
5169218822Sdimif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5170218822Sdim    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5171218822Sdim    (test "X$CXX" != "Xg++"))) ; then
5172218822Sdim  AC_PROG_CXXCPP
5173218822Sdimelse
5174218822Sdim  _lt_caught_CXX_error=yes
5175218822Sdimfi
5176218822Sdimpopdef([AC_MSG_ERROR])
5177218822Sdim])# _LT_PROG_CXX
5178218822Sdim
5179218822Sdimdnl aclocal-1.4 backwards compatibility:
5180218822Sdimdnl AC_DEFUN([_LT_PROG_CXX], [])
5181218822Sdim
5182218822Sdim
5183218822Sdim# _LT_LANG_CXX_CONFIG([TAG])
5184218822Sdim# --------------------------
5185218822Sdim# Ensure that the configuration variables for a C++ compiler are suitably
5186218822Sdim# defined.  These variables are subsequently used by _LT_CONFIG to write
5187218822Sdim# the compiler configuration to `libtool'.
5188218822Sdimm4_defun([_LT_LANG_CXX_CONFIG],
5189218822Sdim[AC_REQUIRE([_LT_PROG_CXX])dnl
5190218822Sdimm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5191218822Sdimm4_require([_LT_DECL_EGREP])dnl
5192218822Sdim
5193218822SdimAC_LANG_PUSH(C++)
5194218822Sdim_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5195218822Sdim_LT_TAGVAR(allow_undefined_flag, $1)=
5196218822Sdim_LT_TAGVAR(always_export_symbols, $1)=no
5197218822Sdim_LT_TAGVAR(archive_expsym_cmds, $1)=
5198218822Sdim_LT_TAGVAR(compiler_needs_object, $1)=no
5199218822Sdim_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5200218822Sdim_LT_TAGVAR(hardcode_direct, $1)=no
5201218822Sdim_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5202218822Sdim_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5203218822Sdim_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5204218822Sdim_LT_TAGVAR(hardcode_libdir_separator, $1)=
5205218822Sdim_LT_TAGVAR(hardcode_minus_L, $1)=no
5206218822Sdim_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5207218822Sdim_LT_TAGVAR(hardcode_automatic, $1)=no
5208218822Sdim_LT_TAGVAR(inherit_rpath, $1)=no
5209218822Sdim_LT_TAGVAR(module_cmds, $1)=
5210218822Sdim_LT_TAGVAR(module_expsym_cmds, $1)=
5211218822Sdim_LT_TAGVAR(link_all_deplibs, $1)=unknown
5212218822Sdim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5213218822Sdim_LT_TAGVAR(no_undefined_flag, $1)=
5214218822Sdim_LT_TAGVAR(whole_archive_flag_spec, $1)=
5215218822Sdim_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5216218822Sdim
5217218822Sdim# Source file extension for C++ test sources.
5218218822Sdimac_ext=cpp
5219218822Sdim
5220218822Sdim# Object file extension for compiled C++ test sources.
5221218822Sdimobjext=o
5222218822Sdim_LT_TAGVAR(objext, $1)=$objext
5223218822Sdim
5224218822Sdim# No sense in running all these tests if we already determined that
5225218822Sdim# the CXX compiler isn't working.  Some variables (like enable_shared)
5226218822Sdim# are currently assumed to apply to all compilers on this platform,
5227218822Sdim# and will be corrupted by setting them based on a non-working compiler.
5228218822Sdimif test "$_lt_caught_CXX_error" != yes; then
5229218822Sdim  # Code to be used in simple compile tests
5230218822Sdim  lt_simple_compile_test_code="int some_variable = 0;"
5231218822Sdim
5232218822Sdim  # Code to be used in simple link tests
5233218822Sdim  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5234218822Sdim
5235218822Sdim  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5236218822Sdim  _LT_TAG_COMPILER
5237218822Sdim
5238218822Sdim  # save warnings/boilerplate of simple test code
5239218822Sdim  _LT_COMPILER_BOILERPLATE
5240218822Sdim  _LT_LINKER_BOILERPLATE
5241218822Sdim
5242218822Sdim  # Allow CC to be a program name with arguments.
5243218822Sdim  lt_save_CC=$CC
5244218822Sdim  lt_save_LD=$LD
5245218822Sdim  lt_save_GCC=$GCC
5246218822Sdim  GCC=$GXX
5247218822Sdim  lt_save_with_gnu_ld=$with_gnu_ld
5248218822Sdim  lt_save_path_LD=$lt_cv_path_LD
5249218822Sdim  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5250218822Sdim    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5251218822Sdim  else
5252218822Sdim    $as_unset lt_cv_prog_gnu_ld
5253218822Sdim  fi
5254218822Sdim  if test -n "${lt_cv_path_LDCXX+set}"; then
5255218822Sdim    lt_cv_path_LD=$lt_cv_path_LDCXX
5256218822Sdim  else
5257218822Sdim    $as_unset lt_cv_path_LD
5258218822Sdim  fi
5259218822Sdim  test -z "${LDCXX+set}" || LD=$LDCXX
5260218822Sdim  CC=${CXX-"c++"}
5261218822Sdim  compiler=$CC
5262218822Sdim  _LT_TAGVAR(compiler, $1)=$CC
5263218822Sdim  _LT_CC_BASENAME([$compiler])
5264218822Sdim
5265218822Sdim  if test -n "$compiler"; then
5266218822Sdim    # We don't want -fno-exception when compiling C++ code, so set the
5267218822Sdim    # no_builtin_flag separately
5268218822Sdim    if test "$GXX" = yes; then
5269218822Sdim      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5270218822Sdim    else
5271218822Sdim      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5272218822Sdim    fi
5273218822Sdim
5274218822Sdim    if test "$GXX" = yes; then
5275218822Sdim      # Set up default GNU C++ configuration
5276218822Sdim
5277218822Sdim      LT_PATH_LD
5278218822Sdim
5279218822Sdim      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5280218822Sdim      # archiving commands below assume that GNU ld is being used.
5281218822Sdim      if test "$with_gnu_ld" = yes; then
5282218822Sdim        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5283218822Sdim        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5284218822Sdim
5285218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5286218822Sdim        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5287218822Sdim
5288218822Sdim        # If archive_cmds runs LD, not CC, wlarc should be empty
5289218822Sdim        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5290218822Sdim        #     investigate it a little bit more. (MM)
5291218822Sdim        wlarc='${wl}'
5292218822Sdim
5293218822Sdim        # ancient GNU ld didn't support --whole-archive et. al.
5294218822Sdim        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5295218822Sdim	  $GREP 'no-whole-archive' > /dev/null; then
5296218822Sdim          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5297218822Sdim        else
5298218822Sdim          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5299218822Sdim        fi
5300218822Sdim      else
5301218822Sdim        with_gnu_ld=no
5302218822Sdim        wlarc=
5303218822Sdim
5304218822Sdim        # A generic and very simple default shared library creation
5305218822Sdim        # command for GNU C++ for the case where it uses the native
5306218822Sdim        # linker, instead of GNU ld.  If possible, this setting should
5307218822Sdim        # overridden to take advantage of the native linker features on
5308218822Sdim        # the platform it is being used on.
5309218822Sdim        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5310218822Sdim      fi
5311218822Sdim
5312218822Sdim      # Commands to make compiler produce verbose output that lists
5313218822Sdim      # what "hidden" libraries, object files and flags are used when
5314218822Sdim      # linking a shared library.
5315218822Sdim      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5316218822Sdim
5317218822Sdim    else
5318218822Sdim      GXX=no
5319218822Sdim      with_gnu_ld=no
5320218822Sdim      wlarc=
5321218822Sdim    fi
5322218822Sdim
5323218822Sdim    # PORTME: fill in a description of your system's C++ link characteristics
5324218822Sdim    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5325218822Sdim    _LT_TAGVAR(ld_shlibs, $1)=yes
5326218822Sdim    case $host_os in
5327218822Sdim      aix3*)
5328218822Sdim        # FIXME: insert proper C++ library support
5329218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
5330218822Sdim        ;;
5331218822Sdim      aix4* | aix5*)
5332218822Sdim        if test "$host_cpu" = ia64; then
5333218822Sdim          # On IA64, the linker does run time linking by default, so we don't
5334218822Sdim          # have to do anything special.
5335218822Sdim          aix_use_runtimelinking=no
5336218822Sdim          exp_sym_flag='-Bexport'
5337218822Sdim          no_entry_flag=""
5338218822Sdim        else
5339218822Sdim          aix_use_runtimelinking=no
5340218822Sdim
5341218822Sdim          # Test if we are trying to use run time linking or normal
5342218822Sdim          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5343218822Sdim          # need to do runtime linking.
5344218822Sdim          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5345218822Sdim	    for ld_flag in $LDFLAGS; do
5346218822Sdim	      case $ld_flag in
5347218822Sdim	      *-brtl*)
5348218822Sdim	        aix_use_runtimelinking=yes
5349218822Sdim	        break
5350218822Sdim	        ;;
5351218822Sdim	      esac
5352218822Sdim	    done
5353218822Sdim	    ;;
5354218822Sdim          esac
5355218822Sdim
5356218822Sdim          exp_sym_flag='-bexport'
5357218822Sdim          no_entry_flag='-bnoentry'
5358218822Sdim        fi
5359218822Sdim
5360218822Sdim        # When large executables or shared objects are built, AIX ld can
5361218822Sdim        # have problems creating the table of contents.  If linking a library
5362218822Sdim        # or program results in "error TOC overflow" add -mminimal-toc to
5363218822Sdim        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5364218822Sdim        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5365218822Sdim
5366218822Sdim        _LT_TAGVAR(archive_cmds, $1)=''
5367218822Sdim        _LT_TAGVAR(hardcode_direct, $1)=yes
5368218822Sdim        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5369218822Sdim        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5370218822Sdim        _LT_TAGVAR(link_all_deplibs, $1)=yes
5371218822Sdim        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5372218822Sdim
5373218822Sdim        if test "$GXX" = yes; then
5374218822Sdim          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5375218822Sdim          # We only want to do this on AIX 4.2 and lower, the check
5376218822Sdim          # below for broken collect2 doesn't work under 4.3+
5377218822Sdim	  collect2name=`${CC} -print-prog-name=collect2`
5378218822Sdim	  if test -f "$collect2name" &&
5379218822Sdim	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5380218822Sdim	  then
5381218822Sdim	    # We have reworked collect2
5382218822Sdim	    :
5383218822Sdim	  else
5384218822Sdim	    # We have old collect2
5385218822Sdim	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5386218822Sdim	    # It fails to find uninstalled libraries when the uninstalled
5387218822Sdim	    # path is not listed in the libpath.  Setting hardcode_minus_L
5388218822Sdim	    # to unsupported forces relinking
5389218822Sdim	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5390218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5391218822Sdim	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5392218822Sdim	  fi
5393218822Sdim          esac
5394218822Sdim          shared_flag='-shared'
5395218822Sdim	  if test "$aix_use_runtimelinking" = yes; then
5396218822Sdim	    shared_flag="$shared_flag "'${wl}-G'
5397218822Sdim	  fi
5398218822Sdim        else
5399218822Sdim          # not using gcc
5400218822Sdim          if test "$host_cpu" = ia64; then
5401218822Sdim	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5402218822Sdim	  # chokes on -Wl,-G. The following line is correct:
5403218822Sdim	  shared_flag='-G'
5404218822Sdim          else
5405218822Sdim	    if test "$aix_use_runtimelinking" = yes; then
5406218822Sdim	      shared_flag='${wl}-G'
5407218822Sdim	    else
5408218822Sdim	      shared_flag='${wl}-bM:SRE'
5409218822Sdim	    fi
5410218822Sdim          fi
5411218822Sdim        fi
5412218822Sdim
5413218822Sdim        # It seems that -bexpall does not export symbols beginning with
5414218822Sdim        # underscore (_), so it is better to generate a list of symbols to
5415218822Sdim	# export.
5416218822Sdim        _LT_TAGVAR(always_export_symbols, $1)=yes
5417218822Sdim        if test "$aix_use_runtimelinking" = yes; then
5418218822Sdim          # Warning - without using the other runtime loading flags (-brtl),
5419218822Sdim          # -berok will link without error, but may produce a broken library.
5420218822Sdim          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5421218822Sdim          # Determine the default libpath from the value encoded in an empty
5422218822Sdim          # executable.
5423218822Sdim          _LT_SYS_MODULE_PATH_AIX
5424218822Sdim          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5425218822Sdim
5426218822Sdim          _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5427218822Sdim        else
5428218822Sdim          if test "$host_cpu" = ia64; then
5429218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5430218822Sdim	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5431218822Sdim	    _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"
5432218822Sdim          else
5433218822Sdim	    # Determine the default libpath from the value encoded in an
5434218822Sdim	    # empty executable.
5435218822Sdim	    _LT_SYS_MODULE_PATH_AIX
5436218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5437218822Sdim	    # Warning - without using the other run time loading flags,
5438218822Sdim	    # -berok will link without error, but may produce a broken library.
5439218822Sdim	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5440218822Sdim	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5441218822Sdim	    # Exported symbols can be pulled into shared objects from archives
5442218822Sdim	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5443218822Sdim	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5444218822Sdim	    # This is similar to how AIX traditionally builds its shared
5445218822Sdim	    # libraries.
5446218822Sdim	    _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'
5447218822Sdim          fi
5448218822Sdim        fi
5449218822Sdim        ;;
5450218822Sdim
5451218822Sdim      beos*)
5452218822Sdim	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5453218822Sdim	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5454218822Sdim	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5455218822Sdim	  # support --undefined.  This deserves some investigation.  FIXME
5456218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5457218822Sdim	else
5458218822Sdim	  _LT_TAGVAR(ld_shlibs, $1)=no
5459218822Sdim	fi
5460218822Sdim	;;
5461218822Sdim
5462218822Sdim      chorus*)
5463218822Sdim        case $cc_basename in
5464218822Sdim          *)
5465218822Sdim	  # FIXME: insert proper C++ library support
5466218822Sdim	  _LT_TAGVAR(ld_shlibs, $1)=no
5467218822Sdim	  ;;
5468218822Sdim        esac
5469218822Sdim        ;;
5470218822Sdim
5471218822Sdim      cygwin* | mingw* | pw32*)
5472218822Sdim        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5473218822Sdim        # as there is no search path for DLLs.
5474218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5475218822Sdim        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5476218822Sdim        _LT_TAGVAR(always_export_symbols, $1)=no
5477218822Sdim        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5478218822Sdim
5479218822Sdim        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5480218822Sdim          _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'
5481218822Sdim          # If the export-symbols file already is a .def file (1st line
5482218822Sdim          # is EXPORTS), use it as is; otherwise, prepend...
5483218822Sdim          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5484218822Sdim	    cp $export_symbols $output_objdir/$soname.def;
5485218822Sdim          else
5486218822Sdim	    echo EXPORTS > $output_objdir/$soname.def;
5487218822Sdim	    cat $export_symbols >> $output_objdir/$soname.def;
5488218822Sdim          fi~
5489218822Sdim          $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'
5490218822Sdim        else
5491218822Sdim          _LT_TAGVAR(ld_shlibs, $1)=no
5492218822Sdim        fi
5493218822Sdim        ;;
5494218822Sdim      darwin* | rhapsody*)
5495218822Sdim	case $host_os in
5496218822Sdim	  rhapsody* | darwin1.[[012]])
5497218822Sdim	    _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5498218822Sdim	    ;;
5499218822Sdim	  *) # Darwin 1.3 on
5500218822Sdim	    case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
5501218822Sdim	      10.[[012]])
5502218822Sdim		_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5503218822Sdim		;;
5504218822Sdim	      10.*)
5505218822Sdim		_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5506218822Sdim		;;
5507218822Sdim	    esac
5508218822Sdim	    ;;
5509218822Sdim	esac
5510218822Sdim	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5511218822Sdim	_LT_TAGVAR(hardcode_direct, $1)=no
5512218822Sdim	_LT_TAGVAR(hardcode_automatic, $1)=yes
5513218822Sdim	_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5514218822Sdim	_LT_TAGVAR(whole_archive_flag_spec, $1)=''
5515218822Sdim	_LT_TAGVAR(link_all_deplibs, $1)=yes
5516218822Sdim
5517218822Sdim	if test "$GXX" = yes ; then
5518218822Sdim	  AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
5519218822Sdim	  [lt_cv_apple_cc_single_mod=no
5520218822Sdim	  if test -z "${LT_MULTI_MODULE}"; then
5521218822Sdim	    # By default we will add the -single_module flag. You can override
5522218822Sdim	    # by either setting the environment variable LT_MULTI_MODULE
5523218822Sdim	    # non-empty at configure time, or by adding -multi-module to the
5524218822Sdim	    # link flags.
5525218822Sdim	    echo "int foo(void){return 1;}" > conftest.c
5526218822Sdim	    $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
5527218822Sdim		-dynamiclib ${wl}-single_module conftest.c
5528218822Sdim	    if test -f libconftest.dylib; then
5529218822Sdim		lt_cv_apple_cc_single_mod=yes
5530218822Sdim		rm libconftest.dylib
5531218822Sdim	    fi
5532218822Sdim	    rm conftest.$ac_ext
5533218822Sdim	  fi])
5534218822Sdim	  output_verbose_link_cmd=echo
5535218822Sdim	  if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
5536218822Sdim	   _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5537218822Sdim	    _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5538218822Sdim	  else
5539218822Sdim	    _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'
5540218822Sdim	    _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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5541218822Sdim	  fi
5542218822Sdim	  _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5543218822Sdim	  _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5544218822Sdim	else
5545218822Sdim	  case $cc_basename in
5546218822Sdim	    xlc*)
5547218822Sdim	      output_verbose_link_cmd=echo
5548218822Sdim	      _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
5549218822Sdim	      _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5550218822Sdim	      # Don't fix this by using the ld -exported_symbols_list flag,
5551218822Sdim	      # it doesn't exist in older darwin lds
5552218822Sdim	      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5553218822Sdim	      _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5554218822Sdim	      ;;
5555218822Sdim	    *)
5556218822Sdim	      _LT_TAGVAR(ld_shlibs, $1)=no
5557218822Sdim	      ;;
5558218822Sdim	  esac
5559218822Sdim	fi
5560218822Sdim	;;
5561218822Sdim
5562218822Sdim      dgux*)
5563218822Sdim        case $cc_basename in
5564218822Sdim          ec++*)
5565218822Sdim	    # FIXME: insert proper C++ library support
5566218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5567218822Sdim	    ;;
5568218822Sdim          ghcx*)
5569218822Sdim	    # Green Hills C++ Compiler
5570218822Sdim	    # FIXME: insert proper C++ library support
5571218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5572218822Sdim	    ;;
5573218822Sdim          *)
5574218822Sdim	    # FIXME: insert proper C++ library support
5575218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5576218822Sdim	    ;;
5577218822Sdim        esac
5578218822Sdim        ;;
5579218822Sdim
5580218822Sdim      freebsd[[12]]*)
5581218822Sdim        # C++ shared libraries reported to be fairly broken before
5582218822Sdim	# switch to ELF
5583218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
5584218822Sdim        ;;
5585218822Sdim
5586218822Sdim      freebsd-elf*)
5587218822Sdim        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5588218822Sdim        ;;
5589218822Sdim
5590218822Sdim      freebsd* | dragonfly*)
5591218822Sdim        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5592218822Sdim        # conventions
5593218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=yes
5594218822Sdim        ;;
5595218822Sdim
5596218822Sdim      gnu*)
5597218822Sdim        ;;
5598218822Sdim
5599218822Sdim      hpux9*)
5600218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5601218822Sdim        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5602218822Sdim        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5603218822Sdim        _LT_TAGVAR(hardcode_direct, $1)=yes
5604218822Sdim        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5605218822Sdim				             # but as the default
5606218822Sdim				             # location of the library.
5607218822Sdim
5608218822Sdim        case $cc_basename in
5609218822Sdim          CC*)
5610218822Sdim            # FIXME: insert proper C++ library support
5611218822Sdim            _LT_TAGVAR(ld_shlibs, $1)=no
5612218822Sdim            ;;
5613218822Sdim          aCC*)
5614218822Sdim            _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'
5615218822Sdim            # Commands to make compiler produce verbose output that lists
5616218822Sdim            # what "hidden" libraries, object files and flags are used when
5617218822Sdim            # linking a shared library.
5618218822Sdim            #
5619218822Sdim            # There doesn't appear to be a way to prevent this compiler from
5620218822Sdim            # explicitly linking system object files so we need to strip them
5621218822Sdim            # from the output so that they don't get included in the library
5622218822Sdim            # dependencies.
5623218822Sdim            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; $ECHO "X$list" | $Xsed'
5624218822Sdim            ;;
5625218822Sdim          *)
5626218822Sdim            if test "$GXX" = yes; then
5627218822Sdim              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
5628218822Sdim            else
5629218822Sdim              # FIXME: insert proper C++ library support
5630218822Sdim              _LT_TAGVAR(ld_shlibs, $1)=no
5631218822Sdim            fi
5632218822Sdim            ;;
5633218822Sdim        esac
5634218822Sdim        ;;
5635218822Sdim
5636218822Sdim      hpux10*|hpux11*)
5637218822Sdim        if test $with_gnu_ld = no; then
5638218822Sdim	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5639218822Sdim	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5640218822Sdim
5641218822Sdim          case $host_cpu in
5642218822Sdim            hppa*64*|ia64*)
5643218822Sdim              ;;
5644218822Sdim            *)
5645218822Sdim	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5646218822Sdim              ;;
5647218822Sdim          esac
5648218822Sdim        fi
5649218822Sdim        case $host_cpu in
5650218822Sdim          hppa*64*|ia64*)
5651218822Sdim            _LT_TAGVAR(hardcode_direct, $1)=no
5652218822Sdim            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5653218822Sdim            ;;
5654218822Sdim          *)
5655218822Sdim            _LT_TAGVAR(hardcode_direct, $1)=yes
5656218822Sdim            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5657218822Sdim            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5658218822Sdim					         # but as the default
5659218822Sdim					         # location of the library.
5660218822Sdim            ;;
5661218822Sdim        esac
5662218822Sdim
5663218822Sdim        case $cc_basename in
5664218822Sdim          CC*)
5665218822Sdim	    # FIXME: insert proper C++ library support
5666218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5667218822Sdim	    ;;
5668218822Sdim          aCC*)
5669218822Sdim	    case $host_cpu in
5670218822Sdim	      hppa*64*)
5671218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5672218822Sdim	        ;;
5673218822Sdim	      ia64*)
5674218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5675218822Sdim	        ;;
5676218822Sdim	      *)
5677218822Sdim	        _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'
5678218822Sdim	        ;;
5679218822Sdim	    esac
5680218822Sdim	    # Commands to make compiler produce verbose output that lists
5681218822Sdim	    # what "hidden" libraries, object files and flags are used when
5682218822Sdim	    # linking a shared library.
5683218822Sdim	    #
5684218822Sdim	    # There doesn't appear to be a way to prevent this compiler from
5685218822Sdim	    # explicitly linking system object files so we need to strip them
5686218822Sdim	    # from the output so that they don't get included in the library
5687218822Sdim	    # dependencies.
5688218822Sdim	    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; $ECHO "X$list" | $Xsed'
5689218822Sdim	    ;;
5690218822Sdim          *)
5691218822Sdim	    if test "$GXX" = yes; then
5692218822Sdim	      if test $with_gnu_ld = no; then
5693218822Sdim	        case $host_cpu in
5694218822Sdim	          hppa*64*)
5695218822Sdim	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5696218822Sdim	            ;;
5697218822Sdim	          ia64*)
5698218822Sdim	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5699218822Sdim	            ;;
5700218822Sdim	          *)
5701218822Sdim	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5702218822Sdim	            ;;
5703218822Sdim	        esac
5704218822Sdim	      fi
5705218822Sdim	    else
5706218822Sdim	      # FIXME: insert proper C++ library support
5707218822Sdim	      _LT_TAGVAR(ld_shlibs, $1)=no
5708218822Sdim	    fi
5709218822Sdim	    ;;
5710218822Sdim        esac
5711218822Sdim        ;;
5712218822Sdim
5713218822Sdim      interix[[3-9]]*)
5714218822Sdim	_LT_TAGVAR(hardcode_direct, $1)=no
5715218822Sdim	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5716218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5717218822Sdim	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5718218822Sdim	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5719218822Sdim	# Instead, shared libraries are loaded at an image base (0x10000000 by
5720218822Sdim	# default) and relocated if they conflict, which is a slow very memory
5721218822Sdim	# consuming and fragmenting process.  To avoid this, we pick a random,
5722218822Sdim	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5723218822Sdim	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5724218822Sdim	_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'
5725218822Sdim	_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'
5726218822Sdim	;;
5727218822Sdim      irix5* | irix6*)
5728218822Sdim        case $cc_basename in
5729218822Sdim          CC*)
5730218822Sdim	    # SGI C++
5731218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5732218822Sdim
5733218822Sdim	    # Archives containing C++ object files must be created using
5734218822Sdim	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5735218822Sdim	    # necessary to make sure instantiated templates are included
5736218822Sdim	    # in the archive.
5737218822Sdim	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5738218822Sdim	    ;;
5739218822Sdim          *)
5740218822Sdim	    if test "$GXX" = yes; then
5741218822Sdim	      if test "$with_gnu_ld" = no; then
5742218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5743218822Sdim	      else
5744218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5745218822Sdim	      fi
5746218822Sdim	    fi
5747218822Sdim	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5748218822Sdim	    ;;
5749218822Sdim        esac
5750218822Sdim        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5751218822Sdim        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5752218822Sdim        _LT_TAGVAR(inherit_rpath, $1)=yes
5753218822Sdim        ;;
5754218822Sdim
5755218822Sdim      linux* | k*bsd*-gnu)
5756218822Sdim        case $cc_basename in
5757218822Sdim          KCC*)
5758218822Sdim	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5759218822Sdim
5760218822Sdim	    # KCC will only create a shared library if the output file
5761218822Sdim	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5762218822Sdim	    # to its proper name (with version) after linking.
5763218822Sdim	    _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'
5764218822Sdim	    _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'
5765218822Sdim	    # Commands to make compiler produce verbose output that lists
5766218822Sdim	    # what "hidden" libraries, object files and flags are used when
5767218822Sdim	    # linking a shared library.
5768218822Sdim	    #
5769218822Sdim	    # There doesn't appear to be a way to prevent this compiler from
5770218822Sdim	    # explicitly linking system object files so we need to strip them
5771218822Sdim	    # from the output so that they don't get included in the library
5772218822Sdim	    # dependencies.
5773218822Sdim	    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; $ECHO "X$list" | $Xsed'
5774218822Sdim
5775218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5776218822Sdim	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5777218822Sdim
5778218822Sdim	    # Archives containing C++ object files must be created using
5779218822Sdim	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5780218822Sdim	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5781218822Sdim	    ;;
5782218822Sdim	  icpc* | ecpc* )
5783218822Sdim	    # Intel C++
5784218822Sdim	    with_gnu_ld=yes
5785218822Sdim	    # version 8.0 and above of icpc choke on multiply defined symbols
5786218822Sdim	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5787218822Sdim	    # earlier do not add the objects themselves.
5788218822Sdim	    case `$CC -V 2>&1` in
5789218822Sdim	      *"Version 7."*)
5790218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5791218822Sdim		_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'
5792218822Sdim		;;
5793218822Sdim	      *)  # Version 8.0 or newer
5794218822Sdim	        tmp_idyn=
5795218822Sdim	        case $host_cpu in
5796218822Sdim		  ia64*) tmp_idyn=' -i_dynamic';;
5797218822Sdim		esac
5798218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5799218822Sdim		_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'
5800218822Sdim		;;
5801218822Sdim	    esac
5802218822Sdim	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5803218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5804218822Sdim	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5805218822Sdim	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5806218822Sdim	    ;;
5807218822Sdim          pgCC*)
5808218822Sdim            # Portland Group C++ compiler
5809218822Sdim	    case `$CC -V` in
5810218822Sdim	    *pgCC\ [[1-5]]*)
5811218822Sdim	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5812218822Sdim		rm -rf $tpldir~
5813218822Sdim		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5814218822Sdim		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5815218822Sdim	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5816218822Sdim		rm -rf $tpldir~
5817218822Sdim		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5818218822Sdim		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5819218822Sdim		$RANLIB $oldlib'
5820218822Sdim	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5821218822Sdim		rm -rf $tpldir~
5822218822Sdim		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5823218822Sdim		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5824218822Sdim	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5825218822Sdim		rm -rf $tpldir~
5826218822Sdim		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5827218822Sdim		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5828218822Sdim	      ;;
5829218822Sdim	    *) # Version 6 will use weak symbols
5830218822Sdim	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5831218822Sdim	      _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'
5832218822Sdim	      ;;
5833218822Sdim	    esac
5834218822Sdim
5835218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5836218822Sdim	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5837218822Sdim	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5838218822Sdim            ;;
5839218822Sdim	  cxx*)
5840218822Sdim	    # Compaq C++
5841218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5842218822Sdim	    _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'
5843218822Sdim
5844218822Sdim	    runpath_var=LD_RUN_PATH
5845218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5846218822Sdim	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5847218822Sdim
5848218822Sdim	    # Commands to make compiler produce verbose output that lists
5849218822Sdim	    # what "hidden" libraries, object files and flags are used when
5850218822Sdim	    # linking a shared library.
5851218822Sdim	    #
5852218822Sdim	    # There doesn't appear to be a way to prevent this compiler from
5853218822Sdim	    # explicitly linking system object files so we need to strip them
5854218822Sdim	    # from the output so that they don't get included in the library
5855218822Sdim	    # dependencies.
5856218822Sdim	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5857218822Sdim	    ;;
5858218822Sdim	  *)
5859218822Sdim	    case `$CC -V 2>&1 | sed 5q` in
5860218822Sdim	    *Sun\ C*)
5861218822Sdim	      # Sun C++ 5.9
5862218822Sdim	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5863218822Sdim	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5864218822Sdim	      _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'
5865218822Sdim	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5866218822Sdim	      _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5867218822Sdim	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5868218822Sdim
5869218822Sdim	      # Not sure whether something based on
5870218822Sdim	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5871218822Sdim	      # would be better.
5872218822Sdim	      output_verbose_link_cmd='echo'
5873218822Sdim
5874218822Sdim	      # Archives containing C++ object files must be created using
5875218822Sdim	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5876218822Sdim	      # necessary to make sure instantiated templates are included
5877218822Sdim	      # in the archive.
5878218822Sdim	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5879218822Sdim	      ;;
5880218822Sdim	    esac
5881218822Sdim	    ;;
5882218822Sdim	esac
5883218822Sdim	;;
5884218822Sdim
5885218822Sdim      lynxos*)
5886218822Sdim        # FIXME: insert proper C++ library support
5887218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
5888218822Sdim	;;
5889218822Sdim
5890218822Sdim      m88k*)
5891218822Sdim        # FIXME: insert proper C++ library support
5892218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
5893218822Sdim	;;
5894218822Sdim
5895218822Sdim      mvs*)
5896218822Sdim        case $cc_basename in
5897218822Sdim          cxx*)
5898218822Sdim	    # FIXME: insert proper C++ library support
5899218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5900218822Sdim	    ;;
5901218822Sdim	  *)
5902218822Sdim	    # FIXME: insert proper C++ library support
5903218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5904218822Sdim	    ;;
5905218822Sdim	esac
5906218822Sdim	;;
5907218822Sdim
5908218822Sdim      netbsd*)
5909218822Sdim        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5910218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5911218822Sdim	  wlarc=
5912218822Sdim	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5913218822Sdim	  _LT_TAGVAR(hardcode_direct, $1)=yes
5914218822Sdim	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5915218822Sdim	fi
5916218822Sdim	# Workaround some broken pre-1.5 toolchains
5917218822Sdim	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5918218822Sdim	;;
5919218822Sdim
5920218822Sdim      *nto* | *qnx*)
5921218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=yes
5922218822Sdim	;;
5923218822Sdim
5924218822Sdim      openbsd2*)
5925218822Sdim        # C++ shared libraries are fairly broken
5926218822Sdim	_LT_TAGVAR(ld_shlibs, $1)=no
5927218822Sdim	;;
5928218822Sdim
5929218822Sdim      openbsd*)
5930218822Sdim	_LT_TAGVAR(hardcode_direct, $1)=yes
5931218822Sdim	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5932218822Sdim	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5933218822Sdim	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5934218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5935218822Sdim	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5936218822Sdim	  _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'
5937218822Sdim	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5938218822Sdim	  _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5939218822Sdim	fi
5940218822Sdim	output_verbose_link_cmd=echo
5941218822Sdim	;;
5942218822Sdim
5943218822Sdim      osf3* | osf4* | osf5*)
5944218822Sdim        case $cc_basename in
5945218822Sdim          KCC*)
5946218822Sdim	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5947218822Sdim
5948218822Sdim	    # KCC will only create a shared library if the output file
5949218822Sdim	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5950218822Sdim	    # to its proper name (with version) after linking.
5951218822Sdim	    _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'
5952218822Sdim
5953218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5954218822Sdim	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5955218822Sdim
5956218822Sdim	    # Archives containing C++ object files must be created using
5957218822Sdim	    # the KAI C++ compiler.
5958218822Sdim	    case $host in
5959218822Sdim	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
5960218822Sdim	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
5961218822Sdim	    esac
5962218822Sdim	    ;;
5963218822Sdim          RCC*)
5964218822Sdim	    # Rational C++ 2.4.1
5965218822Sdim	    # FIXME: insert proper C++ library support
5966218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
5967218822Sdim	    ;;
5968218822Sdim          cxx*)
5969218822Sdim	    case $host in
5970218822Sdim	      osf3*)
5971218822Sdim	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5972218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5973218822Sdim	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5974218822Sdim		;;
5975218822Sdim	      *)
5976218822Sdim	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5977218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5978218822Sdim	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5979218822Sdim	          echo "-hidden">> $lib.exp~
5980218822Sdim	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
5981218822Sdim	          $RM $lib.exp'
5982218822Sdim	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5983218822Sdim		;;
5984218822Sdim	    esac
5985218822Sdim
5986218822Sdim	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5987218822Sdim
5988218822Sdim	    # Commands to make compiler produce verbose output that lists
5989218822Sdim	    # what "hidden" libraries, object files and flags are used when
5990218822Sdim	    # linking a shared library.
5991218822Sdim	    #
5992218822Sdim	    # There doesn't appear to be a way to prevent this compiler from
5993218822Sdim	    # explicitly linking system object files so we need to strip them
5994218822Sdim	    # from the output so that they don't get included in the library
5995218822Sdim	    # dependencies.
5996218822Sdim	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5997218822Sdim	    ;;
5998218822Sdim	  *)
5999218822Sdim	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6000218822Sdim	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6001218822Sdim	      case $host in
6002218822Sdim	        osf3*)
6003218822Sdim	          _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6004218822Sdim		  ;;
6005218822Sdim	        *)
6006218822Sdim	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6007218822Sdim		  ;;
6008218822Sdim	      esac
6009218822Sdim
6010218822Sdim	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6011218822Sdim	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6012218822Sdim
6013218822Sdim	      # Commands to make compiler produce verbose output that lists
6014218822Sdim	      # what "hidden" libraries, object files and flags are used when
6015218822Sdim	      # linking a shared library.
6016218822Sdim	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6017218822Sdim
6018218822Sdim	    else
6019218822Sdim	      # FIXME: insert proper C++ library support
6020218822Sdim	      _LT_TAGVAR(ld_shlibs, $1)=no
6021218822Sdim	    fi
6022218822Sdim	    ;;
6023218822Sdim        esac
6024218822Sdim        ;;
6025218822Sdim
6026218822Sdim      psos*)
6027218822Sdim        # FIXME: insert proper C++ library support
6028218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
6029218822Sdim        ;;
6030218822Sdim
6031218822Sdim      sunos4*)
6032218822Sdim        case $cc_basename in
6033218822Sdim          CC*)
6034218822Sdim	    # Sun C++ 4.x
6035218822Sdim	    # FIXME: insert proper C++ library support
6036218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
6037218822Sdim	    ;;
6038218822Sdim          lcc*)
6039218822Sdim	    # Lucid
6040218822Sdim	    # FIXME: insert proper C++ library support
6041218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
6042218822Sdim	    ;;
6043218822Sdim          *)
6044218822Sdim	    # FIXME: insert proper C++ library support
6045218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
6046218822Sdim	    ;;
6047218822Sdim        esac
6048218822Sdim        ;;
6049218822Sdim
6050218822Sdim      solaris*)
6051218822Sdim        case $cc_basename in
6052218822Sdim          CC*)
6053218822Sdim	    # Sun C++ 4.2, 5.x and Centerline C++
6054218822Sdim            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6055218822Sdim	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6056218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6057218822Sdim	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6058218822Sdim	      $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'
6059218822Sdim
6060218822Sdim	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6061218822Sdim	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6062218822Sdim	    case $host_os in
6063218822Sdim	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6064218822Sdim	      *)
6065218822Sdim		# The compiler driver will combine and reorder linker options,
6066218822Sdim		# but understands `-z linker_flag'.
6067218822Sdim	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6068218822Sdim		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6069218822Sdim	        ;;
6070218822Sdim	    esac
6071218822Sdim	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6072218822Sdim
6073218822Sdim	    output_verbose_link_cmd='echo'
6074218822Sdim
6075218822Sdim	    # Archives containing C++ object files must be created using
6076218822Sdim	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6077218822Sdim	    # necessary to make sure instantiated templates are included
6078218822Sdim	    # in the archive.
6079218822Sdim	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6080218822Sdim	    ;;
6081218822Sdim          gcx*)
6082218822Sdim	    # Green Hills C++ Compiler
6083218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6084218822Sdim
6085218822Sdim	    # The C++ compiler must be used to create the archive.
6086218822Sdim	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6087218822Sdim	    ;;
6088218822Sdim          *)
6089218822Sdim	    # GNU C++ compiler with Solaris linker
6090218822Sdim	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6091218822Sdim	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6092218822Sdim	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6093218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6094218822Sdim	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6095218822Sdim		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6096218822Sdim
6097218822Sdim	        # Commands to make compiler produce verbose output that lists
6098218822Sdim	        # what "hidden" libraries, object files and flags are used when
6099218822Sdim	        # linking a shared library.
6100218822Sdim	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6101218822Sdim	      else
6102218822Sdim	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6103218822Sdim	        # platform.
6104218822Sdim	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6105218822Sdim	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6106218822Sdim		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6107218822Sdim
6108218822Sdim	        # Commands to make compiler produce verbose output that lists
6109218822Sdim	        # what "hidden" libraries, object files and flags are used when
6110218822Sdim	        # linking a shared library.
6111218822Sdim	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6112218822Sdim	      fi
6113218822Sdim
6114218822Sdim	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6115218822Sdim	      case $host_os in
6116218822Sdim		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6117218822Sdim		*)
6118218822Sdim		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6119218822Sdim		  ;;
6120218822Sdim	      esac
6121218822Sdim	    fi
6122218822Sdim	    ;;
6123218822Sdim        esac
6124218822Sdim        ;;
6125218822Sdim
6126218822Sdim    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6127218822Sdim      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6128218822Sdim      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6129218822Sdim      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6130218822Sdim      runpath_var='LD_RUN_PATH'
6131218822Sdim
6132218822Sdim      case $cc_basename in
6133218822Sdim        CC*)
6134218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6135218822Sdim	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6136218822Sdim	  ;;
6137218822Sdim	*)
6138218822Sdim	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6139218822Sdim	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6140218822Sdim	  ;;
6141218822Sdim      esac
6142218822Sdim      ;;
6143218822Sdim
6144218822Sdim      sysv5* | sco3.2v5* | sco5v6*)
6145218822Sdim	# Note: We can NOT use -z defs as we might desire, because we do not
6146218822Sdim	# link with -lc, and that would cause any symbols used from libc to
6147218822Sdim	# always be unresolved, which means just about no library would
6148218822Sdim	# ever link correctly.  If we're not using GNU ld we use -z text
6149218822Sdim	# though, which does catch some bad symbols but isn't as heavy-handed
6150218822Sdim	# as -z defs.
6151218822Sdim	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6152218822Sdim	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6153218822Sdim	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6154218822Sdim	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6155218822Sdim	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6156218822Sdim	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6157218822Sdim	_LT_TAGVAR(link_all_deplibs, $1)=yes
6158218822Sdim	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6159218822Sdim	runpath_var='LD_RUN_PATH'
6160218822Sdim
6161218822Sdim	case $cc_basename in
6162218822Sdim          CC*)
6163218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6164218822Sdim	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6165218822Sdim	    ;;
6166218822Sdim	  *)
6167218822Sdim	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6168218822Sdim	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6169218822Sdim	    ;;
6170218822Sdim	esac
6171218822Sdim      ;;
6172218822Sdim
6173218822Sdim      tandem*)
6174218822Sdim        case $cc_basename in
6175218822Sdim          NCC*)
6176218822Sdim	    # NonStop-UX NCC 3.20
6177218822Sdim	    # FIXME: insert proper C++ library support
6178218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
6179218822Sdim	    ;;
6180218822Sdim          *)
6181218822Sdim	    # FIXME: insert proper C++ library support
6182218822Sdim	    _LT_TAGVAR(ld_shlibs, $1)=no
6183218822Sdim	    ;;
6184218822Sdim        esac
6185218822Sdim        ;;
6186218822Sdim
6187218822Sdim      vxworks*)
6188218822Sdim        # FIXME: insert proper C++ library support
6189218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
6190218822Sdim        ;;
6191218822Sdim
6192218822Sdim      *)
6193218822Sdim        # FIXME: insert proper C++ library support
6194218822Sdim        _LT_TAGVAR(ld_shlibs, $1)=no
6195218822Sdim        ;;
6196218822Sdim    esac
6197218822Sdim
6198218822Sdim    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6199218822Sdim    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6200218822Sdim
6201218822Sdim    _LT_TAGVAR(GCC, $1)="$GXX"
6202218822Sdim    _LT_TAGVAR(LD, $1)="$LD"
6203218822Sdim
6204218822Sdim    ## CAVEAT EMPTOR:
6205218822Sdim    ## There is no encapsulation within the following macros, do not change
6206218822Sdim    ## the running order or otherwise move them around unless you know exactly
6207218822Sdim    ## what you are doing...
6208218822Sdim    _LT_SYS_HIDDEN_LIBDEPS($1)
6209218822Sdim    _LT_COMPILER_PIC($1)
6210218822Sdim    _LT_COMPILER_C_O($1)
6211218822Sdim    _LT_COMPILER_FILE_LOCKS($1)
6212218822Sdim    _LT_LINKER_SHLIBS($1)
6213218822Sdim    _LT_SYS_DYNAMIC_LINKER($1)
6214218822Sdim    _LT_LINKER_HARDCODE_LIBPATH($1)
6215218822Sdim
6216218822Sdim    _LT_CONFIG($1)
6217218822Sdim  fi # test -n "$compiler"
6218218822Sdim
6219218822Sdim  CC=$lt_save_CC
6220218822Sdim  LDCXX=$LD
6221218822Sdim  LD=$lt_save_LD
6222218822Sdim  GCC=$lt_save_GCC
6223218822Sdim  with_gnu_ld=$lt_save_with_gnu_ld
6224218822Sdim  lt_cv_path_LDCXX=$lt_cv_path_LD
6225218822Sdim  lt_cv_path_LD=$lt_save_path_LD
6226218822Sdim  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6227218822Sdim  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6228218822Sdimfi # test "$_lt_caught_CXX_error" != yes
6229218822Sdim
6230218822SdimAC_LANG_POP
6231218822Sdim])# _LT_LANG_CXX_CONFIG
6232218822Sdim
6233218822Sdim
6234218822Sdim# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6235218822Sdim# ---------------------------------
6236218822Sdim# Figure out "hidden" library dependencies from verbose
6237218822Sdim# compiler output when linking a shared library.
6238218822Sdim# Parse the compiler output and extract the necessary
6239218822Sdim# objects, libraries and library flags.
6240218822Sdimm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6241218822Sdim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6242218822Sdim# Dependencies to place before and after the object being linked:
6243218822Sdim_LT_TAGVAR(predep_objects, $1)=
6244218822Sdim_LT_TAGVAR(postdep_objects, $1)=
6245218822Sdim_LT_TAGVAR(predeps, $1)=
6246218822Sdim_LT_TAGVAR(postdeps, $1)=
6247218822Sdim_LT_TAGVAR(compiler_lib_search_path, $1)=
6248218822Sdim
6249218822Sdimdnl we can't use the lt_simple_compile_test_code here,
6250218822Sdimdnl because it contains code intended for an executable,
6251218822Sdimdnl not a library.  It's possible we should let each
6252218822Sdimdnl tag define a new lt_????_link_test_code variable,
6253218822Sdimdnl but it's only used here...
6254218822Sdimm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6255218822Sdimint a;
6256218822Sdimvoid foo (void) { a = 0; }
6257218822Sdim_LT_EOF
6258218822Sdim], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6259218822Sdimclass Foo
6260218822Sdim{
6261218822Sdimpublic:
6262218822Sdim  Foo (void) { a = 0; }
6263218822Sdimprivate:
6264218822Sdim  int a;
6265218822Sdim};
6266218822Sdim_LT_EOF
6267218822Sdim], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6268218822Sdim      subroutine foo
6269218822Sdim      implicit none
6270218822Sdim      integer*4 a
6271218822Sdim      a=0
6272218822Sdim      return
6273218822Sdim      end
6274218822Sdim_LT_EOF
6275218822Sdim], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6276218822Sdim      subroutine foo
6277218822Sdim      implicit none
6278218822Sdim      integer a
6279218822Sdim      a=0
6280218822Sdim      return
6281218822Sdim      end
6282218822Sdim_LT_EOF
6283218822Sdim], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6284218822Sdimpublic class foo {
6285218822Sdim  private int a;
6286218822Sdim  public void bar (void) {
6287218822Sdim    a = 0;
6288218822Sdim  }
6289218822Sdim};
6290218822Sdim_LT_EOF
629185815Sobrien])
6292218822Sdimdnl Parse the compiler output and extract the necessary
6293218822Sdimdnl objects, libraries and library flags.
6294218822Sdimif AC_TRY_EVAL(ac_compile); then
6295218822Sdim  # Parse the compiler output and extract the necessary
6296218822Sdim  # objects, libraries and library flags.
629785815Sobrien
6298218822Sdim  # Sentinel used to keep track of whether or not we are before
6299218822Sdim  # the conftest object file.
6300218822Sdim  pre_test_object_deps_done=no
630189857Sobrien
6302218822Sdim  # The `*' in the case matches for architectures that use `case' in
6303218822Sdim  # $output_verbose_cmd can trigger glob expansion during the loop
6304218822Sdim  # eval without this substitution.
6305218822Sdim  output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6306218822Sdim
6307218822Sdim  for p in `eval $output_verbose_link_cmd`; do
6308218822Sdim    case $p in
6309218822Sdim
6310218822Sdim    -L* | -R* | -l*)
6311218822Sdim       # Some compilers place space between "-{L,R}" and the path.
6312218822Sdim       # Remove the space.
6313218822Sdim       if test $p = "-L" ||
6314218822Sdim          test $p = "-R"; then
6315218822Sdim	 prev=$p
6316218822Sdim	 continue
6317218822Sdim       else
6318218822Sdim	 prev=
6319218822Sdim       fi
6320218822Sdim
6321218822Sdim       if test "$pre_test_object_deps_done" = no; then
6322218822Sdim	 case $p in
6323218822Sdim	 -L* | -R*)
6324218822Sdim	   # Internal compiler library paths should come after those
6325218822Sdim	   # provided the user.  The postdeps already come after the
6326218822Sdim	   # user supplied libs so there is no need to process them.
6327218822Sdim	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6328218822Sdim	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6329218822Sdim	   else
6330218822Sdim	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6331218822Sdim	   fi
6332218822Sdim	   ;;
6333218822Sdim	 # The "-l" case would never come before the object being
6334218822Sdim	 # linked, so don't bother handling this case.
6335218822Sdim	 esac
6336218822Sdim       else
6337218822Sdim	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6338218822Sdim	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6339218822Sdim	 else
6340218822Sdim	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6341218822Sdim	 fi
6342218822Sdim       fi
6343218822Sdim       ;;
6344218822Sdim
6345218822Sdim    *.$objext)
6346218822Sdim       # This assumes that the test object file only shows up
6347218822Sdim       # once in the compiler output.
6348218822Sdim       if test "$p" = "conftest.$objext"; then
6349218822Sdim	 pre_test_object_deps_done=yes
6350218822Sdim	 continue
6351218822Sdim       fi
6352218822Sdim
6353218822Sdim       if test "$pre_test_object_deps_done" = no; then
6354218822Sdim	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6355218822Sdim	   _LT_TAGVAR(predep_objects, $1)="$p"
6356218822Sdim	 else
6357218822Sdim	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6358218822Sdim	 fi
6359218822Sdim       else
6360218822Sdim	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6361218822Sdim	   _LT_TAGVAR(postdep_objects, $1)="$p"
6362218822Sdim	 else
6363218822Sdim	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6364218822Sdim	 fi
6365218822Sdim       fi
6366218822Sdim       ;;
6367218822Sdim
6368218822Sdim    *) ;; # Ignore the rest.
6369218822Sdim
6370218822Sdim    esac
6371218822Sdim  done
6372218822Sdim
6373218822Sdim  # Clean up.
6374218822Sdim  rm -f a.out a.exe
6375218822Sdimelse
6376218822Sdim  echo "libtool.m4: error: problem compiling $1 test program"
6377218822Sdimfi
6378218822Sdim
6379218822Sdim$RM -f confest.$objext
6380218822Sdim
6381218822Sdim# PORTME: override above test on systems where it is broken
6382218822Sdimm4_if([$1], [CXX],
6383218822Sdim[case $host_os in
6384218822Sdiminterix[[3-9]]*)
6385218822Sdim  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6386218822Sdim  # hack all around it, let's just trust "g++" to DTRT.
6387218822Sdim  _LT_TAGVAR(predep_objects,$1)=
6388218822Sdim  _LT_TAGVAR(postdep_objects,$1)=
6389218822Sdim  _LT_TAGVAR(postdeps,$1)=
6390218822Sdim  ;;
6391218822Sdim
6392218822Sdimlinux*)
6393218822Sdim  case `$CC -V 2>&1 | sed 5q` in
6394218822Sdim  *Sun\ C*)
6395218822Sdim    # Sun C++ 5.9
6396218822Sdim
6397218822Sdim    # The more standards-conforming stlport4 library is
6398218822Sdim    # incompatible with the Cstd library. Avoid specifying
6399218822Sdim    # it if it's in CXXFLAGS. Ignore libCrun as
6400218822Sdim    # -library=stlport4 depends on it.
6401218822Sdim    case " $CXX $CXXFLAGS " in
6402218822Sdim    *" -library=stlport4 "*)
6403218822Sdim      solaris_use_stlport4=yes
6404218822Sdim      ;;
6405218822Sdim    esac
6406218822Sdim
6407218822Sdim    if test "$solaris_use_stlport4" != yes; then
6408218822Sdim      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6409218822Sdim    fi
6410218822Sdim    ;;
6411218822Sdim  esac
6412218822Sdim  ;;
6413218822Sdim
6414218822Sdimsolaris*)
6415218822Sdim  case $cc_basename in
6416218822Sdim  CC*)
6417218822Sdim    # The more standards-conforming stlport4 library is
6418218822Sdim    # incompatible with the Cstd library. Avoid specifying
6419218822Sdim    # it if it's in CXXFLAGS. Ignore libCrun as
6420218822Sdim    # -library=stlport4 depends on it.
6421218822Sdim    case " $CXX $CXXFLAGS " in
6422218822Sdim    *" -library=stlport4 "*)
6423218822Sdim      solaris_use_stlport4=yes
6424218822Sdim      ;;
6425218822Sdim    esac
6426218822Sdim
6427218822Sdim    # Adding this requires a known-good setup of shared libraries for
6428218822Sdim    # Sun compiler versions before 5.6, else PIC objects from an old
6429218822Sdim    # archive will be linked into the output, leading to subtle bugs.
6430218822Sdim    if test "$solaris_use_stlport4" != yes; then
6431218822Sdim      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6432218822Sdim    fi
6433218822Sdim    ;;
6434218822Sdim  esac
6435218822Sdim  ;;
6436218822Sdimesac
6437218822Sdim])
6438218822Sdim
6439218822Sdimcase " $_LT_TAGVAR(postdeps, $1) " in
6440218822Sdim*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6441218822Sdimesac
6442218822Sdim_LT_TAGDECL([], [predep_objects], [1],
6443218822Sdim    [Dependencies to place before and after the objects being linked to
6444218822Sdim    create a shared library])
6445218822Sdim_LT_TAGDECL([], [postdep_objects], [1])
6446218822Sdim_LT_TAGDECL([], [predeps], [1])
6447218822Sdim_LT_TAGDECL([], [postdeps], [1])
6448218822Sdim_LT_TAGDECL([], [compiler_lib_search_path], [1],
6449218822Sdim    [The library search path used internally by the compiler when linking
6450218822Sdim    a shared library])
6451218822Sdim])# _LT_SYS_HIDDEN_LIBDEPS
6452218822Sdim
6453218822Sdim
6454218822Sdim# _LT_PROG_F77
6455218822Sdim# ------------
6456218822Sdim# Since AC_PROG_F77 is broken, in that it returns the empty string
6457218822Sdim# if there is no fortran compiler, we have our own version here.
6458218822Sdimm4_defun([_LT_PROG_F77],
6459218822Sdim[
6460218822Sdimpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6461218822SdimAC_PROG_F77
6462218822Sdimif test -z "$F77" || test "X$F77" = "Xno"; then
6463218822Sdim  _lt_disable_F77=yes
6464218822Sdimfi
6465218822Sdimpopdef([AC_MSG_ERROR])
6466218822Sdim])# _LT_PROG_F77
6467218822Sdim
6468218822Sdimdnl aclocal-1.4 backwards compatibility:
6469218822Sdimdnl AC_DEFUN([_LT_PROG_F77], [])
6470218822Sdim
6471218822Sdim
6472218822Sdim# _LT_LANG_F77_CONFIG([TAG])
6473218822Sdim# --------------------------
6474218822Sdim# Ensure that the configuration variables for a Fortran 77 compiler are
6475218822Sdim# suitably defined.  These variables are subsequently used by _LT_CONFIG
6476218822Sdim# to write the compiler configuration to `libtool'.
6477218822Sdimm4_defun([_LT_LANG_F77_CONFIG],
6478218822Sdim[AC_REQUIRE([_LT_PROG_F77])dnl
6479218822SdimAC_LANG_PUSH(Fortran 77)
6480218822Sdim
6481218822Sdim_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6482218822Sdim_LT_TAGVAR(allow_undefined_flag, $1)=
6483218822Sdim_LT_TAGVAR(always_export_symbols, $1)=no
6484218822Sdim_LT_TAGVAR(archive_expsym_cmds, $1)=
6485218822Sdim_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6486218822Sdim_LT_TAGVAR(hardcode_direct, $1)=no
6487218822Sdim_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6488218822Sdim_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6489218822Sdim_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6490218822Sdim_LT_TAGVAR(hardcode_libdir_separator, $1)=
6491218822Sdim_LT_TAGVAR(hardcode_minus_L, $1)=no
6492218822Sdim_LT_TAGVAR(hardcode_automatic, $1)=no
6493218822Sdim_LT_TAGVAR(inherit_rpath, $1)=no
6494218822Sdim_LT_TAGVAR(module_cmds, $1)=
6495218822Sdim_LT_TAGVAR(module_expsym_cmds, $1)=
6496218822Sdim_LT_TAGVAR(link_all_deplibs, $1)=unknown
6497218822Sdim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6498218822Sdim_LT_TAGVAR(no_undefined_flag, $1)=
6499218822Sdim_LT_TAGVAR(whole_archive_flag_spec, $1)=
6500218822Sdim_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6501218822Sdim
6502218822Sdim# Source file extension for f77 test sources.
6503218822Sdimac_ext=f
6504218822Sdim
6505218822Sdim# Object file extension for compiled f77 test sources.
6506218822Sdimobjext=o
6507218822Sdim_LT_TAGVAR(objext, $1)=$objext
6508218822Sdim
6509218822Sdim# No sense in running all these tests if we already determined that
6510218822Sdim# the F77 compiler isn't working.  Some variables (like enable_shared)
6511218822Sdim# are currently assumed to apply to all compilers on this platform,
6512218822Sdim# and will be corrupted by setting them based on a non-working compiler.
6513218822Sdimif test "$_lt_disable_F77" != yes; then
6514218822Sdim  # Code to be used in simple compile tests
6515218822Sdim  lt_simple_compile_test_code="\
6516218822Sdim      subroutine t
6517218822Sdim      return
6518218822Sdim      end
6519218822Sdim"
6520218822Sdim
6521218822Sdim  # Code to be used in simple link tests
6522218822Sdim  lt_simple_link_test_code="\
6523218822Sdim      program t
6524218822Sdim      end
6525218822Sdim"
6526218822Sdim
6527218822Sdim  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6528218822Sdim  _LT_TAG_COMPILER
6529218822Sdim
6530218822Sdim  # save warnings/boilerplate of simple test code
6531218822Sdim  _LT_COMPILER_BOILERPLATE
6532218822Sdim  _LT_LINKER_BOILERPLATE
6533218822Sdim
6534218822Sdim  # Allow CC to be a program name with arguments.
6535218822Sdim  lt_save_CC="$CC"
6536218822Sdim  CC=${F77-"f77"}
6537218822Sdim  compiler=$CC
6538218822Sdim  _LT_TAGVAR(compiler, $1)=$CC
6539218822Sdim  _LT_CC_BASENAME([$compiler])
6540218822Sdim
6541218822Sdim  if test -n "$compiler"; then
6542218822Sdim    AC_MSG_CHECKING([if libtool supports shared libraries])
6543218822Sdim    AC_MSG_RESULT([$can_build_shared])
6544218822Sdim
6545218822Sdim    AC_MSG_CHECKING([whether to build shared libraries])
6546218822Sdim    test "$can_build_shared" = "no" && enable_shared=no
6547218822Sdim
6548218822Sdim    # On AIX, shared libraries and static libraries use the same namespace, and
6549218822Sdim    # are all built from PIC.
6550218822Sdim    case $host_os in
6551218822Sdim      aix3*)
6552218822Sdim        test "$enable_shared" = yes && enable_static=no
6553218822Sdim        if test -n "$RANLIB"; then
6554218822Sdim          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6555218822Sdim          postinstall_cmds='$RANLIB $lib'
6556218822Sdim        fi
6557218822Sdim        ;;
6558218822Sdim      aix4* | aix5*)
6559218822Sdim	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6560218822Sdim	  test "$enable_shared" = yes && enable_static=no
6561218822Sdim	fi
6562218822Sdim        ;;
6563218822Sdim    esac
6564218822Sdim    AC_MSG_RESULT([$enable_shared])
6565218822Sdim
6566218822Sdim    AC_MSG_CHECKING([whether to build static libraries])
6567218822Sdim    # Make sure either enable_shared or enable_static is yes.
6568218822Sdim    test "$enable_shared" = yes || enable_static=yes
6569218822Sdim    AC_MSG_RESULT([$enable_static])
6570218822Sdim
6571218822Sdim    _LT_TAGVAR(GCC, $1)="$G77"
6572218822Sdim    _LT_TAGVAR(LD, $1)="$LD"
6573218822Sdim
6574218822Sdim    ## CAVEAT EMPTOR:
6575218822Sdim    ## There is no encapsulation within the following macros, do not change
6576218822Sdim    ## the running order or otherwise move them around unless you know exactly
6577218822Sdim    ## what you are doing...
6578218822Sdim    _LT_COMPILER_PIC($1)
6579218822Sdim    _LT_COMPILER_C_O($1)
6580218822Sdim    _LT_COMPILER_FILE_LOCKS($1)
6581218822Sdim    _LT_LINKER_SHLIBS($1)
6582218822Sdim    _LT_SYS_DYNAMIC_LINKER($1)
6583218822Sdim    _LT_LINKER_HARDCODE_LIBPATH($1)
6584218822Sdim
6585218822Sdim    _LT_CONFIG($1)
6586218822Sdim  fi # test -n "$compiler"
6587218822Sdim
6588218822Sdim  CC="$lt_save_CC"
6589218822Sdimfi # test "$_lt_disable_F77" != yes
6590218822Sdim
6591218822SdimAC_LANG_POP
6592218822Sdim])# _LT_LANG_F77_CONFIG
6593218822Sdim
6594218822Sdim
6595218822Sdim# _LT_PROG_FC
6596218822Sdim# -----------
6597218822Sdim# Since AC_PROG_FC is broken, in that it returns the empty string
6598218822Sdim# if there is no fortran compiler, we have our own version here.
6599218822Sdimm4_defun([_LT_PROG_FC],
6600218822Sdim[
6601218822Sdimpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6602218822SdimAC_PROG_FC
6603218822Sdimif test -z "$FC" || test "X$FC" = "Xno"; then
6604218822Sdim  _lt_disable_FC=yes
6605218822Sdimfi
6606218822Sdimpopdef([AC_MSG_ERROR])
6607218822Sdim])# _LT_PROG_FC
6608218822Sdim
6609218822Sdimdnl aclocal-1.4 backwards compatibility:
6610218822Sdimdnl AC_DEFUN([_LT_PROG_FC], [])
6611218822Sdim
6612218822Sdim
6613218822Sdim# _LT_LANG_FC_CONFIG([TAG])
6614218822Sdim# -------------------------
6615218822Sdim# Ensure that the configuration variables for a Fortran compiler are
6616218822Sdim# suitably defined.  These variables are subsequently used by _LT_CONFIG
6617218822Sdim# to write the compiler configuration to `libtool'.
6618218822Sdimm4_defun([_LT_LANG_FC_CONFIG],
6619218822Sdim[AC_REQUIRE([_LT_PROG_FC])dnl
6620218822SdimAC_LANG_PUSH(Fortran)
6621218822Sdim
6622218822Sdim_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6623218822Sdim_LT_TAGVAR(allow_undefined_flag, $1)=
6624218822Sdim_LT_TAGVAR(always_export_symbols, $1)=no
6625218822Sdim_LT_TAGVAR(archive_expsym_cmds, $1)=
6626218822Sdim_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6627218822Sdim_LT_TAGVAR(hardcode_direct, $1)=no
6628218822Sdim_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6629218822Sdim_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6630218822Sdim_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6631218822Sdim_LT_TAGVAR(hardcode_libdir_separator, $1)=
6632218822Sdim_LT_TAGVAR(hardcode_minus_L, $1)=no
6633218822Sdim_LT_TAGVAR(hardcode_automatic, $1)=no
6634218822Sdim_LT_TAGVAR(inherit_rpath, $1)=no
6635218822Sdim_LT_TAGVAR(module_cmds, $1)=
6636218822Sdim_LT_TAGVAR(module_expsym_cmds, $1)=
6637218822Sdim_LT_TAGVAR(link_all_deplibs, $1)=unknown
6638218822Sdim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6639218822Sdim_LT_TAGVAR(no_undefined_flag, $1)=
6640218822Sdim_LT_TAGVAR(whole_archive_flag_spec, $1)=
6641218822Sdim_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6642218822Sdim
6643218822Sdim# Source file extension for fc test sources.
6644218822Sdimac_ext=${ac_fc_srcext-f}
6645218822Sdim
6646218822Sdim# Object file extension for compiled fc test sources.
6647218822Sdimobjext=o
6648218822Sdim_LT_TAGVAR(objext, $1)=$objext
6649218822Sdim
6650218822Sdim# No sense in running all these tests if we already determined that
6651218822Sdim# the FC compiler isn't working.  Some variables (like enable_shared)
6652218822Sdim# are currently assumed to apply to all compilers on this platform,
6653218822Sdim# and will be corrupted by setting them based on a non-working compiler.
6654218822Sdimif test "$_lt_disable_FC" != yes; then
6655218822Sdim  # Code to be used in simple compile tests
6656218822Sdim  lt_simple_compile_test_code="\
6657218822Sdim      subroutine t
6658218822Sdim      return
6659218822Sdim      end
6660218822Sdim"
6661218822Sdim
6662218822Sdim  # Code to be used in simple link tests
6663218822Sdim  lt_simple_link_test_code="\
6664218822Sdim      program t
6665218822Sdim      end
6666218822Sdim"
6667218822Sdim
6668218822Sdim  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6669218822Sdim  _LT_TAG_COMPILER
6670218822Sdim
6671218822Sdim  # save warnings/boilerplate of simple test code
6672218822Sdim  _LT_COMPILER_BOILERPLATE
6673218822Sdim  _LT_LINKER_BOILERPLATE
6674218822Sdim
6675218822Sdim  # Allow CC to be a program name with arguments.
6676218822Sdim  lt_save_CC="$CC"
6677218822Sdim  CC=${FC-"f95"}
6678218822Sdim  compiler=$CC
6679218822Sdim  _LT_TAGVAR(compiler, $1)=$CC
6680218822Sdim  _LT_CC_BASENAME([$compiler])
6681218822Sdim
6682218822Sdim  if test -n "$compiler"; then
6683218822Sdim    AC_MSG_CHECKING([if libtool supports shared libraries])
6684218822Sdim    AC_MSG_RESULT([$can_build_shared])
6685218822Sdim
6686218822Sdim    AC_MSG_CHECKING([whether to build shared libraries])
6687218822Sdim    test "$can_build_shared" = "no" && enable_shared=no
6688218822Sdim
6689218822Sdim    # On AIX, shared libraries and static libraries use the same namespace, and
6690218822Sdim    # are all built from PIC.
6691218822Sdim    case $host_os in
6692218822Sdim      aix3*)
6693218822Sdim        test "$enable_shared" = yes && enable_static=no
6694218822Sdim        if test -n "$RANLIB"; then
6695218822Sdim          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6696218822Sdim          postinstall_cmds='$RANLIB $lib'
6697218822Sdim        fi
6698218822Sdim        ;;
6699218822Sdim      aix4* | aix5*)
6700218822Sdim	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6701218822Sdim	  test "$enable_shared" = yes && enable_static=no
6702218822Sdim	fi
6703218822Sdim        ;;
6704218822Sdim    esac
6705218822Sdim    AC_MSG_RESULT([$enable_shared])
6706218822Sdim
6707218822Sdim    AC_MSG_CHECKING([whether to build static libraries])
6708218822Sdim    # Make sure either enable_shared or enable_static is yes.
6709218822Sdim    test "$enable_shared" = yes || enable_static=yes
6710218822Sdim    AC_MSG_RESULT([$enable_static])
6711218822Sdim
6712218822Sdim    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6713218822Sdim    _LT_TAGVAR(LD, $1)="$LD"
6714218822Sdim
6715218822Sdim    ## CAVEAT EMPTOR:
6716218822Sdim    ## There is no encapsulation within the following macros, do not change
6717218822Sdim    ## the running order or otherwise move them around unless you know exactly
6718218822Sdim    ## what you are doing...
6719218822Sdim    _LT_SYS_HIDDEN_LIBDEPS($1)
6720218822Sdim    _LT_COMPILER_PIC($1)
6721218822Sdim    _LT_COMPILER_C_O($1)
6722218822Sdim    _LT_COMPILER_FILE_LOCKS($1)
6723218822Sdim    _LT_LINKER_SHLIBS($1)
6724218822Sdim    _LT_SYS_DYNAMIC_LINKER($1)
6725218822Sdim    _LT_LINKER_HARDCODE_LIBPATH($1)
6726218822Sdim
6727218822Sdim    _LT_CONFIG($1)
6728218822Sdim  fi # test -n "$compiler"
6729218822Sdim
6730218822Sdim  CC="$lt_save_CC"
6731218822Sdimfi # test "$_lt_disable_FC" != yes
6732218822Sdim
6733218822SdimAC_LANG_POP
6734218822Sdim])# _LT_LANG_FC_CONFIG
6735218822Sdim
6736218822Sdim
6737218822Sdim# _LT_LANG_GCJ_CONFIG([TAG])
6738218822Sdim# --------------------------
6739218822Sdim# Ensure that the configuration variables for the GNU Java Compiler compiler
6740218822Sdim# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6741218822Sdim# to write the compiler configuration to `libtool'.
6742218822Sdimm4_defun([_LT_LANG_GCJ_CONFIG],
6743218822Sdim[AC_REQUIRE([LT_PROG_GCJ])dnl
6744218822SdimAC_LANG_SAVE
6745218822Sdim
6746218822Sdim# Source file extension for Java test sources.
6747218822Sdimac_ext=java
6748218822Sdim
6749218822Sdim# Object file extension for compiled Java test sources.
6750218822Sdimobjext=o
6751218822Sdim_LT_TAGVAR(objext, $1)=$objext
6752218822Sdim
6753218822Sdim# Code to be used in simple compile tests
6754218822Sdimlt_simple_compile_test_code="class foo {}"
6755218822Sdim
6756218822Sdim# Code to be used in simple link tests
6757218822Sdimlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6758218822Sdim
6759218822Sdim# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6760218822Sdim_LT_TAG_COMPILER
6761218822Sdim
6762218822Sdim# save warnings/boilerplate of simple test code
6763218822Sdim_LT_COMPILER_BOILERPLATE
6764218822Sdim_LT_LINKER_BOILERPLATE
6765218822Sdim
6766218822Sdim# Allow CC to be a program name with arguments.
676785815Sobrienlt_save_CC="$CC"
6768218822SdimCC=${GCJ-"gcj"}
6769218822Sdimcompiler=$CC
6770218822Sdim_LT_TAGVAR(compiler, $1)=$CC
6771218822Sdim_LT_CC_BASENAME([$compiler])
6772218822Sdim
6773218822Sdim# GCJ did not exist at the time GCC didn't implicitly link libc in.
6774218822Sdim_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6775218822Sdim
6776218822Sdim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6777218822Sdim
6778218822Sdim## CAVEAT EMPTOR:
6779218822Sdim## There is no encapsulation within the following macros, do not change
6780218822Sdim## the running order or otherwise move them around unless you know exactly
6781218822Sdim## what you are doing...
6782218822Sdimif test -n "$compiler"; then
6783218822Sdim  _LT_COMPILER_NO_RTTI($1)
6784218822Sdim  _LT_COMPILER_PIC($1)
6785218822Sdim  _LT_COMPILER_C_O($1)
6786218822Sdim  _LT_COMPILER_FILE_LOCKS($1)
6787218822Sdim  _LT_LINKER_SHLIBS($1)
6788218822Sdim  _LT_SYS_DYNAMIC_LINKER($1)
6789218822Sdim  _LT_LINKER_HARDCODE_LIBPATH($1)
6790218822Sdim
6791218822Sdim  _LT_CONFIG($1)
6792218822Sdimfi
6793218822Sdim
6794218822SdimAC_LANG_RESTORE
679585815SobrienCC="$lt_save_CC"
6796218822Sdim])# _LT_LANG_GCJ_CONFIG
679785815Sobrien
6798218822Sdim
6799218822Sdim# _LT_LANG_RC_CONFIG([TAG])
6800218822Sdim# -------------------------
6801218822Sdim# Ensure that the configuration variables for the Windows resource compiler
6802218822Sdim# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6803218822Sdim# to write the compiler configuration to `libtool'.
6804218822Sdimm4_defun([_LT_LANG_RC_CONFIG],
6805218822Sdim[AC_REQUIRE([LT_PROG_RC])dnl
6806218822SdimAC_LANG_SAVE
6807218822Sdim
6808218822Sdim# Source file extension for RC test sources.
6809218822Sdimac_ext=rc
6810218822Sdim
6811218822Sdim# Object file extension for compiled RC test sources.
6812218822Sdimobjext=o
6813218822Sdim_LT_TAGVAR(objext, $1)=$objext
6814218822Sdim
6815218822Sdim# Code to be used in simple compile tests
6816218822Sdimlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6817218822Sdim
6818218822Sdim# Code to be used in simple link tests
6819218822Sdimlt_simple_link_test_code="$lt_simple_compile_test_code"
6820218822Sdim
6821218822Sdim# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6822218822Sdim_LT_TAG_COMPILER
6823218822Sdim
6824218822Sdim# save warnings/boilerplate of simple test code
6825218822Sdim_LT_COMPILER_BOILERPLATE
6826218822Sdim_LT_LINKER_BOILERPLATE
6827218822Sdim
6828218822Sdim# Allow CC to be a program name with arguments.
6829218822Sdimlt_save_CC="$CC"
6830218822SdimCC=${RC-"windres"}
6831218822Sdimcompiler=$CC
6832218822Sdim_LT_TAGVAR(compiler, $1)=$CC
6833218822Sdim_LT_CC_BASENAME([$compiler])
6834218822Sdim_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6835218822Sdim
6836218822Sdimif test -n "$compiler"; then
6837218822Sdim  :
6838218822Sdim  _LT_CONFIG($1)
6839218822Sdimfi
6840218822Sdim
6841218822SdimAC_LANG_RESTORE
6842218822SdimCC="$lt_save_CC"
6843218822Sdim])# _LT_LANG_RC_CONFIG
6844218822Sdim
6845218822Sdim
6846218822Sdim# LT_PROG_GCJ
6847218822Sdim# -----------
6848218822SdimAC_DEFUN([LT_PROG_GCJ],
6849218822Sdim[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6850218822Sdim  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6851218822Sdim    [AC_CHECK_TOOL(GCJ, gcj,)
6852218822Sdim      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6853218822Sdim      AC_SUBST(GCJFLAGS)])])[]dnl
685485815Sobrien])
685585815Sobrien
6856218822Sdim# Old name:
6857218822SdimAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6858218822Sdimdnl aclocal-1.4 backwards compatibility:
6859218822Sdimdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
686085815Sobrien
686185815Sobrien
6862218822Sdim# LT_PROG_RC
6863218822Sdim# ----------
6864218822SdimAC_DEFUN([LT_PROG_RC],
6865218822Sdim[AC_CHECK_TOOL(RC, windres,)
686685815Sobrien])
6867218822Sdim
6868218822Sdim# Old name:
6869218822SdimAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6870218822Sdimdnl aclocal-1.4 backwards compatibility:
6871218822Sdimdnl AC_DEFUN([LT_AC_PROG_RC], [])
6872218822Sdim
6873218822Sdim
6874218822Sdim# _LT_DECL_EGREP
6875218822Sdim# --------------
6876218822Sdim# If we don't have a new enough Autoconf to choose the best grep
6877218822Sdim# available, choose the one first in the user's PATH.
6878218822Sdimm4_defun([_LT_DECL_EGREP],
6879218822Sdim[AC_REQUIRE([AC_PROG_EGREP])dnl
6880218822SdimAC_REQUIRE([AC_PROG_FGREP])dnl
6881218822Sdimtest -z "$GREP" && GREP=grep
6882218822Sdim_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
6883218822Sdim_LT_DECL([], [EGREP], [1], [An ERE matcher])
6884218822Sdim_LT_DECL([], [FGREP], [1], [A literal string matcher])
6885218822Sdimdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
6886218822SdimAC_SUBST([GREP])
6887218822Sdim])
6888218822Sdim
6889218822Sdim
6890218822Sdim# _LT_DECL_SED
6891218822Sdim# ------------
6892218822Sdim# Check for a fully-functional sed program, that truncates
6893218822Sdim# as few characters as possible.  Prefer GNU sed if found.
6894218822Sdimm4_defun([_LT_DECL_SED],
6895218822Sdim[AC_PROG_SED
6896218822Sdimtest -z "$SED" && SED=sed
6897218822SdimXsed="$SED -e 1s/^X//"
6898218822Sdim_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
6899218822Sdim_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
6900218822Sdim    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
6901218822Sdim])# _LT_DECL_SED
6902218822Sdim
6903218822Sdimm4_ifndef([AC_PROG_SED], [
6904218822Sdim############################################################
6905218822Sdim# NOTE: This macro has been submitted for inclusion into   #
6906218822Sdim#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6907218822Sdim#  a released version of Autoconf we should remove this    #
6908218822Sdim#  macro and use it instead.                               #
6909218822Sdim############################################################
6910218822Sdim
6911218822Sdimm4_defun([AC_PROG_SED],
6912218822Sdim[AC_MSG_CHECKING([for a sed that does not truncate output])
6913218822SdimAC_CACHE_VAL(lt_cv_path_SED,
6914218822Sdim[# Loop through the user's path and test for sed and gsed.
6915218822Sdim# Then use that list of sed's as ones to test for truncation.
6916218822Sdimas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6917218822Sdimfor as_dir in $PATH
6918218822Sdimdo
6919218822Sdim  IFS=$as_save_IFS
6920218822Sdim  test -z "$as_dir" && as_dir=.
6921218822Sdim  for lt_ac_prog in sed gsed; do
6922218822Sdim    for ac_exec_ext in '' $ac_executable_extensions; do
6923218822Sdim      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6924218822Sdim        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6925218822Sdim      fi
6926218822Sdim    done
6927218822Sdim  done
6928218822Sdimdone
6929218822SdimIFS=$as_save_IFS
6930218822Sdimlt_ac_max=0
6931218822Sdimlt_ac_count=0
6932218822Sdim# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6933218822Sdim# along with /bin/sed that truncates output.
6934218822Sdimfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6935218822Sdim  test ! -f $lt_ac_sed && continue
6936218822Sdim  cat /dev/null > conftest.in
6937218822Sdim  lt_ac_count=0
6938218822Sdim  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6939218822Sdim  # Check for GNU sed and select it if it is found.
6940218822Sdim  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6941218822Sdim    lt_cv_path_SED=$lt_ac_sed
6942218822Sdim    break
6943218822Sdim  fi
6944218822Sdim  while true; do
6945218822Sdim    cat conftest.in conftest.in >conftest.tmp
6946218822Sdim    mv conftest.tmp conftest.in
6947218822Sdim    cp conftest.in conftest.nl
6948218822Sdim    echo >>conftest.nl
6949218822Sdim    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6950218822Sdim    cmp -s conftest.out conftest.nl || break
6951218822Sdim    # 10000 chars as input seems more than enough
6952218822Sdim    test $lt_ac_count -gt 10 && break
6953218822Sdim    lt_ac_count=`expr $lt_ac_count + 1`
6954218822Sdim    if test $lt_ac_count -gt $lt_ac_max; then
6955218822Sdim      lt_ac_max=$lt_ac_count
6956218822Sdim      lt_cv_path_SED=$lt_ac_sed
6957218822Sdim    fi
6958218822Sdim  done
6959218822Sdimdone
6960218822Sdim])
6961218822SdimSED=$lt_cv_path_SED
6962218822SdimAC_SUBST([SED])
6963218822SdimAC_MSG_RESULT([$SED])
6964218822Sdim])#AC_PROG_SED
6965218822Sdim])#m4_ifndef
6966218822Sdim
6967218822Sdim# Old name:
6968218822SdimAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
6969218822Sdimdnl aclocal-1.4 backwards compatibility:
6970218822Sdimdnl AC_DEFUN([LT_AC_PROG_SED], [])
6971218822Sdim
6972218822Sdim
6973218822Sdim# _LT_CHECK_SHELL_FEATURES
6974218822Sdim# ------------------------
6975218822Sdim# Find out whether the shell is Bourne or XSI compatible,
6976218822Sdim# or has some other useful features.
6977218822Sdimm4_defun([_LT_CHECK_SHELL_FEATURES],
6978218822Sdim[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
6979218822Sdim# Try some XSI features
6980218822Sdimxsi_shell=no
6981218822Sdim( _lt_dummy="a/b/c"
6982218822Sdim  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
6983218822Sdim      = c,a/b,, ) >/dev/null 2>&1 \
6984218822Sdim  && xsi_shell=yes
6985218822SdimAC_MSG_RESULT([$xsi_shell])
6986218822Sdim_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
6987218822Sdim
6988218822SdimAC_MSG_CHECKING([whether the shell understands "+="])
6989218822Sdimlt_shell_append=no
6990218822Sdim( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
6991218822Sdim    >/dev/null 2>&1 \
6992218822Sdim  && lt_shell_append=yes
6993218822SdimAC_MSG_RESULT([$lt_shell_append])
6994218822Sdim_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
6995218822Sdim
6996218822Sdimif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6997218822Sdim  lt_unset=unset
6998218822Sdimelse
6999218822Sdim  lt_unset=false
7000218822Sdimfi
7001218822Sdim_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7002218822Sdim
7003218822Sdim# test EBCDIC or ASCII
7004218822Sdimcase `echo X|tr X '\101'` in
7005218822Sdim A) # ASCII based system
7006218822Sdim    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7007218822Sdim  lt_SP2NL='tr \040 \012'
7008218822Sdim  lt_NL2SP='tr \015\012 \040\040'
7009218822Sdim  ;;
7010218822Sdim *) # EBCDIC based system
7011218822Sdim  lt_SP2NL='tr \100 \n'
7012218822Sdim  lt_NL2SP='tr \r\n \100\100'
7013218822Sdim  ;;
7014218822Sdimesac
7015218822Sdim_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7016218822Sdim_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7017218822Sdim])# _LT_CHECK_SHELL_FEATURES
7018218822Sdim
7019218822Sdim
7020218822Sdim# _LT_PROG_XSI_SHELLFNS
7021218822Sdim# ---------------------
7022218822Sdim# Bourne and XSI compatible variants of some useful shell functions.
7023218822Sdimm4_defun([_LT_PROG_XSI_SHELLFNS],
7024218822Sdim[case $xsi_shell in
7025218822Sdim  yes)
7026218822Sdim    cat << \_LT_EOF >> "$cfgfile"
7027218822Sdim# func_dirname file append nondir_replacement
7028218822Sdim# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7029218822Sdim# otherwise set result to NONDIR_REPLACEMENT.
7030218822Sdimfunc_dirname ()
7031218822Sdim{
7032218822Sdim  case ${1} in
7033218822Sdim    */*) func_dirname_result="${1%/*}${2}" ;;
7034218822Sdim    *  ) func_dirname_result="${3}" ;;
7035218822Sdim  esac
7036218822Sdim}
7037218822Sdim
7038218822Sdim# func_basename file
7039218822Sdimfunc_basename ()
7040218822Sdim{
7041218822Sdim  func_basename_result="${1##*/}"
7042218822Sdim}
7043218822Sdim
7044218822Sdim# func_stripname prefix suffix name
7045218822Sdim# strip PREFIX and SUFFIX off of NAME.
7046218822Sdim# PREFIX and SUFFIX must not contain globbing or regex special
7047218822Sdim# characters, hashes, percent signs, but SUFFIX may contain a leading
7048218822Sdim# dot (in which case that matches only a dot).
7049218822Sdimfunc_stripname ()
7050218822Sdim{
7051218822Sdim  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7052218822Sdim  # positional parameters, so assign one to ordinary parameter first.
7053218822Sdim  func_stripname_result=${3}
7054218822Sdim  func_stripname_result=${func_stripname_result#"${1}"}
7055218822Sdim  func_stripname_result=${func_stripname_result%"${2}"}
7056218822Sdim}
7057218822Sdim
7058218822Sdim# func_opt_split
7059218822Sdimfunc_opt_split ()
7060218822Sdim{
7061218822Sdim  func_opt_split_opt=${1%%=*}
7062218822Sdim  func_opt_split_arg=${1#*=}
7063218822Sdim}
7064218822Sdim
7065218822Sdim# func_lo2o object
7066218822Sdimfunc_lo2o ()
7067218822Sdim{
7068218822Sdim  case ${1} in
7069218822Sdim    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7070218822Sdim    *)    func_lo2o_result=${1} ;;
7071218822Sdim  esac
7072218822Sdim}
7073218822Sdim_LT_EOF
7074218822Sdim    ;;
7075218822Sdim  *) # Bourne compatible functions.
7076218822Sdim    cat << \_LT_EOF >> "$cfgfile"
7077218822Sdim# func_dirname file append nondir_replacement
7078218822Sdim# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7079218822Sdim# otherwise set result to NONDIR_REPLACEMENT.
7080218822Sdimfunc_dirname ()
7081218822Sdim{
7082218822Sdim  # Extract subdirectory from the argument.
7083218822Sdim  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7084218822Sdim  if test "X$func_dirname_result" = "X${1}"; then
7085218822Sdim    func_dirname_result="${3}"
7086218822Sdim  else
7087218822Sdim    func_dirname_result="$func_dirname_result${2}"
7088218822Sdim  fi
7089218822Sdim}
7090218822Sdim
7091218822Sdim# func_basename file
7092218822Sdimfunc_basename ()
7093218822Sdim{
7094218822Sdim  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7095218822Sdim}
7096218822Sdim
7097218822Sdim# func_stripname prefix suffix name
7098218822Sdim# strip PREFIX and SUFFIX off of NAME.
7099218822Sdim# PREFIX and SUFFIX must not contain globbing or regex special
7100218822Sdim# characters, hashes, percent signs, but SUFFIX may contain a leading
7101218822Sdim# dot (in which case that matches only a dot).
7102218822Sdim# func_strip_suffix prefix name
7103218822Sdimfunc_stripname ()
7104218822Sdim{
7105218822Sdim  case ${2} in
7106218822Sdim    .*) func_stripname_result=`$ECHO "X${3}" \
7107218822Sdim           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7108218822Sdim    *)  func_stripname_result=`$ECHO "X${3}" \
7109218822Sdim           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7110218822Sdim  esac
7111218822Sdim}
7112218822Sdim
7113218822Sdim# sed scripts:
7114218822Sdimmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7115218822Sdimmy_sed_long_arg='1s/^-[[^=]]*=//'
7116218822Sdim
7117218822Sdim# func_opt_split
7118218822Sdimfunc_opt_split ()
7119218822Sdim{
7120218822Sdim  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7121218822Sdim  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7122218822Sdim}
7123218822Sdim
7124218822Sdim# func_lo2o object
7125218822Sdimfunc_lo2o ()
7126218822Sdim{
7127218822Sdim  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7128218822Sdim}
7129218822Sdim_LT_EOF
7130218822Sdimesac
7131218822Sdim
7132218822Sdimcase $lt_shell_append in
7133218822Sdim  yes)
7134218822Sdim    cat << \_LT_EOF >> "$cfgfile"
7135218822Sdim
7136218822Sdim# func_append var value
7137218822Sdim# Append VALUE to the end of shell variable VAR.
7138218822Sdimfunc_append ()
7139218822Sdim{
7140218822Sdim  eval "$[1]+=\$[2]"
7141218822Sdim}
7142218822Sdim_LT_EOF
7143218822Sdim    ;;
7144218822Sdim  *)
7145218822Sdim    cat << \_LT_EOF >> "$cfgfile"
7146218822Sdim
7147218822Sdim# func_append var value
7148218822Sdim# Append VALUE to the end of shell variable VAR.
7149218822Sdimfunc_append ()
7150218822Sdim{
7151218822Sdim  eval "$[1]=\$$[1]\$[2]"
7152218822Sdim}
7153218822Sdim_LT_EOF
7154218822Sdim    ;;
7155218822Sdim  esac
7156218822Sdim])
7157