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