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