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