COIN-OR::LEMON - Graph Library

source: lemon-project-template-glpk/deps/glpk/m4/libtool.m4 @ 10:5545663ca997

subpack-glpk
Last change on this file since 10:5545663ca997 was 9:33de93886c88, checked in by Alpar Juttner <alpar@…>, 13 years ago

Import GLPK 4.47

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