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
195
_LT_LANG_DEFAULT_CONFIG
202
# In libtool itself `ltmain.sh' is in the build tree, but everything else
203
# ships it in the source tree, for completeness, if we find a copy in the
204
# build tree use that before falling back to auxdir.
206
# Note that this code is called both from `configure', and `config.status'
207
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
208
# `config.status' has no value for ac_aux_dir unless we are using Automake,
209
# so we pass a copy along to make sure it has a sensible value anyway.
210
AC_DEFUN([_LT_PROG_LTMAIN],
211
[_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
213
$srcdir) ltmain=./ltmain.sh ;;
214
$srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
216
test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
221
## ------------------------------------- ##
222
## Accumulate code for creating libtool. ##
223
## ------------------------------------- ##
225
# So that we can recreate a full libtool script including additional
226
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
227
# in macros and then make a single call at the end using the `libtool'
230
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
231
# ----------------------------------------
232
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
233
m4_define([_LT_CONFIG_LIBTOOL_INIT],
235
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
240
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
242
# _LT_CONFIG_LIBTOOL([COMMANDS])
243
# ------------------------------
244
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
245
m4_define([_LT_CONFIG_LIBTOOL],
247
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
252
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
255
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
256
# ---------------------------------------------------
257
m4_define([_LT_CONFIG_SAVE_COMMANDS],
258
[_LT_CONFIG_LIBTOOL([$1])
259
_LT_CONFIG_LIBTOOL_INIT([$2])
263
# _LT_FORMAT_COMMENT([COMMENT])
264
# -----------------------------
265
# Add leading comment marks to the start of each line, and a trailing
266
# full-stop to the whole comment if one is not present already.
267
m4_define([_LT_FORMAT_COMMENT],
269
m4_bpatsubst([$1], [^ *], [# ])]m4_bmatch([$1], [[!?.]$], [], [.])
274
## ------------------------ ##
275
## FIXME: Eliminate VARNAME ##
276
## ------------------------ ##
278
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
279
# -------------------------------------------------------------------
280
# CONFIGNAME is the name given to the value in the libtool script.
281
# VARNAME is the (base) name used in the configure script.
282
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
283
# VARNAME. Any other value will be used directly.
284
m4_define([_LT_DECL],
285
[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
286
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
287
[m4_ifval([$1], [$1], [$2])])
288
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
290
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
291
lt_dict_add_subkey([lt_decl_dict], [$2],
292
[tagged?], [m4_ifval([$5], [yes], [no])])])
296
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
297
# --------------------------------------------------------
298
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
301
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
302
# -------------------------------------------------
303
m4_define([lt_decl_tag_varnames],
304
[_lt_decl_filter([tagged?], [yes], $@)])
305
m4_define([_lt_decl_filter],
307
[0], [m4_fatal([$0: too few arguments: $#])],
308
[1], [m4_fatal([$0: too few arguments: $#: $1])],
309
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
310
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
311
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
315
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
316
# ---------------------------------------------------
317
m4_define([lt_decl_quote_varnames],
318
[_lt_decl_filter([value], [1], $@)])
320
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
321
# ----------------------------------------------------
322
m4_define([lt_decl_dquote_varnames],
323
[_lt_decl_filter([value], [2], $@)])
326
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
327
# ----------------------------------------------------
328
m4_define([lt_decl_varnames_tagged],
329
[_$0(m4_quote(m4_default([$1], [[, ]])),
330
m4_quote(m4_if([$2], [],
331
m4_quote(lt_decl_tag_varnames),
332
m4_quote(m4_shift($@)))),
333
m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
334
m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
337
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
338
# ------------------------------------------------
339
m4_define([lt_decl_all_varnames],
340
[_$0(m4_quote(m4_default([$1], [[, ]])),
342
m4_quote(lt_decl_varnames),
343
m4_quote(m4_shift($@))))[]dnl
345
m4_define([_lt_decl_all_varnames],
346
[lt_join($@, lt_decl_varnames_tagged([$1],
347
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
351
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
352
# ------------------------------------
353
# Quote a variable value, and forward it to `config.status' so that its
354
# declaration there will have the same value as in `configure'. VARNAME
355
# must have a single quote delimited value for this to work.
356
m4_define([_LT_CONFIG_STATUS_DECLARE],
357
[$1='`$echo "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
360
# _LT_CONFIG_STATUS_DECLARATIONS
361
# ------------------------------
362
# We delimit libtool config variables with single quotes, so when
363
# we write them to config.status, we have to be sure to quote all
364
# embedded single quotes properly. In configure, this macro expands
365
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
367
# <var>='`$echo "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
368
m4_define([_LT_CONFIG_STATUS_DECLARATIONS],
369
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
370
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
375
# Output comment and list of tags supported by the script
376
m4_define([_LT_LIBTOOL_TAGS],
377
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
378
available_tags="[]_LT_TAGS[]"dnl
381
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
382
# -----------------------------------
383
# Extract the dictionary values for VARNAME (optionally with TAG) and
384
# expand to a commented shell variable setting:
386
# # Some comment about what VAR is for.
387
# visible_name=$lt_internal_name
388
m4_define([_LT_LIBTOOL_DECLARE],
389
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
390
[description])))[]dnl
391
m4_pushdef([_libtool_name],
392
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
393
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
394
[0], [_libtool_name=[$]$1],
395
[1], [_libtool_name=$lt_[]$1],
396
[2], [_libtool_name=$lt_[]$1],
397
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
398
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
401
# _LT_LIBTOOL_CONFIG_VARS
402
# -----------------------
403
# Produce commented declarations of non-tagged libtool config variables
404
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
405
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
406
# section) are produced by _LT_LIBTOOL_TAG_VARS.
407
m4_define([_LT_LIBTOOL_CONFIG_VARS],
408
[m4_foreach([_lt_var],
409
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
410
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
412
# _LT_LIBTOOL_TAG_VARS(TAG)
413
# -------------------------
414
m4_define([_LT_LIBTOOL_TAG_VARS],
415
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
416
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
419
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
420
# ---------------------------------
421
m4_define([_LT_AC_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
424
# _LT_CONFIG_COMMANDS
425
# -------------------
426
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
427
# variables for single and double quote escaping we saved from calls
428
# to _LT_DECL, we can put quote escaped variables declarations
429
# into `config.status', and then the shell code to quote escape them in
430
# for loops in `config.status'. Finally, any additional code accumulated
431
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
432
m4_define([_LT_CONFIG_COMMANDS],
433
[AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [
435
# The HP-UX ksh and POSIX shell print the target directory to stdout
437
if test "X${CDPATH+set}" = Xset; then CDPATH=${ZSH_VERSION+.}:; export CDPATH; fi
439
sed_quote_subst='$sed_quote_subst'
440
double_quote_subst='$double_quote_subst'
441
delay_variable_subst='$delay_variable_subst'
442
_LT_CONFIG_STATUS_DECLARATIONS
444
compiler='$compiler_DEFAULT'
446
# Quote evaled strings.
447
for var in lt_decl_all_varnames([[ ]], lt_decl_quote_varnames); do
448
eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
451
# Double-quote double-evaled strings.
452
for var in lt_decl_all_varnames([[ ]], lt_decl_dquote_varnames); do
453
eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
456
# Fix-up fallback echo if it was mangled by the above quoting rules.
458
*'\\\[$]0 --fallback-echo"')dnl "
459
lt_echo=\`\$echo "X\$lt_echo" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
463
_LT_OUTPUT_LIBTOOL_INIT
465
])#_LT_CONFIG_COMMANDS
469
# ----------------------------
470
# If TAG is the built-in tag, create an initial libtool script with a
471
# default configuration from the untagged config vars. Otherwise add code
472
# to config.status for appending the configuration named by TAG from the
473
# matching tagged config vars.
474
m4_define([_LT_CONFIG],
475
[_LT_CONFIG_SAVE_COMMANDS([
476
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
477
m4_if(_LT_TAG, [C], [
478
# See if we are running on zsh, and set the options which allow our
479
# commands through without removal of \ escapes.
480
if test -n "${ZSH_VERSION+set}" ; then
485
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
488
cat <<_LT_EOF >> "$cfgfile"
491
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
492
# Generated automatically by config.status (GNU $PACKAGE$TIMESTAMP) $VERSION
493
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
494
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
500
# ### BEGIN LIBTOOL CONFIG
501
_LT_LIBTOOL_CONFIG_VARS
503
# ### END LIBTOOL CONFIG
505
# The HP-UX ksh and POSIX shell print the target directory to stdout
507
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
513
cat <<\_LT_EOF >> "$cfgfile"
514
# AIX sometimes has problems with the GCC collect2 program. For some
515
# reason, if we set the COLLECT_NAMES environment variable, the problems
516
# vanish in a puff of smoke.
517
if test "X${COLLECT_NAMES+set}" != Xset; then
527
# We use sed instead of cat because bash on DJGPP gets confused if
528
# if finds mixed CR/LF and LF-only lines. Since sed operates in
529
# text mode, it properly converts lines to CR/LF. This bash problem
530
# is reportedly fixed, but why not run on old versions too?
531
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
533
mv -f "$cfgfile" "$ofile" ||
534
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
537
[cat <<_LT_EOF >> "$ofile"
539
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
540
dnl in a comment (ie after a #).
541
# ### BEGIN LIBTOOL TAG CONFIG: $1
542
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
543
# ### END LIBTOOL TAG CONFIG: $1
550
TIMESTAMP='$TIMESTAMP'
553
])dnl /_LT_CONFIG_SAVE_COMMANDS
557
# C support is built-in for now
558
m4_define([_LT_LANG_C_enabled], [])
559
m4_define([_LT_TAGS], [])
563
# Enable libtool support for the given language if not already enabled.
567
[C++], [_LT_LANG(CXX)],
568
[Java], [_LT_LANG(GCJ)],
569
[Fortran 77], [_LT_LANG(F77)],
570
[Windows Resource], [_LT_LANG(RC)],
571
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
573
[m4_fatal([$0: unsupported language: "$1"])])])dnl
578
m4_define([_LT_LANG],
579
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
580
[m4_append([_LT_TAGS], [$1 ])dnl
581
m4_define([_LT_LANG_]$1[_enabled], [])dnl
582
_LT_LANG_$1_CONFIG($1)])dnl
585
# _LT_LANG_DEFAULT_CONFIG
586
# -----------------------
587
m4_define([_LT_LANG_DEFAULT_CONFIG],
588
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
590
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
592
AC_PROVIDE_IFELSE([AC_PROG_F77],
594
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
596
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
597
dnl pulling things in needlessly.
598
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
600
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
602
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
604
[m4_ifdef([AC_PROG_GCJ],
605
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
606
m4_ifdef([A][M_PROG_GCJ],
607
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
608
m4_ifdef([LT_PROG_GCJ],
609
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
611
AC_PROVIDE_IFELSE([LT_PROG_RC],
613
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
614
])# _LT_LANG_DEFAULT_CONFIG
617
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
618
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
619
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java])])
622
# _LT_AC_SYS_COMPILER
623
# -------------------
624
AC_DEFUN([_LT_AC_SYS_COMPILER],
625
[AC_REQUIRE([AC_PROG_CC])dnl
627
_LT_DECL([LTCC], [CC], [1], [A C compiler])
628
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
629
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU C compiler?])
631
# If no C compiler was specified, use CC.
634
# Allow CC to be a program name with arguments.
636
])# _LT_AC_SYS_COMPILER
639
# _LT_AC_SYS_LIBPATH_AIX
640
# ----------------------
641
# Links a minimal program and checks the executable
642
# for the system default hardcoded library path. In most cases,
643
# this is /usr/lib:/lib, but when the MPI compilers are used
644
# the location of the communication and MPI libs are included too.
645
# If we don't find anything, use the default library path according
646
# to the aix ld manual.
647
m4_define([_LT_AC_SYS_LIBPATH_AIX],
648
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
649
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
651
# Check for a 64-bit object if we didn't find anything.
652
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; }
654
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
655
])# _LT_AC_SYS_LIBPATH_AIX
658
# _LT_AC_SHELL_INIT(ARG)
659
# ----------------------
660
m4_define([_LT_AC_SHELL_INIT],
661
[ifdef([AC_DIVERSION_NOTICE],
662
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
663
[AC_DIVERT_PUSH(NOTICE)])
666
])# _LT_AC_SHELL_INIT
669
# _LT_AC_PROG_ECHO_BACKSLASH
670
# --------------------------
671
# Add some code to the start of the generated configure script which
672
# will find an echo command which doesn't interpret backslashes.
673
m4_define([_LT_AC_PROG_ECHO_BACKSLASH],
675
# Check that we are running under the correct shell.
676
SHELL=${CONFIG_SHELL-/bin/sh}
680
# Remove one level of quotation (which was required for Make).
681
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
686
if test "X[$]1" = X--no-reexec; then
687
# Discard the --no-reexec flag, and continue.
689
elif test "X[$]1" = X--fallback-echo; then
690
# Avoid inline document here, it may be left over
692
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
693
# Yippee, $echo works!
696
# Restart under the correct shell.
697
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
700
if test "X[$]1" = X--fallback-echo; then
701
# used as fallback echo
709
# The HP-UX ksh and POSIX shell print the target directory to stdout
711
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
713
if test -z "$ECHO"; then
714
if test "X${echo_test_string+set}" != Xset; then
715
# find a string as large as possible, as long as the shell can cope with it
716
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
717
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
718
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
719
echo_test_string="`eval $cmd`" &&
720
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
727
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
728
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
729
test "X$echo_testing_string" = "X$echo_test_string"; then
732
# The Solaris, AIX, and Digital Unix default echo programs unquote
733
# backslashes. This makes it impossible to quote backslashes using
734
# echo "$something" | sed 's/\\/\\\\/g'
736
# So, first we look for a working echo in the user's PATH.
738
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
739
for dir in $PATH /usr/ucb; do
741
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
742
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
743
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
744
test "X$echo_testing_string" = "X$echo_test_string"; then
751
if test "X$echo" = Xecho; then
752
# We didn't find a better echo, so look for alternatives.
753
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
754
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
755
test "X$echo_testing_string" = "X$echo_test_string"; then
756
# This shell has a builtin print -r that does the trick.
758
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
759
test "X$CONFIG_SHELL" != X/bin/ksh; then
760
# If we have ksh, try running configure again with it.
761
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
762
export ORIGINAL_CONFIG_SHELL
763
CONFIG_SHELL=/bin/ksh
765
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
769
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
770
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
771
test "X$echo_testing_string" = "X$echo_test_string"; then
774
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
775
test "X$echo_testing_string" = 'X\t' &&
776
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
777
test "X$echo_testing_string" = "X$echo_test_string"; then
778
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
780
SHELL="$CONFIG_SHELL"
782
echo="$CONFIG_SHELL [$]0 --fallback-echo"
783
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
784
test "X$echo_testing_string" = 'X\t' &&
785
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
786
test "X$echo_testing_string" = "X$echo_test_string"; then
787
echo="$CONFIG_SHELL [$]0 --fallback-echo"
789
# maybe with a smaller string...
792
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
793
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
800
if test "$prev" != 'sed 50q "[$]0"'; then
801
echo_test_string=`eval $prev`
802
export echo_test_string
803
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
805
# Oops. We lost completely, so just stick with echo.
814
# Copy echo and quote the copy suitably for passing to libtool from
815
# the Makefile, instead of quoting the original, which is used later.
817
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
818
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
823
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
824
_LT_DECL([], [echo], [1],
825
[An echo program that does not interpret backslashes])
826
])# _LT_AC_PROG_ECHO_BACKSLASH
831
AC_DEFUN([_LT_AC_LOCK],
832
[AC_REQUIRE([AC_OBJEXT])dnl
833
AC_ARG_ENABLE([libtool-lock],
834
[AC_HELP_STRING([--disable-libtool-lock],
835
[avoid locking (might break parallel builds)])])
836
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
838
# Some flags need to be propagated to the compiler or linker for good
842
# Find out which ABI we are using.
843
echo 'int i;' > conftest.$ac_ext
844
if AC_TRY_EVAL(ac_compile); then
845
case `/usr/bin/file conftest.$ac_objext` in
857
# Find out which ABI we are using.
858
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
859
if AC_TRY_EVAL(ac_compile); then
860
if test "$lt_cv_prog_gnu_ld" = yes; then
861
case `/usr/bin/file conftest.$ac_objext` in
863
LD="${LD-ld} -melf32bsmip"
866
LD="${LD-ld} -melf32bmipn32"
869
LD="${LD-ld} -melf64bmip"
873
case `/usr/bin/file conftest.$ac_objext` in
889
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
890
# Find out which ABI we are using.
891
echo 'int i;' > conftest.$ac_ext
892
if AC_TRY_EVAL(ac_compile); then
893
case "`/usr/bin/file conftest.o`" in
897
LD="${LD-ld} -m elf_i386"
899
ppc64-*linux*|powerpc64-*linux*)
900
LD="${LD-ld} -m elf32ppclinux"
903
LD="${LD-ld} -m elf_s390"
906
LD="${LD-ld} -m elf32_sparc"
913
LD="${LD-ld} -m elf_x86_64"
915
ppc*-*linux*|powerpc*-*linux*)
916
LD="${LD-ld} -m elf64ppc"
919
LD="${LD-ld} -m elf64_s390"
922
LD="${LD-ld} -m elf64_sparc"
932
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
933
SAVE_CFLAGS="$CFLAGS"
934
CFLAGS="$CFLAGS -belf"
935
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
937
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
939
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
940
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
941
CFLAGS="$SAVE_CFLAGS"
946
need_locks="$enable_libtool_lock"
950
# AC_LIBTOOL_SYS_OLD_ARCHIVE
951
# --------------------------
952
AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE],
953
[AC_CHECK_TOOL(AR, ar, false)
954
test -z "$AR" && AR=ar
955
test -z "$AR_FLAGS" && AR_FLAGS=cru
956
_LT_DECL([], [AR], [1], [The archiver])
957
_LT_DECL([], [AR_FLAGS], [1])
959
AC_CHECK_TOOL(STRIP, strip, :)
960
test -z "$STRIP" && STRIP=:
961
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
963
AC_CHECK_TOOL(RANLIB, ranlib, :)
964
test -z "$RANLIB" && RANLIB=:
965
_LT_DECL([], [RANLIB], [1],
966
[Commands used to install an old-style archive])
968
# Determine commands to create old-style static archives.
969
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
970
old_postinstall_cmds='chmod 644 $oldlib'
971
old_postuninstall_cmds=
973
if test -n "$RANLIB"; then
976
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
979
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
982
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
984
_LT_DECL([], [old_postinstall_cmds], [2])
985
_LT_DECL([], [old_postuninstall_cmds], [2])
986
_LT_TAGDECL([], [old_archive_cmds], [2],
987
[Commands used to build an old-style archive])
988
])# AC_LIBTOOL_SYS_OLD_ARCHIVE
991
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
992
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
993
# ----------------------------------------------------------------
994
# Check whether the given compiler option works
995
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
996
[AC_REQUIRE([AC_OBJEXT])dnl
997
AC_REQUIRE([LT_AC_PROG_SED])dnl
998
AC_CACHE_CHECK([$1], [$2],
1000
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1001
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1002
lt_compiler_flag="$3"
1003
# Insert the option either (1) after the last *FLAGS variable, or
1004
# (2) before a word containing "conftest.", or (3) at the end.
1005
# Note that $ac_compile itself does not contain backslashes and begins
1006
# with a dollar sign (not a hyphen), so the echo should work correctly.
1007
# The option is referenced via a variable to avoid confusing sed.
1008
lt_compile=`echo "$ac_compile" | $SED \
1009
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1010
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1011
-e 's:$: $lt_compiler_flag:'`
1012
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1013
(eval "$lt_compile" 2>conftest.err)
1015
cat conftest.err >&AS_MESSAGE_LOG_FD
1016
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1017
if (exit $ac_status) && test -s "$ac_outfile"; then
1018
# The compiler can only warn and ignore the option if not recognized
1019
# So say no if there are warnings
1020
if test ! -s conftest.err; then
1027
if test x"[$]$2" = xyes; then
1028
m4_if([$5], , :, [$5])
1030
m4_if([$6], , :, [$6])
1032
])# AC_LIBTOOL_COMPILER_OPTION
1035
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1036
# [ACTION-SUCCESS], [ACTION-FAILURE])
1037
# ------------------------------------------------------------
1038
# Check whether the given compiler option works
1039
m4_define([AC_LIBTOOL_LINKER_OPTION],
1040
[AC_CACHE_CHECK([$1], [$2],
1042
save_LDFLAGS="$LDFLAGS"
1043
LDFLAGS="$LDFLAGS $3"
1044
printf "$lt_simple_link_test_code" > conftest.$ac_ext
1045
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1046
# The compiler can only warn and ignore the option if not recognized
1047
# So say no if there are warnings
1048
if test -s conftest.err; then
1049
# Append any errors to the config.log.
1050
cat conftest.err 1>&AS_MESSAGE_LOG_FD
1056
LDFLAGS="$save_LDFLAGS"
1059
if test x"[$]$2" = xyes; then
1060
m4_if([$4], , :, [$4])
1062
m4_if([$5], , :, [$5])
1064
])# AC_LIBTOOL_LINKER_OPTION
1067
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1068
# --------------------------
1069
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1070
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1071
# find the maximum length of command line arguments
1072
AC_MSG_CHECKING([the maximum length of command line arguments])
1073
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1079
# On DJGPP, this test can blow up pretty badly due to problems in libc
1080
# (any single argument exceeding 2000 bytes causes a buffer overrun
1081
# during glob expansion). Even if it were fixed, the result of this
1082
# check would be larger than it should be.
1083
lt_cv_sys_max_cmd_len=12288; # 12K is about right
1087
# Under GNU Hurd, this test is not required because there is
1088
# no limit to the length of command line arguments.
1089
# Libtool will interpret -1 as no limit whatsoever
1090
lt_cv_sys_max_cmd_len=-1;
1094
# On Win9x/ME, this test blows up -- it succeeds, but takes
1095
# about 5 minutes as the teststring grows exponentially.
1096
# Worse, since 9x/ME are not pre-emptively multitasking,
1097
# you end up with a "frozen" computer, even though with patience
1098
# the test eventually succeeds (with a max line length of 256k).
1099
# Instead, let's just punt: use the minimum linelength reported by
1100
# all of the supported platforms: 8192 (on NT/2K/XP).
1101
lt_cv_sys_max_cmd_len=8192;
1105
# On AmigaOS with pdksh, this test takes hours, literally.
1106
# So we just punt and use a minimum line length of 8192.
1107
lt_cv_sys_max_cmd_len=8192;
1111
# Make teststring a little bigger before we do anything with it.
1112
# a 1K string should be a reasonable start.
1113
for i in 1 2 3 4 5 6 7 8 ; do
1114
teststring=$teststring$teststring
1116
# If test is not a shell built-in, we'll probably end up computing a
1117
# maximum length that is only half of the actual maximum length, but
1119
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1120
= "XX$teststring$teststring") >/dev/null 2>&1 &&
1121
test $i != 17 # 1/2 MB should be enough
1124
teststring=$teststring$teststring
1126
# Only check the string length outside the loop.
1127
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1129
# Add a significant safety factor because C++ compilers can tack on massive
1130
# amounts of additional arguments before passing them to the linker.
1131
# It appears as though 1/2 is a usable value.
1132
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1136
if test -n $lt_cv_sys_max_cmd_len ; then
1137
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1141
_LT_DECL([max_cmd_len], [lt_cv_sys_max_cmd_len], [0],
1142
[What is the maximum length of a command?])
1143
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1146
# _LT_AC_CHECK_DLFCN
1147
# --------------------
1148
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1149
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1150
])# _LT_AC_CHECK_DLFCN
1153
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1154
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1155
# ------------------------------------------------------------------
1156
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1157
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1158
if test "$cross_compiling" = yes; then :
1161
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1162
lt_status=$lt_dlunknown
1163
cat > conftest.$ac_ext <<_LT_EOF
1164
[#line __oline__ "configure"
1165
#include "confdefs.h"
1174
# define LT_DLGLOBAL RTLD_GLOBAL
1177
# define LT_DLGLOBAL DL_GLOBAL
1179
# define LT_DLGLOBAL 0
1183
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1184
find out it does not work in some platform. */
1185
#ifndef LT_DLLAZY_OR_NOW
1187
# define LT_DLLAZY_OR_NOW RTLD_LAZY
1190
# define LT_DLLAZY_OR_NOW DL_LAZY
1193
# define LT_DLLAZY_OR_NOW RTLD_NOW
1196
# define LT_DLLAZY_OR_NOW DL_NOW
1198
# define LT_DLLAZY_OR_NOW 0
1206
extern "C" void exit (int);
1209
void fnord() { int i=42;}
1212
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1213
int status = $lt_dlunknown;
1217
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1218
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1219
/* dlclose (self); */
1225
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1226
(./conftest; exit; ) 2>/dev/null
1229
x$lt_dlno_uscore) $1 ;;
1230
x$lt_dlneed_uscore) $2 ;;
1231
x$lt_unknown|x*) $3 ;;
1234
# compilation failed
1239
])# _LT_AC_TRY_DLOPEN_SELF
1242
# AC_LIBTOOL_DLOPEN_SELF
1243
# -------------------
1244
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1245
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1246
if test "x$enable_dlopen" != xyes; then
1247
enable_dlopen=unknown
1248
enable_dlopen_self=unknown
1249
enable_dlopen_self_static=unknown
1256
lt_cv_dlopen="load_add_on"
1258
lt_cv_dlopen_self=yes
1262
lt_cv_dlopen="LoadLibrary"
1267
lt_cv_dlopen="dlopen"
1272
# if libdl is installed we need to link against it
1273
AC_CHECK_LIB([dl], [dlopen],
1274
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1277
lt_cv_dlopen_self=yes
1282
AC_CHECK_FUNC([shl_load],
1283
[lt_cv_dlopen="shl_load"],
1284
[AC_CHECK_LIB([dld], [shl_load],
1285
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1286
[AC_CHECK_FUNC([dlopen],
1287
[lt_cv_dlopen="dlopen"],
1288
[AC_CHECK_LIB([dl], [dlopen],
1289
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1290
[AC_CHECK_LIB([svld], [dlopen],
1291
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1292
[AC_CHECK_LIB([dld], [dld_link],
1293
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1302
if test "x$lt_cv_dlopen" != xno; then
1308
case $lt_cv_dlopen in
1310
save_CPPFLAGS="$CPPFLAGS"
1311
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1313
save_LDFLAGS="$LDFLAGS"
1314
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1317
LIBS="$lt_cv_dlopen_libs $LIBS"
1319
AC_CACHE_CHECK([whether a program can dlopen itself],
1320
lt_cv_dlopen_self, [dnl
1321
_LT_AC_TRY_DLOPEN_SELF(
1322
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1323
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1326
if test "x$lt_cv_dlopen_self" = xyes; then
1327
LDFLAGS="$LDFLAGS $link_static_flag"
1328
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1329
lt_cv_dlopen_self_static, [dnl
1330
_LT_AC_TRY_DLOPEN_SELF(
1331
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1332
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1336
CPPFLAGS="$save_CPPFLAGS"
1337
LDFLAGS="$save_LDFLAGS"
1342
case $lt_cv_dlopen_self in
1343
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1344
*) enable_dlopen_self=unknown ;;
1347
case $lt_cv_dlopen_self_static in
1348
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1349
*) enable_dlopen_self_static=unknown ;;
1352
_LT_DECL([dlopen_support], [enable_dlopen], [0],
1353
[Whether dlopen is supported])
1354
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1355
[Whether dlopen of programs is supported])
1356
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1357
[Whether dlopen of statically linked programs is supported])
1358
])# AC_LIBTOOL_DLOPEN_SELF
1361
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1362
# ---------------------------------
1363
# Check to see if options -c and -o are simultaneously supported by compiler
1364
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1365
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1366
AC_REQUIRE([AC_OBJEXT])dnl
1367
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1368
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1369
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1370
$rm -r conftest 2>/dev/null
1374
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1376
lt_compiler_flag="-o out/conftest2.$ac_objext"
1377
# Insert the option either (1) after the last *FLAGS variable, or
1378
# (2) before a word containing "conftest.", or (3) at the end.
1379
# Note that $ac_compile itself does not contain backslashes and begins
1380
# with a dollar sign (not a hyphen), so the echo should work correctly.
1381
lt_compile=`echo "$ac_compile" | $SED \
1382
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1383
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1384
-e 's:$: $lt_compiler_flag:'`
1385
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1386
(eval "$lt_compile" 2>out/conftest.err)
1388
cat out/conftest.err >&AS_MESSAGE_LOG_FD
1389
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1390
if (exit $ac_status) && test -s out/conftest2.$ac_objext
1392
# The compiler can only warn and ignore the option if not recognized
1393
# So say no if there are warnings
1394
if test ! -s out/conftest.err; then
1395
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1400
# SGI C++ compiler will create directory out/ii_files/ for
1401
# template instantiation
1402
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1403
$rm out/* && rmdir out
1408
_LT_DECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1409
[Does compiler simultaneously support -c and -o options?])
1410
])# AC_LIBTOOL_PROG_CC_C_O
1413
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1414
# -----------------------------------------
1415
# Check to see if we can do hard links to lock some files if needed
1416
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1417
[AC_REQUIRE([AC_LIBTOOL_PROG_CC_C_O])dnl
1418
AC_REQUIRE([_LT_AC_LOCK])dnl
1420
hard_links="nottested"
1421
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1422
# do not overwrite the value of need_locks provided by the user
1423
AC_MSG_CHECKING([if we can lock with hard links])
1426
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1428
ln conftest.a conftest.b 2>&5 || hard_links=no
1429
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1430
AC_MSG_RESULT([$hard_links])
1431
if test "$hard_links" = no; then
1432
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1438
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1439
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1444
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1445
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1446
[rm -f .libs 2>/dev/null
1447
mkdir .libs 2>/dev/null
1448
if test -d .libs; then
1451
# MS-DOS does not allow filenames that begin with a dot.
1454
rmdir .libs 2>/dev/null])
1455
objdir=$lt_cv_objdir
1456
_LT_DECL([], [objdir], [0],
1457
[The name of the directory that contains temporary libtool files])dnl
1458
])# AC_LIBTOOL_OBJDIR
1461
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1462
# ----------------------------------------------
1463
# Check hardcoding attributes.
1464
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1465
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1466
_LT_AC_TAGVAR(hardcode_action, $1)=
1467
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1468
test -n "$_LT_AC_TAGVAR(runpath_var $1)" ||
1469
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1471
# We can hardcode non-existant directories.
1472
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1473
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1474
# have to relink, otherwise we might link with an installed library
1475
# when we should be linking with a yet-to-be-installed one
1476
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1477
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1478
# Linking always hardcodes the temporary library directory.
1479
_LT_AC_TAGVAR(hardcode_action, $1)=relink
1481
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1482
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
1485
# We cannot hardcode anything, or else we can only hardcode existing
1487
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1489
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1491
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink ||
1492
test "$_LT_AC_TAGVAR(inherit_rpath, $1)" = yes; then
1493
# Fast installation is not supported
1494
enable_fast_install=no
1495
elif test "$shlibpath_overrides_runpath" = yes ||
1496
test "$enable_shared" = no; then
1497
# Fast installation is not necessary
1498
enable_fast_install=needless
1500
_LT_TAGDECL([], [hardcode_action], [0],
1501
[How to hardcode a shared library path into an executable])
1502
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1505
# AC_LIBTOOL_SYS_LIB_STRIP
1506
# ------------------------
1507
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1508
[AC_REQUIRE([LT_AC_PROG_EGREP])
1511
AC_MSG_CHECKING([whether stripping libraries is possible])
1512
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1513
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1514
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1515
AC_MSG_RESULT([yes])
1517
# FIXME - insert some real tests, host_os isn't really good enough
1520
if test -n "$STRIP" ; then
1521
striplib="$STRIP -x"
1522
AC_MSG_RESULT([yes])
1532
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1533
_LT_DECL([], [striplib], [1])
1534
])# AC_LIBTOOL_SYS_LIB_STRIP
1537
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1538
# -----------------------------
1539
# PORTME Fill in your ld.so characteristics
1540
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1541
[AC_REQUIRE([LT_AC_PROG_EGREP])
1542
AC_MSG_CHECKING([dynamic linker characteristics])
1544
libname_spec='lib$name'
1552
shlibpath_overrides_runpath=unknown
1554
dynamic_linker="$host_os ld.so"
1555
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1556
if test "$GCC" = yes; then
1557
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1558
if echo "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
1559
# if the path contains ";" then we assume it to be the separator
1560
# otherwise default to the standard path separator (i.e. ":") - it is
1561
# assumed that no part of a normal pathname contains ";" but that should
1562
# okay in the real world where ";" in dirpaths is itself problematic.
1563
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1565
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1568
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1570
need_lib_prefix=unknown
1571
hardcode_into_libs=no
1573
# when you set need_version to no, make sure it does not cause -set_version
1574
# flags to be left without arguments
1575
need_version=unknown
1580
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1581
shlibpath_var=LIBPATH
1583
# AIX 3 has no versioning support, so we append a major version to the name.
1584
soname_spec='${libname}${release}${shared_ext}$major'
1591
hardcode_into_libs=yes
1592
if test "$host_cpu" = ia64; then
1593
# AIX 5 supports IA64
1594
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1595
shlibpath_var=LD_LIBRARY_PATH
1597
# With GCC up to 2.95.x, collect2 would create an import file
1598
# for dependence libraries. The import file would start with
1599
# the line `#! .'. This would cause the generated library to
1600
# depend on `.', always an invalid library. This was fixed in
1601
# development snapshots of GCC prior to 3.0.
1603
aix4 | aix4.[[01]] | aix4.[[01]].*)
1604
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1606
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1613
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1614
# soname into executable. Probably we can add versioning support to
1615
# collect2, so additional links can be useful in future.
1616
if test "$aix_use_runtimelinking" = yes; then
1617
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
1618
# instead of lib<name>.a to let people know that these are not
1619
# typical AIX shared libraries.
1620
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1622
# We preserve .a as extension for shared libraries through AIX4.2
1623
# and later when we are not doing run time linking.
1624
library_names_spec='${libname}${release}.a $libname.a'
1625
soname_spec='${libname}${release}${shared_ext}$major'
1627
shlibpath_var=LIBPATH
1632
if test "$host_cpu" = m68k; then
1633
library_names_spec='$libname.ixlibrary $libname.a'
1634
# Create ${libname}_ixlibrary.a entries in /sys/libs.
1635
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'
1642
library_names_spec='${libname}${shared_ext}'
1643
dynamic_linker="$host_os ld.so"
1644
shlibpath_var=LIBRARY_PATH
1650
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1651
soname_spec='${libname}${release}${shared_ext}$major'
1652
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1653
shlibpath_var=LD_LIBRARY_PATH
1654
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1655
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1656
# the default ld.so.conf also contains /usr/contrib/lib and
1657
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1658
# libtool to hard-code these into programs
1661
cygwin* | mingw* | pw32*)
1662
version_type=windows
1667
case $GCC,$host_os in
1668
yes,cygwin* | yes,mingw* | yes,pw32*)
1669
library_names_spec='$libname.dll.a'
1670
# DLL is installed to $(libdir)/../bin by postinstall_cmds
1671
postinstall_cmds='base_file=`basename \${file}`~
1672
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1673
dldir=$destdir/`dirname \$dlpath`~
1674
test -d \$dldir || mkdir -p \$dldir~
1675
$install_prog $dir/$dlname \$dldir/$dlname'
1676
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1677
dlpath=$dir/\$dldll~
1679
shlibpath_overrides_runpath=yes
1683
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
1684
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1685
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1688
# MinGW DLLs use traditional 'lib' prefix
1689
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1690
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1691
if echo "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
1692
# It is most probably a Windows format PATH printed by
1693
# mingw gcc, but we are running on Cygwin. Gcc prints its search
1694
# path with ; separators, and with drive letters. We can handle the
1695
# drive letters (cygwin fileutils understands them), so leave them,
1696
# especially as we might pass files found there to a mingw objdump,
1697
# which wouldn't understand a cygwinified path. Ahh.
1698
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1700
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1704
# pw32 DLLs use 'pw' prefix rather than 'lib'
1705
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1711
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1714
dynamic_linker='Win32 ld.exe'
1715
# FIXME: first we should search . and the directory the executable is in
1719
darwin* | rhapsody*)
1720
dynamic_linker="$host_os dyld"
1724
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1725
soname_spec='${libname}${release}${major}$shared_ext'
1726
shlibpath_overrides_runpath=yes
1727
shlibpath_var=DYLD_LIBRARY_PATH
1728
shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1729
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1730
if test "$GCC" = yes; then
1731
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"`
1733
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1735
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1742
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1743
soname_spec='${libname}${release}${shared_ext}$major'
1744
shlibpath_var=LD_LIBRARY_PATH
1755
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1756
soname_spec='${libname}${release}${shared_ext}$major'
1757
shlibpath_var=LD_LIBRARY_PATH
1758
shlibpath_overrides_runpath=no
1759
hardcode_into_libs=yes
1760
dynamic_linker='GNU ld.so'
1764
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1765
version_type=freebsd-$objformat
1766
case $version_type in
1768
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1773
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1777
shlibpath_var=LD_LIBRARY_PATH
1780
shlibpath_overrides_runpath=yes
1782
freebsd3.[01]* | freebsdelf3.[01]*)
1783
shlibpath_overrides_runpath=yes
1784
hardcode_into_libs=yes
1787
shlibpath_overrides_runpath=no
1788
hardcode_into_libs=yes
1797
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1798
soname_spec='${libname}${release}${shared_ext}$major'
1799
shlibpath_var=LD_LIBRARY_PATH
1800
hardcode_into_libs=yes
1803
hpux9* | hpux10* | hpux11*)
1804
# Give a soname corresponding to the major version so that dld.sl refuses to
1805
# link against other versions.
1812
hardcode_into_libs=yes
1813
dynamic_linker="$host_os dld.so"
1814
shlibpath_var=LD_LIBRARY_PATH
1815
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1816
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1817
soname_spec='${libname}${release}${shared_ext}$major'
1818
if test "X$HPUX_IA64_MODE" = X32; then
1819
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1821
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1823
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1827
hardcode_into_libs=yes
1828
dynamic_linker="$host_os dld.sl"
1829
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1830
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1831
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1832
soname_spec='${libname}${release}${shared_ext}$major'
1833
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1834
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1838
dynamic_linker="$host_os dld.sl"
1839
shlibpath_var=SHLIB_PATH
1840
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1841
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1842
soname_spec='${libname}${release}${shared_ext}$major'
1845
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1846
postinstall_cmds='chmod 555 $lib'
1849
irix5* | irix6* | nonstopux*)
1851
nonstopux*) version_type=nonstopux ;;
1853
if test "$lt_cv_prog_gnu_ld" = yes; then
1861
soname_spec='${libname}${release}${shared_ext}$major'
1862
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1864
irix5* | nonstopux*)
1868
case $LD in # libtool.m4 will add one of these switches to LD
1869
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1870
libsuff= shlibsuff= libmagic=32-bit;;
1871
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1872
libsuff=32 shlibsuff=N32 libmagic=N32;;
1873
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1874
libsuff=64 shlibsuff=64 libmagic=64-bit;;
1875
*) libsuff= shlibsuff= libmagic=never-match;;
1879
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1880
shlibpath_overrides_runpath=no
1881
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1882
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1883
hardcode_into_libs=yes
1886
# No shared lib support for Linux oldld, aout, or coff.
1887
linux*oldld* | linux*aout* | linux*coff*)
1891
# This must be Linux ELF.
1896
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1897
soname_spec='${libname}${release}${shared_ext}$major'
1898
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1899
shlibpath_var=LD_LIBRARY_PATH
1900
shlibpath_overrides_runpath=no
1901
# This implies no fast_install, which is unacceptable.
1902
# Some rework will be needed to allow for fast_install
1903
# before this can be enabled.
1904
hardcode_into_libs=yes
1906
# Append ld.so.conf contents to the search path
1907
if test -f /etc/ld.so.conf; then
1908
lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1909
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1912
# We used to test for /lib/ld.so.1 and disable shared libraries on
1913
# powerpc, because MkLinux only supported shared libraries with the
1914
# GNU dynamic linker. Since this was broken with cross compilers,
1915
# most powerpc-linux boxes support dynamic linking these days and
1916
# people can always --disable-shared, the test was removed, and we
1917
# assume the GNU/Linux dynamic linker is in use.
1918
dynamic_linker='GNU/Linux ld.so'
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
shlibpath_var=LD_LIBRARY_PATH
1928
shlibpath_overrides_runpath=no
1929
hardcode_into_libs=yes
1930
dynamic_linker='GNU ld.so'
1937
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1938
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1939
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1940
dynamic_linker='NetBSD (a.out) ld.so'
1942
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1943
soname_spec='${libname}${release}${shared_ext}$major'
1944
dynamic_linker='NetBSD ld.elf_so'
1946
shlibpath_var=LD_LIBRARY_PATH
1947
shlibpath_overrides_runpath=yes
1948
hardcode_into_libs=yes
1953
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1954
shlibpath_var=LD_LIBRARY_PATH
1955
shlibpath_overrides_runpath=yes
1962
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1963
soname_spec='${libname}${release}${shared_ext}$major'
1964
shlibpath_var=LD_LIBRARY_PATH
1965
shlibpath_overrides_runpath=yes
1972
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1973
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1974
shlibpath_var=LD_LIBRARY_PATH
1975
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1977
openbsd2.[[89]] | openbsd2.[[89]].*)
1978
shlibpath_overrides_runpath=no
1981
shlibpath_overrides_runpath=yes
1985
shlibpath_overrides_runpath=yes
1990
libname_spec='$name'
1993
library_names_spec='$libname${shared_ext} $libname.a'
1994
dynamic_linker='OS/2 ld.exe'
1995
shlibpath_var=LIBPATH
1998
osf3* | osf4* | osf5*)
2002
soname_spec='${libname}${release}${shared_ext}$major'
2003
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2004
shlibpath_var=LD_LIBRARY_PATH
2005
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2006
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2011
soname_spec='${libname}${release}${shared_ext}$major'
2012
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2013
shlibpath_var=LD_LIBRARY_PATH
2020
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2021
soname_spec='${libname}${release}${shared_ext}$major'
2022
shlibpath_var=LD_LIBRARY_PATH
2023
shlibpath_overrides_runpath=yes
2024
hardcode_into_libs=yes
2025
# ldd complains unless libraries are executable
2026
postinstall_cmds='chmod +x $lib'
2031
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2032
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2033
shlibpath_var=LD_LIBRARY_PATH
2034
shlibpath_overrides_runpath=yes
2035
if test "$with_gnu_ld" = yes; then
2041
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2043
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2044
soname_spec='${libname}${release}${shared_ext}$major'
2045
shlibpath_var=LD_LIBRARY_PATH
2046
case $host_vendor in
2048
shlibpath_overrides_runpath=no
2050
runpath_var=LD_RUN_PATH
2058
shlibpath_overrides_runpath=no
2059
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2065
if test -d /usr/nec ;then
2067
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2068
soname_spec='$libname${shared_ext}.$major'
2069
shlibpath_var=LD_LIBRARY_PATH
2075
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2076
soname_spec='${libname}${release}${shared_ext}$major'
2077
shlibpath_var=LD_LIBRARY_PATH
2084
AC_MSG_RESULT([$dynamic_linker])
2085
test "$dynamic_linker" = no && can_build_shared=no
2086
_LT_DECL([], [need_lib_prefix], [0],
2087
[Do we need the "lib" prefix for modules?])
2088
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2089
_LT_DECL([], [version_type], [0], [Library versioning type])
2090
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2091
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2092
_LT_DECL([], [shlibpath_overrides_runpath], [0],
2093
[Is shibpath searched before the hard-coded library search path?])
2094
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2095
_LT_DECL([], [library_names_spec], [1],
2096
[List of archive names. First name is the real one, the rest are links.
2097
The last name is the one that the linker finds with -lNAME])
2098
_LT_DECL([], [soname_spec], [1],
2099
[The coded name of the library, if different from the real name])
2100
_LT_DECL([], [postinstall_cmds], [2],
2101
[Command to use after installation of a shared archive])
2102
_LT_DECL([], [postuninstall_cmds], [2],
2103
[Command to use after uninstallation of a shared archive])
2104
_LT_DECL([], [finish_cmds], [2],
2105
[Commands used to finish a libtool library installation in a directory])
2106
_LT_DECL([], [finish_eval], [1],
2107
[As "finish_cmds", except a single script fragment to be evaled but
2109
_LT_DECL([], [hardcode_into_libs], [0],
2110
[Whether we should hardcode library paths into libraries])
2111
_LT_DECL([], [sys_lib_search_path_spec], [2],
2112
[Compile-time system search path for libraries])
2113
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2114
[Run-time system search path for libraries])
2115
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2118
# AC_PATH_TOOL_PREFIX
2119
# -------------------
2120
# find a file program which can recognise shared library
2121
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2122
[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2123
AC_MSG_CHECKING([for $1])
2124
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2126
[[\\/*] | ?:[\\/]*])
2127
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2130
lt_save_MAGIC_CMD="$MAGIC_CMD"
2131
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2132
dnl $ac_dummy forces splitting on constant user-supplied paths.
2133
dnl POSIX.2 word splitting is done only on the output of word expansions,
2134
dnl not every word. This closes a longstanding sh security hole.
2135
ac_dummy="m4_if([$2], , $PATH, [$2])"
2136
for ac_dir in $ac_dummy; do
2138
test -z "$ac_dir" && ac_dir=.
2139
if test -f $ac_dir/$1; then
2140
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2141
if test -n "$file_magic_test_file"; then
2142
case $deplibs_check_method in
2144
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2145
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2146
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2147
$EGREP "$file_magic_regex" > /dev/null; then
2152
*** Warning: the command libtool uses to detect shared libraries,
2153
*** $file_magic_cmd, produces output that libtool cannot recognize.
2154
*** The result is that libtool may fail to recognize shared libraries
2155
*** as such. This will affect the creation of libtool libraries that
2156
*** depend on shared libraries, but programs linked with such libtool
2157
*** libraries will work regardless of this problem. Nevertheless, you
2158
*** may want to report the problem to your system manager and/or to
2159
*** bug-libtool@gnu.org
2169
MAGIC_CMD="$lt_save_MAGIC_CMD"
2172
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2173
if test -n "$MAGIC_CMD"; then
2174
AC_MSG_RESULT($MAGIC_CMD)
2178
_LT_DECL([], [MAGIC_CMD], [0],
2179
[Used to examine libraries when file_magic_cmd begins "file"])dnl
2180
])# AC_PATH_TOOL_PREFIX
2185
# find a file program which can recognise a shared library
2186
AC_DEFUN([AC_PATH_MAGIC],
2187
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2188
if test -z "$lt_cv_path_MAGIC_CMD"; then
2189
if test -n "$ac_tool_prefix"; then
2190
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2200
# find the pathname to the GNU or non-GNU linker
2201
AC_DEFUN([AC_PROG_LD],
2202
[AC_ARG_WITH([gnu-ld],
2203
[AC_HELP_STRING([--with-gnu-ld],
2204
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2205
[test "$withval" = no || with_gnu_ld=yes],
2207
AC_REQUIRE([LT_AC_PROG_SED])dnl
2208
AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2209
AC_REQUIRE([AC_PROG_CC])dnl
2210
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2211
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2214
if test "$GCC" = yes; then
2215
# Check if gcc -print-prog-name=ld gives a path.
2216
AC_MSG_CHECKING([for ld used by $CC])
2219
# gcc leaves a trailing carriage return which upsets mingw
2220
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2222
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2225
# Accept absolute paths.
2226
[[\\/]]* | ?:[[\\/]]*)
2227
re_direlt='/[[^/]][[^/]]*/\.\./'
2228
# Canonicalize the pathname of ld
2229
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2230
while echo $ac_prog | $GREP "$re_direlt" > /dev/null 2>&1; do
2231
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2233
test -z "$LD" && LD="$ac_prog"
2236
# If it fails, then pretend we aren't using GCC.
2240
# If it is relative, then search for the first ld in PATH.
2244
elif test "$with_gnu_ld" = yes; then
2245
AC_MSG_CHECKING([for GNU ld])
2247
AC_MSG_CHECKING([for non-GNU ld])
2249
AC_CACHE_VAL(lt_cv_path_LD,
2250
[if test -z "$LD"; then
2251
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2252
for ac_dir in $PATH; do
2254
test -z "$ac_dir" && ac_dir=.
2255
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2256
lt_cv_path_LD="$ac_dir/$ac_prog"
2257
# Check to see if the program is GNU ld. I'd rather use --version,
2258
# but apparently some GNU ld's only accept -v.
2259
# Break only if it was the GNU/non-GNU ld that we prefer.
2260
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2261
*GNU* | *'with BFD'*)
2262
test "$with_gnu_ld" != no && break
2265
test "$with_gnu_ld" != yes && break
2272
lt_cv_path_LD="$LD" # Let the user override the test with a path.
2275
if test -n "$LD"; then
2280
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2284
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2288
AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
2293
AC_DEFUN([AC_PROG_LD_GNU],
2294
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2295
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2296
case `$LD -v 2>&1 </dev/null` in
2297
*GNU* | *'with BFD'*)
2298
lt_cv_prog_gnu_ld=yes
2301
lt_cv_prog_gnu_ld=no
2304
with_gnu_ld=$lt_cv_prog_gnu_ld
2308
# AC_PROG_LD_RELOAD_FLAG
2309
# ----------------------
2310
# find reload flag for linker
2311
# -- PORTME Some linkers may need a different reload flag.
2312
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2313
[AC_CACHE_CHECK([for $LD option to reload object files],
2314
lt_cv_ld_reload_flag,
2315
[lt_cv_ld_reload_flag='-r'])
2316
reload_flag=$lt_cv_ld_reload_flag
2317
case $reload_flag in
2319
*) reload_flag=" $reload_flag" ;;
2321
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2324
if test "$GCC" = yes; then
2325
reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2327
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2331
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2332
_LT_DECL([], [reload_cmds], [2])dnl
2333
])# AC_PROG_LD_RELOAD_FLAG
2336
# AC_DEPLIBS_CHECK_METHOD
2337
# -----------------------
2338
# how to check for library dependencies
2339
# -- PORTME fill in with the dynamic library characteristics
2340
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2341
[AC_REQUIRE([LT_AC_PROG_EGREP])
2342
AC_CACHE_CHECK([how to recognise dependent libraries],
2343
lt_cv_deplibs_check_method,
2344
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2345
lt_cv_file_magic_test_file=
2346
lt_cv_deplibs_check_method='unknown'
2347
# Need to set the preceding variable on all platforms that support
2348
# interlibrary dependencies.
2349
# 'none' -- dependencies not supported.
2350
# `unknown' -- same as none, but documents that we really don't know.
2351
# 'pass_all' -- all dependencies passed with no checks.
2352
# 'test_compile' -- check by making test program.
2353
# 'file_magic [[regex]]' -- check by looking for files in library path
2354
# which responds to the $file_magic_cmd with a given extended regex.
2355
# If you have `file' or equivalent on your system and you're not sure
2356
# whether `pass_all' will *always* work, you probably want this one.
2360
lt_cv_deplibs_check_method=pass_all
2364
lt_cv_deplibs_check_method=pass_all
2368
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2369
lt_cv_file_magic_cmd='/usr/bin/file -L'
2370
lt_cv_file_magic_test_file=/shlib/libc.so
2374
# func_win32_libid is a shell function defined in ltmain.sh
2375
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2376
lt_cv_file_magic_cmd='func_win32_libid'
2379
# Base MSYS/MinGW do not provide the 'file' command needed by
2380
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
2382
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2383
lt_cv_file_magic_cmd='$OBJDUMP -f'
2386
darwin* | rhapsody*)
2387
lt_cv_deplibs_check_method=pass_all
2390
freebsd* | kfreebsd*-gnu)
2391
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2394
# Not sure whether the presence of OpenBSD here was a mistake.
2395
# Let's accept both of them until this is cleared up.
2396
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2397
lt_cv_file_magic_cmd=/usr/bin/file
2398
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2402
lt_cv_deplibs_check_method=pass_all
2407
lt_cv_deplibs_check_method=pass_all
2410
hpux10.20* | hpux11*)
2411
lt_cv_file_magic_cmd=/usr/bin/file
2414
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2415
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2418
[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]']
2419
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2422
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2423
lt_cv_file_magic_test_file=/usr/lib/libc.sl
2428
irix5* | irix6* | nonstopux*)
2430
*-32|*"-32 ") libmagic=32-bit;;
2431
*-n32|*"-n32 ") libmagic=N32;;
2432
*-64|*"-64 ") libmagic=64-bit;;
2433
*) libmagic=never-match;;
2435
lt_cv_deplibs_check_method=pass_all
2438
# This must be Linux ELF.
2441
alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
2442
lt_cv_deplibs_check_method=pass_all ;;
2444
# glibc up to 2.1.1 does not perform some relocations on ARM
2445
# this will be overridden with pass_all, but let us keep it just in case
2446
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2448
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2449
lt_cv_deplibs_check_method=pass_all
2452
netbsd* | knetbsd*-gnu)
2453
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2454
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2456
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2461
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2462
lt_cv_file_magic_cmd=/usr/bin/file
2463
lt_cv_file_magic_test_file=/usr/lib/libnls.so
2467
lt_cv_deplibs_check_method=unknown
2471
lt_cv_file_magic_cmd=/usr/bin/file
2472
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2473
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2474
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2476
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2480
osf3* | osf4* | osf5*)
2481
lt_cv_deplibs_check_method=pass_all
2485
lt_cv_deplibs_check_method=pass_all
2489
lt_cv_deplibs_check_method=pass_all
2492
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2493
case $host_vendor in
2495
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]]'
2496
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2499
lt_cv_deplibs_check_method=pass_all
2502
lt_cv_file_magic_cmd='/bin/file'
2503
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2506
lt_cv_file_magic_cmd='/bin/file'
2507
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2508
lt_cv_file_magic_test_file=/lib/libc.so
2511
lt_cv_deplibs_check_method=pass_all
2516
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2517
lt_cv_deplibs_check_method=pass_all
2521
file_magic_cmd=$lt_cv_file_magic_cmd
2522
deplibs_check_method=$lt_cv_deplibs_check_method
2523
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2525
_LT_DECL([], [deplibs_check_method], [1],
2526
[Method to check whether dependent libraries are shared objects])
2527
_LT_DECL([], [file_magic_cmd], [1],
2528
[Command to use when deplibs_check_method == "file_magic"])
2529
])# AC_DEPLIBS_CHECK_METHOD
2534
# find the pathname to a BSD-compatible name lister
2535
AC_DEFUN([AC_PROG_NM],
2536
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2537
[if test -n "$NM"; then
2538
# Let the user override the test.
2541
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2542
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2544
test -z "$ac_dir" && ac_dir=.
2545
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2546
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2547
# Check to see if the nm accepts a BSD-compat flag.
2548
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2549
# nm: unknown option "B" ignored
2550
# Tru64's nm complains that /dev/null is an invalid object file
2551
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2552
*/dev/null* | *'Invalid file or object type'*)
2553
lt_cv_path_NM="$tmp_nm -B"
2557
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2559
lt_cv_path_NM="$tmp_nm -p"
2563
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2564
continue # so that we can try to find one that supports BSD flags
2571
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2574
test -z "$NM" && NM=nm
2576
_LT_DECL([], [NM], [1], [A BSD-compatible nm program])dnl
2580
AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
2585
# check for math library
2586
AC_DEFUN([AC_CHECK_LIBM],
2587
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2590
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2591
# These system don't have libm, or don't need it
2594
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2595
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2598
AC_CHECK_LIB(m, cos, LIBM="-lm")
2604
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2605
# -----------------------------------
2606
# sets LIBLTDL to the link flags for the libltdl convenience library and
2607
# LTDLINCL to the include flags for the libltdl header and adds
2608
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2609
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2610
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2611
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2612
# '${top_srcdir}/' (note the single quotes!). If your package is not
2613
# flat and you're not using automake, define top_builddir and
2614
# top_srcdir appropriately in the Makefiles.
2615
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2616
[case $enable_ltdl_convenience in
2617
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2618
"") enable_ltdl_convenience=yes
2619
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2621
LIBLTDL='${top_builddir}/'m4_if($#, 1,[$1], ['libltdl'])/libltdlc.la
2622
LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
2623
# For backwards non-gettext consistent compatibility...
2625
])# AC_LIBLTDL_CONVENIENCE
2628
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2629
# -----------------------------------
2630
# sets LIBLTDL to the link flags for the libltdl installable library and
2631
# LTDLINCL to the include flags for the libltdl header and adds
2632
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2633
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2634
# DIRECTORY is not provided and an installed libltdl is not found, it is
2635
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2636
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2637
# quotes!). If your package is not flat and you're not using automake,
2638
# define top_builddir and top_srcdir appropriately in the Makefiles.
2639
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2640
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2641
[AC_CHECK_LIB(ltdl, lt_dlinit,
2642
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2643
[if test x"$enable_ltdl_install" = xno; then
2644
AC_MSG_WARN([libltdl not installed, but installation disabled])
2646
enable_ltdl_install=yes
2649
if test x"$enable_ltdl_install" = x"yes"; then
2650
ac_configure_args="$ac_configure_args --enable-ltdl-install"
2651
LIBLTDL='${top_builddir}/'m4_if($#, 1, [$1], ['libltdl'])/libltdl.la
2652
LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
2654
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2658
# For backwards non-gettext consistent compatibility...
2660
])# AC_LIBLTDL_INSTALLABLE
2663
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
2664
# -------------------------------------------
2665
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
2666
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2668
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2670
if test "$GCC" = yes; then
2671
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2673
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
2674
lt_cv_prog_compiler_rtti_exceptions,
2675
[-fno-rtti -fno-exceptions], [],
2676
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
2678
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
2679
[Compiler flag to turn off builtin functions])
2680
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
2683
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2684
# ---------------------------------
2685
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
2686
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2687
AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2688
AC_REQUIRE([AC_PROG_CC])dnl
2689
AC_REQUIRE([AC_PROG_LD])dnl
2690
AC_REQUIRE([AC_PROG_NM])dnl
2691
AC_REQUIRE([AC_OBJEXT])dnl
2692
# Check for command to grab the raw symbol name followed by C symbol from nm.
2693
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
2694
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
2696
# These are sane defaults that work on at least a few old systems.
2697
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
2699
# Character class describing NM global symbol codes.
2700
symcode='[[BCDEGRST]]'
2702
# Regexp to match symbols that can be accessed directly from C.
2703
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
2705
# Transform the above into a raw symbol and a C symbol.
2706
symxfrm='\1 \2\3 \3'
2708
# Transform an extracted symbol line into a proper C declaration
2709
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
2711
# Transform an extracted symbol line into symbol name and symbol address
2712
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
2714
# Define system-specific variables.
2719
cygwin* | mingw* | pw32*)
2720
symcode='[[ABCDGISTW]]'
2722
hpux*) # Its linker distinguishes data from code symbols
2723
if test "$host_cpu" = ia64; then
2724
symcode='[[ABCDEGRST]]'
2726
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2727
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
2730
symcode='[[BCDEGRST]]'
2733
symcode='[[BCDEGQRST]]'
2739
symcode='[[DFNSTU]]'
2743
# Handle CRLF in mingw tool chain
2747
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
2751
# If we're using GNU nm, then use its standard symbol codes.
2752
case `$NM -V 2>&1` in
2753
*GNU* | *'with BFD'*)
2754
symcode='[[ABCDGIRSTW]]' ;;
2757
# Try without a prefix undercore, then with it.
2758
for ac_symprfx in "" "_"; do
2760
# Write the raw and C identifiers.
2761
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2763
# Check to see that the pipe works correctly.
2767
cat > conftest.$ac_ext <<_LT_EOF
2772
void nm_test_func(){}
2776
int main(){nm_test_var='a';nm_test_func();return(0);}
2779
if AC_TRY_EVAL(ac_compile); then
2780
# Now try to grab the symbols.
2782
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
2783
# Try sorting and uniquifying the output.
2784
if sort "$nlist" | uniq > "$nlist"T; then
2785
mv -f "$nlist"T "$nlist"
2790
# Make sure that we snagged all the symbols we need.
2791
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
2792
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
2793
cat <<_LT_EOF > conftest.$ac_ext
2799
# Now generate the symbol file.
2800
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
2802
cat <<_LT_EOF >> conftest.$ac_ext
2803
#if defined (__STDC__) && __STDC__
2804
# define lt_ptr_t void *
2806
# define lt_ptr_t char *
2810
/* The mapping between symbol names and symbols. */
2815
lt_preloaded_symbols[[]] =
2818
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
2819
cat <<\_LT_EOF >> conftest.$ac_ext
2827
# Now try linking the two files.
2828
mv conftest.$ac_objext conftstm.$ac_objext
2829
lt_save_LIBS="$LIBS"
2830
lt_save_CFLAGS="$CFLAGS"
2831
LIBS="conftstm.$ac_objext"
2832
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
2833
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
2836
LIBS="$lt_save_LIBS"
2837
CFLAGS="$lt_save_CFLAGS"
2839
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
2842
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
2845
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
2848
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
2849
cat conftest.$ac_ext >&5
2851
rm -f conftest* conftst*
2853
# Do not use the global_symbol_pipe unless it works.
2854
if test "$pipe_works" = yes; then
2857
lt_cv_sys_global_symbol_pipe=
2861
if test -z "$lt_cv_sys_global_symbol_pipe"; then
2862
lt_cv_sys_global_symbol_to_cdecl=
2864
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
2865
AC_MSG_RESULT(failed)
2870
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
2871
[Take the output of nm and produce a listing of raw symbols and C names])
2872
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
2873
[Transform the output of nm in a proper C declaration])
2874
_LT_DECL([global_symbol_to_c_name_address],
2875
[lt_cv_sys_global_symbol_to_c_name_address], [1],
2876
[Transform the output of nm in a C name address pair])
2877
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2880
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
2881
# ---------------------------------------
2882
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
2883
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
2884
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
2885
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
2887
AC_MSG_CHECKING([for $compiler option to produce PIC])
2888
m4_if([$1], [CXX], [
2889
# C++ specific cases for pic, static, wl, etc.
2890
if test "$GXX" = yes; then
2891
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2892
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
2896
# All AIX code is PIC.
2897
if test "$host_cpu" = ia64; then
2898
# AIX 5 now supports IA64 processor
2899
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
2903
if test "$host_cpu" = m68k; then
2904
# FIXME: we need at least 68020 code to build shared libraries, but
2905
# adding the `-m68020' flag to GCC prevents building anything better,
2907
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
2910
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2911
# PIC is the default for these OSes.
2913
mingw* | os2* | pw32*)
2914
# This hack is so that the source file can tell whether it is being
2915
# built for inclusion in a dll (and should export symbols for example).
2916
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
2918
darwin* | rhapsody*)
2919
# PIC is the default on this platform
2920
# Common symbols not allowed in MH_DYLIB files
2921
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
2924
# DJGPP does not support shared libraries at all
2925
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
2928
if test -d /usr/nec; then
2929
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
2933
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
2939
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
2944
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
2950
# All AIX code is PIC.
2951
if test "$host_cpu" = ia64; then
2952
# AIX 5 now supports IA64 processor
2953
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
2955
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
2959
case $cc_basename in
2961
# Green Hills C++ Compiler
2962
# _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"
2967
# PIC is the default on this platform
2968
# Common symbols not allowed in MH_DYLIB files
2969
case "$cc_basename" in
2971
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
2972
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2977
case $cc_basename in
2979
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
2982
# Green Hills C++ Compiler
2983
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
2989
freebsd* | kfreebsd*-gnu)
2990
# FreeBSD uses GNU C++
2992
hpux9* | hpux10* | hpux11*)
2993
case $cc_basename in
2995
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
2996
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
2997
if test "$host_cpu" != ia64; then
2998
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3002
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3003
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
3009
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3017
irix5* | irix6* | nonstopux*)
3018
case $cc_basename in
3020
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3021
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3022
# CC pic flag -KPIC is the default.
3029
case $cc_basename in
3032
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3033
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3037
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3038
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3039
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3043
# Make sure the PIC flag is empty. It appears that all Alpha
3044
# Linux and Compaq Tru64 Unix objects are PIC.
3045
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3046
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3057
case $cc_basename in
3059
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3067
osf3* | osf4* | osf5*)
3068
case $cc_basename in
3070
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3073
# Rational C++ 2.4.1
3074
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3077
# Digital/Compaq C++
3078
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3079
# Make sure the PIC flag is empty. It appears that all Alpha
3080
# Linux and Compaq Tru64 Unix objects are PIC.
3081
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3082
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3091
case $cc_basename in
3093
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3100
case $cc_basename in
3102
# Sun C++ 4.2, 5.x and Centerline C++
3103
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3104
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3105
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3108
# Green Hills C++ Compiler
3109
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3116
case $cc_basename in
3119
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3120
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3124
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3131
case $cc_basename in
3133
# NonStop-UX NCC 3.20
3134
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3145
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3151
if test "$GCC" = yes; then
3152
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3153
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3157
# All AIX code is PIC.
3158
if test "$host_cpu" = ia64; then
3159
# AIX 5 now supports IA64 processor
3160
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3165
if test "$host_cpu" = m68k; then
3166
# FIXME: we need at least 68020 code to build shared libraries, but
3167
# adding the `-m68020' flag to GCC prevents building anything better,
3169
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3173
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3174
# PIC is the default for these OSes.
3177
mingw* | pw32* | os2*)
3178
# This hack is so that the source file can tell whether it is being
3179
# built for inclusion in a dll (and should export symbols for example).
3180
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3183
darwin* | rhapsody*)
3184
# PIC is the default on this platform
3185
# Common symbols not allowed in MH_DYLIB files
3186
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
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
if test -d /usr/nec; then
3198
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3203
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3210
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3216
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3220
# PORTME Check for flag to pass linker flags through the system compiler.
3223
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3224
if test "$host_cpu" = ia64; then
3225
# AIX 5 now supports IA64 processor
3226
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3228
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3232
# PIC is the default on this platform
3233
# Common symbols not allowed in MH_DYLIB files
3234
case "$cc_basename" in
3236
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3237
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3242
mingw* | pw32* | os2*)
3243
# This hack is so that the source file can tell whether it is being
3244
# built for inclusion in a dll (and should export symbols for example).
3245
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3248
hpux9* | hpux10* | hpux11*)
3249
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3250
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3257
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3260
# Is there a better lt_prog_compiler_static that works with the bundled CC?
3261
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3264
irix5* | irix6* | nonstopux*)
3265
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3266
# PIC (with -KPIC) is the default.
3267
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3271
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3272
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3278
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3279
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3280
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3283
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3284
# All Alpha code is PIC.
3285
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3290
osf3* | osf4* | osf5*)
3291
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3292
# All OSF/1 code is PIC.
3293
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3297
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
3298
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
3302
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3303
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3304
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3308
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3309
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3310
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3313
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3314
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3315
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3316
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3320
if test -d /usr/nec ;then
3321
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3322
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3327
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3328
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3332
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3338
# For platforms which do not support PIC, -DPIC is meaningless:
3340
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3343
_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],[])])"
3346
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
3347
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3348
[How to pass a linker flag through the compiler])
3351
# Check to make sure the PIC flag actually works.
3353
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
3354
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
3355
[_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1)],
3356
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3357
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
3359
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3361
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3362
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3364
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3365
[Additional compiler flags for building library objects])
3368
# Check to make sure the static flag actually works.
3370
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3371
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3372
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3374
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3375
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3376
[Compiler flag to prevent dynamic linking])
3377
])# AC_LIBTOOL_PROG_COMPILER_PIC
3380
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
3381
# ------------------------------------
3382
# See if the linker supports building shared libraries.
3383
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
3384
[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
3385
AC_REQUIRE([AC_PROG_LD])dnl
3386
AC_REQUIRE([AC_PROG_NM])dnl
3387
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
3388
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3389
m4_if([$1], [CXX], [
3390
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3393
# If we're using GNU nm, then we don't want the "-C" option.
3394
# -C means demangle to AIX nm, but means don't demangle with GNU nm
3395
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3396
_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'
3398
_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'
3402
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3405
_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'
3408
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3413
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3414
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3415
_LT_AC_TAGVAR(archive_cmds, $1)=
3416
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3417
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3418
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3419
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3420
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3421
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3422
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3423
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3424
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3425
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3426
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3427
_LT_AC_TAGVAR(inherit_rpath, $1)=no
3428
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3429
_LT_AC_TAGVAR(module_cmds, $1)=
3430
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3431
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)=
3432
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3433
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
3434
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3435
# include_expsyms should be a list of space-separated symbols to be *always*
3436
# included in the symbol list
3437
_LT_AC_TAGVAR(include_expsyms, $1)=
3438
# exclude_expsyms can be an extended regexp of symbols to exclude
3439
# it will be wrapped by ` (' and `)$', so one must not match beginning or
3440
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3441
# as well as any symbol that contains `d'.
3442
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
3443
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3444
# platforms (ab)use it in PIC code, but their linkers get confused if
3445
# the symbol is explicitly referenced. Since portable code cannot
3446
# rely on this symbol name, it's probably fine to never include it in
3447
# preloaded symbol tables.
3448
extract_expsyms_cmds=
3451
cygwin* | mingw* | pw32*)
3452
# FIXME: the MSVC++ port hasn't been tested in a loooong time
3453
# When not using gcc, we currently assume that we are using
3454
# Microsoft Visual C++.
3455
if test "$GCC" != yes; then
3464
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3465
if test "$with_gnu_ld" = yes; then
3466
# If archive_cmds runs LD, not CC, wlarc should be empty
3469
# See if GNU ld supports shared libraries.
3471
aix3* | aix4* | aix5*)
3472
# On AIX/PPC, the GNU linker is very broken
3473
if test "$host_cpu" != ia64; then
3474
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3477
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
3478
*** to be unable to reliably create shared libraries on AIX.
3479
*** Therefore, libtool is disabling shared libraries support. If you
3480
*** really care for shared libraries, you may want to modify your PATH
3481
*** so that a non-GNU linker is found, and then restart.
3488
if test "$host_cpu" = m68k; then
3489
_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)'
3490
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3491
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3494
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3495
# that the semantics of dynamic libraries on AmigaOS, at least up
3496
# to version 4, is to share data among multiple programs linked
3497
# with the same dynamic library. Since this doesn't match the
3498
# behavior of shared libraries on other platforms, we can't use
3500
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3504
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3505
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3506
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3507
# support --undefined. This deserves some investigation. FIXME
3508
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3510
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3514
cygwin* | mingw* | pw32*)
3515
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3516
# as there is no search path for DLLs.
3517
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3518
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3519
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3520
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3521
_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'
3523
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
3524
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3525
# If the export-symbols file already is a .def file (1st line
3526
# is EXPORTS), use it as is; otherwise, prepend...
3527
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3528
cp $export_symbols $output_objdir/$soname.def;
3530
echo EXPORTS > $output_objdir/$soname.def;
3531
cat $export_symbols >> $output_objdir/$soname.def;
3533
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3540
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3541
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3544
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3545
_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'
3550
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
3551
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3554
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
3555
*** create shared libraries on Solaris systems. Therefore, libtool
3556
*** is disabling shared libraries support. We urge you to upgrade GNU
3557
*** binutils to release 2.9.1 or newer. Another option is to modify
3558
*** your PATH or compiler configuration so that the native linker is
3559
*** used, and then restart.
3562
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3563
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3564
_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'
3566
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3571
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3573
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3574
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3578
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null; then
3579
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3580
case `$LD -v 2>&1` in
3581
*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
3582
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
3583
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
3584
*\ 2.11.*) ;; # other 2.11 versions
3585
*) supports_anon_versioning=yes ;;
3587
if test "x$supports_anon_versioning" = xyes; then
3588
_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'
3590
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
3593
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3598
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3599
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3600
_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'
3602
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3607
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
3608
runpath_var=LD_RUN_PATH
3609
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3610
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3611
# ancient GNU ld didn't support --whole-archive et. al.
3612
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
3613
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3615
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3619
# PORTME fill in a description of your system's linker (not GNU ld)
3622
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3623
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3624
_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'
3625
# Note: this linker hardcodes the directories in LIBPATH if there
3626
# are no directories specified by -L.
3627
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3628
if test "$GCC" = yes && test -z "$link_static_flag"; then
3629
# Neither direct hardcoding nor static linking is supported with a
3631
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3636
if test "$host_cpu" = ia64; then
3637
# On IA64, the linker does run time linking by default, so we don't
3638
# have to do anything special.
3639
aix_use_runtimelinking=no
3640
exp_sym_flag='-Bexport'
3643
# If we're using GNU nm, then we don't want the "-C" option.
3644
# -C means demangle to AIX nm, but means don't demangle with GNU nm
3645
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3646
_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'
3648
_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'
3650
aix_use_runtimelinking=no
3652
# Test if we are trying to use run time linking or normal
3653
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
3654
# need to do runtime linking.
3655
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3656
for ld_flag in $LDFLAGS; do
3657
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3658
aix_use_runtimelinking=yes
3664
exp_sym_flag='-bexport'
3665
no_entry_flag='-bnoentry'
3668
# When large executables or shared objects are built, AIX ld can
3669
# have problems creating the table of contents. If linking a library
3670
# or program results in "error TOC overflow" add -mminimal-toc to
3671
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3672
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3674
_LT_AC_TAGVAR(archive_cmds, $1)=''
3675
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3676
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3677
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3679
if test "$GCC" = yes; then
3680
case $host_os in aix4.[012]|aix4.[012].*)
3681
# We only want to do this on AIX 4.2 and lower, the check
3682
# below for broken collect2 doesn't work under 4.3+
3683
collect2name=`${CC} -print-prog-name=collect2`
3684
if test -f "$collect2name" &&
3685
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
3687
# We have reworked collect2
3688
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3690
# We have old collect2
3691
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3692
# It fails to find uninstalled libraries when the uninstalled
3693
# path is not listed in the libpath. Setting hardcode_minus_L
3694
# to unsupported forces relinking
3695
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3696
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3697
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3700
shared_flag='-shared'
3703
if test "$host_cpu" = ia64; then
3704
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3705
# chokes on -Wl,-G. The following line is correct:
3708
if test "$aix_use_runtimelinking" = yes; then
3709
shared_flag='${wl}-G'
3711
shared_flag='${wl}-bM:SRE'
3716
# It seems that -bexpall does not export symbols beginning with
3717
# underscore (_), so it is better to generate a list of symbols to export.
3718
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3719
if test "$aix_use_runtimelinking" = yes; then
3720
# Warning - without using the other runtime loading flags (-brtl),
3721
# -berok will link without error, but may produce a broken library.
3722
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3723
# Determine the default libpath from the value encoded in an
3725
_LT_AC_SYS_LIBPATH_AIX
3726
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3727
_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"
3729
if test "$host_cpu" = ia64; then
3730
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3731
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3732
_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"
3734
# Determine the default libpath from the value encoded in an
3736
_LT_AC_SYS_LIBPATH_AIX
3737
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3738
# Warning - without using the other run time loading flags,
3739
# -berok will link without error, but may produce a broken library.
3740
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3741
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3742
# -bexpall does not export symbols beginning with underscore (_)
3743
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3744
# Exported symbols can be pulled into shared objects from archives
3745
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3746
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3747
# This is similar to how AIX traditionally builds it's shared libraries.
3748
_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'
3754
if test "$host_cpu" = m68k; then
3755
_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)'
3756
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3757
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3759
# see comment about different semantics on the GNU ld section
3760
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3764
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
3767
cygwin* | mingw* | pw32*)
3768
# When not using gcc, we currently assume that we are using
3769
# Microsoft Visual C++.
3770
# hardcode_libdir_flag_spec is actually meaningless, as there is
3771
# no search path for DLLs.
3772
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
3773
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3774
# Tell ltmain to make .lib files, not .a files.
3776
# Tell ltmain to make .dll files, not .so files.
3778
# FIXME: Setting linknames here is a bad hack.
3779
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
3780
# The linker will automatically build a .lib file if we build a DLL.
3781
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='true'
3782
# FIXME: Should let the user specify the lib program.
3783
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
3784
fix_srcfile_path='`cygpath -w "$srcfile"`'
3785
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3788
darwin* | rhapsody*)
3790
rhapsody* | darwin1.[[012]])
3791
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3794
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3795
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${Wl}suppress'
3797
case ${MACOSX_DEPLOYMENT_TARGET} in
3799
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3802
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3808
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3809
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3810
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3811
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3812
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3813
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3814
if test "$GCC" = yes ; then
3815
output_verbose_link_cmd='echo'
3816
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3817
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3818
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3819
_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}'
3820
_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}'
3822
case "$cc_basename" in
3824
output_verbose_link_cmd='echo'
3825
_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'
3826
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3827
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3828
_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}'
3829
_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}'
3832
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3838
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3839
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3840
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3844
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3847
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3848
# support. Future versions do this automatically, but an explicit c++rt0.o
3849
# does not break anything, and helps significantly (at the cost of a little
3852
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3853
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3854
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3855
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3858
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
3860
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3861
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3862
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3863
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3866
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3867
freebsd* | kfreebsd*-gnu)
3868
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3869
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3870
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3871
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3875
if test "$GCC" = yes; then
3876
_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'
3878
_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'
3880
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3881
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3882
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3884
# hardcode_minus_L: Not really in the search PATH,
3885
# but as the default location of the library.
3886
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3887
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3891
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
3894
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3897
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
3903
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
3906
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
3910
if test "$with_gnu_ld" = no; then
3913
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3914
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3915
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3916
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3917
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3920
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3921
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3922
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3924
# hardcode_minus_L: Not really in the search PATH,
3925
# but as the default location of the library.
3926
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3929
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3930
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3931
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3932
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3934
# hardcode_minus_L: Not really in the search PATH,
3935
# but as the default location of the library.
3936
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3942
irix5* | irix6* | nonstopux*)
3943
if test "$GCC" = yes; then
3944
_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'
3945
_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'
3947
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
3949
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
3951
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3952
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3953
_LT_AC_TAGVAR(inherit_rpath, $1)=yes
3954
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3958
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3959
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
3961
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
3963
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3964
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3965
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3969
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3970
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3971
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3972
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3973
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3977
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3978
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3979
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3980
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
3981
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3982
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3985
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
3986
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3987
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3990
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
3991
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3998
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3999
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4000
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4001
_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'
4002
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4006
if test "$GCC" = yes; then
4007
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4008
_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'
4010
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4011
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4013
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4014
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4017
osf4* | osf5*) # as osf3* with the addition of -msym flag
4018
if test "$GCC" = yes; then
4019
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4020
_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'
4021
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4023
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4024
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4025
_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~
4026
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
4028
# Both c and cxx compiler support -rpath directly
4029
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4031
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4035
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4036
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4037
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4038
runpath_var=LD_RUN_PATH
4039
hardcode_runpath_var=yes
4043
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4044
if test "$GCC" = yes; then
4045
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4046
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4047
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4049
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4050
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4051
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4053
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4054
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4056
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4057
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
4058
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4060
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4064
if test "x$host_vendor" = xsequent; then
4065
# Use $CC to link under sequent, because it throws in some extra .o
4066
# files that make .init and .fini sections work.
4067
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4069
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4071
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4072
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4073
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4074
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4078
case $host_vendor in
4080
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4081
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4084
## LD is ld it makes a PLAMLIB
4085
## CC just makes a GrossModule.
4086
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4087
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4088
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4091
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4092
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4095
runpath_var='LD_RUN_PATH'
4096
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4100
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4101
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4102
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4106
if test -d /usr/nec; then
4107
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4108
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4109
runpath_var=LD_RUN_PATH
4110
hardcode_runpath_var=yes
4111
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4116
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4117
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4118
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4119
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4120
hardcode_runpath_var=yes
4121
runpath_var=LD_RUN_PATH
4124
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4125
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
4126
if test "$GCC" = yes; then
4127
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4129
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4131
runpath_var='LD_RUN_PATH'
4132
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4136
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4137
# $CC -shared without GNU ld will not create a library from C++
4138
# object files and a static libstdc++, better avoid it by now
4139
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4140
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4141
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4142
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4143
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4144
runpath_var='LD_RUN_PATH'
4148
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4149
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4150
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4154
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4158
if test x$host_vendor = xsni; then
4160
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4161
export_dynamic_flag_spec='${wl}-Blargedynsym'
4167
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4168
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4170
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4171
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4172
_LT_DECL([], [extract_expsyms_cmds], [2],
4173
[The commands to extract the exported symbol list from a shared archive])
4175
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4176
if test "$GCC" = yes; then
4177
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4179
_LT_DECL([], [variables_saved_for_relink], [1],
4180
[Variables whose values should be saved in libtool wrapper scripts and
4181
restored at link time])
4184
# Do we need to explicitly link libc?
4186
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
4188
# Assume -lc should be added
4189
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4191
if test "$enable_shared" = yes && test "$GCC" = yes; then
4192
case $_LT_AC_TAGVAR(archive_cmds, $1) in
4194
# FIXME: we may have to deal with multi-command sequences.
4197
# Test whether the compiler implicitly links with -lc since on some
4198
# systems, -lgcc has to come before -lc. If gcc already passes -lc
4199
# to ld, don't add -lc before -lgcc.
4200
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4202
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
4204
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4207
libobjs=conftest.$ac_objext
4209
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4215
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
4216
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4217
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4219
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4221
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4223
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4225
cat conftest.err 1>&5
4228
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
4235
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4236
[Whether or not to add -lc for building shared libraries])
4237
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
4238
[enable_shared_with_static_runtimes], [0],
4239
[Whether or not to disallow shared libs when runtime libs are static])
4240
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
4241
[Compiler flag to allow reflexive dlopens])
4242
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
4243
[Compiler flag to generate shared objects directly from archives])
4244
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
4245
[Create an old-style archive from a shared archive])
4246
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
4247
[Create a temporary old-style archive to link instead of a shared archive])
4248
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
4249
_LT_TAGDECL([], [archive_expsym_cmds], [2])
4250
_LT_TAGDECL([], [module_cmds], [2],
4251
[Commands used to build a loadable module if different from building
4253
_LT_TAGDECL([], [module_expsym_cmds], [2])
4254
_LT_TAGDECL([], [allow_undefined_flag], [1],
4255
[Flag that allows shared libraries with undefined symbols to be built])
4256
_LT_TAGDECL([], [no_undefined_flag], [1],
4257
[Flag that enforces no undefined symbols])
4258
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
4259
[Flag to hardcode $libdir into a binary during linking.
4260
This must work even if $libdir does not exist])
4261
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
4262
[If ld is used when linking, flag to hardcode $libdir into a binary
4263
during linking. This must work even if $libdir does not exist])
4264
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
4265
[Whether we need a single "-rpath" flag with a separated argument])
4266
_LT_TAGDECL([], [hardcode_direct], [0],
4267
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
4268
DIR into the resulting binary])
4269
_LT_TAGDECL([], [hardcode_minus_L], [0],
4270
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
4271
into the resulting binary])
4272
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
4273
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
4274
into the resulting binary])
4275
_LT_TAGDECL([], [hardcode_automatic], [0],
4276
[Set to "yes" if building a shared library automatically hardcodes DIR
4277
into the library and all subsequent libraries and executables linked
4279
_LT_TAGDECL([], [inherit_rpath], [0],
4280
[Set to yes if linker adds runtime paths of dependent libraries
4281
to runtime path list])
4282
_LT_TAGDECL([], [link_all_deplibs], [0],
4283
[Whether libtool must link a program against all its dependency libraries])
4284
_LT_TAGDECL([], [fix_srcfile_path], [1],
4285
[Fix the shell variable $srcfile for the compiler])
4286
_LT_TAGDECL([], [always_export_symbols], [0],
4287
[Set to "yes" if exported symbols are required])
4288
_LT_TAGDECL([], [export_symbols_cmds], [2],
4289
[The commands to list exported symbols])
4290
_LT_TAGDECL([], [exclude_expsyms], [1],
4291
[Symbols that should not be listed in the preloaded symbols])
4292
_LT_TAGDECL([], [include_expsyms], [1],
4293
[Symbols that must always be exported])
4294
dnl FIXME: Not yet implemented
4295
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
4296
dnl [Compiler flag to generate thread safe objects])
4297
])# AC_LIBTOOL_PROG_LD_SHLIBS
4300
# _LT_LANG_C_CONFIG([TAG])
4301
# ------------------------
4302
# Ensure that the configuration variables for a C compiler are suitably
4303
# defined. These variables are subsequently used by _LT_CONFIG to write
4304
# the compiler configuration to `libtool'.
4305
m4_define([_LT_LANG_C_CONFIG],
4306
[AC_REQUIRE([LT_AC_PROG_EGREP])
4310
# Source file extension for C test sources.
4313
# Object file extension for compiled C test sources.
4315
_LT_AC_TAGVAR(objext, $1)=$objext
4317
# Code to be used in simple compile tests
4318
lt_simple_compile_test_code="int some_variable = 0;\n"
4320
# Code to be used in simple link tests
4321
lt_simple_link_test_code='int main(){return(0);}\n'
4324
# Save the default compiler, since it gets overwritten when the other
4325
# tags are being tested, and _LT_AC_TAGVAR(compiler, []) is a NOP.
4326
compiler_DEFAULT=$CC
4329
# Check for any special shared library compilation flags.
4331
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
4332
if test "$GCC" = no; then
4335
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
4339
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
4340
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
4341
if echo "$old_CC $old_CFLAGS " | $GREP "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
4343
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
4344
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
4350
## There is no encapsulation within the following macros, do not change
4351
## the running order or otherwise move them around unless you know exactly
4352
## what you are doing...
4353
if test -n "$compiler"; then
4354
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4355
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4356
AC_LIBTOOL_PROG_CC_C_O($1)
4357
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4358
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4359
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4360
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4361
AC_LIBTOOL_SYS_LIB_STRIP
4362
AC_LIBTOOL_DLOPEN_SELF($1)
4364
# Report which library types will actually be built
4365
AC_MSG_CHECKING([if libtool supports shared libraries])
4366
AC_MSG_RESULT([$can_build_shared])
4368
AC_MSG_CHECKING([whether to build shared libraries])
4369
test "$can_build_shared" = "no" && enable_shared=no
4371
# On AIX, shared libraries and static libraries use the same namespace, and
4372
# are all built from PIC.
4375
test "$enable_shared" = yes && enable_static=no
4376
if test -n "$RANLIB"; then
4377
archive_cmds="$archive_cmds~\$RANLIB \$lib"
4378
postinstall_cmds='$RANLIB $lib'
4383
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4384
test "$enable_shared" = yes && enable_static=no
4388
AC_MSG_RESULT([$enable_shared])
4390
AC_MSG_CHECKING([whether to build static libraries])
4391
# Make sure either enable_shared or enable_static is yes.
4392
test "$enable_shared" = yes || enable_static=yes
4393
AC_MSG_RESULT([$enable_static])
4399
])# _LT_LANG_C_CONFIG
4402
# _LT_LANG_CXX_CONFIG([TAG])
4403
# --------------------------
4404
# Ensure that the configuration variables for a C++ compiler are suitably
4405
# defined. These variables are subsequently used by _LT_CONFIG to write
4406
# the compiler configuration to `libtool'.
4407
m4_define([_LT_LANG_CXX_CONFIG],
4409
AC_REQUIRE([LT_AC_PROG_EGREP])
4410
AC_REQUIRE([AC_PROG_CXX])
4411
AC_REQUIRE([AC_PROG_CXXCPP])
4413
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4414
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4415
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4416
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4417
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4418
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4419
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4420
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4421
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4422
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4423
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4424
_LT_AC_TAGVAR(inherit_rpath, $1)=no
4425
_LT_AC_TAGVAR(module_cmds, $1)=
4426
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4427
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4428
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4429
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4430
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4431
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4433
# Source file extension for C++ test sources.
4436
# Object file extension for compiled C++ test sources.
4438
_LT_AC_TAGVAR(objext, $1)=$objext
4440
# Code to be used in simple compile tests
4441
lt_simple_compile_test_code="int some_variable = 0;\n"
4443
# Code to be used in simple link tests
4444
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4446
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4449
# Allow CC to be a program name with arguments.
4454
lt_save_with_gnu_ld=$with_gnu_ld
4455
lt_save_path_LD=$lt_cv_path_LD
4456
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4457
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4459
unset lt_cv_prog_gnu_ld
4461
if test -n "${lt_cv_path_LDCXX+set}"; then
4462
lt_cv_path_LD=$lt_cv_path_LDCXX
4466
test -z "${LDCXX+set}" || LD=$LDCXX
4469
_LT_AC_TAGVAR(compiler, $1)=$CC
4470
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4472
if test -n "$compiler"; then
4473
# We don't want -fno-exception when compiling C++ code, so set the
4474
# no_builtin_flag separately
4475
if test "$GXX" = yes; then
4476
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4478
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4481
if test "$GXX" = yes; then
4482
# Set up default GNU C++ configuration
4486
# Check if GNU C++ uses GNU ld as the underlying linker, since the
4487
# archiving commands below assume that GNU ld is being used.
4488
if test "$with_gnu_ld" = yes; then
4489
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4490
_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'
4492
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4493
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4495
# If archive_cmds runs LD, not CC, wlarc should be empty
4496
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4497
# investigate it a little bit more. (MM)
4500
# ancient GNU ld didn't support --whole-archive et. al.
4501
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
4502
$GREP 'no-whole-archive' > /dev/null; then
4503
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4505
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4511
# A generic and very simple default shared library creation
4512
# command for GNU C++ for the case where it uses the native
4513
# linker, instead of GNU ld. If possible, this setting should
4514
# overridden to take advantage of the native linker features on
4515
# the platform it is being used on.
4516
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4519
# Commands to make compiler produce verbose output that lists
4520
# what "hidden" libraries, object files and flags are used when
4521
# linking a shared library.
4522
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
4530
# PORTME: fill in a description of your system's C++ link characteristics
4531
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4532
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4535
# FIXME: insert proper C++ library support
4536
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4539
if test "$host_cpu" = ia64; then
4540
# On IA64, the linker does run time linking by default, so we don't
4541
# have to do anything special.
4542
aix_use_runtimelinking=no
4543
exp_sym_flag='-Bexport'
4546
aix_use_runtimelinking=no
4548
# Test if we are trying to use run time linking or normal
4549
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4550
# need to do runtime linking.
4551
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4552
for ld_flag in $LDFLAGS; do
4555
aix_use_runtimelinking=yes
4562
exp_sym_flag='-bexport'
4563
no_entry_flag='-bnoentry'
4566
# When large executables or shared objects are built, AIX ld can
4567
# have problems creating the table of contents. If linking a library
4568
# or program results in "error TOC overflow" add -mminimal-toc to
4569
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4570
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4572
_LT_AC_TAGVAR(archive_cmds, $1)=''
4573
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4574
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4575
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4577
if test "$GXX" = yes; then
4578
case $host_os in aix4.[012]|aix4.[012].*)
4579
# We only want to do this on AIX 4.2 and lower, the check
4580
# below for broken collect2 doesn't work under 4.3+
4581
collect2name=`${CC} -print-prog-name=collect2`
4582
if test -f "$collect2name" &&
4583
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4585
# We have reworked collect2
4586
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4588
# We have old collect2
4589
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4590
# It fails to find uninstalled libraries when the uninstalled
4591
# path is not listed in the libpath. Setting hardcode_minus_L
4592
# to unsupported forces relinking
4593
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4594
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4595
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4598
shared_flag='-shared'
4601
if test "$host_cpu" = ia64; then
4602
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4603
# chokes on -Wl,-G. The following line is correct:
4606
if test "$aix_use_runtimelinking" = yes; then
4607
shared_flag='${wl}-G'
4609
shared_flag='${wl}-bM:SRE'
4614
# It seems that -bexpall does not export symbols beginning with
4615
# underscore (_), so it is better to generate a list of symbols to export.
4616
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4617
if test "$aix_use_runtimelinking" = yes; then
4618
# Warning - without using the other runtime loading flags (-brtl),
4619
# -berok will link without error, but may produce a broken library.
4620
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4621
# Determine the default libpath from the value encoded in an empty
4623
_LT_AC_SYS_LIBPATH_AIX
4624
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4626
_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"
4628
if test "$host_cpu" = ia64; then
4629
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4630
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4631
_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"
4633
# Determine the default libpath from the value encoded in an
4635
_LT_AC_SYS_LIBPATH_AIX
4636
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4637
# Warning - without using the other run time loading flags,
4638
# -berok will link without error, but may produce a broken library.
4639
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4640
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4641
# -bexpall does not export symbols beginning with underscore (_)
4642
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4643
# Exported symbols can be pulled into shared objects from archives
4644
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4645
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4646
# This is similar to how AIX traditionally builds it's shared libraries.
4647
_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'
4652
case $cc_basename in
4654
# FIXME: insert proper C++ library support
4655
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4660
cygwin* | mingw* | pw32*)
4661
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4662
# as there is no search path for DLLs.
4663
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4664
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4665
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4666
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4668
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4669
_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'
4670
# If the export-symbols file already is a .def file (1st line
4671
# is EXPORTS), use it as is; otherwise, prepend...
4672
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4673
cp $export_symbols $output_objdir/$soname.def;
4675
echo EXPORTS > $output_objdir/$soname.def;
4676
cat $export_symbols >> $output_objdir/$soname.def;
4678
$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'
4680
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4683
darwin* | rhapsody*)
4685
rhapsody* | darwin1.[[012]])
4686
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4689
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4690
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${Wl}suppress'
4692
case ${MACOSX_DEPLOYMENT_TARGET} in
4694
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4697
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4703
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4704
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4705
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4706
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4707
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4708
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4710
if test "$GXX" = yes ; then
4711
lt_int_apple_cc_single_mod=no
4712
output_verbose_link_cmd='echo'
4713
if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
4714
lt_int_apple_cc_single_mod=yes
4716
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4717
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4719
_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'
4721
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4722
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4723
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4724
_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}'
4726
_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}'
4728
_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}'
4730
case "$cc_basename" in
4732
output_verbose_link_cmd='echo'
4733
_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'
4734
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4735
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4736
_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}'
4737
_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}'
4740
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4747
case $cc_basename in
4749
# FIXME: insert proper C++ library support
4750
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4753
# Green Hills C++ Compiler
4754
# FIXME: insert proper C++ library support
4755
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4758
# FIXME: insert proper C++ library support
4759
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4764
# C++ shared libraries reported to be fairly broken before switch to ELF
4765
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4768
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4770
freebsd* | kfreebsd*-gnu)
4771
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4773
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4778
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4779
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4780
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4781
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4782
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4783
# but as the default
4784
# location of the library.
4786
case $cc_basename in
4788
# FIXME: insert proper C++ library support
4789
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4792
_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'
4793
# Commands to make compiler produce verbose output that lists
4794
# what "hidden" libraries, object files and flags are used when
4795
# linking a shared library.
4797
# There doesn't appear to be a way to prevent this compiler from
4798
# explicitly linking system object files so we need to strip them
4799
# from the output so that they don't get included in the library
4801
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'
4804
if test "$GXX" = yes; then
4805
_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'
4807
# FIXME: insert proper C++ library support
4808
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4814
if test $with_gnu_ld = no; then
4817
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4818
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4819
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4822
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4825
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4826
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4827
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4833
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4834
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4837
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4838
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4839
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4840
# but as the default
4841
# location of the library.
4844
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4845
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4846
# but as the default
4847
# location of the library.
4851
case $cc_basename in
4853
# FIXME: insert proper C++ library support
4854
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4859
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4862
_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'
4865
# Commands to make compiler produce verbose output that lists
4866
# what "hidden" libraries, object files and flags are used when
4867
# linking a shared library.
4869
# There doesn't appear to be a way to prevent this compiler from
4870
# explicitly linking system object files so we need to strip them
4871
# from the output so that they don't get included in the library
4873
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'
4876
if test "$GXX" = yes; then
4877
if test $with_gnu_ld = no; then
4880
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4883
_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'
4888
# FIXME: insert proper C++ library support
4889
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4895
case $cc_basename in
4898
_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'
4900
# Archives containing C++ object files must be created using
4901
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
4902
# necessary to make sure instantiated templates are included
4904
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4907
if test "$GXX" = yes; then
4908
if test "$with_gnu_ld" = no; then
4909
_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'
4911
_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'
4914
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4917
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4918
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4919
_LT_AC_TAGVAR(inherit_rpath, $1)=yes
4922
case $cc_basename in
4924
# Kuck and Associates, Inc. (KAI) C++ Compiler
4926
# KCC will only create a shared library if the output file
4927
# ends with ".so" (or ".sl" for HP-UX), so rename the library
4928
# to its proper name (with version) after linking.
4929
_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'
4930
_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'
4931
# Commands to make compiler produce verbose output that lists
4932
# what "hidden" libraries, object files and flags are used when
4933
# linking a shared library.
4935
# There doesn't appear to be a way to prevent this compiler from
4936
# explicitly linking system object files so we need to strip them
4937
# from the output so that they don't get included in the library
4939
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'
4941
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4942
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4944
# Archives containing C++ object files must be created using
4945
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4946
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4951
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4952
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4953
_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'
4954
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4955
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4956
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4960
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4961
_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'
4963
runpath_var=LD_RUN_PATH
4964
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4965
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4967
# Commands to make compiler produce verbose output that lists
4968
# what "hidden" libraries, object files and flags are used when
4969
# linking a shared library.
4971
# There doesn't appear to be a way to prevent this compiler from
4972
# explicitly linking system object files so we need to strip them
4973
# from the output so that they don't get included in the library
4975
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'
4980
# FIXME: insert proper C++ library support
4981
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4984
# FIXME: insert proper C++ library support
4985
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4988
case $cc_basename in
4990
# FIXME: insert proper C++ library support
4991
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4994
# FIXME: insert proper C++ library support
4995
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5000
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5001
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5003
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5004
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5005
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5007
# Workaround some broken pre-1.5 toolchains
5008
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5011
case $cc_basename in
5013
# Kuck and Associates, Inc. (KAI) C++ Compiler
5015
# KCC will only create a shared library if the output file
5016
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5017
# to its proper name (with version) after linking.
5018
_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'
5020
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5021
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5023
# Archives containing C++ object files must be created using
5024
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5025
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5029
# Rational C++ 2.4.1
5030
# FIXME: insert proper C++ library support
5031
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5034
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5035
_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'
5037
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5038
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5040
# Commands to make compiler produce verbose output that lists
5041
# what "hidden" libraries, object files and flags are used when
5042
# linking a shared library.
5044
# There doesn't appear to be a way to prevent this compiler from
5045
# explicitly linking system object files so we need to strip them
5046
# from the output so that they don't get included in the library
5048
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'
5051
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5052
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5053
_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'
5055
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5056
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5058
# Commands to make compiler produce verbose output that lists
5059
# what "hidden" libraries, object files and flags are used when
5060
# linking a shared library.
5061
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5064
# FIXME: insert proper C++ library support
5065
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5071
case $cc_basename in
5073
# Kuck and Associates, Inc. (KAI) C++ Compiler
5075
# KCC will only create a shared library if the output file
5076
# ends with ".so" (or ".sl" for HP-UX), so rename the library
5077
# to its proper name (with version) after linking.
5078
_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'
5080
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5081
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5083
# Archives containing C++ object files must be created using
5084
# the KAI C++ compiler.
5085
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5088
# Rational C++ 2.4.1
5089
# FIXME: insert proper C++ library support
5090
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5093
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5094
_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'
5095
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5096
echo "-hidden">> $lib.exp~
5097
$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~
5100
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5101
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5103
# Commands to make compiler produce verbose output that lists
5104
# what "hidden" libraries, object files and flags are used when
5105
# linking a shared library.
5107
# There doesn't appear to be a way to prevent this compiler from
5108
# explicitly linking system object files so we need to strip them
5109
# from the output so that they don't get included in the library
5111
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'
5114
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5115
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5116
_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'
5118
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5119
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5121
# Commands to make compiler produce verbose output that lists
5122
# what "hidden" libraries, object files and flags are used when
5123
# linking a shared library.
5124
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5127
# FIXME: insert proper C++ library support
5128
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5134
# FIXME: insert proper C++ library support
5135
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5138
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5139
case $cc_basename in
5141
# FIXME: insert proper C++ library support
5142
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5145
# FIXME: insert proper C++ library support
5146
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5151
case $cc_basename in
5154
# FIXME: insert proper C++ library support
5155
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5159
# FIXME: insert proper C++ library support
5160
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5163
# FIXME: insert proper C++ library support
5164
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5169
case $cc_basename in
5171
# Sun C++ 4.2, 5.x and Centerline C++
5172
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5173
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5174
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5175
$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'
5177
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5178
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5180
solaris2.[0-5] | solaris2.[0-5].*) ;;
5182
# The C++ compiler is used as linker so we must use $wl
5183
# flag to pass the commands to the underlying system
5184
# linker. We must also pass each convience library through
5185
# to the system linker between allextract/defaultextract.
5186
# The C++ compiler will combine linker options so we
5187
# cannot just pass the convience library names through
5189
# Supported since Solaris 2.6 (maybe 2.5.1?)
5190
_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'
5193
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5195
# Commands to make compiler produce verbose output that lists
5196
# what "hidden" libraries, object files and flags are used when
5197
# linking a shared library.
5199
# There doesn't appear to be a way to prevent this compiler from
5200
# explicitly linking system object files so we need to strip them
5201
# from the output so that they don't get included in the library
5203
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'
5205
# Archives containing C++ object files must be created using
5206
# "CC -xar", where "CC" is the Sun C++ compiler. This is
5207
# necessary to make sure instantiated templates are included
5209
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5212
# Green Hills C++ Compiler
5213
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5215
# The C++ compiler must be used to create the archive.
5216
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5219
# GNU C++ compiler with Solaris linker
5220
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5221
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5222
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
5223
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5224
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5225
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5227
# Commands to make compiler produce verbose output that lists
5228
# what "hidden" libraries, object files and flags are used when
5229
# linking a shared library.
5230
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
5232
# g++ 2.7 appears to require `-G' NOT `-shared' on this
5234
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5235
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5236
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5238
# Commands to make compiler produce verbose output that lists
5239
# what "hidden" libraries, object files and flags are used when
5240
# linking a shared library.
5241
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
5244
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5249
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5250
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5253
case $cc_basename in
5255
# NonStop-UX NCC 3.20
5256
# FIXME: insert proper C++ library support
5257
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5260
# FIXME: insert proper C++ library support
5261
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5266
# FIXME: insert proper C++ library support
5267
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5270
# FIXME: insert proper C++ library support
5271
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5274
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5275
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5277
_LT_AC_TAGVAR(GCC, $1)="$GXX"
5278
_LT_AC_TAGVAR(LD, $1)="$LD"
5281
## There is no encapsulation within the following macros, do not change
5282
## the running order or otherwise move them around unless you know exactly
5283
## what you are doing...
5284
AC_LIBTOOL_POSTDEP_PREDEP($1)
5285
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5286
AC_LIBTOOL_PROG_CC_C_O($1)
5287
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5288
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5289
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5290
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5291
AC_LIBTOOL_SYS_LIB_STRIP
5292
AC_LIBTOOL_DLOPEN_SELF($1)
5302
with_gnu_ldcxx=$with_gnu_ld
5303
with_gnu_ld=$lt_save_with_gnu_ld
5304
lt_cv_path_LDCXX=$lt_cv_path_LD
5305
lt_cv_path_LD=$lt_save_path_LD
5306
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5307
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5308
])# _LT_LANG_CXX_CONFIG
5311
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5312
# ------------------------------------
5313
# Figure out "hidden" library dependencies from verbose
5314
# compiler output when linking a shared library.
5315
# Parse the compiler output and extract the necessary
5316
# objects, libraries and library flags.
5317
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5318
# Dependencies to place before and after the object being linked:
5319
_LT_AC_TAGVAR(predep_objects, $1)=
5320
_LT_AC_TAGVAR(postdep_objects, $1)=
5321
_LT_AC_TAGVAR(predeps, $1)=
5322
_LT_AC_TAGVAR(postdeps, $1)=
5323
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5325
dnl we can't use the lt_simple_compile_test_code here,
5326
dnl because it contains code intended for an executable,
5327
dnl not a library. It's possible we should let each
5328
dnl tag define a new lt_????_link_test_code variable,
5329
dnl but it's only used here...
5330
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
5332
void foo (void) { a = 0; }
5334
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
5338
Foo (void) { a = 0; }
5343
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
5351
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
5354
public void bar (void) {
5360
dnl Parse the compiler output and extract the necessary
5361
dnl objects, libraries and library flags.
5362
if AC_TRY_EVAL(ac_compile); then
5363
# Parse the compiler output and extract the necessary
5364
# objects, libraries and library flags.
5366
# Sentinel used to keep track of whether or not we are before
5367
# the conftest object file.
5368
pre_test_object_deps_done=no
5370
# The `*' in the case matches for architectures that use `case' in
5371
# $output_verbose_cmd can trigger glob expansion during the loop
5372
# eval without this substitution.
5373
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
5375
for p in `eval $output_verbose_link_cmd`; do
5379
# Some compilers place space between "-{L,R}" and the path.
5381
if test $p = "-L" ||
5382
test $p = "-R"; then
5389
if test "$pre_test_object_deps_done" = no; then
5392
# Internal compiler library paths should come after those
5393
# provided the user. The postdeps already come after the
5394
# user supplied libs so there is no need to process them.
5395
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5396
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5398
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5401
# The "-l" case would never come before the object being
5402
# linked, so don't bother handling this case.
5405
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5406
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5408
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5414
# This assumes that the test object file only shows up
5415
# once in the compiler output.
5416
if test "$p" = "conftest.$objext"; then
5417
pre_test_object_deps_done=yes
5421
if test "$pre_test_object_deps_done" = no; then
5422
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5423
_LT_AC_TAGVAR(predep_objects, $1)="$p"
5425
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5428
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5429
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
5431
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5436
*) ;; # Ignore the rest.
5444
echo "libtool.m4: error: problem compiling $1 test program"
5447
$rm -f confest.$objext
5449
case " $_LT_AC_TAGVAR(postdeps, $1) " in
5450
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5452
_LT_TAGDECL([], [predep_objects], [1],
5453
[Dependencies to place before and after the objects being linked to
5454
create a shared library])
5455
_LT_TAGDECL([], [postdep_objects], [1])
5456
_LT_TAGDECL([], [predeps], [1])
5457
_LT_TAGDECL([], [postdeps], [1])
5458
_LT_TAGDECL([], [compiler_lib_search_path], [1],
5459
[The library search path used internally by the compiler when linking
5461
])# AC_LIBTOOL_POSTDEP_PREDEP
5463
# _LT_LANG_F77_CONFIG([TAG])
5464
# --------------------------
5465
# Ensure that the configuration variables for a Fortran 77 compiler are
5466
# suitably defined. These variables are subsequently used by _LT_CONFIG
5467
# to write the compiler configuration to `libtool'.
5468
m4_define([_LT_LANG_F77_CONFIG],
5469
[AC_REQUIRE([AC_PROG_F77])
5470
AC_LANG_PUSH(Fortran 77)
5472
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5473
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5474
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5475
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5476
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5477
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5478
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5479
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5480
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5481
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5482
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5483
_LT_AC_TAGVAR(inherit_rpath, $1)=no
5484
_LT_AC_TAGVAR(module_cmds, $1)=
5485
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5486
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5487
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5488
_LT_AC_TAGVAR(no_undefined_flag, $1)=
5489
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5490
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5492
# Source file extension for f77 test sources.
5495
# Object file extension for compiled f77 test sources.
5497
_LT_AC_TAGVAR(objext, $1)=$objext
5499
# Code to be used in simple compile tests
5500
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5502
# Code to be used in simple link tests
5503
lt_simple_link_test_code=" program t\n end\n"
5505
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5508
# Allow CC to be a program name with arguments.
5512
_LT_AC_TAGVAR(compiler, $1)=$CC
5513
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5515
if test -n "$compiler"; then
5516
AC_MSG_CHECKING([if libtool supports shared libraries])
5517
AC_MSG_RESULT([$can_build_shared])
5519
AC_MSG_CHECKING([whether to build shared libraries])
5520
test "$can_build_shared" = "no" && enable_shared=no
5522
# On AIX, shared libraries and static libraries use the same namespace, and
5523
# are all built from PIC.
5526
test "$enable_shared" = yes && enable_static=no
5527
if test -n "$RANLIB"; then
5528
archive_cmds="$archive_cmds~\$RANLIB \$lib"
5529
postinstall_cmds='$RANLIB $lib'
5533
test "$enable_shared" = yes && enable_static=no
5536
AC_MSG_RESULT([$enable_shared])
5538
AC_MSG_CHECKING([whether to build static libraries])
5539
# Make sure either enable_shared or enable_static is yes.
5540
test "$enable_shared" = yes || enable_static=yes
5541
AC_MSG_RESULT([$enable_static])
5543
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5545
_LT_AC_TAGVAR(GCC, $1)="$G77"
5546
_LT_AC_TAGVAR(LD, $1)="$LD"
5549
## There is no encapsulation within the following macros, do not change
5550
## the running order or otherwise move them around unless you know exactly
5551
## what you are doing...
5552
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5553
AC_LIBTOOL_PROG_CC_C_O($1)
5554
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5555
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5556
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5557
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5558
AC_LIBTOOL_SYS_LIB_STRIP
5565
])# _LT_LANG_F77_CONFIG
5568
# _LT_LANG_GCJ_CONFIG([TAG])
5569
# --------------------------
5570
# Ensure that the configuration variables for the GNU Java Compiler compiler
5571
# are suitably defined. These variables are subsequently used by _LT_CONFIG
5572
# to write the compiler configuration to `libtool'.
5573
m4_define([_LT_LANG_GCJ_CONFIG],
5574
[AC_REQUIRE([LT_PROG_GCJ])
5577
# Source file extension for Java test sources.
5580
# Object file extension for compiled Java test sources.
5582
_LT_AC_TAGVAR(objext, $1)=$objext
5584
# Code to be used in simple compile tests
5585
lt_simple_compile_test_code="class foo {}\n"
5587
# Code to be used in simple link tests
5588
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
5590
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5593
# Allow CC to be a program name with arguments.
5597
_LT_AC_TAGVAR(compiler, $1)=$CC
5599
# GCJ did not exist at the time GCC didn't implicitly link libc in.
5600
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5603
## There is no encapsulation within the following macros, do not change
5604
## the running order or otherwise move them around unless you know exactly
5605
## what you are doing...
5606
if test -n "$compiler"; then
5607
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5608
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5609
AC_LIBTOOL_PROG_CC_C_O($1)
5610
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5611
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5612
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5613
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5614
AC_LIBTOOL_SYS_LIB_STRIP
5615
AC_LIBTOOL_DLOPEN_SELF($1)
5622
])# _LT_LANG_GCJ_CONFIG
5625
# _LT_LANG_RC_CONFIG([TAG])
5626
# --------------------------
5627
# Ensure that the configuration variables for the Windows resource compiler
5628
# are suitably defined. These variables are subsequently used by _LT_CONFIG
5629
# to write the compiler configuration to `libtool'.
5630
m4_define([_LT_LANG_RC_CONFIG],
5631
[AC_REQUIRE([LT_PROG_RC])
5634
# Source file extension for RC test sources.
5637
# Object file extension for compiled RC test sources.
5639
_LT_AC_TAGVAR(objext, $1)=$objext
5641
# Code to be used in simple compile tests
5642
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5644
# Code to be used in simple link tests
5645
lt_simple_link_test_code="$lt_simple_compile_test_code"
5647
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5650
# Allow CC to be a program name with arguments.
5654
_LT_AC_TAGVAR(compiler, $1)=$CC
5655
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5657
if test -n "$compiler"; then
5664
])# _LT_LANG_RC_CONFIG
5667
AC_DEFUN([LT_PROG_GCJ],
5668
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
5669
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
5670
[AC_CHECK_TOOL(GCJ, gcj,)
5671
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5672
AC_SUBST(GCJFLAGS)])])dnl
5674
AU_DEFUN([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
5676
AC_DEFUN([LT_PROG_RC],
5677
[AC_CHECK_TOOL(RC, windres,)
5679
AU_DEFUN([LT_AC_PROG_RC], [LT_PROG_RC])
5684
# If we don't have a new enough Autoconf to choose the best grep
5685
# available, choose the one first in the user's PATH.
5686
AC_DEFUN([LT_AC_PROG_EGREP],
5687
[AC_REQUIRE([AC_PROG_EGREP])
5688
test -z "$GREP" && GREP=grep
5689
_LT_DECL([], [GREP], [1], [A grep program that handles long line])
5690
_LT_DECL([], [EGREP], [1], [An ERE matcher])
5696
# Check for a fully-functional sed program, that truncates
5697
# as few characters as possible. Prefer GNU sed if found.
5698
AC_DEFUN([LT_AC_PROG_SED],
5700
test -z "$SED" && SED=sed
5701
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
5702
_LT_DECL([], [Xsed], ["\$SED -e s/^X//"],
5703
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
5706
m4_ifndef([AC_PROG_SED], [
5707
############################################################
5708
# NOTE: This macro has been submitted for inclusion into #
5709
# GNU Autoconf as AC_PROG_SED. When it is available in #
5710
# a released version of Autoconf we should remove this #
5711
# macro and use it instead. #
5712
############################################################
5714
m4_define([AC_PROG_SED],
5715
[AC_MSG_CHECKING([for a sed that does not truncate output])
5716
AC_CACHE_VAL(lt_cv_path_SED,
5717
[# Loop through the user's path and test for sed and gsed.
5718
# Then use that list of sed's as ones to test for truncation.
5719
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5723
test -z "$as_dir" && as_dir=.
5724
for lt_ac_prog in sed gsed; do
5725
for ac_exec_ext in '' $ac_executable_extensions; do
5726
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5727
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5734
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5735
# along with /bin/sed that truncates output.
5736
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5737
test ! -f $lt_ac_sed && break
5738
cat /dev/null > conftest.in
5740
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5741
# Check for GNU sed and select it if it is found.
5742
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5743
lt_cv_path_SED=$lt_ac_sed
5747
cat conftest.in conftest.in >conftest.tmp
5748
mv conftest.tmp conftest.in
5749
cp conftest.in conftest.nl
5751
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5752
cmp -s conftest.out conftest.nl || break
5753
# 10000 chars as input seems more than enough
5754
test $lt_ac_count -gt 10 && break
5755
lt_ac_count=`expr $lt_ac_count + 1`
5756
if test $lt_ac_count -gt $lt_ac_max; then
5757
lt_ac_max=$lt_ac_count
5758
lt_cv_path_SED=$lt_ac_sed
5765
AC_MSG_RESULT([$SED])