source: proiecte/HadoopJUnit/hadoop-0.20.1/src/c++/libhdfs/m4/libtool.m4 @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

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