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