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