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