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