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