1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3
m4_define([_LT_COPYING], [dnl
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
5
# Free Software Foundation, Inc.
7
# This file is part of GNU Libtool:
8
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10
# This program is free software; you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation; either version 2 of the License, or
13
# (at your option) any later version.
15
# This program is distributed in the hope that it will be useful, but
16
# WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
# General Public License for more details.
20
# You should have received a copy of the GNU General Public License
21
# along with this program; if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
# As a special exception to the GNU General Public License, if you
25
# distribute this file as part of a program that contains a
26
# configuration script generated by Autoconf, you may include it under
27
# the same distribution terms that you use for the rest of that program.
35
# Complain and exit if this libtool version is less that VERSION.
36
m4_define([LT_PREREQ],
37
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
39
[m4_fatal([Libtool version $1 or higher is required],
45
# --------------------------
47
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
48
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
49
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
50
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
51
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
52
dnl unless we require an AC_DEFUNed macro:
53
AC_REQUIRE([LTOPTIONS_VERSION])dnl
54
AC_REQUIRE([LTSUGAR_VERSION])dnl
55
AC_REQUIRE([LTVERSION_VERSION])dnl
56
AC_REQUIRE([_LT_PROG_LTMAIN])dnl
57
AC_BEFORE([$0], [LT_LANG])dnl
59
# This can be used to rebuild libtool when needed
60
LIBTOOL_DEPS="$ltmain"
62
# Always use our own libtool.
63
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
67
_LT_SET_OPTIONS([$1])dnl
76
AU_DEFUN([AC_PROG_LIBTOOL], [LT_INIT])
77
AU_DEFUN([AM_PROG_LIBTOOL], [LT_INIT])
82
m4_define([_LT_SETUP],
83
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
84
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
85
_LT_DECL([], [host_alias], [0], [The host system])dnl
86
_LT_DECL([], [host], [0])dnl
88
AC_REQUIRE([AC_PROG_CC])dnl
89
AC_REQUIRE([AC_PROG_LD])dnl
90
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
91
AC_REQUIRE([AC_PROG_NM])dnl
93
AC_REQUIRE([AC_PROG_LN_S])dnl
94
test -z "$LN_S" && LN_S="ln -s"
95
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
97
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
98
AC_REQUIRE([AC_LIBTOOL_SYS_OLD_ARCHIVE])dnl
99
AC_REQUIRE([AC_LIBTOOL_SYS_MAX_CMD_LEN])dnl
100
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
101
AC_REQUIRE([AC_OBJEXT])dnl
102
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
103
AC_REQUIRE([AC_EXEEXT])dnl
104
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
107
_LT_CONFIG_LIBTOOL_INIT([
108
# See if we are running on zsh, and set the options which allow our
109
# commands through without removal of \ escapes INIT.
110
if test -n "\${ZSH_VERSION+set}" ; then
114
if test -n "${ZSH_VERSION+set}" ; then
120
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
121
_LT_AC_PROG_ECHO_BACKSLASH
125
# AIX sometimes has problems with the GCC collect2 program. For some
126
# reason, if we set the COLLECT_NAMES environment variable, the problems
127
# vanish in a puff of smoke.
128
if test "X${COLLECT_NAMES+set}" != Xset; then
135
# Sed substitution that helps us do robust quoting. It backslashifies
136
# metacharacters that are still active within double-quoted strings.
138
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
140
# Same as above, but do not quote variable references.
141
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
143
# Sed substitution to delay expansion of an escaped shell variable in a
144
# double_quote_subst'ed string.
145
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
147
# Sed substitution to delay expansion of an escaped single quote.
148
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
150
# Sed substitution to avoid accidental globbing in evaled expressions
151
no_glob_subst='s/\*/\\\*/g'
157
default_ofile=libtool
158
ofile="$default_ofile"
161
# All known linkers require a `.a' archive for static linking (except M$VC,
162
# which needs '.lib').
165
with_gnu_ld="$lt_cv_prog_gnu_ld"
170
# Set sane defaults for various variables
171
test -z "$CC" && CC=cc
172
test -z "$LTCC" && LTCC=$CC
173
test -z "$LD" && LD=ld
174
test -z "$ac_objext" && ac_objext=o
176
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
178
# Only perform the check for file, if the check method requires it
179
test -z "$MAGIC_CMD" && MAGIC_CMD=file
180
case $deplibs_check_method in
182
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
188
AC_ARG_ENABLE([libtool-lock],
189
[AC_HELP_STRING([--disable-libtool-lock],
190
[avoid locking (might break parallel builds)])])
191
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
193
# Use C for the default configuration in the libtool script
194
LT_SUPPORTED_TAG([CC])
196
_LT_LANG_DEFAULT_CONFIG
203
# In libtool itself `ltmain.sh' is in the build tree, but everything else
204
# ships it in the source tree, for completeness, if we find a copy in the
205
# build tree use that before falling back to auxdir.
207
# Note that this code is called both from `configure', and `config.status'
208
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
209
# `config.status' has no value for ac_aux_dir unless we are using Automake,
210
# so we pass a copy along to make sure it has a sensible value anyway.
211
AC_DEFUN([_LT_PROG_LTMAIN],
212
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
213
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
215
$srcdir) ltmain=./ltmain.sh ;;
216
$srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
218
test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
223
## ------------------------------------- ##
224
## Accumulate code for creating libtool. ##
225
## ------------------------------------- ##
227
# So that we can recreate a full libtool script including additional
228
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
229
# in macros and then make a single call at the end using the `libtool'
232
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
233
# ----------------------------------------
234
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
235
m4_define([_LT_CONFIG_LIBTOOL_INIT],
237
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
242
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
244
# _LT_CONFIG_LIBTOOL([COMMANDS])
245
# ------------------------------
246
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
247
m4_define([_LT_CONFIG_LIBTOOL],
249
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
254
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
257
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
258
# ---------------------------------------------------
259
m4_define([_LT_CONFIG_SAVE_COMMANDS],
260
[_LT_CONFIG_LIBTOOL([$1])
261
_LT_CONFIG_LIBTOOL_INIT([$2])
265
# _LT_FORMAT_COMMENT([COMMENT])
266
# -----------------------------
267
# Add leading comment marks to the start of each line, and a trailing
268
# full-stop to the whole comment if one is not present already.
269
m4_define([_LT_FORMAT_COMMENT],
271
m4_bpatsubst([$1], [^ *], [# ])]m4_bmatch([$1], [[!?.]$], [], [.])
276
## ------------------------ ##
277
## FIXME: Eliminate VARNAME ##
278
## ------------------------ ##
280
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
281
# -------------------------------------------------------------------
282
# CONFIGNAME is the name given to the value in the libtool script.
283
# VARNAME is the (base) name used in the configure script.
284
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
285
# VARNAME. Any other value will be used directly.
286
m4_define([_LT_DECL],
287
[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
288
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
289
[m4_ifval([$1], [$1], [$2])])
290
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
292
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
293
lt_dict_add_subkey([lt_decl_dict], [$2],
294
[tagged?], [m4_ifval([$5], [yes], [no])])])
298
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
299
# --------------------------------------------------------
300
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
303
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
304
# -------------------------------------------------
305
m4_define([lt_decl_tag_varnames],
306
[_lt_decl_filter([tagged?], [yes], $@)])
307
m4_define([_lt_decl_filter],
309
[0], [m4_fatal([$0: too few arguments: $#])],
310
[1], [m4_fatal([$0: too few arguments: $#: $1])],
311
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
312
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
313
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
317
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
318
# ---------------------------------------------------
319
m4_define([lt_decl_quote_varnames],
320
[_lt_decl_filter([value], [1], $@)])
322
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
323
# ----------------------------------------------------
324
m4_define([lt_decl_dquote_varnames],
325
[_lt_decl_filter([value], [2], $@)])
328
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
329
# ----------------------------------------------------
330
m4_define([lt_decl_varnames_tagged],
331
[_$0(m4_quote(m4_default([$1], [[, ]])),
332
m4_quote(m4_if([$2], [],
333
m4_quote(lt_decl_tag_varnames),
334
m4_quote(m4_shift($@)))),
335
m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
336
m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
339
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
340
# ------------------------------------------------
341
m4_define([lt_decl_all_varnames],
342
[_$0(m4_quote(m4_default([$1], [[, ]])),
344
m4_quote(lt_decl_varnames),
345
m4_quote(m4_shift($@))))[]dnl
347
m4_define([_lt_decl_all_varnames],
348
[lt_join($@, lt_decl_varnames_tagged([$1],
349
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
353
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
354
# ------------------------------------
355
# Quote a variable value, and forward it to `config.status' so that its
356
# declaration there will have the same value as in `configure'. VARNAME
357
# must have a single quote delimited value for this to work.
358
m4_define([_LT_CONFIG_STATUS_DECLARE],
359
[$1='`$echo "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
362
# _LT_CONFIG_STATUS_DECLARATIONS
363
# ------------------------------
364
# We delimit libtool config variables with single quotes, so when
365
# we write them to config.status, we have to be sure to quote all
366
# embedded single quotes properly. In configure, this macro expands
367
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
369
# <var>='`$echo "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
370
m4_define([_LT_CONFIG_STATUS_DECLARATIONS],
371
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
372
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
377
# Output comment and list of tags supported by the script
378
m4_define([_LT_LIBTOOL_TAGS],
379
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
380
available_tags="[]_LT_TAGS[]"dnl
383
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
384
# -----------------------------------
385
# Extract the dictionary values for VARNAME (optionally with TAG) and
386
# expand to a commented shell variable setting:
388
# # Some comment about what VAR is for.
389
# visible_name=$lt_internal_name
390
m4_define([_LT_LIBTOOL_DECLARE],
391
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
392
[description])))[]dnl
393
m4_pushdef([_libtool_name],
394
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
395
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
396
[0], [_libtool_name=[$]$1],
397
[1], [_libtool_name=$lt_[]$1],
398
[2], [_libtool_name=$lt_[]$1],
399
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
400
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
403
# _LT_LIBTOOL_CONFIG_VARS
404
# -----------------------
405
# Produce commented declarations of non-tagged libtool config variables
406
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
407
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
408
# section) are produced by _LT_LIBTOOL_TAG_VARS.
409
m4_define([_LT_LIBTOOL_CONFIG_VARS],
410
[m4_foreach([_lt_var],
411
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
412
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
414
# _LT_LIBTOOL_TAG_VARS(TAG)
415
# -------------------------
416
m4_define([_LT_LIBTOOL_TAG_VARS],
417
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
418
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
421
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
422
# ---------------------------------
423
m4_define([_LT_AC_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
426
# _LT_CONFIG_COMMANDS
427
# -------------------
428
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
429
# variables for single and double quote escaping we saved from calls
430
# to _LT_DECL, we can put quote escaped variables declarations
431
# into `config.status', and then the shell code to quote escape them in
432
# for loops in `config.status'. Finally, any additional code accumulated
433
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
434
m4_define([_LT_CONFIG_COMMANDS],
435
[AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [
437
# The HP-UX ksh and POSIX shell print the target directory to stdout
439
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
441
sed_quote_subst='$sed_quote_subst'
442
double_quote_subst='$double_quote_subst'
443
delay_variable_subst='$delay_variable_subst'
444
_LT_CONFIG_STATUS_DECLARATIONS
446
compiler='$compiler_DEFAULT'
448
# Quote evaled strings.
449
for var in lt_decl_all_varnames([[ ]], lt_decl_quote_varnames); do
450
eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
453
# Double-quote double-evaled strings.
454
for var in lt_decl_all_varnames([[ ]], lt_decl_dquote_varnames); do
455
eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
458
# Fix-up fallback echo if it was mangled by the above quoting rules.
460
*'\\\[$]0 --fallback-echo"')dnl "
461
lt_echo=\`\$echo "X\$lt_echo" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
465
_LT_OUTPUT_LIBTOOL_INIT
467
])#_LT_CONFIG_COMMANDS
471
# ----------------------------
472
# If TAG is the built-in tag, create an initial libtool script with a
473
# default configuration from the untagged config vars. Otherwise add code
474
# to config.status for appending the configuration named by TAG from the
475
# matching tagged config vars.
476
m4_define([_LT_CONFIG],
477
[_LT_CONFIG_SAVE_COMMANDS([
478
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
479
m4_if(_LT_TAG, [C], [
480
# See if we are running on zsh, and set the options which allow our
481
# commands through without removal of \ escapes.
482
if test -n "${ZSH_VERSION+set}" ; then
487
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
490
cat <<_LT_EOF >> "$cfgfile"
493
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
494
# Generated automatically by config.status (GNU $PACKAGE$TIMESTAMP) $VERSION
495
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
496
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
502
# ### BEGIN LIBTOOL CONFIG
503
_LT_LIBTOOL_CONFIG_VARS
505
# ### END LIBTOOL CONFIG
507
# The HP-UX ksh and POSIX shell print the target directory to stdout
509
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
515
cat <<\_LT_EOF >> "$cfgfile"
516
# AIX sometimes has problems with the GCC collect2 program. For some
517
# reason, if we set the COLLECT_NAMES environment variable, the problems
518
# vanish in a puff of smoke.
519
if test "X${COLLECT_NAMES+set}" != Xset; then
529
# We use sed instead of cat because bash on DJGPP gets confused if
530
# if finds mixed CR/LF and LF-only lines. Since sed operates in
531
# text mode, it properly converts lines to CR/LF. This bash problem
532
# is reportedly fixed, but why not run on old versions too?
533
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
535
mv -f "$cfgfile" "$ofile" ||
536
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
539
[cat <<_LT_EOF >> "$ofile"
541
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
542
dnl in a comment (ie after a #).
543
# ### BEGIN LIBTOOL TAG CONFIG: $1
544
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
545
# ### END LIBTOOL TAG CONFIG: $1
552
TIMESTAMP='$TIMESTAMP'
555
])dnl /_LT_CONFIG_SAVE_COMMANDS
559
# LT_SUPPORTED_TAG(TAG)
560
# ---------------------
561
# Trace this macro to discover what tags are supported by the libtool
562
# --tag option, using:
563
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
564
AC_DEFUN([LT_SUPPORTED_TAG], [])
567
# C support is built-in for now
568
m4_define([_LT_LANG_C_enabled], [])
569
m4_define([_LT_TAGS], [])
573
# Enable libtool support for the given language if not already enabled.
577
[C++], [_LT_LANG(CXX)],
578
[Java], [_LT_LANG(GCJ)],
579
[Fortran 77], [_LT_LANG(F77)],
580
[Windows Resource], [_LT_LANG(RC)],
581
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
583
[m4_fatal([$0: unsupported language: "$1"])])])dnl
588
m4_define([_LT_LANG],
589
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
590
[LT_SUPPORTED_TAG([$1])dnl
591
m4_append([_LT_TAGS], [$1 ])dnl
592
m4_define([_LT_LANG_]$1[_enabled], [])dnl
593
_LT_LANG_$1_CONFIG($1)])dnl
596
# _LT_LANG_DEFAULT_CONFIG
597
# -----------------------
598
m4_define([_LT_LANG_DEFAULT_CONFIG],
599
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
601
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
603
AC_PROVIDE_IFELSE([AC_PROG_F77],
605
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
607
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
608
dnl pulling things in needlessly.
609
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
611
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
613
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
615
[m4_ifdef([AC_PROG_GCJ],
616
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
617
m4_ifdef([A][M_PROG_GCJ],
618
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
619
m4_ifdef([LT_PROG_GCJ],
620
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
622
AC_PROVIDE_IFELSE([LT_PROG_RC],
624
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
625
])# _LT_LANG_DEFAULT_CONFIG
628
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
629
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
630
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java])])
633
# _LT_AC_SYS_COMPILER
634
# -------------------
635
AC_DEFUN([_LT_AC_SYS_COMPILER],
636
[AC_REQUIRE([AC_PROG_CC])dnl
638
_LT_DECL([LTCC], [CC], [1], [A C compiler])
639
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
640
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU C compiler?])
642
# If no C compiler was specified, use CC.
645
# Allow CC to be a program name with arguments.
647
])# _LT_AC_SYS_COMPILER
650
# _LT_AC_SYS_LIBPATH_AIX
651
# ----------------------
652
# Links a minimal program and checks the executable
653
# for the system default hardcoded library path. In most cases,
654
# this is /usr/lib:/lib, but when the MPI compilers are used
655
# the location of the communication and MPI libs are included too.
656
# If we don't find anything, use the default library path according
657
# to the aix ld manual.
658
m4_define([_LT_AC_SYS_LIBPATH_AIX],
659
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
660
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
662
# Check for a 64-bit object if we didn't find anything.
663
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
665
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
666
])# _LT_AC_SYS_LIBPATH_AIX
669
# _LT_AC_SHELL_INIT(ARG)
670
# ----------------------
671
m4_define([_LT_AC_SHELL_INIT],
672
[ifdef([AC_DIVERSION_NOTICE],
673
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
674
[AC_DIVERT_PUSH(NOTICE)])
677
])# _LT_AC_SHELL_INIT
680
# _LT_AC_PROG_ECHO_BACKSLASH
681
# --------------------------
682
# Add some code to the start of the generated configure script which
683
# will find an echo command which doesn't interpret backslashes.
684
m4_define([_LT_AC_PROG_ECHO_BACKSLASH],
686
# Check that we are running under the correct shell.
687
SHELL=${CONFIG_SHELL-/bin/sh}
691
# Remove one level of quotation (which was required for Make).
692
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
697
if test "X[$]1" = X--no-reexec; then
698
# Discard the --no-reexec flag, and continue.
700
elif test "X[$]1" = X--fallback-echo; then
701
# Avoid inline document here, it may be left over
703
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
704
# Yippee, $echo works!
707
# Restart under the correct shell.
708
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
711
if test "X[$]1" = X--fallback-echo; then
712
# used as fallback echo
720
# The HP-UX ksh and POSIX shell print the target directory to stdout
722
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
724
if test -z "$ECHO"; then
725
if test "X${echo_test_string+set}" != Xset; then
726
# find a string as large as possible, as long as the shell can cope with it
727
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
728
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
729
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
730
echo_test_string="`eval $cmd`" &&
731
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
738
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
739
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
740
test "X$echo_testing_string" = "X$echo_test_string"; then
743
# The Solaris, AIX, and Digital Unix default echo programs unquote
744
# backslashes. This makes it impossible to quote backslashes using
745
# echo "$something" | sed 's/\\/\\\\/g'
747
# So, first we look for a working echo in the user's PATH.
749
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
750
for dir in $PATH /usr/ucb; do
752
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
753
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
754
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
755
test "X$echo_testing_string" = "X$echo_test_string"; then
762
if test "X$echo" = Xecho; then
763
# We didn't find a better echo, so look for alternatives.
764
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
765
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
766
test "X$echo_testing_string" = "X$echo_test_string"; then
767
# This shell has a builtin print -r that does the trick.
769
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
770
test "X$CONFIG_SHELL" != X/bin/ksh; then
771
# If we have ksh, try running configure again with it.
772
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
773
export ORIGINAL_CONFIG_SHELL
774
CONFIG_SHELL=/bin/ksh
776
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
780
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
781
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
782
test "X$echo_testing_string" = "X$echo_test_string"; then
785
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
786
test "X$echo_testing_string" = 'X\t' &&
787
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
788
test "X$echo_testing_string" = "X$echo_test_string"; then
789
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
791
SHELL="$CONFIG_SHELL"
793
echo="$CONFIG_SHELL [$]0 --fallback-echo"
794
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
795
test "X$echo_testing_string" = 'X\t' &&
796
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
797
test "X$echo_testing_string" = "X$echo_test_string"; then
798
echo="$CONFIG_SHELL [$]0 --fallback-echo"
800
# maybe with a smaller string...
803
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
804
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
811
if test "$prev" != 'sed 50q "[$]0"'; then
812
echo_test_string=`eval $prev`
813
export echo_test_string
814
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
816
# Oops. We lost completely, so just stick with echo.
825
# Copy echo and quote the copy suitably for passing to libtool from
826
# the Makefile, instead of quoting the original, which is used later.
828
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
829
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
834
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
835
_LT_DECL([], [echo], [1],
836
[An echo program that does not interpret backslashes])
837
])# _LT_AC_PROG_ECHO_BACKSLASH
842
AC_DEFUN([_LT_AC_LOCK],
843
[AC_REQUIRE([AC_OBJEXT])dnl
844
AC_ARG_ENABLE([libtool-lock],
845
[AC_HELP_STRING([--disable-libtool-lock],
846
[avoid locking (might break parallel builds)])])
847
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
849
# Some flags need to be propagated to the compiler or linker for good
853
# Find out which ABI we are using.
854
echo 'int i;' > conftest.$ac_ext
855
if AC_TRY_EVAL(ac_compile); then
856
case `/usr/bin/file conftest.$ac_objext` in
868
# Find out which ABI we are using.
869
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
870
if AC_TRY_EVAL(ac_compile); then
871
if test "$lt_cv_prog_gnu_ld" = yes; then
872
case `/usr/bin/file conftest.$ac_objext` in
874
LD="${LD-ld} -melf32bsmip"
877
LD="${LD-ld} -melf32bmipn32"
880
LD="${LD-ld} -melf64bmip"
884
case `/usr/bin/file conftest.$ac_objext` in
900
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
901
# Find out which ABI we are using.
902
echo 'int i;' > conftest.$ac_ext
903
if AC_TRY_EVAL(ac_compile); then
904
case "`/usr/bin/file conftest.o`" in
908
LD="${LD-ld} -m elf_i386"
910
ppc64-*linux*|powerpc64-*linux*)
911
LD="${LD-ld} -m elf32ppclinux"
914
LD="${LD-ld} -m elf_s390"
917
LD="${LD-ld} -m elf32_sparc"
924
LD="${LD-ld} -m elf_x86_64"
926
ppc*-*linux*|powerpc*-*linux*)
927
LD="${LD-ld} -m elf64ppc"
930
LD="${LD-ld} -m elf64_s390"
933
LD="${LD-ld} -m elf64_sparc"
943
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
944
SAVE_CFLAGS="$CFLAGS"
945
CFLAGS="$CFLAGS -belf"
946
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
948
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
950
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
951
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
952
CFLAGS="$SAVE_CFLAGS"
957
need_locks="$enable_libtool_lock"
961
# AC_LIBTOOL_SYS_OLD_ARCHIVE
962
# --------------------------
963
AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE],
964
[AC_CHECK_TOOL(AR, ar, false)
965
test -z "$AR" && AR=ar
966
test -z "$AR_FLAGS" && AR_FLAGS=cru
967
_LT_DECL([], [AR], [1], [The archiver])
968
_LT_DECL([], [AR_FLAGS], [1])
970
AC_CHECK_TOOL(STRIP, strip, :)
971
test -z "$STRIP" && STRIP=:
972
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
974
AC_CHECK_TOOL(RANLIB, ranlib, :)
975
test -z "$RANLIB" && RANLIB=:
976
_LT_DECL([], [RANLIB], [1],
977
[Commands used to install an old-style archive])
979
# Determine commands to create old-style static archives.
980
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
981
old_postinstall_cmds='chmod 644 $oldlib'
982
old_postuninstall_cmds=
984
if test -n "$RANLIB"; then
987
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
990
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
993
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
995
_LT_DECL([], [old_postinstall_cmds], [2])
996
_LT_DECL([], [old_postuninstall_cmds], [2])
997
_LT_TAGDECL([], [old_archive_cmds], [2],
998
[Commands used to build an old-style archive])
999
])# AC_LIBTOOL_SYS_OLD_ARCHIVE
1002
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1003
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1004
# ----------------------------------------------------------------
1005
# Check whether the given compiler option works
1006
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1007
[AC_REQUIRE([AC_OBJEXT])dnl
1008
AC_REQUIRE([LT_AC_PROG_SED])dnl
1009
AC_CACHE_CHECK([$1], [$2],
1011
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1012
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1013
lt_compiler_flag="$3"
1014
# Insert the option either (1) after the last *FLAGS variable, or
1015
# (2) before a word containing "conftest.", or (3) at the end.
1016
# Note that $ac_compile itself does not contain backslashes and begins
1017
# with a dollar sign (not a hyphen), so the echo should work correctly.
1018
# The option is referenced via a variable to avoid confusing sed.
1019
lt_compile=`echo "$ac_compile" | $SED \
1020
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1021
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1022
-e 's:$: $lt_compiler_flag:'`
1023
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1024
(eval "$lt_compile" 2>conftest.err)
1026
cat conftest.err >&AS_MESSAGE_LOG_FD
1027
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1028
if (exit $ac_status) && test -s "$ac_outfile"; then
1029
# The compiler can only warn and ignore the option if not recognized
1030
# So say no if there are warnings
1031
if test ! -s conftest.err; then
1038
if test x"[$]$2" = xyes; then
1039
m4_if([$5], , :, [$5])
1041
m4_if([$6], , :, [$6])
1043
])# AC_LIBTOOL_COMPILER_OPTION
1046
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1047
# [ACTION-SUCCESS], [ACTION-FAILURE])
1048
# ------------------------------------------------------------
1049
# Check whether the given compiler option works
1050
m4_define([AC_LIBTOOL_LINKER_OPTION],
1051
[AC_CACHE_CHECK([$1], [$2],
1053
save_LDFLAGS="$LDFLAGS"
1054
LDFLAGS="$LDFLAGS $3"
1055
printf "$lt_simple_link_test_code" > conftest.$ac_ext
1056
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1057
# The compiler can only warn and ignore the option if not recognized
1058
# So say no if there are warnings
1059
if test -s conftest.err; then
1060
# Append any errors to the config.log.
1061
cat conftest.err 1>&AS_MESSAGE_LOG_FD
1067
LDFLAGS="$save_LDFLAGS"
1070
if test x"[$]$2" = xyes; then
1071
m4_if([$4], , :, [$4])
1073
m4_if([$5], , :, [$5])
1075
])# AC_LIBTOOL_LINKER_OPTION
1078
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1079
# --------------------------
1080
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1081
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1082
# find the maximum length of command line arguments
1083
AC_MSG_CHECKING([the maximum length of command line arguments])
1084
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1090
# On DJGPP, this test can blow up pretty badly due to problems in libc
1091
# (any single argument exceeding 2000 bytes causes a buffer overrun
1092
# during glob expansion). Even if it were fixed, the result of this
1093
# check would be larger than it should be.
1094
lt_cv_sys_max_cmd_len=12288; # 12K is about right
1098
# Under GNU Hurd, this test is not required because there is
1099
# no limit to the length of command line arguments.
1100
# Libtool will interpret -1 as no limit whatsoever
1101
lt_cv_sys_max_cmd_len=-1;
1105
# On Win9x/ME, this test blows up -- it succeeds, but takes
1106
# about 5 minutes as the teststring grows exponentially.
1107
# Worse, since 9x/ME are not pre-emptively multitasking,
1108
# you end up with a "frozen" computer, even though with patience
1109
# the test eventually succeeds (with a max line length of 256k).
1110
# Instead, let's just punt: use the minimum linelength reported by
1111
# all of the supported platforms: 8192 (on NT/2K/XP).
1112
lt_cv_sys_max_cmd_len=8192;
1116
# On AmigaOS with pdksh, this test takes hours, literally.
1117
# So we just punt and use a minimum line length of 8192.
1118
lt_cv_sys_max_cmd_len=8192;
1121
netbsd* | freebsd* | openbsd* | darwin* )
1122
# This has been around since 386BSD, at least. Likely further.
1123
if test -x /sbin/sysctl; then
1124
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1125
elif test -x /usr/sbin/sysctl; then
1126
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1128
lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
1130
# And add a safety zone
1131
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1134
# Make teststring a little bigger before we do anything with it.
1135
# a 1K string should be a reasonable start.
1136
for i in 1 2 3 4 5 6 7 8 ; do
1137
teststring=$teststring$teststring
1139
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1140
# If test is not a shell built-in, we'll probably end up computing a
1141
# maximum length that is only half of the actual maximum length, but
1143
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1144
= "XX$teststring$teststring") >/dev/null 2>&1 &&
1145
test $i != 17 # 1/2 MB should be enough
1148
teststring=$teststring$teststring
1150
# Only check the string length outside the loop.
1151
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1153
# Add a significant safety factor because C++ compilers can tack on massive
1154
# amounts of additional arguments before passing them to the linker.
1155
# It appears as though 1/2 is a usable value.
1156
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1160
if test -n $lt_cv_sys_max_cmd_len ; then
1161
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1165
_LT_DECL([max_cmd_len], [lt_cv_sys_max_cmd_len], [0],
1166
[What is the maximum length of a command?])
1167
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1170
# _LT_AC_CHECK_DLFCN
1171
# --------------------
1172
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1173
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1174
])# _LT_AC_CHECK_DLFCN
1177
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1178
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1179
# ------------------------------------------------------------------
1180
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1181
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1182
if test "$cross_compiling" = yes; then :
1185
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1186
lt_status=$lt_dlunknown
1187
cat > conftest.$ac_ext <<_LT_EOF
1188
[#line __oline__ "configure"
1189
#include "confdefs.h"
1198
# define LT_DLGLOBAL RTLD_GLOBAL
1201
# define LT_DLGLOBAL DL_GLOBAL
1203
# define LT_DLGLOBAL 0
1207
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1208
find out it does not work in some platform. */
1209
#ifndef LT_DLLAZY_OR_NOW
1211
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1214
# define LT_DLLAZY_OR_NOW DL_LAZY
1217
# define LT_DLLAZY_OR_NOW RTLD_NOW
1220
# define LT_DLLAZY_OR_NOW DL_NOW
1222
# define LT_DLLAZY_OR_NOW 0
1230
extern "C" void exit (int);
1233
void fnord() { int i=42;}
1236
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1237
int status = $lt_dlunknown;
1241
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1242
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1243
/* dlclose (self); */
1249
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1250
(./conftest; exit; ) 2>/dev/null
1253
x$lt_dlno_uscore) $1 ;;
1254
x$lt_dlneed_uscore) $2 ;;
1255
x$lt_unknown|x*) $3 ;;
1258
# compilation failed
1263
])# _LT_AC_TRY_DLOPEN_SELF
1266
# AC_LIBTOOL_DLOPEN_SELF
1267
# -------------------
1268
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1269
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1270
if test "x$enable_dlopen" != xyes; then
1271
enable_dlopen=unknown
1272
enable_dlopen_self=unknown
1273
enable_dlopen_self_static=unknown
1280
lt_cv_dlopen="load_add_on"
1282
lt_cv_dlopen_self=yes
1286
lt_cv_dlopen="LoadLibrary"
1291
lt_cv_dlopen="dlopen"
1296
# if libdl is installed we need to link against it
1297
AC_CHECK_LIB([dl], [dlopen],
1298
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1301
lt_cv_dlopen_self=yes
1306
AC_CHECK_FUNC([shl_load],
1307
[lt_cv_dlopen="shl_load"],
1308
[AC_CHECK_LIB([dld], [shl_load],
1309
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1310
[AC_CHECK_FUNC([dlopen],
1311
[lt_cv_dlopen="dlopen"],
1312
[AC_CHECK_LIB([dl], [dlopen],
1313
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1314
[AC_CHECK_LIB([svld], [dlopen],
1315
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1316
[AC_CHECK_LIB([dld], [dld_link],
1317
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1326
if test "x$lt_cv_dlopen" != xno; then
1332
case $lt_cv_dlopen in
1334
save_CPPFLAGS="$CPPFLAGS"
1335
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1337
save_LDFLAGS="$LDFLAGS"
1338
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1341
LIBS="$lt_cv_dlopen_libs $LIBS"
1343
AC_CACHE_CHECK([whether a program can dlopen itself],
1344
lt_cv_dlopen_self, [dnl
1345
_LT_AC_TRY_DLOPEN_SELF(
1346
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1347
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1350
if test "x$lt_cv_dlopen_self" = xyes; then
1351
LDFLAGS="$LDFLAGS $link_static_flag"
1352
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1353
lt_cv_dlopen_self_static, [dnl
1354
_LT_AC_TRY_DLOPEN_SELF(
1355
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1356
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1360
CPPFLAGS="$save_CPPFLAGS"
1361
LDFLAGS="$save_LDFLAGS"
1366
case $lt_cv_dlopen_self in
1367
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1368
*) enable_dlopen_self=unknown ;;
1371
case $lt_cv_dlopen_self_static in
1372
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1373
*) enable_dlopen_self_static=unknown ;;
1376
_LT_DECL([dlopen_support], [enable_dlopen], [0],
1377
[Whether dlopen is supported])
1378
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1379
[Whether dlopen of programs is supported])
1380
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1381
[Whether dlopen of statically linked programs is supported])
1382
])# AC_LIBTOOL_DLOPEN_SELF
1385
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1386
# ---------------------------------
1387
# Check to see if options -c and -o are simultaneously supported by compiler
1388
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1389
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1390
AC_REQUIRE([AC_OBJEXT])dnl
1391
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1392
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1393
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1394
$rm -r conftest 2>/dev/null
1398
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1400
lt_compiler_flag="-o out/conftest2.$ac_objext"
1401
# Insert the option either (1) after the last *FLAGS variable, or
1402
# (2) before a word containing "conftest.", or (3) at the end.
1403
# Note that $ac_compile itself does not contain backslashes and begins
1404
# with a dollar sign (not a hyphen), so the echo should work correctly.
1405
lt_compile=`echo "$ac_compile" | $SED \
1406
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1407
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1408
-e 's:$: $lt_compiler_flag:'`
1409
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1410
(eval "$lt_compile" 2>out/conftest.err)
1412
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1413
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1414
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1416
# The compiler can only warn and ignore the option if not recognized
1417
# So say no if there are warnings
1418
if test ! -s out/conftest.err; then
1419
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1424
# SGI C++ compiler will create directory out/ii_files/ for
1425
# template instantiation
1426
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1427
$rm out/* && rmdir out
1432
_LT_DECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1433
[Does compiler simultaneously support -c and -o options?])
1434
])# AC_LIBTOOL_PROG_CC_C_O
1437
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1438
# -----------------------------------------
1439
# Check to see if we can do hard links to lock some files if needed
1440
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1441
[AC_REQUIRE([AC_LIBTOOL_PROG_CC_C_O])dnl
1442
AC_REQUIRE([_LT_AC_LOCK])dnl
1444
hard_links="nottested"
1445
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1446
# do not overwrite the value of need_locks provided by the user
1447
AC_MSG_CHECKING([if we can lock with hard links])
1450
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1452
ln conftest.a conftest.b 2>&5 || hard_links=no
1453
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1454
AC_MSG_RESULT([$hard_links])
1455
if test "$hard_links" = no; then
1456
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1462
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1463
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1468
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1469
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1470
[rm -f .libs 2>/dev/null
1471
mkdir .libs 2>/dev/null
1472
if test -d .libs; then
1475
# MS-DOS does not allow filenames that begin with a dot.
1478
rmdir .libs 2>/dev/null])
1479
objdir=$lt_cv_objdir
1480
_LT_DECL([], [objdir], [0],
1481
[The name of the directory that contains temporary libtool files])dnl
1482
])# AC_LIBTOOL_OBJDIR
1485
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1486
# ----------------------------------------------
1487
# Check hardcoding attributes.
1488
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1489
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1490
_LT_AC_TAGVAR(hardcode_action, $1)=
1491
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1492
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" ||
1493
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1495
# We can hardcode non-existant directories.
1496
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1497
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1498
# have to relink, otherwise we might link with an installed library
1499
# when we should be linking with a yet-to-be-installed one
1500
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1501
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1502
# Linking always hardcodes the temporary library directory.
1503
_LT_AC_TAGVAR(hardcode_action, $1)=relink
1505
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1506
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
1509
# We cannot hardcode anything, or else we can only hardcode existing
1511
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1513
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1515
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink ||
1516
test "$_LT_AC_TAGVAR(inherit_rpath, $1)" = yes; then
1517
# Fast installation is not supported
1518
enable_fast_install=no
1519
elif test "$shlibpath_overrides_runpath" = yes ||
1520
test "$enable_shared" = no; then
1521
# Fast installation is not necessary
1522
enable_fast_install=needless
1524
_LT_TAGDECL([], [hardcode_action], [0],
1525
[How to hardcode a shared library path into an executable])
1526
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1529
# AC_LIBTOOL_SYS_LIB_STRIP
1530
# ------------------------
1531
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1532
[AC_REQUIRE([LT_AC_PROG_EGREP])
1535
AC_MSG_CHECKING([whether stripping libraries is possible])
1536
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1537
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1538
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1539
AC_MSG_RESULT([yes])
1541
# FIXME - insert some real tests, host_os isn't really good enough
1544
if test -n "$STRIP" ; then
1545
striplib="$STRIP -x"
1546
AC_MSG_RESULT([yes])
1556
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1557
_LT_DECL([], [striplib], [1])
1558
])# AC_LIBTOOL_SYS_LIB_STRIP
1561
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1562
# -----------------------------
1563
# PORTME Fill in your ld.so characteristics
1564
m4_defun([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1565
[AC_REQUIRE([LT_AC_PROG_EGREP])
1566
AC_MSG_CHECKING([dynamic linker characteristics])
1568
[C], [withGCC=$GCC],
1569
[CXX], [withGCC=$GXX],
1570
[F77], [withGCC=$G77],
1573
libname_spec='lib$name'
1581
shlibpath_overrides_runpath=unknown
1583
dynamic_linker="$host_os ld.so"
1584
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1585
if test "$withGCC" = yes; then
1586
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1587
if echo "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
1588
# if the path contains ";" then we assume it to be the separator
1589
# otherwise default to the standard path separator (i.e. ":") - it is
1590
# assumed that no part of a normal pathname contains ";" but that should
1591
# okay in the real world where ";" in dirpaths is itself problematic.
1592
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1594
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1597
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1599
need_lib_prefix=unknown
1600
hardcode_into_libs=no
1602
# when you set need_version to no, make sure it does not cause -set_version
1603
# flags to be left without arguments
1604
need_version=unknown
1609
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1610
shlibpath_var=LIBPATH
1612
# AIX 3 has no versioning support, so we append a major version to the name.
1613
soname_spec='${libname}${release}${shared_ext}$major'
1620
hardcode_into_libs=yes
1621
if test "$host_cpu" = ia64; then
1622
# AIX 5 supports IA64
1623
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1624
shlibpath_var=LD_LIBRARY_PATH
1626
# With GCC up to 2.95.x, collect2 would create an import file
1627
# for dependence libraries. The import file would start with
1628
# the line `#! .'. This would cause the generated library to
1629
# depend on `.', always an invalid library. This was fixed in
1630
# development snapshots of GCC prior to 3.0.
1632
aix4 | aix4.[[01]] | aix4.[[01]].*)
1633
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1635
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1642
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1643
# soname into executable. Probably we can add versioning support to
1644
# collect2, so additional links can be useful in future.
1645
if test "$aix_use_runtimelinking" = yes; then
1646
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
1647
# instead of lib<name>.a to let people know that these are not
1648
# typical AIX shared libraries.
1649
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1651
# We preserve .a as extension for shared libraries through AIX4.2
1652
# and later when we are not doing run time linking.
1653
library_names_spec='${libname}${release}.a $libname.a'
1654
soname_spec='${libname}${release}${shared_ext}$major'
1656
shlibpath_var=LIBPATH
1661
if test "$host_cpu" = m68k; then
1662
library_names_spec='$libname.ixlibrary $libname.a'
1663
# Create ${libname}_ixlibrary.a entries in /sys/libs.
1664
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'
1671
library_names_spec='${libname}${shared_ext}'
1672
dynamic_linker="$host_os ld.so"
1673
shlibpath_var=LIBRARY_PATH
1679
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1680
soname_spec='${libname}${release}${shared_ext}$major'
1681
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1682
shlibpath_var=LD_LIBRARY_PATH
1683
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1684
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1685
# the default ld.so.conf also contains /usr/contrib/lib and
1686
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1687
# libtool to hard-code these into programs
1690
cygwin* | mingw* | pw32*)
1691
version_type=windows
1696
case $withGCC,$host_os in
1697
yes,cygwin* | yes,mingw* | yes,pw32*)
1698
library_names_spec='$libname.dll.a'
1699
# DLL is installed to $(libdir)/../bin by postinstall_cmds
1700
postinstall_cmds='base_file=`basename \${file}`~
1701
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1702
dldir=$destdir/`dirname \$dlpath`~
1703
test -d \$dldir || mkdir -p \$dldir~
1704
$install_prog $dir/$dlname \$dldir/$dlname'
1705
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1706
dlpath=$dir/\$dldll~
1708
shlibpath_overrides_runpath=yes
1712
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
1713
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1714
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1717
# MinGW DLLs use traditional 'lib' prefix
1718
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1719
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1720
if echo "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
1721
# It is most probably a Windows format PATH printed by
1722
# mingw gcc, but we are running on Cygwin. Gcc prints its search
1723
# path with ; separators, and with drive letters. We can handle the
1724
# drive letters (cygwin fileutils understands them), so leave them,
1725
# especially as we might pass files found there to a mingw objdump,
1726
# which wouldn't understand a cygwinified path. Ahh.
1727
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1729
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1733
# pw32 DLLs use 'pw' prefix rather than 'lib'
1734
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1740
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1743
dynamic_linker='Win32 ld.exe'
1744
# FIXME: first we should search . and the directory the executable is in
1748
darwin* | rhapsody*)
1749
dynamic_linker="$host_os dyld"
1753
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1754
soname_spec='${libname}${release}${major}$shared_ext'
1755
shlibpath_overrides_runpath=yes
1756
shlibpath_var=DYLD_LIBRARY_PATH
1757
shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1758
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1759
if test "$withGCC" = yes; then
1760
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1762
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1764
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1771
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1772
soname_spec='${libname}${release}${shared_ext}$major'
1773
shlibpath_var=LD_LIBRARY_PATH
1784
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1785
soname_spec='${libname}${release}${shared_ext}$major'
1786
shlibpath_var=LD_LIBRARY_PATH
1787
shlibpath_overrides_runpath=no
1788
hardcode_into_libs=yes
1789
dynamic_linker='GNU ld.so'
1793
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1794
version_type=freebsd-$objformat
1795
case $version_type in
1797
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1802
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1806
shlibpath_var=LD_LIBRARY_PATH
1809
shlibpath_overrides_runpath=yes
1811
freebsd3.[01]* | freebsdelf3.[01]*)
1812
shlibpath_overrides_runpath=yes
1813
hardcode_into_libs=yes
1816
shlibpath_overrides_runpath=no
1817
hardcode_into_libs=yes
1826
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1827
soname_spec='${libname}${release}${shared_ext}$major'
1828
shlibpath_var=LD_LIBRARY_PATH
1829
hardcode_into_libs=yes
1832
hpux9* | hpux10* | hpux11*)
1833
# Give a soname corresponding to the major version so that dld.sl refuses to
1834
# link against other versions.
1841
hardcode_into_libs=yes
1842
dynamic_linker="$host_os dld.so"
1843
shlibpath_var=LD_LIBRARY_PATH
1844
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1845
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1846
soname_spec='${libname}${release}${shared_ext}$major'
1847
if test "X$HPUX_IA64_MODE" = X32; then
1848
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1850
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1852
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1856
hardcode_into_libs=yes
1857
dynamic_linker="$host_os dld.sl"
1858
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1859
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1860
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1861
soname_spec='${libname}${release}${shared_ext}$major'
1862
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1863
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1867
dynamic_linker="$host_os dld.sl"
1868
shlibpath_var=SHLIB_PATH
1869
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1870
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1871
soname_spec='${libname}${release}${shared_ext}$major'
1874
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1875
postinstall_cmds='chmod 555 $lib'
1878
irix5* | irix6* | nonstopux*)
1880
nonstopux*) version_type=nonstopux ;;
1882
if test "$lt_cv_prog_gnu_ld" = yes; then
1890
soname_spec='${libname}${release}${shared_ext}$major'
1891
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1893
irix5* | nonstopux*)
1897
case $LD in # libtool.m4 will add one of these switches to LD
1898
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1899
libsuff= shlibsuff= libmagic=32-bit;;
1900
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1901
libsuff=32 shlibsuff=N32 libmagic=N32;;
1902
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1903
libsuff=64 shlibsuff=64 libmagic=64-bit;;
1904
*) libsuff= shlibsuff= libmagic=never-match;;
1908
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1909
shlibpath_overrides_runpath=no
1910
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1911
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1912
hardcode_into_libs=yes
1915
# No shared lib support for Linux oldld, aout, or coff.
1916
linux*oldld* | linux*aout* | linux*coff*)
1920
# This must be Linux ELF.
1925
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1926
soname_spec='${libname}${release}${shared_ext}$major'
1927
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1928
shlibpath_var=LD_LIBRARY_PATH
1929
shlibpath_overrides_runpath=no
1930
# This implies no fast_install, which is unacceptable.
1931
# Some rework will be needed to allow for fast_install
1932
# before this can be enabled.
1933
hardcode_into_libs=yes
1935
# Append ld.so.conf contents to the search path
1936
if test -f /etc/ld.so.conf; then
1937
lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1938
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1941
# We used to test for /lib/ld.so.1 and disable shared libraries on
1942
# powerpc, because MkLinux only supported shared libraries with the
1943
# GNU dynamic linker. Since this was broken with cross compilers,
1944
# most powerpc-linux boxes support dynamic linking these days and
1945
# people can always --disable-shared, the test was removed, and we
1946
# assume the GNU/Linux dynamic linker is in use.
1947
dynamic_linker='GNU/Linux ld.so'
1954
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1955
soname_spec='${libname}${release}${shared_ext}$major'
1956
shlibpath_var=LD_LIBRARY_PATH
1957
shlibpath_overrides_runpath=no
1958
hardcode_into_libs=yes
1959
dynamic_linker='GNU ld.so'
1966
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1967
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1968
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1969
dynamic_linker='NetBSD (a.out) ld.so'
1971
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1972
soname_spec='${libname}${release}${shared_ext}$major'
1973
dynamic_linker='NetBSD ld.elf_so'
1975
shlibpath_var=LD_LIBRARY_PATH
1976
shlibpath_overrides_runpath=yes
1977
hardcode_into_libs=yes
1982
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1983
shlibpath_var=LD_LIBRARY_PATH
1984
shlibpath_overrides_runpath=yes
1991
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1992
soname_spec='${libname}${release}${shared_ext}$major'
1993
shlibpath_var=LD_LIBRARY_PATH
1994
shlibpath_overrides_runpath=no
1995
hardcode_into_libs=yes
1996
dynamic_linker='ldqnx.so'
2003
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2004
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2005
shlibpath_var=LD_LIBRARY_PATH
2006
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2008
openbsd2.[[89]] | openbsd2.[[89]].*)
2009
shlibpath_overrides_runpath=no
2012
shlibpath_overrides_runpath=yes
2016
shlibpath_overrides_runpath=yes
2021
libname_spec='$name'
2024
library_names_spec='$libname${shared_ext} $libname.a'
2025
dynamic_linker='OS/2 ld.exe'
2026
shlibpath_var=LIBPATH
2029
osf3* | osf4* | osf5*)
2033
soname_spec='${libname}${release}${shared_ext}$major'
2034
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2035
shlibpath_var=LD_LIBRARY_PATH
2036
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2037
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2042
soname_spec='${libname}${release}${shared_ext}$major'
2043
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2044
shlibpath_var=LD_LIBRARY_PATH
2051
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2052
soname_spec='${libname}${release}${shared_ext}$major'
2053
shlibpath_var=LD_LIBRARY_PATH
2054
shlibpath_overrides_runpath=yes
2055
hardcode_into_libs=yes
2056
# ldd complains unless libraries are executable
2057
postinstall_cmds='chmod +x $lib'
2062
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2063
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2064
shlibpath_var=LD_LIBRARY_PATH
2065
shlibpath_overrides_runpath=yes
2066
if test "$with_gnu_ld" = yes; then
2072
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2074
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2075
soname_spec='${libname}${release}${shared_ext}$major'
2076
shlibpath_var=LD_LIBRARY_PATH
2077
case $host_vendor in
2079
shlibpath_overrides_runpath=no
2081
runpath_var=LD_RUN_PATH
2089
shlibpath_overrides_runpath=no
2090
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2096
if test -d /usr/nec ;then
2098
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2099
soname_spec='$libname${shared_ext}.$major'
2100
shlibpath_var=LD_LIBRARY_PATH
2106
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2107
soname_spec='${libname}${release}${shared_ext}$major'
2108
shlibpath_var=LD_LIBRARY_PATH
2115
AC_MSG_RESULT([$dynamic_linker])
2116
test "$dynamic_linker" = no && can_build_shared=no
2117
_LT_DECL([], [need_lib_prefix], [0],
2118
[Do we need the "lib" prefix for modules?])
2119
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2120
_LT_DECL([], [version_type], [0], [Library versioning type])
2121
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2122
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2123
_LT_DECL([], [shlibpath_overrides_runpath], [0],
2124
[Is shibpath searched before the hard-coded library search path?])
2125
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2126
_LT_DECL([], [library_names_spec], [1],
2127
[List of archive names. First name is the real one, the rest are links.
2128
The last name is the one that the linker finds with -lNAME])
2129
_LT_DECL([], [soname_spec], [1],
2130
[The coded name of the library, if different from the real name])
2131
_LT_DECL([], [postinstall_cmds], [2],
2132
[Command to use after installation of a shared archive])
2133
_LT_DECL([], [postuninstall_cmds], [2],
2134
[Command to use after uninstallation of a shared archive])
2135
_LT_DECL([], [finish_cmds], [2],
2136
[Commands used to finish a libtool library installation in a directory])
2137
_LT_DECL([], [finish_eval], [1],
2138
[As "finish_cmds", except a single script fragment to be evaled but
2140
_LT_DECL([], [hardcode_into_libs], [0],
2141
[Whether we should hardcode library paths into libraries])
2142
_LT_DECL([], [sys_lib_search_path_spec], [2],
2143
[Compile-time system search path for libraries])
2144
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2145
[Run-time system search path for libraries])
2146
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2149
# AC_PATH_TOOL_PREFIX
2150
# -------------------
2151
# find a file program which can recognise shared library
2152
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2153
[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2154
AC_MSG_CHECKING([for $1])
2155
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2157
[[\\/*] | ?:[\\/]*])
2158
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2161
lt_save_MAGIC_CMD="$MAGIC_CMD"
2162
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2163
dnl $ac_dummy forces splitting on constant user-supplied paths.
2164
dnl POSIX.2 word splitting is done only on the output of word expansions,
2165
dnl not every word. This closes a longstanding sh security hole.
2166
ac_dummy="m4_if([$2], , $PATH, [$2])"
2167
for ac_dir in $ac_dummy; do
2169
test -z "$ac_dir" && ac_dir=.
2170
if test -f $ac_dir/$1; then
2171
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2172
if test -n "$file_magic_test_file"; then
2173
case $deplibs_check_method in
2175
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2176
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2177
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2178
$EGREP "$file_magic_regex" > /dev/null; then
2183
*** Warning: the command libtool uses to detect shared libraries,
2184
*** $file_magic_cmd, produces output that libtool cannot recognize.
2185
*** The result is that libtool may fail to recognize shared libraries
2186
*** as such. This will affect the creation of libtool libraries that
2187
*** depend on shared libraries, but programs linked with such libtool
2188
*** libraries will work regardless of this problem. Nevertheless, you
2189
*** may want to report the problem to your system manager and/or to
2190
*** bug-libtool@gnu.org
2200
MAGIC_CMD="$lt_save_MAGIC_CMD"
2203
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2204
if test -n "$MAGIC_CMD"; then
2205
AC_MSG_RESULT($MAGIC_CMD)
2209
_LT_DECL([], [MAGIC_CMD], [0],
2210
[Used to examine libraries when file_magic_cmd begins "file"])dnl
2211
])# AC_PATH_TOOL_PREFIX
2216
# find a file program which can recognise a shared library
2217
AC_DEFUN([AC_PATH_MAGIC],
2218
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2219
if test -z "$lt_cv_path_MAGIC_CMD"; then
2220
if test -n "$ac_tool_prefix"; then
2221
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2231
# find the pathname to the GNU or non-GNU linker
2232
AC_DEFUN([AC_PROG_LD],
2233
[AC_ARG_WITH([gnu-ld],
2234
[AC_HELP_STRING([--with-gnu-ld],
2235
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2236
[test "$withval" = no || with_gnu_ld=yes],
2238
AC_REQUIRE([LT_AC_PROG_SED])dnl
2239
AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2240
AC_REQUIRE([AC_PROG_CC])dnl
2241
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2242
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2245
if test "$GCC" = yes; then
2246
# Check if gcc -print-prog-name=ld gives a path.
2247
AC_MSG_CHECKING([for ld used by $CC])
2250
# gcc leaves a trailing carriage return which upsets mingw
2251
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2253
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2256
# Accept absolute paths.
2257
[[\\/]]* | ?:[[\\/]]*)
2258
re_direlt='/[[^/]][[^/]]*/\.\./'
2259
# Canonicalize the pathname of ld
2260
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2261
while echo $ac_prog | $GREP "$re_direlt" > /dev/null 2>&1; do
2262
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2264
test -z "$LD" && LD="$ac_prog"
2267
# If it fails, then pretend we aren't using GCC.
2271
# If it is relative, then search for the first ld in PATH.
2275
elif test "$with_gnu_ld" = yes; then
2276
AC_MSG_CHECKING([for GNU ld])
2278
AC_MSG_CHECKING([for non-GNU ld])
2280
AC_CACHE_VAL(lt_cv_path_LD,
2281
[if test -z "$LD"; then
2282
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2283
for ac_dir in $PATH; do
2285
test -z "$ac_dir" && ac_dir=.
2286
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2287
lt_cv_path_LD="$ac_dir/$ac_prog"
2288
# Check to see if the program is GNU ld. I'd rather use --version,
2289
# but apparently some GNU ld's only accept -v.
2290
# Break only if it was the GNU/non-GNU ld that we prefer.
2291
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2292
*GNU* | *'with BFD'*)
2293
test "$with_gnu_ld" != no && break
2296
test "$with_gnu_ld" != yes && break
2303
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2306
if test -n "$LD"; then
2311
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2315
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2319
AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
2324
AC_DEFUN([AC_PROG_LD_GNU],
2325
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2326
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2327
case `$LD -v 2>&1 </dev/null` in
2328
*GNU* | *'with BFD'*)
2329
lt_cv_prog_gnu_ld=yes
2332
lt_cv_prog_gnu_ld=no
2335
with_gnu_ld=$lt_cv_prog_gnu_ld
2339
# AC_PROG_LD_RELOAD_FLAG
2340
# ----------------------
2341
# find reload flag for linker
2342
# -- PORTME Some linkers may need a different reload flag.
2343
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2344
[AC_CACHE_CHECK([for $LD option to reload object files],
2345
lt_cv_ld_reload_flag,
2346
[lt_cv_ld_reload_flag='-r'])
2347
reload_flag=$lt_cv_ld_reload_flag
2348
case $reload_flag in
2350
*) reload_flag=" $reload_flag" ;;
2352
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2355
if test "$GCC" = yes; then
2356
reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2358
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2362
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2363
_LT_DECL([], [reload_cmds], [2])dnl
2364
])# AC_PROG_LD_RELOAD_FLAG
2367
# AC_DEPLIBS_CHECK_METHOD
2368
# -----------------------
2369
# how to check for library dependencies
2370
# -- PORTME fill in with the dynamic library characteristics
2371
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2372
[AC_REQUIRE([LT_AC_PROG_EGREP])
2373
AC_CACHE_CHECK([how to recognise dependent libraries],
2374
lt_cv_deplibs_check_method,
2375
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2376
lt_cv_file_magic_test_file=
2377
lt_cv_deplibs_check_method='unknown'
2378
# Need to set the preceding variable on all platforms that support
2379
# interlibrary dependencies.
2380
# 'none' -- dependencies not supported.
2381
# `unknown' -- same as none, but documents that we really don't know.
2382
# 'pass_all' -- all dependencies passed with no checks.
2383
# 'test_compile' -- check by making test program.
2384
# 'file_magic [[regex]]' -- check by looking for files in library path
2385
# which responds to the $file_magic_cmd with a given extended regex.
2386
# If you have `file' or equivalent on your system and you're not sure
2387
# whether `pass_all' will *always* work, you probably want this one.
2391
lt_cv_deplibs_check_method=pass_all
2395
lt_cv_deplibs_check_method=pass_all
2399
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2400
lt_cv_file_magic_cmd='/usr/bin/file -L'
2401
lt_cv_file_magic_test_file=/shlib/libc.so
2405
# func_win32_libid is a shell function defined in ltmain.sh
2406
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2407
lt_cv_file_magic_cmd='func_win32_libid'
2410
# Base MSYS/MinGW do not provide the 'file' command needed by
2411
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
2413
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2414
lt_cv_file_magic_cmd='$OBJDUMP -f'
2417
darwin* | rhapsody*)
2418
lt_cv_deplibs_check_method=pass_all
2421
freebsd* | kfreebsd*-gnu)
2422
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2425
# Not sure whether the presence of OpenBSD here was a mistake.
2426
# Let's accept both of them until this is cleared up.
2427
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2428
lt_cv_file_magic_cmd=/usr/bin/file
2429
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2433
lt_cv_deplibs_check_method=pass_all
2438
lt_cv_deplibs_check_method=pass_all
2441
hpux10.20* | hpux11*)
2442
lt_cv_file_magic_cmd=/usr/bin/file
2445
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2446
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2449
[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]']
2450
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2453
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2454
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2459
irix5* | irix6* | nonstopux*)
2461
*-32|*"-32 ") libmagic=32-bit;;
2462
*-n32|*"-n32 ") libmagic=N32;;
2463
*-64|*"-64 ") libmagic=64-bit;;
2464
*) libmagic=never-match;;
2466
lt_cv_deplibs_check_method=pass_all
2469
# This must be Linux ELF.
2472
alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
2473
lt_cv_deplibs_check_method=pass_all ;;
2475
# glibc up to 2.1.1 does not perform some relocations on ARM
2476
# this will be overridden with pass_all, but let us keep it just in case
2477
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2479
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2480
lt_cv_deplibs_check_method=pass_all
2483
netbsd* | knetbsd*-gnu)
2484
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2485
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2487
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2492
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2493
lt_cv_file_magic_cmd=/usr/bin/file
2494
lt_cv_file_magic_test_file=/usr/lib/libnls.so
2498
lt_cv_deplibs_check_method=pass_all
2502
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2503
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2505
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2509
osf3* | osf4* | osf5*)
2510
lt_cv_deplibs_check_method=pass_all
2514
lt_cv_deplibs_check_method=pass_all
2518
lt_cv_deplibs_check_method=pass_all
2521
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2522
case $host_vendor in
2524
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]]'
2525
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2528
lt_cv_deplibs_check_method=pass_all
2531
lt_cv_file_magic_cmd='/bin/file'
2532
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2535
lt_cv_file_magic_cmd='/bin/file'
2536
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2537
lt_cv_file_magic_test_file=/lib/libc.so
2540
lt_cv_deplibs_check_method=pass_all
2545
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2546
lt_cv_deplibs_check_method=pass_all
2550
file_magic_cmd=$lt_cv_file_magic_cmd
2551
deplibs_check_method=$lt_cv_deplibs_check_method
2552
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2554
_LT_DECL([], [deplibs_check_method], [1],
2555
[Method to check whether dependent libraries are shared objects])
2556
_LT_DECL([], [file_magic_cmd], [1],
2557
[Command to use when deplibs_check_method == "file_magic"])
2558
])# AC_DEPLIBS_CHECK_METHOD
2563
# find the pathname to a BSD-compatible name lister
2564
AC_DEFUN([AC_PROG_NM],
2565
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2566
[if test -n "$NM"; then
2567
# Let the user override the test.
2570
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2571
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2573
test -z "$ac_dir" && ac_dir=.
2574
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2575
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2576
# Check to see if the nm accepts a BSD-compat flag.
2577
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2578
# nm: unknown option "B" ignored
2579
# Tru64's nm complains that /dev/null is an invalid object file
2580
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2581
*/dev/null* | *'Invalid file or object type'*)
2582
lt_cv_path_NM="$tmp_nm -B"
2586
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2588
lt_cv_path_NM="$tmp_nm -p"
2592
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2593
continue # so that we can try to find one that supports BSD flags
2600
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2603
test -z "$NM" && NM=nm
2605
_LT_DECL([], [NM], [1], [A BSD-compatible nm program])dnl
2609
AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
2614
# check for math library
2615
AC_DEFUN([AC_CHECK_LIBM],
2616
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2619
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2620
# These system don't have libm, or don't need it
2623
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2624
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2627
AC_CHECK_LIB(m, cos, LIBM="-lm")
2633
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
2634
# -------------------------------------------
2635
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
2636
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2638
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2640
if test "$GCC" = yes; then
2641
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2643
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
2644
lt_cv_prog_compiler_rtti_exceptions,
2645
[-fno-rtti -fno-exceptions], [],
2646
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
2648
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
2649
[Compiler flag to turn off builtin functions])
2650
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
2653
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2654
# ---------------------------------
2655
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
2656
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2657
AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2658
AC_REQUIRE([AC_PROG_CC])dnl
2659
AC_REQUIRE([AC_PROG_LD])dnl
2660
AC_REQUIRE([AC_PROG_NM])dnl
2661
AC_REQUIRE([AC_OBJEXT])dnl
2662
# Check for command to grab the raw symbol name followed by C symbol from nm.
2663
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
2664
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
2666
# These are sane defaults that work on at least a few old systems.
2667
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
2669
# Character class describing NM global symbol codes.
2670
symcode='[[BCDEGRST]]'
2672
# Regexp to match symbols that can be accessed directly from C.
2673
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
2675
# Transform the above into a raw symbol and a C symbol.
2676
symxfrm='\1 \2\3 \3'
2678
# Transform an extracted symbol line into a proper C declaration
2679
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
2681
# Transform an extracted symbol line into symbol name and symbol address
2682
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
2684
# Define system-specific variables.
2689
cygwin* | mingw* | pw32*)
2690
symcode='[[ABCDGISTW]]'
2692
hpux*) # Its linker distinguishes data from code symbols
2693
if test "$host_cpu" = ia64; then
2694
symcode='[[ABCDEGRST]]'
2696
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2697
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
2700
symcode='[[BCDEGRST]]'
2703
symcode='[[BCDEGQRST]]'
2709
symcode='[[DFNSTU]]'
2713
# Handle CRLF in mingw tool chain
2717
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
2721
# If we're using GNU nm, then use its standard symbol codes.
2722
case `$NM -V 2>&1` in
2723
*GNU* | *'with BFD'*)
2724
symcode='[[ABCDGIRSTW]]' ;;
2727
# Try without a prefix undercore, then with it.
2728
for ac_symprfx in "" "_"; do
2730
# Write the raw and C identifiers.
2731
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2733
# Check to see that the pipe works correctly.
2737
cat > conftest.$ac_ext <<_LT_EOF
2742
void nm_test_func(){}
2746
int main(){nm_test_var='a';nm_test_func();return(0);}
2749
if AC_TRY_EVAL(ac_compile); then
2750
# Now try to grab the symbols.
2752
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
2753
# Try sorting and uniquifying the output.
2754
if sort "$nlist" | uniq > "$nlist"T; then
2755
mv -f "$nlist"T "$nlist"
2760
# Make sure that we snagged all the symbols we need.
2761
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
2762
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
2763
cat <<_LT_EOF > conftest.$ac_ext
2769
# Now generate the symbol file.
2770
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
2772
cat <<_LT_EOF >> conftest.$ac_ext
2774
/* The mapping between symbol names and symbols. */
2776
const char *originator;
2782
lt__PROGRAM__LTX_preloaded_symbols =
2787
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
2788
cat <<\_LT_EOF >> conftest.$ac_ext
2793
/* This works around a problem in FreeBSD linker */
2794
#ifdef FREEBSD_WORKAROUND
2795
static const void *lt_preloaded_setup() {
2796
return lt__PROGRAM__LTX_preloaded_symbols;
2804
# Now try linking the two files.
2805
mv conftest.$ac_objext conftstm.$ac_objext
2806
lt_save_LIBS="$LIBS"
2807
lt_save_CFLAGS="$CFLAGS"
2808
LIBS="conftstm.$ac_objext"
2809
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
2810
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
2813
LIBS="$lt_save_LIBS"
2814
CFLAGS="$lt_save_CFLAGS"
2816
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
2819
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
2822
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
2825
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
2826
cat conftest.$ac_ext >&5
2828
rm -f conftest* conftst*
2830
# Do not use the global_symbol_pipe unless it works.
2831
if test "$pipe_works" = yes; then
2834
lt_cv_sys_global_symbol_pipe=
2838
if test -z "$lt_cv_sys_global_symbol_pipe"; then
2839
lt_cv_sys_global_symbol_to_cdecl=
2841
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
2842
AC_MSG_RESULT(failed)
2847
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
2848
[Take the output of nm and produce a listing of raw symbols and C names])
2849
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
2850
[Transform the output of nm in a proper C declaration])
2851
_LT_DECL([global_symbol_to_c_name_address],
2852
[lt_cv_sys_global_symbol_to_c_name_address], [1],
2853
[Transform the output of nm in a C name address pair])
2854
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2857
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
2858
# ---------------------------------------
2859
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
2860
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
2861
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
2862
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
2864
AC_MSG_CHECKING([for $compiler option to produce PIC])
2865
m4_if([$1], [CXX], [
2866
# C++ specific cases for pic, static, wl, etc.
2867
if test "$GXX" = yes; then
2868
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2869
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
2873
# All AIX code is PIC.
2874
if test "$host_cpu" = ia64; then
2875
# AIX 5 now supports IA64 processor
2876
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
2880
if test "$host_cpu" = m68k; then
2881
# FIXME: we need at least 68020 code to build shared libraries, but
2882
# adding the `-m68020' flag to GCC prevents building anything better,
2884
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
2887
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2888
# PIC is the default for these OSes.
2890
mingw* | os2* | pw32*)
2891
# This hack is so that the source file can tell whether it is being
2892
# built for inclusion in a dll (and should export symbols for example).
2893
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
2895
darwin* | rhapsody*)
2896
# PIC is the default on this platform
2897
# Common symbols not allowed in MH_DYLIB files
2898
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
2901
# DJGPP does not support shared libraries at all
2902
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
2905
if test -d /usr/nec; then
2906
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
2910
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
2916
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
2921
# QNX uses GNU C++, but need to define -shared option too, otherwise
2923
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
2926
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
2932
# All AIX code is PIC.
2933
if test "$host_cpu" = ia64; then
2934
# AIX 5 now supports IA64 processor
2935
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
2937
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
2941
case $cc_basename in
2943
# Green Hills C++ Compiler
2944
# _LT_AC_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"
2949
# PIC is the default on this platform
2950
# Common symbols not allowed in MH_DYLIB files
2951
case "$cc_basename" in
2953
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
2954
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2959
case $cc_basename in
2961
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
2964
# Green Hills C++ Compiler
2965
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
2971
freebsd* | kfreebsd*-gnu)
2972
# FreeBSD uses GNU C++
2974
hpux9* | hpux10* | hpux11*)
2975
case $cc_basename in
2977
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2978
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
2979
if test "$host_cpu" != ia64; then
2980
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
2984
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2985
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
2991
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
2999
irix5* | irix6* | nonstopux*)
3000
case $cc_basename in
3002
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3003
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3004
# CC pic flag -KPIC is the default.
3011
case $cc_basename in
3014
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3015
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3019
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3020
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3021
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3025
# Make sure the PIC flag is empty. It appears that all Alpha
3026
# Linux and Compaq Tru64 Unix objects are PIC.
3027
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3028
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3039
case $cc_basename in
3041
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3050
# QNX uses GNU C++, but need to define -shared option too, otherwise
3052
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3054
osf3* | osf4* | osf5*)
3055
case $cc_basename in
3057
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3060
# Rational C++ 2.4.1
3061
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3064
# Digital/Compaq C++
3065
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3066
# Make sure the PIC flag is empty. It appears that all Alpha
3067
# Linux and Compaq Tru64 Unix objects are PIC.
3068
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3069
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3078
case $cc_basename in
3080
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3087
case $cc_basename in
3089
# Sun C++ 4.2, 5.x and Centerline C++
3090
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3091
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3092
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3095
# Green Hills C++ Compiler
3096
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3103
case $cc_basename in
3106
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3107
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3111
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3118
case $cc_basename in
3120
# NonStop-UX NCC 3.20
3121
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3132
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3138
if test "$GCC" = yes; then
3139
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3140
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3144
# All AIX code is PIC.
3145
if test "$host_cpu" = ia64; then
3146
# AIX 5 now supports IA64 processor
3147
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3152
if test "$host_cpu" = m68k; then
3153
# FIXME: we need at least 68020 code to build shared libraries, but
3154
# adding the `-m68020' flag to GCC prevents building anything better,
3156
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3160
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3161
# PIC is the default for these OSes.
3164
mingw* | pw32* | os2*)
3165
# This hack is so that the source file can tell whether it is being
3166
# built for inclusion in a dll (and should export symbols for example).
3167
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3170
darwin* | rhapsody*)
3171
# PIC is the default on this platform
3172
# Common symbols not allowed in MH_DYLIB files
3173
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3177
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3184
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3190
# Just because we use GCC doesn't mean we suddenly get shared libraries
3191
# on systems that don't support them.
3192
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3197
# QNX uses GNU C++, but need to define -shared option too, otherwise
3199
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3203
if test -d /usr/nec; then
3204
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3209
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3213
# PORTME Check for flag to pass linker flags through the system compiler.
3216
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3217
if test "$host_cpu" = ia64; then
3218
# AIX 5 now supports IA64 processor
3219
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3221
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3225
# PIC is the default on this platform
3226
# Common symbols not allowed in MH_DYLIB files
3227
case "$cc_basename" in
3229
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3230
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3235
mingw* | pw32* | os2*)
3236
# This hack is so that the source file can tell whether it is being
3237
# built for inclusion in a dll (and should export symbols for example).
3238
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3241
hpux9* | hpux10* | hpux11*)
3242
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3243
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3250
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3253
# Is there a better lt_prog_compiler_static that works with the bundled CC?
3254
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3257
irix5* | irix6* | nonstopux*)
3258
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3259
# PIC (with -KPIC) is the default.
3260
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3266
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3267
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3268
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3271
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3272
# All Alpha code is PIC.
3273
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3279
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3280
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3284
# QNX uses GNU C++, but need to define -shared option too, otherwise
3286
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3289
osf3* | osf4* | osf5*)
3290
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3291
# All OSF/1 code is PIC.
3292
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3296
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
3297
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
3301
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3302
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3303
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3307
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3308
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3309
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3312
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3313
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3314
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3315
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3319
if test -d /usr/nec ;then
3320
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3321
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3326
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3327
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3331
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3337
# For platforms which do not support PIC, -DPIC is meaningless:
3339
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3342
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
3345
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
3346
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3347
[How to pass a linker flag through the compiler])
3350
# Check to make sure the PIC flag actually works.
3352
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
3353
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
3354
[_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1)],
3355
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3356
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
3358
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3360
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3361
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3363
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3364
[Additional compiler flags for building library objects])
3367
# Check to make sure the static flag actually works.
3369
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3370
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3371
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3373
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3374
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3375
[Compiler flag to prevent dynamic linking])
3376
])# AC_LIBTOOL_PROG_COMPILER_PIC
3379
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
3380
# ------------------------------------
3381
# See if the linker supports building shared libraries.
3382
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
3383
[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
3384
AC_REQUIRE([AC_PROG_LD])dnl
3385
AC_REQUIRE([AC_PROG_NM])dnl
3386
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
3387
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3388
m4_if([$1], [CXX], [
3389
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3392
# If we're using GNU nm, then we don't want the "-C" option.
3393
# -C means demangle to AIX nm, but means don't demangle with GNU nm
3394
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3395
_LT_AC_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'
3397
_LT_AC_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'
3401
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3404
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3407
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3412
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3413
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3414
_LT_AC_TAGVAR(archive_cmds, $1)=
3415
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3416
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3417
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3418
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3419
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3420
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3421
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3422
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3423
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3424
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3425
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3426
_LT_AC_TAGVAR(inherit_rpath, $1)=no
3427
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3428
_LT_AC_TAGVAR(module_cmds, $1)=
3429
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3430
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)=
3431
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3432
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
3433
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3434
# include_expsyms should be a list of space-separated symbols to be *always*
3435
# included in the symbol list
3436
_LT_AC_TAGVAR(include_expsyms, $1)=
3437
# exclude_expsyms can be an extended regexp of symbols to exclude
3438
# it will be wrapped by ` (' and `)$', so one must not match beginning or
3439
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3440
# as well as any symbol that contains `d'.
3441
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
3442
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3443
# platforms (ab)use it in PIC code, but their linkers get confused if
3444
# the symbol is explicitly referenced. Since portable code cannot
3445
# rely on this symbol name, it's probably fine to never include it in
3446
# preloaded symbol tables.
3447
extract_expsyms_cmds=
3450
cygwin* | mingw* | pw32*)
3451
# FIXME: the MSVC++ port hasn't been tested in a loooong time
3452
# When not using gcc, we currently assume that we are using
3453
# Microsoft Visual C++.
3454
if test "$GCC" != yes; then
3463
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3464
if test "$with_gnu_ld" = yes; then
3465
# If archive_cmds runs LD, not CC, wlarc should be empty
3468
# See if GNU ld supports shared libraries.
3470
aix3* | aix4* | aix5*)
3471
# On AIX/PPC, the GNU linker is very broken
3472
if test "$host_cpu" != ia64; then
3473
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3476
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
3477
*** to be unable to reliably create shared libraries on AIX.
3478
*** Therefore, libtool is disabling shared libraries support. If you
3479
*** really care for shared libraries, you may want to modify your PATH
3480
*** so that a non-GNU linker is found, and then restart.
3487
if test "$host_cpu" = m68k; then
3488
_LT_AC_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)'
3489
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3490
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3493
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3494
# that the semantics of dynamic libraries on AmigaOS, at least up
3495
# to version 4, is to share data among multiple programs linked
3496
# with the same dynamic library. Since this doesn't match the
3497
# behavior of shared libraries on other platforms, we can't use
3499
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3503
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3504
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3505
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3506
# support --undefined. This deserves some investigation. FIXME
3507
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3509
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3513
cygwin* | mingw* | pw32*)
3514
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3515
# as there is no search path for DLLs.
3516
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3517
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3518
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3519
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3520
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3522
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
3523
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3524
# If the export-symbols file already is a .def file (1st line
3525
# is EXPORTS), use it as is; otherwise, prepend...
3526
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3527
cp $export_symbols $output_objdir/$soname.def;
3529
echo EXPORTS > $output_objdir/$soname.def;
3530
cat $export_symbols >> $output_objdir/$soname.def;
3532
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3539
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3540
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3543
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3544
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3549
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
3550
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3553
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
3554
*** create shared libraries on Solaris systems. Therefore, libtool
3555
*** is disabling shared libraries support. We urge you to upgrade GNU
3556
*** binutils to release 2.9.1 or newer. Another option is to modify
3557
*** your PATH or compiler configuration so that the native linker is
3558
*** used, and then restart.
3561
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3562
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3563
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3565
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3570
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3572
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3573
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3577
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null; then
3578
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3579
case `$LD -v 2>&1` in
3580
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
3581
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
3582
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
3583
*\ 2.11.*) ;; # other 2.11 versions
3584
*) supports_anon_versioning=yes ;;
3586
if test "x$supports_anon_versioning" = xyes; then
3587
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~$echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
3589
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
3592
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3597
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3598
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3599
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3601
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3606
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
3607
runpath_var=LD_RUN_PATH
3608
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3609
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3610
# ancient GNU ld didn't support --whole-archive et. al.
3611
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
3612
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3614
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3618
# PORTME fill in a description of your system's linker (not GNU ld)
3621
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3622
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3623
_LT_AC_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'
3624
# Note: this linker hardcodes the directories in LIBPATH if there
3625
# are no directories specified by -L.
3626
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3627
if test "$GCC" = yes && test -z "$link_static_flag"; then
3628
# Neither direct hardcoding nor static linking is supported with a
3630
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3635
if test "$host_cpu" = ia64; then
3636
# On IA64, the linker does run time linking by default, so we don't
3637
# have to do anything special.
3638
aix_use_runtimelinking=no
3639
exp_sym_flag='-Bexport'
3642
# If we're using GNU nm, then we don't want the "-C" option.
3643
# -C means demangle to AIX nm, but means don't demangle with GNU nm
3644
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3645
_LT_AC_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'
3647
_LT_AC_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'
3649
aix_use_runtimelinking=no
3651
# Test if we are trying to use run time linking or normal
3652
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3653
# need to do runtime linking.
3654
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3655
for ld_flag in $LDFLAGS; do
3656
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3657
aix_use_runtimelinking=yes
3663
exp_sym_flag='-bexport'
3664
no_entry_flag='-bnoentry'
3667
# When large executables or shared objects are built, AIX ld can
3668
# have problems creating the table of contents. If linking a library
3669
# or program results in "error TOC overflow" add -mminimal-toc to
3670
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3671
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3673
_LT_AC_TAGVAR(archive_cmds, $1)=''
3674
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3675
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3676
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3678
if test "$GCC" = yes; then
3679
case $host_os in aix4.[012]|aix4.[012].*)
3680
# We only want to do this on AIX 4.2 and lower, the check
3681
# below for broken collect2 doesn't work under 4.3+
3682
collect2name=`${CC} -print-prog-name=collect2`
3683
if test -f "$collect2name" &&
3684
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
3686
# We have reworked collect2
3687
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3689
# We have old collect2
3690
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3691
# It fails to find uninstalled libraries when the uninstalled
3692
# path is not listed in the libpath. Setting hardcode_minus_L
3693
# to unsupported forces relinking
3694
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3695
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3696
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3699
shared_flag='-shared'
3702
if test "$host_cpu" = ia64; then
3703
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3704
# chokes on -Wl,-G. The following line is correct:
3707
if test "$aix_use_runtimelinking" = yes; then
3708
shared_flag='${wl}-G'
3710
shared_flag='${wl}-bM:SRE'
3715
# It seems that -bexpall does not export symbols beginning with
3716
# underscore (_), so it is better to generate a list of symbols to export.
3717
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3718
if test "$aix_use_runtimelinking" = yes; then
3719
# Warning - without using the other runtime loading flags (-brtl),
3720
# -berok will link without error, but may produce a broken library.
3721
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3722
# Determine the default libpath from the value encoded in an
3724
_LT_AC_SYS_LIBPATH_AIX
3725
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3726
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3728
if test "$host_cpu" = ia64; then
3729
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3730
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3731
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3733
# Determine the default libpath from the value encoded in an
3735
_LT_AC_SYS_LIBPATH_AIX
3736
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3737
# Warning - without using the other run time loading flags,
3738
# -berok will link without error, but may produce a broken library.
3739
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3740
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3741
# -bexpall does not export symbols beginning with underscore (_)
3742
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3743
# Exported symbols can be pulled into shared objects from archives
3744
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3745
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3746
# This is similar to how AIX traditionally builds it's shared libraries.
3747
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3753
if test "$host_cpu" = m68k; then
3754
_LT_AC_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)'
3755
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3756
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3758
# see comment about different semantics on the GNU ld section
3759
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3763
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
3766
cygwin* | mingw* | pw32*)
3767
# When not using gcc, we currently assume that we are using
3768
# Microsoft Visual C++.
3769
# hardcode_libdir_flag_spec is actually meaningless, as there is
3770
# no search path for DLLs.
3771
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
3772
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3773
# Tell ltmain to make .lib files, not .a files.
3775
# Tell ltmain to make .dll files, not .so files.
3777
# FIXME: Setting linknames here is a bad hack.
3778
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
3779
# The linker will automatically build a .lib file if we build a DLL.
3780
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='true'
3781
# FIXME: Should let the user specify the lib program.
3782
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
3783
fix_srcfile_path='`cygpath -w "$srcfile"`'
3784
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3787
darwin* | rhapsody*)
3789
rhapsody* | darwin1.[[012]])
3790
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3793
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3794
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3796
case ${MACOSX_DEPLOYMENT_TARGET} in
3798
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3801
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3807
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3808
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3809
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3810
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3811
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3812
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3813
if test "$GCC" = yes ; then
3814
output_verbose_link_cmd='echo'
3815
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3816
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3817
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3818
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
3819
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -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}'
3821
case "$cc_basename" in
3823
output_verbose_link_cmd='echo'
3824
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3825
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3826
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3827
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
3828
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -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}'
3831
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3837
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3838
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3839
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3843
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3846
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3847
# support. Future versions do this automatically, but an explicit c++rt0.o
3848
# does not break anything, and helps significantly (at the cost of a little
3851
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3852
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3853
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3854
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3857
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
3859
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3860
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3861
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3862
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3865
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3866
freebsd* | kfreebsd*-gnu)
3867
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3868
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3869
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3870
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3874
if test "$GCC" = yes; then
3875
_LT_AC_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'
3877
_LT_AC_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'
3879
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3880
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3881
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3883
# hardcode_minus_L: Not really in the search PATH,
3884
# but as the default location of the library.
3885
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3886
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3890
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
3891
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
3893
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
3895
if test "$with_gnu_ld" = no; then
3896
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3897
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3898
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3899
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3900
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3901
# hardcode_minus_L: Not really in the search PATH,
3902
# but as the default location of the library.
3903
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3908
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
3911
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3914
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
3920
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3923
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
3927
if test "$with_gnu_ld" = no; then
3930
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3931
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3932
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3933
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3936
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3937
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3938
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3940
# hardcode_minus_L: Not really in the search PATH,
3941
# but as the default location of the library.
3942
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3945
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3946
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3947
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3948
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3950
# hardcode_minus_L: Not really in the search PATH,
3951
# but as the default location of the library.
3952
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3958
irix5* | irix6* | nonstopux*)
3959
if test "$GCC" = yes; then
3960
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3961
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
3963
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3964
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
3966
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)='no'
3967
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3968
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3969
_LT_AC_TAGVAR(inherit_rpath, $1)=yes
3970
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3974
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3975
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
3977
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
3979
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3980
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3981
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3985
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3986
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3987
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3988
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3989
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3996
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3997
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3998
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3999
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4000
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4001
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4002
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4005
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4006
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4007
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4010
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4011
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4018
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4019
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4020
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4021
_LT_AC_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'
4022
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4026
if test "$GCC" = yes; then
4027
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4028
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4030
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4031
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4033
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)='no'
4034
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4035
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4038
osf4* | osf5*) # as osf3* with the addition of -msym flag
4039
if test "$GCC" = yes; then
4040
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4041
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4042
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4044
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4045
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4046
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4047
$CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
4049
# Both c and cxx compiler support -rpath directly
4050
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4052
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)='no'
4053
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4057
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4058
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4059
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4060
runpath_var=LD_RUN_PATH
4061
hardcode_runpath_var=yes
4065
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4066
if test "$GCC" = yes; then
4067
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4068
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4069
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4071
case `$CC -V 2>&1` in
4073
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4074
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4075
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4078
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4079
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4080
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4084
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4085
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4087
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4088
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
4089
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4091
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4095
if test "x$host_vendor" = xsequent; then
4096
# Use $CC to link under sequent, because it throws in some extra .o
4097
# files that make .init and .fini sections work.
4098
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4100
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4102
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4103
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4104
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4105
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4109
case $host_vendor in
4111
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4112
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4115
## LD is ld it makes a PLAMLIB
4116
## CC just makes a GrossModule.
4117
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4118
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4119
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4122
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4123
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4126
runpath_var='LD_RUN_PATH'
4127
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4131
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4132
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4133
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4137
if test -d /usr/nec; then
4138
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4139
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4140
runpath_var=LD_RUN_PATH
4141
hardcode_runpath_var=yes
4142
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4147
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4148
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4149
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4150
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4151
hardcode_runpath_var=yes
4152
runpath_var=LD_RUN_PATH
4155
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4156
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
4157
if test "$GCC" = yes; then
4158
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4160
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4162
runpath_var='LD_RUN_PATH'
4163
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4167
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4168
# $CC -shared without GNU ld will not create a library from C++
4169
# object files and a static libstdc++, better avoid it by now
4170
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4171
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4172
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4173
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4174
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4175
runpath_var='LD_RUN_PATH'
4179
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4180
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4181
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4185
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4189
if test x$host_vendor = xsni; then
4191
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4192
export_dynamic_flag_spec='${wl}-Blargedynsym'
4198
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4199
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4201
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4202
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4203
_LT_DECL([], [extract_expsyms_cmds], [2],
4204
[The commands to extract the exported symbol list from a shared archive])
4206
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4207
if test "$GCC" = yes; then
4208
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4210
_LT_DECL([], [variables_saved_for_relink], [1],
4211
[Variables whose values should be saved in libtool wrapper scripts and
4212
restored at link time])
4215
# Do we need to explicitly link libc?
4217
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
4219
# Assume -lc should be added
4220
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4222
if test "$enable_shared" = yes && test "$GCC" = yes; then
4223
case $_LT_AC_TAGVAR(archive_cmds, $1) in
4225
# FIXME: we may have to deal with multi-command sequences.
4228
# Test whether the compiler implicitly links with -lc since on some
4229
# systems, -lgcc has to come before -lc. If gcc already passes -lc
4230
# to ld, don't add -lc before -lgcc.
4231
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4233
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
4235
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4238
libobjs=conftest.$ac_objext
4240
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4246
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
4247
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4248
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4250
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4252
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4254
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4256
cat conftest.err 1>&5
4259
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
4266
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4267
[Whether or not to add -lc for building shared libraries])
4268
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
4269
[enable_shared_with_static_runtimes], [0],
4270
[Whether or not to disallow shared libs when runtime libs are static])
4271
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
4272
[Compiler flag to allow reflexive dlopens])
4273
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
4274
[Compiler flag to generate shared objects directly from archives])
4275
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
4276
[Create an old-style archive from a shared archive])
4277
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
4278
[Create a temporary old-style archive to link instead of a shared archive])
4279
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
4280
_LT_TAGDECL([], [archive_expsym_cmds], [2])
4281
_LT_TAGDECL([], [module_cmds], [2],
4282
[Commands used to build a loadable module if different from building
4284
_LT_TAGDECL([], [module_expsym_cmds], [2])
4285
_LT_TAGDECL([], [allow_undefined_flag], [1],
4286
[Flag that allows shared libraries with undefined symbols to be built])
4287
_LT_TAGDECL([], [no_undefined_flag], [1],
4288
[Flag that enforces no undefined symbols])
4289
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
4290
[Flag to hardcode $libdir into a binary during linking.
4291
This must work even if $libdir does not exist])
4292
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
4293
[If ld is used when linking, flag to hardcode $libdir into a binary
4294
during linking. This must work even if $libdir does not exist])
4295
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
4296
[Whether we need a single "-rpath" flag with a separated argument])
4297
_LT_TAGDECL([], [hardcode_direct], [0],
4298
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
4299
DIR into the resulting binary])
4300
_LT_TAGDECL([], [hardcode_minus_L], [0],
4301
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
4302
into the resulting binary])
4303
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
4304
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
4305
into the resulting binary])
4306
_LT_TAGDECL([], [hardcode_automatic], [0],
4307
[Set to "yes" if building a shared library automatically hardcodes DIR
4308
into the library and all subsequent libraries and executables linked
4310
_LT_TAGDECL([], [inherit_rpath], [0],
4311
[Set to yes if linker adds runtime paths of dependent libraries
4312
to runtime path list])
4313
_LT_TAGDECL([], [link_all_deplibs], [0],
4314
[Whether libtool must link a program against all its dependency libraries])
4315
_LT_TAGDECL([], [fix_srcfile_path], [1],
4316
[Fix the shell variable $srcfile for the compiler])
4317
_LT_TAGDECL([], [always_export_symbols], [0],
4318
[Set to "yes" if exported symbols are required])
4319
_LT_TAGDECL([], [export_symbols_cmds], [2],
4320
[The commands to list exported symbols])
4321
_LT_TAGDECL([], [exclude_expsyms], [1],
4322
[Symbols that should not be listed in the preloaded symbols])
4323
_LT_TAGDECL([], [include_expsyms], [1],
4324
[Symbols that must always be exported])
4325
dnl FIXME: Not yet implemented
4326
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
4327
dnl [Compiler flag to generate thread safe objects])
4328
])# AC_LIBTOOL_PROG_LD_SHLIBS
4331
# _LT_LANG_C_CONFIG([TAG])
4332
# ------------------------
4333
# Ensure that the configuration variables for a C compiler are suitably
4334
# defined. These variables are subsequently used by _LT_CONFIG to write
4335
# the compiler configuration to `libtool'.
4336
m4_define([_LT_LANG_C_CONFIG],
4337
[AC_REQUIRE([LT_AC_PROG_EGREP])
4341
# Source file extension for C test sources.
4344
# Object file extension for compiled C test sources.
4346
_LT_AC_TAGVAR(objext, $1)=$objext
4348
# Code to be used in simple compile tests
4349
lt_simple_compile_test_code="int some_variable = 0;\n"
4351
# Code to be used in simple link tests
4352
lt_simple_link_test_code='int main(){return(0);}\n'
4355
# Save the default compiler, since it gets overwritten when the other
4356
# tags are being tested, and _LT_AC_TAGVAR(compiler, []) is a NOP.
4357
compiler_DEFAULT=$CC
4360
# Check for any special shared library compilation flags.
4362
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
4363
if test "$GCC" = no; then
4366
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
4370
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
4371
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
4372
if echo "$old_CC $old_CFLAGS " | $GREP "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
4374
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
4375
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
4381
## There is no encapsulation within the following macros, do not change
4382
## the running order or otherwise move them around unless you know exactly
4383
## what you are doing...
4384
if test -n "$compiler"; then
4385
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4386
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4387
AC_LIBTOOL_PROG_CC_C_O($1)
4388
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4389
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4390
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4391
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4392
AC_LIBTOOL_SYS_LIB_STRIP
4393
AC_LIBTOOL_DLOPEN_SELF($1)
4395
# Report which library types will actually be built
4396
AC_MSG_CHECKING([if libtool supports shared libraries])
4397
AC_MSG_RESULT([$can_build_shared])
4399
AC_MSG_CHECKING([whether to build shared libraries])
4400
test "$can_build_shared" = "no" && enable_shared=no
4402
# On AIX, shared libraries and static libraries use the same namespace, and
4403
# are all built from PIC.
4406
test "$enable_shared" = yes && enable_static=no
4407
if test -n "$RANLIB"; then
4408
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4409
postinstall_cmds='$RANLIB $lib'
4414
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4415
test "$enable_shared" = yes && enable_static=no
4419
AC_MSG_RESULT([$enable_shared])
4421
AC_MSG_CHECKING([whether to build static libraries])
4422
# Make sure either enable_shared or enable_static is yes.
4423
test "$enable_shared" = yes || enable_static=yes
4424
AC_MSG_RESULT([$enable_static])
4430
])# _LT_LANG_C_CONFIG
4433
# _LT_LANG_CXX_CONFIG([TAG])
4434
# --------------------------
4435
# Ensure that the configuration variables for a C++ compiler are suitably
4436
# defined. These variables are subsequently used by _LT_CONFIG to write
4437
# the compiler configuration to `libtool'.
4438
m4_define([_LT_LANG_CXX_CONFIG],
4440
AC_REQUIRE([LT_AC_PROG_EGREP])
4441
AC_REQUIRE([AC_PROG_CXX])
4442
AC_REQUIRE([AC_PROG_CXXCPP])
4444
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4445
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4446
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4447
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4448
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4449
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4450
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4451
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4452
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4453
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4454
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4455
_LT_AC_TAGVAR(inherit_rpath, $1)=no
4456
_LT_AC_TAGVAR(module_cmds, $1)=
4457
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4458
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4459
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4460
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4461
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4462
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4464
# Source file extension for C++ test sources.
4467
# Object file extension for compiled C++ test sources.
4469
_LT_AC_TAGVAR(objext, $1)=$objext
4471
# Code to be used in simple compile tests
4472
lt_simple_compile_test_code="int some_variable = 0;\n"
4474
# Code to be used in simple link tests
4475
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4477
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4480
# Allow CC to be a program name with arguments.
4485
lt_save_with_gnu_ld=$with_gnu_ld
4486
lt_save_path_LD=$lt_cv_path_LD
4487
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4488
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4490
unset lt_cv_prog_gnu_ld
4492
if test -n "${lt_cv_path_LDCXX+set}"; then
4493
lt_cv_path_LD=$lt_cv_path_LDCXX
4497
test -z "${LDCXX+set}" || LD=$LDCXX
4500
_LT_AC_TAGVAR(compiler, $1)=$CC
4501
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4503
if test -n "$compiler"; then
4504
# We don't want -fno-exception when compiling C++ code, so set the
4505
# no_builtin_flag separately
4506
if test "$GXX" = yes; then
4507
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4509
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4512
if test "$GXX" = yes; then
4513
# Set up default GNU C++ configuration
4517
# Check if GNU C++ uses GNU ld as the underlying linker, since the
4518
# archiving commands below assume that GNU ld is being used.
4519
if test "$with_gnu_ld" = yes; then
4520
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521
_LT_AC_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'
4523
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4524
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4526
# If archive_cmds runs LD, not CC, wlarc should be empty
4527
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4528
# investigate it a little bit more. (MM)
4531
# ancient GNU ld didn't support --whole-archive et. al.
4532
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
4533
$GREP 'no-whole-archive' > /dev/null; then
4534
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4536
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4542
# A generic and very simple default shared library creation
4543
# command for GNU C++ for the case where it uses the native
4544
# linker, instead of GNU ld. If possible, this setting should
4545
# overridden to take advantage of the native linker features on
4546
# the platform it is being used on.
4547
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4550
# Commands to make compiler produce verbose output that lists
4551
# what "hidden" libraries, object files and flags are used when
4552
# linking a shared library.
4553
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
4561
# PORTME: fill in a description of your system's C++ link characteristics
4562
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4563
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4566
# FIXME: insert proper C++ library support
4567
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4570
if test "$host_cpu" = ia64; then
4571
# On IA64, the linker does run time linking by default, so we don't
4572
# have to do anything special.
4573
aix_use_runtimelinking=no
4574
exp_sym_flag='-Bexport'
4577
aix_use_runtimelinking=no
4579
# Test if we are trying to use run time linking or normal
4580
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4581
# need to do runtime linking.
4582
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4583
for ld_flag in $LDFLAGS; do
4586
aix_use_runtimelinking=yes
4593
exp_sym_flag='-bexport'
4594
no_entry_flag='-bnoentry'
4597
# When large executables or shared objects are built, AIX ld can
4598
# have problems creating the table of contents. If linking a library
4599
# or program results in "error TOC overflow" add -mminimal-toc to
4600
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4601
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4603
_LT_AC_TAGVAR(archive_cmds, $1)=''
4604
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4605
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4606
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4608
if test "$GXX" = yes; then
4609
case $host_os in aix4.[012]|aix4.[012].*)
4610
# We only want to do this on AIX 4.2 and lower, the check
4611
# below for broken collect2 doesn't work under 4.3+
4612
collect2name=`${CC} -print-prog-name=collect2`
4613
if test -f "$collect2name" &&
4614
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4616
# We have reworked collect2
4617
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4619
# We have old collect2
4620
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4621
# It fails to find uninstalled libraries when the uninstalled
4622
# path is not listed in the libpath. Setting hardcode_minus_L
4623
# to unsupported forces relinking
4624
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4625
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4626
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4629
shared_flag='-shared'
4632
if test "$host_cpu" = ia64; then
4633
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4634
# chokes on -Wl,-G. The following line is correct:
4637
if test "$aix_use_runtimelinking" = yes; then
4638
shared_flag='${wl}-G'
4640
shared_flag='${wl}-bM:SRE'
4645
# It seems that -bexpall does not export symbols beginning with
4646
# underscore (_), so it is better to generate a list of symbols to export.
4647
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4648
if test "$aix_use_runtimelinking" = yes; then
4649
# Warning - without using the other runtime loading flags (-brtl),
4650
# -berok will link without error, but may produce a broken library.
4651
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4652
# Determine the default libpath from the value encoded in an empty
4654
_LT_AC_SYS_LIBPATH_AIX
4655
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4657
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4659
if test "$host_cpu" = ia64; then
4660
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4661
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4662
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4664
# Determine the default libpath from the value encoded in an
4666
_LT_AC_SYS_LIBPATH_AIX
4667
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4668
# Warning - without using the other run time loading flags,
4669
# -berok will link without error, but may produce a broken library.
4670
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4671
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4672
# -bexpall does not export symbols beginning with underscore (_)
4673
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4674
# Exported symbols can be pulled into shared objects from archives
4675
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4676
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4677
# This is similar to how AIX traditionally builds it's shared libraries.
4678
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4683
case $cc_basename in
4685
# FIXME: insert proper C++ library support
4686
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4691
cygwin* | mingw* | pw32*)
4692
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4693
# as there is no search path for DLLs.
4694
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4695
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4696
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4697
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4699
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4700
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4701
# If the export-symbols file already is a .def file (1st line
4702
# is EXPORTS), use it as is; otherwise, prepend...
4703
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4704
cp $export_symbols $output_objdir/$soname.def;
4706
echo EXPORTS > $output_objdir/$soname.def;
4707
cat $export_symbols >> $output_objdir/$soname.def;
4709
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4711
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4714
darwin* | rhapsody*)
4716
rhapsody* | darwin1.[[012]])
4717
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4720
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4721
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4723
case ${MACOSX_DEPLOYMENT_TARGET} in
4725
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4728
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4734
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4735
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4736
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4737
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4738
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4739
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4741
if test "$GXX" = yes ; then
4742
lt_int_apple_cc_single_mod=no
4743
output_verbose_link_cmd='echo'
4744
if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
4745
lt_int_apple_cc_single_mod=yes
4747
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4748
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4750
_LT_AC_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'
4752
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4753
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4754
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4755
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
4757
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
4759
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -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}'
4761
case "$cc_basename" in
4763
output_verbose_link_cmd='echo'
4764
_LT_AC_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'
4765
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4766
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4767
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
4768
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -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}'
4771
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4778
case $cc_basename in
4780
# FIXME: insert proper C++ library support
4781
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4784
# Green Hills C++ Compiler
4785
# FIXME: insert proper C++ library support
4786
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4789
# FIXME: insert proper C++ library support
4790
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4795
# C++ shared libraries reported to be fairly broken before switch to ELF
4796
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4799
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4801
freebsd* | kfreebsd*-gnu)
4802
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4804
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4809
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4810
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4811
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4812
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4813
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4814
# but as the default
4815
# location of the library.
4817
case $cc_basename in
4819
# FIXME: insert proper C++ library support
4820
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4823
_LT_AC_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'
4824
# Commands to make compiler produce verbose output that lists
4825
# what "hidden" libraries, object files and flags are used when
4826
# linking a shared library.
4828
# There doesn't appear to be a way to prevent this compiler from
4829
# explicitly linking system object files so we need to strip them
4830
# from the output so that they don't get included in the library
4832
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 $list'
4835
if test "$GXX" = yes; then
4836
_LT_AC_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'
4838
# FIXME: insert proper C++ library support
4839
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4845
if test $with_gnu_ld = no; then
4848
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4849
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4852
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4855
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4856
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4857
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4863
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4864
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4867
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4868
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4869
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4870
# but as the default
4871
# location of the library.
4874
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4875
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4876
# but as the default
4877
# location of the library.
4881
case $cc_basename in
4883
# FIXME: insert proper C++ library support
4884
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4889
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4892
_LT_AC_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'
4895
# Commands to make compiler produce verbose output that lists
4896
# what "hidden" libraries, object files and flags are used when
4897
# linking a shared library.
4899
# There doesn't appear to be a way to prevent this compiler from
4900
# explicitly linking system object files so we need to strip them
4901
# from the output so that they don't get included in the library
4903
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 $list'
4906
if test "$GXX" = yes; then
4907
if test $with_gnu_ld = no; then
4910
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4913
_LT_AC_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'
4918
# FIXME: insert proper C++ library support
4919
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4925
case $cc_basename in
4928
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4930
# Archives containing C++ object files must be created using
4931
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4932
# necessary to make sure instantiated templates are included
4934
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4937
if test "$GXX" = yes; then
4938
if test "$with_gnu_ld" = no; then
4939
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4941
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4944
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4947
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4948
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4949
_LT_AC_TAGVAR(inherit_rpath, $1)=yes
4952
case $cc_basename in
4954
# Kuck and Associates, Inc. (KAI) C++ Compiler
4956
# KCC will only create a shared library if the output file
4957
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4958
# to its proper name (with version) after linking.
4959
_LT_AC_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'
4960
_LT_AC_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'
4961
# Commands to make compiler produce verbose output that lists
4962
# what "hidden" libraries, object files and flags are used when
4963
# linking a shared library.
4965
# There doesn't appear to be a way to prevent this compiler from
4966
# explicitly linking system object files so we need to strip them
4967
# from the output so that they don't get included in the library
4969
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 $list'
4971
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4972
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4974
# Archives containing C++ object files must be created using
4975
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4976
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4981
# version 8.0 and above of icpc choke on multiply defined symbols
4982
# if we add $predep_objects and $postdep_objects, however 7.1 and
4983
# earlier do not add the objects themselves.
4984
case `$CC -V 2>&1` in
4986
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4987
_LT_AC_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'
4989
*) # Version 8.0 or newer
4990
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4991
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4994
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4995
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4996
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4997
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5001
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5002
_LT_AC_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'
5004
runpath_var=LD_RUN_PATH
5005
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5006
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5008
# Commands to make compiler produce verbose output that lists
5009
# what "hidden" libraries, object files and flags are used when
5010
# linking a shared library.
5012
# There doesn't appear to be a way to prevent this compiler from
5013
# explicitly linking system object files so we need to strip them
5014
# from the output so that they don't get included in the library
5016
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5021
# FIXME: insert proper C++ library support
5022
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5025
# FIXME: insert proper C++ library support
5026
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5029
case $cc_basename in
5031
# FIXME: insert proper C++ library support
5032
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5035
# FIXME: insert proper C++ library support
5036
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5041
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5042
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5044
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5045
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5046
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5048
# Workaround some broken pre-1.5 toolchains
5049
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5052
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5055
# C++ shared libraries are fairly broken
5056
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5059
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5060
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5061
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5062
_LT_AC_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'
5063
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5064
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5066
output_verbose_link_cmd='echo'
5069
case $cc_basename in
5071
# Kuck and Associates, Inc. (KAI) C++ Compiler
5073
# KCC will only create a shared library if the output file
5074
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5075
# to its proper name (with version) after linking.
5076
_LT_AC_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'
5078
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5079
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5081
# Archives containing C++ object files must be created using
5082
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5083
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5087
# Rational C++ 2.4.1
5088
# FIXME: insert proper C++ library support
5089
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5092
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5093
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5095
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5096
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5098
# Commands to make compiler produce verbose output that lists
5099
# what "hidden" libraries, object files and flags are used when
5100
# linking a shared library.
5102
# There doesn't appear to be a way to prevent this compiler from
5103
# explicitly linking system object files so we need to strip them
5104
# from the output so that they don't get included in the library
5106
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5109
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5110
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5111
_LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5113
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5114
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5116
# Commands to make compiler produce verbose output that lists
5117
# what "hidden" libraries, object files and flags are used when
5118
# linking a shared library.
5119
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5122
# FIXME: insert proper C++ library support
5123
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5129
case $cc_basename in
5131
# Kuck and Associates, Inc. (KAI) C++ Compiler
5133
# KCC will only create a shared library if the output file
5134
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5135
# to its proper name (with version) after linking.
5136
_LT_AC_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'
5138
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5139
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5141
# Archives containing C++ object files must be created using
5142
# the KAI C++ compiler.
5143
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5146
# Rational C++ 2.4.1
5147
# FIXME: insert proper C++ library support
5148
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5151
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5152
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5153
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5154
echo "-hidden">> $lib.exp~
5155
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
5158
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5159
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5161
# Commands to make compiler produce verbose output that lists
5162
# what "hidden" libraries, object files and flags are used when
5163
# linking a shared library.
5165
# There doesn't appear to be a way to prevent this compiler from
5166
# explicitly linking system object files so we need to strip them
5167
# from the output so that they don't get included in the library
5169
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5172
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5173
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5174
_LT_AC_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` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5176
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5177
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5179
# Commands to make compiler produce verbose output that lists
5180
# what "hidden" libraries, object files and flags are used when
5181
# linking a shared library.
5182
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5185
# FIXME: insert proper C++ library support
5186
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5192
# FIXME: insert proper C++ library support
5193
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5196
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5197
case $cc_basename in
5199
# FIXME: insert proper C++ library support
5200
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5203
# FIXME: insert proper C++ library support
5204
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5209
case $cc_basename in
5212
# FIXME: insert proper C++ library support
5213
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5217
# FIXME: insert proper C++ library support
5218
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5221
# FIXME: insert proper C++ library support
5222
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5227
case $cc_basename in
5229
# Sun C++ 4.2, 5.x and Centerline C++
5230
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5231
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5232
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5233
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5235
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5236
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5238
solaris2.[0-5] | solaris2.[0-5].*) ;;
5240
# The C++ compiler is used as linker so we must use $wl
5241
# flag to pass the commands to the underlying system
5242
# linker. We must also pass each convience library through
5243
# to the system linker between allextract/defaultextract.
5244
# The C++ compiler will combine linker options so we
5245
# cannot just pass the convience library names through
5247
# Supported since Solaris 2.6 (maybe 2.5.1?)
5248
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5251
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5253
# Commands to make compiler produce verbose output that lists
5254
# what "hidden" libraries, object files and flags are used when
5255
# linking a shared library.
5257
# There doesn't appear to be a way to prevent this compiler from
5258
# explicitly linking system object files so we need to strip them
5259
# from the output so that they don't get included in the library
5261
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5263
# Archives containing C++ object files must be created using
5264
# "CC -xar", where "CC" is the Sun C++ compiler. This is
5265
# necessary to make sure instantiated templates are included
5267
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5270
# Green Hills C++ Compiler
5271
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5273
# The C++ compiler must be used to create the archive.
5274
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5277
# GNU C++ compiler with Solaris linker
5278
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5279
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5280
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
5281
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5282
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5283
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5285
# Commands to make compiler produce verbose output that lists
5286
# what "hidden" libraries, object files and flags are used when
5287
# linking a shared library.
5288
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5290
# g++ 2.7 appears to require `-G' NOT `-shared' on this
5292
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5293
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5294
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5296
# Commands to make compiler produce verbose output that lists
5297
# what "hidden" libraries, object files and flags are used when
5298
# linking a shared library.
5299
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5302
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5307
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5308
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5311
case $cc_basename in
5313
# NonStop-UX NCC 3.20
5314
# FIXME: insert proper C++ library support
5315
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5318
# FIXME: insert proper C++ library support
5319
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5324
# FIXME: insert proper C++ library support
5325
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5328
# FIXME: insert proper C++ library support
5329
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5332
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5333
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5335
_LT_AC_TAGVAR(GCC, $1)="$GXX"
5336
_LT_AC_TAGVAR(LD, $1)="$LD"
5339
## There is no encapsulation within the following macros, do not change
5340
## the running order or otherwise move them around unless you know exactly
5341
## what you are doing...
5342
AC_LIBTOOL_POSTDEP_PREDEP($1)
5343
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5344
AC_LIBTOOL_PROG_CC_C_O($1)
5345
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5346
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5347
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5348
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5349
AC_LIBTOOL_SYS_LIB_STRIP
5350
AC_LIBTOOL_DLOPEN_SELF($1)
5360
with_gnu_ldcxx=$with_gnu_ld
5361
with_gnu_ld=$lt_save_with_gnu_ld
5362
lt_cv_path_LDCXX=$lt_cv_path_LD
5363
lt_cv_path_LD=$lt_save_path_LD
5364
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5365
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5366
])# _LT_LANG_CXX_CONFIG
5369
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5370
# ------------------------------------
5371
# Figure out "hidden" library dependencies from verbose
5372
# compiler output when linking a shared library.
5373
# Parse the compiler output and extract the necessary
5374
# objects, libraries and library flags.
5375
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5376
# Dependencies to place before and after the object being linked:
5377
_LT_AC_TAGVAR(predep_objects, $1)=
5378
_LT_AC_TAGVAR(postdep_objects, $1)=
5379
_LT_AC_TAGVAR(predeps, $1)=
5380
_LT_AC_TAGVAR(postdeps, $1)=
5381
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5383
dnl we can't use the lt_simple_compile_test_code here,
5384
dnl because it contains code intended for an executable,
5385
dnl not a library. It's possible we should let each
5386
dnl tag define a new lt_????_link_test_code variable,
5387
dnl but it's only used here...
5388
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
5390
void foo (void) { a = 0; }
5392
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
5396
Foo (void) { a = 0; }
5401
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
5409
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
5412
public void bar (void) {
5418
dnl Parse the compiler output and extract the necessary
5419
dnl objects, libraries and library flags.
5420
if AC_TRY_EVAL(ac_compile); then
5421
# Parse the compiler output and extract the necessary
5422
# objects, libraries and library flags.
5424
# Sentinel used to keep track of whether or not we are before
5425
# the conftest object file.
5426
pre_test_object_deps_done=no
5428
# The `*' in the case matches for architectures that use `case' in
5429
# $output_verbose_cmd can trigger glob expansion during the loop
5430
# eval without this substitution.
5431
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5433
for p in `eval $output_verbose_link_cmd`; do
5437
# Some compilers place space between "-{L,R}" and the path.
5439
if test $p = "-L" ||
5440
test $p = "-R"; then
5447
if test "$pre_test_object_deps_done" = no; then
5450
# Internal compiler library paths should come after those
5451
# provided the user. The postdeps already come after the
5452
# user supplied libs so there is no need to process them.
5453
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5454
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5456
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5459
# The "-l" case would never come before the object being
5460
# linked, so don't bother handling this case.
5463
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5464
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5466
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5472
# This assumes that the test object file only shows up
5473
# once in the compiler output.
5474
if test "$p" = "conftest.$objext"; then
5475
pre_test_object_deps_done=yes
5479
if test "$pre_test_object_deps_done" = no; then
5480
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5481
_LT_AC_TAGVAR(predep_objects, $1)="$p"
5483
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5486
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5487
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
5489
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5494
*) ;; # Ignore the rest.
5502
echo "libtool.m4: error: problem compiling $1 test program"
5505
$rm -f confest.$objext
5507
case " $_LT_AC_TAGVAR(postdeps, $1) " in
5508
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5510
_LT_TAGDECL([], [predep_objects], [1],
5511
[Dependencies to place before and after the objects being linked to
5512
create a shared library])
5513
_LT_TAGDECL([], [postdep_objects], [1])
5514
_LT_TAGDECL([], [predeps], [1])
5515
_LT_TAGDECL([], [postdeps], [1])
5516
_LT_TAGDECL([], [compiler_lib_search_path], [1],
5517
[The library search path used internally by the compiler when linking
5519
])# AC_LIBTOOL_POSTDEP_PREDEP
5521
# _LT_LANG_F77_CONFIG([TAG])
5522
# --------------------------
5523
# Ensure that the configuration variables for a Fortran 77 compiler are
5524
# suitably defined. These variables are subsequently used by _LT_CONFIG
5525
# to write the compiler configuration to `libtool'.
5526
m4_define([_LT_LANG_F77_CONFIG],
5527
[AC_REQUIRE([AC_PROG_F77])
5528
AC_LANG_PUSH(Fortran 77)
5530
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5531
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5532
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5533
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5534
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5535
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5536
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5537
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5538
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5539
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5540
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5541
_LT_AC_TAGVAR(inherit_rpath, $1)=no
5542
_LT_AC_TAGVAR(module_cmds, $1)=
5543
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5544
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5545
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5546
_LT_AC_TAGVAR(no_undefined_flag, $1)=
5547
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5548
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5550
# Source file extension for f77 test sources.
5553
# Object file extension for compiled f77 test sources.
5555
_LT_AC_TAGVAR(objext, $1)=$objext
5557
# Code to be used in simple compile tests
5558
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5560
# Code to be used in simple link tests
5561
lt_simple_link_test_code=" program t\n end\n"
5563
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5566
# Allow CC to be a program name with arguments.
5570
_LT_AC_TAGVAR(compiler, $1)=$CC
5571
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5573
if test -n "$compiler"; then
5574
AC_MSG_CHECKING([if libtool supports shared libraries])
5575
AC_MSG_RESULT([$can_build_shared])
5577
AC_MSG_CHECKING([whether to build shared libraries])
5578
test "$can_build_shared" = "no" && enable_shared=no
5580
# On AIX, shared libraries and static libraries use the same namespace, and
5581
# are all built from PIC.
5584
test "$enable_shared" = yes && enable_static=no
5585
if test -n "$RANLIB"; then
5586
archive_cmds="$archive_cmds~\$RANLIB \$lib"
5587
postinstall_cmds='$RANLIB $lib'
5591
test "$enable_shared" = yes && enable_static=no
5594
AC_MSG_RESULT([$enable_shared])
5596
AC_MSG_CHECKING([whether to build static libraries])
5597
# Make sure either enable_shared or enable_static is yes.
5598
test "$enable_shared" = yes || enable_static=yes
5599
AC_MSG_RESULT([$enable_static])
5601
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5603
_LT_AC_TAGVAR(GCC, $1)="$G77"
5604
_LT_AC_TAGVAR(LD, $1)="$LD"
5607
## There is no encapsulation within the following macros, do not change
5608
## the running order or otherwise move them around unless you know exactly
5609
## what you are doing...
5610
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5611
AC_LIBTOOL_PROG_CC_C_O($1)
5612
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5613
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5614
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5615
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5616
AC_LIBTOOL_SYS_LIB_STRIP
5623
])# _LT_LANG_F77_CONFIG
5626
# _LT_LANG_GCJ_CONFIG([TAG])
5627
# --------------------------
5628
# Ensure that the configuration variables for the GNU Java Compiler compiler
5629
# are suitably defined. These variables are subsequently used by _LT_CONFIG
5630
# to write the compiler configuration to `libtool'.
5631
m4_define([_LT_LANG_GCJ_CONFIG],
5632
[AC_REQUIRE([LT_PROG_GCJ])
5635
# Source file extension for Java test sources.
5638
# Object file extension for compiled Java test sources.
5640
_LT_AC_TAGVAR(objext, $1)=$objext
5642
# Code to be used in simple compile tests
5643
lt_simple_compile_test_code="class foo {}\n"
5645
# Code to be used in simple link tests
5646
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
5648
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5651
# Allow CC to be a program name with arguments.
5655
_LT_AC_TAGVAR(compiler, $1)=$CC
5657
# GCJ did not exist at the time GCC didn't implicitly link libc in.
5658
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5661
## There is no encapsulation within the following macros, do not change
5662
## the running order or otherwise move them around unless you know exactly
5663
## what you are doing...
5664
if test -n "$compiler"; then
5665
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5666
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5667
AC_LIBTOOL_PROG_CC_C_O($1)
5668
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5669
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5670
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5671
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5672
AC_LIBTOOL_SYS_LIB_STRIP
5673
AC_LIBTOOL_DLOPEN_SELF($1)
5680
])# _LT_LANG_GCJ_CONFIG
5683
# _LT_LANG_RC_CONFIG([TAG])
5684
# --------------------------
5685
# Ensure that the configuration variables for the Windows resource compiler
5686
# are suitably defined. These variables are subsequently used by _LT_CONFIG
5687
# to write the compiler configuration to `libtool'.
5688
m4_define([_LT_LANG_RC_CONFIG],
5689
[AC_REQUIRE([LT_PROG_RC])
5692
# Source file extension for RC test sources.
5695
# Object file extension for compiled RC test sources.
5697
_LT_AC_TAGVAR(objext, $1)=$objext
5699
# Code to be used in simple compile tests
5700
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5702
# Code to be used in simple link tests
5703
lt_simple_link_test_code="$lt_simple_compile_test_code"
5705
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5708
# Allow CC to be a program name with arguments.
5712
_LT_AC_TAGVAR(compiler, $1)=$CC
5713
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5715
if test -n "$compiler"; then
5722
])# _LT_LANG_RC_CONFIG
5725
AC_DEFUN([LT_PROG_GCJ],
5726
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
5727
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
5728
[AC_CHECK_TOOL(GCJ, gcj,)
5729
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5730
AC_SUBST(GCJFLAGS)])])dnl
5732
AU_DEFUN([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
5734
AC_DEFUN([LT_PROG_RC],
5735
[AC_CHECK_TOOL(RC, windres,)
5737
AU_DEFUN([LT_AC_PROG_RC], [LT_PROG_RC])
5742
# If we don't have a new enough Autoconf to choose the best grep
5743
# available, choose the one first in the user's PATH.
5744
AC_DEFUN([LT_AC_PROG_EGREP],
5745
[AC_REQUIRE([AC_PROG_EGREP])
5746
test -z "$GREP" && GREP=grep
5747
_LT_DECL([], [GREP], [1], [A grep program that handles long line])
5748
_LT_DECL([], [EGREP], [1], [An ERE matcher])
5754
# Check for a fully-functional sed program, that truncates
5755
# as few characters as possible. Prefer GNU sed if found.
5756
AC_DEFUN([LT_AC_PROG_SED],
5758
test -z "$SED" && SED=sed
5759
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
5760
_LT_DECL([], [Xsed], ["\$SED -e s/^X//"],
5761
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
5764
m4_ifndef([AC_PROG_SED], [
5765
############################################################
5766
# NOTE: This macro has been submitted for inclusion into #
5767
# GNU Autoconf as AC_PROG_SED. When it is available in #
5768
# a released version of Autoconf we should remove this #
5769
# macro and use it instead. #
5770
############################################################
5772
m4_define([AC_PROG_SED],
5773
[AC_MSG_CHECKING([for a sed that does not truncate output])
5774
AC_CACHE_VAL(lt_cv_path_SED,
5775
[# Loop through the user's path and test for sed and gsed.
5776
# Then use that list of sed's as ones to test for truncation.
5777
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5781
test -z "$as_dir" && as_dir=.
5782
for lt_ac_prog in sed gsed; do
5783
for ac_exec_ext in '' $ac_executable_extensions; do
5784
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5785
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5792
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5793
# along with /bin/sed that truncates output.
5794
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5795
test ! -f $lt_ac_sed && break
5796
cat /dev/null > conftest.in
5798
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5799
# Check for GNU sed and select it if it is found.
5800
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5801
lt_cv_path_SED=$lt_ac_sed
5805
cat conftest.in conftest.in >conftest.tmp
5806
mv conftest.tmp conftest.in
5807
cp conftest.in conftest.nl
5809
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5810
cmp -s conftest.out conftest.nl || break
5811
# 10000 chars as input seems more than enough
5812
test $lt_ac_count -gt 10 && break
5813
lt_ac_count=`expr $lt_ac_count + 1`
5814
if test $lt_ac_count -gt $lt_ac_max; then
5815
lt_ac_max=$lt_ac_count
5816
lt_cv_path_SED=$lt_ac_sed
5823
AC_MSG_RESULT([$SED])