Import Upstream version 0.69.0
[hcoop/debian/courier-authlib.git] / aclocal.m4
CommitLineData
0e333c05 1# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
b0322a85 2
0e333c05 3# Copyright (C) 1996-2017 Free Software Foundation, Inc.
d9898ee8 4
d9898ee8 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
b0322a85 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
ac40fd9e 15m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
b0322a85
CE
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
ac40fd9e 19You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
b0322a85 21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
dd184caf 22
0e333c05
CE
23dnl Sets the COURIER_UNICODE_CXXFLAGS variable to any additional compiler
24dnl flags needed to build the courier-unicode package and packages that
25dnl use the courier-unicode package.
26
27AC_DEFUN([AX_COURIER_UNICODE_CXXFLAGS],[
28
29save_FLAGS="$CXXFLAGS"
30
31AC_LANG_PUSH([C++])
32
33AC_TRY_COMPILE([
34#include <string>
35], [
36 std::u32string s;
37 char32_t c;
38 ],
39 [
40 ],
41 [
42
43COURIER_UNICODE_CXXFLAGS="-std=c++11"
44CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS"
45
46AC_TRY_COMPILE([
47#include <string>
48], [
49 std::u32string s;
50 char32_t c;
51 ],
52 [
53 ],
54 [
55
56COURIER_UNICODE_CXXFLAGS="-std=c++0x"
57CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS"
58
59AC_TRY_COMPILE([
60#include <string>
61], [
62 std::u32string s;
63 char32_t c;
64 ],
65 [
66 ],
67 [
68AC_MSG_ERROR([*** A compiler with C++11 Unicode support was not found])
69])
70])
71])
72CXXFLAGS="$save_FLAGS"
73AC_LANG_POP([C++])
74])
75
76AC_DEFUN([AX_COURIER_UNICODE_VERSION],[
77
78AC_MSG_CHECKING(courier-unicode library and version)
79
80AC_TRY_COMPILE([
81#include <courier-unicode.h>
82#ifndef COURIER_UNICODE_VERSION
83#define COURIER_UNICODE_VERSION 0
84#endif
85
86#if COURIER_UNICODE_VERSION < 210
87#error "courier-unicode 2.1 library is required"
88#endif
89
90],[],[],
91AC_MSG_ERROR([
92ERROR: The Courier Unicode Library 2.1 header files appear not to be installed.
93You may need to upgrade the library or install a separate development
94subpackage in addition to the main package.])
95)
96
97AC_MSG_RESULT([ok])
98])
99
d9898ee8 100# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
8d138742 101#
d50284c4 102# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
8d138742
CE
103# Written by Gordon Matzigkeit, 1996
104#
105# This file is free software; the Free Software Foundation gives
106# unlimited permission to copy and/or distribute it, with or without
107# modifications, as long as this notice is preserved.
108
109m4_define([_LT_COPYING], [dnl
d50284c4
CE
110# Copyright (C) 2014 Free Software Foundation, Inc.
111# This is free software; see the source for copying conditions. There is NO
112# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
113
114# GNU Libtool is free software; you can redistribute it and/or modify
115# it under the terms of the GNU General Public License as published by
116# the Free Software Foundation; either version 2 of of the License, or
117# (at your option) any later version.
8d138742 118#
d50284c4
CE
119# As a special exception to the GNU General Public License, if you
120# distribute this file as part of a program or library that is built
121# using GNU Libtool, you may include this file under the same
122# distribution terms that you use for the rest of that program.
8d138742 123#
d50284c4
CE
124# GNU Libtool is distributed in the hope that it will be useful, but
125# WITHOUT ANY WARRANTY; without even the implied warranty of
8d138742
CE
126# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
127# GNU General Public License for more details.
128#
129# You should have received a copy of the GNU General Public License
d50284c4 130# along with this program. If not, see <http://www.gnu.org/licenses/>.
8d138742 131])
d9898ee8 132
d50284c4 133# serial 58 LT_INIT
d9898ee8 134
135
8d138742
CE
136# LT_PREREQ(VERSION)
137# ------------------
138# Complain and exit if this libtool version is less that VERSION.
139m4_defun([LT_PREREQ],
140[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
141 [m4_default([$3],
142 [m4_fatal([Libtool version $1 or higher is required],
143 63)])],
144 [$2])])
d9898ee8 145
146
8d138742
CE
147# _LT_CHECK_BUILDDIR
148# ------------------
149# Complain if the absolute build directory name contains unusual characters
150m4_defun([_LT_CHECK_BUILDDIR],
151[case `pwd` in
152 *\ * | *\ *)
153 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
154esac
155])
156
157
158# LT_INIT([OPTIONS])
159# ------------------
160AC_DEFUN([LT_INIT],
d50284c4 161[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
b0322a85 162AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
8d138742
CE
163AC_BEFORE([$0], [LT_LANG])dnl
164AC_BEFORE([$0], [LT_OUTPUT])dnl
165AC_BEFORE([$0], [LTDL_INIT])dnl
166m4_require([_LT_CHECK_BUILDDIR])dnl
167
168dnl Autoconf doesn't catch unexpanded LT_ macros by default:
169m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
170m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
171dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
172dnl unless we require an AC_DEFUNed macro:
173AC_REQUIRE([LTOPTIONS_VERSION])dnl
174AC_REQUIRE([LTSUGAR_VERSION])dnl
175AC_REQUIRE([LTVERSION_VERSION])dnl
176AC_REQUIRE([LTOBSOLETE_VERSION])dnl
177m4_require([_LT_PROG_LTMAIN])dnl
178
b0322a85
CE
179_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
180
8d138742
CE
181dnl Parse OPTIONS
182_LT_SET_OPTIONS([$0], [$1])
d9898ee8 183
184# This can be used to rebuild libtool when needed
d50284c4 185LIBTOOL_DEPS=$ltmain
d9898ee8 186
187# Always use our own libtool.
188LIBTOOL='$(SHELL) $(top_builddir)/libtool'
189AC_SUBST(LIBTOOL)dnl
190
8d138742 191_LT_SETUP
d9898ee8 192
8d138742
CE
193# Only expand once:
194m4_define([LT_INIT])
195])# LT_INIT
d9898ee8 196
8d138742
CE
197# Old names:
198AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
199AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
200dnl aclocal-1.4 backwards compatibility:
201dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
202dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
203
204
d50284c4
CE
205# _LT_PREPARE_CC_BASENAME
206# -----------------------
207m4_defun([_LT_PREPARE_CC_BASENAME], [
208# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
209func_cc_basename ()
210{
211 for cc_temp in @S|@*""; do
212 case $cc_temp in
213 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
214 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
215 \-*) ;;
216 *) break;;
217 esac
218 done
219 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
220}
221])# _LT_PREPARE_CC_BASENAME
222
223
8d138742
CE
224# _LT_CC_BASENAME(CC)
225# -------------------
d50284c4
CE
226# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
227# but that macro is also expanded into generated libtool script, which
228# arranges for $SED and $ECHO to be set by different means.
8d138742 229m4_defun([_LT_CC_BASENAME],
d50284c4
CE
230[m4_require([_LT_PREPARE_CC_BASENAME])dnl
231AC_REQUIRE([_LT_DECL_SED])dnl
232AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
233func_cc_basename $1
234cc_basename=$func_cc_basename_result
8d138742
CE
235])
236
237
238# _LT_FILEUTILS_DEFAULTS
239# ----------------------
240# It is okay to use these file commands and assume they have been set
d50284c4 241# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
8d138742
CE
242m4_defun([_LT_FILEUTILS_DEFAULTS],
243[: ${CP="cp -f"}
244: ${MV="mv -f"}
245: ${RM="rm -f"}
246])# _LT_FILEUTILS_DEFAULTS
247
248
249# _LT_SETUP
250# ---------
251m4_defun([_LT_SETUP],
252[AC_REQUIRE([AC_CANONICAL_HOST])dnl
d9898ee8 253AC_REQUIRE([AC_CANONICAL_BUILD])dnl
b0322a85
CE
254AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
255AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
256
257_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
258dnl
8d138742
CE
259_LT_DECL([], [host_alias], [0], [The host system])dnl
260_LT_DECL([], [host], [0])dnl
261_LT_DECL([], [host_os], [0])dnl
262dnl
263_LT_DECL([], [build_alias], [0], [The build system])dnl
264_LT_DECL([], [build], [0])dnl
265_LT_DECL([], [build_os], [0])dnl
266dnl
d9898ee8 267AC_REQUIRE([AC_PROG_CC])dnl
8d138742
CE
268AC_REQUIRE([LT_PATH_LD])dnl
269AC_REQUIRE([LT_PATH_NM])dnl
270dnl
d9898ee8 271AC_REQUIRE([AC_PROG_LN_S])dnl
8d138742
CE
272test -z "$LN_S" && LN_S="ln -s"
273_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
274dnl
275AC_REQUIRE([LT_CMD_MAX_LEN])dnl
276_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
277_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
d9898ee8 278dnl
8d138742
CE
279m4_require([_LT_FILEUTILS_DEFAULTS])dnl
280m4_require([_LT_CHECK_SHELL_FEATURES])dnl
b0322a85 281m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
8d138742
CE
282m4_require([_LT_CMD_RELOAD])dnl
283m4_require([_LT_CHECK_MAGIC_METHOD])dnl
b0322a85 284m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
8d138742
CE
285m4_require([_LT_CMD_OLD_ARCHIVE])dnl
286m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
b0322a85 287m4_require([_LT_WITH_SYSROOT])dnl
d50284c4 288m4_require([_LT_CMD_TRUNCATE])dnl
8d138742
CE
289
290_LT_CONFIG_LIBTOOL_INIT([
d50284c4 291# See if we are running on zsh, and set the options that allow our
8d138742 292# commands through without removal of \ escapes INIT.
d50284c4 293if test -n "\${ZSH_VERSION+set}"; then
8d138742
CE
294 setopt NO_GLOB_SUBST
295fi
296])
d50284c4 297if test -n "${ZSH_VERSION+set}"; then
8d138742
CE
298 setopt NO_GLOB_SUBST
299fi
d9898ee8 300
8d138742 301_LT_CHECK_OBJDIR
d9898ee8 302
8d138742 303m4_require([_LT_TAG_COMPILER])dnl
d9898ee8 304
305case $host_os in
306aix3*)
307 # AIX sometimes has problems with the GCC collect2 program. For some
308 # reason, if we set the COLLECT_NAMES environment variable, the problems
309 # vanish in a puff of smoke.
d50284c4 310 if test set != "${COLLECT_NAMES+set}"; then
d9898ee8 311 COLLECT_NAMES=
312 export COLLECT_NAMES
313 fi
314 ;;
315esac
316
d9898ee8 317# Global variables:
8d138742 318ofile=libtool
d9898ee8 319can_build_shared=yes
320
d50284c4 321# All known linkers require a '.a' archive for static linking (except MSVC,
d9898ee8 322# which needs '.lib').
323libext=a
d9898ee8 324
d50284c4 325with_gnu_ld=$lt_cv_prog_gnu_ld
d9898ee8 326
d50284c4
CE
327old_CC=$CC
328old_CFLAGS=$CFLAGS
d9898ee8 329
330# Set sane defaults for various variables
d9898ee8 331test -z "$CC" && CC=cc
332test -z "$LTCC" && LTCC=$CC
333test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
d9898ee8 334test -z "$LD" && LD=ld
d9898ee8 335test -z "$ac_objext" && ac_objext=o
336
d9898ee8 337_LT_CC_BASENAME([$compiler])
338
339# Only perform the check for file, if the check method requires it
8d138742 340test -z "$MAGIC_CMD" && MAGIC_CMD=file
d9898ee8 341case $deplibs_check_method in
342file_magic*)
343 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8d138742 344 _LT_PATH_MAGIC
d9898ee8 345 fi
346 ;;
347esac
348
8d138742
CE
349# Use C for the default configuration in the libtool script
350LT_SUPPORTED_TAG([CC])
351_LT_LANG_C_CONFIG
352_LT_LANG_DEFAULT_CONFIG
353_LT_CONFIG_COMMANDS
354])# _LT_SETUP
d9898ee8 355
d9898ee8 356
b0322a85
CE
357# _LT_PREPARE_SED_QUOTE_VARS
358# --------------------------
359# Define a few sed substitution that help us do robust quoting.
360m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
361[# Backslashify metacharacters that are still active within
362# double-quoted strings.
363sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
364
365# Same as above, but do not quote variable references.
366double_quote_subst='s/\([["`\\]]\)/\\\1/g'
367
368# Sed substitution to delay expansion of an escaped shell variable in a
369# double_quote_subst'ed string.
370delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
371
372# Sed substitution to delay expansion of an escaped single quote.
373delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
374
375# Sed substitution to avoid accidental globbing in evaled expressions
376no_glob_subst='s/\*/\\\*/g'
377])
378
8d138742
CE
379# _LT_PROG_LTMAIN
380# ---------------
d50284c4 381# Note that this code is called both from 'configure', and 'config.status'
8d138742 382# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
d50284c4 383# 'config.status' has no value for ac_aux_dir unless we are using Automake,
8d138742
CE
384# so we pass a copy along to make sure it has a sensible value anyway.
385m4_defun([_LT_PROG_LTMAIN],
386[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
387_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
d50284c4 388ltmain=$ac_aux_dir/ltmain.sh
8d138742 389])# _LT_PROG_LTMAIN
d9898ee8 390
d9898ee8 391
392
8d138742
CE
393# So that we can recreate a full libtool script including additional
394# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
d50284c4 395# in macros and then make a single call at the end using the 'libtool'
8d138742 396# label.
d9898ee8 397
d9898ee8 398
8d138742
CE
399# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
400# ----------------------------------------
401# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
402m4_define([_LT_CONFIG_LIBTOOL_INIT],
403[m4_ifval([$1],
404 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
405 [$1
406])])])
d9898ee8 407
8d138742
CE
408# Initialize.
409m4_define([_LT_OUTPUT_LIBTOOL_INIT])
d9898ee8 410
411
8d138742
CE
412# _LT_CONFIG_LIBTOOL([COMMANDS])
413# ------------------------------
414# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
415m4_define([_LT_CONFIG_LIBTOOL],
416[m4_ifval([$1],
417 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
418 [$1
419])])])
420
421# Initialize.
422m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
423
424
425# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
426# -----------------------------------------------------
427m4_defun([_LT_CONFIG_SAVE_COMMANDS],
428[_LT_CONFIG_LIBTOOL([$1])
429_LT_CONFIG_LIBTOOL_INIT([$2])
d9898ee8 430])
431
432
8d138742
CE
433# _LT_FORMAT_COMMENT([COMMENT])
434# -----------------------------
435# Add leading comment marks to the start of each line, and a trailing
436# full-stop to the whole comment if one is not present already.
437m4_define([_LT_FORMAT_COMMENT],
438[m4_ifval([$1], [
439m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
440 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
441)])
442
443
444
445
446
447# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
448# -------------------------------------------------------------------
449# CONFIGNAME is the name given to the value in the libtool script.
450# VARNAME is the (base) name used in the configure script.
451# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
452# VARNAME. Any other value will be used directly.
453m4_define([_LT_DECL],
454[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
455 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
456 [m4_ifval([$1], [$1], [$2])])
457 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
458 m4_ifval([$4],
459 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
460 lt_dict_add_subkey([lt_decl_dict], [$2],
461 [tagged?], [m4_ifval([$5], [yes], [no])])])
462])
d9898ee8 463
464
8d138742
CE
465# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
466# --------------------------------------------------------
467m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
d9898ee8 468
469
8d138742
CE
470# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
471# ------------------------------------------------
472m4_define([lt_decl_tag_varnames],
473[_lt_decl_filter([tagged?], [yes], $@)])
d9898ee8 474
475
8d138742
CE
476# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
477# ---------------------------------------------------------
478m4_define([_lt_decl_filter],
479[m4_case([$#],
480 [0], [m4_fatal([$0: too few arguments: $#])],
481 [1], [m4_fatal([$0: too few arguments: $#: $1])],
482 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
483 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
484 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
485])
d9898ee8 486
487
8d138742
CE
488# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
489# --------------------------------------------------
490m4_define([lt_decl_quote_varnames],
491[_lt_decl_filter([value], [1], $@)])
d9898ee8 492
d9898ee8 493
8d138742
CE
494# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
495# ---------------------------------------------------
496m4_define([lt_decl_dquote_varnames],
497[_lt_decl_filter([value], [2], $@)])
d9898ee8 498
d9898ee8 499
8d138742
CE
500# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
501# ---------------------------------------------------
502m4_define([lt_decl_varnames_tagged],
503[m4_assert([$# <= 2])dnl
504_$0(m4_quote(m4_default([$1], [[, ]])),
505 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
506 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
507m4_define([_lt_decl_varnames_tagged],
508[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
d9898ee8 509
d9898ee8 510
8d138742
CE
511# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
512# ------------------------------------------------
513m4_define([lt_decl_all_varnames],
514[_$0(m4_quote(m4_default([$1], [[, ]])),
515 m4_if([$2], [],
516 m4_quote(lt_decl_varnames),
517 m4_quote(m4_shift($@))))[]dnl
518])
519m4_define([_lt_decl_all_varnames],
520[lt_join($@, lt_decl_varnames_tagged([$1],
521 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
522])
d9898ee8 523
d9898ee8 524
8d138742
CE
525# _LT_CONFIG_STATUS_DECLARE([VARNAME])
526# ------------------------------------
d50284c4
CE
527# Quote a variable value, and forward it to 'config.status' so that its
528# declaration there will have the same value as in 'configure'. VARNAME
8d138742
CE
529# must have a single quote delimited value for this to work.
530m4_define([_LT_CONFIG_STATUS_DECLARE],
b0322a85 531[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
d9898ee8 532
d9898ee8 533
8d138742
CE
534# _LT_CONFIG_STATUS_DECLARATIONS
535# ------------------------------
536# We delimit libtool config variables with single quotes, so when
537# we write them to config.status, we have to be sure to quote all
538# embedded single quotes properly. In configure, this macro expands
539# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
540#
b0322a85 541# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
8d138742
CE
542m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
543[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
544 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
d9898ee8 545
d9898ee8 546
8d138742
CE
547# _LT_LIBTOOL_TAGS
548# ----------------
549# Output comment and list of tags supported by the script
550m4_defun([_LT_LIBTOOL_TAGS],
551[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
d50284c4 552available_tags='_LT_TAGS'dnl
8d138742 553])
d9898ee8 554
555
8d138742
CE
556# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
557# -----------------------------------
558# Extract the dictionary values for VARNAME (optionally with TAG) and
559# expand to a commented shell variable setting:
560#
561# # Some comment about what VAR is for.
562# visible_name=$lt_internal_name
563m4_define([_LT_LIBTOOL_DECLARE],
564[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
565 [description])))[]dnl
566m4_pushdef([_libtool_name],
567 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
568m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
569 [0], [_libtool_name=[$]$1],
570 [1], [_libtool_name=$lt_[]$1],
571 [2], [_libtool_name=$lt_[]$1],
572 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
573m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
574])
d9898ee8 575
d9898ee8 576
8d138742
CE
577# _LT_LIBTOOL_CONFIG_VARS
578# -----------------------
579# Produce commented declarations of non-tagged libtool config variables
d50284c4 580# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
8d138742
CE
581# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
582# section) are produced by _LT_LIBTOOL_TAG_VARS.
583m4_defun([_LT_LIBTOOL_CONFIG_VARS],
584[m4_foreach([_lt_var],
585 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
586 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
587
588
589# _LT_LIBTOOL_TAG_VARS(TAG)
590# -------------------------
591m4_define([_LT_LIBTOOL_TAG_VARS],
592[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
593 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
594
595
596# _LT_TAGVAR(VARNAME, [TAGNAME])
597# ------------------------------
598m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
599
600
601# _LT_CONFIG_COMMANDS
602# -------------------
603# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
604# variables for single and double quote escaping we saved from calls
605# to _LT_DECL, we can put quote escaped variables declarations
d50284c4
CE
606# into 'config.status', and then the shell code to quote escape them in
607# for loops in 'config.status'. Finally, any additional code accumulated
8d138742
CE
608# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
609m4_defun([_LT_CONFIG_COMMANDS],
610[AC_PROVIDE_IFELSE([LT_OUTPUT],
611 dnl If the libtool generation code has been placed in $CONFIG_LT,
612 dnl instead of duplicating it all over again into config.status,
613 dnl then we will have config.status run $CONFIG_LT later, so it
614 dnl needs to know what name is stored there:
615 [AC_CONFIG_COMMANDS([libtool],
616 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
617 dnl If the libtool generation code is destined for config.status,
618 dnl expand the accumulated commands and init code now:
619 [AC_CONFIG_COMMANDS([libtool],
620 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
621])#_LT_CONFIG_COMMANDS
622
623
624# Initialize.
625m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
626[
627
628# The HP-UX ksh and POSIX shell print the target directory to stdout
629# if CDPATH is set.
630(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
631
632sed_quote_subst='$sed_quote_subst'
633double_quote_subst='$double_quote_subst'
634delay_variable_subst='$delay_variable_subst'
635_LT_CONFIG_STATUS_DECLARATIONS
636LTCC='$LTCC'
637LTCFLAGS='$LTCFLAGS'
638compiler='$compiler_DEFAULT'
639
b0322a85
CE
640# A function that is used when there is no print builtin or printf.
641func_fallback_echo ()
642{
643 eval 'cat <<_LTECHO_EOF
644\$[]1
645_LTECHO_EOF'
646}
647
8d138742
CE
648# Quote evaled strings.
649for var in lt_decl_all_varnames([[ \
650]], lt_decl_quote_varnames); do
b0322a85 651 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
8d138742 652 *[[\\\\\\\`\\"\\\$]]*)
d50284c4 653 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
d9898ee8 654 ;;
8d138742
CE
655 *)
656 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
d9898ee8 657 ;;
658 esac
8d138742 659done
d9898ee8 660
8d138742
CE
661# Double-quote double-evaled strings.
662for var in lt_decl_all_varnames([[ \
663]], lt_decl_dquote_varnames); do
b0322a85 664 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
8d138742 665 *[[\\\\\\\`\\"\\\$]]*)
d50284c4 666 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
8d138742
CE
667 ;;
668 *)
669 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
d9898ee8 670 ;;
671 esac
8d138742 672done
d9898ee8 673
8d138742 674_LT_OUTPUT_LIBTOOL_INIT
d9898ee8 675])
676
b0322a85
CE
677# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
678# ------------------------------------
679# Generate a child script FILE with all initialization necessary to
680# reuse the environment learned by the parent script, and make the
681# file executable. If COMMENT is supplied, it is inserted after the
d50284c4 682# '#!' sequence but before initialization text begins. After this
b0322a85
CE
683# macro, additional text can be appended to FILE to form the body of
684# the child script. The macro ends with non-zero status if the
685# file could not be fully written (such as if the disk is full).
686m4_ifdef([AS_INIT_GENERATED],
687[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
688[m4_defun([_LT_GENERATED_FILE_INIT],
689[m4_require([AS_PREPARE])]dnl
690[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
691[lt_write_fail=0
692cat >$1 <<_ASEOF || lt_write_fail=1
693#! $SHELL
694# Generated by $as_me.
695$2
696SHELL=\${CONFIG_SHELL-$SHELL}
697export SHELL
698_ASEOF
699cat >>$1 <<\_ASEOF || lt_write_fail=1
700AS_SHELL_SANITIZE
701_AS_PREPARE
702exec AS_MESSAGE_FD>&1
703_ASEOF
d50284c4 704test 0 = "$lt_write_fail" && chmod +x $1[]dnl
b0322a85 705m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
d9898ee8 706
8d138742
CE
707# LT_OUTPUT
708# ---------
709# This macro allows early generation of the libtool script (before
710# AC_OUTPUT is called), incase it is used in configure for compilation
711# tests.
712AC_DEFUN([LT_OUTPUT],
713[: ${CONFIG_LT=./config.lt}
714AC_MSG_NOTICE([creating $CONFIG_LT])
b0322a85
CE
715_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
716[# Run this file to recreate a libtool stub with the current configuration.])
8d138742
CE
717
718cat >>"$CONFIG_LT" <<\_LTEOF
b0322a85 719lt_cl_silent=false
8d138742
CE
720exec AS_MESSAGE_LOG_FD>>config.log
721{
722 echo
723 AS_BOX([Running $as_me.])
724} >&AS_MESSAGE_LOG_FD
d9898ee8 725
8d138742 726lt_cl_help="\
d50284c4 727'$as_me' creates a local libtool stub from the current configuration,
8d138742
CE
728for use in further configure time tests before the real libtool is
729generated.
d9898ee8 730
8d138742 731Usage: $[0] [[OPTIONS]]
d9898ee8 732
8d138742
CE
733 -h, --help print this help, then exit
734 -V, --version print version number, then exit
735 -q, --quiet do not print progress messages
736 -d, --debug don't remove temporary files
d9898ee8 737
8d138742 738Report bugs to <bug-libtool@gnu.org>."
d9898ee8 739
8d138742
CE
740lt_cl_version="\
741m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
742m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
743configured by $[0], generated by m4_PACKAGE_STRING.
d9898ee8 744
b0322a85 745Copyright (C) 2011 Free Software Foundation, Inc.
8d138742
CE
746This config.lt script is free software; the Free Software Foundation
747gives unlimited permision to copy, distribute and modify it."
d9898ee8 748
d50284c4 749while test 0 != $[#]
8d138742
CE
750do
751 case $[1] in
752 --version | --v* | -V )
753 echo "$lt_cl_version"; exit 0 ;;
754 --help | --h* | -h )
755 echo "$lt_cl_help"; exit 0 ;;
756 --debug | --d* | -d )
757 debug=: ;;
758 --quiet | --q* | --silent | --s* | -q )
759 lt_cl_silent=: ;;
760
761 -*) AC_MSG_ERROR([unrecognized option: $[1]
d50284c4 762Try '$[0] --help' for more information.]) ;;
8d138742
CE
763
764 *) AC_MSG_ERROR([unrecognized argument: $[1]
d50284c4 765Try '$[0] --help' for more information.]) ;;
8d138742
CE
766 esac
767 shift
768done
d9898ee8 769
8d138742
CE
770if $lt_cl_silent; then
771 exec AS_MESSAGE_FD>/dev/null
772fi
773_LTEOF
774
775cat >>"$CONFIG_LT" <<_LTEOF
776_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
777_LTEOF
778
779cat >>"$CONFIG_LT" <<\_LTEOF
780AC_MSG_NOTICE([creating $ofile])
781_LT_OUTPUT_LIBTOOL_COMMANDS
782AS_EXIT(0)
783_LTEOF
784chmod +x "$CONFIG_LT"
785
786# configure is writing to config.log, but config.lt does its own redirection,
787# appending to config.log, which fails on DOS, as config.log is still kept
788# open by configure. Here we exec the FD to /dev/null, effectively closing
789# config.log, so it can be properly (re)opened and appended to by config.lt.
b0322a85 790lt_cl_success=:
d50284c4 791test yes = "$silent" &&
b0322a85
CE
792 lt_config_lt_args="$lt_config_lt_args --quiet"
793exec AS_MESSAGE_LOG_FD>/dev/null
794$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
795exec AS_MESSAGE_LOG_FD>>config.log
796$lt_cl_success || AS_EXIT(1)
8d138742 797])# LT_OUTPUT
d9898ee8 798
8d138742
CE
799
800# _LT_CONFIG(TAG)
801# ---------------
802# If TAG is the built-in tag, create an initial libtool script with a
803# default configuration from the untagged config vars. Otherwise add code
804# to config.status for appending the configuration named by TAG from the
805# matching tagged config vars.
806m4_defun([_LT_CONFIG],
807[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
808_LT_CONFIG_SAVE_COMMANDS([
809 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
810 m4_if(_LT_TAG, [C], [
d50284c4 811 # See if we are running on zsh, and set the options that allow our
8d138742 812 # commands through without removal of \ escapes.
d50284c4 813 if test -n "${ZSH_VERSION+set}"; then
8d138742 814 setopt NO_GLOB_SUBST
d9898ee8 815 fi
d9898ee8 816
d50284c4 817 cfgfile=${ofile}T
8d138742
CE
818 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
819 $RM "$cfgfile"
d9898ee8 820
8d138742
CE
821 cat <<_LT_EOF >> "$cfgfile"
822#! $SHELL
d50284c4 823# Generated automatically by $as_me ($PACKAGE) $VERSION
8d138742
CE
824# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
825# NOTE: Changes made to this file will be lost: look at ltmain.sh.
d50284c4
CE
826
827# Provide generalized library-building support services.
828# Written by Gordon Matzigkeit, 1996
829
8d138742
CE
830_LT_COPYING
831_LT_LIBTOOL_TAGS
d9898ee8 832
d50284c4
CE
833# Configured defaults for sys_lib_dlsearch_path munging.
834: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
835
8d138742
CE
836# ### BEGIN LIBTOOL CONFIG
837_LT_LIBTOOL_CONFIG_VARS
838_LT_LIBTOOL_TAG_VARS
839# ### END LIBTOOL CONFIG
d9898ee8 840
d50284c4
CE
841_LT_EOF
842
843 cat <<'_LT_EOF' >> "$cfgfile"
844
845# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
846
847_LT_PREPARE_MUNGE_PATH_LIST
848_LT_PREPARE_CC_BASENAME
849
850# ### END FUNCTIONS SHARED WITH CONFIGURE
851
8d138742 852_LT_EOF
d9898ee8 853
8d138742
CE
854 case $host_os in
855 aix3*)
856 cat <<\_LT_EOF >> "$cfgfile"
857# AIX sometimes has problems with the GCC collect2 program. For some
858# reason, if we set the COLLECT_NAMES environment variable, the problems
859# vanish in a puff of smoke.
d50284c4 860if test set != "${COLLECT_NAMES+set}"; then
8d138742
CE
861 COLLECT_NAMES=
862 export COLLECT_NAMES
863fi
864_LT_EOF
865 ;;
866 esac
d9898ee8 867
8d138742 868 _LT_PROG_LTMAIN
d9898ee8 869
8d138742
CE
870 # We use sed instead of cat because bash on DJGPP gets confused if
871 # if finds mixed CR/LF and LF-only lines. Since sed operates in
872 # text mode, it properly converts lines to CR/LF. This bash problem
873 # is reportedly fixed, but why not run on old versions too?
b0322a85
CE
874 sed '$q' "$ltmain" >> "$cfgfile" \
875 || (rm -f "$cfgfile"; exit 1)
d9898ee8 876
b0322a85 877 mv -f "$cfgfile" "$ofile" ||
8d138742
CE
878 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
879 chmod +x "$ofile"
880],
881[cat <<_LT_EOF >> "$ofile"
d9898ee8 882
8d138742
CE
883dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
884dnl in a comment (ie after a #).
885# ### BEGIN LIBTOOL TAG CONFIG: $1
886_LT_LIBTOOL_TAG_VARS(_LT_TAG)
887# ### END LIBTOOL TAG CONFIG: $1
888_LT_EOF
889])dnl /m4_if
890],
891[m4_if([$1], [], [
892 PACKAGE='$PACKAGE'
893 VERSION='$VERSION'
8d138742
CE
894 RM='$RM'
895 ofile='$ofile'], [])
896])dnl /_LT_CONFIG_SAVE_COMMANDS
897])# _LT_CONFIG
d9898ee8 898
d9898ee8 899
8d138742
CE
900# LT_SUPPORTED_TAG(TAG)
901# ---------------------
902# Trace this macro to discover what tags are supported by the libtool
903# --tag option, using:
904# autoconf --trace 'LT_SUPPORTED_TAG:$1'
905AC_DEFUN([LT_SUPPORTED_TAG], [])
d9898ee8 906
907
8d138742
CE
908# C support is built-in for now
909m4_define([_LT_LANG_C_enabled], [])
910m4_define([_LT_TAGS], [])
d9898ee8 911
d9898ee8 912
8d138742
CE
913# LT_LANG(LANG)
914# -------------
915# Enable libtool support for the given language if not already enabled.
916AC_DEFUN([LT_LANG],
917[AC_BEFORE([$0], [LT_OUTPUT])dnl
918m4_case([$1],
919 [C], [_LT_LANG(C)],
920 [C++], [_LT_LANG(CXX)],
b0322a85 921 [Go], [_LT_LANG(GO)],
8d138742
CE
922 [Java], [_LT_LANG(GCJ)],
923 [Fortran 77], [_LT_LANG(F77)],
924 [Fortran], [_LT_LANG(FC)],
925 [Windows Resource], [_LT_LANG(RC)],
926 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
927 [_LT_LANG($1)],
928 [m4_fatal([$0: unsupported language: "$1"])])])dnl
929])# LT_LANG
930
931
932# _LT_LANG(LANGNAME)
933# ------------------
934m4_defun([_LT_LANG],
935[m4_ifdef([_LT_LANG_]$1[_enabled], [],
936 [LT_SUPPORTED_TAG([$1])dnl
937 m4_append([_LT_TAGS], [$1 ])dnl
938 m4_define([_LT_LANG_]$1[_enabled], [])dnl
939 _LT_LANG_$1_CONFIG($1)])dnl
940])# _LT_LANG
d9898ee8 941
d9898ee8 942
b0322a85
CE
943m4_ifndef([AC_PROG_GO], [
944# NOTE: This macro has been submitted for inclusion into #
945# GNU Autoconf as AC_PROG_GO. When it is available in #
946# a released version of Autoconf we should remove this #
947# macro and use it instead. #
948m4_defun([AC_PROG_GO],
949[AC_LANG_PUSH(Go)dnl
950AC_ARG_VAR([GOC], [Go compiler command])dnl
951AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
952_AC_ARG_VAR_LDFLAGS()dnl
953AC_CHECK_TOOL(GOC, gccgo)
954if test -z "$GOC"; then
955 if test -n "$ac_tool_prefix"; then
956 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
957 fi
958fi
959if test -z "$GOC"; then
960 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
961fi
962])#m4_defun
963])#m4_ifndef
964
965
8d138742
CE
966# _LT_LANG_DEFAULT_CONFIG
967# -----------------------
968m4_defun([_LT_LANG_DEFAULT_CONFIG],
969[AC_PROVIDE_IFELSE([AC_PROG_CXX],
970 [LT_LANG(CXX)],
971 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
972
973AC_PROVIDE_IFELSE([AC_PROG_F77],
974 [LT_LANG(F77)],
975 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
976
977AC_PROVIDE_IFELSE([AC_PROG_FC],
978 [LT_LANG(FC)],
979 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
980
981dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
982dnl pulling things in needlessly.
983AC_PROVIDE_IFELSE([AC_PROG_GCJ],
984 [LT_LANG(GCJ)],
985 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
986 [LT_LANG(GCJ)],
987 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
988 [LT_LANG(GCJ)],
989 [m4_ifdef([AC_PROG_GCJ],
990 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
991 m4_ifdef([A][M_PROG_GCJ],
992 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
993 m4_ifdef([LT_PROG_GCJ],
994 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
995
b0322a85
CE
996AC_PROVIDE_IFELSE([AC_PROG_GO],
997 [LT_LANG(GO)],
998 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
999
8d138742
CE
1000AC_PROVIDE_IFELSE([LT_PROG_RC],
1001 [LT_LANG(RC)],
1002 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1003])# _LT_LANG_DEFAULT_CONFIG
1004
1005# Obsolete macros:
1006AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1007AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1008AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1009AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
b0322a85 1010AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
8d138742
CE
1011dnl aclocal-1.4 backwards compatibility:
1012dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1013dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1014dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1015dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
b0322a85 1016dnl AC_DEFUN([AC_LIBTOOL_RC], [])
8d138742
CE
1017
1018
1019# _LT_TAG_COMPILER
1020# ----------------
1021m4_defun([_LT_TAG_COMPILER],
1022[AC_REQUIRE([AC_PROG_CC])dnl
d9898ee8 1023
8d138742
CE
1024_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1025_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1026_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1027_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
d9898ee8 1028
8d138742
CE
1029# If no C compiler was specified, use CC.
1030LTCC=${LTCC-"$CC"}
d9898ee8 1031
8d138742
CE
1032# If no C compiler flags were specified, use CFLAGS.
1033LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
d9898ee8 1034
8d138742
CE
1035# Allow CC to be a program name with arguments.
1036compiler=$CC
1037])# _LT_TAG_COMPILER
d9898ee8 1038
d9898ee8 1039
8d138742
CE
1040# _LT_COMPILER_BOILERPLATE
1041# ------------------------
1042# Check for compiler boilerplate output or warnings with
1043# the simple compiler test code.
1044m4_defun([_LT_COMPILER_BOILERPLATE],
1045[m4_require([_LT_DECL_SED])dnl
1046ac_outfile=conftest.$ac_objext
1047echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1048eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1049_lt_compiler_boilerplate=`cat conftest.err`
1050$RM conftest*
1051])# _LT_COMPILER_BOILERPLATE
d9898ee8 1052
d9898ee8 1053
8d138742
CE
1054# _LT_LINKER_BOILERPLATE
1055# ----------------------
1056# Check for linker boilerplate output or warnings with
1057# the simple link test code.
1058m4_defun([_LT_LINKER_BOILERPLATE],
1059[m4_require([_LT_DECL_SED])dnl
1060ac_outfile=conftest.$ac_objext
1061echo "$lt_simple_link_test_code" >conftest.$ac_ext
1062eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1063_lt_linker_boilerplate=`cat conftest.err`
1064$RM -r conftest*
1065])# _LT_LINKER_BOILERPLATE
1066
1067# _LT_REQUIRED_DARWIN_CHECKS
1068# -------------------------
1069m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1070 case $host_os in
1071 rhapsody* | darwin*)
1072 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1073 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1074 AC_CHECK_TOOL([LIPO], [lipo], [:])
1075 AC_CHECK_TOOL([OTOOL], [otool], [:])
1076 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1077 _LT_DECL([], [DSYMUTIL], [1],
1078 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1079 _LT_DECL([], [NMEDIT], [1],
1080 [Tool to change global to local symbols on Mac OS X])
1081 _LT_DECL([], [LIPO], [1],
1082 [Tool to manipulate fat objects and archives on Mac OS X])
1083 _LT_DECL([], [OTOOL], [1],
1084 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1085 _LT_DECL([], [OTOOL64], [1],
1086 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1087
1088 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1089 [lt_cv_apple_cc_single_mod=no
d50284c4 1090 if test -z "$LT_MULTI_MODULE"; then
8d138742
CE
1091 # By default we will add the -single_module flag. You can override
1092 # by either setting the environment variable LT_MULTI_MODULE
1093 # non-empty at configure time, or by adding -multi_module to the
1094 # link flags.
1095 rm -rf libconftest.dylib*
1096 echo "int foo(void){return 1;}" > conftest.c
1097 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1098-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1099 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1100 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1101 _lt_result=$?
b0322a85
CE
1102 # If there is a non-empty error log, and "single_module"
1103 # appears in it, assume the flag caused a linker warning
1104 if test -s conftest.err && $GREP single_module conftest.err; then
1105 cat conftest.err >&AS_MESSAGE_LOG_FD
1106 # Otherwise, if the output was created with a 0 exit code from
1107 # the compiler, it worked.
d50284c4 1108 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
8d138742
CE
1109 lt_cv_apple_cc_single_mod=yes
1110 else
1111 cat conftest.err >&AS_MESSAGE_LOG_FD
1112 fi
1113 rm -rf libconftest.dylib*
1114 rm -f conftest.*
1115 fi])
b0322a85 1116
8d138742
CE
1117 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1118 [lt_cv_ld_exported_symbols_list],
1119 [lt_cv_ld_exported_symbols_list=no
1120 save_LDFLAGS=$LDFLAGS
1121 echo "_main" > conftest.sym
1122 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1123 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1124 [lt_cv_ld_exported_symbols_list=yes],
1125 [lt_cv_ld_exported_symbols_list=no])
d50284c4 1126 LDFLAGS=$save_LDFLAGS
8d138742 1127 ])
b0322a85
CE
1128
1129 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1130 [lt_cv_ld_force_load=no
1131 cat > conftest.c << _LT_EOF
1132int forced_loaded() { return 2;}
1133_LT_EOF
1134 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1135 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1136 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1137 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1138 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1139 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1140 cat > conftest.c << _LT_EOF
1141int main() { return 0;}
1142_LT_EOF
1143 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1144 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1145 _lt_result=$?
1146 if test -s conftest.err && $GREP force_load conftest.err; then
1147 cat conftest.err >&AS_MESSAGE_LOG_FD
d50284c4 1148 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
b0322a85
CE
1149 lt_cv_ld_force_load=yes
1150 else
1151 cat conftest.err >&AS_MESSAGE_LOG_FD
1152 fi
1153 rm -f conftest.err libconftest.a conftest conftest.c
1154 rm -rf conftest.dSYM
1155 ])
8d138742
CE
1156 case $host_os in
1157 rhapsody* | darwin1.[[012]])
d50284c4 1158 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
8d138742 1159 darwin1.*)
d50284c4 1160 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8d138742
CE
1161 darwin*) # darwin 5.x on
1162 # if running on 10.5 or later, the deployment target defaults
1163 # to the OS version, if on x86, and 10.4, the deployment
1164 # target defaults to 10.4. Don't you love it?
1165 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1166 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
d50284c4
CE
1167 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1168 10.[[012]][[,.]]*)
1169 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8d138742 1170 10.*)
d50284c4 1171 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8d138742 1172 esac
d9898ee8 1173 ;;
1174 esac
d50284c4 1175 if test yes = "$lt_cv_apple_cc_single_mod"; then
8d138742
CE
1176 _lt_dar_single_mod='$single_module'
1177 fi
d50284c4
CE
1178 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1179 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
8d138742 1180 else
d50284c4 1181 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
8d138742 1182 fi
d50284c4 1183 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
8d138742
CE
1184 _lt_dsymutil='~$DSYMUTIL $lib || :'
1185 else
1186 _lt_dsymutil=
1187 fi
1188 ;;
d9898ee8 1189 esac
8d138742 1190])
d9898ee8 1191
8d138742 1192
b0322a85
CE
1193# _LT_DARWIN_LINKER_FEATURES([TAG])
1194# ---------------------------------
8d138742
CE
1195# Checks for linker and compiler features on darwin
1196m4_defun([_LT_DARWIN_LINKER_FEATURES],
1197[
1198 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1199 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1200 _LT_TAGVAR(hardcode_direct, $1)=no
1201 _LT_TAGVAR(hardcode_automatic, $1)=yes
1202 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
d50284c4
CE
1203 if test yes = "$lt_cv_ld_force_load"; then
1204 _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\"`'
b0322a85
CE
1205 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1206 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1207 else
1208 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1209 fi
8d138742 1210 _LT_TAGVAR(link_all_deplibs, $1)=yes
d50284c4 1211 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
8d138742 1212 case $cc_basename in
d50284c4 1213 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
8d138742 1214 *) _lt_dar_can_shared=$GCC ;;
d9898ee8 1215 esac
d50284c4 1216 if test yes = "$_lt_dar_can_shared"; then
b0322a85 1217 output_verbose_link_cmd=func_echo_all
d50284c4
CE
1218 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
1219 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1220 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
1221 _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"
8d138742 1222 m4_if([$1], [CXX],
d50284c4
CE
1223[ if test yes != "$lt_cv_apple_cc_single_mod"; then
1224 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
1225 _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"
8d138742
CE
1226 fi
1227],[])
1228 else
1229 _LT_TAGVAR(ld_shlibs, $1)=no
1230 fi
1231])
d9898ee8 1232
b0322a85
CE
1233# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1234# ----------------------------------
8d138742
CE
1235# Links a minimal program and checks the executable
1236# for the system default hardcoded library path. In most cases,
1237# this is /usr/lib:/lib, but when the MPI compilers are used
1238# the location of the communication and MPI libs are included too.
1239# If we don't find anything, use the default library path according
1240# to the aix ld manual.
b0322a85
CE
1241# Store the results from the different compilers for each TAGNAME.
1242# Allow to override them for all tags through lt_cv_aix_libpath.
8d138742
CE
1243m4_defun([_LT_SYS_MODULE_PATH_AIX],
1244[m4_require([_LT_DECL_SED])dnl
d50284c4 1245if test set = "${lt_cv_aix_libpath+set}"; then
b0322a85
CE
1246 aix_libpath=$lt_cv_aix_libpath
1247else
1248 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1249 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1250 lt_aix_libpath_sed='[
1251 /Import File Strings/,/^$/ {
1252 /^0/ {
1253 s/^0 *\([^ ]*\) *$/\1/
1254 p
1255 }
1256 }]'
1257 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1258 # Check for a 64-bit object if we didn't find anything.
1259 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1260 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1261 fi],[])
1262 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
d50284c4 1263 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
b0322a85
CE
1264 fi
1265 ])
1266 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1267fi
8d138742 1268])# _LT_SYS_MODULE_PATH_AIX
d9898ee8 1269
d9898ee8 1270
8d138742
CE
1271# _LT_SHELL_INIT(ARG)
1272# -------------------
1273m4_define([_LT_SHELL_INIT],
b0322a85
CE
1274[m4_divert_text([M4SH-INIT], [$1
1275])])# _LT_SHELL_INIT
1276
d9898ee8 1277
1278
8d138742
CE
1279# _LT_PROG_ECHO_BACKSLASH
1280# -----------------------
b0322a85
CE
1281# Find how we can fake an echo command that does not interpret backslash.
1282# In particular, with Autoconf 2.60 or later we add some code to the start
d50284c4
CE
1283# of the generated configure script that will find a shell with a builtin
1284# printf (that we can use as an echo command).
8d138742 1285m4_defun([_LT_PROG_ECHO_BACKSLASH],
b0322a85
CE
1286[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1287ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1288ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1289
1290AC_MSG_CHECKING([how to print strings])
1291# Test print first, because it will be a builtin if present.
1292if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1293 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1294 ECHO='print -r --'
1295elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1296 ECHO='printf %s\n'
d9898ee8 1297else
b0322a85
CE
1298 # Use this function as a fallback that always works.
1299 func_fallback_echo ()
1300 {
1301 eval 'cat <<_LTECHO_EOF
1302$[]1
1303_LTECHO_EOF'
1304 }
1305 ECHO='func_fallback_echo'
d9898ee8 1306fi
d9898ee8 1307
b0322a85
CE
1308# func_echo_all arg...
1309# Invoke $ECHO with all args, space-separated.
1310func_echo_all ()
1311{
d50284c4 1312 $ECHO "$*"
b0322a85 1313}
8d138742 1314
d50284c4 1315case $ECHO in
b0322a85
CE
1316 printf*) AC_MSG_RESULT([printf]) ;;
1317 print*) AC_MSG_RESULT([print -r]) ;;
1318 *) AC_MSG_RESULT([cat]) ;;
1319esac
d9898ee8 1320
b0322a85
CE
1321m4_ifdef([_AS_DETECT_SUGGESTED],
1322[_AS_DETECT_SUGGESTED([
1323 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1324 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1325 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1326 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1327 PATH=/empty FPATH=/empty; export PATH FPATH
1328 test "X`printf %s $ECHO`" = "X$ECHO" \
1329 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
d9898ee8 1330
8d138742 1331_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
b0322a85 1332_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
8d138742 1333])# _LT_PROG_ECHO_BACKSLASH
d9898ee8 1334
d9898ee8 1335
b0322a85
CE
1336# _LT_WITH_SYSROOT
1337# ----------------
1338AC_DEFUN([_LT_WITH_SYSROOT],
1339[AC_MSG_CHECKING([for sysroot])
1340AC_ARG_WITH([sysroot],
d50284c4
CE
1341[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1342 [Search for dependent libraries within DIR (or the compiler's sysroot
1343 if not specified).])],
b0322a85
CE
1344[], [with_sysroot=no])
1345
1346dnl lt_sysroot will always be passed unquoted. We quote it here
1347dnl in case the user passed a directory name.
1348lt_sysroot=
d50284c4 1349case $with_sysroot in #(
b0322a85 1350 yes)
d50284c4 1351 if test yes = "$GCC"; then
b0322a85
CE
1352 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1353 fi
1354 ;; #(
1355 /*)
1356 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1357 ;; #(
1358 no|'')
1359 ;; #(
1360 *)
d50284c4 1361 AC_MSG_RESULT([$with_sysroot])
b0322a85
CE
1362 AC_MSG_ERROR([The sysroot must be an absolute path.])
1363 ;;
1364esac
1365
1366 AC_MSG_RESULT([${lt_sysroot:-no}])
1367_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
d50284c4 1368[dependent libraries, and where our libraries should be installed.])])
b0322a85 1369
8d138742
CE
1370# _LT_ENABLE_LOCK
1371# ---------------
1372m4_defun([_LT_ENABLE_LOCK],
1373[AC_ARG_ENABLE([libtool-lock],
1374 [AS_HELP_STRING([--disable-libtool-lock],
1375 [avoid locking (might break parallel builds)])])
d50284c4 1376test no = "$enable_libtool_lock" || enable_libtool_lock=yes
d9898ee8 1377
8d138742
CE
1378# Some flags need to be propagated to the compiler or linker for good
1379# libtool support.
1380case $host in
1381ia64-*-hpux*)
d50284c4
CE
1382 # Find out what ABI is being produced by ac_compile, and set mode
1383 # options accordingly.
8d138742
CE
1384 echo 'int i;' > conftest.$ac_ext
1385 if AC_TRY_EVAL(ac_compile); then
1386 case `/usr/bin/file conftest.$ac_objext` in
1387 *ELF-32*)
d50284c4 1388 HPUX_IA64_MODE=32
8d138742
CE
1389 ;;
1390 *ELF-64*)
d50284c4 1391 HPUX_IA64_MODE=64
8d138742
CE
1392 ;;
1393 esac
d9898ee8 1394 fi
8d138742
CE
1395 rm -rf conftest*
1396 ;;
1397*-*-irix6*)
d50284c4
CE
1398 # Find out what ABI is being produced by ac_compile, and set linker
1399 # options accordingly.
b0322a85 1400 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
8d138742 1401 if AC_TRY_EVAL(ac_compile); then
d50284c4 1402 if test yes = "$lt_cv_prog_gnu_ld"; then
8d138742
CE
1403 case `/usr/bin/file conftest.$ac_objext` in
1404 *32-bit*)
1405 LD="${LD-ld} -melf32bsmip"
1406 ;;
1407 *N32*)
1408 LD="${LD-ld} -melf32bmipn32"
1409 ;;
1410 *64-bit*)
1411 LD="${LD-ld} -melf64bmip"
1412 ;;
1413 esac
ac40fd9e 1414 else
8d138742
CE
1415 case `/usr/bin/file conftest.$ac_objext` in
1416 *32-bit*)
1417 LD="${LD-ld} -32"
1418 ;;
1419 *N32*)
1420 LD="${LD-ld} -n32"
1421 ;;
1422 *64-bit*)
1423 LD="${LD-ld} -64"
1424 ;;
1425 esac
ac40fd9e 1426 fi
8d138742
CE
1427 fi
1428 rm -rf conftest*
d9898ee8 1429 ;;
1430
d50284c4
CE
1431mips64*-*linux*)
1432 # Find out what ABI is being produced by ac_compile, and set linker
1433 # options accordingly.
1434 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1435 if AC_TRY_EVAL(ac_compile); then
1436 emul=elf
1437 case `/usr/bin/file conftest.$ac_objext` in
1438 *32-bit*)
1439 emul="${emul}32"
1440 ;;
1441 *64-bit*)
1442 emul="${emul}64"
1443 ;;
1444 esac
1445 case `/usr/bin/file conftest.$ac_objext` in
1446 *MSB*)
1447 emul="${emul}btsmip"
1448 ;;
1449 *LSB*)
1450 emul="${emul}ltsmip"
1451 ;;
1452 esac
1453 case `/usr/bin/file conftest.$ac_objext` in
1454 *N32*)
1455 emul="${emul}n32"
1456 ;;
1457 esac
1458 LD="${LD-ld} -m $emul"
1459 fi
1460 rm -rf conftest*
1461 ;;
1462
b0322a85 1463x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8d138742 1464s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
d50284c4
CE
1465 # Find out what ABI is being produced by ac_compile, and set linker
1466 # options accordingly. Note that the listed cases only cover the
1467 # situations where additional linker options are needed (such as when
1468 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1469 # vice versa); the common cases where no linker options are needed do
1470 # not appear in the list.
8d138742
CE
1471 echo 'int i;' > conftest.$ac_ext
1472 if AC_TRY_EVAL(ac_compile); then
1473 case `/usr/bin/file conftest.o` in
1474 *32-bit*)
1475 case $host in
1476 x86_64-*kfreebsd*-gnu)
1477 LD="${LD-ld} -m elf_i386_fbsd"
1478 ;;
1479 x86_64-*linux*)
d50284c4
CE
1480 case `/usr/bin/file conftest.o` in
1481 *x86-64*)
1482 LD="${LD-ld} -m elf32_x86_64"
1483 ;;
1484 *)
1485 LD="${LD-ld} -m elf_i386"
1486 ;;
1487 esac
8d138742 1488 ;;
d50284c4 1489 powerpc64le-*linux*)
b0322a85
CE
1490 LD="${LD-ld} -m elf32lppclinux"
1491 ;;
d50284c4 1492 powerpc64-*linux*)
8d138742
CE
1493 LD="${LD-ld} -m elf32ppclinux"
1494 ;;
1495 s390x-*linux*)
1496 LD="${LD-ld} -m elf_s390"
1497 ;;
1498 sparc64-*linux*)
1499 LD="${LD-ld} -m elf32_sparc"
1500 ;;
1501 esac
1502 ;;
1503 *64-bit*)
1504 case $host in
1505 x86_64-*kfreebsd*-gnu)
1506 LD="${LD-ld} -m elf_x86_64_fbsd"
1507 ;;
1508 x86_64-*linux*)
1509 LD="${LD-ld} -m elf_x86_64"
1510 ;;
b0322a85
CE
1511 powerpcle-*linux*)
1512 LD="${LD-ld} -m elf64lppc"
1513 ;;
1514 powerpc-*linux*)
8d138742
CE
1515 LD="${LD-ld} -m elf64ppc"
1516 ;;
1517 s390*-*linux*|s390*-*tpf*)
1518 LD="${LD-ld} -m elf64_s390"
1519 ;;
1520 sparc*-*linux*)
1521 LD="${LD-ld} -m elf64_sparc"
1522 ;;
1523 esac
1524 ;;
d9898ee8 1525 esac
d9898ee8 1526 fi
8d138742 1527 rm -rf conftest*
d9898ee8 1528 ;;
1529
8d138742
CE
1530*-*-sco3.2v5*)
1531 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
d50284c4 1532 SAVE_CFLAGS=$CFLAGS
8d138742
CE
1533 CFLAGS="$CFLAGS -belf"
1534 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1535 [AC_LANG_PUSH(C)
1536 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1537 AC_LANG_POP])
d50284c4 1538 if test yes != "$lt_cv_cc_needs_belf"; then
8d138742 1539 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
d50284c4 1540 CFLAGS=$SAVE_CFLAGS
8d138742 1541 fi
d9898ee8 1542 ;;
b0322a85 1543*-*solaris*)
d50284c4
CE
1544 # Find out what ABI is being produced by ac_compile, and set linker
1545 # options accordingly.
8d138742
CE
1546 echo 'int i;' > conftest.$ac_ext
1547 if AC_TRY_EVAL(ac_compile); then
1548 case `/usr/bin/file conftest.o` in
1549 *64-bit*)
1550 case $lt_cv_prog_gnu_ld in
b0322a85
CE
1551 yes*)
1552 case $host in
d50284c4 1553 i?86-*-solaris*|x86_64-*-solaris*)
b0322a85
CE
1554 LD="${LD-ld} -m elf_x86_64"
1555 ;;
1556 sparc*-*-solaris*)
1557 LD="${LD-ld} -m elf64_sparc"
1558 ;;
1559 esac
1560 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1561 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
d50284c4 1562 LD=${LD-ld}_sol2
b0322a85
CE
1563 fi
1564 ;;
8d138742
CE
1565 *)
1566 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1567 LD="${LD-ld} -64"
1568 fi
1569 ;;
1570 esac
1571 ;;
1572 esac
1573 fi
1574 rm -rf conftest*
d9898ee8 1575 ;;
8d138742 1576esac
d9898ee8 1577
d50284c4 1578need_locks=$enable_libtool_lock
8d138742 1579])# _LT_ENABLE_LOCK
d9898ee8 1580
d9898ee8 1581
b0322a85
CE
1582# _LT_PROG_AR
1583# -----------
1584m4_defun([_LT_PROG_AR],
1585[AC_CHECK_TOOLS(AR, [ar], false)
1586: ${AR=ar}
1587: ${AR_FLAGS=cru}
1588_LT_DECL([], [AR], [1], [The archiver])
1589_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1590
1591AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1592 [lt_cv_ar_at_file=no
1593 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1594 [echo conftest.$ac_objext > conftest.lst
1595 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1596 AC_TRY_EVAL([lt_ar_try])
d50284c4 1597 if test 0 -eq "$ac_status"; then
b0322a85
CE
1598 # Ensure the archiver fails upon bogus file names.
1599 rm -f conftest.$ac_objext libconftest.a
1600 AC_TRY_EVAL([lt_ar_try])
d50284c4 1601 if test 0 -ne "$ac_status"; then
b0322a85
CE
1602 lt_cv_ar_at_file=@
1603 fi
1604 fi
1605 rm -f conftest.* libconftest.a
1606 ])
1607 ])
1608
d50284c4 1609if test no = "$lt_cv_ar_at_file"; then
b0322a85
CE
1610 archiver_list_spec=
1611else
1612 archiver_list_spec=$lt_cv_ar_at_file
1613fi
1614_LT_DECL([], [archiver_list_spec], [1],
1615 [How to feed a file listing to the archiver])
1616])# _LT_PROG_AR
1617
1618
8d138742
CE
1619# _LT_CMD_OLD_ARCHIVE
1620# -------------------
1621m4_defun([_LT_CMD_OLD_ARCHIVE],
b0322a85 1622[_LT_PROG_AR
d9898ee8 1623
8d138742
CE
1624AC_CHECK_TOOL(STRIP, strip, :)
1625test -z "$STRIP" && STRIP=:
1626_LT_DECL([], [STRIP], [1], [A symbol stripping program])
d9898ee8 1627
8d138742
CE
1628AC_CHECK_TOOL(RANLIB, ranlib, :)
1629test -z "$RANLIB" && RANLIB=:
1630_LT_DECL([], [RANLIB], [1],
1631 [Commands used to install an old-style archive])
d9898ee8 1632
8d138742
CE
1633# Determine commands to create old-style static archives.
1634old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1635old_postinstall_cmds='chmod 644 $oldlib'
1636old_postuninstall_cmds=
d9898ee8 1637
8d138742 1638if test -n "$RANLIB"; then
d9898ee8 1639 case $host_os in
d50284c4 1640 bitrig* | openbsd*)
b0322a85 1641 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
d9898ee8 1642 ;;
8d138742 1643 *)
b0322a85 1644 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
d9898ee8 1645 ;;
1646 esac
b0322a85 1647 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8d138742 1648fi
b0322a85
CE
1649
1650case $host_os in
1651 darwin*)
1652 lock_old_archive_extraction=yes ;;
1653 *)
1654 lock_old_archive_extraction=no ;;
1655esac
8d138742
CE
1656_LT_DECL([], [old_postinstall_cmds], [2])
1657_LT_DECL([], [old_postuninstall_cmds], [2])
1658_LT_TAGDECL([], [old_archive_cmds], [2],
1659 [Commands used to build an old-style archive])
b0322a85
CE
1660_LT_DECL([], [lock_old_archive_extraction], [0],
1661 [Whether to use a lock for old archive extraction])
8d138742 1662])# _LT_CMD_OLD_ARCHIVE
d9898ee8 1663
d9898ee8 1664
8d138742
CE
1665# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1666# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1667# ----------------------------------------------------------------
1668# Check whether the given compiler option works
1669AC_DEFUN([_LT_COMPILER_OPTION],
1670[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1671m4_require([_LT_DECL_SED])dnl
1672AC_CACHE_CHECK([$1], [$2],
1673 [$2=no
1674 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1675 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
d50284c4 1676 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
8d138742
CE
1677 # Insert the option either (1) after the last *FLAGS variable, or
1678 # (2) before a word containing "conftest.", or (3) at the end.
1679 # Note that $ac_compile itself does not contain backslashes and begins
1680 # with a dollar sign (not a hyphen), so the echo should work correctly.
1681 # The option is referenced via a variable to avoid confusing sed.
1682 lt_compile=`echo "$ac_compile" | $SED \
1683 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1684 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1685 -e 's:$: $lt_compiler_flag:'`
b0322a85 1686 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
1687 (eval "$lt_compile" 2>conftest.err)
1688 ac_status=$?
1689 cat conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 1690 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8d138742
CE
1691 if (exit $ac_status) && test -s "$ac_outfile"; then
1692 # The compiler can only warn and ignore the option if not recognized
1693 # So say no if there are warnings other than the usual output.
b0322a85 1694 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8d138742
CE
1695 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1696 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1697 $2=yes
1698 fi
1699 fi
1700 $RM conftest*
1701])
d9898ee8 1702
d50284c4 1703if test yes = "[$]$2"; then
8d138742
CE
1704 m4_if([$5], , :, [$5])
1705else
1706 m4_if([$6], , :, [$6])
1707fi
1708])# _LT_COMPILER_OPTION
d9898ee8 1709
8d138742
CE
1710# Old name:
1711AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1712dnl aclocal-1.4 backwards compatibility:
1713dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
d9898ee8 1714
d9898ee8 1715
8d138742
CE
1716# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1717# [ACTION-SUCCESS], [ACTION-FAILURE])
1718# ----------------------------------------------------
1719# Check whether the given linker option works
1720AC_DEFUN([_LT_LINKER_OPTION],
1721[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1722m4_require([_LT_DECL_SED])dnl
1723AC_CACHE_CHECK([$1], [$2],
1724 [$2=no
d50284c4 1725 save_LDFLAGS=$LDFLAGS
8d138742
CE
1726 LDFLAGS="$LDFLAGS $3"
1727 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1728 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1729 # The linker can only warn and ignore the option if not recognized
1730 # So say no if there are warnings
1731 if test -s conftest.err; then
1732 # Append any errors to the config.log.
1733 cat conftest.err 1>&AS_MESSAGE_LOG_FD
b0322a85 1734 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
8d138742
CE
1735 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1736 if diff conftest.exp conftest.er2 >/dev/null; then
1737 $2=yes
1738 fi
1739 else
1740 $2=yes
1741 fi
1742 fi
1743 $RM -r conftest*
d50284c4 1744 LDFLAGS=$save_LDFLAGS
8d138742 1745])
d9898ee8 1746
d50284c4 1747if test yes = "[$]$2"; then
8d138742
CE
1748 m4_if([$4], , :, [$4])
1749else
1750 m4_if([$5], , :, [$5])
1751fi
1752])# _LT_LINKER_OPTION
d9898ee8 1753
8d138742
CE
1754# Old name:
1755AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1756dnl aclocal-1.4 backwards compatibility:
1757dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
d9898ee8 1758
d9898ee8 1759
8d138742
CE
1760# LT_CMD_MAX_LEN
1761#---------------
1762AC_DEFUN([LT_CMD_MAX_LEN],
1763[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1764# find the maximum length of command line arguments
1765AC_MSG_CHECKING([the maximum length of command line arguments])
1766AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1767 i=0
d50284c4 1768 teststring=ABCD
d9898ee8 1769
8d138742
CE
1770 case $build_os in
1771 msdosdjgpp*)
1772 # On DJGPP, this test can blow up pretty badly due to problems in libc
1773 # (any single argument exceeding 2000 bytes causes a buffer overrun
1774 # during glob expansion). Even if it were fixed, the result of this
1775 # check would be larger than it should be.
1776 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1777 ;;
d9898ee8 1778
8d138742
CE
1779 gnu*)
1780 # Under GNU Hurd, this test is not required because there is
1781 # no limit to the length of command line arguments.
1782 # Libtool will interpret -1 as no limit whatsoever
1783 lt_cv_sys_max_cmd_len=-1;
1784 ;;
d9898ee8 1785
8d138742
CE
1786 cygwin* | mingw* | cegcc*)
1787 # On Win9x/ME, this test blows up -- it succeeds, but takes
1788 # about 5 minutes as the teststring grows exponentially.
1789 # Worse, since 9x/ME are not pre-emptively multitasking,
1790 # you end up with a "frozen" computer, even though with patience
1791 # the test eventually succeeds (with a max line length of 256k).
1792 # Instead, let's just punt: use the minimum linelength reported by
1793 # all of the supported platforms: 8192 (on NT/2K/XP).
1794 lt_cv_sys_max_cmd_len=8192;
1795 ;;
d9898ee8 1796
b0322a85
CE
1797 mint*)
1798 # On MiNT this can take a long time and run out of memory.
1799 lt_cv_sys_max_cmd_len=8192;
1800 ;;
1801
8d138742
CE
1802 amigaos*)
1803 # On AmigaOS with pdksh, this test takes hours, literally.
1804 # So we just punt and use a minimum line length of 8192.
1805 lt_cv_sys_max_cmd_len=8192;
1806 ;;
d9898ee8 1807
d50284c4 1808 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
8d138742
CE
1809 # This has been around since 386BSD, at least. Likely further.
1810 if test -x /sbin/sysctl; then
1811 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1812 elif test -x /usr/sbin/sysctl; then
1813 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1814 else
1815 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1816 fi
1817 # And add a safety zone
1818 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1819 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1820 ;;
d9898ee8 1821
8d138742
CE
1822 interix*)
1823 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1824 lt_cv_sys_max_cmd_len=196608
1825 ;;
d9898ee8 1826
b0322a85
CE
1827 os2*)
1828 # The test takes a long time on OS/2.
1829 lt_cv_sys_max_cmd_len=8192
1830 ;;
1831
8d138742
CE
1832 osf*)
1833 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1834 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1835 # nice to cause kernel panics so lets avoid the loop below.
1836 # First set a reasonable default.
1837 lt_cv_sys_max_cmd_len=16384
1838 #
1839 if test -x /sbin/sysconfig; then
1840 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1841 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1842 esac
1843 fi
1844 ;;
1845 sco3.2v5*)
1846 lt_cv_sys_max_cmd_len=102400
1847 ;;
1848 sysv5* | sco5v6* | sysv4.2uw2*)
1849 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1850 if test -n "$kargmax"; then
1851 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
d9898ee8 1852 else
8d138742 1853 lt_cv_sys_max_cmd_len=32768
d9898ee8 1854 fi
8d138742
CE
1855 ;;
1856 *)
1857 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
d50284c4
CE
1858 if test -n "$lt_cv_sys_max_cmd_len" && \
1859 test undefined != "$lt_cv_sys_max_cmd_len"; then
8d138742
CE
1860 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1861 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1862 else
1863 # Make teststring a little bigger before we do anything with it.
1864 # a 1K string should be a reasonable start.
d50284c4 1865 for i in 1 2 3 4 5 6 7 8; do
8d138742
CE
1866 teststring=$teststring$teststring
1867 done
1868 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1869 # If test is not a shell built-in, we'll probably end up computing a
1870 # maximum length that is only half of the actual maximum length, but
1871 # we can't tell.
d50284c4 1872 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
b0322a85 1873 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
d50284c4 1874 test 17 != "$i" # 1/2 MB should be enough
8d138742
CE
1875 do
1876 i=`expr $i + 1`
1877 teststring=$teststring$teststring
1878 done
1879 # Only check the string length outside the loop.
1880 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1881 teststring=
1882 # Add a significant safety factor because C++ compilers can tack on
1883 # massive amounts of additional arguments before passing them to the
1884 # linker. It appears as though 1/2 is a usable value.
1885 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1886 fi
1887 ;;
1888 esac
1889])
d50284c4 1890if test -n "$lt_cv_sys_max_cmd_len"; then
8d138742
CE
1891 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1892else
1893 AC_MSG_RESULT(none)
1894fi
1895max_cmd_len=$lt_cv_sys_max_cmd_len
1896_LT_DECL([], [max_cmd_len], [0],
1897 [What is the maximum length of a command?])
1898])# LT_CMD_MAX_LEN
d9898ee8 1899
8d138742
CE
1900# Old name:
1901AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1902dnl aclocal-1.4 backwards compatibility:
1903dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
d9898ee8 1904
d9898ee8 1905
8d138742
CE
1906# _LT_HEADER_DLFCN
1907# ----------------
1908m4_defun([_LT_HEADER_DLFCN],
1909[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1910])# _LT_HEADER_DLFCN
d9898ee8 1911
d9898ee8 1912
8d138742
CE
1913# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1914# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1915# ----------------------------------------------------------------
1916m4_defun([_LT_TRY_DLOPEN_SELF],
1917[m4_require([_LT_HEADER_DLFCN])dnl
d50284c4 1918if test yes = "$cross_compiling"; then :
8d138742
CE
1919 [$4]
1920else
1921 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1922 lt_status=$lt_dlunknown
1923 cat > conftest.$ac_ext <<_LT_EOF
b0322a85 1924[#line $LINENO "configure"
8d138742 1925#include "confdefs.h"
d9898ee8 1926
8d138742
CE
1927#if HAVE_DLFCN_H
1928#include <dlfcn.h>
1929#endif
d9898ee8 1930
8d138742 1931#include <stdio.h>
d9898ee8 1932
8d138742
CE
1933#ifdef RTLD_GLOBAL
1934# define LT_DLGLOBAL RTLD_GLOBAL
1935#else
1936# ifdef DL_GLOBAL
1937# define LT_DLGLOBAL DL_GLOBAL
1938# else
1939# define LT_DLGLOBAL 0
1940# endif
1941#endif
d9898ee8 1942
8d138742
CE
1943/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1944 find out it does not work in some platform. */
1945#ifndef LT_DLLAZY_OR_NOW
1946# ifdef RTLD_LAZY
1947# define LT_DLLAZY_OR_NOW RTLD_LAZY
1948# else
1949# ifdef DL_LAZY
1950# define LT_DLLAZY_OR_NOW DL_LAZY
1951# else
1952# ifdef RTLD_NOW
1953# define LT_DLLAZY_OR_NOW RTLD_NOW
1954# else
1955# ifdef DL_NOW
1956# define LT_DLLAZY_OR_NOW DL_NOW
1957# else
1958# define LT_DLLAZY_OR_NOW 0
1959# endif
1960# endif
1961# endif
1962# endif
1963#endif
d9898ee8 1964
d50284c4 1965/* When -fvisibility=hidden is used, assume the code has been annotated
b0322a85 1966 correspondingly for the symbols needed. */
d50284c4 1967#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
b0322a85
CE
1968int fnord () __attribute__((visibility("default")));
1969#endif
1970
1971int fnord () { return 42; }
8d138742
CE
1972int main ()
1973{
1974 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1975 int status = $lt_dlunknown;
d9898ee8 1976
8d138742
CE
1977 if (self)
1978 {
1979 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
b0322a85
CE
1980 else
1981 {
1982 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1983 else puts (dlerror ());
1984 }
8d138742
CE
1985 /* dlclose (self); */
1986 }
d9898ee8 1987 else
8d138742
CE
1988 puts (dlerror ());
1989
1990 return status;
1991}]
1992_LT_EOF
d50284c4 1993 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
8d138742
CE
1994 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1995 lt_status=$?
1996 case x$lt_status in
1997 x$lt_dlno_uscore) $1 ;;
1998 x$lt_dlneed_uscore) $2 ;;
1999 x$lt_dlunknown|x*) $3 ;;
2000 esac
2001 else :
2002 # compilation failed
2003 $3
d9898ee8 2004 fi
2005fi
8d138742
CE
2006rm -fr conftest*
2007])# _LT_TRY_DLOPEN_SELF
d9898ee8 2008
d9898ee8 2009
8d138742
CE
2010# LT_SYS_DLOPEN_SELF
2011# ------------------
2012AC_DEFUN([LT_SYS_DLOPEN_SELF],
2013[m4_require([_LT_HEADER_DLFCN])dnl
d50284c4 2014if test yes != "$enable_dlopen"; then
8d138742
CE
2015 enable_dlopen=unknown
2016 enable_dlopen_self=unknown
2017 enable_dlopen_self_static=unknown
2018else
2019 lt_cv_dlopen=no
2020 lt_cv_dlopen_libs=
d9898ee8 2021
8d138742
CE
2022 case $host_os in
2023 beos*)
d50284c4 2024 lt_cv_dlopen=load_add_on
8d138742
CE
2025 lt_cv_dlopen_libs=
2026 lt_cv_dlopen_self=yes
2027 ;;
d9898ee8 2028
8d138742 2029 mingw* | pw32* | cegcc*)
d50284c4 2030 lt_cv_dlopen=LoadLibrary
8d138742
CE
2031 lt_cv_dlopen_libs=
2032 ;;
d9898ee8 2033
8d138742 2034 cygwin*)
d50284c4 2035 lt_cv_dlopen=dlopen
8d138742
CE
2036 lt_cv_dlopen_libs=
2037 ;;
d9898ee8 2038
8d138742 2039 darwin*)
d50284c4 2040 # if libdl is installed we need to link against it
8d138742 2041 AC_CHECK_LIB([dl], [dlopen],
d50284c4
CE
2042 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
2043 lt_cv_dlopen=dyld
8d138742
CE
2044 lt_cv_dlopen_libs=
2045 lt_cv_dlopen_self=yes
2046 ])
2047 ;;
d9898ee8 2048
d50284c4
CE
2049 tpf*)
2050 # Don't try to run any link tests for TPF. We know it's impossible
2051 # because TPF is a cross-compiler, and we know how we open DSOs.
2052 lt_cv_dlopen=dlopen
2053 lt_cv_dlopen_libs=
2054 lt_cv_dlopen_self=no
2055 ;;
2056
8d138742
CE
2057 *)
2058 AC_CHECK_FUNC([shl_load],
d50284c4 2059 [lt_cv_dlopen=shl_load],
8d138742 2060 [AC_CHECK_LIB([dld], [shl_load],
d50284c4 2061 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
8d138742 2062 [AC_CHECK_FUNC([dlopen],
d50284c4 2063 [lt_cv_dlopen=dlopen],
8d138742 2064 [AC_CHECK_LIB([dl], [dlopen],
d50284c4 2065 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
8d138742 2066 [AC_CHECK_LIB([svld], [dlopen],
d50284c4 2067 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
8d138742 2068 [AC_CHECK_LIB([dld], [dld_link],
d50284c4 2069 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
8d138742
CE
2070 ])
2071 ])
2072 ])
2073 ])
2074 ])
2075 ;;
2076 esac
d9898ee8 2077
d50284c4 2078 if test no = "$lt_cv_dlopen"; then
8d138742 2079 enable_dlopen=no
d50284c4
CE
2080 else
2081 enable_dlopen=yes
8d138742 2082 fi
d9898ee8 2083
8d138742
CE
2084 case $lt_cv_dlopen in
2085 dlopen)
d50284c4
CE
2086 save_CPPFLAGS=$CPPFLAGS
2087 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
d9898ee8 2088
d50284c4 2089 save_LDFLAGS=$LDFLAGS
8d138742 2090 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
d9898ee8 2091
d50284c4 2092 save_LIBS=$LIBS
8d138742 2093 LIBS="$lt_cv_dlopen_libs $LIBS"
d9898ee8 2094
8d138742
CE
2095 AC_CACHE_CHECK([whether a program can dlopen itself],
2096 lt_cv_dlopen_self, [dnl
2097 _LT_TRY_DLOPEN_SELF(
2098 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2099 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2100 ])
d9898ee8 2101
d50284c4 2102 if test yes = "$lt_cv_dlopen_self"; then
8d138742
CE
2103 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2104 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2105 lt_cv_dlopen_self_static, [dnl
2106 _LT_TRY_DLOPEN_SELF(
2107 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2108 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2109 ])
2110 fi
d9898ee8 2111
d50284c4
CE
2112 CPPFLAGS=$save_CPPFLAGS
2113 LDFLAGS=$save_LDFLAGS
2114 LIBS=$save_LIBS
8d138742
CE
2115 ;;
2116 esac
d9898ee8 2117
8d138742
CE
2118 case $lt_cv_dlopen_self in
2119 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2120 *) enable_dlopen_self=unknown ;;
2121 esac
d9898ee8 2122
8d138742
CE
2123 case $lt_cv_dlopen_self_static in
2124 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2125 *) enable_dlopen_self_static=unknown ;;
2126 esac
2127fi
2128_LT_DECL([dlopen_support], [enable_dlopen], [0],
2129 [Whether dlopen is supported])
2130_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2131 [Whether dlopen of programs is supported])
2132_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2133 [Whether dlopen of statically linked programs is supported])
2134])# LT_SYS_DLOPEN_SELF
d9898ee8 2135
8d138742
CE
2136# Old name:
2137AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2138dnl aclocal-1.4 backwards compatibility:
2139dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
d9898ee8 2140
2141
8d138742
CE
2142# _LT_COMPILER_C_O([TAGNAME])
2143# ---------------------------
2144# Check to see if options -c and -o are simultaneously supported by compiler.
2145# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2146m4_defun([_LT_COMPILER_C_O],
2147[m4_require([_LT_DECL_SED])dnl
2148m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2149m4_require([_LT_TAG_COMPILER])dnl
2150AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2151 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2152 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2153 $RM -r conftest 2>/dev/null
2154 mkdir conftest
2155 cd conftest
2156 mkdir out
2157 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
d9898ee8 2158
8d138742
CE
2159 lt_compiler_flag="-o out/conftest2.$ac_objext"
2160 # Insert the option either (1) after the last *FLAGS variable, or
2161 # (2) before a word containing "conftest.", or (3) at the end.
2162 # Note that $ac_compile itself does not contain backslashes and begins
2163 # with a dollar sign (not a hyphen), so the echo should work correctly.
2164 lt_compile=`echo "$ac_compile" | $SED \
2165 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2166 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2167 -e 's:$: $lt_compiler_flag:'`
b0322a85 2168 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
2169 (eval "$lt_compile" 2>out/conftest.err)
2170 ac_status=$?
2171 cat out/conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 2172 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8d138742
CE
2173 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2174 then
2175 # The compiler can only warn and ignore the option if not recognized
2176 # So say no if there are warnings
b0322a85 2177 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8d138742
CE
2178 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2179 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2180 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2181 fi
2182 fi
2183 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2184 $RM conftest*
2185 # SGI C++ compiler will create directory out/ii_files/ for
2186 # template instantiation
2187 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2188 $RM out/* && rmdir out
2189 cd ..
2190 $RM -r conftest
2191 $RM conftest*
2192])
2193_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2194 [Does compiler simultaneously support -c and -o options?])
2195])# _LT_COMPILER_C_O
d9898ee8 2196
d9898ee8 2197
8d138742
CE
2198# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2199# ----------------------------------
2200# Check to see if we can do hard links to lock some files if needed
2201m4_defun([_LT_COMPILER_FILE_LOCKS],
2202[m4_require([_LT_ENABLE_LOCK])dnl
2203m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2204_LT_COMPILER_C_O([$1])
d9898ee8 2205
d50284c4
CE
2206hard_links=nottested
2207if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
8d138742
CE
2208 # do not overwrite the value of need_locks provided by the user
2209 AC_MSG_CHECKING([if we can lock with hard links])
2210 hard_links=yes
2211 $RM conftest*
2212 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2213 touch conftest.a
2214 ln conftest.a conftest.b 2>&5 || hard_links=no
2215 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2216 AC_MSG_RESULT([$hard_links])
d50284c4
CE
2217 if test no = "$hard_links"; then
2218 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
8d138742
CE
2219 need_locks=warn
2220 fi
2221else
2222 need_locks=no
d9898ee8 2223fi
8d138742
CE
2224_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2225])# _LT_COMPILER_FILE_LOCKS
d9898ee8 2226
2227
8d138742
CE
2228# _LT_CHECK_OBJDIR
2229# ----------------
2230m4_defun([_LT_CHECK_OBJDIR],
2231[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2232[rm -f .libs 2>/dev/null
2233mkdir .libs 2>/dev/null
2234if test -d .libs; then
2235 lt_cv_objdir=.libs
d9898ee8 2236else
8d138742
CE
2237 # MS-DOS does not allow filenames that begin with a dot.
2238 lt_cv_objdir=_libs
d9898ee8 2239fi
8d138742
CE
2240rmdir .libs 2>/dev/null])
2241objdir=$lt_cv_objdir
2242_LT_DECL([], [objdir], [0],
2243 [The name of the directory that contains temporary libtool files])dnl
2244m4_pattern_allow([LT_OBJDIR])dnl
d50284c4
CE
2245AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2246 [Define to the sub-directory where libtool stores uninstalled libraries.])
8d138742
CE
2247])# _LT_CHECK_OBJDIR
2248
2249
2250# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2251# --------------------------------------
2252# Check hardcoding attributes.
2253m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2254[AC_MSG_CHECKING([how to hardcode library paths into programs])
2255_LT_TAGVAR(hardcode_action, $1)=
2256if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2257 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
d50284c4 2258 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
8d138742
CE
2259
2260 # We can hardcode non-existent directories.
d50284c4 2261 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
8d138742
CE
2262 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2263 # have to relink, otherwise we might link with an installed library
2264 # when we should be linking with a yet-to-be-installed one
d50284c4
CE
2265 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2266 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
8d138742
CE
2267 # Linking always hardcodes the temporary library directory.
2268 _LT_TAGVAR(hardcode_action, $1)=relink
2269 else
2270 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2271 _LT_TAGVAR(hardcode_action, $1)=immediate
2272 fi
d9898ee8 2273else
8d138742
CE
2274 # We cannot hardcode anything, or else we can only hardcode existing
2275 # directories.
2276 _LT_TAGVAR(hardcode_action, $1)=unsupported
d9898ee8 2277fi
8d138742 2278AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
d9898ee8 2279
d50284c4
CE
2280if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2281 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
8d138742
CE
2282 # Fast installation is not supported
2283 enable_fast_install=no
d50284c4
CE
2284elif test yes = "$shlibpath_overrides_runpath" ||
2285 test no = "$enable_shared"; then
8d138742
CE
2286 # Fast installation is not necessary
2287 enable_fast_install=needless
2288fi
2289_LT_TAGDECL([], [hardcode_action], [0],
2290 [How to hardcode a shared library path into an executable])
2291])# _LT_LINKER_HARDCODE_LIBPATH
d9898ee8 2292
2293
8d138742
CE
2294# _LT_CMD_STRIPLIB
2295# ----------------
2296m4_defun([_LT_CMD_STRIPLIB],
2297[m4_require([_LT_DECL_EGREP])
2298striplib=
2299old_striplib=
2300AC_MSG_CHECKING([whether stripping libraries is possible])
2301if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2302 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2303 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2304 AC_MSG_RESULT([yes])
2305else
2306# FIXME - insert some real tests, host_os isn't really good enough
2307 case $host_os in
d9898ee8 2308 darwin*)
d50284c4 2309 if test -n "$STRIP"; then
8d138742
CE
2310 striplib="$STRIP -x"
2311 old_striplib="$STRIP -S"
2312 AC_MSG_RESULT([yes])
d9898ee8 2313 else
8d138742 2314 AC_MSG_RESULT([no])
d9898ee8 2315 fi
2316 ;;
8d138742
CE
2317 *)
2318 AC_MSG_RESULT([no])
2319 ;;
2320 esac
2321fi
2322_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2323_LT_DECL([], [striplib], [1])
2324])# _LT_CMD_STRIPLIB
d9898ee8 2325
2326
d50284c4
CE
2327# _LT_PREPARE_MUNGE_PATH_LIST
2328# ---------------------------
2329# Make sure func_munge_path_list() is defined correctly.
2330m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2331[[# func_munge_path_list VARIABLE PATH
2332# -----------------------------------
2333# VARIABLE is name of variable containing _space_ separated list of
2334# directories to be munged by the contents of PATH, which is string
2335# having a format:
2336# "DIR[:DIR]:"
2337# string "DIR[ DIR]" will be prepended to VARIABLE
2338# ":DIR[:DIR]"
2339# string "DIR[ DIR]" will be appended to VARIABLE
2340# "DIRP[:DIRP]::[DIRA:]DIRA"
2341# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2342# "DIRA[ DIRA]" will be appended to VARIABLE
2343# "DIR[:DIR]"
2344# VARIABLE will be replaced by "DIR[ DIR]"
2345func_munge_path_list ()
2346{
2347 case x@S|@2 in
2348 x)
2349 ;;
2350 *:)
2351 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2352 ;;
2353 x:*)
2354 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2355 ;;
2356 *::*)
2357 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2358 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2359 ;;
2360 *)
2361 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2362 ;;
2363 esac
2364}
2365]])# _LT_PREPARE_PATH_LIST
2366
2367
8d138742
CE
2368# _LT_SYS_DYNAMIC_LINKER([TAG])
2369# -----------------------------
2370# PORTME Fill in your ld.so characteristics
2371m4_defun([_LT_SYS_DYNAMIC_LINKER],
2372[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2373m4_require([_LT_DECL_EGREP])dnl
2374m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2375m4_require([_LT_DECL_OBJDUMP])dnl
2376m4_require([_LT_DECL_SED])dnl
b0322a85 2377m4_require([_LT_CHECK_SHELL_FEATURES])dnl
d50284c4 2378m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
8d138742
CE
2379AC_MSG_CHECKING([dynamic linker characteristics])
2380m4_if([$1],
2381 [], [
d50284c4 2382if test yes = "$GCC"; then
8d138742 2383 case $host_os in
d50284c4
CE
2384 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2385 *) lt_awk_arg='/^libraries:/' ;;
8d138742 2386 esac
b0322a85 2387 case $host_os in
d50284c4
CE
2388 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2389 *) lt_sed_strip_eq='s|=/|/|g' ;;
b0322a85
CE
2390 esac
2391 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2392 case $lt_search_path_spec in
2393 *\;*)
8d138742
CE
2394 # if the path contains ";" then we assume it to be the separator
2395 # otherwise default to the standard path separator (i.e. ":") - it is
2396 # assumed that no part of a normal pathname contains ";" but that should
2397 # okay in the real world where ";" in dirpaths is itself problematic.
b0322a85
CE
2398 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2399 ;;
2400 *)
2401 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2402 ;;
2403 esac
8d138742 2404 # Ok, now we have the path, separated by spaces, we can step through it
d50284c4 2405 # and add multilib dir if necessary...
8d138742 2406 lt_tmp_lt_search_path_spec=
d50284c4
CE
2407 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2408 # ...but if some path component already ends with the multilib dir we assume
2409 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2410 case "$lt_multi_os_dir; $lt_search_path_spec " in
2411 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2412 lt_multi_os_dir=
2413 ;;
2414 esac
8d138742 2415 for lt_sys_path in $lt_search_path_spec; do
d50284c4
CE
2416 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2417 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2418 elif test -n "$lt_multi_os_dir"; then
8d138742
CE
2419 test -d "$lt_sys_path" && \
2420 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2421 fi
2422 done
b0322a85 2423 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
d50284c4
CE
2424BEGIN {RS = " "; FS = "/|\n";} {
2425 lt_foo = "";
2426 lt_count = 0;
8d138742
CE
2427 for (lt_i = NF; lt_i > 0; lt_i--) {
2428 if ($lt_i != "" && $lt_i != ".") {
2429 if ($lt_i == "..") {
2430 lt_count++;
2431 } else {
2432 if (lt_count == 0) {
d50284c4 2433 lt_foo = "/" $lt_i lt_foo;
8d138742
CE
2434 } else {
2435 lt_count--;
2436 }
2437 }
2438 }
2439 }
2440 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2441 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2442}'`
b0322a85
CE
2443 # AWK program above erroneously prepends '/' to C:/dos/paths
2444 # for these hosts.
2445 case $host_os in
2446 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
d50284c4 2447 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
b0322a85
CE
2448 esac
2449 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
8d138742
CE
2450else
2451 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2452fi])
2453library_names_spec=
2454libname_spec='lib$name'
2455soname_spec=
d50284c4 2456shrext_cmds=.so
8d138742
CE
2457postinstall_cmds=
2458postuninstall_cmds=
2459finish_cmds=
2460finish_eval=
2461shlibpath_var=
2462shlibpath_overrides_runpath=unknown
2463version_type=none
2464dynamic_linker="$host_os ld.so"
2465sys_lib_dlsearch_path_spec="/lib /usr/lib"
2466need_lib_prefix=unknown
2467hardcode_into_libs=no
2468
2469# when you set need_version to no, make sure it does not cause -set_version
2470# flags to be left without arguments
2471need_version=unknown
d9898ee8 2472
d50284c4
CE
2473AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2474[User-defined run-time library search path.])
2475
d9898ee8 2476case $host_os in
8d138742 2477aix3*)
b0322a85 2478 version_type=linux # correct to gnu/linux during the next big refactor
d50284c4 2479 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
8d138742 2480 shlibpath_var=LIBPATH
d9898ee8 2481
8d138742 2482 # AIX 3 has no versioning support, so we append a major version to the name.
d50284c4 2483 soname_spec='$libname$release$shared_ext$major'
d9898ee8 2484 ;;
2485
8d138742 2486aix[[4-9]]*)
b0322a85 2487 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2488 need_lib_prefix=no
2489 need_version=no
2490 hardcode_into_libs=yes
d50284c4 2491 if test ia64 = "$host_cpu"; then
8d138742 2492 # AIX 5 supports IA64
d50284c4 2493 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
8d138742 2494 shlibpath_var=LD_LIBRARY_PATH
ac40fd9e 2495 else
8d138742
CE
2496 # With GCC up to 2.95.x, collect2 would create an import file
2497 # for dependence libraries. The import file would start with
d50284c4
CE
2498 # the line '#! .'. This would cause the generated library to
2499 # depend on '.', always an invalid library. This was fixed in
8d138742
CE
2500 # development snapshots of GCC prior to 3.0.
2501 case $host_os in
2502 aix4 | aix4.[[01]] | aix4.[[01]].*)
2503 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2504 echo ' yes '
d50284c4 2505 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
8d138742
CE
2506 :
2507 else
2508 can_build_shared=no
2509 fi
d9898ee8 2510 ;;
2511 esac
d50284c4
CE
2512 # Using Import Files as archive members, it is possible to support
2513 # filename-based versioning of shared library archives on AIX. While
2514 # this would work for both with and without runtime linking, it will
2515 # prevent static linking of such archives. So we do filename-based
2516 # shared library versioning with .so extension only, which is used
2517 # when both runtime linking and shared linking is enabled.
2518 # Unfortunately, runtime linking may impact performance, so we do
2519 # not want this to be the default eventually. Also, we use the
2520 # versioned .so libs for executables only if there is the -brtl
2521 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2522 # To allow for filename-based versioning support, we need to create
2523 # libNAME.so.V as an archive file, containing:
2524 # *) an Import File, referring to the versioned filename of the
2525 # archive as well as the shared archive member, telling the
2526 # bitwidth (32 or 64) of that shared object, and providing the
2527 # list of exported symbols of that shared object, eventually
2528 # decorated with the 'weak' keyword
2529 # *) the shared object with the F_LOADONLY flag set, to really avoid
2530 # it being seen by the linker.
2531 # At run time we better use the real file rather than another symlink,
2532 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2533
2534 case $with_aix_soname,$aix_use_runtimelinking in
2535 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
8d138742
CE
2536 # soname into executable. Probably we can add versioning support to
2537 # collect2, so additional links can be useful in future.
d50284c4
CE
2538 aix,yes) # traditional libtool
2539 dynamic_linker='AIX unversionable lib.so'
8d138742
CE
2540 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2541 # instead of lib<name>.a to let people know that these are not
2542 # typical AIX shared libraries.
d50284c4
CE
2543 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2544 ;;
2545 aix,no) # traditional AIX only
2546 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
8d138742
CE
2547 # We preserve .a as extension for shared libraries through AIX4.2
2548 # and later when we are not doing run time linking.
d50284c4
CE
2549 library_names_spec='$libname$release.a $libname.a'
2550 soname_spec='$libname$release$shared_ext$major'
2551 ;;
2552 svr4,*) # full svr4 only
2553 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2554 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2555 # We do not specify a path in Import Files, so LIBPATH fires.
2556 shlibpath_overrides_runpath=yes
2557 ;;
2558 *,yes) # both, prefer svr4
2559 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2560 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2561 # unpreferred sharedlib libNAME.a needs extra handling
2562 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2563 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2564 # We do not specify a path in Import Files, so LIBPATH fires.
2565 shlibpath_overrides_runpath=yes
2566 ;;
2567 *,no) # both, prefer aix
2568 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2569 library_names_spec='$libname$release.a $libname.a'
2570 soname_spec='$libname$release$shared_ext$major'
2571 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2572 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2573 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2574 ;;
2575 esac
8d138742 2576 shlibpath_var=LIBPATH
d9898ee8 2577 fi
2578 ;;
2579
8d138742 2580amigaos*)
d9898ee8 2581 case $host_cpu in
8d138742
CE
2582 powerpc)
2583 # Since July 2007 AmigaOS4 officially supports .so libraries.
2584 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
d50284c4 2585 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
d9898ee8 2586 ;;
8d138742
CE
2587 m68k)
2588 library_names_spec='$libname.ixlibrary $libname.a'
2589 # Create ${libname}_ixlibrary.a entries in /sys/libs.
d50284c4 2590 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
d9898ee8 2591 ;;
2592 esac
2593 ;;
2594
8d138742 2595beos*)
d50284c4 2596 library_names_spec='$libname$shared_ext'
8d138742
CE
2597 dynamic_linker="$host_os ld.so"
2598 shlibpath_var=LIBRARY_PATH
d9898ee8 2599 ;;
2600
8d138742 2601bsdi[[45]]*)
b0322a85 2602 version_type=linux # correct to gnu/linux during the next big refactor
8d138742 2603 need_version=no
d50284c4
CE
2604 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2605 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2606 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2607 shlibpath_var=LD_LIBRARY_PATH
2608 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2609 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2610 # the default ld.so.conf also contains /usr/contrib/lib and
2611 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2612 # libtool to hard-code these into programs
d9898ee8 2613 ;;
2614
8d138742
CE
2615cygwin* | mingw* | pw32* | cegcc*)
2616 version_type=windows
d50284c4 2617 shrext_cmds=.dll
8d138742
CE
2618 need_version=no
2619 need_lib_prefix=no
d9898ee8 2620
b0322a85
CE
2621 case $GCC,$cc_basename in
2622 yes,*)
2623 # gcc
8d138742
CE
2624 library_names_spec='$libname.dll.a'
2625 # DLL is installed to $(libdir)/../bin by postinstall_cmds
d50284c4
CE
2626 postinstall_cmds='base_file=`basename \$file`~
2627 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
8d138742
CE
2628 dldir=$destdir/`dirname \$dlpath`~
2629 test -d \$dldir || mkdir -p \$dldir~
2630 $install_prog $dir/$dlname \$dldir/$dlname~
2631 chmod a+x \$dldir/$dlname~
2632 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2633 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2634 fi'
2635 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2636 dlpath=$dir/\$dldll~
2637 $RM \$dlpath'
2638 shlibpath_overrides_runpath=yes
d9898ee8 2639
8d138742
CE
2640 case $host_os in
2641 cygwin*)
2642 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
d50284c4 2643 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
b0322a85
CE
2644m4_if([$1], [],[
2645 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
8d138742
CE
2646 ;;
2647 mingw* | cegcc*)
2648 # MinGW DLLs use traditional 'lib' prefix
d50284c4 2649 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
8d138742
CE
2650 ;;
2651 pw32*)
2652 # pw32 DLLs use 'pw' prefix rather than 'lib'
d50284c4 2653 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
8d138742
CE
2654 ;;
2655 esac
b0322a85
CE
2656 dynamic_linker='Win32 ld.exe'
2657 ;;
2658
2659 *,cl*)
2660 # Native MSVC
2661 libname_spec='$name'
d50284c4
CE
2662 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2663 library_names_spec='$libname.dll.lib'
b0322a85
CE
2664
2665 case $build_os in
2666 mingw*)
2667 sys_lib_search_path_spec=
2668 lt_save_ifs=$IFS
2669 IFS=';'
2670 for lt_path in $LIB
2671 do
2672 IFS=$lt_save_ifs
2673 # Let DOS variable expansion print the short 8.3 style file name.
2674 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2675 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2676 done
2677 IFS=$lt_save_ifs
2678 # Convert to MSYS style.
2679 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2680 ;;
2681 cygwin*)
2682 # Convert to unix form, then to dos form, then back to unix form
2683 # but this time dos style (no spaces!) so that the unix form looks
2684 # like /cygdrive/c/PROGRA~1:/cygdr...
2685 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2686 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2687 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2688 ;;
2689 *)
d50284c4 2690 sys_lib_search_path_spec=$LIB
b0322a85
CE
2691 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2692 # It is most probably a Windows format PATH.
2693 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2694 else
2695 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2696 fi
2697 # FIXME: find the short name or the path components, as spaces are
2698 # common. (e.g. "Program Files" -> "PROGRA~1")
2699 ;;
2700 esac
2701
2702 # DLL is installed to $(libdir)/../bin by postinstall_cmds
d50284c4
CE
2703 postinstall_cmds='base_file=`basename \$file`~
2704 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
b0322a85
CE
2705 dldir=$destdir/`dirname \$dlpath`~
2706 test -d \$dldir || mkdir -p \$dldir~
2707 $install_prog $dir/$dlname \$dldir/$dlname'
2708 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2709 dlpath=$dir/\$dldll~
2710 $RM \$dlpath'
2711 shlibpath_overrides_runpath=yes
2712 dynamic_linker='Win32 link.exe'
8d138742 2713 ;;
d9898ee8 2714
8d138742 2715 *)
b0322a85 2716 # Assume MSVC wrapper
d50284c4 2717 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
b0322a85 2718 dynamic_linker='Win32 ld.exe'
8d138742
CE
2719 ;;
2720 esac
8d138742
CE
2721 # FIXME: first we should search . and the directory the executable is in
2722 shlibpath_var=PATH
d9898ee8 2723 ;;
2724
8d138742
CE
2725darwin* | rhapsody*)
2726 dynamic_linker="$host_os dyld"
2727 version_type=darwin
2728 need_lib_prefix=no
2729 need_version=no
d50284c4
CE
2730 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2731 soname_spec='$libname$release$major$shared_ext'
8d138742
CE
2732 shlibpath_overrides_runpath=yes
2733 shlibpath_var=DYLD_LIBRARY_PATH
2734 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2735m4_if([$1], [],[
2736 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2737 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
d9898ee8 2738 ;;
2739
8d138742 2740dgux*)
b0322a85 2741 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2742 need_lib_prefix=no
2743 need_version=no
d50284c4
CE
2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2745 soname_spec='$libname$release$shared_ext$major'
8d138742 2746 shlibpath_var=LD_LIBRARY_PATH
ac40fd9e 2747 ;;
2748
8d138742
CE
2749freebsd* | dragonfly*)
2750 # DragonFly does not have aout. When/if they implement a new
2751 # versioning mechanism, adjust this.
2752 if test -x /usr/bin/objformat; then
2753 objformat=`/usr/bin/objformat`
2754 else
2755 case $host_os in
b0322a85 2756 freebsd[[23]].*) objformat=aout ;;
8d138742
CE
2757 *) objformat=elf ;;
2758 esac
2759 fi
2760 version_type=freebsd-$objformat
2761 case $version_type in
2762 freebsd-elf*)
d50284c4
CE
2763 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2764 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2765 need_version=no
2766 need_lib_prefix=no
2767 ;;
2768 freebsd-*)
d50284c4 2769 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
8d138742
CE
2770 need_version=yes
2771 ;;
2772 esac
2773 shlibpath_var=LD_LIBRARY_PATH
2774 case $host_os in
b0322a85 2775 freebsd2.*)
8d138742 2776 shlibpath_overrides_runpath=yes
d9898ee8 2777 ;;
8d138742
CE
2778 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2779 shlibpath_overrides_runpath=yes
2780 hardcode_into_libs=yes
d9898ee8 2781 ;;
8d138742
CE
2782 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2783 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2784 shlibpath_overrides_runpath=no
2785 hardcode_into_libs=yes
d9898ee8 2786 ;;
8d138742
CE
2787 *) # from 4.6 on, and DragonFly
2788 shlibpath_overrides_runpath=yes
2789 hardcode_into_libs=yes
d9898ee8 2790 ;;
2791 esac
2792 ;;
2793
b0322a85
CE
2794haiku*)
2795 version_type=linux # correct to gnu/linux during the next big refactor
2796 need_lib_prefix=no
2797 need_version=no
2798 dynamic_linker="$host_os runtime_loader"
d50284c4
CE
2799 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2800 soname_spec='$libname$release$shared_ext$major'
b0322a85 2801 shlibpath_var=LIBRARY_PATH
d50284c4 2802 shlibpath_overrides_runpath=no
b0322a85 2803 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
8d138742 2804 hardcode_into_libs=yes
d9898ee8 2805 ;;
d9898ee8 2806
8d138742
CE
2807hpux9* | hpux10* | hpux11*)
2808 # Give a soname corresponding to the major version so that dld.sl refuses to
2809 # link against other versions.
2810 version_type=sunos
2811 need_lib_prefix=no
2812 need_version=no
2813 case $host_cpu in
2814 ia64*)
2815 shrext_cmds='.so'
2816 hardcode_into_libs=yes
2817 dynamic_linker="$host_os dld.so"
2818 shlibpath_var=LD_LIBRARY_PATH
2819 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
d50284c4
CE
2820 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2821 soname_spec='$libname$release$shared_ext$major'
2822 if test 32 = "$HPUX_IA64_MODE"; then
8d138742 2823 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
d50284c4 2824 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
8d138742
CE
2825 else
2826 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
d50284c4 2827 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
8d138742 2828 fi
8d138742
CE
2829 ;;
2830 hppa*64*)
2831 shrext_cmds='.sl'
2832 hardcode_into_libs=yes
2833 dynamic_linker="$host_os dld.sl"
2834 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2835 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
d50284c4
CE
2836 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2837 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2838 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2839 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2840 ;;
2841 *)
2842 shrext_cmds='.sl'
2843 dynamic_linker="$host_os dld.sl"
2844 shlibpath_var=SHLIB_PATH
2845 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
d50284c4
CE
2846 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2847 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2848 ;;
2849 esac
b0322a85 2850 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
8d138742 2851 postinstall_cmds='chmod 555 $lib'
b0322a85
CE
2852 # or fails outright, so override atomically:
2853 install_override_mode=555
d9898ee8 2854 ;;
d9898ee8 2855
8d138742 2856interix[[3-9]]*)
b0322a85 2857 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2858 need_lib_prefix=no
2859 need_version=no
d50284c4
CE
2860 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2861 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2862 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2863 shlibpath_var=LD_LIBRARY_PATH
2864 shlibpath_overrides_runpath=no
2865 hardcode_into_libs=yes
2866 ;;
d9898ee8 2867
8d138742
CE
2868irix5* | irix6* | nonstopux*)
2869 case $host_os in
2870 nonstopux*) version_type=nonstopux ;;
2871 *)
d50284c4 2872 if test yes = "$lt_cv_prog_gnu_ld"; then
b0322a85 2873 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2874 else
2875 version_type=irix
2876 fi ;;
2877 esac
2878 need_lib_prefix=no
2879 need_version=no
d50284c4
CE
2880 soname_spec='$libname$release$shared_ext$major'
2881 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
8d138742
CE
2882 case $host_os in
2883 irix5* | nonstopux*)
2884 libsuff= shlibsuff=
2885 ;;
2886 *)
2887 case $LD in # libtool.m4 will add one of these switches to LD
2888 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2889 libsuff= shlibsuff= libmagic=32-bit;;
2890 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2891 libsuff=32 shlibsuff=N32 libmagic=N32;;
2892 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2893 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2894 *) libsuff= shlibsuff= libmagic=never-match;;
2895 esac
2896 ;;
d9898ee8 2897 esac
8d138742
CE
2898 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2899 shlibpath_overrides_runpath=no
d50284c4
CE
2900 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2901 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
8d138742
CE
2902 hardcode_into_libs=yes
2903 ;;
d9898ee8 2904
8d138742
CE
2905# No shared lib support for Linux oldld, aout, or coff.
2906linux*oldld* | linux*aout* | linux*coff*)
2907 dynamic_linker=no
2908 ;;
d9898ee8 2909
d50284c4
CE
2910linux*android*)
2911 version_type=none # Android doesn't support versioned libraries.
2912 need_lib_prefix=no
2913 need_version=no
2914 library_names_spec='$libname$release$shared_ext'
2915 soname_spec='$libname$release$shared_ext'
2916 finish_cmds=
2917 shlibpath_var=LD_LIBRARY_PATH
2918 shlibpath_overrides_runpath=yes
2919
2920 # This implies no fast_install, which is unacceptable.
2921 # Some rework will be needed to allow for fast_install
2922 # before this can be enabled.
2923 hardcode_into_libs=yes
2924
2925 dynamic_linker='Android linker'
2926 # Don't embed -rpath directories since the linker doesn't support them.
2927 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2928 ;;
2929
b0322a85 2930# This must be glibc/ELF.
d50284c4 2931linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
b0322a85 2932 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2933 need_lib_prefix=no
2934 need_version=no
d50284c4
CE
2935 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2936 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2937 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2938 shlibpath_var=LD_LIBRARY_PATH
2939 shlibpath_overrides_runpath=no
b0322a85 2940
8d138742 2941 # Some binutils ld are patched to set DT_RUNPATH
b0322a85
CE
2942 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2943 [lt_cv_shlibpath_overrides_runpath=no
2944 save_LDFLAGS=$LDFLAGS
2945 save_libdir=$libdir
2946 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2947 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2948 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2949 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2950 [lt_cv_shlibpath_overrides_runpath=yes])])
2951 LDFLAGS=$save_LDFLAGS
2952 libdir=$save_libdir
2953 ])
2954 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
d9898ee8 2955
8d138742
CE
2956 # This implies no fast_install, which is unacceptable.
2957 # Some rework will be needed to allow for fast_install
2958 # before this can be enabled.
2959 hardcode_into_libs=yes
d9898ee8 2960
8d138742
CE
2961 # Add ABI-specific directories to the system library path.
2962 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
d9898ee8 2963
d50284c4
CE
2964 # Ideally, we could use ldconfig to report *all* directores which are
2965 # searched for libraries, however this is still not possible. Aside from not
2966 # being certain /sbin/ldconfig is available, command
2967 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2968 # even though it is searched at run-time. Try to do the best guess by
2969 # appending ld.so.conf contents (and includes) to the search path.
8d138742 2970 if test -f /etc/ld.so.conf; then
b0322a85 2971 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' ' '`
8d138742
CE
2972 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2973 fi
d9898ee8 2974
8d138742
CE
2975 # We used to test for /lib/ld.so.1 and disable shared libraries on
2976 # powerpc, because MkLinux only supported shared libraries with the
2977 # GNU dynamic linker. Since this was broken with cross compilers,
2978 # most powerpc-linux boxes support dynamic linking these days and
2979 # people can always --disable-shared, the test was removed, and we
2980 # assume the GNU/Linux dynamic linker is in use.
2981 dynamic_linker='GNU/Linux ld.so'
2982 ;;
d9898ee8 2983
8d138742
CE
2984netbsd*)
2985 version_type=sunos
2986 need_lib_prefix=no
2987 need_version=no
2988 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
d50284c4 2989 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
8d138742
CE
2990 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2991 dynamic_linker='NetBSD (a.out) ld.so'
2992 else
d50284c4
CE
2993 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2994 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
2995 dynamic_linker='NetBSD ld.elf_so'
2996 fi
2997 shlibpath_var=LD_LIBRARY_PATH
2998 shlibpath_overrides_runpath=yes
2999 hardcode_into_libs=yes
3000 ;;
d9898ee8 3001
8d138742 3002newsos6)
b0322a85 3003 version_type=linux # correct to gnu/linux during the next big refactor
d50284c4 3004 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
8d138742
CE
3005 shlibpath_var=LD_LIBRARY_PATH
3006 shlibpath_overrides_runpath=yes
3007 ;;
d9898ee8 3008
8d138742
CE
3009*nto* | *qnx*)
3010 version_type=qnx
3011 need_lib_prefix=no
3012 need_version=no
d50284c4
CE
3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3014 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
3015 shlibpath_var=LD_LIBRARY_PATH
3016 shlibpath_overrides_runpath=no
3017 hardcode_into_libs=yes
3018 dynamic_linker='ldqnx.so'
3019 ;;
d9898ee8 3020
d50284c4 3021openbsd* | bitrig*)
8d138742 3022 version_type=sunos
d50284c4 3023 sys_lib_dlsearch_path_spec=/usr/lib
8d138742 3024 need_lib_prefix=no
d50284c4
CE
3025 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3026 need_version=no
8d138742 3027 else
d50284c4 3028 need_version=yes
8d138742 3029 fi
d50284c4
CE
3030 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3031 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3032 shlibpath_var=LD_LIBRARY_PATH
3033 shlibpath_overrides_runpath=yes
8d138742 3034 ;;
d9898ee8 3035
8d138742
CE
3036os2*)
3037 libname_spec='$name'
d50284c4
CE
3038 version_type=windows
3039 shrext_cmds=.dll
3040 need_version=no
8d138742 3041 need_lib_prefix=no
d50284c4
CE
3042 # OS/2 can only load a DLL with a base name of 8 characters or less.
3043 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
3044 v=$($ECHO $release$versuffix | tr -d .-);
3045 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
3046 $ECHO $n$v`$shared_ext'
3047 library_names_spec='${libname}_dll.$libext'
8d138742 3048 dynamic_linker='OS/2 ld.exe'
d50284c4
CE
3049 shlibpath_var=BEGINLIBPATH
3050 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3051 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3052 postinstall_cmds='base_file=`basename \$file`~
3053 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
3054 dldir=$destdir/`dirname \$dlpath`~
3055 test -d \$dldir || mkdir -p \$dldir~
3056 $install_prog $dir/$dlname \$dldir/$dlname~
3057 chmod a+x \$dldir/$dlname~
3058 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3059 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3060 fi'
3061 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3062 dlpath=$dir/\$dldll~
3063 $RM \$dlpath'
8d138742 3064 ;;
d9898ee8 3065
8d138742
CE
3066osf3* | osf4* | osf5*)
3067 version_type=osf
3068 need_lib_prefix=no
3069 need_version=no
d50284c4
CE
3070 soname_spec='$libname$release$shared_ext$major'
3071 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
8d138742
CE
3072 shlibpath_var=LD_LIBRARY_PATH
3073 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
d50284c4 3074 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
8d138742 3075 ;;
d9898ee8 3076
8d138742
CE
3077rdos*)
3078 dynamic_linker=no
3079 ;;
d9898ee8 3080
8d138742 3081solaris*)
b0322a85 3082 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
3083 need_lib_prefix=no
3084 need_version=no
d50284c4
CE
3085 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3086 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
3087 shlibpath_var=LD_LIBRARY_PATH
3088 shlibpath_overrides_runpath=yes
3089 hardcode_into_libs=yes
3090 # ldd complains unless libraries are executable
3091 postinstall_cmds='chmod +x $lib'
3092 ;;
d9898ee8 3093
8d138742
CE
3094sunos4*)
3095 version_type=sunos
d50284c4 3096 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
8d138742
CE
3097 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3098 shlibpath_var=LD_LIBRARY_PATH
3099 shlibpath_overrides_runpath=yes
d50284c4 3100 if test yes = "$with_gnu_ld"; then
8d138742
CE
3101 need_lib_prefix=no
3102 fi
3103 need_version=yes
3104 ;;
d9898ee8 3105
8d138742 3106sysv4 | sysv4.3*)
b0322a85 3107 version_type=linux # correct to gnu/linux during the next big refactor
d50284c4
CE
3108 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3109 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
3110 shlibpath_var=LD_LIBRARY_PATH
3111 case $host_vendor in
3112 sni)
3113 shlibpath_overrides_runpath=no
3114 need_lib_prefix=no
3115 runpath_var=LD_RUN_PATH
3116 ;;
3117 siemens)
3118 need_lib_prefix=no
3119 ;;
3120 motorola)
3121 need_lib_prefix=no
3122 need_version=no
3123 shlibpath_overrides_runpath=no
3124 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3125 ;;
3126 esac
3127 ;;
d9898ee8 3128
8d138742 3129sysv4*MP*)
d50284c4 3130 if test -d /usr/nec; then
b0322a85 3131 version_type=linux # correct to gnu/linux during the next big refactor
d50284c4
CE
3132 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3133 soname_spec='$libname$shared_ext.$major'
8d138742 3134 shlibpath_var=LD_LIBRARY_PATH
d9898ee8 3135 fi
3136 ;;
3137
8d138742 3138sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
d50284c4 3139 version_type=sco
8d138742
CE
3140 need_lib_prefix=no
3141 need_version=no
d50284c4
CE
3142 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3143 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
3144 shlibpath_var=LD_LIBRARY_PATH
3145 shlibpath_overrides_runpath=yes
3146 hardcode_into_libs=yes
d50284c4 3147 if test yes = "$with_gnu_ld"; then
8d138742
CE
3148 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3149 else
3150 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3151 case $host_os in
3152 sco3.2v5*)
3153 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3154 ;;
3155 esac
d9898ee8 3156 fi
8d138742
CE
3157 sys_lib_dlsearch_path_spec='/usr/lib'
3158 ;;
d9898ee8 3159
8d138742
CE
3160tpf*)
3161 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
b0322a85 3162 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
3163 need_lib_prefix=no
3164 need_version=no
d50284c4 3165 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
8d138742
CE
3166 shlibpath_var=LD_LIBRARY_PATH
3167 shlibpath_overrides_runpath=no
3168 hardcode_into_libs=yes
3169 ;;
d9898ee8 3170
8d138742 3171uts4*)
b0322a85 3172 version_type=linux # correct to gnu/linux during the next big refactor
d50284c4
CE
3173 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3174 soname_spec='$libname$release$shared_ext$major'
8d138742
CE
3175 shlibpath_var=LD_LIBRARY_PATH
3176 ;;
d9898ee8 3177
8d138742
CE
3178*)
3179 dynamic_linker=no
3180 ;;
3181esac
3182AC_MSG_RESULT([$dynamic_linker])
d50284c4 3183test no = "$dynamic_linker" && can_build_shared=no
d9898ee8 3184
8d138742 3185variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
d50284c4 3186if test yes = "$GCC"; then
8d138742
CE
3187 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3188fi
d9898ee8 3189
d50284c4
CE
3190if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3191 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
8d138742 3192fi
d50284c4
CE
3193
3194if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3195 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
8d138742 3196fi
d9898ee8 3197
d50284c4
CE
3198# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3199configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3200
3201# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3202func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3203
3204# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3205configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3206
8d138742
CE
3207_LT_DECL([], [variables_saved_for_relink], [1],
3208 [Variables whose values should be saved in libtool wrapper scripts and
3209 restored at link time])
3210_LT_DECL([], [need_lib_prefix], [0],
3211 [Do we need the "lib" prefix for modules?])
3212_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3213_LT_DECL([], [version_type], [0], [Library versioning type])
3214_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3215_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3216_LT_DECL([], [shlibpath_overrides_runpath], [0],
3217 [Is shlibpath searched before the hard-coded library search path?])
3218_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3219_LT_DECL([], [library_names_spec], [1],
3220 [[List of archive names. First name is the real one, the rest are links.
3221 The last name is the one that the linker finds with -lNAME]])
3222_LT_DECL([], [soname_spec], [1],
3223 [[The coded name of the library, if different from the real name]])
b0322a85
CE
3224_LT_DECL([], [install_override_mode], [1],
3225 [Permission mode override for installation of shared libraries])
8d138742
CE
3226_LT_DECL([], [postinstall_cmds], [2],
3227 [Command to use after installation of a shared archive])
3228_LT_DECL([], [postuninstall_cmds], [2],
3229 [Command to use after uninstallation of a shared archive])
3230_LT_DECL([], [finish_cmds], [2],
3231 [Commands used to finish a libtool library installation in a directory])
3232_LT_DECL([], [finish_eval], [1],
3233 [[As "finish_cmds", except a single script fragment to be evaled but
3234 not shown]])
3235_LT_DECL([], [hardcode_into_libs], [0],
3236 [Whether we should hardcode library paths into libraries])
3237_LT_DECL([], [sys_lib_search_path_spec], [2],
3238 [Compile-time system search path for libraries])
d50284c4
CE
3239_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3240 [Detected run-time system search path for libraries])
3241_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3242 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
8d138742
CE
3243])# _LT_SYS_DYNAMIC_LINKER
3244
3245
3246# _LT_PATH_TOOL_PREFIX(TOOL)
3247# --------------------------
d50284c4 3248# find a file program that can recognize shared library
8d138742
CE
3249AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3250[m4_require([_LT_DECL_EGREP])dnl
3251AC_MSG_CHECKING([for $1])
3252AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3253[case $MAGIC_CMD in
3254[[\\/*] | ?:[\\/]*])
d50284c4 3255 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
8d138742
CE
3256 ;;
3257*)
d50284c4
CE
3258 lt_save_MAGIC_CMD=$MAGIC_CMD
3259 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8d138742
CE
3260dnl $ac_dummy forces splitting on constant user-supplied paths.
3261dnl POSIX.2 word splitting is done only on the output of word expansions,
3262dnl not every word. This closes a longstanding sh security hole.
3263 ac_dummy="m4_if([$2], , $PATH, [$2])"
3264 for ac_dir in $ac_dummy; do
d50284c4 3265 IFS=$lt_save_ifs
8d138742 3266 test -z "$ac_dir" && ac_dir=.
d50284c4
CE
3267 if test -f "$ac_dir/$1"; then
3268 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
8d138742
CE
3269 if test -n "$file_magic_test_file"; then
3270 case $deplibs_check_method in
3271 "file_magic "*)
3272 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
d50284c4 3273 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
8d138742
CE
3274 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3275 $EGREP "$file_magic_regex" > /dev/null; then
3276 :
3277 else
3278 cat <<_LT_EOF 1>&2
d9898ee8 3279
8d138742
CE
3280*** Warning: the command libtool uses to detect shared libraries,
3281*** $file_magic_cmd, produces output that libtool cannot recognize.
3282*** The result is that libtool may fail to recognize shared libraries
3283*** as such. This will affect the creation of libtool libraries that
3284*** depend on shared libraries, but programs linked with such libtool
3285*** libraries will work regardless of this problem. Nevertheless, you
3286*** may want to report the problem to your system manager and/or to
3287*** bug-libtool@gnu.org
d9898ee8 3288
8d138742
CE
3289_LT_EOF
3290 fi ;;
3291 esac
3292 fi
3293 break
3294 fi
3295 done
d50284c4
CE
3296 IFS=$lt_save_ifs
3297 MAGIC_CMD=$lt_save_MAGIC_CMD
8d138742
CE
3298 ;;
3299esac])
d50284c4 3300MAGIC_CMD=$lt_cv_path_MAGIC_CMD
8d138742
CE
3301if test -n "$MAGIC_CMD"; then
3302 AC_MSG_RESULT($MAGIC_CMD)
d9898ee8 3303else
8d138742 3304 AC_MSG_RESULT(no)
d9898ee8 3305fi
8d138742
CE
3306_LT_DECL([], [MAGIC_CMD], [0],
3307 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3308])# _LT_PATH_TOOL_PREFIX
d9898ee8 3309
8d138742
CE
3310# Old name:
3311AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3312dnl aclocal-1.4 backwards compatibility:
3313dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
d9898ee8 3314
d9898ee8 3315
8d138742
CE
3316# _LT_PATH_MAGIC
3317# --------------
d50284c4 3318# find a file program that can recognize a shared library
8d138742
CE
3319m4_defun([_LT_PATH_MAGIC],
3320[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3321if test -z "$lt_cv_path_MAGIC_CMD"; then
3322 if test -n "$ac_tool_prefix"; then
3323 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3324 else
3325 MAGIC_CMD=:
3326 fi
3327fi
3328])# _LT_PATH_MAGIC
d9898ee8 3329
d9898ee8 3330
8d138742
CE
3331# LT_PATH_LD
3332# ----------
3333# find the pathname to the GNU or non-GNU linker
3334AC_DEFUN([LT_PATH_LD],
3335[AC_REQUIRE([AC_PROG_CC])dnl
3336AC_REQUIRE([AC_CANONICAL_HOST])dnl
3337AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3338m4_require([_LT_DECL_SED])dnl
3339m4_require([_LT_DECL_EGREP])dnl
b0322a85 3340m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
d9898ee8 3341
8d138742
CE
3342AC_ARG_WITH([gnu-ld],
3343 [AS_HELP_STRING([--with-gnu-ld],
3344 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
d50284c4 3345 [test no = "$withval" || with_gnu_ld=yes],
8d138742 3346 [with_gnu_ld=no])dnl
d9898ee8 3347
8d138742 3348ac_prog=ld
d50284c4 3349if test yes = "$GCC"; then
8d138742
CE
3350 # Check if gcc -print-prog-name=ld gives a path.
3351 AC_MSG_CHECKING([for ld used by $CC])
3352 case $host in
3353 *-*-mingw*)
d50284c4 3354 # gcc leaves a trailing carriage return, which upsets mingw
8d138742
CE
3355 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3356 *)
3357 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3358 esac
3359 case $ac_prog in
3360 # Accept absolute paths.
3361 [[\\/]]* | ?:[[\\/]]*)
3362 re_direlt='/[[^/]][[^/]]*/\.\./'
3363 # Canonicalize the pathname of ld
3364 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3365 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3366 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3367 done
d50284c4 3368 test -z "$LD" && LD=$ac_prog
8d138742
CE
3369 ;;
3370 "")
3371 # If it fails, then pretend we aren't using GCC.
3372 ac_prog=ld
3373 ;;
3374 *)
3375 # If it is relative, then search for the first ld in PATH.
3376 with_gnu_ld=unknown
3377 ;;
3378 esac
d50284c4 3379elif test yes = "$with_gnu_ld"; then
8d138742 3380 AC_MSG_CHECKING([for GNU ld])
d9898ee8 3381else
8d138742 3382 AC_MSG_CHECKING([for non-GNU ld])
d9898ee8 3383fi
8d138742
CE
3384AC_CACHE_VAL(lt_cv_path_LD,
3385[if test -z "$LD"; then
d50284c4 3386 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8d138742 3387 for ac_dir in $PATH; do
d50284c4 3388 IFS=$lt_save_ifs
8d138742
CE
3389 test -z "$ac_dir" && ac_dir=.
3390 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
d50284c4 3391 lt_cv_path_LD=$ac_dir/$ac_prog
8d138742
CE
3392 # Check to see if the program is GNU ld. I'd rather use --version,
3393 # but apparently some variants of GNU ld only accept -v.
3394 # Break only if it was the GNU/non-GNU ld that we prefer.
3395 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3396 *GNU* | *'with BFD'*)
d50284c4 3397 test no != "$with_gnu_ld" && break
8d138742
CE
3398 ;;
3399 *)
d50284c4 3400 test yes != "$with_gnu_ld" && break
d9898ee8 3401 ;;
3402 esac
d9898ee8 3403 fi
8d138742 3404 done
d50284c4 3405 IFS=$lt_save_ifs
8d138742 3406else
d50284c4 3407 lt_cv_path_LD=$LD # Let the user override the test with a path.
8d138742 3408fi])
d50284c4 3409LD=$lt_cv_path_LD
8d138742
CE
3410if test -n "$LD"; then
3411 AC_MSG_RESULT($LD)
3412else
3413 AC_MSG_RESULT(no)
3414fi
3415test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3416_LT_PATH_LD_GNU
3417AC_SUBST([LD])
d9898ee8 3418
8d138742
CE
3419_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3420])# LT_PATH_LD
d9898ee8 3421
8d138742
CE
3422# Old names:
3423AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3424AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3425dnl aclocal-1.4 backwards compatibility:
3426dnl AC_DEFUN([AM_PROG_LD], [])
3427dnl AC_DEFUN([AC_PROG_LD], [])
d9898ee8 3428
d9898ee8 3429
8d138742
CE
3430# _LT_PATH_LD_GNU
3431#- --------------
3432m4_defun([_LT_PATH_LD_GNU],
3433[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3434[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3435case `$LD -v 2>&1 </dev/null` in
3436*GNU* | *'with BFD'*)
3437 lt_cv_prog_gnu_ld=yes
3438 ;;
3439*)
3440 lt_cv_prog_gnu_ld=no
3441 ;;
3442esac])
3443with_gnu_ld=$lt_cv_prog_gnu_ld
3444])# _LT_PATH_LD_GNU
d9898ee8 3445
8d138742
CE
3446
3447# _LT_CMD_RELOAD
3448# --------------
3449# find reload flag for linker
3450# -- PORTME Some linkers may need a different reload flag.
3451m4_defun([_LT_CMD_RELOAD],
3452[AC_CACHE_CHECK([for $LD option to reload object files],
3453 lt_cv_ld_reload_flag,
3454 [lt_cv_ld_reload_flag='-r'])
3455reload_flag=$lt_cv_ld_reload_flag
3456case $reload_flag in
3457"" | " "*) ;;
3458*) reload_flag=" $reload_flag" ;;
3459esac
3460reload_cmds='$LD$reload_flag -o $output$reload_objs'
3461case $host_os in
b0322a85 3462 cygwin* | mingw* | pw32* | cegcc*)
d50284c4 3463 if test yes != "$GCC"; then
b0322a85
CE
3464 reload_cmds=false
3465 fi
3466 ;;
8d138742 3467 darwin*)
d50284c4
CE
3468 if test yes = "$GCC"; then
3469 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
d9898ee8 3470 else
8d138742 3471 reload_cmds='$LD$reload_flag -o $output$reload_objs'
d9898ee8 3472 fi
3473 ;;
8d138742 3474esac
b0322a85
CE
3475_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3476_LT_TAGDECL([], [reload_cmds], [2])dnl
8d138742 3477])# _LT_CMD_RELOAD
d9898ee8 3478
d9898ee8 3479
d50284c4
CE
3480# _LT_PATH_DD
3481# -----------
3482# find a working dd
3483m4_defun([_LT_PATH_DD],
3484[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3485[printf 0123456789abcdef0123456789abcdef >conftest.i
3486cat conftest.i conftest.i >conftest2.i
3487: ${lt_DD:=$DD}
3488AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3489[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3490 cmp -s conftest.i conftest.out \
3491 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3492fi])
3493rm -f conftest.i conftest2.i conftest.out])
3494])# _LT_PATH_DD
3495
3496
3497# _LT_CMD_TRUNCATE
3498# ----------------
3499# find command to truncate a binary pipe
3500m4_defun([_LT_CMD_TRUNCATE],
3501[m4_require([_LT_PATH_DD])
3502AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3503[printf 0123456789abcdef0123456789abcdef >conftest.i
3504cat conftest.i conftest.i >conftest2.i
3505lt_cv_truncate_bin=
3506if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3507 cmp -s conftest.i conftest.out \
3508 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3509fi
3510rm -f conftest.i conftest2.i conftest.out
3511test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3512_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3513 [Command to truncate a binary pipe])
3514])# _LT_CMD_TRUNCATE
3515
3516
8d138742
CE
3517# _LT_CHECK_MAGIC_METHOD
3518# ----------------------
3519# how to check for library dependencies
3520# -- PORTME fill in with the dynamic library characteristics
3521m4_defun([_LT_CHECK_MAGIC_METHOD],
3522[m4_require([_LT_DECL_EGREP])
3523m4_require([_LT_DECL_OBJDUMP])
3524AC_CACHE_CHECK([how to recognize dependent libraries],
3525lt_cv_deplibs_check_method,
3526[lt_cv_file_magic_cmd='$MAGIC_CMD'
3527lt_cv_file_magic_test_file=
3528lt_cv_deplibs_check_method='unknown'
3529# Need to set the preceding variable on all platforms that support
3530# interlibrary dependencies.
3531# 'none' -- dependencies not supported.
d50284c4 3532# 'unknown' -- same as none, but documents that we really don't know.
8d138742
CE
3533# 'pass_all' -- all dependencies passed with no checks.
3534# 'test_compile' -- check by making test program.
3535# 'file_magic [[regex]]' -- check by looking for files in library path
d50284c4
CE
3536# that responds to the $file_magic_cmd with a given extended regex.
3537# If you have 'file' or equivalent on your system and you're not sure
3538# whether 'pass_all' will *always* work, you probably want this one.
8d138742
CE
3539
3540case $host_os in
3541aix[[4-9]]*)
3542 lt_cv_deplibs_check_method=pass_all
d9898ee8 3543 ;;
d9898ee8 3544
8d138742
CE
3545beos*)
3546 lt_cv_deplibs_check_method=pass_all
3547 ;;
3548
3549bsdi[[45]]*)
3550 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3551 lt_cv_file_magic_cmd='/usr/bin/file -L'
3552 lt_cv_file_magic_test_file=/shlib/libc.so
3553 ;;
3554
3555cygwin*)
3556 # func_win32_libid is a shell function defined in ltmain.sh
3557 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3558 lt_cv_file_magic_cmd='func_win32_libid'
3559 ;;
3560
3561mingw* | pw32*)
3562 # Base MSYS/MinGW do not provide the 'file' command needed by
3563 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3564 # unless we find 'file', for example because we are cross-compiling.
d50284c4 3565 if ( file / ) >/dev/null 2>&1; then
8d138742
CE
3566 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3567 lt_cv_file_magic_cmd='func_win32_libid'
3568 else
b0322a85
CE
3569 # Keep this pattern in sync with the one in func_win32_libid.
3570 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8d138742
CE
3571 lt_cv_file_magic_cmd='$OBJDUMP -f'
3572 fi
3573 ;;
3574
b0322a85 3575cegcc*)
8d138742
CE
3576 # use the weaker test based on 'objdump'. See mingw*.
3577 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3578 lt_cv_file_magic_cmd='$OBJDUMP -f'
3579 ;;
3580
3581darwin* | rhapsody*)
3582 lt_cv_deplibs_check_method=pass_all
3583 ;;
3584
3585freebsd* | dragonfly*)
3586 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3587 case $host_cpu in
3588 i*86 )
3589 # Not sure whether the presence of OpenBSD here was a mistake.
3590 # Let's accept both of them until this is cleared up.
3591 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3592 lt_cv_file_magic_cmd=/usr/bin/file
3593 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3594 ;;
d9898ee8 3595 esac
8d138742
CE
3596 else
3597 lt_cv_deplibs_check_method=pass_all
3598 fi
3599 ;;
3600
b0322a85
CE
3601haiku*)
3602 lt_cv_deplibs_check_method=pass_all
3603 ;;
3604
8d138742
CE
3605hpux10.20* | hpux11*)
3606 lt_cv_file_magic_cmd=/usr/bin/file
3607 case $host_cpu in
3608 ia64*)
3609 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3610 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
d9898ee8 3611 ;;
8d138742 3612 hppa*64*)
b0322a85 3613 [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]']
8d138742 3614 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
d9898ee8 3615 ;;
8d138742 3616 *)
b0322a85 3617 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
8d138742 3618 lt_cv_file_magic_test_file=/usr/lib/libc.sl
d9898ee8 3619 ;;
8d138742
CE
3620 esac
3621 ;;
d9898ee8 3622
8d138742
CE
3623interix[[3-9]]*)
3624 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3625 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3626 ;;
d9898ee8 3627
8d138742
CE
3628irix5* | irix6* | nonstopux*)
3629 case $LD in
3630 *-32|*"-32 ") libmagic=32-bit;;
3631 *-n32|*"-n32 ") libmagic=N32;;
3632 *-64|*"-64 ") libmagic=64-bit;;
3633 *) libmagic=never-match;;
3634 esac
3635 lt_cv_deplibs_check_method=pass_all
3636 ;;
d9898ee8 3637
b0322a85 3638# This must be glibc/ELF.
d50284c4 3639linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8d138742
CE
3640 lt_cv_deplibs_check_method=pass_all
3641 ;;
d9898ee8 3642
8d138742
CE
3643netbsd*)
3644 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3645 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3646 else
3647 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3648 fi
3649 ;;
d9898ee8 3650
8d138742
CE
3651newos6*)
3652 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3653 lt_cv_file_magic_cmd=/usr/bin/file
3654 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3655 ;;
d9898ee8 3656
8d138742
CE
3657*nto* | *qnx*)
3658 lt_cv_deplibs_check_method=pass_all
3659 ;;
d9898ee8 3660
d50284c4
CE
3661openbsd* | bitrig*)
3662 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8d138742
CE
3663 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3664 else
3665 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3666 fi
3667 ;;
d9898ee8 3668
8d138742
CE
3669osf3* | osf4* | osf5*)
3670 lt_cv_deplibs_check_method=pass_all
3671 ;;
d9898ee8 3672
8d138742
CE
3673rdos*)
3674 lt_cv_deplibs_check_method=pass_all
3675 ;;
d9898ee8 3676
8d138742
CE
3677solaris*)
3678 lt_cv_deplibs_check_method=pass_all
3679 ;;
d9898ee8 3680
8d138742
CE
3681sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3682 lt_cv_deplibs_check_method=pass_all
3683 ;;
d9898ee8 3684
8d138742
CE
3685sysv4 | sysv4.3*)
3686 case $host_vendor in
3687 motorola)
3688 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]]'
3689 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
d9898ee8 3690 ;;
8d138742
CE
3691 ncr)
3692 lt_cv_deplibs_check_method=pass_all
d9898ee8 3693 ;;
8d138742
CE
3694 sequent)
3695 lt_cv_file_magic_cmd='/bin/file'
3696 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
d9898ee8 3697 ;;
8d138742
CE
3698 sni)
3699 lt_cv_file_magic_cmd='/bin/file'
3700 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3701 lt_cv_file_magic_test_file=/lib/libc.so
d9898ee8 3702 ;;
8d138742
CE
3703 siemens)
3704 lt_cv_deplibs_check_method=pass_all
d9898ee8 3705 ;;
8d138742
CE
3706 pc)
3707 lt_cv_deplibs_check_method=pass_all
d9898ee8 3708 ;;
8d138742
CE
3709 esac
3710 ;;
d9898ee8 3711
8d138742
CE
3712tpf*)
3713 lt_cv_deplibs_check_method=pass_all
3714 ;;
d50284c4
CE
3715os2*)
3716 lt_cv_deplibs_check_method=pass_all
3717 ;;
8d138742
CE
3718esac
3719])
b0322a85
CE
3720
3721file_magic_glob=
3722want_nocaseglob=no
3723if test "$build" = "$host"; then
3724 case $host_os in
3725 mingw* | pw32*)
3726 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3727 want_nocaseglob=yes
3728 else
3729 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3730 fi
3731 ;;
3732 esac
3733fi
3734
8d138742
CE
3735file_magic_cmd=$lt_cv_file_magic_cmd
3736deplibs_check_method=$lt_cv_deplibs_check_method
3737test -z "$deplibs_check_method" && deplibs_check_method=unknown
d9898ee8 3738
8d138742
CE
3739_LT_DECL([], [deplibs_check_method], [1],
3740 [Method to check whether dependent libraries are shared objects])
3741_LT_DECL([], [file_magic_cmd], [1],
b0322a85
CE
3742 [Command to use when deplibs_check_method = "file_magic"])
3743_LT_DECL([], [file_magic_glob], [1],
3744 [How to find potential files when deplibs_check_method = "file_magic"])
3745_LT_DECL([], [want_nocaseglob], [1],
3746 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
8d138742 3747])# _LT_CHECK_MAGIC_METHOD
d9898ee8 3748
d9898ee8 3749
8d138742
CE
3750# LT_PATH_NM
3751# ----------
3752# find the pathname to a BSD- or MS-compatible name lister
3753AC_DEFUN([LT_PATH_NM],
3754[AC_REQUIRE([AC_PROG_CC])dnl
3755AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3756[if test -n "$NM"; then
3757 # Let the user override the test.
d50284c4 3758 lt_cv_path_NM=$NM
8d138742 3759else
d50284c4 3760 lt_nm_to_check=${ac_tool_prefix}nm
8d138742
CE
3761 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3762 lt_nm_to_check="$lt_nm_to_check nm"
3763 fi
3764 for lt_tmp_nm in $lt_nm_to_check; do
d50284c4 3765 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8d138742 3766 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
d50284c4 3767 IFS=$lt_save_ifs
8d138742 3768 test -z "$ac_dir" && ac_dir=.
d50284c4
CE
3769 tmp_nm=$ac_dir/$lt_tmp_nm
3770 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
8d138742 3771 # Check to see if the nm accepts a BSD-compat flag.
d50284c4 3772 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
8d138742
CE
3773 # nm: unknown option "B" ignored
3774 # Tru64's nm complains that /dev/null is an invalid object file
d50284c4
CE
3775 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3776 case $build_os in
3777 mingw*) lt_bad_file=conftest.nm/nofile ;;
3778 *) lt_bad_file=/dev/null ;;
3779 esac
3780 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3781 *$lt_bad_file* | *'Invalid file or object type'*)
8d138742 3782 lt_cv_path_NM="$tmp_nm -B"
d50284c4 3783 break 2
8d138742
CE
3784 ;;
3785 *)
3786 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3787 */dev/null*)
3788 lt_cv_path_NM="$tmp_nm -p"
d50284c4 3789 break 2
8d138742
CE
3790 ;;
3791 *)
3792 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3793 continue # so that we can try to find one that supports BSD flags
3794 ;;
3795 esac
3796 ;;
3797 esac
3798 fi
3799 done
d50284c4 3800 IFS=$lt_save_ifs
d9898ee8 3801 done
8d138742
CE
3802 : ${lt_cv_path_NM=no}
3803fi])
d50284c4
CE
3804if test no != "$lt_cv_path_NM"; then
3805 NM=$lt_cv_path_NM
d9898ee8 3806else
8d138742 3807 # Didn't find any BSD compatible name lister, look for dumpbin.
b0322a85
CE
3808 if test -n "$DUMPBIN"; then :
3809 # Let the user override the test.
3810 else
3811 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
d50284c4 3812 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
b0322a85 3813 *COFF*)
d50284c4 3814 DUMPBIN="$DUMPBIN -symbols -headers"
b0322a85
CE
3815 ;;
3816 *)
3817 DUMPBIN=:
3818 ;;
3819 esac
3820 fi
8d138742 3821 AC_SUBST([DUMPBIN])
d50284c4
CE
3822 if test : != "$DUMPBIN"; then
3823 NM=$DUMPBIN
8d138742 3824 fi
d9898ee8 3825fi
8d138742
CE
3826test -z "$NM" && NM=nm
3827AC_SUBST([NM])
3828_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3829
3830AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3831 [lt_cv_nm_interface="BSD nm"
3832 echo "int some_variable = 0;" > conftest.$ac_ext
b0322a85 3833 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
3834 (eval "$ac_compile" 2>conftest.err)
3835 cat conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 3836 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
3837 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3838 cat conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 3839 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
3840 cat conftest.out >&AS_MESSAGE_LOG_FD
3841 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3842 lt_cv_nm_interface="MS dumpbin"
3843 fi
3844 rm -f conftest*])
3845])# LT_PATH_NM
d9898ee8 3846
8d138742
CE
3847# Old names:
3848AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3849AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3850dnl aclocal-1.4 backwards compatibility:
3851dnl AC_DEFUN([AM_PROG_NM], [])
3852dnl AC_DEFUN([AC_PROG_NM], [])
d9898ee8 3853
b0322a85
CE
3854# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3855# --------------------------------
3856# how to determine the name of the shared library
3857# associated with a specific link library.
3858# -- PORTME fill in with the dynamic library characteristics
3859m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3860[m4_require([_LT_DECL_EGREP])
3861m4_require([_LT_DECL_OBJDUMP])
3862m4_require([_LT_DECL_DLLTOOL])
3863AC_CACHE_CHECK([how to associate runtime and link libraries],
3864lt_cv_sharedlib_from_linklib_cmd,
3865[lt_cv_sharedlib_from_linklib_cmd='unknown'
3866
3867case $host_os in
3868cygwin* | mingw* | pw32* | cegcc*)
d50284c4
CE
3869 # two different shell functions defined in ltmain.sh;
3870 # decide which one to use based on capabilities of $DLLTOOL
b0322a85
CE
3871 case `$DLLTOOL --help 2>&1` in
3872 *--identify-strict*)
3873 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3874 ;;
3875 *)
3876 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3877 ;;
3878 esac
3879 ;;
3880*)
3881 # fallback: assume linklib IS sharedlib
d50284c4 3882 lt_cv_sharedlib_from_linklib_cmd=$ECHO
b0322a85
CE
3883 ;;
3884esac
3885])
3886sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3887test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3888
3889_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3890 [Command to associate shared and link libraries])
3891])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3892
3893
3894# _LT_PATH_MANIFEST_TOOL
3895# ----------------------
3896# locate the manifest tool
3897m4_defun([_LT_PATH_MANIFEST_TOOL],
3898[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3899test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3900AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3901 [lt_cv_path_mainfest_tool=no
3902 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3903 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3904 cat conftest.err >&AS_MESSAGE_LOG_FD
3905 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3906 lt_cv_path_mainfest_tool=yes
3907 fi
3908 rm -f conftest*])
d50284c4 3909if test yes != "$lt_cv_path_mainfest_tool"; then
b0322a85
CE
3910 MANIFEST_TOOL=:
3911fi
3912_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3913])# _LT_PATH_MANIFEST_TOOL
3914
3915
d50284c4
CE
3916# _LT_DLL_DEF_P([FILE])
3917# ---------------------
3918# True iff FILE is a Windows DLL '.def' file.
3919# Keep in sync with func_dll_def_p in the libtool script
3920AC_DEFUN([_LT_DLL_DEF_P],
3921[dnl
3922 test DEF = "`$SED -n dnl
3923 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3924 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3925 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3926 -e q dnl Only consider the first "real" line
3927 $1`" dnl
3928])# _LT_DLL_DEF_P
3929
3930
8d138742
CE
3931# LT_LIB_M
3932# --------
3933# check for math library
3934AC_DEFUN([LT_LIB_M],
3935[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3936LIBM=
3937case $host in
b0322a85 3938*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
8d138742 3939 # These system don't have libm, or don't need it
ac40fd9e 3940 ;;
8d138742 3941*-ncr-sysv4.3*)
d50284c4 3942 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
8d138742
CE
3943 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3944 ;;
3945*)
d50284c4 3946 AC_CHECK_LIB(m, cos, LIBM=-lm)
d9898ee8 3947 ;;
3948esac
8d138742
CE
3949AC_SUBST([LIBM])
3950])# LT_LIB_M
d9898ee8 3951
8d138742
CE
3952# Old name:
3953AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3954dnl aclocal-1.4 backwards compatibility:
3955dnl AC_DEFUN([AC_CHECK_LIBM], [])
d9898ee8 3956
d9898ee8 3957
8d138742
CE
3958# _LT_COMPILER_NO_RTTI([TAGNAME])
3959# -------------------------------
3960m4_defun([_LT_COMPILER_NO_RTTI],
3961[m4_require([_LT_TAG_COMPILER])dnl
d9898ee8 3962
8d138742 3963_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
d9898ee8 3964
d50284c4 3965if test yes = "$GCC"; then
b0322a85
CE
3966 case $cc_basename in
3967 nvcc*)
3968 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3969 *)
3970 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3971 esac
d9898ee8 3972
8d138742
CE
3973 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3974 lt_cv_prog_compiler_rtti_exceptions,
3975 [-fno-rtti -fno-exceptions], [],
3976 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3977fi
3978_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3979 [Compiler flag to turn off builtin functions])
3980])# _LT_COMPILER_NO_RTTI
d9898ee8 3981
d9898ee8 3982
8d138742
CE
3983# _LT_CMD_GLOBAL_SYMBOLS
3984# ----------------------
3985m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3986[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3987AC_REQUIRE([AC_PROG_CC])dnl
b0322a85 3988AC_REQUIRE([AC_PROG_AWK])dnl
8d138742
CE
3989AC_REQUIRE([LT_PATH_NM])dnl
3990AC_REQUIRE([LT_PATH_LD])dnl
3991m4_require([_LT_DECL_SED])dnl
3992m4_require([_LT_DECL_EGREP])dnl
3993m4_require([_LT_TAG_COMPILER])dnl
d9898ee8 3994
8d138742
CE
3995# Check for command to grab the raw symbol name followed by C symbol from nm.
3996AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3997AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3998[
3999# These are sane defaults that work on at least a few old systems.
4000# [They come from Ultrix. What could be older than Ultrix?!! ;)]
d9898ee8 4001
8d138742
CE
4002# Character class describing NM global symbol codes.
4003symcode='[[BCDEGRST]]'
d9898ee8 4004
8d138742
CE
4005# Regexp to match symbols that can be accessed directly from C.
4006sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
d9898ee8 4007
8d138742 4008# Define system-specific variables.
d9898ee8 4009case $host_os in
8d138742
CE
4010aix*)
4011 symcode='[[BCDT]]'
d9898ee8 4012 ;;
8d138742
CE
4013cygwin* | mingw* | pw32* | cegcc*)
4014 symcode='[[ABCDGISTW]]'
4015 ;;
4016hpux*)
d50284c4 4017 if test ia64 = "$host_cpu"; then
8d138742 4018 symcode='[[ABCDEGRST]]'
d9898ee8 4019 fi
4020 ;;
8d138742
CE
4021irix* | nonstopux*)
4022 symcode='[[BCDEGRST]]'
4023 ;;
4024osf*)
4025 symcode='[[BCDEGQRST]]'
4026 ;;
4027solaris*)
4028 symcode='[[BDRT]]'
4029 ;;
4030sco3.2v5*)
4031 symcode='[[DT]]'
4032 ;;
4033sysv4.2uw2*)
4034 symcode='[[DT]]'
4035 ;;
4036sysv5* | sco5v6* | unixware* | OpenUNIX*)
4037 symcode='[[ABDT]]'
4038 ;;
4039sysv4)
4040 symcode='[[DFNSTU]]'
4041 ;;
4042esac
d9898ee8 4043
8d138742
CE
4044# If we're using GNU nm, then use its standard symbol codes.
4045case `$NM -V 2>&1` in
4046*GNU* | *'with BFD'*)
4047 symcode='[[ABCDGIRSTW]]' ;;
4048esac
d9898ee8 4049
d50284c4
CE
4050if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4051 # Gets list of data symbols to import.
4052 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
4053 # Adjust the below global symbol transforms to fixup imported variables.
4054 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
4055 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
4056 lt_c_name_lib_hook="\
4057 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
4058 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
4059else
4060 # Disable hooks by default.
4061 lt_cv_sys_global_symbol_to_import=
4062 lt_cdecl_hook=
4063 lt_c_name_hook=
4064 lt_c_name_lib_hook=
4065fi
4066
8d138742
CE
4067# Transform an extracted symbol line into a proper C declaration.
4068# Some systems (esp. on ia64) link data and code symbols differently,
4069# so use this general approach.
d50284c4
CE
4070lt_cv_sys_global_symbol_to_cdecl="sed -n"\
4071$lt_cdecl_hook\
4072" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4073" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
d9898ee8 4074
8d138742 4075# Transform an extracted symbol line into symbol name and symbol address
d50284c4
CE
4076lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
4077$lt_c_name_hook\
4078" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4079" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
4080
4081# Transform an extracted symbol line into symbol name with lib prefix and
4082# symbol address.
4083lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4084$lt_c_name_lib_hook\
4085" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4086" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4087" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
d9898ee8 4088
8d138742
CE
4089# Handle CRLF in mingw tool chain
4090opt_cr=
4091case $build_os in
4092mingw*)
4093 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4094 ;;
4095esac
d9898ee8 4096
8d138742
CE
4097# Try without a prefix underscore, then with it.
4098for ac_symprfx in "" "_"; do
d9898ee8 4099
8d138742
CE
4100 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4101 symxfrm="\\1 $ac_symprfx\\2 \\2"
d9898ee8 4102
8d138742
CE
4103 # Write the raw and C identifiers.
4104 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
d50284c4
CE
4105 # Fake it for dumpbin and say T for any non-static function,
4106 # D for any global variable and I for any imported variable.
8d138742
CE
4107 # Also find C++ and __fastcall symbols from MSVC++,
4108 # which start with @ or ?.
4109 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4110" {last_section=section; section=\$ 3};"\
b0322a85 4111" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8d138742 4112" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
d50284c4
CE
4113" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4114" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4115" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8d138742
CE
4116" \$ 0!~/External *\|/{next};"\
4117" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4118" {if(hide[section]) next};"\
d50284c4
CE
4119" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4120" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4121" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4122" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8d138742
CE
4123" ' prfx=^$ac_symprfx]"
4124 else
4125 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4126 fi
b0322a85 4127 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
d9898ee8 4128
8d138742
CE
4129 # Check to see that the pipe works correctly.
4130 pipe_works=no
d9898ee8 4131
8d138742
CE
4132 rm -f conftest*
4133 cat > conftest.$ac_ext <<_LT_EOF
4134#ifdef __cplusplus
4135extern "C" {
4136#endif
4137char nm_test_var;
4138void nm_test_func(void);
4139void nm_test_func(void){}
4140#ifdef __cplusplus
4141}
4142#endif
4143int main(){nm_test_var='a';nm_test_func();return(0);}
4144_LT_EOF
d9898ee8 4145
8d138742
CE
4146 if AC_TRY_EVAL(ac_compile); then
4147 # Now try to grab the symbols.
4148 nlist=conftest.nm
b0322a85 4149 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
8d138742
CE
4150 # Try sorting and uniquifying the output.
4151 if sort "$nlist" | uniq > "$nlist"T; then
4152 mv -f "$nlist"T "$nlist"
4153 else
4154 rm -f "$nlist"T
4155 fi
d9898ee8 4156
8d138742
CE
4157 # Make sure that we snagged all the symbols we need.
4158 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4159 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4160 cat <<_LT_EOF > conftest.$ac_ext
b0322a85 4161/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
d50284c4
CE
4162#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4163/* DATA imports from DLLs on WIN32 can't be const, because runtime
b0322a85
CE
4164 relocations are performed -- see ld's documentation on pseudo-relocs. */
4165# define LT@&t@_DLSYM_CONST
d50284c4 4166#elif defined __osf__
b0322a85
CE
4167/* This system does not cope well with relocations in const data. */
4168# define LT@&t@_DLSYM_CONST
4169#else
4170# define LT@&t@_DLSYM_CONST const
4171#endif
4172
8d138742
CE
4173#ifdef __cplusplus
4174extern "C" {
4175#endif
d9898ee8 4176
8d138742
CE
4177_LT_EOF
4178 # Now generate the symbol file.
4179 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
d9898ee8 4180
8d138742 4181 cat <<_LT_EOF >> conftest.$ac_ext
d9898ee8 4182
8d138742 4183/* The mapping between symbol names and symbols. */
b0322a85 4184LT@&t@_DLSYM_CONST struct {
8d138742
CE
4185 const char *name;
4186 void *address;
4187}
4188lt__PROGRAM__LTX_preloaded_symbols[[]] =
4189{
4190 { "@PROGRAM@", (void *) 0 },
4191_LT_EOF
d50284c4 4192 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8d138742
CE
4193 cat <<\_LT_EOF >> conftest.$ac_ext
4194 {0, (void *) 0}
4195};
d9898ee8 4196
8d138742
CE
4197/* This works around a problem in FreeBSD linker */
4198#ifdef FREEBSD_WORKAROUND
4199static const void *lt_preloaded_setup() {
4200 return lt__PROGRAM__LTX_preloaded_symbols;
4201}
4202#endif
d9898ee8 4203
8d138742
CE
4204#ifdef __cplusplus
4205}
4206#endif
4207_LT_EOF
4208 # Now try linking the two files.
4209 mv conftest.$ac_objext conftstm.$ac_objext
b0322a85
CE
4210 lt_globsym_save_LIBS=$LIBS
4211 lt_globsym_save_CFLAGS=$CFLAGS
d50284c4 4212 LIBS=conftstm.$ac_objext
8d138742 4213 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
d50284c4 4214 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
8d138742
CE
4215 pipe_works=yes
4216 fi
b0322a85
CE
4217 LIBS=$lt_globsym_save_LIBS
4218 CFLAGS=$lt_globsym_save_CFLAGS
8d138742
CE
4219 else
4220 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4221 fi
4222 else
4223 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4224 fi
4225 else
4226 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4227 fi
4228 else
4229 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4230 cat conftest.$ac_ext >&5
4231 fi
4232 rm -rf conftest* conftst*
d9898ee8 4233
8d138742 4234 # Do not use the global_symbol_pipe unless it works.
d50284c4 4235 if test yes = "$pipe_works"; then
8d138742
CE
4236 break
4237 else
4238 lt_cv_sys_global_symbol_pipe=
4239 fi
4240done
4241])
4242if test -z "$lt_cv_sys_global_symbol_pipe"; then
4243 lt_cv_sys_global_symbol_to_cdecl=
4244fi
4245if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4246 AC_MSG_RESULT(failed)
4247else
4248 AC_MSG_RESULT(ok)
4249fi
d9898ee8 4250
b0322a85
CE
4251# Response file support.
4252if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4253 nm_file_list_spec='@'
4254elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4255 nm_file_list_spec='@'
4256fi
4257
8d138742
CE
4258_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4259 [Take the output of nm and produce a listing of raw symbols and C names])
4260_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4261 [Transform the output of nm in a proper C declaration])
d50284c4
CE
4262_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4263 [Transform the output of nm into a list of symbols to manually relocate])
8d138742
CE
4264_LT_DECL([global_symbol_to_c_name_address],
4265 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4266 [Transform the output of nm in a C name address pair])
4267_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4268 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4269 [Transform the output of nm in a C name address pair when lib prefix is needed])
d50284c4
CE
4270_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4271 [The name lister interface])
b0322a85
CE
4272_LT_DECL([], [nm_file_list_spec], [1],
4273 [Specify filename containing input files for $NM])
8d138742 4274]) # _LT_CMD_GLOBAL_SYMBOLS
d9898ee8 4275
d9898ee8 4276
8d138742
CE
4277# _LT_COMPILER_PIC([TAGNAME])
4278# ---------------------------
4279m4_defun([_LT_COMPILER_PIC],
4280[m4_require([_LT_TAG_COMPILER])dnl
4281_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4282_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4283_LT_TAGVAR(lt_prog_compiler_static, $1)=
d9898ee8 4284
8d138742
CE
4285m4_if([$1], [CXX], [
4286 # C++ specific cases for pic, static, wl, etc.
d50284c4 4287 if test yes = "$GXX"; then
8d138742
CE
4288 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4289 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
d9898ee8 4290
8d138742
CE
4291 case $host_os in
4292 aix*)
4293 # All AIX code is PIC.
d50284c4 4294 if test ia64 = "$host_cpu"; then
8d138742
CE
4295 # AIX 5 now supports IA64 processor
4296 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4297 fi
d50284c4 4298 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8d138742 4299 ;;
d9898ee8 4300
8d138742
CE
4301 amigaos*)
4302 case $host_cpu in
4303 powerpc)
4304 # see comment about AmigaOS4 .so support
4305 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4306 ;;
4307 m68k)
4308 # FIXME: we need at least 68020 code to build shared libraries, but
d50284c4
CE
4309 # adding the '-m68020' flag to GCC prevents building anything better,
4310 # like '-m68040'.
8d138742
CE
4311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4312 ;;
4313 esac
4314 ;;
d9898ee8 4315
8d138742
CE
4316 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4317 # PIC is the default for these OSes.
4318 ;;
4319 mingw* | cygwin* | os2* | pw32* | cegcc*)
4320 # This hack is so that the source file can tell whether it is being
4321 # built for inclusion in a dll (and should export symbols for example).
4322 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4323 # (--disable-auto-import) libraries
4324 m4_if([$1], [GCJ], [],
4325 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
d50284c4
CE
4326 case $host_os in
4327 os2*)
4328 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4329 ;;
4330 esac
8d138742
CE
4331 ;;
4332 darwin* | rhapsody*)
4333 # PIC is the default on this platform
4334 # Common symbols not allowed in MH_DYLIB files
4335 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4336 ;;
4337 *djgpp*)
4338 # DJGPP does not support shared libraries at all
4339 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4340 ;;
b0322a85
CE
4341 haiku*)
4342 # PIC is the default for Haiku.
4343 # The "-static" flag exists, but is broken.
4344 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4345 ;;
8d138742
CE
4346 interix[[3-9]]*)
4347 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4348 # Instead, we relocate shared libraries at runtime.
4349 ;;
4350 sysv4*MP*)
4351 if test -d /usr/nec; then
4352 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4353 fi
4354 ;;
4355 hpux*)
4356 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4357 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4358 # sets the default TLS model and affects inlining.
4359 case $host_cpu in
4360 hppa*64*)
4361 ;;
4362 *)
4363 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4364 ;;
4365 esac
4366 ;;
4367 *qnx* | *nto*)
4368 # QNX uses GNU C++, but need to define -shared option too, otherwise
4369 # it will coredump.
4370 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
d9898ee8 4371 ;;
4372 *)
8d138742 4373 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
d9898ee8 4374 ;;
4375 esac
8d138742
CE
4376 else
4377 case $host_os in
4378 aix[[4-9]]*)
4379 # All AIX code is PIC.
d50284c4 4380 if test ia64 = "$host_cpu"; then
8d138742
CE
4381 # AIX 5 now supports IA64 processor
4382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4383 else
4384 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4385 fi
4386 ;;
4387 chorus*)
4388 case $cc_basename in
4389 cxch68*)
4390 # Green Hills C++ Compiler
4391 # _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"
4392 ;;
4393 esac
4394 ;;
b0322a85
CE
4395 mingw* | cygwin* | os2* | pw32* | cegcc*)
4396 # This hack is so that the source file can tell whether it is being
4397 # built for inclusion in a dll (and should export symbols for example).
4398 m4_if([$1], [GCJ], [],
4399 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4400 ;;
8d138742
CE
4401 dgux*)
4402 case $cc_basename in
4403 ec++*)
4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4405 ;;
4406 ghcx*)
4407 # Green Hills C++ Compiler
4408 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4409 ;;
4410 *)
4411 ;;
4412 esac
4413 ;;
4414 freebsd* | dragonfly*)
4415 # FreeBSD uses GNU C++
4416 ;;
4417 hpux9* | hpux10* | hpux11*)
4418 case $cc_basename in
4419 CC*)
4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
d50284c4
CE
4421 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4422 if test ia64 != "$host_cpu"; then
8d138742
CE
4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4424 fi
4425 ;;
4426 aCC*)
4427 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
d50284c4 4428 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8d138742
CE
4429 case $host_cpu in
4430 hppa*64*|ia64*)
4431 # +Z the default
4432 ;;
4433 *)
4434 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4435 ;;
4436 esac
4437 ;;
4438 *)
4439 ;;
4440 esac
4441 ;;
4442 interix*)
4443 # This is c89, which is MS Visual C++ (no shared libs)
4444 # Anyone wants to do a port?
4445 ;;
4446 irix5* | irix6* | nonstopux*)
4447 case $cc_basename in
4448 CC*)
4449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4451 # CC pic flag -KPIC is the default.
4452 ;;
4453 *)
4454 ;;
4455 esac
4456 ;;
d50284c4 4457 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8d138742
CE
4458 case $cc_basename in
4459 KCC*)
4460 # KAI C++ Compiler
4461 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4462 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4463 ;;
4464 ecpc* )
d50284c4 4465 # old Intel C++ for x86_64, which still supported -KPIC.
8d138742
CE
4466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4467 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4468 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4469 ;;
4470 icpc* )
4471 # Intel C++, used to be incompatible with GCC.
4472 # ICC 10 doesn't accept -KPIC any more.
4473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4475 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4476 ;;
4477 pgCC* | pgcpp*)
4478 # Portland Group C++ compiler
4479 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4482 ;;
4483 cxx*)
4484 # Compaq C++
4485 # Make sure the PIC flag is empty. It appears that all Alpha
4486 # Linux and Compaq Tru64 Unix objects are PIC.
4487 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4488 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4489 ;;
b0322a85
CE
4490 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4491 # IBM XL 8.0, 9.0 on PPC and BlueGene
8d138742
CE
4492 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4495 ;;
4496 *)
4497 case `$CC -V 2>&1 | sed 5q` in
4498 *Sun\ C*)
4499 # Sun C++ 5.9
4500 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4501 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4503 ;;
4504 esac
4505 ;;
4506 esac
4507 ;;
4508 lynxos*)
4509 ;;
4510 m88k*)
4511 ;;
4512 mvs*)
4513 case $cc_basename in
4514 cxx*)
4515 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4516 ;;
4517 *)
4518 ;;
4519 esac
4520 ;;
4521 netbsd*)
4522 ;;
4523 *qnx* | *nto*)
4524 # QNX uses GNU C++, but need to define -shared option too, otherwise
4525 # it will coredump.
4526 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4527 ;;
4528 osf3* | osf4* | osf5*)
4529 case $cc_basename in
4530 KCC*)
4531 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4532 ;;
4533 RCC*)
4534 # Rational C++ 2.4.1
4535 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4536 ;;
4537 cxx*)
4538 # Digital/Compaq C++
4539 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4540 # Make sure the PIC flag is empty. It appears that all Alpha
4541 # Linux and Compaq Tru64 Unix objects are PIC.
4542 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4543 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4544 ;;
4545 *)
4546 ;;
4547 esac
4548 ;;
4549 psos*)
4550 ;;
4551 solaris*)
4552 case $cc_basename in
b0322a85 4553 CC* | sunCC*)
8d138742
CE
4554 # Sun C++ 4.2, 5.x and Centerline C++
4555 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4556 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4557 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4558 ;;
4559 gcx*)
4560 # Green Hills C++ Compiler
4561 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4562 ;;
4563 *)
4564 ;;
4565 esac
4566 ;;
4567 sunos4*)
4568 case $cc_basename in
4569 CC*)
4570 # Sun C++ 4.x
4571 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4572 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4573 ;;
4574 lcc*)
4575 # Lucid
4576 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4577 ;;
4578 *)
4579 ;;
4580 esac
4581 ;;
4582 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4583 case $cc_basename in
4584 CC*)
4585 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4586 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4587 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4588 ;;
4589 esac
4590 ;;
4591 tandem*)
4592 case $cc_basename in
4593 NCC*)
4594 # NonStop-UX NCC 3.20
4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4596 ;;
4597 *)
4598 ;;
4599 esac
4600 ;;
4601 vxworks*)
4602 ;;
4603 *)
4604 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4605 ;;
4606 esac
4607 fi
4608],
4609[
d50284c4 4610 if test yes = "$GCC"; then
8d138742
CE
4611 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4612 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
d9898ee8 4613
8d138742
CE
4614 case $host_os in
4615 aix*)
4616 # All AIX code is PIC.
d50284c4 4617 if test ia64 = "$host_cpu"; then
8d138742
CE
4618 # AIX 5 now supports IA64 processor
4619 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4620 fi
d50284c4 4621 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8d138742 4622 ;;
d9898ee8 4623
8d138742
CE
4624 amigaos*)
4625 case $host_cpu in
4626 powerpc)
4627 # see comment about AmigaOS4 .so support
4628 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4629 ;;
4630 m68k)
4631 # FIXME: we need at least 68020 code to build shared libraries, but
d50284c4
CE
4632 # adding the '-m68020' flag to GCC prevents building anything better,
4633 # like '-m68040'.
8d138742
CE
4634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4635 ;;
4636 esac
4637 ;;
d9898ee8 4638
8d138742
CE
4639 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4640 # PIC is the default for these OSes.
4641 ;;
d9898ee8 4642
8d138742
CE
4643 mingw* | cygwin* | pw32* | os2* | cegcc*)
4644 # This hack is so that the source file can tell whether it is being
4645 # built for inclusion in a dll (and should export symbols for example).
4646 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4647 # (--disable-auto-import) libraries
4648 m4_if([$1], [GCJ], [],
4649 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
d50284c4
CE
4650 case $host_os in
4651 os2*)
4652 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4653 ;;
4654 esac
8d138742 4655 ;;
d9898ee8 4656
8d138742
CE
4657 darwin* | rhapsody*)
4658 # PIC is the default on this platform
4659 # Common symbols not allowed in MH_DYLIB files
4660 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4661 ;;
d9898ee8 4662
b0322a85
CE
4663 haiku*)
4664 # PIC is the default for Haiku.
4665 # The "-static" flag exists, but is broken.
4666 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4667 ;;
4668
8d138742
CE
4669 hpux*)
4670 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4671 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4672 # sets the default TLS model and affects inlining.
4673 case $host_cpu in
4674 hppa*64*)
4675 # +Z the default
4676 ;;
4677 *)
4678 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4679 ;;
4680 esac
4681 ;;
d9898ee8 4682
8d138742
CE
4683 interix[[3-9]]*)
4684 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4685 # Instead, we relocate shared libraries at runtime.
4686 ;;
d9898ee8 4687
8d138742
CE
4688 msdosdjgpp*)
4689 # Just because we use GCC doesn't mean we suddenly get shared libraries
4690 # on systems that don't support them.
4691 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4692 enable_shared=no
4693 ;;
d9898ee8 4694
8d138742
CE
4695 *nto* | *qnx*)
4696 # QNX uses GNU C++, but need to define -shared option too, otherwise
4697 # it will coredump.
4698 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4699 ;;
d9898ee8 4700
8d138742
CE
4701 sysv4*MP*)
4702 if test -d /usr/nec; then
4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4704 fi
4705 ;;
d9898ee8 4706
8d138742
CE
4707 *)
4708 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4709 ;;
4710 esac
b0322a85
CE
4711
4712 case $cc_basename in
4713 nvcc*) # Cuda Compiler Driver 2.2
4714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4715 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4717 fi
4718 ;;
4719 esac
8d138742
CE
4720 else
4721 # PORTME Check for flag to pass linker flags through the system compiler.
4722 case $host_os in
4723 aix*)
4724 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
d50284c4 4725 if test ia64 = "$host_cpu"; then
8d138742
CE
4726 # AIX 5 now supports IA64 processor
4727 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4728 else
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4730 fi
4731 ;;
d9898ee8 4732
d50284c4
CE
4733 darwin* | rhapsody*)
4734 # PIC is the default on this platform
4735 # Common symbols not allowed in MH_DYLIB files
4736 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4737 case $cc_basename in
4738 nagfor*)
4739 # NAG Fortran compiler
4740 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4741 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4742 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4743 ;;
4744 esac
4745 ;;
4746
8d138742
CE
4747 mingw* | cygwin* | pw32* | os2* | cegcc*)
4748 # This hack is so that the source file can tell whether it is being
4749 # built for inclusion in a dll (and should export symbols for example).
4750 m4_if([$1], [GCJ], [],
4751 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
d50284c4
CE
4752 case $host_os in
4753 os2*)
4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4755 ;;
4756 esac
8d138742 4757 ;;
d9898ee8 4758
8d138742
CE
4759 hpux9* | hpux10* | hpux11*)
4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4761 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4762 # not for PA HP-UX.
4763 case $host_cpu in
4764 hppa*64*|ia64*)
4765 # +Z the default
4766 ;;
4767 *)
4768 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4769 ;;
4770 esac
4771 # Is there a better lt_prog_compiler_static that works with the bundled CC?
d50284c4 4772 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8d138742 4773 ;;
d9898ee8 4774
8d138742
CE
4775 irix5* | irix6* | nonstopux*)
4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4777 # PIC (with -KPIC) is the default.
4778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4779 ;;
d9898ee8 4780
d50284c4 4781 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8d138742 4782 case $cc_basename in
d50284c4 4783 # old Intel for x86_64, which still supported -KPIC.
8d138742
CE
4784 ecc*)
4785 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4788 ;;
4789 # icc used to be incompatible with GCC.
4790 # ICC 10 doesn't accept -KPIC any more.
4791 icc* | ifort*)
4792 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4794 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4795 ;;
4796 # Lahey Fortran 8.1.
4797 lf95*)
4798 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4799 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4800 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4801 ;;
b0322a85
CE
4802 nagfor*)
4803 # NAG Fortran compiler
4804 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4807 ;;
d50284c4
CE
4808 tcc*)
4809 # Fabrice Bellard et al's Tiny C Compiler
4810 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4811 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4812 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4813 ;;
b0322a85 4814 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8d138742
CE
4815 # Portland Group compilers (*not* the Pentium gcc compiler,
4816 # which looks to be a dead project)
4817 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4818 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4819 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4820 ;;
4821 ccc*)
4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4823 # All Alpha code is PIC.
4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4825 ;;
b0322a85
CE
4826 xl* | bgxl* | bgf* | mpixl*)
4827 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8d138742
CE
4828 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4831 ;;
4832 *)
4833 case `$CC -V 2>&1 | sed 5q` in
b0322a85
CE
4834 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4835 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4838 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4839 ;;
4840 *Sun\ F* | *Sun*Fortran*)
4841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4842 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4843 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4844 ;;
8d138742
CE
4845 *Sun\ C*)
4846 # Sun C 5.9
4847 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4848 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4849 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4850 ;;
b0322a85
CE
4851 *Intel*\ [[CF]]*Compiler*)
4852 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4853 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4854 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4855 ;;
4856 *Portland\ Group*)
4857 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4858 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8d138742 4859 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8d138742
CE
4860 ;;
4861 esac
4862 ;;
4863 esac
4864 ;;
d9898ee8 4865
8d138742
CE
4866 newsos6)
4867 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4868 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4869 ;;
d9898ee8 4870
8d138742
CE
4871 *nto* | *qnx*)
4872 # QNX uses GNU C++, but need to define -shared option too, otherwise
4873 # it will coredump.
4874 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4875 ;;
d9898ee8 4876
8d138742
CE
4877 osf3* | osf4* | osf5*)
4878 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4879 # All OSF/1 code is PIC.
4880 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4881 ;;
d9898ee8 4882
8d138742
CE
4883 rdos*)
4884 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4885 ;;
d9898ee8 4886
8d138742
CE
4887 solaris*)
4888 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4890 case $cc_basename in
b0322a85 4891 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8d138742
CE
4892 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4893 *)
4894 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4895 esac
4896 ;;
d9898ee8 4897
8d138742
CE
4898 sunos4*)
4899 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4900 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4901 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4902 ;;
d9898ee8 4903
8d138742
CE
4904 sysv4 | sysv4.2uw2* | sysv4.3*)
4905 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4906 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4907 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4908 ;;
d9898ee8 4909
8d138742 4910 sysv4*MP*)
d50284c4 4911 if test -d /usr/nec; then
8d138742
CE
4912 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4913 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4914 fi
4915 ;;
d9898ee8 4916
8d138742
CE
4917 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4918 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4920 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4921 ;;
d9898ee8 4922
8d138742
CE
4923 unicos*)
4924 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4925 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4926 ;;
d9898ee8 4927
8d138742
CE
4928 uts4*)
4929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4930 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4931 ;;
d9898ee8 4932
8d138742
CE
4933 *)
4934 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4935 ;;
4936 esac
4937 fi
4938])
4939case $host_os in
d50284c4 4940 # For platforms that do not support PIC, -DPIC is meaningless:
8d138742
CE
4941 *djgpp*)
4942 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4943 ;;
4944 *)
4945 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4946 ;;
4947esac
b0322a85
CE
4948
4949AC_CACHE_CHECK([for $compiler option to produce PIC],
4950 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4951 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4952_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
d9898ee8 4953
8d138742
CE
4954#
4955# Check to make sure the PIC flag actually works.
4956#
4957if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4958 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4959 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4960 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4961 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4962 "" | " "*) ;;
4963 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4964 esac],
4965 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4966 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4967fi
4968_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4969 [Additional compiler flags for building library objects])
d9898ee8 4970
b0322a85
CE
4971_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4972 [How to pass a linker flag through the compiler])
8d138742
CE
4973#
4974# Check to make sure the static flag actually works.
4975#
4976wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4977_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4978 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4979 $lt_tmp_static_flag,
4980 [],
4981 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4982_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4983 [Compiler flag to prevent dynamic linking])
4984])# _LT_COMPILER_PIC
d9898ee8 4985
d9898ee8 4986
8d138742
CE
4987# _LT_LINKER_SHLIBS([TAGNAME])
4988# ----------------------------
4989# See if the linker supports building shared libraries.
4990m4_defun([_LT_LINKER_SHLIBS],
4991[AC_REQUIRE([LT_PATH_LD])dnl
4992AC_REQUIRE([LT_PATH_NM])dnl
b0322a85 4993m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8d138742
CE
4994m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4995m4_require([_LT_DECL_EGREP])dnl
4996m4_require([_LT_DECL_SED])dnl
4997m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4998m4_require([_LT_TAG_COMPILER])dnl
4999AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5000m4_if([$1], [CXX], [
5001 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
b0322a85 5002 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8d138742
CE
5003 case $host_os in
5004 aix[[4-9]]*)
5005 # If we're using GNU nm, then we don't want the "-C" option.
d50284c4
CE
5006 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5007 # Without the "-l" option, or with the "-B" option, AIX nm treats
5008 # weak defined symbols like other global defined symbols, whereas
5009 # GNU nm marks them as "W".
5010 # While the 'weak' keyword is ignored in the Export File, we need
5011 # it in the Import File for the 'aix-soname' feature, so we have
5012 # to replace the "-B" option with "-P" for AIX nm.
8d138742 5013 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
d50284c4 5014 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8d138742 5015 else
d50284c4 5016 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8d138742
CE
5017 fi
5018 ;;
5019 pw32*)
d50284c4 5020 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
b0322a85 5021 ;;
8d138742 5022 cygwin* | mingw* | cegcc*)
b0322a85
CE
5023 case $cc_basename in
5024 cl*)
5025 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5026 ;;
5027 *)
5028 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5029 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5030 ;;
5031 esac
5032 ;;
8d138742
CE
5033 *)
5034 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
b0322a85 5035 ;;
8d138742 5036 esac
8d138742
CE
5037], [
5038 runpath_var=
5039 _LT_TAGVAR(allow_undefined_flag, $1)=
5040 _LT_TAGVAR(always_export_symbols, $1)=no
5041 _LT_TAGVAR(archive_cmds, $1)=
5042 _LT_TAGVAR(archive_expsym_cmds, $1)=
5043 _LT_TAGVAR(compiler_needs_object, $1)=no
5044 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5045 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5046 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5047 _LT_TAGVAR(hardcode_automatic, $1)=no
5048 _LT_TAGVAR(hardcode_direct, $1)=no
5049 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5050 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
5051 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5052 _LT_TAGVAR(hardcode_minus_L, $1)=no
5053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5054 _LT_TAGVAR(inherit_rpath, $1)=no
5055 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5056 _LT_TAGVAR(module_cmds, $1)=
5057 _LT_TAGVAR(module_expsym_cmds, $1)=
5058 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5059 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5060 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5062 # include_expsyms should be a list of space-separated symbols to be *always*
5063 # included in the symbol list
5064 _LT_TAGVAR(include_expsyms, $1)=
5065 # exclude_expsyms can be an extended regexp of symbols to exclude
d50284c4
CE
5066 # it will be wrapped by ' (' and ')$', so one must not match beginning or
5067 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5068 # as well as any symbol that contains 'd'.
8d138742
CE
5069 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5070 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5071 # platforms (ab)use it in PIC code, but their linkers get confused if
5072 # the symbol is explicitly referenced. Since portable code cannot
5073 # rely on this symbol name, it's probably fine to never include it in
5074 # preloaded symbol tables.
5075 # Exclude shared library initialization/finalization symbols.
5076dnl Note also adjust exclude_expsyms for C++ above.
5077 extract_expsyms_cmds=
d9898ee8 5078
8d138742
CE
5079 case $host_os in
5080 cygwin* | mingw* | pw32* | cegcc*)
5081 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5082 # When not using gcc, we currently assume that we are using
5083 # Microsoft Visual C++.
d50284c4 5084 if test yes != "$GCC"; then
8d138742
CE
5085 with_gnu_ld=no
5086 fi
5087 ;;
5088 interix*)
5089 # we just hope/assume this is gcc and not c89 (= MSVC++)
5090 with_gnu_ld=yes
5091 ;;
d50284c4 5092 openbsd* | bitrig*)
8d138742
CE
5093 with_gnu_ld=no
5094 ;;
5095 esac
d9898ee8 5096
8d138742 5097 _LT_TAGVAR(ld_shlibs, $1)=yes
b0322a85
CE
5098
5099 # On some targets, GNU ld is compatible enough with the native linker
5100 # that we're better off using the native interface for both.
5101 lt_use_gnu_ld_interface=no
d50284c4 5102 if test yes = "$with_gnu_ld"; then
b0322a85
CE
5103 case $host_os in
5104 aix*)
5105 # The AIX port of GNU ld has always aspired to compatibility
5106 # with the native linker. However, as the warning in the GNU ld
5107 # block says, versions before 2.19.5* couldn't really create working
5108 # shared libraries, regardless of the interface used.
5109 case `$LD -v 2>&1` in
5110 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5111 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5112 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5113 *)
5114 lt_use_gnu_ld_interface=yes
5115 ;;
5116 esac
5117 ;;
5118 *)
5119 lt_use_gnu_ld_interface=yes
5120 ;;
5121 esac
5122 fi
5123
d50284c4 5124 if test yes = "$lt_use_gnu_ld_interface"; then
8d138742 5125 # If archive_cmds runs LD, not CC, wlarc should be empty
d50284c4 5126 wlarc='$wl'
d9898ee8 5127
8d138742
CE
5128 # Set some defaults for GNU ld with shared library support. These
5129 # are reset later if shared libraries are not supported. Putting them
5130 # here allows them to be overridden if necessary.
5131 runpath_var=LD_RUN_PATH
d50284c4
CE
5132 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5133 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8d138742
CE
5134 # ancient GNU ld didn't support --whole-archive et. al.
5135 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
d50284c4 5136 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8d138742
CE
5137 else
5138 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5139 fi
5140 supports_anon_versioning=no
d50284c4 5141 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
b0322a85 5142 *GNU\ gold*) supports_anon_versioning=yes ;;
8d138742
CE
5143 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5144 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5145 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5146 *\ 2.11.*) ;; # other 2.11 versions
5147 *) supports_anon_versioning=yes ;;
5148 esac
d9898ee8 5149
8d138742
CE
5150 # See if GNU ld supports shared libraries.
5151 case $host_os in
5152 aix[[3-9]]*)
5153 # On AIX/PPC, the GNU linker is very broken
d50284c4 5154 if test ia64 != "$host_cpu"; then
8d138742
CE
5155 _LT_TAGVAR(ld_shlibs, $1)=no
5156 cat <<_LT_EOF 1>&2
d9898ee8 5157
b0322a85 5158*** Warning: the GNU linker, at least up to release 2.19, is reported
8d138742
CE
5159*** to be unable to reliably create shared libraries on AIX.
5160*** Therefore, libtool is disabling shared libraries support. If you
b0322a85
CE
5161*** really care for shared libraries, you may want to install binutils
5162*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5163*** You will then need to restart the configuration process.
d9898ee8 5164
8d138742
CE
5165_LT_EOF
5166 fi
5167 ;;
d9898ee8 5168
8d138742
CE
5169 amigaos*)
5170 case $host_cpu in
5171 powerpc)
5172 # see comment about AmigaOS4 .so support
d50284c4 5173 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8d138742
CE
5174 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5175 ;;
5176 m68k)
5177 _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)'
5178 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5179 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5180 ;;
5181 esac
5182 ;;
d9898ee8 5183
8d138742
CE
5184 beos*)
5185 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5186 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5187 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5188 # support --undefined. This deserves some investigation. FIXME
d50284c4 5189 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8d138742
CE
5190 else
5191 _LT_TAGVAR(ld_shlibs, $1)=no
5192 fi
5193 ;;
d9898ee8 5194
8d138742
CE
5195 cygwin* | mingw* | pw32* | cegcc*)
5196 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5197 # as there is no search path for DLLs.
5198 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
d50284c4 5199 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8d138742
CE
5200 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5201 _LT_TAGVAR(always_export_symbols, $1)=no
5202 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
b0322a85
CE
5203 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5204 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8d138742
CE
5205
5206 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
d50284c4
CE
5207 _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'
5208 # If the export-symbols file already is a .def file, use it as
5209 # is; otherwise, prepend EXPORTS...
5210 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5211 cp $export_symbols $output_objdir/$soname.def;
5212 else
5213 echo EXPORTS > $output_objdir/$soname.def;
5214 cat $export_symbols >> $output_objdir/$soname.def;
5215 fi~
5216 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8d138742
CE
5217 else
5218 _LT_TAGVAR(ld_shlibs, $1)=no
5219 fi
5220 ;;
d9898ee8 5221
b0322a85 5222 haiku*)
d50284c4 5223 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
b0322a85
CE
5224 _LT_TAGVAR(link_all_deplibs, $1)=yes
5225 ;;
5226
d50284c4
CE
5227 os2*)
5228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5229 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5230 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5231 shrext_cmds=.dll
5232 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5233 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5234 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5235 $ECHO EXPORTS >> $output_objdir/$libname.def~
5236 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5237 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5238 emximp -o $lib $output_objdir/$libname.def'
5239 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5240 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5241 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5242 $ECHO EXPORTS >> $output_objdir/$libname.def~
5243 prefix_cmds="$SED"~
5244 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5245 prefix_cmds="$prefix_cmds -e 1d";
5246 fi~
5247 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5248 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5249 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5250 emximp -o $lib $output_objdir/$libname.def'
5251 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5252 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5253 ;;
5254
8d138742
CE
5255 interix[[3-9]]*)
5256 _LT_TAGVAR(hardcode_direct, $1)=no
5257 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d50284c4
CE
5258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5259 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742
CE
5260 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5261 # Instead, shared libraries are loaded at an image base (0x10000000 by
5262 # default) and relocated if they conflict, which is a slow very memory
5263 # consuming and fragmenting process. To avoid this, we pick a random,
5264 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5265 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
d50284c4
CE
5266 _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'
5267 _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'
8d138742 5268 ;;
d9898ee8 5269
b0322a85 5270 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742 5271 tmp_diet=no
d50284c4 5272 if test linux-dietlibc = "$host_os"; then
8d138742
CE
5273 case $cc_basename in
5274 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5275 esac
5276 fi
5277 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
d50284c4 5278 && test no = "$tmp_diet"
8d138742 5279 then
b0322a85 5280 tmp_addflag=' $pic_flag'
8d138742
CE
5281 tmp_sharedflag='-shared'
5282 case $cc_basename,$host_cpu in
5283 pgcc*) # Portland Group C compiler
d50284c4 5284 _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'
8d138742
CE
5285 tmp_addflag=' $pic_flag'
5286 ;;
b0322a85
CE
5287 pgf77* | pgf90* | pgf95* | pgfortran*)
5288 # Portland Group f77 and f90 compilers
d50284c4 5289 _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'
8d138742
CE
5290 tmp_addflag=' $pic_flag -Mnomain' ;;
5291 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5292 tmp_addflag=' -i_dynamic' ;;
5293 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5294 tmp_addflag=' -i_dynamic -nofor_main' ;;
5295 ifc* | ifort*) # Intel Fortran compiler
5296 tmp_addflag=' -nofor_main' ;;
5297 lf95*) # Lahey Fortran 8.1
5298 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5299 tmp_sharedflag='--shared' ;;
d50284c4
CE
5300 nagfor*) # NAGFOR 5.3
5301 tmp_sharedflag='-Wl,-shared' ;;
b0322a85 5302 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8d138742
CE
5303 tmp_sharedflag='-qmkshrobj'
5304 tmp_addflag= ;;
b0322a85 5305 nvcc*) # Cuda Compiler Driver 2.2
d50284c4 5306 _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'
b0322a85
CE
5307 _LT_TAGVAR(compiler_needs_object, $1)=yes
5308 ;;
8d138742
CE
5309 esac
5310 case `$CC -V 2>&1 | sed 5q` in
5311 *Sun\ C*) # Sun C 5.9
d50284c4 5312 _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'
8d138742
CE
5313 _LT_TAGVAR(compiler_needs_object, $1)=yes
5314 tmp_sharedflag='-G' ;;
5315 *Sun\ F*) # Sun Fortran 8.3
5316 tmp_sharedflag='-G' ;;
5317 esac
d50284c4 5318 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
d9898ee8 5319
d50284c4 5320 if test yes = "$supports_anon_versioning"; then
8d138742 5321 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
d50284c4
CE
5322 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5323 echo "local: *; };" >> $output_objdir/$libname.ver~
5324 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8d138742 5325 fi
d9898ee8 5326
8d138742 5327 case $cc_basename in
d50284c4
CE
5328 tcc*)
5329 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5330 ;;
b0322a85 5331 xlf* | bgf* | bgxlf* | mpixlf*)
8d138742
CE
5332 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5333 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
d50284c4 5334 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
b0322a85 5335 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
d50284c4 5336 if test yes = "$supports_anon_versioning"; then
8d138742 5337 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
d50284c4
CE
5338 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5339 echo "local: *; };" >> $output_objdir/$libname.ver~
5340 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8d138742
CE
5341 fi
5342 ;;
5343 esac
5344 else
5345 _LT_TAGVAR(ld_shlibs, $1)=no
5346 fi
5347 ;;
d9898ee8 5348
8d138742
CE
5349 netbsd*)
5350 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5351 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5352 wlarc=
5353 else
d50284c4
CE
5354 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5355 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8d138742
CE
5356 fi
5357 ;;
d9898ee8 5358
8d138742
CE
5359 solaris*)
5360 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5361 _LT_TAGVAR(ld_shlibs, $1)=no
5362 cat <<_LT_EOF 1>&2
d9898ee8 5363
8d138742
CE
5364*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5365*** create shared libraries on Solaris systems. Therefore, libtool
5366*** is disabling shared libraries support. We urge you to upgrade GNU
5367*** binutils to release 2.9.1 or newer. Another option is to modify
5368*** your PATH or compiler configuration so that the native linker is
5369*** used, and then restart.
d9898ee8 5370
8d138742
CE
5371_LT_EOF
5372 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
d50284c4
CE
5373 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5374 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8d138742
CE
5375 else
5376 _LT_TAGVAR(ld_shlibs, $1)=no
5377 fi
5378 ;;
d9898ee8 5379
8d138742
CE
5380 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5381 case `$LD -v 2>&1` in
5382 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5383 _LT_TAGVAR(ld_shlibs, $1)=no
5384 cat <<_LT_EOF 1>&2
d9898ee8 5385
d50284c4 5386*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
8d138742
CE
5387*** reliably create shared libraries on SCO systems. Therefore, libtool
5388*** is disabling shared libraries support. We urge you to upgrade GNU
5389*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5390*** your PATH or compiler configuration so that the native linker is
5391*** used, and then restart.
d9898ee8 5392
8d138742
CE
5393_LT_EOF
5394 ;;
5395 *)
5396 # For security reasons, it is highly recommended that you always
5397 # use absolute paths for naming shared libraries, and exclude the
5398 # DT_RUNPATH tag from executables and libraries. But doing so
5399 # requires that you compile everything twice, which is a pain.
5400 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
d50284c4
CE
5401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5402 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5403 _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'
8d138742
CE
5404 else
5405 _LT_TAGVAR(ld_shlibs, $1)=no
5406 fi
5407 ;;
5408 esac
5409 ;;
d9898ee8 5410
8d138742
CE
5411 sunos4*)
5412 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5413 wlarc=
5414 _LT_TAGVAR(hardcode_direct, $1)=yes
5415 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5416 ;;
d9898ee8 5417
8d138742
CE
5418 *)
5419 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
d50284c4
CE
5420 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5421 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8d138742
CE
5422 else
5423 _LT_TAGVAR(ld_shlibs, $1)=no
5424 fi
5425 ;;
5426 esac
d9898ee8 5427
d50284c4 5428 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
8d138742
CE
5429 runpath_var=
5430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5431 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5432 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5433 fi
5434 else
5435 # PORTME fill in a description of your system's linker (not GNU ld)
5436 case $host_os in
5437 aix3*)
5438 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5439 _LT_TAGVAR(always_export_symbols, $1)=yes
5440 _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'
5441 # Note: this linker hardcodes the directories in LIBPATH if there
5442 # are no directories specified by -L.
5443 _LT_TAGVAR(hardcode_minus_L, $1)=yes
d50284c4 5444 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
8d138742
CE
5445 # Neither direct hardcoding nor static linking is supported with a
5446 # broken collect2.
5447 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5448 fi
5449 ;;
d9898ee8 5450
8d138742 5451 aix[[4-9]]*)
d50284c4 5452 if test ia64 = "$host_cpu"; then
8d138742
CE
5453 # On IA64, the linker does run time linking by default, so we don't
5454 # have to do anything special.
5455 aix_use_runtimelinking=no
5456 exp_sym_flag='-Bexport'
d50284c4 5457 no_entry_flag=
8d138742
CE
5458 else
5459 # If we're using GNU nm, then we don't want the "-C" option.
d50284c4
CE
5460 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5461 # Without the "-l" option, or with the "-B" option, AIX nm treats
5462 # weak defined symbols like other global defined symbols, whereas
5463 # GNU nm marks them as "W".
5464 # While the 'weak' keyword is ignored in the Export File, we need
5465 # it in the Import File for the 'aix-soname' feature, so we have
5466 # to replace the "-B" option with "-P" for AIX nm.
8d138742 5467 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
d50284c4 5468 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8d138742 5469 else
d50284c4 5470 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8d138742
CE
5471 fi
5472 aix_use_runtimelinking=no
d9898ee8 5473
8d138742
CE
5474 # Test if we are trying to use run time linking or normal
5475 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
d50284c4
CE
5476 # have runtime linking enabled, and use it for executables.
5477 # For shared libraries, we enable/disable runtime linking
5478 # depending on the kind of the shared library created -
5479 # when "with_aix_soname,aix_use_runtimelinking" is:
5480 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5481 # "aix,yes" lib.so shared, rtl:yes, for executables
5482 # lib.a static archive
5483 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5484 # lib.a(lib.so.V) shared, rtl:no, for executables
5485 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5486 # lib.a(lib.so.V) shared, rtl:no
5487 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5488 # lib.a static archive
8d138742
CE
5489 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5490 for ld_flag in $LDFLAGS; do
d50284c4 5491 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
8d138742
CE
5492 aix_use_runtimelinking=yes
5493 break
5494 fi
5495 done
d50284c4
CE
5496 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5497 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5498 # so we don't have lib.a shared libs to link our executables.
5499 # We have to force runtime linking in this case.
5500 aix_use_runtimelinking=yes
5501 LDFLAGS="$LDFLAGS -Wl,-brtl"
5502 fi
8d138742
CE
5503 ;;
5504 esac
d9898ee8 5505
8d138742
CE
5506 exp_sym_flag='-bexport'
5507 no_entry_flag='-bnoentry'
5508 fi
d9898ee8 5509
8d138742
CE
5510 # When large executables or shared objects are built, AIX ld can
5511 # have problems creating the table of contents. If linking a library
5512 # or program results in "error TOC overflow" add -mminimal-toc to
5513 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5514 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
d9898ee8 5515
8d138742
CE
5516 _LT_TAGVAR(archive_cmds, $1)=''
5517 _LT_TAGVAR(hardcode_direct, $1)=yes
5518 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5519 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5520 _LT_TAGVAR(link_all_deplibs, $1)=yes
d50284c4
CE
5521 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5522 case $with_aix_soname,$aix_use_runtimelinking in
5523 aix,*) ;; # traditional, no import file
5524 svr4,* | *,yes) # use import file
5525 # The Import File defines what to hardcode.
5526 _LT_TAGVAR(hardcode_direct, $1)=no
5527 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5528 ;;
5529 esac
d9898ee8 5530
d50284c4 5531 if test yes = "$GCC"; then
8d138742
CE
5532 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5533 # We only want to do this on AIX 4.2 and lower, the check
5534 # below for broken collect2 doesn't work under 4.3+
d50284c4 5535 collect2name=`$CC -print-prog-name=collect2`
8d138742
CE
5536 if test -f "$collect2name" &&
5537 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5538 then
5539 # We have reworked collect2
5540 :
5541 else
5542 # We have old collect2
5543 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5544 # It fails to find uninstalled libraries when the uninstalled
5545 # path is not listed in the libpath. Setting hardcode_minus_L
5546 # to unsupported forces relinking
5547 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5548 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5549 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5550 fi
5551 ;;
5552 esac
5553 shared_flag='-shared'
d50284c4
CE
5554 if test yes = "$aix_use_runtimelinking"; then
5555 shared_flag="$shared_flag "'$wl-G'
8d138742 5556 fi
d50284c4
CE
5557 # Need to ensure runtime linking is disabled for the traditional
5558 # shared library, or the linker may eventually find shared libraries
5559 # /with/ Import File - we do not want to mix them.
5560 shared_flag_aix='-shared'
5561 shared_flag_svr4='-shared $wl-G'
8d138742
CE
5562 else
5563 # not using gcc
d50284c4 5564 if test ia64 = "$host_cpu"; then
8d138742
CE
5565 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5566 # chokes on -Wl,-G. The following line is correct:
5567 shared_flag='-G'
5568 else
d50284c4
CE
5569 if test yes = "$aix_use_runtimelinking"; then
5570 shared_flag='$wl-G'
8d138742 5571 else
d50284c4 5572 shared_flag='$wl-bM:SRE'
8d138742 5573 fi
d50284c4
CE
5574 shared_flag_aix='$wl-bM:SRE'
5575 shared_flag_svr4='$wl-G'
8d138742
CE
5576 fi
5577 fi
d9898ee8 5578
d50284c4 5579 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8d138742
CE
5580 # It seems that -bexpall does not export symbols beginning with
5581 # underscore (_), so it is better to generate a list of symbols to export.
5582 _LT_TAGVAR(always_export_symbols, $1)=yes
d50284c4 5583 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8d138742
CE
5584 # Warning - without using the other runtime loading flags (-brtl),
5585 # -berok will link without error, but may produce a broken library.
5586 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5587 # Determine the default libpath from the value encoded in an
5588 # empty executable.
b0322a85 5589 _LT_SYS_MODULE_PATH_AIX([$1])
d50284c4
CE
5590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5591 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
8d138742 5592 else
d50284c4
CE
5593 if test ia64 = "$host_cpu"; then
5594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8d138742 5595 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
d50284c4 5596 _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"
8d138742
CE
5597 else
5598 # Determine the default libpath from the value encoded in an
5599 # empty executable.
b0322a85 5600 _LT_SYS_MODULE_PATH_AIX([$1])
d50284c4 5601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8d138742
CE
5602 # Warning - without using the other run time loading flags,
5603 # -berok will link without error, but may produce a broken library.
d50284c4
CE
5604 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5605 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5606 if test yes = "$with_gnu_ld"; then
b0322a85 5607 # We only use this code for GNU lds that support --whole-archive.
d50284c4 5608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
b0322a85
CE
5609 else
5610 # Exported symbols can be pulled into shared objects from archives
5611 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5612 fi
8d138742 5613 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
d50284c4
CE
5614 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5615 # -brtl affects multiple linker settings, -berok does not and is overridden later
5616 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5617 if test svr4 != "$with_aix_soname"; then
5618 # This is similar to how AIX traditionally builds its shared libraries.
5619 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5620 fi
5621 if test aix != "$with_aix_soname"; then
5622 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5623 else
5624 # used by -dlpreopen to get the symbols
5625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5626 fi
5627 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8d138742
CE
5628 fi
5629 fi
5630 ;;
d9898ee8 5631
8d138742
CE
5632 amigaos*)
5633 case $host_cpu in
5634 powerpc)
5635 # see comment about AmigaOS4 .so support
d50284c4 5636 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8d138742
CE
5637 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5638 ;;
5639 m68k)
5640 _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)'
5641 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5642 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5643 ;;
5644 esac
5645 ;;
d9898ee8 5646
8d138742
CE
5647 bsdi[[45]]*)
5648 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5649 ;;
d9898ee8 5650
8d138742
CE
5651 cygwin* | mingw* | pw32* | cegcc*)
5652 # When not using gcc, we currently assume that we are using
5653 # Microsoft Visual C++.
5654 # hardcode_libdir_flag_spec is actually meaningless, as there is
5655 # no search path for DLLs.
b0322a85
CE
5656 case $cc_basename in
5657 cl*)
5658 # Native MSVC
5659 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5660 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5661 _LT_TAGVAR(always_export_symbols, $1)=yes
5662 _LT_TAGVAR(file_list_spec, $1)='@'
5663 # Tell ltmain to make .lib files, not .a files.
5664 libext=lib
5665 # Tell ltmain to make .dll files, not .so files.
d50284c4 5666 shrext_cmds=.dll
b0322a85 5667 # FIXME: Setting linknames here is a bad hack.
d50284c4
CE
5668 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5669 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5670 cp "$export_symbols" "$output_objdir/$soname.def";
5671 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5672 else
5673 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5674 fi~
5675 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5676 linknames='
b0322a85
CE
5677 # The linker will not automatically build a static lib if we build a DLL.
5678 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5679 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5680 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5681 _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'
5682 # Don't use ranlib
5683 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5684 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
d50284c4
CE
5685 lt_tool_outputfile="@TOOL_OUTPUT@"~
5686 case $lt_outputfile in
5687 *.exe|*.EXE) ;;
5688 *)
5689 lt_outputfile=$lt_outputfile.exe
5690 lt_tool_outputfile=$lt_tool_outputfile.exe
5691 ;;
5692 esac~
5693 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5694 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5695 $RM "$lt_outputfile.manifest";
5696 fi'
b0322a85
CE
5697 ;;
5698 *)
5699 # Assume MSVC wrapper
5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5701 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5702 # Tell ltmain to make .lib files, not .a files.
5703 libext=lib
5704 # Tell ltmain to make .dll files, not .so files.
d50284c4 5705 shrext_cmds=.dll
b0322a85
CE
5706 # FIXME: Setting linknames here is a bad hack.
5707 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5708 # The linker will automatically build a .lib file if we build a DLL.
5709 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5710 # FIXME: Should let the user specify the lib program.
5711 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5712 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5713 ;;
5714 esac
8d138742 5715 ;;
d9898ee8 5716
8d138742
CE
5717 darwin* | rhapsody*)
5718 _LT_DARWIN_LINKER_FEATURES($1)
5719 ;;
d9898ee8 5720
8d138742
CE
5721 dgux*)
5722 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5724 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5725 ;;
d9898ee8 5726
8d138742
CE
5727 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5728 # support. Future versions do this automatically, but an explicit c++rt0.o
5729 # does not break anything, and helps significantly (at the cost of a little
5730 # extra space).
5731 freebsd2.2*)
5732 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5733 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5734 _LT_TAGVAR(hardcode_direct, $1)=yes
5735 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5736 ;;
d9898ee8 5737
8d138742 5738 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
b0322a85 5739 freebsd2.*)
8d138742
CE
5740 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5741 _LT_TAGVAR(hardcode_direct, $1)=yes
5742 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5743 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5744 ;;
d9898ee8 5745
8d138742
CE
5746 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5747 freebsd* | dragonfly*)
b0322a85 5748 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5749 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5750 _LT_TAGVAR(hardcode_direct, $1)=yes
5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5752 ;;
d9898ee8 5753
8d138742 5754 hpux9*)
d50284c4
CE
5755 if test yes = "$GCC"; then
5756 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8d138742 5757 else
d50284c4 5758 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8d138742 5759 fi
d50284c4 5760 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8d138742
CE
5761 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5762 _LT_TAGVAR(hardcode_direct, $1)=yes
d9898ee8 5763
8d138742
CE
5764 # hardcode_minus_L: Not really in the search PATH,
5765 # but as the default location of the library.
5766 _LT_TAGVAR(hardcode_minus_L, $1)=yes
d50284c4 5767 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742 5768 ;;
d9898ee8 5769
8d138742 5770 hpux10*)
d50284c4
CE
5771 if test yes,no = "$GCC,$with_gnu_ld"; then
5772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
d9898ee8 5773 else
8d138742 5774 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
d9898ee8 5775 fi
d50284c4
CE
5776 if test no = "$with_gnu_ld"; then
5777 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8d138742
CE
5778 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5779 _LT_TAGVAR(hardcode_direct, $1)=yes
5780 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
d50284c4 5781 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742
CE
5782 # hardcode_minus_L: Not really in the search PATH,
5783 # but as the default location of the library.
5784 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5785 fi
5786 ;;
d9898ee8 5787
8d138742 5788 hpux11*)
d50284c4 5789 if test yes,no = "$GCC,$with_gnu_ld"; then
8d138742
CE
5790 case $host_cpu in
5791 hppa*64*)
d50284c4 5792 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5793 ;;
5794 ia64*)
d50284c4 5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5796 ;;
5797 *)
d50284c4 5798 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5799 ;;
5800 esac
5801 else
5802 case $host_cpu in
5803 hppa*64*)
d50284c4 5804 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5805 ;;
5806 ia64*)
d50284c4 5807 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5808 ;;
5809 *)
b0322a85
CE
5810 m4_if($1, [], [
5811 # Older versions of the 11.00 compiler do not understand -b yet
5812 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5813 _LT_LINKER_OPTION([if $CC understands -b],
5814 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
d50284c4 5815 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
b0322a85 5816 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
d50284c4 5817 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
8d138742
CE
5818 ;;
5819 esac
5820 fi
d50284c4
CE
5821 if test no = "$with_gnu_ld"; then
5822 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8d138742 5823 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d9898ee8 5824
8d138742
CE
5825 case $host_cpu in
5826 hppa*64*|ia64*)
5827 _LT_TAGVAR(hardcode_direct, $1)=no
5828 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5829 ;;
5830 *)
5831 _LT_TAGVAR(hardcode_direct, $1)=yes
5832 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
d50284c4 5833 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
d9898ee8 5834
8d138742
CE
5835 # hardcode_minus_L: Not really in the search PATH,
5836 # but as the default location of the library.
5837 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5838 ;;
5839 esac
5840 fi
5841 ;;
d9898ee8 5842
8d138742 5843 irix5* | irix6* | nonstopux*)
d50284c4
CE
5844 if test yes = "$GCC"; then
5845 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
8d138742
CE
5846 # Try to use the -exported_symbol ld option, if it does not
5847 # work, assume that -exports_file does not work either and
5848 # implicitly export all symbols.
b0322a85
CE
5849 # This should be the same for all languages, so no per-tag cache variable.
5850 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5851 [lt_cv_irix_exported_symbol],
d50284c4
CE
5852 [save_LDFLAGS=$LDFLAGS
5853 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
b0322a85
CE
5854 AC_LINK_IFELSE(
5855 [AC_LANG_SOURCE(
5856 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5857 [C++], [[int foo (void) { return 0; }]],
5858 [Fortran 77], [[
5859 subroutine foo
5860 end]],
5861 [Fortran], [[
5862 subroutine foo
5863 end]])])],
5864 [lt_cv_irix_exported_symbol=yes],
5865 [lt_cv_irix_exported_symbol=no])
d50284c4
CE
5866 LDFLAGS=$save_LDFLAGS])
5867 if test yes = "$lt_cv_irix_exported_symbol"; then
5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
b0322a85 5869 fi
8d138742 5870 else
d50284c4
CE
5871 _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'
5872 _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'
8d138742
CE
5873 fi
5874 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
d50284c4 5875 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742
CE
5876 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5877 _LT_TAGVAR(inherit_rpath, $1)=yes
5878 _LT_TAGVAR(link_all_deplibs, $1)=yes
5879 ;;
d9898ee8 5880
d50284c4
CE
5881 linux*)
5882 case $cc_basename in
5883 tcc*)
5884 # Fabrice Bellard et al's Tiny C Compiler
5885 _LT_TAGVAR(ld_shlibs, $1)=yes
5886 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5887 ;;
5888 esac
5889 ;;
5890
8d138742
CE
5891 netbsd*)
5892 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5893 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
d9898ee8 5894 else
8d138742 5895 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
d9898ee8 5896 fi
8d138742
CE
5897 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5898 _LT_TAGVAR(hardcode_direct, $1)=yes
5899 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5900 ;;
d9898ee8 5901
8d138742
CE
5902 newsos6)
5903 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5904 _LT_TAGVAR(hardcode_direct, $1)=yes
d50284c4 5905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742
CE
5906 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5907 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5908 ;;
d9898ee8 5909
8d138742
CE
5910 *nto* | *qnx*)
5911 ;;
d9898ee8 5912
d50284c4 5913 openbsd* | bitrig*)
8d138742
CE
5914 if test -f /usr/libexec/ld.so; then
5915 _LT_TAGVAR(hardcode_direct, $1)=yes
5916 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5917 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
d50284c4 5918 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8d138742 5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
d50284c4
CE
5920 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5921 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5922 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742 5923 else
d50284c4
CE
5924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5925 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8d138742
CE
5926 fi
5927 else
5928 _LT_TAGVAR(ld_shlibs, $1)=no
5929 fi
5930 ;;
d9898ee8 5931
8d138742
CE
5932 os2*)
5933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5934 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5935 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
d50284c4
CE
5936 shrext_cmds=.dll
5937 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5938 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5939 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5940 $ECHO EXPORTS >> $output_objdir/$libname.def~
5941 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5942 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5943 emximp -o $lib $output_objdir/$libname.def'
5944 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5945 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5946 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5947 $ECHO EXPORTS >> $output_objdir/$libname.def~
5948 prefix_cmds="$SED"~
5949 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5950 prefix_cmds="$prefix_cmds -e 1d";
5951 fi~
5952 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5953 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5954 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5955 emximp -o $lib $output_objdir/$libname.def'
5956 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5957 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8d138742 5958 ;;
d9898ee8 5959
8d138742 5960 osf3*)
d50284c4
CE
5961 if test yes = "$GCC"; then
5962 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5963 _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'
8d138742
CE
5964 else
5965 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
d50284c4 5966 _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'
d9898ee8 5967 fi
8d138742 5968 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
d50284c4 5969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742 5970 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d9898ee8 5971 ;;
8d138742
CE
5972
5973 osf4* | osf5*) # as osf3* with the addition of -msym flag
d50284c4
CE
5974 if test yes = "$GCC"; then
5975 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5976 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5977 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742
CE
5978 else
5979 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
d50284c4 5980 _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'
8d138742 5981 _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~
d50284c4 5982 $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'
8d138742
CE
5983
5984 # Both c and cxx compiler support -rpath directly
5985 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5986 fi
5987 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5988 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d9898ee8 5989 ;;
8d138742
CE
5990
5991 solaris*)
5992 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
d50284c4
CE
5993 if test yes = "$GCC"; then
5994 wlarc='$wl'
5995 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742 5996 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
d50284c4 5997 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8d138742
CE
5998 else
5999 case `$CC -V 2>&1` in
6000 *"Compilers 5.0"*)
6001 wlarc=''
d50284c4 6002 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
8d138742 6003 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
d50284c4 6004 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
8d138742
CE
6005 ;;
6006 *)
d50284c4
CE
6007 wlarc='$wl'
6008 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742 6009 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
d50284c4 6010 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8d138742
CE
6011 ;;
6012 esac
6013 fi
6014 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6015 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6016 case $host_os in
6017 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6018 *)
6019 # The compiler driver will combine and reorder linker options,
d50284c4 6020 # but understands '-z linker_flag'. GCC discards it without '$wl',
8d138742
CE
6021 # but is careful enough not to reorder.
6022 # Supported since Solaris 2.6 (maybe 2.5.1?)
d50284c4
CE
6023 if test yes = "$GCC"; then
6024 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
8d138742
CE
6025 else
6026 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6027 fi
6028 ;;
6029 esac
6030 _LT_TAGVAR(link_all_deplibs, $1)=yes
d9898ee8 6031 ;;
8d138742
CE
6032
6033 sunos4*)
d50284c4 6034 if test sequent = "$host_vendor"; then
8d138742
CE
6035 # Use $CC to link under sequent, because it throws in some extra .o
6036 # files that make .init and .fini sections work.
d50284c4 6037 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
6038 else
6039 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6040 fi
6041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6042 _LT_TAGVAR(hardcode_direct, $1)=yes
6043 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6044 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d9898ee8 6045 ;;
8d138742
CE
6046
6047 sysv4)
6048 case $host_vendor in
6049 sni)
6050 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6051 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6052 ;;
6053 siemens)
6054 ## LD is ld it makes a PLAMLIB
6055 ## CC just makes a GrossModule.
6056 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6057 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6058 _LT_TAGVAR(hardcode_direct, $1)=no
6059 ;;
6060 motorola)
6061 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6062 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6063 ;;
6064 esac
6065 runpath_var='LD_RUN_PATH'
6066 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d9898ee8 6067 ;;
8d138742
CE
6068
6069 sysv4.3*)
6070 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6071 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6072 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
d9898ee8 6073 ;;
8d138742 6074
d9898ee8 6075 sysv4*MP*)
6076 if test -d /usr/nec; then
8d138742
CE
6077 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6078 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6079 runpath_var=LD_RUN_PATH
6080 hardcode_runpath_var=yes
6081 _LT_TAGVAR(ld_shlibs, $1)=yes
d9898ee8 6082 fi
6083 ;;
8d138742
CE
6084
6085 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
d50284c4 6086 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8d138742
CE
6087 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6088 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6089 runpath_var='LD_RUN_PATH'
6090
d50284c4
CE
6091 if test yes = "$GCC"; then
6092 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6093 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742 6094 else
d50284c4
CE
6095 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6096 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
6097 fi
6098 ;;
6099
6100 sysv5* | sco3.2v5* | sco5v6*)
d50284c4 6101 # Note: We CANNOT use -z defs as we might desire, because we do not
8d138742
CE
6102 # link with -lc, and that would cause any symbols used from libc to
6103 # always be unresolved, which means just about no library would
6104 # ever link correctly. If we're not using GNU ld we use -z text
6105 # though, which does catch some bad symbols but isn't as heavy-handed
6106 # as -z defs.
d50284c4
CE
6107 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6108 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
8d138742
CE
6109 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d50284c4 6111 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
8d138742
CE
6112 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6113 _LT_TAGVAR(link_all_deplibs, $1)=yes
d50284c4 6114 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
8d138742
CE
6115 runpath_var='LD_RUN_PATH'
6116
d50284c4
CE
6117 if test yes = "$GCC"; then
6118 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6119 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742 6120 else
d50284c4
CE
6121 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6122 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
6123 fi
6124 ;;
6125
6126 uts4*)
6127 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6128 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6129 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d9898ee8 6130 ;;
8d138742 6131
d9898ee8 6132 *)
8d138742 6133 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6134 ;;
6135 esac
8d138742 6136
d50284c4 6137 if test sni = "$host_vendor"; then
8d138742
CE
6138 case $host in
6139 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
d50284c4 6140 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
d9898ee8 6141 ;;
8d138742
CE
6142 esac
6143 fi
6144 fi
6145])
6146AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
d50284c4 6147test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
8d138742
CE
6148
6149_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6150
6151_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6152_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6153_LT_DECL([], [extract_expsyms_cmds], [2],
6154 [The commands to extract the exported symbol list from a shared archive])
6155
6156#
6157# Do we need to explicitly link libc?
6158#
6159case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6160x|xyes)
6161 # Assume -lc should be added
6162 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6163
d50284c4 6164 if test yes,yes = "$GCC,$enable_shared"; then
8d138742
CE
6165 case $_LT_TAGVAR(archive_cmds, $1) in
6166 *'~'*)
6167 # FIXME: we may have to deal with multi-command sequences.
6168 ;;
6169 '$CC '*)
6170 # Test whether the compiler implicitly links with -lc since on some
6171 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6172 # to ld, don't add -lc before -lgcc.
b0322a85
CE
6173 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6174 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6175 [$RM conftest*
6176 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6177
6178 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6179 soname=conftest
6180 lib=conftest
6181 libobjs=conftest.$ac_objext
6182 deplibs=
6183 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6184 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6185 compiler_flags=-v
6186 linker_flags=-v
6187 verstring=
6188 output_objdir=.
6189 libname=conftest
6190 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6191 _LT_TAGVAR(allow_undefined_flag, $1)=
6192 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6193 then
6194 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6195 else
6196 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6197 fi
6198 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6199 else
6200 cat conftest.err 1>&5
6201 fi
6202 $RM conftest*
6203 ])
6204 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
8d138742
CE
6205 ;;
6206 esac
6207 fi
6208 ;;
6209esac
6210
6211_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6212 [Whether or not to add -lc for building shared libraries])
6213_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6214 [enable_shared_with_static_runtimes], [0],
6215 [Whether or not to disallow shared libs when runtime libs are static])
6216_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6217 [Compiler flag to allow reflexive dlopens])
6218_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6219 [Compiler flag to generate shared objects directly from archives])
6220_LT_TAGDECL([], [compiler_needs_object], [1],
6221 [Whether the compiler copes with passing no objects directly])
6222_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6223 [Create an old-style archive from a shared archive])
6224_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6225 [Create a temporary old-style archive to link instead of a shared archive])
6226_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6227_LT_TAGDECL([], [archive_expsym_cmds], [2])
6228_LT_TAGDECL([], [module_cmds], [2],
6229 [Commands used to build a loadable module if different from building
6230 a shared archive.])
6231_LT_TAGDECL([], [module_expsym_cmds], [2])
6232_LT_TAGDECL([], [with_gnu_ld], [1],
6233 [Whether we are building with GNU ld or not])
6234_LT_TAGDECL([], [allow_undefined_flag], [1],
6235 [Flag that allows shared libraries with undefined symbols to be built])
6236_LT_TAGDECL([], [no_undefined_flag], [1],
6237 [Flag that enforces no undefined symbols])
6238_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6239 [Flag to hardcode $libdir into a binary during linking.
6240 This must work even if $libdir does not exist])
8d138742
CE
6241_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6242 [Whether we need a single "-rpath" flag with a separated argument])
6243_LT_TAGDECL([], [hardcode_direct], [0],
d50284c4 6244 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
8d138742
CE
6245 DIR into the resulting binary])
6246_LT_TAGDECL([], [hardcode_direct_absolute], [0],
d50284c4 6247 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
8d138742 6248 DIR into the resulting binary and the resulting library dependency is
d50284c4 6249 "absolute", i.e impossible to change by setting $shlibpath_var if the
8d138742
CE
6250 library is relocated])
6251_LT_TAGDECL([], [hardcode_minus_L], [0],
6252 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6253 into the resulting binary])
6254_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6255 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6256 into the resulting binary])
6257_LT_TAGDECL([], [hardcode_automatic], [0],
6258 [Set to "yes" if building a shared library automatically hardcodes DIR
6259 into the library and all subsequent libraries and executables linked
6260 against it])
6261_LT_TAGDECL([], [inherit_rpath], [0],
6262 [Set to yes if linker adds runtime paths of dependent libraries
6263 to runtime path list])
6264_LT_TAGDECL([], [link_all_deplibs], [0],
6265 [Whether libtool must link a program against all its dependency libraries])
8d138742
CE
6266_LT_TAGDECL([], [always_export_symbols], [0],
6267 [Set to "yes" if exported symbols are required])
6268_LT_TAGDECL([], [export_symbols_cmds], [2],
6269 [The commands to list exported symbols])
6270_LT_TAGDECL([], [exclude_expsyms], [1],
6271 [Symbols that should not be listed in the preloaded symbols])
6272_LT_TAGDECL([], [include_expsyms], [1],
6273 [Symbols that must always be exported])
6274_LT_TAGDECL([], [prelink_cmds], [2],
6275 [Commands necessary for linking programs (against libraries) with templates])
b0322a85
CE
6276_LT_TAGDECL([], [postlink_cmds], [2],
6277 [Commands necessary for finishing linking programs])
8d138742
CE
6278_LT_TAGDECL([], [file_list_spec], [1],
6279 [Specify filename containing input files])
6280dnl FIXME: Not yet implemented
6281dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6282dnl [Compiler flag to generate thread safe objects])
6283])# _LT_LINKER_SHLIBS
6284
6285
6286# _LT_LANG_C_CONFIG([TAG])
6287# ------------------------
6288# Ensure that the configuration variables for a C compiler are suitably
6289# defined. These variables are subsequently used by _LT_CONFIG to write
d50284c4 6290# the compiler configuration to 'libtool'.
8d138742
CE
6291m4_defun([_LT_LANG_C_CONFIG],
6292[m4_require([_LT_DECL_EGREP])dnl
d50284c4 6293lt_save_CC=$CC
8d138742
CE
6294AC_LANG_PUSH(C)
6295
6296# Source file extension for C test sources.
6297ac_ext=c
6298
6299# Object file extension for compiled C test sources.
6300objext=o
6301_LT_TAGVAR(objext, $1)=$objext
6302
6303# Code to be used in simple compile tests
6304lt_simple_compile_test_code="int some_variable = 0;"
6305
6306# Code to be used in simple link tests
6307lt_simple_link_test_code='int main(){return(0);}'
6308
6309_LT_TAG_COMPILER
6310# Save the default compiler, since it gets overwritten when the other
6311# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6312compiler_DEFAULT=$CC
6313
6314# save warnings/boilerplate of simple test code
6315_LT_COMPILER_BOILERPLATE
6316_LT_LINKER_BOILERPLATE
6317
6318if test -n "$compiler"; then
6319 _LT_COMPILER_NO_RTTI($1)
6320 _LT_COMPILER_PIC($1)
6321 _LT_COMPILER_C_O($1)
6322 _LT_COMPILER_FILE_LOCKS($1)
6323 _LT_LINKER_SHLIBS($1)
6324 _LT_SYS_DYNAMIC_LINKER($1)
6325 _LT_LINKER_HARDCODE_LIBPATH($1)
6326 LT_SYS_DLOPEN_SELF
6327 _LT_CMD_STRIPLIB
6328
d50284c4 6329 # Report what library types will actually be built
8d138742
CE
6330 AC_MSG_CHECKING([if libtool supports shared libraries])
6331 AC_MSG_RESULT([$can_build_shared])
6332
6333 AC_MSG_CHECKING([whether to build shared libraries])
d50284c4 6334 test no = "$can_build_shared" && enable_shared=no
8d138742
CE
6335
6336 # On AIX, shared libraries and static libraries use the same namespace, and
6337 # are all built from PIC.
6338 case $host_os in
6339 aix3*)
d50284c4 6340 test yes = "$enable_shared" && enable_static=no
8d138742
CE
6341 if test -n "$RANLIB"; then
6342 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6343 postinstall_cmds='$RANLIB $lib'
6344 fi
6345 ;;
6346
6347 aix[[4-9]]*)
d50284c4
CE
6348 if test ia64 != "$host_cpu"; then
6349 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6350 yes,aix,yes) ;; # shared object as lib.so file only
6351 yes,svr4,*) ;; # shared object as lib.so archive member only
6352 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6353 esac
8d138742
CE
6354 fi
6355 ;;
6356 esac
6357 AC_MSG_RESULT([$enable_shared])
6358
6359 AC_MSG_CHECKING([whether to build static libraries])
6360 # Make sure either enable_shared or enable_static is yes.
d50284c4 6361 test yes = "$enable_shared" || enable_static=yes
8d138742
CE
6362 AC_MSG_RESULT([$enable_static])
6363
6364 _LT_CONFIG($1)
6365fi
6366AC_LANG_POP
d50284c4 6367CC=$lt_save_CC
8d138742
CE
6368])# _LT_LANG_C_CONFIG
6369
6370
8d138742
CE
6371# _LT_LANG_CXX_CONFIG([TAG])
6372# --------------------------
6373# Ensure that the configuration variables for a C++ compiler are suitably
6374# defined. These variables are subsequently used by _LT_CONFIG to write
d50284c4 6375# the compiler configuration to 'libtool'.
8d138742 6376m4_defun([_LT_LANG_CXX_CONFIG],
b0322a85 6377[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8d138742 6378m4_require([_LT_DECL_EGREP])dnl
b0322a85 6379m4_require([_LT_PATH_MANIFEST_TOOL])dnl
d50284c4
CE
6380if test -n "$CXX" && ( test no != "$CXX" &&
6381 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6382 (test g++ != "$CXX"))); then
b0322a85
CE
6383 AC_PROG_CXXCPP
6384else
6385 _lt_caught_CXX_error=yes
6386fi
8d138742
CE
6387
6388AC_LANG_PUSH(C++)
6389_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6390_LT_TAGVAR(allow_undefined_flag, $1)=
6391_LT_TAGVAR(always_export_symbols, $1)=no
6392_LT_TAGVAR(archive_expsym_cmds, $1)=
6393_LT_TAGVAR(compiler_needs_object, $1)=no
6394_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6395_LT_TAGVAR(hardcode_direct, $1)=no
6396_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6397_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
6398_LT_TAGVAR(hardcode_libdir_separator, $1)=
6399_LT_TAGVAR(hardcode_minus_L, $1)=no
6400_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6401_LT_TAGVAR(hardcode_automatic, $1)=no
6402_LT_TAGVAR(inherit_rpath, $1)=no
6403_LT_TAGVAR(module_cmds, $1)=
6404_LT_TAGVAR(module_expsym_cmds, $1)=
6405_LT_TAGVAR(link_all_deplibs, $1)=unknown
6406_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
6407_LT_TAGVAR(reload_flag, $1)=$reload_flag
6408_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
6409_LT_TAGVAR(no_undefined_flag, $1)=
6410_LT_TAGVAR(whole_archive_flag_spec, $1)=
6411_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6412
6413# Source file extension for C++ test sources.
6414ac_ext=cpp
6415
6416# Object file extension for compiled C++ test sources.
6417objext=o
6418_LT_TAGVAR(objext, $1)=$objext
6419
6420# No sense in running all these tests if we already determined that
6421# the CXX compiler isn't working. Some variables (like enable_shared)
6422# are currently assumed to apply to all compilers on this platform,
6423# and will be corrupted by setting them based on a non-working compiler.
d50284c4 6424if test yes != "$_lt_caught_CXX_error"; then
8d138742
CE
6425 # Code to be used in simple compile tests
6426 lt_simple_compile_test_code="int some_variable = 0;"
6427
6428 # Code to be used in simple link tests
6429 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6430
6431 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6432 _LT_TAG_COMPILER
6433
6434 # save warnings/boilerplate of simple test code
6435 _LT_COMPILER_BOILERPLATE
6436 _LT_LINKER_BOILERPLATE
6437
6438 # Allow CC to be a program name with arguments.
6439 lt_save_CC=$CC
b0322a85 6440 lt_save_CFLAGS=$CFLAGS
8d138742
CE
6441 lt_save_LD=$LD
6442 lt_save_GCC=$GCC
6443 GCC=$GXX
6444 lt_save_with_gnu_ld=$with_gnu_ld
6445 lt_save_path_LD=$lt_cv_path_LD
6446 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6447 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6448 else
6449 $as_unset lt_cv_prog_gnu_ld
6450 fi
6451 if test -n "${lt_cv_path_LDCXX+set}"; then
6452 lt_cv_path_LD=$lt_cv_path_LDCXX
6453 else
6454 $as_unset lt_cv_path_LD
6455 fi
6456 test -z "${LDCXX+set}" || LD=$LDCXX
6457 CC=${CXX-"c++"}
b0322a85 6458 CFLAGS=$CXXFLAGS
8d138742
CE
6459 compiler=$CC
6460 _LT_TAGVAR(compiler, $1)=$CC
6461 _LT_CC_BASENAME([$compiler])
6462
6463 if test -n "$compiler"; then
6464 # We don't want -fno-exception when compiling C++ code, so set the
6465 # no_builtin_flag separately
d50284c4 6466 if test yes = "$GXX"; then
8d138742
CE
6467 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6468 else
6469 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6470 fi
6471
d50284c4 6472 if test yes = "$GXX"; then
8d138742
CE
6473 # Set up default GNU C++ configuration
6474
6475 LT_PATH_LD
6476
6477 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6478 # archiving commands below assume that GNU ld is being used.
d50284c4
CE
6479 if test yes = "$with_gnu_ld"; then
6480 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6481 _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'
8d138742 6482
d50284c4
CE
6483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6484 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8d138742
CE
6485
6486 # If archive_cmds runs LD, not CC, wlarc should be empty
6487 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6488 # investigate it a little bit more. (MM)
d50284c4 6489 wlarc='$wl'
8d138742
CE
6490
6491 # ancient GNU ld didn't support --whole-archive et. al.
6492 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6493 $GREP 'no-whole-archive' > /dev/null; then
d50284c4 6494 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8d138742
CE
6495 else
6496 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6497 fi
6498 else
6499 with_gnu_ld=no
6500 wlarc=
6501
6502 # A generic and very simple default shared library creation
6503 # command for GNU C++ for the case where it uses the native
6504 # linker, instead of GNU ld. If possible, this setting should
6505 # overridden to take advantage of the native linker features on
6506 # the platform it is being used on.
6507 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6508 fi
6509
6510 # Commands to make compiler produce verbose output that lists
6511 # what "hidden" libraries, object files and flags are used when
6512 # linking a shared library.
b0322a85 6513 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
6514
6515 else
6516 GXX=no
6517 with_gnu_ld=no
6518 wlarc=
6519 fi
6520
6521 # PORTME: fill in a description of your system's C++ link characteristics
6522 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6523 _LT_TAGVAR(ld_shlibs, $1)=yes
6524 case $host_os in
6525 aix3*)
6526 # FIXME: insert proper C++ library support
6527 _LT_TAGVAR(ld_shlibs, $1)=no
6528 ;;
6529 aix[[4-9]]*)
d50284c4 6530 if test ia64 = "$host_cpu"; then
8d138742
CE
6531 # On IA64, the linker does run time linking by default, so we don't
6532 # have to do anything special.
6533 aix_use_runtimelinking=no
6534 exp_sym_flag='-Bexport'
d50284c4 6535 no_entry_flag=
8d138742
CE
6536 else
6537 aix_use_runtimelinking=no
6538
6539 # Test if we are trying to use run time linking or normal
6540 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
d50284c4
CE
6541 # have runtime linking enabled, and use it for executables.
6542 # For shared libraries, we enable/disable runtime linking
6543 # depending on the kind of the shared library created -
6544 # when "with_aix_soname,aix_use_runtimelinking" is:
6545 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6546 # "aix,yes" lib.so shared, rtl:yes, for executables
6547 # lib.a static archive
6548 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6549 # lib.a(lib.so.V) shared, rtl:no, for executables
6550 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6551 # lib.a(lib.so.V) shared, rtl:no
6552 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6553 # lib.a static archive
8d138742
CE
6554 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6555 for ld_flag in $LDFLAGS; do
6556 case $ld_flag in
6557 *-brtl*)
6558 aix_use_runtimelinking=yes
6559 break
6560 ;;
6561 esac
6562 done
d50284c4
CE
6563 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6564 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6565 # so we don't have lib.a shared libs to link our executables.
6566 # We have to force runtime linking in this case.
6567 aix_use_runtimelinking=yes
6568 LDFLAGS="$LDFLAGS -Wl,-brtl"
6569 fi
8d138742
CE
6570 ;;
6571 esac
6572
6573 exp_sym_flag='-bexport'
6574 no_entry_flag='-bnoentry'
6575 fi
6576
6577 # When large executables or shared objects are built, AIX ld can
6578 # have problems creating the table of contents. If linking a library
6579 # or program results in "error TOC overflow" add -mminimal-toc to
6580 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6581 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6582
6583 _LT_TAGVAR(archive_cmds, $1)=''
6584 _LT_TAGVAR(hardcode_direct, $1)=yes
6585 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6586 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6587 _LT_TAGVAR(link_all_deplibs, $1)=yes
d50284c4
CE
6588 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6589 case $with_aix_soname,$aix_use_runtimelinking in
6590 aix,*) ;; # no import file
6591 svr4,* | *,yes) # use import file
6592 # The Import File defines what to hardcode.
6593 _LT_TAGVAR(hardcode_direct, $1)=no
6594 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6595 ;;
6596 esac
8d138742 6597
d50284c4 6598 if test yes = "$GXX"; then
8d138742
CE
6599 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6600 # We only want to do this on AIX 4.2 and lower, the check
6601 # below for broken collect2 doesn't work under 4.3+
d50284c4 6602 collect2name=`$CC -print-prog-name=collect2`
8d138742
CE
6603 if test -f "$collect2name" &&
6604 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6605 then
6606 # We have reworked collect2
6607 :
6608 else
6609 # We have old collect2
6610 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6611 # It fails to find uninstalled libraries when the uninstalled
6612 # path is not listed in the libpath. Setting hardcode_minus_L
6613 # to unsupported forces relinking
6614 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6616 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6617 fi
6618 esac
6619 shared_flag='-shared'
d50284c4
CE
6620 if test yes = "$aix_use_runtimelinking"; then
6621 shared_flag=$shared_flag' $wl-G'
8d138742 6622 fi
d50284c4
CE
6623 # Need to ensure runtime linking is disabled for the traditional
6624 # shared library, or the linker may eventually find shared libraries
6625 # /with/ Import File - we do not want to mix them.
6626 shared_flag_aix='-shared'
6627 shared_flag_svr4='-shared $wl-G'
8d138742
CE
6628 else
6629 # not using gcc
d50284c4 6630 if test ia64 = "$host_cpu"; then
8d138742
CE
6631 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6632 # chokes on -Wl,-G. The following line is correct:
6633 shared_flag='-G'
6634 else
d50284c4
CE
6635 if test yes = "$aix_use_runtimelinking"; then
6636 shared_flag='$wl-G'
8d138742 6637 else
d50284c4 6638 shared_flag='$wl-bM:SRE'
8d138742 6639 fi
d50284c4
CE
6640 shared_flag_aix='$wl-bM:SRE'
6641 shared_flag_svr4='$wl-G'
8d138742
CE
6642 fi
6643 fi
6644
d50284c4 6645 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8d138742
CE
6646 # It seems that -bexpall does not export symbols beginning with
6647 # underscore (_), so it is better to generate a list of symbols to
6648 # export.
6649 _LT_TAGVAR(always_export_symbols, $1)=yes
d50284c4 6650 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8d138742
CE
6651 # Warning - without using the other runtime loading flags (-brtl),
6652 # -berok will link without error, but may produce a broken library.
d50284c4
CE
6653 # The "-G" linker flag allows undefined symbols.
6654 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
8d138742
CE
6655 # Determine the default libpath from the value encoded in an empty
6656 # executable.
b0322a85 6657 _LT_SYS_MODULE_PATH_AIX([$1])
d50284c4 6658 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8d138742 6659
d50284c4 6660 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
8d138742 6661 else
d50284c4
CE
6662 if test ia64 = "$host_cpu"; then
6663 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8d138742 6664 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
d50284c4 6665 _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"
8d138742
CE
6666 else
6667 # Determine the default libpath from the value encoded in an
6668 # empty executable.
b0322a85 6669 _LT_SYS_MODULE_PATH_AIX([$1])
d50284c4 6670 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8d138742
CE
6671 # Warning - without using the other run time loading flags,
6672 # -berok will link without error, but may produce a broken library.
d50284c4
CE
6673 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6674 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6675 if test yes = "$with_gnu_ld"; then
b0322a85 6676 # We only use this code for GNU lds that support --whole-archive.
d50284c4 6677 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
b0322a85
CE
6678 else
6679 # Exported symbols can be pulled into shared objects from archives
6680 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6681 fi
8d138742 6682 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
d50284c4
CE
6683 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6684 # -brtl affects multiple linker settings, -berok does not and is overridden later
6685 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6686 if test svr4 != "$with_aix_soname"; then
6687 # This is similar to how AIX traditionally builds its shared
6688 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6689 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6690 fi
6691 if test aix != "$with_aix_soname"; then
6692 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6693 else
6694 # used by -dlpreopen to get the symbols
6695 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6696 fi
6697 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8d138742
CE
6698 fi
6699 fi
6700 ;;
6701
6702 beos*)
6703 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6704 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6705 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6706 # support --undefined. This deserves some investigation. FIXME
d50284c4 6707 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8d138742
CE
6708 else
6709 _LT_TAGVAR(ld_shlibs, $1)=no
6710 fi
d9898ee8 6711 ;;
8d138742
CE
6712
6713 chorus*)
6714 case $cc_basename in
6715 *)
6716 # FIXME: insert proper C++ library support
6717 _LT_TAGVAR(ld_shlibs, $1)=no
6718 ;;
6719 esac
6720 ;;
6721
6722 cygwin* | mingw* | pw32* | cegcc*)
b0322a85
CE
6723 case $GXX,$cc_basename in
6724 ,cl* | no,cl*)
6725 # Native MSVC
6726 # hardcode_libdir_flag_spec is actually meaningless, as there is
6727 # no search path for DLLs.
6728 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6729 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6730 _LT_TAGVAR(always_export_symbols, $1)=yes
6731 _LT_TAGVAR(file_list_spec, $1)='@'
6732 # Tell ltmain to make .lib files, not .a files.
6733 libext=lib
6734 # Tell ltmain to make .dll files, not .so files.
d50284c4 6735 shrext_cmds=.dll
b0322a85 6736 # FIXME: Setting linknames here is a bad hack.
d50284c4
CE
6737 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6738 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6739 cp "$export_symbols" "$output_objdir/$soname.def";
6740 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6741 else
6742 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6743 fi~
6744 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6745 linknames='
b0322a85
CE
6746 # The linker will not automatically build a static lib if we build a DLL.
6747 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6748 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6749 # Don't use ranlib
6750 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6751 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
d50284c4
CE
6752 lt_tool_outputfile="@TOOL_OUTPUT@"~
6753 case $lt_outputfile in
6754 *.exe|*.EXE) ;;
6755 *)
6756 lt_outputfile=$lt_outputfile.exe
6757 lt_tool_outputfile=$lt_tool_outputfile.exe
6758 ;;
6759 esac~
6760 func_to_tool_file "$lt_outputfile"~
6761 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6762 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6763 $RM "$lt_outputfile.manifest";
6764 fi'
b0322a85
CE
6765 ;;
6766 *)
6767 # g++
6768 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6769 # as there is no search path for DLLs.
6770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
d50284c4 6771 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
b0322a85
CE
6772 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6773 _LT_TAGVAR(always_export_symbols, $1)=no
6774 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6775
6776 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
d50284c4
CE
6777 _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'
6778 # If the export-symbols file already is a .def file, use it as
6779 # is; otherwise, prepend EXPORTS...
6780 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6781 cp $export_symbols $output_objdir/$soname.def;
6782 else
6783 echo EXPORTS > $output_objdir/$soname.def;
6784 cat $export_symbols >> $output_objdir/$soname.def;
6785 fi~
6786 $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'
b0322a85
CE
6787 else
6788 _LT_TAGVAR(ld_shlibs, $1)=no
6789 fi
6790 ;;
6791 esac
6792 ;;
8d138742
CE
6793 darwin* | rhapsody*)
6794 _LT_DARWIN_LINKER_FEATURES($1)
d9898ee8 6795 ;;
8d138742 6796
d50284c4
CE
6797 os2*)
6798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6799 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6800 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6801 shrext_cmds=.dll
6802 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6803 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6804 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6805 $ECHO EXPORTS >> $output_objdir/$libname.def~
6806 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6807 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6808 emximp -o $lib $output_objdir/$libname.def'
6809 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6810 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6811 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6812 $ECHO EXPORTS >> $output_objdir/$libname.def~
6813 prefix_cmds="$SED"~
6814 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6815 prefix_cmds="$prefix_cmds -e 1d";
6816 fi~
6817 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6818 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6819 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6820 emximp -o $lib $output_objdir/$libname.def'
6821 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6822 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6823 ;;
6824
8d138742
CE
6825 dgux*)
6826 case $cc_basename in
6827 ec++*)
6828 # FIXME: insert proper C++ library support
6829 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6830 ;;
8d138742
CE
6831 ghcx*)
6832 # Green Hills C++ Compiler
6833 # FIXME: insert proper C++ library support
6834 _LT_TAGVAR(ld_shlibs, $1)=no
6835 ;;
6836 *)
6837 # FIXME: insert proper C++ library support
6838 _LT_TAGVAR(ld_shlibs, $1)=no
6839 ;;
6840 esac
6841 ;;
6842
b0322a85 6843 freebsd2.*)
8d138742
CE
6844 # C++ shared libraries reported to be fairly broken before
6845 # switch to ELF
6846 _LT_TAGVAR(ld_shlibs, $1)=no
6847 ;;
6848
6849 freebsd-elf*)
6850 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6851 ;;
6852
6853 freebsd* | dragonfly*)
6854 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6855 # conventions
6856 _LT_TAGVAR(ld_shlibs, $1)=yes
6857 ;;
6858
b0322a85 6859 haiku*)
d50284c4 6860 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
b0322a85
CE
6861 _LT_TAGVAR(link_all_deplibs, $1)=yes
6862 ;;
6863
8d138742 6864 hpux9*)
d50284c4 6865 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8d138742 6866 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d50284c4 6867 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742
CE
6868 _LT_TAGVAR(hardcode_direct, $1)=yes
6869 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6870 # but as the default
6871 # location of the library.
6872
6873 case $cc_basename in
6874 CC*)
6875 # FIXME: insert proper C++ library support
6876 _LT_TAGVAR(ld_shlibs, $1)=no
6877 ;;
6878 aCC*)
d50284c4 6879 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8d138742
CE
6880 # Commands to make compiler produce verbose output that lists
6881 # what "hidden" libraries, object files and flags are used when
6882 # linking a shared library.
6883 #
6884 # There doesn't appear to be a way to prevent this compiler from
6885 # explicitly linking system object files so we need to strip them
6886 # from the output so that they don't get included in the library
6887 # dependencies.
d50284c4 6888 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"'
8d138742
CE
6889 ;;
6890 *)
d50284c4
CE
6891 if test yes = "$GXX"; then
6892 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
8d138742
CE
6893 else
6894 # FIXME: insert proper C++ library support
6895 _LT_TAGVAR(ld_shlibs, $1)=no
6896 fi
6897 ;;
6898 esac
6899 ;;
6900
6901 hpux10*|hpux11*)
d50284c4
CE
6902 if test no = "$with_gnu_ld"; then
6903 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8d138742
CE
6904 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6905
6906 case $host_cpu in
6907 hppa*64*|ia64*)
6908 ;;
6909 *)
d50284c4 6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742
CE
6911 ;;
6912 esac
6913 fi
6914 case $host_cpu in
6915 hppa*64*|ia64*)
6916 _LT_TAGVAR(hardcode_direct, $1)=no
6917 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6918 ;;
6919 *)
6920 _LT_TAGVAR(hardcode_direct, $1)=yes
6921 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6922 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6923 # but as the default
6924 # location of the library.
6925 ;;
6926 esac
6927
6928 case $cc_basename in
6929 CC*)
6930 # FIXME: insert proper C++ library support
6931 _LT_TAGVAR(ld_shlibs, $1)=no
6932 ;;
6933 aCC*)
d9898ee8 6934 case $host_cpu in
8d138742 6935 hppa*64*)
d50284c4 6936 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8d138742
CE
6937 ;;
6938 ia64*)
d50284c4 6939 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8d138742
CE
6940 ;;
6941 *)
d50284c4 6942 _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'
8d138742 6943 ;;
d9898ee8 6944 esac
8d138742
CE
6945 # Commands to make compiler produce verbose output that lists
6946 # what "hidden" libraries, object files and flags are used when
6947 # linking a shared library.
6948 #
6949 # There doesn't appear to be a way to prevent this compiler from
6950 # explicitly linking system object files so we need to strip them
6951 # from the output so that they don't get included in the library
6952 # dependencies.
d50284c4 6953 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"'
d9898ee8 6954 ;;
8d138742 6955 *)
d50284c4
CE
6956 if test yes = "$GXX"; then
6957 if test no = "$with_gnu_ld"; then
8d138742
CE
6958 case $host_cpu in
6959 hppa*64*)
d50284c4 6960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8d138742
CE
6961 ;;
6962 ia64*)
d50284c4 6963 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8d138742
CE
6964 ;;
6965 *)
d50284c4 6966 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8d138742
CE
6967 ;;
6968 esac
6969 fi
6970 else
6971 # FIXME: insert proper C++ library support
6972 _LT_TAGVAR(ld_shlibs, $1)=no
6973 fi
d9898ee8 6974 ;;
8d138742
CE
6975 esac
6976 ;;
6977
6978 interix[[3-9]]*)
6979 _LT_TAGVAR(hardcode_direct, $1)=no
6980 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d50284c4
CE
6981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6982 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8d138742
CE
6983 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6984 # Instead, shared libraries are loaded at an image base (0x10000000 by
6985 # default) and relocated if they conflict, which is a slow very memory
6986 # consuming and fragmenting process. To avoid this, we pick a random,
6987 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6988 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
d50284c4
CE
6989 _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'
6990 _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'
d9898ee8 6991 ;;
8d138742
CE
6992 irix5* | irix6*)
6993 case $cc_basename in
6994 CC*)
6995 # SGI C++
d50284c4 6996 _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'
8d138742
CE
6997
6998 # Archives containing C++ object files must be created using
6999 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7000 # necessary to make sure instantiated templates are included
7001 # in the archive.
7002 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
d9898ee8 7003 ;;
8d138742 7004 *)
d50284c4
CE
7005 if test yes = "$GXX"; then
7006 if test no = "$with_gnu_ld"; then
7007 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
8d138742 7008 else
d50284c4 7009 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
8d138742
CE
7010 fi
7011 fi
7012 _LT_TAGVAR(link_all_deplibs, $1)=yes
d9898ee8 7013 ;;
8d138742 7014 esac
d50284c4 7015 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742
CE
7016 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7017 _LT_TAGVAR(inherit_rpath, $1)=yes
7018 ;;
7019
d50284c4 7020 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8d138742
CE
7021 case $cc_basename in
7022 KCC*)
7023 # Kuck and Associates, Inc. (KAI) C++ Compiler
7024
7025 # KCC will only create a shared library if the output file
7026 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7027 # to its proper name (with version) after linking.
d50284c4
CE
7028 _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'
7029 _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'
8d138742
CE
7030 # Commands to make compiler produce verbose output that lists
7031 # what "hidden" libraries, object files and flags are used when
7032 # linking a shared library.
7033 #
7034 # There doesn't appear to be a way to prevent this compiler from
7035 # explicitly linking system object files so we need to strip them
7036 # from the output so that they don't get included in the library
7037 # dependencies.
d50284c4 7038 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"'
8d138742 7039
d50284c4
CE
7040 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7041 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8d138742
CE
7042
7043 # Archives containing C++ object files must be created using
7044 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7045 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
d9898ee8 7046 ;;
8d138742 7047 icpc* | ecpc* )
d9898ee8 7048 # Intel C++
8d138742
CE
7049 with_gnu_ld=yes
7050 # version 8.0 and above of icpc choke on multiply defined symbols
7051 # if we add $predep_objects and $postdep_objects, however 7.1 and
7052 # earlier do not add the objects themselves.
7053 case `$CC -V 2>&1` in
7054 *"Version 7."*)
d50284c4
CE
7055 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7056 _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'
8d138742
CE
7057 ;;
7058 *) # Version 8.0 or newer
7059 tmp_idyn=
7060 case $host_cpu in
7061 ia64*) tmp_idyn=' -i_dynamic';;
7062 esac
d50284c4
CE
7063 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7064 _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'
8d138742
CE
7065 ;;
7066 esac
7067 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
d50284c4
CE
7068 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7069 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7070 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
d9898ee8 7071 ;;
8d138742
CE
7072 pgCC* | pgcpp*)
7073 # Portland Group C++ compiler
7074 case `$CC -V` in
b0322a85 7075 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8d138742 7076 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
d50284c4
CE
7077 rm -rf $tpldir~
7078 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7079 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8d138742 7080 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
d50284c4
CE
7081 rm -rf $tpldir~
7082 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7083 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7084 $RANLIB $oldlib'
8d138742 7085 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
d50284c4
CE
7086 rm -rf $tpldir~
7087 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7088 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8d138742 7089 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
d50284c4
CE
7090 rm -rf $tpldir~
7091 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7092 $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'
8d138742 7093 ;;
b0322a85 7094 *) # Version 6 and above use weak symbols
d50284c4
CE
7095 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7096 _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'
8d138742
CE
7097 ;;
7098 esac
7099
d50284c4
CE
7100 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7101 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7102 _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'
8d138742 7103 ;;
d9898ee8 7104 cxx*)
7105 # Compaq C++
d50284c4
CE
7106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7107 _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'
8d138742
CE
7108
7109 runpath_var=LD_RUN_PATH
7110 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7111 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7112
7113 # Commands to make compiler produce verbose output that lists
7114 # what "hidden" libraries, object files and flags are used when
7115 # linking a shared library.
7116 #
7117 # There doesn't appear to be a way to prevent this compiler from
7118 # explicitly linking system object files so we need to strip them
7119 # from the output so that they don't get included in the library
7120 # dependencies.
d50284c4 7121 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'
8d138742 7122 ;;
b0322a85 7123 xl* | mpixl* | bgxl*)
8d138742 7124 # IBM XL 8.0 on PPC, with GNU ld
d50284c4
CE
7125 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7126 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7127 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7128 if test yes = "$supports_anon_versioning"; then
8d138742 7129 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
d50284c4
CE
7130 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7131 echo "local: *; };" >> $output_objdir/$libname.ver~
7132 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8d138742 7133 fi
d9898ee8 7134 ;;
7135 *)
ac40fd9e 7136 case `$CC -V 2>&1 | sed 5q` in
7137 *Sun\ C*)
7138 # Sun C++ 5.9
8d138742 7139 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
d50284c4
CE
7140 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7141 _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'
8d138742 7142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
d50284c4 7143 _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'
8d138742
CE
7144 _LT_TAGVAR(compiler_needs_object, $1)=yes
7145
7146 # Not sure whether something based on
7147 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7148 # would be better.
b0322a85 7149 output_verbose_link_cmd='func_echo_all'
8d138742
CE
7150
7151 # Archives containing C++ object files must be created using
7152 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7153 # necessary to make sure instantiated templates are included
7154 # in the archive.
7155 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
ac40fd9e 7156 ;;
7157 esac
d9898ee8 7158 ;;
7159 esac
7160 ;;
8d138742 7161
d9898ee8 7162 lynxos*)
8d138742
CE
7163 # FIXME: insert proper C++ library support
7164 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7165 ;;
8d138742 7166
d9898ee8 7167 m88k*)
8d138742
CE
7168 # FIXME: insert proper C++ library support
7169 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7170 ;;
8d138742 7171
d9898ee8 7172 mvs*)
8d138742
CE
7173 case $cc_basename in
7174 cxx*)
7175 # FIXME: insert proper C++ library support
7176 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7177 ;;
7178 *)
8d138742
CE
7179 # FIXME: insert proper C++ library support
7180 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7181 ;;
7182 esac
7183 ;;
8d138742 7184
d9898ee8 7185 netbsd*)
8d138742
CE
7186 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7187 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7188 wlarc=
7189 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7190 _LT_TAGVAR(hardcode_direct, $1)=yes
7191 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7192 fi
7193 # Workaround some broken pre-1.5 toolchains
7194 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7195 ;;
7196
7197 *nto* | *qnx*)
7198 _LT_TAGVAR(ld_shlibs, $1)=yes
7199 ;;
7200
d50284c4 7201 openbsd* | bitrig*)
8d138742
CE
7202 if test -f /usr/libexec/ld.so; then
7203 _LT_TAGVAR(hardcode_direct, $1)=yes
7204 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7205 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7206 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
d50284c4
CE
7207 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7208 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7209 _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'
7210 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7211 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8d138742 7212 fi
b0322a85 7213 output_verbose_link_cmd=func_echo_all
8d138742
CE
7214 else
7215 _LT_TAGVAR(ld_shlibs, $1)=no
7216 fi
d9898ee8 7217 ;;
8d138742 7218
d9898ee8 7219 osf3* | osf4* | osf5*)
8d138742
CE
7220 case $cc_basename in
7221 KCC*)
7222 # Kuck and Associates, Inc. (KAI) C++ Compiler
7223
7224 # KCC will only create a shared library if the output file
7225 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7226 # to its proper name (with version) after linking.
d50284c4 7227 _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'
8d138742 7228
d50284c4 7229 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8d138742
CE
7230 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7231
7232 # Archives containing C++ object files must be created using
7233 # the KAI C++ compiler.
7234 case $host in
7235 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7236 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7237 esac
d9898ee8 7238 ;;
8d138742 7239 RCC*)
d9898ee8 7240 # Rational C++ 2.4.1
8d138742
CE
7241 # FIXME: insert proper C++ library support
7242 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7243 ;;
8d138742
CE
7244 cxx*)
7245 case $host in
7246 osf3*)
d50284c4
CE
7247 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7248 _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'
7249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742
CE
7250 ;;
7251 *)
7252 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
d50284c4 7253 _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'
8d138742 7254 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
d50284c4
CE
7255 echo "-hidden">> $lib.exp~
7256 $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~
7257 $RM $lib.exp'
8d138742
CE
7258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7259 ;;
7260 esac
7261
7262 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7263
7264 # Commands to make compiler produce verbose output that lists
7265 # what "hidden" libraries, object files and flags are used when
7266 # linking a shared library.
7267 #
7268 # There doesn't appear to be a way to prevent this compiler from
7269 # explicitly linking system object files so we need to strip them
7270 # from the output so that they don't get included in the library
7271 # dependencies.
d50284c4 7272 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"'
d9898ee8 7273 ;;
7274 *)
d50284c4
CE
7275 if test yes,no = "$GXX,$with_gnu_ld"; then
7276 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
8d138742
CE
7277 case $host in
7278 osf3*)
d50284c4 7279 _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'
8d138742
CE
7280 ;;
7281 *)
d50284c4 7282 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
8d138742
CE
7283 ;;
7284 esac
7285
d50284c4 7286 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8d138742
CE
7287 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7288
7289 # Commands to make compiler produce verbose output that lists
7290 # what "hidden" libraries, object files and flags are used when
7291 # linking a shared library.
b0322a85 7292 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
7293
7294 else
7295 # FIXME: insert proper C++ library support
7296 _LT_TAGVAR(ld_shlibs, $1)=no
7297 fi
d9898ee8 7298 ;;
8d138742
CE
7299 esac
7300 ;;
7301
d9898ee8 7302 psos*)
8d138742
CE
7303 # FIXME: insert proper C++ library support
7304 _LT_TAGVAR(ld_shlibs, $1)=no
7305 ;;
7306
7307 sunos4*)
7308 case $cc_basename in
7309 CC*)
7310 # Sun C++ 4.x
7311 # FIXME: insert proper C++ library support
7312 _LT_TAGVAR(ld_shlibs, $1)=no
7313 ;;
7314 lcc*)
7315 # Lucid
7316 # FIXME: insert proper C++ library support
7317 _LT_TAGVAR(ld_shlibs, $1)=no
7318 ;;
7319 *)
7320 # FIXME: insert proper C++ library support
7321 _LT_TAGVAR(ld_shlibs, $1)=no
7322 ;;
7323 esac
7324 ;;
7325
d9898ee8 7326 solaris*)
8d138742 7327 case $cc_basename in
b0322a85 7328 CC* | sunCC*)
d9898ee8 7329 # Sun C++ 4.2, 5.x and Centerline C++
8d138742
CE
7330 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7331 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
d50284c4 7332 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8d138742 7333 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
d50284c4 7334 $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'
8d138742
CE
7335
7336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7337 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7338 case $host_os in
7339 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7340 *)
7341 # The compiler driver will combine and reorder linker options,
d50284c4 7342 # but understands '-z linker_flag'.
8d138742
CE
7343 # Supported since Solaris 2.6 (maybe 2.5.1?)
7344 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7345 ;;
7346 esac
7347 _LT_TAGVAR(link_all_deplibs, $1)=yes
7348
b0322a85 7349 output_verbose_link_cmd='func_echo_all'
8d138742
CE
7350
7351 # Archives containing C++ object files must be created using
7352 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7353 # necessary to make sure instantiated templates are included
7354 # in the archive.
7355 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
d9898ee8 7356 ;;
8d138742 7357 gcx*)
d9898ee8 7358 # Green Hills C++ Compiler
d50284c4 7359 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8d138742
CE
7360
7361 # The C++ compiler must be used to create the archive.
7362 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
d9898ee8 7363 ;;
8d138742
CE
7364 *)
7365 # GNU C++ compiler with Solaris linker
d50284c4
CE
7366 if test yes,no = "$GXX,$with_gnu_ld"; then
7367 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
8d138742 7368 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
d50284c4 7369 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8d138742 7370 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
d50284c4 7371 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8d138742
CE
7372
7373 # Commands to make compiler produce verbose output that lists
7374 # what "hidden" libraries, object files and flags are used when
7375 # linking a shared library.
b0322a85 7376 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742 7377 else
d50284c4 7378 # g++ 2.7 appears to require '-G' NOT '-shared' on this
8d138742 7379 # platform.
d50284c4 7380 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
8d138742 7381 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
d50284c4 7382 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8d138742
CE
7383
7384 # Commands to make compiler produce verbose output that lists
7385 # what "hidden" libraries, object files and flags are used when
7386 # linking a shared library.
b0322a85 7387 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
7388 fi
7389
d50284c4 7390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
8d138742
CE
7391 case $host_os in
7392 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7393 *)
d50284c4 7394 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
8d138742
CE
7395 ;;
7396 esac
7397 fi
d9898ee8 7398 ;;
8d138742
CE
7399 esac
7400 ;;
7401
7402 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
d50284c4 7403 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8d138742
CE
7404 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7405 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7406 runpath_var='LD_RUN_PATH'
7407
7408 case $cc_basename in
7409 CC*)
d50284c4
CE
7410 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7411 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
7412 ;;
7413 *)
d50284c4
CE
7414 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7415 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
7416 ;;
7417 esac
7418 ;;
7419
7420 sysv5* | sco3.2v5* | sco5v6*)
d50284c4 7421 # Note: We CANNOT use -z defs as we might desire, because we do not
8d138742
CE
7422 # link with -lc, and that would cause any symbols used from libc to
7423 # always be unresolved, which means just about no library would
7424 # ever link correctly. If we're not using GNU ld we use -z text
7425 # though, which does catch some bad symbols but isn't as heavy-handed
7426 # as -z defs.
d50284c4
CE
7427 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7428 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
8d138742
CE
7429 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7430 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d50284c4 7431 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
8d138742
CE
7432 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7433 _LT_TAGVAR(link_all_deplibs, $1)=yes
d50284c4 7434 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
8d138742
CE
7435 runpath_var='LD_RUN_PATH'
7436
d9898ee8 7437 case $cc_basename in
8d138742 7438 CC*)
d50284c4
CE
7439 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7440 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
b0322a85 7441 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
d50284c4 7442 '"$_LT_TAGVAR(old_archive_cmds, $1)"
b0322a85 7443 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
d50284c4 7444 '"$_LT_TAGVAR(reload_cmds, $1)"
d9898ee8 7445 ;;
7446 *)
d50284c4
CE
7447 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7448 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
d9898ee8 7449 ;;
7450 esac
8d138742
CE
7451 ;;
7452
d9898ee8 7453 tandem*)
8d138742
CE
7454 case $cc_basename in
7455 NCC*)
d9898ee8 7456 # NonStop-UX NCC 3.20
8d138742
CE
7457 # FIXME: insert proper C++ library support
7458 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7459 ;;
8d138742
CE
7460 *)
7461 # FIXME: insert proper C++ library support
7462 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 7463 ;;
8d138742
CE
7464 esac
7465 ;;
7466
d9898ee8 7467 vxworks*)
8d138742
CE
7468 # FIXME: insert proper C++ library support
7469 _LT_TAGVAR(ld_shlibs, $1)=no
7470 ;;
7471
d9898ee8 7472 *)
8d138742
CE
7473 # FIXME: insert proper C++ library support
7474 _LT_TAGVAR(ld_shlibs, $1)=no
7475 ;;
7476 esac
7477
7478 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
d50284c4 7479 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
8d138742 7480
d50284c4
CE
7481 _LT_TAGVAR(GCC, $1)=$GXX
7482 _LT_TAGVAR(LD, $1)=$LD
8d138742
CE
7483
7484 ## CAVEAT EMPTOR:
7485 ## There is no encapsulation within the following macros, do not change
7486 ## the running order or otherwise move them around unless you know exactly
7487 ## what you are doing...
7488 _LT_SYS_HIDDEN_LIBDEPS($1)
7489 _LT_COMPILER_PIC($1)
7490 _LT_COMPILER_C_O($1)
7491 _LT_COMPILER_FILE_LOCKS($1)
7492 _LT_LINKER_SHLIBS($1)
7493 _LT_SYS_DYNAMIC_LINKER($1)
7494 _LT_LINKER_HARDCODE_LIBPATH($1)
7495
7496 _LT_CONFIG($1)
7497 fi # test -n "$compiler"
7498
7499 CC=$lt_save_CC
b0322a85 7500 CFLAGS=$lt_save_CFLAGS
8d138742
CE
7501 LDCXX=$LD
7502 LD=$lt_save_LD
7503 GCC=$lt_save_GCC
7504 with_gnu_ld=$lt_save_with_gnu_ld
7505 lt_cv_path_LDCXX=$lt_cv_path_LD
7506 lt_cv_path_LD=$lt_save_path_LD
7507 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7508 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
d50284c4 7509fi # test yes != "$_lt_caught_CXX_error"
8d138742
CE
7510
7511AC_LANG_POP
7512])# _LT_LANG_CXX_CONFIG
7513
7514
b0322a85
CE
7515# _LT_FUNC_STRIPNAME_CNF
7516# ----------------------
7517# func_stripname_cnf prefix suffix name
7518# strip PREFIX and SUFFIX off of NAME.
7519# PREFIX and SUFFIX must not contain globbing or regex special
7520# characters, hashes, percent signs, but SUFFIX may contain a leading
7521# dot (in which case that matches only a dot).
7522#
7523# This function is identical to the (non-XSI) version of func_stripname,
7524# except this one can be used by m4 code that may be executed by configure,
7525# rather than the libtool script.
7526m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7527AC_REQUIRE([_LT_DECL_SED])
7528AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7529func_stripname_cnf ()
7530{
d50284c4
CE
7531 case @S|@2 in
7532 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7533 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
b0322a85
CE
7534 esac
7535} # func_stripname_cnf
7536])# _LT_FUNC_STRIPNAME_CNF
7537
d50284c4 7538
8d138742
CE
7539# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7540# ---------------------------------
7541# Figure out "hidden" library dependencies from verbose
7542# compiler output when linking a shared library.
7543# Parse the compiler output and extract the necessary
7544# objects, libraries and library flags.
7545m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7546[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
b0322a85 7547AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8d138742
CE
7548# Dependencies to place before and after the object being linked:
7549_LT_TAGVAR(predep_objects, $1)=
7550_LT_TAGVAR(postdep_objects, $1)=
7551_LT_TAGVAR(predeps, $1)=
7552_LT_TAGVAR(postdeps, $1)=
7553_LT_TAGVAR(compiler_lib_search_path, $1)=
7554
7555dnl we can't use the lt_simple_compile_test_code here,
7556dnl because it contains code intended for an executable,
7557dnl not a library. It's possible we should let each
7558dnl tag define a new lt_????_link_test_code variable,
7559dnl but it's only used here...
7560m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7561int a;
7562void foo (void) { a = 0; }
7563_LT_EOF
7564], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7565class Foo
7566{
7567public:
7568 Foo (void) { a = 0; }
7569private:
7570 int a;
7571};
7572_LT_EOF
7573], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7574 subroutine foo
7575 implicit none
7576 integer*4 a
7577 a=0
7578 return
7579 end
7580_LT_EOF
7581], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7582 subroutine foo
7583 implicit none
7584 integer a
7585 a=0
7586 return
7587 end
7588_LT_EOF
7589], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7590public class foo {
7591 private int a;
7592 public void bar (void) {
7593 a = 0;
7594 }
7595};
7596_LT_EOF
b0322a85
CE
7597], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7598package foo
7599func foo() {
7600}
7601_LT_EOF
8d138742 7602])
b0322a85
CE
7603
7604_lt_libdeps_save_CFLAGS=$CFLAGS
7605case "$CC $CFLAGS " in #(
7606*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7607*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7608*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7609esac
7610
8d138742
CE
7611dnl Parse the compiler output and extract the necessary
7612dnl objects, libraries and library flags.
7613if AC_TRY_EVAL(ac_compile); then
7614 # Parse the compiler output and extract the necessary
7615 # objects, libraries and library flags.
7616
7617 # Sentinel used to keep track of whether or not we are before
7618 # the conftest object file.
7619 pre_test_object_deps_done=no
7620
7621 for p in `eval "$output_verbose_link_cmd"`; do
d50284c4 7622 case $prev$p in
8d138742
CE
7623
7624 -L* | -R* | -l*)
7625 # Some compilers place space between "-{L,R}" and the path.
7626 # Remove the space.
d50284c4
CE
7627 if test x-L = "$p" ||
7628 test x-R = "$p"; then
8d138742
CE
7629 prev=$p
7630 continue
8d138742
CE
7631 fi
7632
b0322a85
CE
7633 # Expand the sysroot to ease extracting the directories later.
7634 if test -z "$prev"; then
7635 case $p in
7636 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7637 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7638 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7639 esac
7640 fi
7641 case $p in
7642 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7643 esac
d50284c4
CE
7644 if test no = "$pre_test_object_deps_done"; then
7645 case $prev in
b0322a85 7646 -L | -R)
8d138742
CE
7647 # Internal compiler library paths should come after those
7648 # provided the user. The postdeps already come after the
7649 # user supplied libs so there is no need to process them.
7650 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
d50284c4 7651 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
8d138742 7652 else
d50284c4 7653 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
8d138742
CE
7654 fi
7655 ;;
7656 # The "-l" case would never come before the object being
7657 # linked, so don't bother handling this case.
7658 esac
7659 else
7660 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
d50284c4 7661 _LT_TAGVAR(postdeps, $1)=$prev$p
8d138742 7662 else
d50284c4 7663 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
8d138742
CE
7664 fi
7665 fi
b0322a85 7666 prev=
8d138742
CE
7667 ;;
7668
b0322a85 7669 *.lto.$objext) ;; # Ignore GCC LTO objects
8d138742
CE
7670 *.$objext)
7671 # This assumes that the test object file only shows up
7672 # once in the compiler output.
7673 if test "$p" = "conftest.$objext"; then
7674 pre_test_object_deps_done=yes
7675 continue
7676 fi
7677
d50284c4 7678 if test no = "$pre_test_object_deps_done"; then
8d138742 7679 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
d50284c4 7680 _LT_TAGVAR(predep_objects, $1)=$p
8d138742
CE
7681 else
7682 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7683 fi
7684 else
7685 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
d50284c4 7686 _LT_TAGVAR(postdep_objects, $1)=$p
8d138742
CE
7687 else
7688 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7689 fi
7690 fi
7691 ;;
7692
7693 *) ;; # Ignore the rest.
7694
7695 esac
7696 done
7697
7698 # Clean up.
7699 rm -f a.out a.exe
7700else
7701 echo "libtool.m4: error: problem compiling $1 test program"
7702fi
7703
7704$RM -f confest.$objext
b0322a85 7705CFLAGS=$_lt_libdeps_save_CFLAGS
8d138742
CE
7706
7707# PORTME: override above test on systems where it is broken
7708m4_if([$1], [CXX],
7709[case $host_os in
7710interix[[3-9]]*)
7711 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7712 # hack all around it, let's just trust "g++" to DTRT.
7713 _LT_TAGVAR(predep_objects,$1)=
7714 _LT_TAGVAR(postdep_objects,$1)=
7715 _LT_TAGVAR(postdeps,$1)=
7716 ;;
8d138742
CE
7717esac
7718])
7719
7720case " $_LT_TAGVAR(postdeps, $1) " in
7721*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7722esac
7723 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7724if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
d50284c4 7725 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
8d138742
CE
7726fi
7727_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7728 [The directories searched by this compiler when creating a shared library])
7729_LT_TAGDECL([], [predep_objects], [1],
7730 [Dependencies to place before and after the objects being linked to
7731 create a shared library])
7732_LT_TAGDECL([], [postdep_objects], [1])
7733_LT_TAGDECL([], [predeps], [1])
7734_LT_TAGDECL([], [postdeps], [1])
7735_LT_TAGDECL([], [compiler_lib_search_path], [1],
7736 [The library search path used internally by the compiler when linking
7737 a shared library])
7738])# _LT_SYS_HIDDEN_LIBDEPS
7739
7740
8d138742
CE
7741# _LT_LANG_F77_CONFIG([TAG])
7742# --------------------------
7743# Ensure that the configuration variables for a Fortran 77 compiler are
7744# suitably defined. These variables are subsequently used by _LT_CONFIG
d50284c4 7745# to write the compiler configuration to 'libtool'.
8d138742 7746m4_defun([_LT_LANG_F77_CONFIG],
b0322a85 7747[AC_LANG_PUSH(Fortran 77)
d50284c4 7748if test -z "$F77" || test no = "$F77"; then
b0322a85
CE
7749 _lt_disable_F77=yes
7750fi
8d138742
CE
7751
7752_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7753_LT_TAGVAR(allow_undefined_flag, $1)=
7754_LT_TAGVAR(always_export_symbols, $1)=no
7755_LT_TAGVAR(archive_expsym_cmds, $1)=
7756_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7757_LT_TAGVAR(hardcode_direct, $1)=no
7758_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7759_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
7760_LT_TAGVAR(hardcode_libdir_separator, $1)=
7761_LT_TAGVAR(hardcode_minus_L, $1)=no
7762_LT_TAGVAR(hardcode_automatic, $1)=no
7763_LT_TAGVAR(inherit_rpath, $1)=no
7764_LT_TAGVAR(module_cmds, $1)=
7765_LT_TAGVAR(module_expsym_cmds, $1)=
7766_LT_TAGVAR(link_all_deplibs, $1)=unknown
7767_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
7768_LT_TAGVAR(reload_flag, $1)=$reload_flag
7769_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
7770_LT_TAGVAR(no_undefined_flag, $1)=
7771_LT_TAGVAR(whole_archive_flag_spec, $1)=
7772_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7773
7774# Source file extension for f77 test sources.
7775ac_ext=f
7776
7777# Object file extension for compiled f77 test sources.
7778objext=o
7779_LT_TAGVAR(objext, $1)=$objext
7780
7781# No sense in running all these tests if we already determined that
7782# the F77 compiler isn't working. Some variables (like enable_shared)
7783# are currently assumed to apply to all compilers on this platform,
7784# and will be corrupted by setting them based on a non-working compiler.
d50284c4 7785if test yes != "$_lt_disable_F77"; then
8d138742
CE
7786 # Code to be used in simple compile tests
7787 lt_simple_compile_test_code="\
7788 subroutine t
7789 return
7790 end
7791"
7792
7793 # Code to be used in simple link tests
7794 lt_simple_link_test_code="\
7795 program t
7796 end
7797"
7798
7799 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7800 _LT_TAG_COMPILER
7801
7802 # save warnings/boilerplate of simple test code
7803 _LT_COMPILER_BOILERPLATE
7804 _LT_LINKER_BOILERPLATE
7805
7806 # Allow CC to be a program name with arguments.
d50284c4 7807 lt_save_CC=$CC
8d138742 7808 lt_save_GCC=$GCC
b0322a85 7809 lt_save_CFLAGS=$CFLAGS
8d138742 7810 CC=${F77-"f77"}
b0322a85 7811 CFLAGS=$FFLAGS
8d138742
CE
7812 compiler=$CC
7813 _LT_TAGVAR(compiler, $1)=$CC
7814 _LT_CC_BASENAME([$compiler])
7815 GCC=$G77
7816 if test -n "$compiler"; then
7817 AC_MSG_CHECKING([if libtool supports shared libraries])
7818 AC_MSG_RESULT([$can_build_shared])
7819
7820 AC_MSG_CHECKING([whether to build shared libraries])
d50284c4 7821 test no = "$can_build_shared" && enable_shared=no
8d138742
CE
7822
7823 # On AIX, shared libraries and static libraries use the same namespace, and
7824 # are all built from PIC.
7825 case $host_os in
7826 aix3*)
d50284c4 7827 test yes = "$enable_shared" && enable_static=no
8d138742
CE
7828 if test -n "$RANLIB"; then
7829 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7830 postinstall_cmds='$RANLIB $lib'
7831 fi
7832 ;;
7833 aix[[4-9]]*)
d50284c4
CE
7834 if test ia64 != "$host_cpu"; then
7835 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7836 yes,aix,yes) ;; # shared object as lib.so file only
7837 yes,svr4,*) ;; # shared object as lib.so archive member only
7838 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7839 esac
8d138742
CE
7840 fi
7841 ;;
7842 esac
7843 AC_MSG_RESULT([$enable_shared])
7844
7845 AC_MSG_CHECKING([whether to build static libraries])
7846 # Make sure either enable_shared or enable_static is yes.
d50284c4 7847 test yes = "$enable_shared" || enable_static=yes
8d138742
CE
7848 AC_MSG_RESULT([$enable_static])
7849
d50284c4
CE
7850 _LT_TAGVAR(GCC, $1)=$G77
7851 _LT_TAGVAR(LD, $1)=$LD
8d138742
CE
7852
7853 ## CAVEAT EMPTOR:
7854 ## There is no encapsulation within the following macros, do not change
7855 ## the running order or otherwise move them around unless you know exactly
7856 ## what you are doing...
7857 _LT_COMPILER_PIC($1)
7858 _LT_COMPILER_C_O($1)
7859 _LT_COMPILER_FILE_LOCKS($1)
7860 _LT_LINKER_SHLIBS($1)
7861 _LT_SYS_DYNAMIC_LINKER($1)
7862 _LT_LINKER_HARDCODE_LIBPATH($1)
7863
7864 _LT_CONFIG($1)
7865 fi # test -n "$compiler"
7866
7867 GCC=$lt_save_GCC
d50284c4
CE
7868 CC=$lt_save_CC
7869 CFLAGS=$lt_save_CFLAGS
7870fi # test yes != "$_lt_disable_F77"
8d138742
CE
7871
7872AC_LANG_POP
7873])# _LT_LANG_F77_CONFIG
7874
7875
8d138742
CE
7876# _LT_LANG_FC_CONFIG([TAG])
7877# -------------------------
7878# Ensure that the configuration variables for a Fortran compiler are
7879# suitably defined. These variables are subsequently used by _LT_CONFIG
d50284c4 7880# to write the compiler configuration to 'libtool'.
8d138742 7881m4_defun([_LT_LANG_FC_CONFIG],
b0322a85
CE
7882[AC_LANG_PUSH(Fortran)
7883
d50284c4 7884if test -z "$FC" || test no = "$FC"; then
b0322a85
CE
7885 _lt_disable_FC=yes
7886fi
8d138742
CE
7887
7888_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7889_LT_TAGVAR(allow_undefined_flag, $1)=
7890_LT_TAGVAR(always_export_symbols, $1)=no
7891_LT_TAGVAR(archive_expsym_cmds, $1)=
7892_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7893_LT_TAGVAR(hardcode_direct, $1)=no
7894_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7895_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
7896_LT_TAGVAR(hardcode_libdir_separator, $1)=
7897_LT_TAGVAR(hardcode_minus_L, $1)=no
7898_LT_TAGVAR(hardcode_automatic, $1)=no
7899_LT_TAGVAR(inherit_rpath, $1)=no
7900_LT_TAGVAR(module_cmds, $1)=
7901_LT_TAGVAR(module_expsym_cmds, $1)=
7902_LT_TAGVAR(link_all_deplibs, $1)=unknown
7903_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
7904_LT_TAGVAR(reload_flag, $1)=$reload_flag
7905_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
7906_LT_TAGVAR(no_undefined_flag, $1)=
7907_LT_TAGVAR(whole_archive_flag_spec, $1)=
7908_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7909
7910# Source file extension for fc test sources.
7911ac_ext=${ac_fc_srcext-f}
7912
7913# Object file extension for compiled fc test sources.
7914objext=o
7915_LT_TAGVAR(objext, $1)=$objext
7916
7917# No sense in running all these tests if we already determined that
7918# the FC compiler isn't working. Some variables (like enable_shared)
7919# are currently assumed to apply to all compilers on this platform,
7920# and will be corrupted by setting them based on a non-working compiler.
d50284c4 7921if test yes != "$_lt_disable_FC"; then
8d138742
CE
7922 # Code to be used in simple compile tests
7923 lt_simple_compile_test_code="\
7924 subroutine t
7925 return
7926 end
7927"
7928
7929 # Code to be used in simple link tests
7930 lt_simple_link_test_code="\
7931 program t
7932 end
7933"
7934
7935 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7936 _LT_TAG_COMPILER
7937
7938 # save warnings/boilerplate of simple test code
7939 _LT_COMPILER_BOILERPLATE
7940 _LT_LINKER_BOILERPLATE
7941
7942 # Allow CC to be a program name with arguments.
d50284c4 7943 lt_save_CC=$CC
8d138742 7944 lt_save_GCC=$GCC
b0322a85 7945 lt_save_CFLAGS=$CFLAGS
8d138742 7946 CC=${FC-"f95"}
b0322a85 7947 CFLAGS=$FCFLAGS
8d138742
CE
7948 compiler=$CC
7949 GCC=$ac_cv_fc_compiler_gnu
7950
7951 _LT_TAGVAR(compiler, $1)=$CC
7952 _LT_CC_BASENAME([$compiler])
7953
7954 if test -n "$compiler"; then
7955 AC_MSG_CHECKING([if libtool supports shared libraries])
7956 AC_MSG_RESULT([$can_build_shared])
7957
7958 AC_MSG_CHECKING([whether to build shared libraries])
d50284c4 7959 test no = "$can_build_shared" && enable_shared=no
8d138742
CE
7960
7961 # On AIX, shared libraries and static libraries use the same namespace, and
7962 # are all built from PIC.
7963 case $host_os in
7964 aix3*)
d50284c4 7965 test yes = "$enable_shared" && enable_static=no
8d138742
CE
7966 if test -n "$RANLIB"; then
7967 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7968 postinstall_cmds='$RANLIB $lib'
7969 fi
7970 ;;
7971 aix[[4-9]]*)
d50284c4
CE
7972 if test ia64 != "$host_cpu"; then
7973 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7974 yes,aix,yes) ;; # shared object as lib.so file only
7975 yes,svr4,*) ;; # shared object as lib.so archive member only
7976 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7977 esac
8d138742
CE
7978 fi
7979 ;;
7980 esac
7981 AC_MSG_RESULT([$enable_shared])
7982
7983 AC_MSG_CHECKING([whether to build static libraries])
7984 # Make sure either enable_shared or enable_static is yes.
d50284c4 7985 test yes = "$enable_shared" || enable_static=yes
8d138742
CE
7986 AC_MSG_RESULT([$enable_static])
7987
d50284c4
CE
7988 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7989 _LT_TAGVAR(LD, $1)=$LD
8d138742
CE
7990
7991 ## CAVEAT EMPTOR:
7992 ## There is no encapsulation within the following macros, do not change
7993 ## the running order or otherwise move them around unless you know exactly
7994 ## what you are doing...
7995 _LT_SYS_HIDDEN_LIBDEPS($1)
7996 _LT_COMPILER_PIC($1)
7997 _LT_COMPILER_C_O($1)
7998 _LT_COMPILER_FILE_LOCKS($1)
7999 _LT_LINKER_SHLIBS($1)
8000 _LT_SYS_DYNAMIC_LINKER($1)
8001 _LT_LINKER_HARDCODE_LIBPATH($1)
8002
8003 _LT_CONFIG($1)
8004 fi # test -n "$compiler"
8005
8006 GCC=$lt_save_GCC
b0322a85
CE
8007 CC=$lt_save_CC
8008 CFLAGS=$lt_save_CFLAGS
d50284c4 8009fi # test yes != "$_lt_disable_FC"
8d138742
CE
8010
8011AC_LANG_POP
8012])# _LT_LANG_FC_CONFIG
8013
8014
8015# _LT_LANG_GCJ_CONFIG([TAG])
8016# --------------------------
8017# Ensure that the configuration variables for the GNU Java Compiler compiler
8018# are suitably defined. These variables are subsequently used by _LT_CONFIG
d50284c4 8019# to write the compiler configuration to 'libtool'.
8d138742
CE
8020m4_defun([_LT_LANG_GCJ_CONFIG],
8021[AC_REQUIRE([LT_PROG_GCJ])dnl
8022AC_LANG_SAVE
8023
8024# Source file extension for Java test sources.
8025ac_ext=java
8026
8027# Object file extension for compiled Java test sources.
8028objext=o
8029_LT_TAGVAR(objext, $1)=$objext
8030
8031# Code to be used in simple compile tests
8032lt_simple_compile_test_code="class foo {}"
8033
8034# Code to be used in simple link tests
8035lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8036
8037# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8038_LT_TAG_COMPILER
8039
8040# save warnings/boilerplate of simple test code
8041_LT_COMPILER_BOILERPLATE
8042_LT_LINKER_BOILERPLATE
8043
8044# Allow CC to be a program name with arguments.
b0322a85
CE
8045lt_save_CC=$CC
8046lt_save_CFLAGS=$CFLAGS
8d138742
CE
8047lt_save_GCC=$GCC
8048GCC=yes
8049CC=${GCJ-"gcj"}
b0322a85 8050CFLAGS=$GCJFLAGS
8d138742
CE
8051compiler=$CC
8052_LT_TAGVAR(compiler, $1)=$CC
d50284c4 8053_LT_TAGVAR(LD, $1)=$LD
8d138742
CE
8054_LT_CC_BASENAME([$compiler])
8055
8056# GCJ did not exist at the time GCC didn't implicitly link libc in.
8057_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8058
8059_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
8060_LT_TAGVAR(reload_flag, $1)=$reload_flag
8061_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
8062
8063if test -n "$compiler"; then
8064 _LT_COMPILER_NO_RTTI($1)
8065 _LT_COMPILER_PIC($1)
8066 _LT_COMPILER_C_O($1)
8067 _LT_COMPILER_FILE_LOCKS($1)
8068 _LT_LINKER_SHLIBS($1)
8069 _LT_LINKER_HARDCODE_LIBPATH($1)
8070
8071 _LT_CONFIG($1)
8072fi
8073
8074AC_LANG_RESTORE
8075
8076GCC=$lt_save_GCC
b0322a85
CE
8077CC=$lt_save_CC
8078CFLAGS=$lt_save_CFLAGS
8d138742
CE
8079])# _LT_LANG_GCJ_CONFIG
8080
8081
b0322a85
CE
8082# _LT_LANG_GO_CONFIG([TAG])
8083# --------------------------
8084# Ensure that the configuration variables for the GNU Go compiler
8085# are suitably defined. These variables are subsequently used by _LT_CONFIG
d50284c4 8086# to write the compiler configuration to 'libtool'.
b0322a85
CE
8087m4_defun([_LT_LANG_GO_CONFIG],
8088[AC_REQUIRE([LT_PROG_GO])dnl
8089AC_LANG_SAVE
8090
8091# Source file extension for Go test sources.
8092ac_ext=go
8093
8094# Object file extension for compiled Go test sources.
8095objext=o
8096_LT_TAGVAR(objext, $1)=$objext
8097
8098# Code to be used in simple compile tests
8099lt_simple_compile_test_code="package main; func main() { }"
8100
8101# Code to be used in simple link tests
8102lt_simple_link_test_code='package main; func main() { }'
8103
8104# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8105_LT_TAG_COMPILER
8106
8107# save warnings/boilerplate of simple test code
8108_LT_COMPILER_BOILERPLATE
8109_LT_LINKER_BOILERPLATE
8110
8111# Allow CC to be a program name with arguments.
8112lt_save_CC=$CC
8113lt_save_CFLAGS=$CFLAGS
8114lt_save_GCC=$GCC
8115GCC=yes
8116CC=${GOC-"gccgo"}
8117CFLAGS=$GOFLAGS
8118compiler=$CC
8119_LT_TAGVAR(compiler, $1)=$CC
d50284c4 8120_LT_TAGVAR(LD, $1)=$LD
b0322a85
CE
8121_LT_CC_BASENAME([$compiler])
8122
8123# Go did not exist at the time GCC didn't implicitly link libc in.
8124_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8125
8126_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8127_LT_TAGVAR(reload_flag, $1)=$reload_flag
8128_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8129
8130if test -n "$compiler"; then
8131 _LT_COMPILER_NO_RTTI($1)
8132 _LT_COMPILER_PIC($1)
8133 _LT_COMPILER_C_O($1)
8134 _LT_COMPILER_FILE_LOCKS($1)
8135 _LT_LINKER_SHLIBS($1)
8136 _LT_LINKER_HARDCODE_LIBPATH($1)
8137
8138 _LT_CONFIG($1)
8139fi
8140
8141AC_LANG_RESTORE
8142
8143GCC=$lt_save_GCC
8144CC=$lt_save_CC
8145CFLAGS=$lt_save_CFLAGS
8146])# _LT_LANG_GO_CONFIG
8147
8148
8d138742
CE
8149# _LT_LANG_RC_CONFIG([TAG])
8150# -------------------------
8151# Ensure that the configuration variables for the Windows resource compiler
8152# are suitably defined. These variables are subsequently used by _LT_CONFIG
d50284c4 8153# to write the compiler configuration to 'libtool'.
8d138742
CE
8154m4_defun([_LT_LANG_RC_CONFIG],
8155[AC_REQUIRE([LT_PROG_RC])dnl
8156AC_LANG_SAVE
8157
8158# Source file extension for RC test sources.
8159ac_ext=rc
8160
8161# Object file extension for compiled RC test sources.
8162objext=o
8163_LT_TAGVAR(objext, $1)=$objext
8164
8165# Code to be used in simple compile tests
8166lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8167
8168# Code to be used in simple link tests
d50284c4 8169lt_simple_link_test_code=$lt_simple_compile_test_code
8d138742
CE
8170
8171# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8172_LT_TAG_COMPILER
8173
8174# save warnings/boilerplate of simple test code
8175_LT_COMPILER_BOILERPLATE
8176_LT_LINKER_BOILERPLATE
8177
8178# Allow CC to be a program name with arguments.
d50284c4 8179lt_save_CC=$CC
b0322a85 8180lt_save_CFLAGS=$CFLAGS
8d138742
CE
8181lt_save_GCC=$GCC
8182GCC=
8183CC=${RC-"windres"}
b0322a85 8184CFLAGS=
8d138742
CE
8185compiler=$CC
8186_LT_TAGVAR(compiler, $1)=$CC
8187_LT_CC_BASENAME([$compiler])
8188_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8189
8190if test -n "$compiler"; then
8191 :
8192 _LT_CONFIG($1)
8193fi
8194
8195GCC=$lt_save_GCC
8196AC_LANG_RESTORE
b0322a85
CE
8197CC=$lt_save_CC
8198CFLAGS=$lt_save_CFLAGS
8d138742
CE
8199])# _LT_LANG_RC_CONFIG
8200
8201
8202# LT_PROG_GCJ
8203# -----------
8204AC_DEFUN([LT_PROG_GCJ],
8205[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8206 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8207 [AC_CHECK_TOOL(GCJ, gcj,)
d50284c4 8208 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8d138742
CE
8209 AC_SUBST(GCJFLAGS)])])[]dnl
8210])
8211
8212# Old name:
8213AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8214dnl aclocal-1.4 backwards compatibility:
8215dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8216
8217
b0322a85
CE
8218# LT_PROG_GO
8219# ----------
8220AC_DEFUN([LT_PROG_GO],
8221[AC_CHECK_TOOL(GOC, gccgo,)
8222])
8223
8224
8d138742
CE
8225# LT_PROG_RC
8226# ----------
8227AC_DEFUN([LT_PROG_RC],
8228[AC_CHECK_TOOL(RC, windres,)
8229])
8230
8231# Old name:
8232AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8233dnl aclocal-1.4 backwards compatibility:
8234dnl AC_DEFUN([LT_AC_PROG_RC], [])
8235
8236
8237# _LT_DECL_EGREP
8238# --------------
8239# If we don't have a new enough Autoconf to choose the best grep
8240# available, choose the one first in the user's PATH.
8241m4_defun([_LT_DECL_EGREP],
8242[AC_REQUIRE([AC_PROG_EGREP])dnl
8243AC_REQUIRE([AC_PROG_FGREP])dnl
8244test -z "$GREP" && GREP=grep
8245_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8246_LT_DECL([], [EGREP], [1], [An ERE matcher])
8247_LT_DECL([], [FGREP], [1], [A literal string matcher])
8248dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8249AC_SUBST([GREP])
8250])
8251
8252
8253# _LT_DECL_OBJDUMP
8254# --------------
8255# If we don't have a new enough Autoconf to choose the best objdump
8256# available, choose the one first in the user's PATH.
8257m4_defun([_LT_DECL_OBJDUMP],
8258[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8259test -z "$OBJDUMP" && OBJDUMP=objdump
8260_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8261AC_SUBST([OBJDUMP])
8262])
8263
b0322a85
CE
8264# _LT_DECL_DLLTOOL
8265# ----------------
8266# Ensure DLLTOOL variable is set.
8267m4_defun([_LT_DECL_DLLTOOL],
8268[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8269test -z "$DLLTOOL" && DLLTOOL=dlltool
8270_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8271AC_SUBST([DLLTOOL])
8272])
8d138742
CE
8273
8274# _LT_DECL_SED
8275# ------------
8276# Check for a fully-functional sed program, that truncates
8277# as few characters as possible. Prefer GNU sed if found.
8278m4_defun([_LT_DECL_SED],
8279[AC_PROG_SED
8280test -z "$SED" && SED=sed
8281Xsed="$SED -e 1s/^X//"
8282_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8283_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8284 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8285])# _LT_DECL_SED
8286
8287m4_ifndef([AC_PROG_SED], [
8288# NOTE: This macro has been submitted for inclusion into #
8289# GNU Autoconf as AC_PROG_SED. When it is available in #
8290# a released version of Autoconf we should remove this #
8291# macro and use it instead. #
8292
8293m4_defun([AC_PROG_SED],
8294[AC_MSG_CHECKING([for a sed that does not truncate output])
8295AC_CACHE_VAL(lt_cv_path_SED,
8296[# Loop through the user's path and test for sed and gsed.
8297# Then use that list of sed's as ones to test for truncation.
8298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299for as_dir in $PATH
8300do
8301 IFS=$as_save_IFS
8302 test -z "$as_dir" && as_dir=.
8303 for lt_ac_prog in sed gsed; do
8304 for ac_exec_ext in '' $ac_executable_extensions; do
8305 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8306 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8307 fi
8308 done
8309 done
8310done
8311IFS=$as_save_IFS
8312lt_ac_max=0
8313lt_ac_count=0
8314# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8315# along with /bin/sed that truncates output.
8316for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
d50284c4 8317 test ! -f "$lt_ac_sed" && continue
8d138742
CE
8318 cat /dev/null > conftest.in
8319 lt_ac_count=0
8320 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8321 # Check for GNU sed and select it if it is found.
8322 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8323 lt_cv_path_SED=$lt_ac_sed
8324 break
8325 fi
8326 while true; do
8327 cat conftest.in conftest.in >conftest.tmp
8328 mv conftest.tmp conftest.in
8329 cp conftest.in conftest.nl
8330 echo >>conftest.nl
8331 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8332 cmp -s conftest.out conftest.nl || break
8333 # 10000 chars as input seems more than enough
d50284c4 8334 test 10 -lt "$lt_ac_count" && break
8d138742 8335 lt_ac_count=`expr $lt_ac_count + 1`
d50284c4 8336 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8d138742
CE
8337 lt_ac_max=$lt_ac_count
8338 lt_cv_path_SED=$lt_ac_sed
8339 fi
8340 done
8341done
8342])
8343SED=$lt_cv_path_SED
8344AC_SUBST([SED])
8345AC_MSG_RESULT([$SED])
8346])#AC_PROG_SED
8347])#m4_ifndef
8348
8349# Old name:
8350AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8351dnl aclocal-1.4 backwards compatibility:
8352dnl AC_DEFUN([LT_AC_PROG_SED], [])
8353
8354
8355# _LT_CHECK_SHELL_FEATURES
8356# ------------------------
8357# Find out whether the shell is Bourne or XSI compatible,
8358# or has some other useful features.
8359m4_defun([_LT_CHECK_SHELL_FEATURES],
d50284c4 8360[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8d138742
CE
8361 lt_unset=unset
8362else
8363 lt_unset=false
8364fi
8365_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8366
8367# test EBCDIC or ASCII
8368case `echo X|tr X '\101'` in
8369 A) # ASCII based system
8370 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8371 lt_SP2NL='tr \040 \012'
8372 lt_NL2SP='tr \015\012 \040\040'
8373 ;;
8374 *) # EBCDIC based system
8375 lt_SP2NL='tr \100 \n'
8376 lt_NL2SP='tr \r\n \100\100'
8377 ;;
8378esac
8379_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8380_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8381])# _LT_CHECK_SHELL_FEATURES
8382
8383
b0322a85
CE
8384# _LT_PATH_CONVERSION_FUNCTIONS
8385# -----------------------------
d50284c4 8386# Determine what file name conversion functions should be used by
b0322a85
CE
8387# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8388# for certain cross-compile configurations and native mingw.
8389m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8390[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8391AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8392AC_MSG_CHECKING([how to convert $build file names to $host format])
8393AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8394[case $host in
8395 *-*-mingw* )
8396 case $build in
8397 *-*-mingw* ) # actually msys
8398 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8399 ;;
8400 *-*-cygwin* )
8401 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8402 ;;
8403 * ) # otherwise, assume *nix
8404 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8405 ;;
8406 esac
8d138742 8407 ;;
b0322a85
CE
8408 *-*-cygwin* )
8409 case $build in
8410 *-*-mingw* ) # actually msys
8411 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8412 ;;
8413 *-*-cygwin* )
8414 lt_cv_to_host_file_cmd=func_convert_file_noop
8415 ;;
8416 * ) # otherwise, assume *nix
8417 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8418 ;;
8419 esac
8d138742 8420 ;;
b0322a85
CE
8421 * ) # unhandled hosts (and "normal" native builds)
8422 lt_cv_to_host_file_cmd=func_convert_file_noop
8423 ;;
8424esac
8d138742 8425])
b0322a85
CE
8426to_host_file_cmd=$lt_cv_to_host_file_cmd
8427AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8428_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8429 [0], [convert $build file names to $host format])dnl
8430
8431AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8432AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8433[#assume ordinary cross tools, or native build.
8434lt_cv_to_tool_file_cmd=func_convert_file_noop
8435case $host in
8436 *-*-mingw* )
8437 case $build in
8438 *-*-mingw* ) # actually msys
8439 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8440 ;;
8441 esac
8442 ;;
8443esac
8444])
8445to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8446AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8447_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8448 [0], [convert $build files to toolchain format])dnl
8449])# _LT_PATH_CONVERSION_FUNCTIONS
8d138742 8450
d50284c4
CE
8451# Portability macros for glibc argz. -*- Autoconf -*-
8452#
8453# Copyright (C) 2004-2007, 2011-2015 Free Software Foundation, Inc.
8454# Written by Gary V. Vaughan <gary@gnu.org>
8455#
8456# This file is free software; the Free Software Foundation gives
8457# unlimited permission to copy and/or distribute it, with or without
8458# modifications, as long as this notice is preserved.
8459
8460# serial 1 ltargz.m4
8461
8462AC_DEFUN([LT_FUNC_ARGZ], [
8463AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
8464
8465AC_CHECK_TYPES([error_t],
8466 [],
8467 [AC_DEFINE([error_t], [int],
8468 [Define to a type to use for 'error_t' if it is not otherwise available.])
8469 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
8470 does not typedef error_t.])],
8471 [#if defined(HAVE_ARGZ_H)
8472# include <argz.h>
8473#endif])
8474
8475LT_ARGZ_H=
8476AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
8477 argz_next argz_stringify], [], [LT_ARGZ_H=lt__argz.h; AC_LIBOBJ([lt__argz])])
8478
8479dnl if have system argz functions, allow forced use of
8480dnl libltdl-supplied implementation (and default to do so
8481dnl on "known bad" systems). Could use a runtime check, but
8482dnl (a) detecting malloc issues is notoriously unreliable
8483dnl (b) only known system that declares argz functions,
8484dnl provides them, yet they are broken, is cygwin
8485dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
8486dnl So, it's more straightforward simply to special case
8487dnl this for known bad systems.
8488AS_IF([test -z "$LT_ARGZ_H"],
8489 [AC_CACHE_CHECK(
8490 [if argz actually works],
8491 [lt_cv_sys_argz_works],
8492 [[case $host_os in #(
8493 *cygwin*)
8494 lt_cv_sys_argz_works=no
8495 if test no != "$cross_compiling"; then
8496 lt_cv_sys_argz_works="guessing no"
8497 else
8498 lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
8499 save_IFS=$IFS
8500 IFS=-.
8501 set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
8502 IFS=$save_IFS
8503 lt_os_major=${2-0}
8504 lt_os_minor=${3-0}
8505 lt_os_micro=${4-0}
8506 if test 1 -lt "$lt_os_major" \
8507 || { test 1 -eq "$lt_os_major" \
8508 && { test 5 -lt "$lt_os_minor" \
8509 || { test 5 -eq "$lt_os_minor" \
8510 && test 24 -lt "$lt_os_micro"; }; }; }; then
8511 lt_cv_sys_argz_works=yes
8512 fi
8513 fi
8514 ;; #(
8515 *) lt_cv_sys_argz_works=yes ;;
8516 esac]])
8517 AS_IF([test yes = "$lt_cv_sys_argz_works"],
8518 [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
8519 [This value is set to 1 to indicate that the system argz facility works])],
8520 [LT_ARGZ_H=lt__argz.h
8521 AC_LIBOBJ([lt__argz])])])
8522
8523AC_SUBST([LT_ARGZ_H])
8524])
8525
8d138742
CE
8526# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8527#
d50284c4 8528# Copyright (C) 1999-2008, 2011-2015 Free Software Foundation, Inc.
8d138742
CE
8529# Written by Thomas Tanner, 1999
8530#
8531# This file is free software; the Free Software Foundation gives
8532# unlimited permission to copy and/or distribute it, with or without
8533# modifications, as long as this notice is preserved.
8534
d50284c4 8535# serial 20 LTDL_INIT
8d138742
CE
8536
8537# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8538# ------------------------------------------
8539# DIRECTORY contains the libltdl sources. It is okay to call this
8540# function multiple times, as long as the same DIRECTORY is always given.
8541AC_DEFUN([LT_CONFIG_LTDL_DIR],
8542[AC_BEFORE([$0], [LTDL_INIT])
8543_$0($*)
8544])# LT_CONFIG_LTDL_DIR
8545
8546# We break this out into a separate macro, so that we can call it safely
8547# internally without being caught accidentally by the sed scan in libtoolize.
8548m4_defun([_LT_CONFIG_LTDL_DIR],
8549[dnl remove trailing slashes
8550m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8551m4_case(_LTDL_DIR,
d50284c4 8552 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply '.'
8d138742
CE
8553 m4_if(_ARG_DIR, [.],
8554 [],
8555 [m4_define([_LTDL_DIR], _ARG_DIR)
8556 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8557 [m4_if(_ARG_DIR, _LTDL_DIR,
8558 [],
d50284c4 8559 [m4_fatal([multiple libltdl directories: ']_LTDL_DIR[', ']_ARG_DIR['])])])
8d138742
CE
8560m4_popdef([_ARG_DIR])
8561])# _LT_CONFIG_LTDL_DIR
8562
8563# Initialise:
8564m4_define([_LTDL_DIR], [])
8565
8566
8567# _LT_BUILD_PREFIX
8568# ----------------
d50284c4
CE
8569# If Autoconf is new enough, expand to '$(top_build_prefix)', otherwise
8570# to '$(top_builddir)/'.
8d138742
CE
8571m4_define([_LT_BUILD_PREFIX],
8572[m4_ifdef([AC_AUTOCONF_VERSION],
8573 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8574 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
d50284c4
CE
8575 [$(top_build_prefix)],
8576 [$(top_builddir)/])],
8577 [$(top_build_prefix)])],
8578 [$(top_builddir)/])[]dnl
8d138742
CE
8579])
8580
8581
8582# LTDL_CONVENIENCE
8583# ----------------
8584# sets LIBLTDL to the link flags for the libltdl convenience library and
8585# LTDLINCL to the include flags for the libltdl header and adds
8586# --enable-ltdl-convenience to the configure arguments. Note that
8587# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
d50284c4
CE
8588# '$(top_build_prefix)' if available, otherwise with '$(top_builddir)/',
8589# and LTDLINCL will be prefixed with '$(top_srcdir)/' (note the single
8d138742
CE
8590# quotes!). If your package is not flat and you're not using automake,
8591# define top_build_prefix, top_builddir, and top_srcdir appropriately
8592# in your Makefiles.
8593AC_DEFUN([LTDL_CONVENIENCE],
8594[AC_BEFORE([$0], [LTDL_INIT])dnl
8595dnl Although the argument is deprecated and no longer documented,
8596dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8597dnl here make sure it is the same as any other declaration of libltdl's
8598dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8599dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8600m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8601_$0()
8602])# LTDL_CONVENIENCE
8603
8604# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8605# now we have LT_CONFIG_LTDL_DIR:
8606AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8607[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8608_LTDL_CONVENIENCE])
8609
8610dnl aclocal-1.4 backwards compatibility:
8611dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8612
8613
8614# _LTDL_CONVENIENCE
8615# -----------------
8616# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8617m4_defun([_LTDL_CONVENIENCE],
8618[case $enable_ltdl_convenience in
8619 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8620 "") enable_ltdl_convenience=yes
8621 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8622esac
8623LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8624LTDLDEPS=$LIBLTDL
d50284c4 8625LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8d138742
CE
8626
8627AC_SUBST([LIBLTDL])
8628AC_SUBST([LTDLDEPS])
8629AC_SUBST([LTDLINCL])
8630
8631# For backwards non-gettext consistent compatibility...
d50284c4 8632INCLTDL=$LTDLINCL
8d138742
CE
8633AC_SUBST([INCLTDL])
8634])# _LTDL_CONVENIENCE
8635
8636
8637# LTDL_INSTALLABLE
8638# ----------------
8639# sets LIBLTDL to the link flags for the libltdl installable library
8640# and LTDLINCL to the include flags for the libltdl header and adds
8641# --enable-ltdl-install to the configure arguments. Note that
8642# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
d50284c4
CE
8643# is not found, LIBLTDL will be prefixed with '$(top_build_prefix)' if
8644# available, otherwise with '$(top_builddir)/', and LTDLINCL will be
8645# prefixed with '$(top_srcdir)/' (note the single quotes!). If your
8d138742
CE
8646# package is not flat and you're not using automake, define top_build_prefix,
8647# top_builddir, and top_srcdir appropriately in your Makefiles.
8648# In the future, this macro may have to be called after LT_INIT.
8649AC_DEFUN([LTDL_INSTALLABLE],
8650[AC_BEFORE([$0], [LTDL_INIT])dnl
8651dnl Although the argument is deprecated and no longer documented,
8652dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8653dnl here make sure it is the same as any other declaration of libltdl's
8654dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8655dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8656m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8657_$0()
8658])# LTDL_INSTALLABLE
8659
8660# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8661# now we have LT_CONFIG_LTDL_DIR:
8662AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8663[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8664_LTDL_INSTALLABLE])
8665
8666dnl aclocal-1.4 backwards compatibility:
8667dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8668
8669
8670# _LTDL_INSTALLABLE
8671# -----------------
8672# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8673m4_defun([_LTDL_INSTALLABLE],
d50284c4
CE
8674[if test -f "$prefix/lib/libltdl.la"; then
8675 lt_save_LDFLAGS=$LDFLAGS
8d138742
CE
8676 LDFLAGS="-L$prefix/lib $LDFLAGS"
8677 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
d50284c4
CE
8678 LDFLAGS=$lt_save_LDFLAGS
8679 if test yes = "${lt_lib_ltdl-no}"; then
8680 if test yes != "$enable_ltdl_install"; then
8d138742 8681 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
d50284c4 8682 AC_MSG_WARN([not overwriting libltdl at $prefix, force with '--enable-ltdl-install'])
8d138742
CE
8683 enable_ltdl_install=no
8684 fi
d50284c4 8685 elif test no = "$enable_ltdl_install"; then
8d138742 8686 AC_MSG_WARN([libltdl not installed, but installation disabled])
d9898ee8 8687 fi
8d138742 8688fi
d9898ee8 8689
8d138742
CE
8690# If configure.ac declared an installable ltdl, and the user didn't override
8691# with --disable-ltdl-install, we will install the shipped libltdl.
8692case $enable_ltdl_install in
8693 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
d50284c4 8694 LIBLTDL=-lltdl
8d138742
CE
8695 LTDLDEPS=
8696 LTDLINCL=
d9898ee8 8697 ;;
8d138742
CE
8698 *) enable_ltdl_install=yes
8699 ac_configure_args="$ac_configure_args --enable-ltdl-install"
8700 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8701 LTDLDEPS=$LIBLTDL
d50284c4 8702 LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}"
d9898ee8 8703 ;;
8d138742 8704esac
d9898ee8 8705
8d138742
CE
8706AC_SUBST([LIBLTDL])
8707AC_SUBST([LTDLDEPS])
8708AC_SUBST([LTDLINCL])
d9898ee8 8709
8d138742 8710# For backwards non-gettext consistent compatibility...
d50284c4 8711INCLTDL=$LTDLINCL
8d138742
CE
8712AC_SUBST([INCLTDL])
8713])# LTDL_INSTALLABLE
d9898ee8 8714
d9898ee8 8715
8d138742
CE
8716# _LTDL_MODE_DISPATCH
8717# -------------------
8718m4_define([_LTDL_MODE_DISPATCH],
d50284c4 8719[dnl If _LTDL_DIR is '.', then we are configuring libltdl itself:
8d138742
CE
8720m4_if(_LTDL_DIR, [],
8721 [],
d50284c4 8722 dnl if _LTDL_MODE was not set already, the default value is 'subproject':
8d138742
CE
8723 [m4_case(m4_default(_LTDL_MODE, [subproject]),
8724 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
d50284c4
CE
8725 _LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir])],
8726 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir; lt_libobj_prefix=$lt_ltdl_dir/])],
8d138742
CE
8727 [recursive], [],
8728 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8729dnl Be careful not to expand twice:
8730m4_define([$0], [])
8731])# _LTDL_MODE_DISPATCH
8732
8733
8734# _LT_LIBOBJ(MODULE_NAME)
8735# -----------------------
8736# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8737# of into LIBOBJS.
8738AC_DEFUN([_LT_LIBOBJ], [
8739 m4_pattern_allow([^_LT_LIBOBJS$])
8740 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8741])# _LT_LIBOBJS
d9898ee8 8742
d9898ee8 8743
8d138742
CE
8744# LTDL_INIT([OPTIONS])
8745# --------------------
8746# Clients of libltdl can use this macro to allow the installer to
8747# choose between a shipped copy of the ltdl sources or a preinstalled
8748# version of the library. If the shipped ltdl sources are not in a
8749# subdirectory named libltdl, the directory name must be given by
8750# LT_CONFIG_LTDL_DIR.
8751AC_DEFUN([LTDL_INIT],
8752[dnl Parse OPTIONS
8753_LT_SET_OPTIONS([$0], [$1])
8754
8755dnl We need to keep our own list of libobjs separate from our parent project,
8756dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8757dnl we look for our own LIBOBJs.
8758m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8759m4_pushdef([AC_LIBSOURCES])
8760
8761dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8762m4_if(_LTDL_MODE, [],
8763 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8764 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8765 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8766
8767AC_ARG_WITH([included_ltdl],
8768 [AS_HELP_STRING([--with-included-ltdl],
8769 [use the GNU ltdl sources included here])])
8770
d50284c4 8771if test yes != "$with_included_ltdl"; then
8d138742
CE
8772 # We are not being forced to use the included libltdl sources, so
8773 # decide whether there is a useful installed version we can use.
8774 AC_CHECK_HEADER([ltdl.h],
8775 [AC_CHECK_DECL([lt_dlinterface_register],
8776 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8777 [with_included_ltdl=no],
8778 [with_included_ltdl=yes])],
8779 [with_included_ltdl=yes],
8780 [AC_INCLUDES_DEFAULT
8781 #include <ltdl.h>])],
8782 [with_included_ltdl=yes],
8783 [AC_INCLUDES_DEFAULT]
8784 )
8785fi
d9898ee8 8786
8d138742
CE
8787dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8788dnl was called yet, then for old times' sake, we assume libltdl is in an
8789dnl eponymous directory:
8790AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
d9898ee8 8791
8d138742
CE
8792AC_ARG_WITH([ltdl_include],
8793 [AS_HELP_STRING([--with-ltdl-include=DIR],
8794 [use the ltdl headers installed in DIR])])
8795
8796if test -n "$with_ltdl_include"; then
8797 if test -f "$with_ltdl_include/ltdl.h"; then :
d9898ee8 8798 else
d50284c4 8799 AC_MSG_ERROR([invalid ltdl include directory: '$with_ltdl_include'])
8d138742
CE
8800 fi
8801else
8802 with_ltdl_include=no
8803fi
d9898ee8 8804
8d138742
CE
8805AC_ARG_WITH([ltdl_lib],
8806 [AS_HELP_STRING([--with-ltdl-lib=DIR],
8807 [use the libltdl.la installed in DIR])])
d9898ee8 8808
8d138742
CE
8809if test -n "$with_ltdl_lib"; then
8810 if test -f "$with_ltdl_lib/libltdl.la"; then :
8811 else
d50284c4 8812 AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib'])
8d138742
CE
8813 fi
8814else
8815 with_ltdl_lib=no
8816fi
8817
8818case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8819 ,yes,no,no,)
8820 m4_case(m4_default(_LTDL_TYPE, [convenience]),
8821 [convenience], [_LTDL_CONVENIENCE],
8822 [installable], [_LTDL_INSTALLABLE],
8823 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
d9898ee8 8824 ;;
8d138742
CE
8825 ,no,no,no,)
8826 # If the included ltdl is not to be used, then use the
8827 # preinstalled libltdl we found.
8828 AC_DEFINE([HAVE_LTDL], [1],
8829 [Define this if a modern libltdl is already installed])
8830 LIBLTDL=-lltdl
8831 LTDLDEPS=
8832 LTDLINCL=
d9898ee8 8833 ;;
8d138742 8834 ,no*,no,*)
d50284c4 8835 AC_MSG_ERROR(['--with-ltdl-include' and '--with-ltdl-lib' options must be used together])
8d138742
CE
8836 ;;
8837 *) with_included_ltdl=no
8838 LIBLTDL="-L$with_ltdl_lib -lltdl"
8839 LTDLDEPS=
d50284c4 8840 LTDLINCL=-I$with_ltdl_include
8d138742
CE
8841 ;;
8842esac
d50284c4 8843INCLTDL=$LTDLINCL
8d138742
CE
8844
8845# Report our decision...
8846AC_MSG_CHECKING([where to find libltdl headers])
8847AC_MSG_RESULT([$LTDLINCL])
8848AC_MSG_CHECKING([where to find libltdl library])
8849AC_MSG_RESULT([$LIBLTDL])
8850
8851_LTDL_SETUP
8852
8853dnl restore autoconf definition.
8854m4_popdef([AC_LIBOBJ])
8855m4_popdef([AC_LIBSOURCES])
8856
8857AC_CONFIG_COMMANDS_PRE([
8858 _ltdl_libobjs=
8859 _ltdl_ltlibobjs=
8860 if test -n "$_LT_LIBOBJS"; then
8861 # Remove the extension.
8862 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8863 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8864 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8865 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8866 done
8867 fi
8868 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8869 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8870])
d9898ee8 8871
8d138742
CE
8872# Only expand once:
8873m4_define([LTDL_INIT])
8874])# LTDL_INIT
d9898ee8 8875
8d138742
CE
8876# Old names:
8877AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8878AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8879AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8880dnl aclocal-1.4 backwards compatibility:
8881dnl AC_DEFUN([AC_LIB_LTDL], [])
8882dnl AC_DEFUN([AC_WITH_LTDL], [])
8883dnl AC_DEFUN([LT_WITH_LTDL], [])
d9898ee8 8884
d9898ee8 8885
8d138742
CE
8886# _LTDL_SETUP
8887# -----------
8888# Perform all the checks necessary for compilation of the ltdl objects
8889# -- including compiler checks and header checks. This is a public
8890# interface mainly for the benefit of libltdl's own configure.ac, most
8891# other users should call LTDL_INIT instead.
8892AC_DEFUN([_LTDL_SETUP],
8893[AC_REQUIRE([AC_PROG_CC])dnl
8894AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8895AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8896AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8897AC_REQUIRE([LT_LIB_DLLOAD])dnl
8898AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8899AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8900AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
d50284c4 8901AC_REQUIRE([LT_FUNC_ARGZ])dnl
8d138742
CE
8902
8903m4_require([_LT_CHECK_OBJDIR])dnl
8904m4_require([_LT_HEADER_DLFCN])dnl
8905m4_require([_LT_CHECK_DLPREOPEN])dnl
8906m4_require([_LT_DECL_SED])dnl
8907
8908dnl Don't require this, or it will be expanded earlier than the code
8909dnl that sets the variables it relies on:
8910_LT_ENABLE_INSTALL
8911
8912dnl _LTDL_MODE specific code must be called at least once:
8913_LTDL_MODE_DISPATCH
8914
8915# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8916# the user used. This is so that ltdl.h can pick up the parent projects
8917# config.h file, The first file in AC_CONFIG_HEADERS must contain the
8918# definitions required by ltdl.c.
8919# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8920AC_CONFIG_COMMANDS_PRE([dnl
8921m4_pattern_allow([^LT_CONFIG_H$])dnl
8922m4_ifset([AH_HEADER],
8923 [LT_CONFIG_H=AH_HEADER],
8924 [m4_ifset([AC_LIST_HEADERS],
d50284c4 8925 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's|^[[ ]]*||;s|[[ :]].*$||'`],
8d138742
CE
8926 [])])])
8927AC_SUBST([LT_CONFIG_H])
8928
8929AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8930 [], [], [AC_INCLUDES_DEFAULT])
8931
8932AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8933AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8934
b0322a85 8935m4_pattern_allow([LT_LIBEXT])dnl
8d138742
CE
8936AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8937
b0322a85
CE
8938name=
8939eval "lt_libprefix=\"$libname_spec\""
8940m4_pattern_allow([LT_LIBPREFIX])dnl
8941AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8942
8d138742 8943name=ltdl
b0322a85 8944eval "LTDLOPEN=\"$libname_spec\""
8d138742
CE
8945AC_SUBST([LTDLOPEN])
8946])# _LTDL_SETUP
8947
8948
8949# _LT_ENABLE_INSTALL
8950# ------------------
8951m4_define([_LT_ENABLE_INSTALL],
8952[AC_ARG_ENABLE([ltdl-install],
8953 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
d9898ee8 8954
d50284c4 8955case ,$enable_ltdl_install,$enable_ltdl_convenience in
8d138742
CE
8956 *yes*) ;;
8957 *) enable_ltdl_convenience=yes ;;
8958esac
ac40fd9e 8959
8d138742 8960m4_ifdef([AM_CONDITIONAL],
d50284c4
CE
8961[AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}")
8962 AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")])
8d138742 8963])# _LT_ENABLE_INSTALL
d9898ee8 8964
d9898ee8 8965
8d138742
CE
8966# LT_SYS_DLOPEN_DEPLIBS
8967# ---------------------
8968AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8969[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8970AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8971 [lt_cv_sys_dlopen_deplibs],
8972 [# PORTME does your system automatically load deplibs for dlopen?
8973 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8974 # For now, we just catch OSes we know something about -- in the
8975 # future, we'll try test this programmatically.
8976 lt_cv_sys_dlopen_deplibs=unknown
8977 case $host_os in
8978 aix3*|aix4.1.*|aix4.2.*)
8979 # Unknown whether this is true for these versions of AIX, but
d50284c4 8980 # we want this 'case' here to explicitly catch those versions.
8d138742
CE
8981 lt_cv_sys_dlopen_deplibs=unknown
8982 ;;
8983 aix[[4-9]]*)
8984 lt_cv_sys_dlopen_deplibs=yes
8985 ;;
8986 amigaos*)
8987 case $host_cpu in
8988 powerpc)
8989 lt_cv_sys_dlopen_deplibs=no
d9898ee8 8990 ;;
8d138742
CE
8991 esac
8992 ;;
d50284c4
CE
8993 bitrig*)
8994 lt_cv_sys_dlopen_deplibs=yes
8995 ;;
8d138742
CE
8996 darwin*)
8997 # Assuming the user has installed a libdl from somewhere, this is true
8998 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8999 lt_cv_sys_dlopen_deplibs=yes
9000 ;;
9001 freebsd* | dragonfly*)
9002 lt_cv_sys_dlopen_deplibs=yes
9003 ;;
b0322a85 9004 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
9005 # GNU and its variants, using gnu ld.so (Glibc)
9006 lt_cv_sys_dlopen_deplibs=yes
9007 ;;
9008 hpux10*|hpux11*)
9009 lt_cv_sys_dlopen_deplibs=yes
9010 ;;
9011 interix*)
9012 lt_cv_sys_dlopen_deplibs=yes
9013 ;;
9014 irix[[12345]]*|irix6.[[01]]*)
9015 # Catch all versions of IRIX before 6.2, and indicate that we don't
9016 # know how it worked for any of those versions.
9017 lt_cv_sys_dlopen_deplibs=unknown
9018 ;;
9019 irix*)
9020 # The case above catches anything before 6.2, and it's known that
9021 # at 6.2 and later dlopen does load deplibs.
9022 lt_cv_sys_dlopen_deplibs=yes
9023 ;;
9024 netbsd*)
9025 lt_cv_sys_dlopen_deplibs=yes
9026 ;;
9027 openbsd*)
9028 lt_cv_sys_dlopen_deplibs=yes
9029 ;;
9030 osf[[1234]]*)
9031 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
9032 # it did *not* use an RPATH in a shared library to find objects the
d50284c4 9033 # library depends on, so we explicitly say 'no'.
8d138742
CE
9034 lt_cv_sys_dlopen_deplibs=no
9035 ;;
9036 osf5.0|osf5.0a|osf5.1)
9037 # dlopen *does* load deplibs and with the right loader patch applied
9038 # it even uses RPATH in a shared library to search for shared objects
9039 # that the library depends on, but there's no easy way to know if that
9040 # patch is installed. Since this is the case, all we can really
9041 # say is unknown -- it depends on the patch being installed. If
d50284c4 9042 # it is, this changes to 'yes'. Without it, it would be 'no'.
8d138742
CE
9043 lt_cv_sys_dlopen_deplibs=unknown
9044 ;;
9045 osf*)
9046 # the two cases above should catch all versions of osf <= 5.1. Read
9047 # the comments above for what we know about them.
9048 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
d50284c4 9049 # is used to find them so we can finally say 'yes'.
8d138742
CE
9050 lt_cv_sys_dlopen_deplibs=yes
9051 ;;
9052 qnx*)
9053 lt_cv_sys_dlopen_deplibs=yes
9054 ;;
9055 solaris*)
9056 lt_cv_sys_dlopen_deplibs=yes
9057 ;;
9058 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9059 libltdl_cv_sys_dlopen_deplibs=yes
9060 ;;
9061 esac
9062 ])
d50284c4 9063if test yes != "$lt_cv_sys_dlopen_deplibs"; then
8d138742
CE
9064 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
9065 [Define if the OS needs help to load dependent libraries for dlopen().])
9066fi
9067])# LT_SYS_DLOPEN_DEPLIBS
d9898ee8 9068
8d138742
CE
9069# Old name:
9070AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
9071dnl aclocal-1.4 backwards compatibility:
9072dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
d9898ee8 9073
d9898ee8 9074
8d138742
CE
9075# LT_SYS_MODULE_EXT
9076# -----------------
9077AC_DEFUN([LT_SYS_MODULE_EXT],
9078[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
d50284c4 9079AC_CACHE_CHECK([what extension is used for runtime loadable modules],
8d138742
CE
9080 [libltdl_cv_shlibext],
9081[
9082module=yes
9083eval libltdl_cv_shlibext=$shrext_cmds
b0322a85
CE
9084module=no
9085eval libltdl_cv_shrext=$shrext_cmds
8d138742
CE
9086 ])
9087if test -n "$libltdl_cv_shlibext"; then
9088 m4_pattern_allow([LT_MODULE_EXT])dnl
9089 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
9090 [Define to the extension used for runtime loadable modules, say, ".so".])
9091fi
b0322a85
CE
9092if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
9093 m4_pattern_allow([LT_SHARED_EXT])dnl
9094 AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
9095 [Define to the shared library suffix, say, ".dylib".])
9096fi
d50284c4
CE
9097if test -n "$shared_archive_member_spec"; then
9098 m4_pattern_allow([LT_SHARED_LIB_MEMBER])dnl
9099 AC_DEFINE_UNQUOTED([LT_SHARED_LIB_MEMBER], ["($shared_archive_member_spec.o)"],
9100 [Define to the shared archive member specification, say "(shr.o)".])
9101fi
8d138742
CE
9102])# LT_SYS_MODULE_EXT
9103
9104# Old name:
9105AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
9106dnl aclocal-1.4 backwards compatibility:
9107dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
9108
9109
9110# LT_SYS_MODULE_PATH
9111# ------------------
9112AC_DEFUN([LT_SYS_MODULE_PATH],
9113[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
d50284c4
CE
9114AC_CACHE_CHECK([what variable specifies run-time module search path],
9115 [lt_cv_module_path_var], [lt_cv_module_path_var=$shlibpath_var])
8d138742
CE
9116if test -n "$lt_cv_module_path_var"; then
9117 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
9118 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
9119 [Define to the name of the environment variable that determines the run-time module search path.])
9120fi
9121])# LT_SYS_MODULE_PATH
9122
9123# Old name:
9124AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
9125dnl aclocal-1.4 backwards compatibility:
9126dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
9127
9128
9129# LT_SYS_DLSEARCH_PATH
9130# --------------------
9131AC_DEFUN([LT_SYS_DLSEARCH_PATH],
9132[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
9133AC_CACHE_CHECK([for the default library search path],
9134 [lt_cv_sys_dlsearch_path],
d50284c4 9135 [lt_cv_sys_dlsearch_path=$sys_lib_dlsearch_path_spec])
8d138742
CE
9136if test -n "$lt_cv_sys_dlsearch_path"; then
9137 sys_dlsearch_path=
9138 for dir in $lt_cv_sys_dlsearch_path; do
9139 if test -z "$sys_dlsearch_path"; then
d50284c4 9140 sys_dlsearch_path=$dir
8d138742 9141 else
d50284c4 9142 sys_dlsearch_path=$sys_dlsearch_path$PATH_SEPARATOR$dir
8d138742
CE
9143 fi
9144 done
9145 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
9146 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
9147 [Define to the system default library search path.])
9148fi
9149])# LT_SYS_DLSEARCH_PATH
9150
9151# Old name:
9152AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
9153dnl aclocal-1.4 backwards compatibility:
9154dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
d9898ee8 9155
d9898ee8 9156
8d138742
CE
9157# _LT_CHECK_DLPREOPEN
9158# -------------------
9159m4_defun([_LT_CHECK_DLPREOPEN],
9160[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
9161AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
9162 [libltdl_cv_preloaded_symbols],
9163 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
9164 libltdl_cv_preloaded_symbols=yes
9165 else
9166 libltdl_cv_preloaded_symbols=no
d9898ee8 9167 fi
8d138742 9168 ])
d50284c4 9169if test yes = "$libltdl_cv_preloaded_symbols"; then
8d138742
CE
9170 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
9171 [Define if libtool can extract symbol lists from object files.])
d9898ee8 9172fi
8d138742 9173])# _LT_CHECK_DLPREOPEN
d9898ee8 9174
d9898ee8 9175
8d138742
CE
9176# LT_LIB_DLLOAD
9177# -------------
9178AC_DEFUN([LT_LIB_DLLOAD],
9179[m4_pattern_allow([^LT_DLLOADERS$])
9180LT_DLLOADERS=
9181AC_SUBST([LT_DLLOADERS])
9182
9183AC_LANG_PUSH([C])
d50284c4 9184lt_dlload_save_LIBS=$LIBS
8d138742
CE
9185
9186LIBADD_DLOPEN=
9187AC_SEARCH_LIBS([dlopen], [dl],
9188 [AC_DEFINE([HAVE_LIBDL], [1],
9189 [Define if you have the libdl library or equivalent.])
d50284c4
CE
9190 if test "$ac_cv_search_dlopen" != "none required"; then
9191 LIBADD_DLOPEN=-ldl
8d138742 9192 fi
d50284c4 9193 libltdl_cv_lib_dl_dlopen=yes
8d138742
CE
9194 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
9195 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
9196# include <dlfcn.h>
9197#endif
9198 ]], [[dlopen(0, 0);]])],
9199 [AC_DEFINE([HAVE_LIBDL], [1],
9200 [Define if you have the libdl library or equivalent.])
d50284c4 9201 libltdl_cv_func_dlopen=yes
8d138742
CE
9202 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
9203 [AC_CHECK_LIB([svld], [dlopen],
9204 [AC_DEFINE([HAVE_LIBDL], [1],
9205 [Define if you have the libdl library or equivalent.])
d50284c4 9206 LIBADD_DLOPEN=-lsvld libltdl_cv_func_dlopen=yes
8d138742 9207 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
d50284c4 9208if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"
8d138742 9209then
d50284c4 9210 lt_save_LIBS=$LIBS
8d138742
CE
9211 LIBS="$LIBS $LIBADD_DLOPEN"
9212 AC_CHECK_FUNCS([dlerror])
d50284c4 9213 LIBS=$lt_save_LIBS
8d138742
CE
9214fi
9215AC_SUBST([LIBADD_DLOPEN])
9216
9217LIBADD_SHL_LOAD=
9218AC_CHECK_FUNC([shl_load],
9219 [AC_DEFINE([HAVE_SHL_LOAD], [1],
9220 [Define if you have the shl_load function.])
9221 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
9222 [AC_CHECK_LIB([dld], [shl_load],
9223 [AC_DEFINE([HAVE_SHL_LOAD], [1],
9224 [Define if you have the shl_load function.])
9225 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
d50284c4 9226 LIBADD_SHL_LOAD=-ldld])])
8d138742 9227AC_SUBST([LIBADD_SHL_LOAD])
d9898ee8 9228
8d138742
CE
9229case $host_os in
9230darwin[[1567]].*)
9231# We only want this for pre-Mac OS X 10.4.
9232 AC_CHECK_FUNC([_dyld_func_lookup],
9233 [AC_DEFINE([HAVE_DYLD], [1],
9234 [Define if you have the _dyld_func_lookup function.])
9235 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
d9898ee8 9236 ;;
8d138742
CE
9237beos*)
9238 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
d9898ee8 9239 ;;
d50284c4 9240cygwin* | mingw* | pw32*)
8d138742
CE
9241 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
9242 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
d9898ee8 9243 ;;
8d138742 9244esac
d9898ee8 9245
8d138742
CE
9246AC_CHECK_LIB([dld], [dld_link],
9247 [AC_DEFINE([HAVE_DLD], [1],
9248 [Define if you have the GNU dld library.])
9249 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
9250AC_SUBST([LIBADD_DLD_LINK])
d9898ee8 9251
8d138742
CE
9252m4_pattern_allow([^LT_DLPREOPEN$])
9253LT_DLPREOPEN=
9254if test -n "$LT_DLLOADERS"
9255then
9256 for lt_loader in $LT_DLLOADERS; do
9257 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
9258 done
9259 AC_DEFINE([HAVE_LIBDLLOADER], [1],
9260 [Define if libdlloader will be built on this platform])
9261fi
9262AC_SUBST([LT_DLPREOPEN])
d9898ee8 9263
8d138742
CE
9264dnl This isn't used anymore, but set it for backwards compatibility
9265LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
9266AC_SUBST([LIBADD_DL])
d9898ee8 9267
d50284c4 9268LIBS=$lt_dlload_save_LIBS
8d138742
CE
9269AC_LANG_POP
9270])# LT_LIB_DLLOAD
d9898ee8 9271
8d138742
CE
9272# Old name:
9273AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
9274dnl aclocal-1.4 backwards compatibility:
9275dnl AC_DEFUN([AC_LTDL_DLLIB], [])
d9898ee8 9276
d9898ee8 9277
8d138742
CE
9278# LT_SYS_SYMBOL_USCORE
9279# --------------------
9280# does the compiler prefix global symbols with an underscore?
9281AC_DEFUN([LT_SYS_SYMBOL_USCORE],
9282[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
9283AC_CACHE_CHECK([for _ prefix in compiled symbols],
9284 [lt_cv_sys_symbol_underscore],
9285 [lt_cv_sys_symbol_underscore=no
9286 cat > conftest.$ac_ext <<_LT_EOF
9287void nm_test_func(){}
9288int main(){nm_test_func;return 0;}
9289_LT_EOF
9290 if AC_TRY_EVAL(ac_compile); then
9291 # Now try to grab the symbols.
9292 ac_nlist=conftest.nm
9293 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
9294 # See whether the symbols have a leading underscore.
9295 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
9296 lt_cv_sys_symbol_underscore=yes
d9898ee8 9297 else
8d138742
CE
9298 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
9299 :
9300 else
9301 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
9302 fi
d9898ee8 9303 fi
8d138742
CE
9304 else
9305 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9306 fi
9307 else
9308 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
9309 cat conftest.c >&AS_MESSAGE_LOG_FD
9310 fi
9311 rm -rf conftest*
9312 ])
9313 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
9314 AC_SUBST([sys_symbol_underscore])
9315])# LT_SYS_SYMBOL_USCORE
d9898ee8 9316
8d138742
CE
9317# Old name:
9318AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
9319dnl aclocal-1.4 backwards compatibility:
9320dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
d9898ee8 9321
d9898ee8 9322
8d138742
CE
9323# LT_FUNC_DLSYM_USCORE
9324# --------------------
9325AC_DEFUN([LT_FUNC_DLSYM_USCORE],
d50284c4
CE
9326[AC_REQUIRE([_LT_COMPILER_PIC])dnl for lt_prog_compiler_wl
9327AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl for lt_cv_sys_symbol_underscore
9328AC_REQUIRE([LT_SYS_MODULE_EXT])dnl for libltdl_cv_shlibext
9329if test yes = "$lt_cv_sys_symbol_underscore"; then
9330 if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"; then
9331 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
9332 [libltdl_cv_need_uscore],
9333 [libltdl_cv_need_uscore=unknown
9334 dlsym_uscore_save_LIBS=$LIBS
9335 LIBS="$LIBS $LIBADD_DLOPEN"
9336 libname=conftmod # stay within 8.3 filename limits!
9337 cat >$libname.$ac_ext <<_LT_EOF
9338[#line $LINENO "configure"
9339#include "confdefs.h"
9340/* When -fvisibility=hidden is used, assume the code has been annotated
9341 correspondingly for the symbols needed. */
9342#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
9343int fnord () __attribute__((visibility("default")));
9344#endif
9345int fnord () { return 42; }]
9346_LT_EOF
9347
9348 # ltfn_module_cmds module_cmds
9349 # Execute tilde-delimited MODULE_CMDS with environment primed for
9350 # $module_cmds or $archive_cmds type content.
9351 ltfn_module_cmds ()
9352 {( # subshell avoids polluting parent global environment
9353 module_cmds_save_ifs=$IFS; IFS='~'
9354 for cmd in @S|@1; do
9355 IFS=$module_cmds_save_ifs
9356 libobjs=$libname.$ac_objext; lib=$libname$libltdl_cv_shlibext
9357 rpath=/not-exists; soname=$libname$libltdl_cv_shlibext; output_objdir=.
9358 major=; versuffix=; verstring=; deplibs=
9359 ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag=
9360 eval $cmd
9361 done
9362 IFS=$module_cmds_save_ifs
9363 )}
9364
9365 # Compile a loadable module using libtool macro expansion results.
9366 $CC $pic_flag -c $libname.$ac_ext
9367 ltfn_module_cmds "${module_cmds:-$archive_cmds}"
9368
9369 # Try to fetch fnord with dlsym().
9370 libltdl_dlunknown=0; libltdl_dlnouscore=1; libltdl_dluscore=2
9371 cat >conftest.$ac_ext <<_LT_EOF
9372[#line $LINENO "configure"
9373#include "confdefs.h"
9374#if HAVE_DLFCN_H
9375#include <dlfcn.h>
9376#endif
9377#include <stdio.h>
9378#ifndef RTLD_GLOBAL
9379# ifdef DL_GLOBAL
9380# define RTLD_GLOBAL DL_GLOBAL
9381# else
9382# define RTLD_GLOBAL 0
9383# endif
9384#endif
9385#ifndef RTLD_NOW
9386# ifdef DL_NOW
9387# define RTLD_NOW DL_NOW
9388# else
9389# define RTLD_NOW 0
9390# endif
9391#endif
9392int main () {
9393 void *handle = dlopen ("`pwd`/$libname$libltdl_cv_shlibext", RTLD_GLOBAL|RTLD_NOW);
9394 int status = $libltdl_dlunknown;
9395 if (handle) {
9396 if (dlsym (handle, "fnord"))
9397 status = $libltdl_dlnouscore;
9398 else {
9399 if (dlsym (handle, "_fnord"))
9400 status = $libltdl_dluscore;
9401 else
9402 puts (dlerror ());
9403 }
9404 dlclose (handle);
9405 } else
9406 puts (dlerror ());
9407 return status;
9408}]
9409_LT_EOF
9410 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
9411 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
9412 libltdl_status=$?
9413 case x$libltdl_status in
9414 x$libltdl_dlnouscore) libltdl_cv_need_uscore=no ;;
9415 x$libltdl_dluscore) libltdl_cv_need_uscore=yes ;;
9416 x*) libltdl_cv_need_uscore=unknown ;;
9417 esac
9418 fi
9419 rm -rf conftest* $libname*
9420 LIBS=$dlsym_uscore_save_LIBS
9421 ])
8d138742
CE
9422 fi
9423fi
d9898ee8 9424
d50284c4 9425if test yes = "$libltdl_cv_need_uscore"; then
8d138742
CE
9426 AC_DEFINE([NEED_USCORE], [1],
9427 [Define if dlsym() requires a leading underscore in symbol names.])
9428fi
9429])# LT_FUNC_DLSYM_USCORE
d9898ee8 9430
8d138742
CE
9431# Old name:
9432AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
9433dnl aclocal-1.4 backwards compatibility:
9434dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
d9898ee8 9435
8d138742
CE
9436# Helper functions for option handling. -*- Autoconf -*-
9437#
d50284c4
CE
9438# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
9439# Foundation, Inc.
8d138742
CE
9440# Written by Gary V. Vaughan, 2004
9441#
9442# This file is free software; the Free Software Foundation gives
9443# unlimited permission to copy and/or distribute it, with or without
9444# modifications, as long as this notice is preserved.
d9898ee8 9445
d50284c4 9446# serial 8 ltoptions.m4
d9898ee8 9447
8d138742
CE
9448# This is to help aclocal find these macros, as it can't see m4_define.
9449AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
d9898ee8 9450
d9898ee8 9451
8d138742
CE
9452# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9453# ------------------------------------------
9454m4_define([_LT_MANGLE_OPTION],
9455[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
d9898ee8 9456
d9898ee8 9457
8d138742
CE
9458# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9459# ---------------------------------------
9460# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9461# matching handler defined, dispatch to it. Other OPTION-NAMEs are
9462# saved as a flag.
9463m4_define([_LT_SET_OPTION],
9464[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9465m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9466 _LT_MANGLE_DEFUN([$1], [$2]),
d50284c4 9467 [m4_warning([Unknown $1 option '$2'])])[]dnl
8d138742 9468])
d9898ee8 9469
d9898ee8 9470
8d138742
CE
9471# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9472# ------------------------------------------------------------
9473# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9474m4_define([_LT_IF_OPTION],
9475[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9476
9477
9478# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9479# -------------------------------------------------------
9480# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9481# are set.
9482m4_define([_LT_UNLESS_OPTIONS],
9483[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9484 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9485 [m4_define([$0_found])])])[]dnl
9486m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9487])[]dnl
9488])
d9898ee8 9489
d9898ee8 9490
8d138742
CE
9491# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9492# ----------------------------------------
9493# OPTION-LIST is a space-separated list of Libtool options associated
9494# with MACRO-NAME. If any OPTION has a matching handler declared with
9495# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9496# the unknown option and exit.
9497m4_defun([_LT_SET_OPTIONS],
9498[# Set options
9499m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9500 [_LT_SET_OPTION([$1], _LT_Option)])
9501
9502m4_if([$1],[LT_INIT],[
9503 dnl
9504 dnl Simply set some default values (i.e off) if boolean options were not
9505 dnl specified:
9506 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9507 ])
9508 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9509 ])
9510 dnl
9511 dnl If no reference was made to various pairs of opposing options, then
9512 dnl we run the default mode handler for the pair. For example, if neither
d50284c4 9513 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
8d138742
CE
9514 dnl archives by default:
9515 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9516 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9517 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9518 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
d50284c4
CE
9519 [_LT_ENABLE_FAST_INSTALL])
9520 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
9521 [_LT_WITH_AIX_SONAME([aix])])
8d138742
CE
9522 ])
9523])# _LT_SET_OPTIONS
9524
d9898ee8 9525
d9898ee8 9526
8d138742
CE
9527# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9528# -----------------------------------------
9529m4_define([_LT_MANGLE_DEFUN],
9530[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
d9898ee8 9531
d9898ee8 9532
8d138742
CE
9533# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9534# -----------------------------------------------
9535m4_define([LT_OPTION_DEFINE],
9536[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9537])# LT_OPTION_DEFINE
d9898ee8 9538
d9898ee8 9539
8d138742
CE
9540# dlopen
9541# ------
9542LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9543])
d9898ee8 9544
8d138742
CE
9545AU_DEFUN([AC_LIBTOOL_DLOPEN],
9546[_LT_SET_OPTION([LT_INIT], [dlopen])
9547AC_DIAGNOSE([obsolete],
9548[$0: Remove this warning and the call to _LT_SET_OPTION when you
d50284c4 9549put the 'dlopen' option into LT_INIT's first parameter.])
8d138742 9550])
d9898ee8 9551
8d138742
CE
9552dnl aclocal-1.4 backwards compatibility:
9553dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
d9898ee8 9554
d9898ee8 9555
8d138742
CE
9556# win32-dll
9557# ---------
9558# Declare package support for building win32 dll's.
9559LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9560[enable_win32_dll=yes
d9898ee8 9561
8d138742 9562case $host in
b0322a85 9563*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8d138742
CE
9564 AC_CHECK_TOOL(AS, as, false)
9565 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9566 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9567 ;;
9568esac
d9898ee8 9569
8d138742 9570test -z "$AS" && AS=as
b0322a85 9571_LT_DECL([], [AS], [1], [Assembler program])dnl
d9898ee8 9572
8d138742 9573test -z "$DLLTOOL" && DLLTOOL=dlltool
b0322a85 9574_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
d9898ee8 9575
8d138742 9576test -z "$OBJDUMP" && OBJDUMP=objdump
b0322a85 9577_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8d138742 9578])# win32-dll
d9898ee8 9579
8d138742
CE
9580AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9581[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9582_LT_SET_OPTION([LT_INIT], [win32-dll])
9583AC_DIAGNOSE([obsolete],
9584[$0: Remove this warning and the call to _LT_SET_OPTION when you
d50284c4 9585put the 'win32-dll' option into LT_INIT's first parameter.])
8d138742 9586])
d9898ee8 9587
8d138742
CE
9588dnl aclocal-1.4 backwards compatibility:
9589dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9590
9591
9592# _LT_ENABLE_SHARED([DEFAULT])
9593# ----------------------------
d50284c4
CE
9594# implement the --enable-shared flag, and supports the 'shared' and
9595# 'disable-shared' LT_INIT options.
9596# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
8d138742
CE
9597m4_define([_LT_ENABLE_SHARED],
9598[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9599AC_ARG_ENABLE([shared],
9600 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9601 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9602 [p=${PACKAGE-default}
9603 case $enableval in
9604 yes) enable_shared=yes ;;
9605 no) enable_shared=no ;;
9606 *)
9607 enable_shared=no
9608 # Look at the argument we got. We use all the common list separators.
d50284c4 9609 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8d138742 9610 for pkg in $enableval; do
d50284c4 9611 IFS=$lt_save_ifs
8d138742
CE
9612 if test "X$pkg" = "X$p"; then
9613 enable_shared=yes
9614 fi
9615 done
d50284c4 9616 IFS=$lt_save_ifs
d9898ee8 9617 ;;
8d138742
CE
9618 esac],
9619 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
d9898ee8 9620
8d138742
CE
9621 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9622 [Whether or not to build shared libraries])
9623])# _LT_ENABLE_SHARED
d9898ee8 9624
8d138742
CE
9625LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9626LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
d9898ee8 9627
8d138742
CE
9628# Old names:
9629AC_DEFUN([AC_ENABLE_SHARED],
9630[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9631])
d9898ee8 9632
8d138742
CE
9633AC_DEFUN([AC_DISABLE_SHARED],
9634[_LT_SET_OPTION([LT_INIT], [disable-shared])
9635])
d9898ee8 9636
8d138742
CE
9637AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9638AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
d9898ee8 9639
8d138742
CE
9640dnl aclocal-1.4 backwards compatibility:
9641dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9642dnl AC_DEFUN([AM_DISABLE_SHARED], [])
d9898ee8 9643
d9898ee8 9644
d9898ee8 9645
8d138742
CE
9646# _LT_ENABLE_STATIC([DEFAULT])
9647# ----------------------------
d50284c4
CE
9648# implement the --enable-static flag, and support the 'static' and
9649# 'disable-static' LT_INIT options.
9650# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
8d138742
CE
9651m4_define([_LT_ENABLE_STATIC],
9652[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9653AC_ARG_ENABLE([static],
9654 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9655 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9656 [p=${PACKAGE-default}
9657 case $enableval in
9658 yes) enable_static=yes ;;
9659 no) enable_static=no ;;
9660 *)
9661 enable_static=no
9662 # Look at the argument we got. We use all the common list separators.
d50284c4 9663 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8d138742 9664 for pkg in $enableval; do
d50284c4 9665 IFS=$lt_save_ifs
8d138742
CE
9666 if test "X$pkg" = "X$p"; then
9667 enable_static=yes
9668 fi
9669 done
d50284c4 9670 IFS=$lt_save_ifs
d9898ee8 9671 ;;
8d138742
CE
9672 esac],
9673 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
d9898ee8 9674
8d138742
CE
9675 _LT_DECL([build_old_libs], [enable_static], [0],
9676 [Whether or not to build static libraries])
9677])# _LT_ENABLE_STATIC
d9898ee8 9678
8d138742
CE
9679LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9680LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
d9898ee8 9681
8d138742
CE
9682# Old names:
9683AC_DEFUN([AC_ENABLE_STATIC],
9684[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9685])
d9898ee8 9686
8d138742
CE
9687AC_DEFUN([AC_DISABLE_STATIC],
9688[_LT_SET_OPTION([LT_INIT], [disable-static])
9689])
d9898ee8 9690
8d138742
CE
9691AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9692AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
d9898ee8 9693
8d138742
CE
9694dnl aclocal-1.4 backwards compatibility:
9695dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9696dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9697
9698
9699
9700# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9701# ----------------------------------
d50284c4
CE
9702# implement the --enable-fast-install flag, and support the 'fast-install'
9703# and 'disable-fast-install' LT_INIT options.
9704# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
8d138742
CE
9705m4_define([_LT_ENABLE_FAST_INSTALL],
9706[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9707AC_ARG_ENABLE([fast-install],
9708 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9709 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9710 [p=${PACKAGE-default}
9711 case $enableval in
9712 yes) enable_fast_install=yes ;;
9713 no) enable_fast_install=no ;;
9714 *)
9715 enable_fast_install=no
9716 # Look at the argument we got. We use all the common list separators.
d50284c4 9717 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8d138742 9718 for pkg in $enableval; do
d50284c4 9719 IFS=$lt_save_ifs
8d138742
CE
9720 if test "X$pkg" = "X$p"; then
9721 enable_fast_install=yes
ac40fd9e 9722 fi
8d138742 9723 done
d50284c4 9724 IFS=$lt_save_ifs
d9898ee8 9725 ;;
8d138742
CE
9726 esac],
9727 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
d9898ee8 9728
8d138742
CE
9729_LT_DECL([fast_install], [enable_fast_install], [0],
9730 [Whether or not to optimize for fast installation])dnl
9731])# _LT_ENABLE_FAST_INSTALL
d9898ee8 9732
8d138742
CE
9733LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9734LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
d9898ee8 9735
8d138742
CE
9736# Old names:
9737AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9738[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9739AC_DIAGNOSE([obsolete],
9740[$0: Remove this warning and the call to _LT_SET_OPTION when you put
d50284c4 9741the 'fast-install' option into LT_INIT's first parameter.])
8d138742 9742])
d9898ee8 9743
8d138742
CE
9744AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9745[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9746AC_DIAGNOSE([obsolete],
9747[$0: Remove this warning and the call to _LT_SET_OPTION when you put
d50284c4 9748the 'disable-fast-install' option into LT_INIT's first parameter.])
8d138742 9749])
d9898ee8 9750
8d138742
CE
9751dnl aclocal-1.4 backwards compatibility:
9752dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9753dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
d9898ee8 9754
d9898ee8 9755
d50284c4
CE
9756# _LT_WITH_AIX_SONAME([DEFAULT])
9757# ----------------------------------
9758# implement the --with-aix-soname flag, and support the `aix-soname=aix'
9759# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
9760# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
9761m4_define([_LT_WITH_AIX_SONAME],
9762[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
9763shared_archive_member_spec=
9764case $host,$enable_shared in
9765power*-*-aix[[5-9]]*,yes)
9766 AC_MSG_CHECKING([which variant of shared library versioning to provide])
9767 AC_ARG_WITH([aix-soname],
9768 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
9769 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
9770 [case $withval in
9771 aix|svr4|both)
9772 ;;
9773 *)
9774 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
9775 ;;
9776 esac
9777 lt_cv_with_aix_soname=$with_aix_soname],
9778 [AC_CACHE_VAL([lt_cv_with_aix_soname],
9779 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
9780 with_aix_soname=$lt_cv_with_aix_soname])
9781 AC_MSG_RESULT([$with_aix_soname])
9782 if test aix != "$with_aix_soname"; then
9783 # For the AIX way of multilib, we name the shared archive member
9784 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
9785 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
9786 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
9787 # the AIX toolchain works better with OBJECT_MODE set (default 32).
9788 if test 64 = "${OBJECT_MODE-32}"; then
9789 shared_archive_member_spec=shr_64
9790 else
9791 shared_archive_member_spec=shr
9792 fi
9793 fi
9794 ;;
9795*)
9796 with_aix_soname=aix
9797 ;;
9798esac
9799
9800_LT_DECL([], [shared_archive_member_spec], [0],
9801 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
9802])# _LT_WITH_AIX_SONAME
9803
9804LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
9805LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
9806LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
9807
9808
8d138742
CE
9809# _LT_WITH_PIC([MODE])
9810# --------------------
d50284c4 9811# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
8d138742 9812# LT_INIT options.
d50284c4 9813# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
8d138742
CE
9814m4_define([_LT_WITH_PIC],
9815[AC_ARG_WITH([pic],
b0322a85 9816 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8d138742 9817 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
b0322a85
CE
9818 [lt_p=${PACKAGE-default}
9819 case $withval in
9820 yes|no) pic_mode=$withval ;;
9821 *)
9822 pic_mode=default
9823 # Look at the argument we got. We use all the common list separators.
d50284c4 9824 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
b0322a85 9825 for lt_pkg in $withval; do
d50284c4 9826 IFS=$lt_save_ifs
b0322a85
CE
9827 if test "X$lt_pkg" = "X$lt_p"; then
9828 pic_mode=yes
9829 fi
9830 done
d50284c4 9831 IFS=$lt_save_ifs
b0322a85
CE
9832 ;;
9833 esac],
d50284c4 9834 [pic_mode=m4_default([$1], [default])])
d9898ee8 9835
8d138742
CE
9836_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9837])# _LT_WITH_PIC
d9898ee8 9838
8d138742
CE
9839LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9840LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9841
9842# Old name:
9843AU_DEFUN([AC_LIBTOOL_PICMODE],
9844[_LT_SET_OPTION([LT_INIT], [pic-only])
9845AC_DIAGNOSE([obsolete],
9846[$0: Remove this warning and the call to _LT_SET_OPTION when you
d50284c4 9847put the 'pic-only' option into LT_INIT's first parameter.])
d9898ee8 9848])
d9898ee8 9849
8d138742
CE
9850dnl aclocal-1.4 backwards compatibility:
9851dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
d9898ee8 9852
d9898ee8 9853
8d138742
CE
9854m4_define([_LTDL_MODE], [])
9855LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9856 [m4_define([_LTDL_MODE], [nonrecursive])])
9857LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9858 [m4_define([_LTDL_MODE], [recursive])])
9859LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9860 [m4_define([_LTDL_MODE], [subproject])])
d9898ee8 9861
8d138742
CE
9862m4_define([_LTDL_TYPE], [])
9863LT_OPTION_DEFINE([LTDL_INIT], [installable],
9864 [m4_define([_LTDL_TYPE], [installable])])
9865LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9866 [m4_define([_LTDL_TYPE], [convenience])])
d9898ee8 9867
8d138742 9868# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
d9898ee8 9869#
d50284c4
CE
9870# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
9871# Foundation, Inc.
8d138742 9872# Written by Gary V. Vaughan, 2004
d9898ee8 9873#
8d138742
CE
9874# This file is free software; the Free Software Foundation gives
9875# unlimited permission to copy and/or distribute it, with or without
9876# modifications, as long as this notice is preserved.
d9898ee8 9877
8d138742 9878# serial 6 ltsugar.m4
d9898ee8 9879
8d138742
CE
9880# This is to help aclocal find these macros, as it can't see m4_define.
9881AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
d9898ee8 9882
9883
8d138742
CE
9884# lt_join(SEP, ARG1, [ARG2...])
9885# -----------------------------
9886# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9887# associated separator.
9888# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9889# versions in m4sugar had bugs.
9890m4_define([lt_join],
9891[m4_if([$#], [1], [],
9892 [$#], [2], [[$2]],
9893 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9894m4_define([_lt_join],
9895[m4_if([$#$2], [2], [],
9896 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9897
9898
9899# lt_car(LIST)
9900# lt_cdr(LIST)
9901# ------------
9902# Manipulate m4 lists.
9903# These macros are necessary as long as will still need to support
d50284c4 9904# Autoconf-2.59, which quotes differently.
8d138742
CE
9905m4_define([lt_car], [[$1]])
9906m4_define([lt_cdr],
9907[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9908 [$#], 1, [],
9909 [m4_dquote(m4_shift($@))])])
9910m4_define([lt_unquote], $1)
9911
9912
9913# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9914# ------------------------------------------
d50284c4 9915# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
8d138742
CE
9916# Note that neither SEPARATOR nor STRING are expanded; they are appended
9917# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9918# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9919# than defined and empty).
9920#
9921# This macro is needed until we can rely on Autoconf 2.62, since earlier
9922# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9923m4_define([lt_append],
9924[m4_define([$1],
9925 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9926
9927
9928
9929# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9930# ----------------------------------------------------------
9931# Produce a SEP delimited list of all paired combinations of elements of
9932# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9933# has the form PREFIXmINFIXSUFFIXn.
9934# Needed until we can rely on m4_combine added in Autoconf 2.62.
9935m4_define([lt_combine],
9936[m4_if(m4_eval([$# > 3]), [1],
9937 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9938[[m4_foreach([_Lt_prefix], [$2],
9939 [m4_foreach([_Lt_suffix],
9940 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9941 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9942
9943
9944# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9945# -----------------------------------------------------------------------
9946# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9947# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9948m4_define([lt_if_append_uniq],
9949[m4_ifdef([$1],
9950 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9951 [lt_append([$1], [$2], [$3])$4],
9952 [$5])],
9953 [lt_append([$1], [$2], [$3])$4])])
9954
9955
9956# lt_dict_add(DICT, KEY, VALUE)
9957# -----------------------------
9958m4_define([lt_dict_add],
9959[m4_define([$1($2)], [$3])])
d9898ee8 9960
d9898ee8 9961
8d138742
CE
9962# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9963# --------------------------------------------
9964m4_define([lt_dict_add_subkey],
9965[m4_define([$1($2:$3)], [$4])])
d9898ee8 9966
8d138742
CE
9967
9968# lt_dict_fetch(DICT, KEY, [SUBKEY])
9969# ----------------------------------
9970m4_define([lt_dict_fetch],
9971[m4_ifval([$3],
9972 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9973 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9974
9975
9976# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9977# -----------------------------------------------------------------
9978m4_define([lt_if_dict_fetch],
9979[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9980 [$5],
9981 [$6])])
9982
9983
9984# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9985# --------------------------------------------------------------
9986m4_define([lt_dict_filter],
9987[m4_if([$5], [], [],
9988 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9989 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9990 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
d9898ee8 9991])
9992
8d138742
CE
9993# ltversion.m4 -- version numbers -*- Autoconf -*-
9994#
d50284c4 9995# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
8d138742
CE
9996# Written by Scott James Remnant, 2004
9997#
9998# This file is free software; the Free Software Foundation gives
9999# unlimited permission to copy and/or distribute it, with or without
10000# modifications, as long as this notice is preserved.
ac40fd9e 10001
b0322a85 10002# @configure_input@
ac40fd9e 10003
d50284c4 10004# serial 4179 ltversion.m4
8d138742 10005# This file is part of GNU Libtool
ac40fd9e 10006
d50284c4
CE
10007m4_define([LT_PACKAGE_VERSION], [2.4.6])
10008m4_define([LT_PACKAGE_REVISION], [2.4.6])
ac40fd9e 10009
8d138742 10010AC_DEFUN([LTVERSION_VERSION],
d50284c4
CE
10011[macro_version='2.4.6'
10012macro_revision='2.4.6'
8d138742
CE
10013_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10014_LT_DECL(, macro_revision, 0)
d9898ee8 10015])
10016
8d138742
CE
10017# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
10018#
d50284c4
CE
10019# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
10020# Foundation, Inc.
8d138742
CE
10021# Written by Scott James Remnant, 2004.
10022#
10023# This file is free software; the Free Software Foundation gives
10024# unlimited permission to copy and/or distribute it, with or without
10025# modifications, as long as this notice is preserved.
10026
b0322a85 10027# serial 5 lt~obsolete.m4
8d138742
CE
10028
10029# These exist entirely to fool aclocal when bootstrapping libtool.
10030#
d50284c4 10031# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
8d138742
CE
10032# which have later been changed to m4_define as they aren't part of the
10033# exported API, or moved to Autoconf or Automake where they belong.
10034#
10035# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
10036# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10037# using a macro with the same name in our local m4/libtool.m4 it'll
10038# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10039# and doesn't know about Autoconf macros at all.)
10040#
10041# So we provide this file, which has a silly filename so it's always
10042# included after everything else. This provides aclocal with the
10043# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10044# because those macros already exist, or will be overwritten later.
d50284c4 10045# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8d138742
CE
10046#
10047# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10048# Yes, that means every name once taken will need to remain here until
10049# we give up compatibility with versions before 1.7, at which point
10050# we need to keep only those names which we still refer to.
10051
10052# This is to help aclocal find these macros, as it can't see m4_define.
10053AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10054
10055m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10056m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
10057m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10058m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
10059m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10060m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
10061m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
10062m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10063m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
10064m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10065m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
10066m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10067m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10068m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10069m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10070m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10071m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
10072m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10073m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10074m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
10075m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
10076m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10077m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10078m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10079m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10080m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10081m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10082m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10083m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
10084m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
10085m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
10086m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10087m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10088m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
10089m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
10090m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10091m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10092m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
10093m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10094m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
10095m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
10096m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8d138742
CE
10097m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10098m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10099m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10100m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10101m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10102m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10103m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10104m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10105m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10106m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10107m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10108m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
b0322a85
CE
10109m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10110m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10111m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10112m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10113m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
10114m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
10115m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
8d138742 10116
d9898ee8 10117# Configure sysconftool
10118# Copyright 2000-2005 Double Precision, Inc. See COPYING for
10119# distribution information.
10120#
10121# AC_PROG_SYSCONFTOOL
10122
10123AC_DEFUN([AC_PROG_SYSCONFTOOL],
10124[
10125
10126 AC_PATH_PROGS(SYSCONFTOOL_PERL, perl5 perl, perl)
10127
10128 if test "$SYSCONFTOOL_PERL" = "perl"
10129 then
10130 AC_ERROR(perl not found - please install perl)
10131 fi
10132
10133 AC_MSG_CHECKING(for sysconftool...)
10134 SYSCONFTOOL=""
10135 for sysconf_dir in $ac_aux_dir . .. ../..
10136 do
10137 if test -f $srcdir/$sysconf_dir/sysconftool
10138 then
10139 SYSCONFTOOL=$srcdir/$sysconf_dir/sysconftool
10140 break
10141 fi
10142 done
10143
10144 if test "$SYSCONFTOOL" = ""
10145 then
10146 AC_ERROR(sysconftool missing - not in the package)
10147 fi
10148
10149 AC_MSG_RESULT( $SYSCONFTOOL)
10150 SYSCONFTOOL="$SYSCONFTOOL_PERL $SYSCONFTOOL"
10151 AC_SUBST(SYSCONFTOOL)
10152]
10153)
10154
0e333c05 10155# Copyright (C) 2002-2017 Free Software Foundation, Inc.
d9898ee8 10156#
10157# This file is free software; the Free Software Foundation
10158# gives unlimited permission to copy and/or distribute it,
10159# with or without modifications, as long as this notice is preserved.
10160
10161# AM_AUTOMAKE_VERSION(VERSION)
10162# ----------------------------
10163# Automake X.Y traces this macro to ensure aclocal.m4 has been
10164# generated from the m4 files accompanying Automake X.Y.
dd184caf 10165# (This private macro should not be called outside this file.)
10166AC_DEFUN([AM_AUTOMAKE_VERSION],
d50284c4 10167[am__api_version='1.15'
dd184caf 10168dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10169dnl require some minimum version. Point them to the right macro.
0e333c05 10170m4_if([$1], [1.15.1], [],
dd184caf 10171 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10172])
10173
10174# _AM_AUTOCONF_VERSION(VERSION)
10175# -----------------------------
10176# aclocal traces this macro to find the Autoconf version.
10177# This is a private macro too. Using m4_define simplifies
10178# the logic in aclocal, which can simply ignore this definition.
10179m4_define([_AM_AUTOCONF_VERSION], [])
d9898ee8 10180
10181# AM_SET_CURRENT_AUTOMAKE_VERSION
10182# -------------------------------
dd184caf 10183# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8d138742 10184# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
d9898ee8 10185AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
0e333c05 10186[AM_AUTOMAKE_VERSION([1.15.1])dnl
ac40fd9e 10187m4_ifndef([AC_AUTOCONF_VERSION],
10188 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8d138742 10189_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
d9898ee8 10190
10191# AM_AUX_DIR_EXPAND -*- Autoconf -*-
10192
0e333c05 10193# Copyright (C) 2001-2017 Free Software Foundation, Inc.
d9898ee8 10194#
10195# This file is free software; the Free Software Foundation
10196# gives unlimited permission to copy and/or distribute it,
10197# with or without modifications, as long as this notice is preserved.
10198
10199# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
b0322a85
CE
10200# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
10201# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
d9898ee8 10202#
10203# Of course, Automake must honor this variable whenever it calls a
10204# tool from the auxiliary directory. The problem is that $srcdir (and
10205# therefore $ac_aux_dir as well) can be either absolute or relative,
10206# depending on how configure is run. This is pretty annoying, since
10207# it makes $ac_aux_dir quite unusable in subdirectories: in the top
10208# source directory, any form will work fine, but in subdirectories a
10209# relative path needs to be adjusted first.
10210#
10211# $ac_aux_dir/missing
10212# fails when called from a subdirectory if $ac_aux_dir is relative
10213# $top_srcdir/$ac_aux_dir/missing
10214# fails if $ac_aux_dir is absolute,
10215# fails when called from a subdirectory in a VPATH build with
10216# a relative $ac_aux_dir
10217#
10218# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10219# are both prefixed by $srcdir. In an in-source build this is usually
b0322a85 10220# harmless because $srcdir is '.', but things will broke when you
d9898ee8 10221# start a VPATH build or use an absolute $srcdir.
10222#
10223# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10224# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
10225# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10226# and then we would define $MISSING as
10227# MISSING="\${SHELL} $am_aux_dir/missing"
10228# This will work as long as MISSING is not called from configure, because
10229# unfortunately $(top_srcdir) has no meaning in configure.
10230# However there are other variables, like CC, which are often used in
10231# configure, and could therefore not use this "fixed" $ac_aux_dir.
10232#
10233# Another solution, used here, is to always expand $ac_aux_dir to an
10234# absolute PATH. The drawback is that using absolute paths prevent a
10235# configured tree to be moved without reconfiguration.
10236
10237AC_DEFUN([AM_AUX_DIR_EXPAND],
d50284c4
CE
10238[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
10239# Expand $ac_aux_dir to an absolute path.
10240am_aux_dir=`cd "$ac_aux_dir" && pwd`
d9898ee8 10241])
10242
10243# AM_CONDITIONAL -*- Autoconf -*-
10244
0e333c05 10245# Copyright (C) 1997-2017 Free Software Foundation, Inc.
d9898ee8 10246#
10247# This file is free software; the Free Software Foundation
10248# gives unlimited permission to copy and/or distribute it,
10249# with or without modifications, as long as this notice is preserved.
10250
d9898ee8 10251# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10252# -------------------------------------
10253# Define a conditional.
10254AC_DEFUN([AM_CONDITIONAL],
b0322a85
CE
10255[AC_PREREQ([2.52])dnl
10256 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
10257 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
dd184caf 10258AC_SUBST([$1_TRUE])dnl
10259AC_SUBST([$1_FALSE])dnl
10260_AM_SUBST_NOTMAKE([$1_TRUE])dnl
10261_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8d138742 10262m4_define([_AM_COND_VALUE_$1], [$2])dnl
d9898ee8 10263if $2; then
10264 $1_TRUE=
10265 $1_FALSE='#'
10266else
10267 $1_TRUE='#'
10268 $1_FALSE=
10269fi
10270AC_CONFIG_COMMANDS_PRE(
10271[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10272 AC_MSG_ERROR([[conditional "$1" was never defined.
10273Usually this means the macro was only invoked conditionally.]])
10274fi])])
10275
0e333c05 10276# Copyright (C) 1999-2017 Free Software Foundation, Inc.
d9898ee8 10277#
10278# This file is free software; the Free Software Foundation
10279# gives unlimited permission to copy and/or distribute it,
10280# with or without modifications, as long as this notice is preserved.
10281
d9898ee8 10282
b0322a85 10283# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
d9898ee8 10284# written in clear, in which case automake, when reading aclocal.m4,
10285# will think it sees a *use*, and therefore will trigger all it's
10286# C support machinery. Also note that it means that autoscan, seeing
10287# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10288
10289
10290# _AM_DEPENDENCIES(NAME)
10291# ----------------------
10292# See how the compiler implements dependency checking.
b0322a85 10293# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
d9898ee8 10294# We try a few techniques and use that to set a single cache variable.
10295#
10296# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10297# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10298# dependency, and given that the user is not expected to run this macro,
10299# just rely on AC_PROG_CC.
10300AC_DEFUN([_AM_DEPENDENCIES],
10301[AC_REQUIRE([AM_SET_DEPDIR])dnl
10302AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10303AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10304AC_REQUIRE([AM_DEP_TRACK])dnl
10305
b0322a85
CE
10306m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
10307 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
10308 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10309 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10310 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
10311 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
10312 [depcc="$$1" am_compiler_list=])
d9898ee8 10313
10314AC_CACHE_CHECK([dependency style of $depcc],
10315 [am_cv_$1_dependencies_compiler_type],
10316[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10317 # We make a subdir and do the tests there. Otherwise we can end up
10318 # making bogus files that we don't know about and never remove. For
10319 # instance it was reported that on HP-UX the gcc test will end up
b0322a85
CE
10320 # making a dummy file named 'D' -- because '-MD' means "put the output
10321 # in D".
10322 rm -rf conftest.dir
d9898ee8 10323 mkdir conftest.dir
10324 # Copy depcomp to subdir because otherwise we won't find it if we're
10325 # using a relative directory.
10326 cp "$am_depcomp" conftest.dir
10327 cd conftest.dir
10328 # We will build objects and dependencies in a subdirectory because
10329 # it helps to detect inapplicable dependency modes. For instance
10330 # both Tru64's cc and ICC support -MD to output dependencies as a
10331 # side effect of compilation, but ICC will put the dependencies in
10332 # the current directory while Tru64 will put them in the object
10333 # directory.
10334 mkdir sub
10335
10336 am_cv_$1_dependencies_compiler_type=none
10337 if test "$am_compiler_list" = ""; then
10338 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10339 fi
8d138742
CE
10340 am__universal=false
10341 m4_case([$1], [CC],
10342 [case " $depcc " in #(
10343 *\ -arch\ *\ -arch\ *) am__universal=true ;;
10344 esac],
10345 [CXX],
10346 [case " $depcc " in #(
10347 *\ -arch\ *\ -arch\ *) am__universal=true ;;
10348 esac])
10349
d9898ee8 10350 for depmode in $am_compiler_list; do
10351 # Setup a source with many dependencies, because some compilers
10352 # like to wrap large dependency lists on column 80 (with \), and
10353 # we should not choose a depcomp mode which is confused by this.
10354 #
10355 # We need to recreate these files for each test, as the compiler may
10356 # overwrite some of them when testing with obscure command lines.
10357 # This happens at least with the AIX C compiler.
10358 : > sub/conftest.c
10359 for i in 1 2 3 4 5 6; do
10360 echo '#include "conftst'$i'.h"' >> sub/conftest.c
b0322a85
CE
10361 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10362 # Solaris 10 /bin/sh.
10363 echo '/* dummy */' > sub/conftst$i.h
d9898ee8 10364 done
10365 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10366
b0322a85 10367 # We check with '-c' and '-o' for the sake of the "dashmstdout"
8d138742 10368 # mode. It turns out that the SunPro C++ compiler does not properly
b0322a85
CE
10369 # handle '-M -o', and we need to detect this. Also, some Intel
10370 # versions had trouble with output in subdirs.
8d138742
CE
10371 am__obj=sub/conftest.${OBJEXT-o}
10372 am__minus_obj="-o $am__obj"
d9898ee8 10373 case $depmode in
8d138742
CE
10374 gcc)
10375 # This depmode causes a compiler race in universal mode.
10376 test "$am__universal" = false || continue
10377 ;;
d9898ee8 10378 nosideeffect)
b0322a85
CE
10379 # After this tag, mechanisms are not by side-effect, so they'll
10380 # only be used when explicitly requested.
d9898ee8 10381 if test "x$enable_dependency_tracking" = xyes; then
10382 continue
10383 else
10384 break
10385 fi
10386 ;;
b0322a85
CE
10387 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10388 # This compiler won't grok '-c -o', but also, the minuso test has
8d138742
CE
10389 # not run yet. These depmodes are late enough in the game, and
10390 # so weak that their functioning should not be impacted.
10391 am__obj=conftest.${OBJEXT-o}
10392 am__minus_obj=
10393 ;;
d9898ee8 10394 none) break ;;
10395 esac
d9898ee8 10396 if depmode=$depmode \
8d138742 10397 source=sub/conftest.c object=$am__obj \
d9898ee8 10398 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8d138742 10399 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
d9898ee8 10400 >/dev/null 2>conftest.err &&
dd184caf 10401 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
d9898ee8 10402 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8d138742 10403 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
d9898ee8 10404 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10405 # icc doesn't choke on unknown options, it will just issue warnings
10406 # or remarks (even with -Werror). So we grep stderr for any message
10407 # that says an option was ignored or not supported.
10408 # When given -MP, icc 7.0 and 7.1 complain thusly:
10409 # icc: Command line warning: ignoring option '-M'; no argument required
10410 # The diagnosis changed in icc 8.0:
10411 # icc: Command line remark: option '-MP' not supported
10412 if (grep 'ignoring option' conftest.err ||
10413 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10414 am_cv_$1_dependencies_compiler_type=$depmode
10415 break
10416 fi
10417 fi
10418 done
10419
10420 cd ..
10421 rm -rf conftest.dir
10422else
10423 am_cv_$1_dependencies_compiler_type=none
10424fi
10425])
10426AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10427AM_CONDITIONAL([am__fastdep$1], [
10428 test "x$enable_dependency_tracking" != xno \
10429 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10430])
10431
10432
10433# AM_SET_DEPDIR
10434# -------------
10435# Choose a directory name for dependency files.
b0322a85 10436# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
d9898ee8 10437AC_DEFUN([AM_SET_DEPDIR],
10438[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10439AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10440])
10441
10442
10443# AM_DEP_TRACK
10444# ------------
10445AC_DEFUN([AM_DEP_TRACK],
b0322a85
CE
10446[AC_ARG_ENABLE([dependency-tracking], [dnl
10447AS_HELP_STRING(
10448 [--enable-dependency-tracking],
10449 [do not reject slow dependency extractors])
10450AS_HELP_STRING(
10451 [--disable-dependency-tracking],
10452 [speeds up one-time build])])
d9898ee8 10453if test "x$enable_dependency_tracking" != xno; then
10454 am_depcomp="$ac_aux_dir/depcomp"
10455 AMDEPBACKSLASH='\'
b0322a85 10456 am__nodep='_no'
d9898ee8 10457fi
10458AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
dd184caf 10459AC_SUBST([AMDEPBACKSLASH])dnl
10460_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
b0322a85
CE
10461AC_SUBST([am__nodep])dnl
10462_AM_SUBST_NOTMAKE([am__nodep])dnl
d9898ee8 10463])
10464
10465# Generate code to set up dependency tracking. -*- Autoconf -*-
10466
0e333c05 10467# Copyright (C) 1999-2017 Free Software Foundation, Inc.
d9898ee8 10468#
10469# This file is free software; the Free Software Foundation
10470# gives unlimited permission to copy and/or distribute it,
10471# with or without modifications, as long as this notice is preserved.
10472
d9898ee8 10473
10474# _AM_OUTPUT_DEPENDENCY_COMMANDS
10475# ------------------------------
10476AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8d138742 10477[{
b0322a85 10478 # Older Autoconf quotes --file arguments for eval, but not when files
8d138742
CE
10479 # are listed without --file. Let's play safe and only enable the eval
10480 # if we detect the quoting.
10481 case $CONFIG_FILES in
10482 *\'*) eval set x "$CONFIG_FILES" ;;
10483 *) set x $CONFIG_FILES ;;
10484 esac
10485 shift
10486 for mf
10487 do
10488 # Strip MF so we end up with the name of the file.
10489 mf=`echo "$mf" | sed -e 's/:.*$//'`
10490 # Check whether this is an Automake generated Makefile or not.
b0322a85 10491 # We used to match only the files named 'Makefile.in', but
8d138742
CE
10492 # some people rename them; so instead we look at the file content.
10493 # Grep'ing the first line is not enough: some people post-process
10494 # each Makefile.in and add a new line on top of each file to say so.
10495 # Grep'ing the whole file is not good either: AIX grep has a line
10496 # limit of 2048, but all sed's we know have understand at least 4000.
10497 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10498 dirpart=`AS_DIRNAME("$mf")`
10499 else
10500 continue
10501 fi
10502 # Extract the definition of DEPDIR, am__include, and am__quote
b0322a85 10503 # from the Makefile without running 'make'.
8d138742
CE
10504 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10505 test -z "$DEPDIR" && continue
10506 am__include=`sed -n 's/^am__include = //p' < "$mf"`
b0322a85 10507 test -z "$am__include" && continue
8d138742 10508 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8d138742
CE
10509 # Find all dependency output files, they are included files with
10510 # $(DEPDIR) in their names. We invoke sed twice because it is the
10511 # simplest approach to changing $(DEPDIR) to its actual value in the
10512 # expansion.
10513 for file in `sed -n "
10514 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
b0322a85 10515 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
8d138742
CE
10516 # Make sure the directory exists.
10517 test -f "$dirpart/$file" && continue
10518 fdir=`AS_DIRNAME(["$file"])`
10519 AS_MKDIR_P([$dirpart/$fdir])
10520 # echo "creating $dirpart/$file"
10521 echo '# dummy' > "$dirpart/$file"
10522 done
d9898ee8 10523 done
8d138742 10524}
d9898ee8 10525])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10526
10527
10528# AM_OUTPUT_DEPENDENCY_COMMANDS
10529# -----------------------------
10530# This macro should only be invoked once -- use via AC_REQUIRE.
10531#
10532# This code is only required when automatic dependency tracking
b0322a85 10533# is enabled. FIXME. This creates each '.P' file that we will
d9898ee8 10534# need in order to bootstrap the dependency handling code.
10535AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10536[AC_CONFIG_COMMANDS([depfiles],
10537 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10538 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10539])
10540
d9898ee8 10541# Do all the work for Automake. -*- Autoconf -*-
10542
0e333c05 10543# Copyright (C) 1996-2017 Free Software Foundation, Inc.
d9898ee8 10544#
10545# This file is free software; the Free Software Foundation
10546# gives unlimited permission to copy and/or distribute it,
10547# with or without modifications, as long as this notice is preserved.
10548
d9898ee8 10549# This macro actually does too much. Some checks are only needed if
10550# your package does certain things. But this isn't really a big deal.
10551
d50284c4
CE
10552dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10553m4_define([AC_PROG_CC],
10554m4_defn([AC_PROG_CC])
10555[_AM_PROG_CC_C_O
10556])
10557
d9898ee8 10558# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10559# AM_INIT_AUTOMAKE([OPTIONS])
10560# -----------------------------------------------
10561# The call with PACKAGE and VERSION arguments is the old style
10562# call (pre autoconf-2.50), which is being phased out. PACKAGE
10563# and VERSION should now be passed to AC_INIT and removed from
10564# the call to AM_INIT_AUTOMAKE.
10565# We support both call styles for the transition. After
10566# the next Automake release, Autoconf can make the AC_INIT
10567# arguments mandatory, and then we can depend on a new Autoconf
10568# release and drop the old call support.
10569AC_DEFUN([AM_INIT_AUTOMAKE],
b0322a85 10570[AC_PREREQ([2.65])dnl
d9898ee8 10571dnl Autoconf wants to disallow AM_ names. We explicitly allow
10572dnl the ones we care about.
10573m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10574AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10575AC_REQUIRE([AC_PROG_INSTALL])dnl
dd184caf 10576if test "`cd $srcdir && pwd`" != "`pwd`"; then
10577 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10578 # is not polluted with repeated "-I."
10579 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10580 # test to see if srcdir already configured
10581 if test -f $srcdir/config.status; then
10582 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10583 fi
d9898ee8 10584fi
10585
10586# test whether we have cygpath
10587if test -z "$CYGPATH_W"; then
10588 if (cygpath --version) >/dev/null 2>/dev/null; then
10589 CYGPATH_W='cygpath -w'
10590 else
10591 CYGPATH_W=echo
10592 fi
10593fi
10594AC_SUBST([CYGPATH_W])
10595
10596# Define the identity of the package.
10597dnl Distinguish between old-style and new-style calls.
10598m4_ifval([$2],
b0322a85
CE
10599[AC_DIAGNOSE([obsolete],
10600 [$0: two- and three-arguments forms are deprecated.])
10601m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
d9898ee8 10602 AC_SUBST([PACKAGE], [$1])dnl
10603 AC_SUBST([VERSION], [$2])],
10604[_AM_SET_OPTIONS([$1])dnl
dd184caf 10605dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
b0322a85
CE
10606m4_if(
10607 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10608 [ok:ok],,
dd184caf 10609 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
d9898ee8 10610 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10611 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10612
10613_AM_IF_OPTION([no-define],,
b0322a85
CE
10614[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10615 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
d9898ee8 10616
10617# Some tools Automake needs.
10618AC_REQUIRE([AM_SANITY_CHECK])dnl
10619AC_REQUIRE([AC_ARG_PROGRAM])dnl
b0322a85
CE
10620AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10621AM_MISSING_PROG([AUTOCONF], [autoconf])
10622AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10623AM_MISSING_PROG([AUTOHEADER], [autoheader])
10624AM_MISSING_PROG([MAKEINFO], [makeinfo])
8d138742
CE
10625AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10626AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
b0322a85
CE
10627AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10628# For better backward compatibility. To be removed once Automake 1.9.x
10629# dies out for good. For more background, see:
10630# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10631# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10632AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
d50284c4
CE
10633# We need awk for the "check" target (and possibly the TAP driver). The
10634# system "awk" is bad on some platforms.
d9898ee8 10635AC_REQUIRE([AC_PROG_AWK])dnl
10636AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10637AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10638_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8d138742
CE
10639 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10640 [_AM_PROG_TAR([v7])])])
d9898ee8 10641_AM_IF_OPTION([no-dependencies],,
10642[AC_PROVIDE_IFELSE([AC_PROG_CC],
b0322a85
CE
10643 [_AM_DEPENDENCIES([CC])],
10644 [m4_define([AC_PROG_CC],
10645 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
d9898ee8 10646AC_PROVIDE_IFELSE([AC_PROG_CXX],
b0322a85
CE
10647 [_AM_DEPENDENCIES([CXX])],
10648 [m4_define([AC_PROG_CXX],
10649 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
dd184caf 10650AC_PROVIDE_IFELSE([AC_PROG_OBJC],
b0322a85
CE
10651 [_AM_DEPENDENCIES([OBJC])],
10652 [m4_define([AC_PROG_OBJC],
10653 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10654AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10655 [_AM_DEPENDENCIES([OBJCXX])],
10656 [m4_define([AC_PROG_OBJCXX],
10657 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
d9898ee8 10658])
b0322a85
CE
10659AC_REQUIRE([AM_SILENT_RULES])dnl
10660dnl The testsuite driver may need to know about EXEEXT, so add the
10661dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
10662dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
8d138742
CE
10663AC_CONFIG_COMMANDS_PRE(dnl
10664[m4_provide_if([_AM_COMPILER_EXEEXT],
10665 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
d50284c4
CE
10666
10667# POSIX will say in a future version that running "rm -f" with no argument
10668# is OK; and we want to be able to make that assumption in our Makefile
10669# recipes. So use an aggressive probe to check that the usage we want is
10670# actually supported "in the wild" to an acceptable degree.
10671# See automake bug#10828.
10672# To make any issue more visible, cause the running configure to be aborted
10673# by default if the 'rm' program in use doesn't match our expectations; the
10674# user can still override this though.
10675if rm -f && rm -fr && rm -rf; then : OK; else
10676 cat >&2 <<'END'
10677Oops!
10678
10679Your 'rm' program seems unable to run without file operands specified
10680on the command line, even when the '-f' option is present. This is contrary
10681to the behaviour of most rm programs out there, and not conforming with
10682the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10683
10684Please tell bug-automake@gnu.org about your system, including the value
10685of your $PATH and any error possibly output before this message. This
10686can help us improve future automake versions.
10687
10688END
10689 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10690 echo 'Configuration will proceed anyway, since you have set the' >&2
10691 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10692 echo >&2
10693 else
10694 cat >&2 <<'END'
10695Aborting the configuration process, to ensure you take notice of the issue.
10696
10697You can download and install GNU coreutils to get an 'rm' implementation
10698that behaves properly: <http://www.gnu.org/software/coreutils/>.
10699
10700If you want to complete the configuration process using your problematic
10701'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10702to "yes", and re-run configure.
10703
10704END
10705 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10706 fi
10707fi
10708dnl The trailing newline in this macro's definition is deliberate, for
10709dnl backward compatibility and to allow trailing 'dnl'-style comments
10710dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
d9898ee8 10711])
10712
b0322a85 10713dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
8d138742
CE
10714dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10715dnl mangled by Autoconf and run in a shell conditional statement.
10716m4_define([_AC_COMPILER_EXEEXT],
10717m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10718
d9898ee8 10719# When config.status generates a header, we must update the stamp-h file.
10720# This file resides in the same directory as the config header
10721# that is generated. The stamp files are numbered to have different names.
10722
10723# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10724# loop where config.status creates the headers, so we can generate
10725# our stamp files there.
10726AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10727[# Compute $1's index in $config_headers.
ac40fd9e 10728_am_arg=$1
d9898ee8 10729_am_stamp_count=1
10730for _am_header in $config_headers :; do
10731 case $_am_header in
ac40fd9e 10732 $_am_arg | $_am_arg:* )
d9898ee8 10733 break ;;
10734 * )
10735 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10736 esac
10737done
ac40fd9e 10738echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
d9898ee8 10739
0e333c05 10740# Copyright (C) 2001-2017 Free Software Foundation, Inc.
d9898ee8 10741#
10742# This file is free software; the Free Software Foundation
10743# gives unlimited permission to copy and/or distribute it,
10744# with or without modifications, as long as this notice is preserved.
10745
10746# AM_PROG_INSTALL_SH
10747# ------------------
10748# Define $install_sh.
10749AC_DEFUN([AM_PROG_INSTALL_SH],
10750[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
d50284c4 10751if test x"${install_sh+set}" != xset; then
8d138742
CE
10752 case $am_aux_dir in
10753 *\ * | *\ *)
10754 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10755 *)
10756 install_sh="\${SHELL} $am_aux_dir/install-sh"
10757 esac
10758fi
b0322a85 10759AC_SUBST([install_sh])])
d9898ee8 10760
0e333c05 10761# Copyright (C) 2003-2017 Free Software Foundation, Inc.
d9898ee8 10762#
10763# This file is free software; the Free Software Foundation
10764# gives unlimited permission to copy and/or distribute it,
10765# with or without modifications, as long as this notice is preserved.
10766
d9898ee8 10767# Check whether the underlying file-system supports filenames
10768# with a leading dot. For instance MS-DOS doesn't.
10769AC_DEFUN([AM_SET_LEADING_DOT],
10770[rm -rf .tst 2>/dev/null
10771mkdir .tst 2>/dev/null
10772if test -d .tst; then
10773 am__leading_dot=.
10774else
10775 am__leading_dot=_
10776fi
10777rmdir .tst 2>/dev/null
10778AC_SUBST([am__leading_dot])])
10779
10780# Check to see how 'make' treats includes. -*- Autoconf -*-
10781
0e333c05 10782# Copyright (C) 2001-2017 Free Software Foundation, Inc.
d9898ee8 10783#
10784# This file is free software; the Free Software Foundation
10785# gives unlimited permission to copy and/or distribute it,
10786# with or without modifications, as long as this notice is preserved.
10787
d9898ee8 10788# AM_MAKE_INCLUDE()
10789# -----------------
10790# Check to see how make treats includes.
10791AC_DEFUN([AM_MAKE_INCLUDE],
10792[am_make=${MAKE-make}
10793cat > confinc << 'END'
10794am__doit:
8d138742 10795 @echo this is the am__doit target
d9898ee8 10796.PHONY: am__doit
10797END
10798# If we don't find an include directive, just comment out the code.
10799AC_MSG_CHECKING([for style of include used by $am_make])
10800am__include="#"
10801am__quote=
10802_am_result=none
10803# First try GNU make style include.
10804echo "include confinc" > confmf
b0322a85 10805# Ignore all kinds of additional output from 'make'.
8d138742
CE
10806case `$am_make -s -f confmf 2> /dev/null` in #(
10807*the\ am__doit\ target*)
10808 am__include=include
10809 am__quote=
10810 _am_result=GNU
10811 ;;
10812esac
d9898ee8 10813# Now try BSD make style include.
10814if test "$am__include" = "#"; then
10815 echo '.include "confinc"' > confmf
8d138742
CE
10816 case `$am_make -s -f confmf 2> /dev/null` in #(
10817 *the\ am__doit\ target*)
10818 am__include=.include
10819 am__quote="\""
10820 _am_result=BSD
10821 ;;
10822 esac
d9898ee8 10823fi
10824AC_SUBST([am__include])
10825AC_SUBST([am__quote])
10826AC_MSG_RESULT([$_am_result])
10827rm -f confinc confmf
10828])
10829
10830# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10831
0e333c05 10832# Copyright (C) 1997-2017 Free Software Foundation, Inc.
d9898ee8 10833#
10834# This file is free software; the Free Software Foundation
10835# gives unlimited permission to copy and/or distribute it,
10836# with or without modifications, as long as this notice is preserved.
10837
d9898ee8 10838# AM_MISSING_PROG(NAME, PROGRAM)
10839# ------------------------------
10840AC_DEFUN([AM_MISSING_PROG],
10841[AC_REQUIRE([AM_MISSING_HAS_RUN])
10842$1=${$1-"${am_missing_run}$2"}
10843AC_SUBST($1)])
10844
d9898ee8 10845# AM_MISSING_HAS_RUN
10846# ------------------
b0322a85
CE
10847# Define MISSING if not defined so far and test if it is modern enough.
10848# If it is, set am_missing_run to use it, otherwise, to nothing.
d9898ee8 10849AC_DEFUN([AM_MISSING_HAS_RUN],
10850[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
dd184caf 10851AC_REQUIRE_AUX_FILE([missing])dnl
8d138742
CE
10852if test x"${MISSING+set}" != xset; then
10853 case $am_aux_dir in
10854 *\ * | *\ *)
10855 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10856 *)
10857 MISSING="\${SHELL} $am_aux_dir/missing" ;;
10858 esac
10859fi
d9898ee8 10860# Use eval to expand $SHELL
b0322a85
CE
10861if eval "$MISSING --is-lightweight"; then
10862 am_missing_run="$MISSING "
d9898ee8 10863else
10864 am_missing_run=
b0322a85 10865 AC_MSG_WARN(['missing' script is too old or missing])
d9898ee8 10866fi
10867])
10868
d9898ee8 10869# Helper functions for option handling. -*- Autoconf -*-
10870
0e333c05 10871# Copyright (C) 2001-2017 Free Software Foundation, Inc.
d9898ee8 10872#
10873# This file is free software; the Free Software Foundation
10874# gives unlimited permission to copy and/or distribute it,
10875# with or without modifications, as long as this notice is preserved.
10876
d9898ee8 10877# _AM_MANGLE_OPTION(NAME)
10878# -----------------------
10879AC_DEFUN([_AM_MANGLE_OPTION],
10880[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10881
10882# _AM_SET_OPTION(NAME)
b0322a85 10883# --------------------
d9898ee8 10884# Set option NAME. Presently that only means defining a flag for this option.
10885AC_DEFUN([_AM_SET_OPTION],
b0322a85 10886[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
d9898ee8 10887
10888# _AM_SET_OPTIONS(OPTIONS)
b0322a85 10889# ------------------------
d9898ee8 10890# OPTIONS is a space-separated list of Automake options.
10891AC_DEFUN([_AM_SET_OPTIONS],
8d138742 10892[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
d9898ee8 10893
10894# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10895# -------------------------------------------
10896# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10897AC_DEFUN([_AM_IF_OPTION],
10898[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10899
0e333c05 10900# Copyright (C) 1999-2017 Free Software Foundation, Inc.
d50284c4
CE
10901#
10902# This file is free software; the Free Software Foundation
10903# gives unlimited permission to copy and/or distribute it,
10904# with or without modifications, as long as this notice is preserved.
10905
10906# _AM_PROG_CC_C_O
10907# ---------------
10908# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
10909# to automatically call this.
10910AC_DEFUN([_AM_PROG_CC_C_O],
10911[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10912AC_REQUIRE_AUX_FILE([compile])dnl
10913AC_LANG_PUSH([C])dnl
10914AC_CACHE_CHECK(
10915 [whether $CC understands -c and -o together],
10916 [am_cv_prog_cc_c_o],
10917 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10918 # Make sure it works both with $CC and with simple cc.
10919 # Following AC_PROG_CC_C_O, we do the test twice because some
10920 # compilers refuse to overwrite an existing .o file with -o,
10921 # though they will create one.
10922 am_cv_prog_cc_c_o=yes
10923 for am_i in 1 2; do
10924 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10925 && test -f conftest2.$ac_objext; then
10926 : OK
10927 else
10928 am_cv_prog_cc_c_o=no
10929 break
10930 fi
10931 done
10932 rm -f core conftest*
10933 unset am_i])
10934if test "$am_cv_prog_cc_c_o" != yes; then
10935 # Losing compiler, so override with the script.
10936 # FIXME: It is wrong to rewrite CC.
10937 # But if we don't then we get into trouble of one sort or another.
10938 # A longer-term fix would be to have automake use am__CC in this case,
10939 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10940 CC="$am_aux_dir/compile $CC"
10941fi
10942AC_LANG_POP([C])])
10943
10944# For backward compatibility.
10945AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10946
0e333c05 10947# Copyright (C) 2001-2017 Free Software Foundation, Inc.
d50284c4
CE
10948#
10949# This file is free software; the Free Software Foundation
10950# gives unlimited permission to copy and/or distribute it,
10951# with or without modifications, as long as this notice is preserved.
10952
10953# AM_RUN_LOG(COMMAND)
10954# -------------------
10955# Run COMMAND, save the exit status in ac_status, and log it.
10956# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10957AC_DEFUN([AM_RUN_LOG],
10958[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10959 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10960 ac_status=$?
10961 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10962 (exit $ac_status); }])
10963
d9898ee8 10964# Check to make sure that the build environment is sane. -*- Autoconf -*-
10965
0e333c05 10966# Copyright (C) 1996-2017 Free Software Foundation, Inc.
d9898ee8 10967#
10968# This file is free software; the Free Software Foundation
10969# gives unlimited permission to copy and/or distribute it,
10970# with or without modifications, as long as this notice is preserved.
10971
d9898ee8 10972# AM_SANITY_CHECK
10973# ---------------
10974AC_DEFUN([AM_SANITY_CHECK],
10975[AC_MSG_CHECKING([whether build environment is sane])
8d138742
CE
10976# Reject unsafe characters in $srcdir or the absolute working directory
10977# name. Accept space and tab only in the latter.
10978am_lf='
10979'
10980case `pwd` in
10981 *[[\\\"\#\$\&\'\`$am_lf]]*)
10982 AC_MSG_ERROR([unsafe absolute working directory name]);;
10983esac
10984case $srcdir in
10985 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
b0322a85 10986 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
8d138742
CE
10987esac
10988
b0322a85 10989# Do 'set' in a subshell so we don't clobber the current shell's
d9898ee8 10990# arguments. Must try -L first in case configure is actually a
10991# symlink; some systems play weird games with the mod time of symlinks
10992# (eg FreeBSD returns the mod time of the symlink's containing
10993# directory).
10994if (
b0322a85
CE
10995 am_has_slept=no
10996 for am_try in 1 2; do
10997 echo "timestamp, slept: $am_has_slept" > conftest.file
10998 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10999 if test "$[*]" = "X"; then
11000 # -L didn't work.
11001 set X `ls -t "$srcdir/configure" conftest.file`
11002 fi
11003 if test "$[*]" != "X $srcdir/configure conftest.file" \
11004 && test "$[*]" != "X conftest.file $srcdir/configure"; then
11005
11006 # If neither matched, then we have a broken ls. This can happen
11007 # if, for instance, CONFIG_SHELL is bash and it inherits a
11008 # broken ls alias from the environment. This has actually
11009 # happened. Such a system could not be considered "sane".
11010 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11011 alias in your environment])
11012 fi
11013 if test "$[2]" = conftest.file || test $am_try -eq 2; then
11014 break
11015 fi
11016 # Just in case.
11017 sleep 1
11018 am_has_slept=yes
11019 done
d9898ee8 11020 test "$[2]" = conftest.file
11021 )
11022then
11023 # Ok.
11024 :
11025else
11026 AC_MSG_ERROR([newly created file is older than distributed files!
11027Check your system clock])
11028fi
b0322a85
CE
11029AC_MSG_RESULT([yes])
11030# If we didn't sleep, we still need to ensure time stamps of config.status and
11031# generated files are strictly newer.
11032am_sleep_pid=
11033if grep 'slept: no' conftest.file >/dev/null 2>&1; then
11034 ( sleep 1 ) &
11035 am_sleep_pid=$!
11036fi
11037AC_CONFIG_COMMANDS_PRE(
11038 [AC_MSG_CHECKING([that generated files are newer than configure])
11039 if test -n "$am_sleep_pid"; then
11040 # Hide warnings about reused PIDs.
11041 wait $am_sleep_pid 2>/dev/null
11042 fi
11043 AC_MSG_RESULT([done])])
11044rm -f conftest.file
11045])
11046
0e333c05 11047# Copyright (C) 2009-2017 Free Software Foundation, Inc.
b0322a85
CE
11048#
11049# This file is free software; the Free Software Foundation
11050# gives unlimited permission to copy and/or distribute it,
11051# with or without modifications, as long as this notice is preserved.
11052
11053# AM_SILENT_RULES([DEFAULT])
11054# --------------------------
11055# Enable less verbose build rules; with the default set to DEFAULT
11056# ("yes" being less verbose, "no" or empty being verbose).
11057AC_DEFUN([AM_SILENT_RULES],
11058[AC_ARG_ENABLE([silent-rules], [dnl
11059AS_HELP_STRING(
11060 [--enable-silent-rules],
11061 [less verbose build output (undo: "make V=1")])
11062AS_HELP_STRING(
11063 [--disable-silent-rules],
11064 [verbose build output (undo: "make V=0")])dnl
11065])
11066case $enable_silent_rules in @%:@ (((
11067 yes) AM_DEFAULT_VERBOSITY=0;;
11068 no) AM_DEFAULT_VERBOSITY=1;;
11069 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11070esac
11071dnl
11072dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
11073dnl do not support nested variable expansions.
11074dnl See automake bug#9928 and bug#10237.
11075am_make=${MAKE-make}
11076AC_CACHE_CHECK([whether $am_make supports nested variables],
11077 [am_cv_make_support_nested_variables],
11078 [if AS_ECHO([['TRUE=$(BAR$(V))
11079BAR0=false
11080BAR1=true
11081V=1
11082am__doit:
11083 @$(TRUE)
11084.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
11085 am_cv_make_support_nested_variables=yes
11086else
11087 am_cv_make_support_nested_variables=no
11088fi])
11089if test $am_cv_make_support_nested_variables = yes; then
11090 dnl Using '$V' instead of '$(V)' breaks IRIX make.
11091 AM_V='$(V)'
11092 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
11093else
11094 AM_V=$AM_DEFAULT_VERBOSITY
11095 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
11096fi
11097AC_SUBST([AM_V])dnl
11098AM_SUBST_NOTMAKE([AM_V])dnl
11099AC_SUBST([AM_DEFAULT_V])dnl
11100AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
11101AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11102AM_BACKSLASH='\'
11103AC_SUBST([AM_BACKSLASH])dnl
11104_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11105])
d9898ee8 11106
0e333c05 11107# Copyright (C) 2001-2017 Free Software Foundation, Inc.
d9898ee8 11108#
11109# This file is free software; the Free Software Foundation
11110# gives unlimited permission to copy and/or distribute it,
11111# with or without modifications, as long as this notice is preserved.
11112
11113# AM_PROG_INSTALL_STRIP
11114# ---------------------
b0322a85 11115# One issue with vendor 'install' (even GNU) is that you can't
d9898ee8 11116# specify the program used to strip binaries. This is especially
11117# annoying in cross-compiling environments, where the build's strip
11118# is unlikely to handle the host's binaries.
11119# Fortunately install-sh will honor a STRIPPROG variable, so we
b0322a85 11120# always use install-sh in "make install-strip", and initialize
d9898ee8 11121# STRIPPROG with the value of the STRIP variable (set by the user).
11122AC_DEFUN([AM_PROG_INSTALL_STRIP],
11123[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
b0322a85
CE
11124# Installed binaries are usually stripped using 'strip' when the user
11125# run "make install-strip". However 'strip' might not be the right
d9898ee8 11126# tool to use in cross-compilation environments, therefore Automake
b0322a85
CE
11127# will honor the 'STRIP' environment variable to overrule this program.
11128dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
d9898ee8 11129if test "$cross_compiling" != no; then
11130 AC_CHECK_TOOL([STRIP], [strip], :)
11131fi
dd184caf 11132INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
d9898ee8 11133AC_SUBST([INSTALL_STRIP_PROGRAM])])
11134
0e333c05 11135# Copyright (C) 2006-2017 Free Software Foundation, Inc.
dd184caf 11136#
11137# This file is free software; the Free Software Foundation
11138# gives unlimited permission to copy and/or distribute it,
11139# with or without modifications, as long as this notice is preserved.
11140
11141# _AM_SUBST_NOTMAKE(VARIABLE)
11142# ---------------------------
ac40fd9e 11143# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
dd184caf 11144# This macro is traced by Automake.
11145AC_DEFUN([_AM_SUBST_NOTMAKE])
11146
8d138742 11147# AM_SUBST_NOTMAKE(VARIABLE)
b0322a85 11148# --------------------------
8d138742
CE
11149# Public sister of _AM_SUBST_NOTMAKE.
11150AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11151
d9898ee8 11152# Check how to create a tarball. -*- Autoconf -*-
11153
0e333c05 11154# Copyright (C) 2004-2017 Free Software Foundation, Inc.
d9898ee8 11155#
11156# This file is free software; the Free Software Foundation
11157# gives unlimited permission to copy and/or distribute it,
11158# with or without modifications, as long as this notice is preserved.
11159
d9898ee8 11160# _AM_PROG_TAR(FORMAT)
11161# --------------------
11162# Check how to create a tarball in format FORMAT.
b0322a85 11163# FORMAT should be one of 'v7', 'ustar', or 'pax'.
d9898ee8 11164#
11165# Substitute a variable $(am__tar) that is a command
11166# writing to stdout a FORMAT-tarball containing the directory
11167# $tardir.
11168# tardir=directory && $(am__tar) > result.tar
11169#
11170# Substitute a variable $(am__untar) that extract such
11171# a tarball read from stdin.
11172# $(am__untar) < result.tar
b0322a85 11173#
d9898ee8 11174AC_DEFUN([_AM_PROG_TAR],
b0322a85
CE
11175[# Always define AMTAR for backward compatibility. Yes, it's still used
11176# in the wild :-( We should find a proper way to deprecate it ...
11177AC_SUBST([AMTAR], ['$${TAR-tar}'])
11178
11179# We'll loop over all known methods to create a tar archive until one works.
d9898ee8 11180_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
d9898ee8 11181
b0322a85
CE
11182m4_if([$1], [v7],
11183 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11184
11185 [m4_case([$1],
11186 [ustar],
11187 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11188 # There is notably a 21 bits limit for the UID and the GID. In fact,
11189 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11190 # and bug#13588).
11191 am_max_uid=2097151 # 2^21 - 1
11192 am_max_gid=$am_max_uid
11193 # The $UID and $GID variables are not portable, so we need to resort
11194 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
11195 # below are definitely unexpected, so allow the users to see them
11196 # (that is, avoid stderr redirection).
11197 am_uid=`id -u || echo unknown`
11198 am_gid=`id -g || echo unknown`
11199 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11200 if test $am_uid -le $am_max_uid; then
11201 AC_MSG_RESULT([yes])
11202 else
11203 AC_MSG_RESULT([no])
11204 _am_tools=none
11205 fi
11206 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11207 if test $am_gid -le $am_max_gid; then
11208 AC_MSG_RESULT([yes])
11209 else
11210 AC_MSG_RESULT([no])
11211 _am_tools=none
11212 fi],
d9898ee8 11213
b0322a85
CE
11214 [pax],
11215 [],
11216
11217 [m4_fatal([Unknown tar format])])
11218
11219 AC_MSG_CHECKING([how to create a $1 tar archive])
11220
11221 # Go ahead even if we have the value already cached. We do so because we
11222 # need to set the values for the 'am__tar' and 'am__untar' variables.
11223 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11224
11225 for _am_tool in $_am_tools; do
11226 case $_am_tool in
11227 gnutar)
11228 for _am_tar in tar gnutar gtar; do
11229 AM_RUN_LOG([$_am_tar --version]) && break
11230 done
11231 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11232 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11233 am__untar="$_am_tar -xf -"
11234 ;;
11235 plaintar)
11236 # Must skip GNU tar: if it does not support --format= it doesn't create
11237 # ustar tarball either.
11238 (tar --version) >/dev/null 2>&1 && continue
11239 am__tar='tar chf - "$$tardir"'
11240 am__tar_='tar chf - "$tardir"'
11241 am__untar='tar xf -'
11242 ;;
11243 pax)
11244 am__tar='pax -L -x $1 -w "$$tardir"'
11245 am__tar_='pax -L -x $1 -w "$tardir"'
11246 am__untar='pax -r'
11247 ;;
11248 cpio)
11249 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11250 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11251 am__untar='cpio -i -H $1 -d'
11252 ;;
11253 none)
11254 am__tar=false
11255 am__tar_=false
11256 am__untar=false
11257 ;;
11258 esac
11259
11260 # If the value was cached, stop now. We just wanted to have am__tar
11261 # and am__untar set.
11262 test -n "${am_cv_prog_tar_$1}" && break
11263
11264 # tar/untar a dummy directory, and stop if the command works.
11265 rm -rf conftest.dir
11266 mkdir conftest.dir
11267 echo GrepMe > conftest.dir/file
11268 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11269 rm -rf conftest.dir
11270 if test -s conftest.tar; then
11271 AM_RUN_LOG([$am__untar <conftest.tar])
11272 AM_RUN_LOG([cat conftest.dir/file])
11273 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11274 fi
11275 done
d9898ee8 11276 rm -rf conftest.dir
d9898ee8 11277
b0322a85
CE
11278 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11279 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11280
d9898ee8 11281AC_SUBST([am__tar])
11282AC_SUBST([am__untar])
11283]) # _AM_PROG_TAR
11284