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