jessie rebuild
[hcoop/debian/courier-authlib.git] / aclocal.m4
CommitLineData
b0322a85
CE
1# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3# Copyright (C) 1996-2013 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
8d138742
CE
23# Portability macros for glibc argz. -*- Autoconf -*-
24#
25# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
26# Written by Gary V. Vaughan <gary@gnu.org>
27#
28# This file is free software; the Free Software Foundation gives
29# unlimited permission to copy and/or distribute it, with or without
30# modifications, as long as this notice is preserved.
31
32# serial 5 argz.m4
33
34AC_DEFUN([gl_FUNC_ARGZ],
35[gl_PREREQ_ARGZ
36
37AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
38
39AC_CHECK_TYPES([error_t],
40 [],
41 [AC_DEFINE([error_t], [int],
42 [Define to a type to use for `error_t' if it is not otherwise available.])
43 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
44 does not typedef error_t.])],
45 [#if defined(HAVE_ARGZ_H)
46# include <argz.h>
47#endif])
48
49ARGZ_H=
50AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
51 argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
52
53dnl if have system argz functions, allow forced use of
54dnl libltdl-supplied implementation (and default to do so
55dnl on "known bad" systems). Could use a runtime check, but
56dnl (a) detecting malloc issues is notoriously unreliable
57dnl (b) only known system that declares argz functions,
58dnl provides them, yet they are broken, is cygwin
59dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
60dnl So, it's more straightforward simply to special case
61dnl this for known bad systems.
62AS_IF([test -z "$ARGZ_H"],
63 [AC_CACHE_CHECK(
64 [if argz actually works],
65 [lt_cv_sys_argz_works],
66 [[case $host_os in #(
67 *cygwin*)
68 lt_cv_sys_argz_works=no
69 if test "$cross_compiling" != no; then
70 lt_cv_sys_argz_works="guessing no"
71 else
72 lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
73 save_IFS=$IFS
74 IFS=-.
75 set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
76 IFS=$save_IFS
77 lt_os_major=${2-0}
78 lt_os_minor=${3-0}
79 lt_os_micro=${4-0}
80 if test "$lt_os_major" -gt 1 \
81 || { test "$lt_os_major" -eq 1 \
82 && { test "$lt_os_minor" -gt 5 \
83 || { test "$lt_os_minor" -eq 5 \
84 && test "$lt_os_micro" -gt 24; }; }; }; then
85 lt_cv_sys_argz_works=yes
86 fi
87 fi
88 ;; #(
89 *) lt_cv_sys_argz_works=yes ;;
90 esac]])
b0322a85 91 AS_IF([test "$lt_cv_sys_argz_works" = yes],
8d138742
CE
92 [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
93 [This value is set to 1 to indicate that the system argz facility works])],
94 [ARGZ_H=argz.h
95 AC_LIBOBJ([argz])])])
96
97AC_SUBST([ARGZ_H])
98])
99
100# Prerequisites of lib/argz.c.
101AC_DEFUN([gl_PREREQ_ARGZ], [:])
102
d9898ee8 103# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
8d138742
CE
104#
105# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
b0322a85
CE
106# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
107# Foundation, Inc.
8d138742
CE
108# Written by Gordon Matzigkeit, 1996
109#
110# This file is free software; the Free Software Foundation gives
111# unlimited permission to copy and/or distribute it, with or without
112# modifications, as long as this notice is preserved.
113
114m4_define([_LT_COPYING], [dnl
115# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
b0322a85
CE
116# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
117# Foundation, Inc.
8d138742
CE
118# Written by Gordon Matzigkeit, 1996
119#
120# This file is part of GNU Libtool.
121#
122# GNU Libtool is free software; you can redistribute it and/or
123# modify it under the terms of the GNU General Public License as
124# published by the Free Software Foundation; either version 2 of
125# the License, or (at your option) any later version.
126#
127# As a special exception to the GNU General Public License,
128# if you distribute this file as part of a program or library that
129# is built using GNU Libtool, you may include this file under the
130# same distribution terms that you use for the rest of that program.
131#
132# GNU Libtool is distributed in the hope that it will be useful,
133# but WITHOUT ANY WARRANTY; without even the implied warranty of
134# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
135# GNU General Public License for more details.
136#
137# You should have received a copy of the GNU General Public License
138# along with GNU Libtool; see the file COPYING. If not, a copy
139# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
140# obtained by writing to the Free Software Foundation, Inc.,
141# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
142])
d9898ee8 143
b0322a85 144# serial 57 LT_INIT
d9898ee8 145
146
8d138742
CE
147# LT_PREREQ(VERSION)
148# ------------------
149# Complain and exit if this libtool version is less that VERSION.
150m4_defun([LT_PREREQ],
151[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
152 [m4_default([$3],
153 [m4_fatal([Libtool version $1 or higher is required],
154 63)])],
155 [$2])])
d9898ee8 156
157
8d138742
CE
158# _LT_CHECK_BUILDDIR
159# ------------------
160# Complain if the absolute build directory name contains unusual characters
161m4_defun([_LT_CHECK_BUILDDIR],
162[case `pwd` in
163 *\ * | *\ *)
164 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
165esac
166])
167
168
169# LT_INIT([OPTIONS])
170# ------------------
171AC_DEFUN([LT_INIT],
172[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
b0322a85 173AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
8d138742
CE
174AC_BEFORE([$0], [LT_LANG])dnl
175AC_BEFORE([$0], [LT_OUTPUT])dnl
176AC_BEFORE([$0], [LTDL_INIT])dnl
177m4_require([_LT_CHECK_BUILDDIR])dnl
178
179dnl Autoconf doesn't catch unexpanded LT_ macros by default:
180m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
181m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
182dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
183dnl unless we require an AC_DEFUNed macro:
184AC_REQUIRE([LTOPTIONS_VERSION])dnl
185AC_REQUIRE([LTSUGAR_VERSION])dnl
186AC_REQUIRE([LTVERSION_VERSION])dnl
187AC_REQUIRE([LTOBSOLETE_VERSION])dnl
188m4_require([_LT_PROG_LTMAIN])dnl
189
b0322a85
CE
190_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
191
8d138742
CE
192dnl Parse OPTIONS
193_LT_SET_OPTIONS([$0], [$1])
d9898ee8 194
195# This can be used to rebuild libtool when needed
8d138742 196LIBTOOL_DEPS="$ltmain"
d9898ee8 197
198# Always use our own libtool.
199LIBTOOL='$(SHELL) $(top_builddir)/libtool'
200AC_SUBST(LIBTOOL)dnl
201
8d138742 202_LT_SETUP
d9898ee8 203
8d138742
CE
204# Only expand once:
205m4_define([LT_INIT])
206])# LT_INIT
d9898ee8 207
8d138742
CE
208# Old names:
209AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
210AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
211dnl aclocal-1.4 backwards compatibility:
212dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
213dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
214
215
216# _LT_CC_BASENAME(CC)
217# -------------------
218# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
219m4_defun([_LT_CC_BASENAME],
220[for cc_temp in $1""; do
221 case $cc_temp in
222 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
223 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
224 \-*) ;;
225 *) break;;
226 esac
227done
b0322a85 228cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8d138742
CE
229])
230
231
232# _LT_FILEUTILS_DEFAULTS
233# ----------------------
234# It is okay to use these file commands and assume they have been set
235# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
236m4_defun([_LT_FILEUTILS_DEFAULTS],
237[: ${CP="cp -f"}
238: ${MV="mv -f"}
239: ${RM="rm -f"}
240])# _LT_FILEUTILS_DEFAULTS
241
242
243# _LT_SETUP
244# ---------
245m4_defun([_LT_SETUP],
246[AC_REQUIRE([AC_CANONICAL_HOST])dnl
d9898ee8 247AC_REQUIRE([AC_CANONICAL_BUILD])dnl
b0322a85
CE
248AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
249AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
250
251_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
252dnl
8d138742
CE
253_LT_DECL([], [host_alias], [0], [The host system])dnl
254_LT_DECL([], [host], [0])dnl
255_LT_DECL([], [host_os], [0])dnl
256dnl
257_LT_DECL([], [build_alias], [0], [The build system])dnl
258_LT_DECL([], [build], [0])dnl
259_LT_DECL([], [build_os], [0])dnl
260dnl
d9898ee8 261AC_REQUIRE([AC_PROG_CC])dnl
8d138742
CE
262AC_REQUIRE([LT_PATH_LD])dnl
263AC_REQUIRE([LT_PATH_NM])dnl
264dnl
d9898ee8 265AC_REQUIRE([AC_PROG_LN_S])dnl
8d138742
CE
266test -z "$LN_S" && LN_S="ln -s"
267_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
268dnl
269AC_REQUIRE([LT_CMD_MAX_LEN])dnl
270_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
271_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
d9898ee8 272dnl
8d138742
CE
273m4_require([_LT_FILEUTILS_DEFAULTS])dnl
274m4_require([_LT_CHECK_SHELL_FEATURES])dnl
b0322a85 275m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
8d138742
CE
276m4_require([_LT_CMD_RELOAD])dnl
277m4_require([_LT_CHECK_MAGIC_METHOD])dnl
b0322a85 278m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
8d138742
CE
279m4_require([_LT_CMD_OLD_ARCHIVE])dnl
280m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
b0322a85 281m4_require([_LT_WITH_SYSROOT])dnl
8d138742
CE
282
283_LT_CONFIG_LIBTOOL_INIT([
284# See if we are running on zsh, and set the options which allow our
285# commands through without removal of \ escapes INIT.
286if test -n "\${ZSH_VERSION+set}" ; then
287 setopt NO_GLOB_SUBST
288fi
289])
290if test -n "${ZSH_VERSION+set}" ; then
291 setopt NO_GLOB_SUBST
292fi
d9898ee8 293
8d138742 294_LT_CHECK_OBJDIR
d9898ee8 295
8d138742 296m4_require([_LT_TAG_COMPILER])dnl
d9898ee8 297
298case $host_os in
299aix3*)
300 # AIX sometimes has problems with the GCC collect2 program. For some
301 # reason, if we set the COLLECT_NAMES environment variable, the problems
302 # vanish in a puff of smoke.
303 if test "X${COLLECT_NAMES+set}" != Xset; then
304 COLLECT_NAMES=
305 export COLLECT_NAMES
306 fi
307 ;;
308esac
309
d9898ee8 310# Global variables:
8d138742 311ofile=libtool
d9898ee8 312can_build_shared=yes
313
314# All known linkers require a `.a' archive for static linking (except MSVC,
315# which needs '.lib').
316libext=a
d9898ee8 317
8d138742 318with_gnu_ld="$lt_cv_prog_gnu_ld"
d9898ee8 319
320old_CC="$CC"
321old_CFLAGS="$CFLAGS"
322
323# Set sane defaults for various variables
d9898ee8 324test -z "$CC" && CC=cc
325test -z "$LTCC" && LTCC=$CC
326test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
d9898ee8 327test -z "$LD" && LD=ld
d9898ee8 328test -z "$ac_objext" && ac_objext=o
329
d9898ee8 330_LT_CC_BASENAME([$compiler])
331
332# Only perform the check for file, if the check method requires it
8d138742 333test -z "$MAGIC_CMD" && MAGIC_CMD=file
d9898ee8 334case $deplibs_check_method in
335file_magic*)
336 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8d138742 337 _LT_PATH_MAGIC
d9898ee8 338 fi
339 ;;
340esac
341
8d138742
CE
342# Use C for the default configuration in the libtool script
343LT_SUPPORTED_TAG([CC])
344_LT_LANG_C_CONFIG
345_LT_LANG_DEFAULT_CONFIG
346_LT_CONFIG_COMMANDS
347])# _LT_SETUP
d9898ee8 348
d9898ee8 349
b0322a85
CE
350# _LT_PREPARE_SED_QUOTE_VARS
351# --------------------------
352# Define a few sed substitution that help us do robust quoting.
353m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
354[# Backslashify metacharacters that are still active within
355# double-quoted strings.
356sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
357
358# Same as above, but do not quote variable references.
359double_quote_subst='s/\([["`\\]]\)/\\\1/g'
360
361# Sed substitution to delay expansion of an escaped shell variable in a
362# double_quote_subst'ed string.
363delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
364
365# Sed substitution to delay expansion of an escaped single quote.
366delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
367
368# Sed substitution to avoid accidental globbing in evaled expressions
369no_glob_subst='s/\*/\\\*/g'
370])
371
8d138742
CE
372# _LT_PROG_LTMAIN
373# ---------------
374# Note that this code is called both from `configure', and `config.status'
375# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
376# `config.status' has no value for ac_aux_dir unless we are using Automake,
377# so we pass a copy along to make sure it has a sensible value anyway.
378m4_defun([_LT_PROG_LTMAIN],
379[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
380_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
381ltmain="$ac_aux_dir/ltmain.sh"
382])# _LT_PROG_LTMAIN
d9898ee8 383
d9898ee8 384
385
8d138742
CE
386# So that we can recreate a full libtool script including additional
387# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
388# in macros and then make a single call at the end using the `libtool'
389# label.
d9898ee8 390
d9898ee8 391
8d138742
CE
392# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
393# ----------------------------------------
394# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
395m4_define([_LT_CONFIG_LIBTOOL_INIT],
396[m4_ifval([$1],
397 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
398 [$1
399])])])
d9898ee8 400
8d138742
CE
401# Initialize.
402m4_define([_LT_OUTPUT_LIBTOOL_INIT])
d9898ee8 403
404
8d138742
CE
405# _LT_CONFIG_LIBTOOL([COMMANDS])
406# ------------------------------
407# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
408m4_define([_LT_CONFIG_LIBTOOL],
409[m4_ifval([$1],
410 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
411 [$1
412])])])
413
414# Initialize.
415m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
416
417
418# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
419# -----------------------------------------------------
420m4_defun([_LT_CONFIG_SAVE_COMMANDS],
421[_LT_CONFIG_LIBTOOL([$1])
422_LT_CONFIG_LIBTOOL_INIT([$2])
d9898ee8 423])
424
425
8d138742
CE
426# _LT_FORMAT_COMMENT([COMMENT])
427# -----------------------------
428# Add leading comment marks to the start of each line, and a trailing
429# full-stop to the whole comment if one is not present already.
430m4_define([_LT_FORMAT_COMMENT],
431[m4_ifval([$1], [
432m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
433 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
434)])
435
436
437
438
439
440# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
441# -------------------------------------------------------------------
442# CONFIGNAME is the name given to the value in the libtool script.
443# VARNAME is the (base) name used in the configure script.
444# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
445# VARNAME. Any other value will be used directly.
446m4_define([_LT_DECL],
447[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
448 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
449 [m4_ifval([$1], [$1], [$2])])
450 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
451 m4_ifval([$4],
452 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
453 lt_dict_add_subkey([lt_decl_dict], [$2],
454 [tagged?], [m4_ifval([$5], [yes], [no])])])
455])
d9898ee8 456
457
8d138742
CE
458# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
459# --------------------------------------------------------
460m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
d9898ee8 461
462
8d138742
CE
463# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
464# ------------------------------------------------
465m4_define([lt_decl_tag_varnames],
466[_lt_decl_filter([tagged?], [yes], $@)])
d9898ee8 467
468
8d138742
CE
469# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
470# ---------------------------------------------------------
471m4_define([_lt_decl_filter],
472[m4_case([$#],
473 [0], [m4_fatal([$0: too few arguments: $#])],
474 [1], [m4_fatal([$0: too few arguments: $#: $1])],
475 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
476 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
477 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
478])
d9898ee8 479
480
8d138742
CE
481# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
482# --------------------------------------------------
483m4_define([lt_decl_quote_varnames],
484[_lt_decl_filter([value], [1], $@)])
d9898ee8 485
d9898ee8 486
8d138742
CE
487# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
488# ---------------------------------------------------
489m4_define([lt_decl_dquote_varnames],
490[_lt_decl_filter([value], [2], $@)])
d9898ee8 491
d9898ee8 492
8d138742
CE
493# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
494# ---------------------------------------------------
495m4_define([lt_decl_varnames_tagged],
496[m4_assert([$# <= 2])dnl
497_$0(m4_quote(m4_default([$1], [[, ]])),
498 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
499 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
500m4_define([_lt_decl_varnames_tagged],
501[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
d9898ee8 502
d9898ee8 503
8d138742
CE
504# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
505# ------------------------------------------------
506m4_define([lt_decl_all_varnames],
507[_$0(m4_quote(m4_default([$1], [[, ]])),
508 m4_if([$2], [],
509 m4_quote(lt_decl_varnames),
510 m4_quote(m4_shift($@))))[]dnl
511])
512m4_define([_lt_decl_all_varnames],
513[lt_join($@, lt_decl_varnames_tagged([$1],
514 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
515])
d9898ee8 516
d9898ee8 517
8d138742
CE
518# _LT_CONFIG_STATUS_DECLARE([VARNAME])
519# ------------------------------------
520# Quote a variable value, and forward it to `config.status' so that its
521# declaration there will have the same value as in `configure'. VARNAME
522# must have a single quote delimited value for this to work.
523m4_define([_LT_CONFIG_STATUS_DECLARE],
b0322a85 524[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
d9898ee8 525
d9898ee8 526
8d138742
CE
527# _LT_CONFIG_STATUS_DECLARATIONS
528# ------------------------------
529# We delimit libtool config variables with single quotes, so when
530# we write them to config.status, we have to be sure to quote all
531# embedded single quotes properly. In configure, this macro expands
532# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
533#
b0322a85 534# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
8d138742
CE
535m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
536[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
537 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
d9898ee8 538
d9898ee8 539
8d138742
CE
540# _LT_LIBTOOL_TAGS
541# ----------------
542# Output comment and list of tags supported by the script
543m4_defun([_LT_LIBTOOL_TAGS],
544[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
545available_tags="_LT_TAGS"dnl
546])
d9898ee8 547
548
8d138742
CE
549# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
550# -----------------------------------
551# Extract the dictionary values for VARNAME (optionally with TAG) and
552# expand to a commented shell variable setting:
553#
554# # Some comment about what VAR is for.
555# visible_name=$lt_internal_name
556m4_define([_LT_LIBTOOL_DECLARE],
557[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
558 [description])))[]dnl
559m4_pushdef([_libtool_name],
560 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
561m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
562 [0], [_libtool_name=[$]$1],
563 [1], [_libtool_name=$lt_[]$1],
564 [2], [_libtool_name=$lt_[]$1],
565 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
566m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
567])
d9898ee8 568
d9898ee8 569
8d138742
CE
570# _LT_LIBTOOL_CONFIG_VARS
571# -----------------------
572# Produce commented declarations of non-tagged libtool config variables
573# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
574# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
575# section) are produced by _LT_LIBTOOL_TAG_VARS.
576m4_defun([_LT_LIBTOOL_CONFIG_VARS],
577[m4_foreach([_lt_var],
578 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
579 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
580
581
582# _LT_LIBTOOL_TAG_VARS(TAG)
583# -------------------------
584m4_define([_LT_LIBTOOL_TAG_VARS],
585[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
586 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
587
588
589# _LT_TAGVAR(VARNAME, [TAGNAME])
590# ------------------------------
591m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
592
593
594# _LT_CONFIG_COMMANDS
595# -------------------
596# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
597# variables for single and double quote escaping we saved from calls
598# to _LT_DECL, we can put quote escaped variables declarations
599# into `config.status', and then the shell code to quote escape them in
600# for loops in `config.status'. Finally, any additional code accumulated
601# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
602m4_defun([_LT_CONFIG_COMMANDS],
603[AC_PROVIDE_IFELSE([LT_OUTPUT],
604 dnl If the libtool generation code has been placed in $CONFIG_LT,
605 dnl instead of duplicating it all over again into config.status,
606 dnl then we will have config.status run $CONFIG_LT later, so it
607 dnl needs to know what name is stored there:
608 [AC_CONFIG_COMMANDS([libtool],
609 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
610 dnl If the libtool generation code is destined for config.status,
611 dnl expand the accumulated commands and init code now:
612 [AC_CONFIG_COMMANDS([libtool],
613 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
614])#_LT_CONFIG_COMMANDS
615
616
617# Initialize.
618m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
619[
620
621# The HP-UX ksh and POSIX shell print the target directory to stdout
622# if CDPATH is set.
623(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
624
625sed_quote_subst='$sed_quote_subst'
626double_quote_subst='$double_quote_subst'
627delay_variable_subst='$delay_variable_subst'
628_LT_CONFIG_STATUS_DECLARATIONS
629LTCC='$LTCC'
630LTCFLAGS='$LTCFLAGS'
631compiler='$compiler_DEFAULT'
632
b0322a85
CE
633# A function that is used when there is no print builtin or printf.
634func_fallback_echo ()
635{
636 eval 'cat <<_LTECHO_EOF
637\$[]1
638_LTECHO_EOF'
639}
640
8d138742
CE
641# Quote evaled strings.
642for var in lt_decl_all_varnames([[ \
643]], lt_decl_quote_varnames); do
b0322a85 644 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
8d138742 645 *[[\\\\\\\`\\"\\\$]]*)
b0322a85 646 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
d9898ee8 647 ;;
8d138742
CE
648 *)
649 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
d9898ee8 650 ;;
651 esac
8d138742 652done
d9898ee8 653
8d138742
CE
654# Double-quote double-evaled strings.
655for var in lt_decl_all_varnames([[ \
656]], lt_decl_dquote_varnames); do
b0322a85 657 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
8d138742 658 *[[\\\\\\\`\\"\\\$]]*)
b0322a85 659 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
8d138742
CE
660 ;;
661 *)
662 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
d9898ee8 663 ;;
664 esac
8d138742 665done
d9898ee8 666
8d138742 667_LT_OUTPUT_LIBTOOL_INIT
d9898ee8 668])
669
b0322a85
CE
670# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
671# ------------------------------------
672# Generate a child script FILE with all initialization necessary to
673# reuse the environment learned by the parent script, and make the
674# file executable. If COMMENT is supplied, it is inserted after the
675# `#!' sequence but before initialization text begins. After this
676# macro, additional text can be appended to FILE to form the body of
677# the child script. The macro ends with non-zero status if the
678# file could not be fully written (such as if the disk is full).
679m4_ifdef([AS_INIT_GENERATED],
680[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
681[m4_defun([_LT_GENERATED_FILE_INIT],
682[m4_require([AS_PREPARE])]dnl
683[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
684[lt_write_fail=0
685cat >$1 <<_ASEOF || lt_write_fail=1
686#! $SHELL
687# Generated by $as_me.
688$2
689SHELL=\${CONFIG_SHELL-$SHELL}
690export SHELL
691_ASEOF
692cat >>$1 <<\_ASEOF || lt_write_fail=1
693AS_SHELL_SANITIZE
694_AS_PREPARE
695exec AS_MESSAGE_FD>&1
696_ASEOF
697test $lt_write_fail = 0 && chmod +x $1[]dnl
698m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
d9898ee8 699
8d138742
CE
700# LT_OUTPUT
701# ---------
702# This macro allows early generation of the libtool script (before
703# AC_OUTPUT is called), incase it is used in configure for compilation
704# tests.
705AC_DEFUN([LT_OUTPUT],
706[: ${CONFIG_LT=./config.lt}
707AC_MSG_NOTICE([creating $CONFIG_LT])
b0322a85
CE
708_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
709[# Run this file to recreate a libtool stub with the current configuration.])
8d138742
CE
710
711cat >>"$CONFIG_LT" <<\_LTEOF
b0322a85 712lt_cl_silent=false
8d138742
CE
713exec AS_MESSAGE_LOG_FD>>config.log
714{
715 echo
716 AS_BOX([Running $as_me.])
717} >&AS_MESSAGE_LOG_FD
d9898ee8 718
8d138742
CE
719lt_cl_help="\
720\`$as_me' creates a local libtool stub from the current configuration,
721for use in further configure time tests before the real libtool is
722generated.
d9898ee8 723
8d138742 724Usage: $[0] [[OPTIONS]]
d9898ee8 725
8d138742
CE
726 -h, --help print this help, then exit
727 -V, --version print version number, then exit
728 -q, --quiet do not print progress messages
729 -d, --debug don't remove temporary files
d9898ee8 730
8d138742 731Report bugs to <bug-libtool@gnu.org>."
d9898ee8 732
8d138742
CE
733lt_cl_version="\
734m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
735m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
736configured by $[0], generated by m4_PACKAGE_STRING.
d9898ee8 737
b0322a85 738Copyright (C) 2011 Free Software Foundation, Inc.
8d138742
CE
739This config.lt script is free software; the Free Software Foundation
740gives unlimited permision to copy, distribute and modify it."
d9898ee8 741
8d138742
CE
742while test $[#] != 0
743do
744 case $[1] in
745 --version | --v* | -V )
746 echo "$lt_cl_version"; exit 0 ;;
747 --help | --h* | -h )
748 echo "$lt_cl_help"; exit 0 ;;
749 --debug | --d* | -d )
750 debug=: ;;
751 --quiet | --q* | --silent | --s* | -q )
752 lt_cl_silent=: ;;
753
754 -*) AC_MSG_ERROR([unrecognized option: $[1]
755Try \`$[0] --help' for more information.]) ;;
756
757 *) AC_MSG_ERROR([unrecognized argument: $[1]
758Try \`$[0] --help' for more information.]) ;;
759 esac
760 shift
761done
d9898ee8 762
8d138742
CE
763if $lt_cl_silent; then
764 exec AS_MESSAGE_FD>/dev/null
765fi
766_LTEOF
767
768cat >>"$CONFIG_LT" <<_LTEOF
769_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
770_LTEOF
771
772cat >>"$CONFIG_LT" <<\_LTEOF
773AC_MSG_NOTICE([creating $ofile])
774_LT_OUTPUT_LIBTOOL_COMMANDS
775AS_EXIT(0)
776_LTEOF
777chmod +x "$CONFIG_LT"
778
779# configure is writing to config.log, but config.lt does its own redirection,
780# appending to config.log, which fails on DOS, as config.log is still kept
781# open by configure. Here we exec the FD to /dev/null, effectively closing
782# config.log, so it can be properly (re)opened and appended to by config.lt.
b0322a85
CE
783lt_cl_success=:
784test "$silent" = yes &&
785 lt_config_lt_args="$lt_config_lt_args --quiet"
786exec AS_MESSAGE_LOG_FD>/dev/null
787$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
788exec AS_MESSAGE_LOG_FD>>config.log
789$lt_cl_success || AS_EXIT(1)
8d138742 790])# LT_OUTPUT
d9898ee8 791
8d138742
CE
792
793# _LT_CONFIG(TAG)
794# ---------------
795# If TAG is the built-in tag, create an initial libtool script with a
796# default configuration from the untagged config vars. Otherwise add code
797# to config.status for appending the configuration named by TAG from the
798# matching tagged config vars.
799m4_defun([_LT_CONFIG],
800[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
801_LT_CONFIG_SAVE_COMMANDS([
802 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
803 m4_if(_LT_TAG, [C], [
804 # See if we are running on zsh, and set the options which allow our
805 # commands through without removal of \ escapes.
806 if test -n "${ZSH_VERSION+set}" ; then
807 setopt NO_GLOB_SUBST
d9898ee8 808 fi
d9898ee8 809
8d138742
CE
810 cfgfile="${ofile}T"
811 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
812 $RM "$cfgfile"
d9898ee8 813
8d138742
CE
814 cat <<_LT_EOF >> "$cfgfile"
815#! $SHELL
d9898ee8 816
8d138742
CE
817# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
818# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
819# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
820# NOTE: Changes made to this file will be lost: look at ltmain.sh.
821#
822_LT_COPYING
823_LT_LIBTOOL_TAGS
d9898ee8 824
8d138742
CE
825# ### BEGIN LIBTOOL CONFIG
826_LT_LIBTOOL_CONFIG_VARS
827_LT_LIBTOOL_TAG_VARS
828# ### END LIBTOOL CONFIG
d9898ee8 829
8d138742 830_LT_EOF
d9898ee8 831
8d138742
CE
832 case $host_os in
833 aix3*)
834 cat <<\_LT_EOF >> "$cfgfile"
835# AIX sometimes has problems with the GCC collect2 program. For some
836# reason, if we set the COLLECT_NAMES environment variable, the problems
837# vanish in a puff of smoke.
838if test "X${COLLECT_NAMES+set}" != Xset; then
839 COLLECT_NAMES=
840 export COLLECT_NAMES
841fi
842_LT_EOF
843 ;;
844 esac
d9898ee8 845
8d138742 846 _LT_PROG_LTMAIN
d9898ee8 847
8d138742
CE
848 # We use sed instead of cat because bash on DJGPP gets confused if
849 # if finds mixed CR/LF and LF-only lines. Since sed operates in
850 # text mode, it properly converts lines to CR/LF. This bash problem
851 # is reportedly fixed, but why not run on old versions too?
b0322a85
CE
852 sed '$q' "$ltmain" >> "$cfgfile" \
853 || (rm -f "$cfgfile"; exit 1)
d9898ee8 854
b0322a85 855 _LT_PROG_REPLACE_SHELLFNS
d9898ee8 856
b0322a85 857 mv -f "$cfgfile" "$ofile" ||
8d138742
CE
858 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
859 chmod +x "$ofile"
860],
861[cat <<_LT_EOF >> "$ofile"
d9898ee8 862
8d138742
CE
863dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
864dnl in a comment (ie after a #).
865# ### BEGIN LIBTOOL TAG CONFIG: $1
866_LT_LIBTOOL_TAG_VARS(_LT_TAG)
867# ### END LIBTOOL TAG CONFIG: $1
868_LT_EOF
869])dnl /m4_if
870],
871[m4_if([$1], [], [
872 PACKAGE='$PACKAGE'
873 VERSION='$VERSION'
874 TIMESTAMP='$TIMESTAMP'
875 RM='$RM'
876 ofile='$ofile'], [])
877])dnl /_LT_CONFIG_SAVE_COMMANDS
878])# _LT_CONFIG
d9898ee8 879
d9898ee8 880
8d138742
CE
881# LT_SUPPORTED_TAG(TAG)
882# ---------------------
883# Trace this macro to discover what tags are supported by the libtool
884# --tag option, using:
885# autoconf --trace 'LT_SUPPORTED_TAG:$1'
886AC_DEFUN([LT_SUPPORTED_TAG], [])
d9898ee8 887
888
8d138742
CE
889# C support is built-in for now
890m4_define([_LT_LANG_C_enabled], [])
891m4_define([_LT_TAGS], [])
d9898ee8 892
d9898ee8 893
8d138742
CE
894# LT_LANG(LANG)
895# -------------
896# Enable libtool support for the given language if not already enabled.
897AC_DEFUN([LT_LANG],
898[AC_BEFORE([$0], [LT_OUTPUT])dnl
899m4_case([$1],
900 [C], [_LT_LANG(C)],
901 [C++], [_LT_LANG(CXX)],
b0322a85 902 [Go], [_LT_LANG(GO)],
8d138742
CE
903 [Java], [_LT_LANG(GCJ)],
904 [Fortran 77], [_LT_LANG(F77)],
905 [Fortran], [_LT_LANG(FC)],
906 [Windows Resource], [_LT_LANG(RC)],
907 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
908 [_LT_LANG($1)],
909 [m4_fatal([$0: unsupported language: "$1"])])])dnl
910])# LT_LANG
911
912
913# _LT_LANG(LANGNAME)
914# ------------------
915m4_defun([_LT_LANG],
916[m4_ifdef([_LT_LANG_]$1[_enabled], [],
917 [LT_SUPPORTED_TAG([$1])dnl
918 m4_append([_LT_TAGS], [$1 ])dnl
919 m4_define([_LT_LANG_]$1[_enabled], [])dnl
920 _LT_LANG_$1_CONFIG($1)])dnl
921])# _LT_LANG
d9898ee8 922
d9898ee8 923
b0322a85
CE
924m4_ifndef([AC_PROG_GO], [
925# NOTE: This macro has been submitted for inclusion into #
926# GNU Autoconf as AC_PROG_GO. When it is available in #
927# a released version of Autoconf we should remove this #
928# macro and use it instead. #
929m4_defun([AC_PROG_GO],
930[AC_LANG_PUSH(Go)dnl
931AC_ARG_VAR([GOC], [Go compiler command])dnl
932AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
933_AC_ARG_VAR_LDFLAGS()dnl
934AC_CHECK_TOOL(GOC, gccgo)
935if test -z "$GOC"; then
936 if test -n "$ac_tool_prefix"; then
937 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
938 fi
939fi
940if test -z "$GOC"; then
941 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
942fi
943])#m4_defun
944])#m4_ifndef
945
946
8d138742
CE
947# _LT_LANG_DEFAULT_CONFIG
948# -----------------------
949m4_defun([_LT_LANG_DEFAULT_CONFIG],
950[AC_PROVIDE_IFELSE([AC_PROG_CXX],
951 [LT_LANG(CXX)],
952 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
953
954AC_PROVIDE_IFELSE([AC_PROG_F77],
955 [LT_LANG(F77)],
956 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
957
958AC_PROVIDE_IFELSE([AC_PROG_FC],
959 [LT_LANG(FC)],
960 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
961
962dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
963dnl pulling things in needlessly.
964AC_PROVIDE_IFELSE([AC_PROG_GCJ],
965 [LT_LANG(GCJ)],
966 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
967 [LT_LANG(GCJ)],
968 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
969 [LT_LANG(GCJ)],
970 [m4_ifdef([AC_PROG_GCJ],
971 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
972 m4_ifdef([A][M_PROG_GCJ],
973 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
974 m4_ifdef([LT_PROG_GCJ],
975 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
976
b0322a85
CE
977AC_PROVIDE_IFELSE([AC_PROG_GO],
978 [LT_LANG(GO)],
979 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
980
8d138742
CE
981AC_PROVIDE_IFELSE([LT_PROG_RC],
982 [LT_LANG(RC)],
983 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
984])# _LT_LANG_DEFAULT_CONFIG
985
986# Obsolete macros:
987AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
988AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
989AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
990AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
b0322a85 991AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
8d138742
CE
992dnl aclocal-1.4 backwards compatibility:
993dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
994dnl AC_DEFUN([AC_LIBTOOL_F77], [])
995dnl AC_DEFUN([AC_LIBTOOL_FC], [])
996dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
b0322a85 997dnl AC_DEFUN([AC_LIBTOOL_RC], [])
8d138742
CE
998
999
1000# _LT_TAG_COMPILER
1001# ----------------
1002m4_defun([_LT_TAG_COMPILER],
1003[AC_REQUIRE([AC_PROG_CC])dnl
d9898ee8 1004
8d138742
CE
1005_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1006_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1007_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1008_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
d9898ee8 1009
8d138742
CE
1010# If no C compiler was specified, use CC.
1011LTCC=${LTCC-"$CC"}
d9898ee8 1012
8d138742
CE
1013# If no C compiler flags were specified, use CFLAGS.
1014LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
d9898ee8 1015
8d138742
CE
1016# Allow CC to be a program name with arguments.
1017compiler=$CC
1018])# _LT_TAG_COMPILER
d9898ee8 1019
d9898ee8 1020
8d138742
CE
1021# _LT_COMPILER_BOILERPLATE
1022# ------------------------
1023# Check for compiler boilerplate output or warnings with
1024# the simple compiler test code.
1025m4_defun([_LT_COMPILER_BOILERPLATE],
1026[m4_require([_LT_DECL_SED])dnl
1027ac_outfile=conftest.$ac_objext
1028echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1029eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1030_lt_compiler_boilerplate=`cat conftest.err`
1031$RM conftest*
1032])# _LT_COMPILER_BOILERPLATE
d9898ee8 1033
d9898ee8 1034
8d138742
CE
1035# _LT_LINKER_BOILERPLATE
1036# ----------------------
1037# Check for linker boilerplate output or warnings with
1038# the simple link test code.
1039m4_defun([_LT_LINKER_BOILERPLATE],
1040[m4_require([_LT_DECL_SED])dnl
1041ac_outfile=conftest.$ac_objext
1042echo "$lt_simple_link_test_code" >conftest.$ac_ext
1043eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1044_lt_linker_boilerplate=`cat conftest.err`
1045$RM -r conftest*
1046])# _LT_LINKER_BOILERPLATE
1047
1048# _LT_REQUIRED_DARWIN_CHECKS
1049# -------------------------
1050m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1051 case $host_os in
1052 rhapsody* | darwin*)
1053 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1054 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1055 AC_CHECK_TOOL([LIPO], [lipo], [:])
1056 AC_CHECK_TOOL([OTOOL], [otool], [:])
1057 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1058 _LT_DECL([], [DSYMUTIL], [1],
1059 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1060 _LT_DECL([], [NMEDIT], [1],
1061 [Tool to change global to local symbols on Mac OS X])
1062 _LT_DECL([], [LIPO], [1],
1063 [Tool to manipulate fat objects and archives on Mac OS X])
1064 _LT_DECL([], [OTOOL], [1],
1065 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1066 _LT_DECL([], [OTOOL64], [1],
1067 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1068
1069 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1070 [lt_cv_apple_cc_single_mod=no
1071 if test -z "${LT_MULTI_MODULE}"; then
1072 # By default we will add the -single_module flag. You can override
1073 # by either setting the environment variable LT_MULTI_MODULE
1074 # non-empty at configure time, or by adding -multi_module to the
1075 # link flags.
1076 rm -rf libconftest.dylib*
1077 echo "int foo(void){return 1;}" > conftest.c
1078 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1079-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1080 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1081 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1082 _lt_result=$?
b0322a85
CE
1083 # If there is a non-empty error log, and "single_module"
1084 # appears in it, assume the flag caused a linker warning
1085 if test -s conftest.err && $GREP single_module conftest.err; then
1086 cat conftest.err >&AS_MESSAGE_LOG_FD
1087 # Otherwise, if the output was created with a 0 exit code from
1088 # the compiler, it worked.
1089 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
8d138742
CE
1090 lt_cv_apple_cc_single_mod=yes
1091 else
1092 cat conftest.err >&AS_MESSAGE_LOG_FD
1093 fi
1094 rm -rf libconftest.dylib*
1095 rm -f conftest.*
1096 fi])
b0322a85 1097
8d138742
CE
1098 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1099 [lt_cv_ld_exported_symbols_list],
1100 [lt_cv_ld_exported_symbols_list=no
1101 save_LDFLAGS=$LDFLAGS
1102 echo "_main" > conftest.sym
1103 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1104 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1105 [lt_cv_ld_exported_symbols_list=yes],
1106 [lt_cv_ld_exported_symbols_list=no])
1107 LDFLAGS="$save_LDFLAGS"
1108 ])
b0322a85
CE
1109
1110 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1111 [lt_cv_ld_force_load=no
1112 cat > conftest.c << _LT_EOF
1113int forced_loaded() { return 2;}
1114_LT_EOF
1115 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1116 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1117 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1118 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1119 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1120 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1121 cat > conftest.c << _LT_EOF
1122int main() { return 0;}
1123_LT_EOF
1124 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1125 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1126 _lt_result=$?
1127 if test -s conftest.err && $GREP force_load conftest.err; then
1128 cat conftest.err >&AS_MESSAGE_LOG_FD
1129 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1130 lt_cv_ld_force_load=yes
1131 else
1132 cat conftest.err >&AS_MESSAGE_LOG_FD
1133 fi
1134 rm -f conftest.err libconftest.a conftest conftest.c
1135 rm -rf conftest.dSYM
1136 ])
8d138742
CE
1137 case $host_os in
1138 rhapsody* | darwin1.[[012]])
1139 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1140 darwin1.*)
1141 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1142 darwin*) # darwin 5.x on
1143 # if running on 10.5 or later, the deployment target defaults
1144 # to the OS version, if on x86, and 10.4, the deployment
1145 # target defaults to 10.4. Don't you love it?
1146 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1147 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1148 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1149 10.[[012]]*)
1150 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1151 10.*)
1152 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1153 esac
d9898ee8 1154 ;;
1155 esac
8d138742
CE
1156 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1157 _lt_dar_single_mod='$single_module'
1158 fi
1159 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1160 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1161 else
1162 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1163 fi
b0322a85 1164 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
8d138742
CE
1165 _lt_dsymutil='~$DSYMUTIL $lib || :'
1166 else
1167 _lt_dsymutil=
1168 fi
1169 ;;
d9898ee8 1170 esac
8d138742 1171])
d9898ee8 1172
8d138742 1173
b0322a85
CE
1174# _LT_DARWIN_LINKER_FEATURES([TAG])
1175# ---------------------------------
8d138742
CE
1176# Checks for linker and compiler features on darwin
1177m4_defun([_LT_DARWIN_LINKER_FEATURES],
1178[
1179 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1180 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1181 _LT_TAGVAR(hardcode_direct, $1)=no
1182 _LT_TAGVAR(hardcode_automatic, $1)=yes
1183 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
b0322a85
CE
1184 if test "$lt_cv_ld_force_load" = "yes"; then
1185 _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\"`'
1186 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1187 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1188 else
1189 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1190 fi
8d138742
CE
1191 _LT_TAGVAR(link_all_deplibs, $1)=yes
1192 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1193 case $cc_basename in
1194 ifort*) _lt_dar_can_shared=yes ;;
1195 *) _lt_dar_can_shared=$GCC ;;
d9898ee8 1196 esac
8d138742 1197 if test "$_lt_dar_can_shared" = "yes"; then
b0322a85 1198 output_verbose_link_cmd=func_echo_all
8d138742
CE
1199 _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}"
1200 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1201 _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}"
1202 _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}"
1203 m4_if([$1], [CXX],
1204[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1205 _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}"
1206 _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}"
1207 fi
1208],[])
1209 else
1210 _LT_TAGVAR(ld_shlibs, $1)=no
1211 fi
1212])
d9898ee8 1213
b0322a85
CE
1214# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1215# ----------------------------------
8d138742
CE
1216# Links a minimal program and checks the executable
1217# for the system default hardcoded library path. In most cases,
1218# this is /usr/lib:/lib, but when the MPI compilers are used
1219# the location of the communication and MPI libs are included too.
1220# If we don't find anything, use the default library path according
1221# to the aix ld manual.
b0322a85
CE
1222# Store the results from the different compilers for each TAGNAME.
1223# Allow to override them for all tags through lt_cv_aix_libpath.
8d138742
CE
1224m4_defun([_LT_SYS_MODULE_PATH_AIX],
1225[m4_require([_LT_DECL_SED])dnl
b0322a85
CE
1226if test "${lt_cv_aix_libpath+set}" = set; then
1227 aix_libpath=$lt_cv_aix_libpath
1228else
1229 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1230 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1231 lt_aix_libpath_sed='[
1232 /Import File Strings/,/^$/ {
1233 /^0/ {
1234 s/^0 *\([^ ]*\) *$/\1/
1235 p
1236 }
1237 }]'
1238 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1239 # Check for a 64-bit object if we didn't find anything.
1240 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1241 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1242 fi],[])
1243 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1244 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1245 fi
1246 ])
1247 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1248fi
8d138742 1249])# _LT_SYS_MODULE_PATH_AIX
d9898ee8 1250
d9898ee8 1251
8d138742
CE
1252# _LT_SHELL_INIT(ARG)
1253# -------------------
1254m4_define([_LT_SHELL_INIT],
b0322a85
CE
1255[m4_divert_text([M4SH-INIT], [$1
1256])])# _LT_SHELL_INIT
1257
d9898ee8 1258
1259
8d138742
CE
1260# _LT_PROG_ECHO_BACKSLASH
1261# -----------------------
b0322a85
CE
1262# Find how we can fake an echo command that does not interpret backslash.
1263# In particular, with Autoconf 2.60 or later we add some code to the start
1264# of the generated configure script which will find a shell with a builtin
1265# printf (which we can use as an echo command).
8d138742 1266m4_defun([_LT_PROG_ECHO_BACKSLASH],
b0322a85
CE
1267[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1268ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1269ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1270
1271AC_MSG_CHECKING([how to print strings])
1272# Test print first, because it will be a builtin if present.
1273if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1274 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1275 ECHO='print -r --'
1276elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1277 ECHO='printf %s\n'
d9898ee8 1278else
b0322a85
CE
1279 # Use this function as a fallback that always works.
1280 func_fallback_echo ()
1281 {
1282 eval 'cat <<_LTECHO_EOF
1283$[]1
1284_LTECHO_EOF'
1285 }
1286 ECHO='func_fallback_echo'
d9898ee8 1287fi
d9898ee8 1288
b0322a85
CE
1289# func_echo_all arg...
1290# Invoke $ECHO with all args, space-separated.
1291func_echo_all ()
1292{
1293 $ECHO "$*"
1294}
8d138742 1295
b0322a85
CE
1296case "$ECHO" in
1297 printf*) AC_MSG_RESULT([printf]) ;;
1298 print*) AC_MSG_RESULT([print -r]) ;;
1299 *) AC_MSG_RESULT([cat]) ;;
1300esac
d9898ee8 1301
b0322a85
CE
1302m4_ifdef([_AS_DETECT_SUGGESTED],
1303[_AS_DETECT_SUGGESTED([
1304 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1305 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1306 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1307 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1308 PATH=/empty FPATH=/empty; export PATH FPATH
1309 test "X`printf %s $ECHO`" = "X$ECHO" \
1310 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
d9898ee8 1311
8d138742 1312_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
b0322a85 1313_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
8d138742 1314])# _LT_PROG_ECHO_BACKSLASH
d9898ee8 1315
d9898ee8 1316
b0322a85
CE
1317# _LT_WITH_SYSROOT
1318# ----------------
1319AC_DEFUN([_LT_WITH_SYSROOT],
1320[AC_MSG_CHECKING([for sysroot])
1321AC_ARG_WITH([sysroot],
1322[ --with-sysroot[=DIR] Search for dependent libraries within DIR
1323 (or the compiler's sysroot if not specified).],
1324[], [with_sysroot=no])
1325
1326dnl lt_sysroot will always be passed unquoted. We quote it here
1327dnl in case the user passed a directory name.
1328lt_sysroot=
1329case ${with_sysroot} in #(
1330 yes)
1331 if test "$GCC" = yes; then
1332 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1333 fi
1334 ;; #(
1335 /*)
1336 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1337 ;; #(
1338 no|'')
1339 ;; #(
1340 *)
1341 AC_MSG_RESULT([${with_sysroot}])
1342 AC_MSG_ERROR([The sysroot must be an absolute path.])
1343 ;;
1344esac
1345
1346 AC_MSG_RESULT([${lt_sysroot:-no}])
1347_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1348[dependent libraries, and in which our libraries should be installed.])])
1349
8d138742
CE
1350# _LT_ENABLE_LOCK
1351# ---------------
1352m4_defun([_LT_ENABLE_LOCK],
1353[AC_ARG_ENABLE([libtool-lock],
1354 [AS_HELP_STRING([--disable-libtool-lock],
1355 [avoid locking (might break parallel builds)])])
1356test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
d9898ee8 1357
8d138742
CE
1358# Some flags need to be propagated to the compiler or linker for good
1359# libtool support.
1360case $host in
1361ia64-*-hpux*)
1362 # Find out which ABI we are using.
1363 echo 'int i;' > conftest.$ac_ext
1364 if AC_TRY_EVAL(ac_compile); then
1365 case `/usr/bin/file conftest.$ac_objext` in
1366 *ELF-32*)
1367 HPUX_IA64_MODE="32"
1368 ;;
1369 *ELF-64*)
1370 HPUX_IA64_MODE="64"
1371 ;;
1372 esac
d9898ee8 1373 fi
8d138742
CE
1374 rm -rf conftest*
1375 ;;
1376*-*-irix6*)
1377 # Find out which ABI we are using.
b0322a85 1378 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
8d138742
CE
1379 if AC_TRY_EVAL(ac_compile); then
1380 if test "$lt_cv_prog_gnu_ld" = yes; then
1381 case `/usr/bin/file conftest.$ac_objext` in
1382 *32-bit*)
1383 LD="${LD-ld} -melf32bsmip"
1384 ;;
1385 *N32*)
1386 LD="${LD-ld} -melf32bmipn32"
1387 ;;
1388 *64-bit*)
1389 LD="${LD-ld} -melf64bmip"
1390 ;;
1391 esac
ac40fd9e 1392 else
8d138742
CE
1393 case `/usr/bin/file conftest.$ac_objext` in
1394 *32-bit*)
1395 LD="${LD-ld} -32"
1396 ;;
1397 *N32*)
1398 LD="${LD-ld} -n32"
1399 ;;
1400 *64-bit*)
1401 LD="${LD-ld} -64"
1402 ;;
1403 esac
ac40fd9e 1404 fi
8d138742
CE
1405 fi
1406 rm -rf conftest*
d9898ee8 1407 ;;
1408
b0322a85 1409x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8d138742
CE
1410s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1411 # Find out which ABI we are using.
1412 echo 'int i;' > conftest.$ac_ext
1413 if AC_TRY_EVAL(ac_compile); then
1414 case `/usr/bin/file conftest.o` in
1415 *32-bit*)
1416 case $host in
1417 x86_64-*kfreebsd*-gnu)
1418 LD="${LD-ld} -m elf_i386_fbsd"
1419 ;;
1420 x86_64-*linux*)
1421 LD="${LD-ld} -m elf_i386"
1422 ;;
b0322a85
CE
1423 powerpcle-*linux*)
1424 LD="${LD-ld} -m elf32lppclinux"
1425 ;;
1426 powerpc-*linux*)
8d138742
CE
1427 LD="${LD-ld} -m elf32ppclinux"
1428 ;;
1429 s390x-*linux*)
1430 LD="${LD-ld} -m elf_s390"
1431 ;;
1432 sparc64-*linux*)
1433 LD="${LD-ld} -m elf32_sparc"
1434 ;;
1435 esac
1436 ;;
1437 *64-bit*)
1438 case $host in
1439 x86_64-*kfreebsd*-gnu)
1440 LD="${LD-ld} -m elf_x86_64_fbsd"
1441 ;;
1442 x86_64-*linux*)
1443 LD="${LD-ld} -m elf_x86_64"
1444 ;;
b0322a85
CE
1445 powerpcle-*linux*)
1446 LD="${LD-ld} -m elf64lppc"
1447 ;;
1448 powerpc-*linux*)
8d138742
CE
1449 LD="${LD-ld} -m elf64ppc"
1450 ;;
1451 s390*-*linux*|s390*-*tpf*)
1452 LD="${LD-ld} -m elf64_s390"
1453 ;;
1454 sparc*-*linux*)
1455 LD="${LD-ld} -m elf64_sparc"
1456 ;;
1457 esac
1458 ;;
d9898ee8 1459 esac
d9898ee8 1460 fi
8d138742 1461 rm -rf conftest*
d9898ee8 1462 ;;
1463
8d138742
CE
1464*-*-sco3.2v5*)
1465 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1466 SAVE_CFLAGS="$CFLAGS"
1467 CFLAGS="$CFLAGS -belf"
1468 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1469 [AC_LANG_PUSH(C)
1470 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1471 AC_LANG_POP])
1472 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1473 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1474 CFLAGS="$SAVE_CFLAGS"
1475 fi
d9898ee8 1476 ;;
b0322a85 1477*-*solaris*)
8d138742
CE
1478 # Find out which ABI we are using.
1479 echo 'int i;' > conftest.$ac_ext
1480 if AC_TRY_EVAL(ac_compile); then
1481 case `/usr/bin/file conftest.o` in
1482 *64-bit*)
1483 case $lt_cv_prog_gnu_ld in
b0322a85
CE
1484 yes*)
1485 case $host in
1486 i?86-*-solaris*)
1487 LD="${LD-ld} -m elf_x86_64"
1488 ;;
1489 sparc*-*-solaris*)
1490 LD="${LD-ld} -m elf64_sparc"
1491 ;;
1492 esac
1493 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1494 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1495 LD="${LD-ld}_sol2"
1496 fi
1497 ;;
8d138742
CE
1498 *)
1499 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1500 LD="${LD-ld} -64"
1501 fi
1502 ;;
1503 esac
1504 ;;
1505 esac
1506 fi
1507 rm -rf conftest*
d9898ee8 1508 ;;
8d138742 1509esac
d9898ee8 1510
8d138742
CE
1511need_locks="$enable_libtool_lock"
1512])# _LT_ENABLE_LOCK
d9898ee8 1513
d9898ee8 1514
b0322a85
CE
1515# _LT_PROG_AR
1516# -----------
1517m4_defun([_LT_PROG_AR],
1518[AC_CHECK_TOOLS(AR, [ar], false)
1519: ${AR=ar}
1520: ${AR_FLAGS=cru}
1521_LT_DECL([], [AR], [1], [The archiver])
1522_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1523
1524AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1525 [lt_cv_ar_at_file=no
1526 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1527 [echo conftest.$ac_objext > conftest.lst
1528 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1529 AC_TRY_EVAL([lt_ar_try])
1530 if test "$ac_status" -eq 0; then
1531 # Ensure the archiver fails upon bogus file names.
1532 rm -f conftest.$ac_objext libconftest.a
1533 AC_TRY_EVAL([lt_ar_try])
1534 if test "$ac_status" -ne 0; then
1535 lt_cv_ar_at_file=@
1536 fi
1537 fi
1538 rm -f conftest.* libconftest.a
1539 ])
1540 ])
1541
1542if test "x$lt_cv_ar_at_file" = xno; then
1543 archiver_list_spec=
1544else
1545 archiver_list_spec=$lt_cv_ar_at_file
1546fi
1547_LT_DECL([], [archiver_list_spec], [1],
1548 [How to feed a file listing to the archiver])
1549])# _LT_PROG_AR
1550
1551
8d138742
CE
1552# _LT_CMD_OLD_ARCHIVE
1553# -------------------
1554m4_defun([_LT_CMD_OLD_ARCHIVE],
b0322a85 1555[_LT_PROG_AR
d9898ee8 1556
8d138742
CE
1557AC_CHECK_TOOL(STRIP, strip, :)
1558test -z "$STRIP" && STRIP=:
1559_LT_DECL([], [STRIP], [1], [A symbol stripping program])
d9898ee8 1560
8d138742
CE
1561AC_CHECK_TOOL(RANLIB, ranlib, :)
1562test -z "$RANLIB" && RANLIB=:
1563_LT_DECL([], [RANLIB], [1],
1564 [Commands used to install an old-style archive])
d9898ee8 1565
8d138742
CE
1566# Determine commands to create old-style static archives.
1567old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1568old_postinstall_cmds='chmod 644 $oldlib'
1569old_postuninstall_cmds=
d9898ee8 1570
8d138742 1571if test -n "$RANLIB"; then
d9898ee8 1572 case $host_os in
8d138742 1573 openbsd*)
b0322a85 1574 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
d9898ee8 1575 ;;
8d138742 1576 *)
b0322a85 1577 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
d9898ee8 1578 ;;
1579 esac
b0322a85 1580 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8d138742 1581fi
b0322a85
CE
1582
1583case $host_os in
1584 darwin*)
1585 lock_old_archive_extraction=yes ;;
1586 *)
1587 lock_old_archive_extraction=no ;;
1588esac
8d138742
CE
1589_LT_DECL([], [old_postinstall_cmds], [2])
1590_LT_DECL([], [old_postuninstall_cmds], [2])
1591_LT_TAGDECL([], [old_archive_cmds], [2],
1592 [Commands used to build an old-style archive])
b0322a85
CE
1593_LT_DECL([], [lock_old_archive_extraction], [0],
1594 [Whether to use a lock for old archive extraction])
8d138742 1595])# _LT_CMD_OLD_ARCHIVE
d9898ee8 1596
d9898ee8 1597
8d138742
CE
1598# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1599# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1600# ----------------------------------------------------------------
1601# Check whether the given compiler option works
1602AC_DEFUN([_LT_COMPILER_OPTION],
1603[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1604m4_require([_LT_DECL_SED])dnl
1605AC_CACHE_CHECK([$1], [$2],
1606 [$2=no
1607 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1608 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1609 lt_compiler_flag="$3"
1610 # Insert the option either (1) after the last *FLAGS variable, or
1611 # (2) before a word containing "conftest.", or (3) at the end.
1612 # Note that $ac_compile itself does not contain backslashes and begins
1613 # with a dollar sign (not a hyphen), so the echo should work correctly.
1614 # The option is referenced via a variable to avoid confusing sed.
1615 lt_compile=`echo "$ac_compile" | $SED \
1616 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1617 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1618 -e 's:$: $lt_compiler_flag:'`
b0322a85 1619 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
1620 (eval "$lt_compile" 2>conftest.err)
1621 ac_status=$?
1622 cat conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 1623 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8d138742
CE
1624 if (exit $ac_status) && test -s "$ac_outfile"; then
1625 # The compiler can only warn and ignore the option if not recognized
1626 # So say no if there are warnings other than the usual output.
b0322a85 1627 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8d138742
CE
1628 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1629 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1630 $2=yes
1631 fi
1632 fi
1633 $RM conftest*
1634])
d9898ee8 1635
8d138742
CE
1636if test x"[$]$2" = xyes; then
1637 m4_if([$5], , :, [$5])
1638else
1639 m4_if([$6], , :, [$6])
1640fi
1641])# _LT_COMPILER_OPTION
d9898ee8 1642
8d138742
CE
1643# Old name:
1644AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1645dnl aclocal-1.4 backwards compatibility:
1646dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
d9898ee8 1647
d9898ee8 1648
8d138742
CE
1649# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1650# [ACTION-SUCCESS], [ACTION-FAILURE])
1651# ----------------------------------------------------
1652# Check whether the given linker option works
1653AC_DEFUN([_LT_LINKER_OPTION],
1654[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1655m4_require([_LT_DECL_SED])dnl
1656AC_CACHE_CHECK([$1], [$2],
1657 [$2=no
1658 save_LDFLAGS="$LDFLAGS"
1659 LDFLAGS="$LDFLAGS $3"
1660 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1661 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1662 # The linker can only warn and ignore the option if not recognized
1663 # So say no if there are warnings
1664 if test -s conftest.err; then
1665 # Append any errors to the config.log.
1666 cat conftest.err 1>&AS_MESSAGE_LOG_FD
b0322a85 1667 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
8d138742
CE
1668 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1669 if diff conftest.exp conftest.er2 >/dev/null; then
1670 $2=yes
1671 fi
1672 else
1673 $2=yes
1674 fi
1675 fi
1676 $RM -r conftest*
1677 LDFLAGS="$save_LDFLAGS"
1678])
d9898ee8 1679
8d138742
CE
1680if test x"[$]$2" = xyes; then
1681 m4_if([$4], , :, [$4])
1682else
1683 m4_if([$5], , :, [$5])
1684fi
1685])# _LT_LINKER_OPTION
d9898ee8 1686
8d138742
CE
1687# Old name:
1688AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1689dnl aclocal-1.4 backwards compatibility:
1690dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
d9898ee8 1691
d9898ee8 1692
8d138742
CE
1693# LT_CMD_MAX_LEN
1694#---------------
1695AC_DEFUN([LT_CMD_MAX_LEN],
1696[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1697# find the maximum length of command line arguments
1698AC_MSG_CHECKING([the maximum length of command line arguments])
1699AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1700 i=0
1701 teststring="ABCD"
d9898ee8 1702
8d138742
CE
1703 case $build_os in
1704 msdosdjgpp*)
1705 # On DJGPP, this test can blow up pretty badly due to problems in libc
1706 # (any single argument exceeding 2000 bytes causes a buffer overrun
1707 # during glob expansion). Even if it were fixed, the result of this
1708 # check would be larger than it should be.
1709 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1710 ;;
d9898ee8 1711
8d138742
CE
1712 gnu*)
1713 # Under GNU Hurd, this test is not required because there is
1714 # no limit to the length of command line arguments.
1715 # Libtool will interpret -1 as no limit whatsoever
1716 lt_cv_sys_max_cmd_len=-1;
1717 ;;
d9898ee8 1718
8d138742
CE
1719 cygwin* | mingw* | cegcc*)
1720 # On Win9x/ME, this test blows up -- it succeeds, but takes
1721 # about 5 minutes as the teststring grows exponentially.
1722 # Worse, since 9x/ME are not pre-emptively multitasking,
1723 # you end up with a "frozen" computer, even though with patience
1724 # the test eventually succeeds (with a max line length of 256k).
1725 # Instead, let's just punt: use the minimum linelength reported by
1726 # all of the supported platforms: 8192 (on NT/2K/XP).
1727 lt_cv_sys_max_cmd_len=8192;
1728 ;;
d9898ee8 1729
b0322a85
CE
1730 mint*)
1731 # On MiNT this can take a long time and run out of memory.
1732 lt_cv_sys_max_cmd_len=8192;
1733 ;;
1734
8d138742
CE
1735 amigaos*)
1736 # On AmigaOS with pdksh, this test takes hours, literally.
1737 # So we just punt and use a minimum line length of 8192.
1738 lt_cv_sys_max_cmd_len=8192;
1739 ;;
d9898ee8 1740
8d138742
CE
1741 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1742 # This has been around since 386BSD, at least. Likely further.
1743 if test -x /sbin/sysctl; then
1744 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1745 elif test -x /usr/sbin/sysctl; then
1746 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1747 else
1748 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1749 fi
1750 # And add a safety zone
1751 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1752 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1753 ;;
d9898ee8 1754
8d138742
CE
1755 interix*)
1756 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1757 lt_cv_sys_max_cmd_len=196608
1758 ;;
d9898ee8 1759
b0322a85
CE
1760 os2*)
1761 # The test takes a long time on OS/2.
1762 lt_cv_sys_max_cmd_len=8192
1763 ;;
1764
8d138742
CE
1765 osf*)
1766 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1767 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1768 # nice to cause kernel panics so lets avoid the loop below.
1769 # First set a reasonable default.
1770 lt_cv_sys_max_cmd_len=16384
1771 #
1772 if test -x /sbin/sysconfig; then
1773 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1774 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1775 esac
1776 fi
1777 ;;
1778 sco3.2v5*)
1779 lt_cv_sys_max_cmd_len=102400
1780 ;;
1781 sysv5* | sco5v6* | sysv4.2uw2*)
1782 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1783 if test -n "$kargmax"; then
1784 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
d9898ee8 1785 else
8d138742 1786 lt_cv_sys_max_cmd_len=32768
d9898ee8 1787 fi
8d138742
CE
1788 ;;
1789 *)
1790 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1791 if test -n "$lt_cv_sys_max_cmd_len"; then
1792 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1794 else
1795 # Make teststring a little bigger before we do anything with it.
1796 # a 1K string should be a reasonable start.
1797 for i in 1 2 3 4 5 6 7 8 ; do
1798 teststring=$teststring$teststring
1799 done
1800 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1801 # If test is not a shell built-in, we'll probably end up computing a
1802 # maximum length that is only half of the actual maximum length, but
1803 # we can't tell.
b0322a85
CE
1804 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1805 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
8d138742
CE
1806 test $i != 17 # 1/2 MB should be enough
1807 do
1808 i=`expr $i + 1`
1809 teststring=$teststring$teststring
1810 done
1811 # Only check the string length outside the loop.
1812 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1813 teststring=
1814 # Add a significant safety factor because C++ compilers can tack on
1815 # massive amounts of additional arguments before passing them to the
1816 # linker. It appears as though 1/2 is a usable value.
1817 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1818 fi
1819 ;;
1820 esac
1821])
1822if test -n $lt_cv_sys_max_cmd_len ; then
1823 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1824else
1825 AC_MSG_RESULT(none)
1826fi
1827max_cmd_len=$lt_cv_sys_max_cmd_len
1828_LT_DECL([], [max_cmd_len], [0],
1829 [What is the maximum length of a command?])
1830])# LT_CMD_MAX_LEN
d9898ee8 1831
8d138742
CE
1832# Old name:
1833AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1834dnl aclocal-1.4 backwards compatibility:
1835dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
d9898ee8 1836
d9898ee8 1837
8d138742
CE
1838# _LT_HEADER_DLFCN
1839# ----------------
1840m4_defun([_LT_HEADER_DLFCN],
1841[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1842])# _LT_HEADER_DLFCN
d9898ee8 1843
d9898ee8 1844
8d138742
CE
1845# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1846# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1847# ----------------------------------------------------------------
1848m4_defun([_LT_TRY_DLOPEN_SELF],
1849[m4_require([_LT_HEADER_DLFCN])dnl
1850if test "$cross_compiling" = yes; then :
1851 [$4]
1852else
1853 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1854 lt_status=$lt_dlunknown
1855 cat > conftest.$ac_ext <<_LT_EOF
b0322a85 1856[#line $LINENO "configure"
8d138742 1857#include "confdefs.h"
d9898ee8 1858
8d138742
CE
1859#if HAVE_DLFCN_H
1860#include <dlfcn.h>
1861#endif
d9898ee8 1862
8d138742 1863#include <stdio.h>
d9898ee8 1864
8d138742
CE
1865#ifdef RTLD_GLOBAL
1866# define LT_DLGLOBAL RTLD_GLOBAL
1867#else
1868# ifdef DL_GLOBAL
1869# define LT_DLGLOBAL DL_GLOBAL
1870# else
1871# define LT_DLGLOBAL 0
1872# endif
1873#endif
d9898ee8 1874
8d138742
CE
1875/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1876 find out it does not work in some platform. */
1877#ifndef LT_DLLAZY_OR_NOW
1878# ifdef RTLD_LAZY
1879# define LT_DLLAZY_OR_NOW RTLD_LAZY
1880# else
1881# ifdef DL_LAZY
1882# define LT_DLLAZY_OR_NOW DL_LAZY
1883# else
1884# ifdef RTLD_NOW
1885# define LT_DLLAZY_OR_NOW RTLD_NOW
1886# else
1887# ifdef DL_NOW
1888# define LT_DLLAZY_OR_NOW DL_NOW
1889# else
1890# define LT_DLLAZY_OR_NOW 0
1891# endif
1892# endif
1893# endif
1894# endif
1895#endif
d9898ee8 1896
b0322a85
CE
1897/* When -fvisbility=hidden is used, assume the code has been annotated
1898 correspondingly for the symbols needed. */
1899#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1900int fnord () __attribute__((visibility("default")));
1901#endif
1902
1903int fnord () { return 42; }
8d138742
CE
1904int main ()
1905{
1906 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1907 int status = $lt_dlunknown;
d9898ee8 1908
8d138742
CE
1909 if (self)
1910 {
1911 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
b0322a85
CE
1912 else
1913 {
1914 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1915 else puts (dlerror ());
1916 }
8d138742
CE
1917 /* dlclose (self); */
1918 }
d9898ee8 1919 else
8d138742
CE
1920 puts (dlerror ());
1921
1922 return status;
1923}]
1924_LT_EOF
1925 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1926 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1927 lt_status=$?
1928 case x$lt_status in
1929 x$lt_dlno_uscore) $1 ;;
1930 x$lt_dlneed_uscore) $2 ;;
1931 x$lt_dlunknown|x*) $3 ;;
1932 esac
1933 else :
1934 # compilation failed
1935 $3
d9898ee8 1936 fi
1937fi
8d138742
CE
1938rm -fr conftest*
1939])# _LT_TRY_DLOPEN_SELF
d9898ee8 1940
d9898ee8 1941
8d138742
CE
1942# LT_SYS_DLOPEN_SELF
1943# ------------------
1944AC_DEFUN([LT_SYS_DLOPEN_SELF],
1945[m4_require([_LT_HEADER_DLFCN])dnl
1946if test "x$enable_dlopen" != xyes; then
1947 enable_dlopen=unknown
1948 enable_dlopen_self=unknown
1949 enable_dlopen_self_static=unknown
1950else
1951 lt_cv_dlopen=no
1952 lt_cv_dlopen_libs=
d9898ee8 1953
8d138742
CE
1954 case $host_os in
1955 beos*)
1956 lt_cv_dlopen="load_add_on"
1957 lt_cv_dlopen_libs=
1958 lt_cv_dlopen_self=yes
1959 ;;
d9898ee8 1960
8d138742
CE
1961 mingw* | pw32* | cegcc*)
1962 lt_cv_dlopen="LoadLibrary"
1963 lt_cv_dlopen_libs=
1964 ;;
d9898ee8 1965
8d138742
CE
1966 cygwin*)
1967 lt_cv_dlopen="dlopen"
1968 lt_cv_dlopen_libs=
1969 ;;
d9898ee8 1970
8d138742
CE
1971 darwin*)
1972 # if libdl is installed we need to link against it
1973 AC_CHECK_LIB([dl], [dlopen],
1974 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1975 lt_cv_dlopen="dyld"
1976 lt_cv_dlopen_libs=
1977 lt_cv_dlopen_self=yes
1978 ])
1979 ;;
d9898ee8 1980
8d138742
CE
1981 *)
1982 AC_CHECK_FUNC([shl_load],
1983 [lt_cv_dlopen="shl_load"],
1984 [AC_CHECK_LIB([dld], [shl_load],
1985 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1986 [AC_CHECK_FUNC([dlopen],
1987 [lt_cv_dlopen="dlopen"],
1988 [AC_CHECK_LIB([dl], [dlopen],
1989 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1990 [AC_CHECK_LIB([svld], [dlopen],
1991 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1992 [AC_CHECK_LIB([dld], [dld_link],
1993 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1994 ])
1995 ])
1996 ])
1997 ])
1998 ])
1999 ;;
2000 esac
d9898ee8 2001
8d138742
CE
2002 if test "x$lt_cv_dlopen" != xno; then
2003 enable_dlopen=yes
2004 else
2005 enable_dlopen=no
2006 fi
d9898ee8 2007
8d138742
CE
2008 case $lt_cv_dlopen in
2009 dlopen)
2010 save_CPPFLAGS="$CPPFLAGS"
2011 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
d9898ee8 2012
8d138742
CE
2013 save_LDFLAGS="$LDFLAGS"
2014 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
d9898ee8 2015
8d138742
CE
2016 save_LIBS="$LIBS"
2017 LIBS="$lt_cv_dlopen_libs $LIBS"
d9898ee8 2018
8d138742
CE
2019 AC_CACHE_CHECK([whether a program can dlopen itself],
2020 lt_cv_dlopen_self, [dnl
2021 _LT_TRY_DLOPEN_SELF(
2022 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2023 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2024 ])
d9898ee8 2025
8d138742
CE
2026 if test "x$lt_cv_dlopen_self" = xyes; then
2027 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2028 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2029 lt_cv_dlopen_self_static, [dnl
2030 _LT_TRY_DLOPEN_SELF(
2031 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2032 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2033 ])
2034 fi
d9898ee8 2035
8d138742
CE
2036 CPPFLAGS="$save_CPPFLAGS"
2037 LDFLAGS="$save_LDFLAGS"
2038 LIBS="$save_LIBS"
2039 ;;
2040 esac
d9898ee8 2041
8d138742
CE
2042 case $lt_cv_dlopen_self in
2043 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2044 *) enable_dlopen_self=unknown ;;
2045 esac
d9898ee8 2046
8d138742
CE
2047 case $lt_cv_dlopen_self_static in
2048 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2049 *) enable_dlopen_self_static=unknown ;;
2050 esac
2051fi
2052_LT_DECL([dlopen_support], [enable_dlopen], [0],
2053 [Whether dlopen is supported])
2054_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2055 [Whether dlopen of programs is supported])
2056_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2057 [Whether dlopen of statically linked programs is supported])
2058])# LT_SYS_DLOPEN_SELF
d9898ee8 2059
8d138742
CE
2060# Old name:
2061AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2062dnl aclocal-1.4 backwards compatibility:
2063dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
d9898ee8 2064
2065
8d138742
CE
2066# _LT_COMPILER_C_O([TAGNAME])
2067# ---------------------------
2068# Check to see if options -c and -o are simultaneously supported by compiler.
2069# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2070m4_defun([_LT_COMPILER_C_O],
2071[m4_require([_LT_DECL_SED])dnl
2072m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2073m4_require([_LT_TAG_COMPILER])dnl
2074AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2075 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2076 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2077 $RM -r conftest 2>/dev/null
2078 mkdir conftest
2079 cd conftest
2080 mkdir out
2081 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
d9898ee8 2082
8d138742
CE
2083 lt_compiler_flag="-o out/conftest2.$ac_objext"
2084 # Insert the option either (1) after the last *FLAGS variable, or
2085 # (2) before a word containing "conftest.", or (3) at the end.
2086 # Note that $ac_compile itself does not contain backslashes and begins
2087 # with a dollar sign (not a hyphen), so the echo should work correctly.
2088 lt_compile=`echo "$ac_compile" | $SED \
2089 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2090 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2091 -e 's:$: $lt_compiler_flag:'`
b0322a85 2092 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
2093 (eval "$lt_compile" 2>out/conftest.err)
2094 ac_status=$?
2095 cat out/conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 2096 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8d138742
CE
2097 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2098 then
2099 # The compiler can only warn and ignore the option if not recognized
2100 # So say no if there are warnings
b0322a85 2101 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8d138742
CE
2102 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2103 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2104 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2105 fi
2106 fi
2107 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2108 $RM conftest*
2109 # SGI C++ compiler will create directory out/ii_files/ for
2110 # template instantiation
2111 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2112 $RM out/* && rmdir out
2113 cd ..
2114 $RM -r conftest
2115 $RM conftest*
2116])
2117_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2118 [Does compiler simultaneously support -c and -o options?])
2119])# _LT_COMPILER_C_O
d9898ee8 2120
d9898ee8 2121
8d138742
CE
2122# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2123# ----------------------------------
2124# Check to see if we can do hard links to lock some files if needed
2125m4_defun([_LT_COMPILER_FILE_LOCKS],
2126[m4_require([_LT_ENABLE_LOCK])dnl
2127m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2128_LT_COMPILER_C_O([$1])
d9898ee8 2129
8d138742
CE
2130hard_links="nottested"
2131if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2132 # do not overwrite the value of need_locks provided by the user
2133 AC_MSG_CHECKING([if we can lock with hard links])
2134 hard_links=yes
2135 $RM conftest*
2136 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2137 touch conftest.a
2138 ln conftest.a conftest.b 2>&5 || hard_links=no
2139 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2140 AC_MSG_RESULT([$hard_links])
2141 if test "$hard_links" = no; then
2142 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2143 need_locks=warn
2144 fi
2145else
2146 need_locks=no
d9898ee8 2147fi
8d138742
CE
2148_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2149])# _LT_COMPILER_FILE_LOCKS
d9898ee8 2150
2151
8d138742
CE
2152# _LT_CHECK_OBJDIR
2153# ----------------
2154m4_defun([_LT_CHECK_OBJDIR],
2155[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2156[rm -f .libs 2>/dev/null
2157mkdir .libs 2>/dev/null
2158if test -d .libs; then
2159 lt_cv_objdir=.libs
d9898ee8 2160else
8d138742
CE
2161 # MS-DOS does not allow filenames that begin with a dot.
2162 lt_cv_objdir=_libs
d9898ee8 2163fi
8d138742
CE
2164rmdir .libs 2>/dev/null])
2165objdir=$lt_cv_objdir
2166_LT_DECL([], [objdir], [0],
2167 [The name of the directory that contains temporary libtool files])dnl
2168m4_pattern_allow([LT_OBJDIR])dnl
2169AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2170 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2171])# _LT_CHECK_OBJDIR
2172
2173
2174# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2175# --------------------------------------
2176# Check hardcoding attributes.
2177m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2178[AC_MSG_CHECKING([how to hardcode library paths into programs])
2179_LT_TAGVAR(hardcode_action, $1)=
2180if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2181 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2182 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2183
2184 # We can hardcode non-existent directories.
2185 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2186 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2187 # have to relink, otherwise we might link with an installed library
2188 # when we should be linking with a yet-to-be-installed one
2189 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2190 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2191 # Linking always hardcodes the temporary library directory.
2192 _LT_TAGVAR(hardcode_action, $1)=relink
2193 else
2194 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2195 _LT_TAGVAR(hardcode_action, $1)=immediate
2196 fi
d9898ee8 2197else
8d138742
CE
2198 # We cannot hardcode anything, or else we can only hardcode existing
2199 # directories.
2200 _LT_TAGVAR(hardcode_action, $1)=unsupported
d9898ee8 2201fi
8d138742 2202AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
d9898ee8 2203
8d138742
CE
2204if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2205 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2206 # Fast installation is not supported
2207 enable_fast_install=no
2208elif test "$shlibpath_overrides_runpath" = yes ||
2209 test "$enable_shared" = no; then
2210 # Fast installation is not necessary
2211 enable_fast_install=needless
2212fi
2213_LT_TAGDECL([], [hardcode_action], [0],
2214 [How to hardcode a shared library path into an executable])
2215])# _LT_LINKER_HARDCODE_LIBPATH
d9898ee8 2216
2217
8d138742
CE
2218# _LT_CMD_STRIPLIB
2219# ----------------
2220m4_defun([_LT_CMD_STRIPLIB],
2221[m4_require([_LT_DECL_EGREP])
2222striplib=
2223old_striplib=
2224AC_MSG_CHECKING([whether stripping libraries is possible])
2225if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2226 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2227 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2228 AC_MSG_RESULT([yes])
2229else
2230# FIXME - insert some real tests, host_os isn't really good enough
2231 case $host_os in
d9898ee8 2232 darwin*)
8d138742
CE
2233 if test -n "$STRIP" ; then
2234 striplib="$STRIP -x"
2235 old_striplib="$STRIP -S"
2236 AC_MSG_RESULT([yes])
d9898ee8 2237 else
8d138742 2238 AC_MSG_RESULT([no])
d9898ee8 2239 fi
2240 ;;
8d138742
CE
2241 *)
2242 AC_MSG_RESULT([no])
2243 ;;
2244 esac
2245fi
2246_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2247_LT_DECL([], [striplib], [1])
2248])# _LT_CMD_STRIPLIB
d9898ee8 2249
2250
8d138742
CE
2251# _LT_SYS_DYNAMIC_LINKER([TAG])
2252# -----------------------------
2253# PORTME Fill in your ld.so characteristics
2254m4_defun([_LT_SYS_DYNAMIC_LINKER],
2255[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2256m4_require([_LT_DECL_EGREP])dnl
2257m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2258m4_require([_LT_DECL_OBJDUMP])dnl
2259m4_require([_LT_DECL_SED])dnl
b0322a85 2260m4_require([_LT_CHECK_SHELL_FEATURES])dnl
8d138742
CE
2261AC_MSG_CHECKING([dynamic linker characteristics])
2262m4_if([$1],
2263 [], [
2264if test "$GCC" = yes; then
2265 case $host_os in
2266 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2267 *) lt_awk_arg="/^libraries:/" ;;
2268 esac
b0322a85
CE
2269 case $host_os in
2270 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2271 *) lt_sed_strip_eq="s,=/,/,g" ;;
2272 esac
2273 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2274 case $lt_search_path_spec in
2275 *\;*)
8d138742
CE
2276 # if the path contains ";" then we assume it to be the separator
2277 # otherwise default to the standard path separator (i.e. ":") - it is
2278 # assumed that no part of a normal pathname contains ";" but that should
2279 # okay in the real world where ";" in dirpaths is itself problematic.
b0322a85
CE
2280 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2281 ;;
2282 *)
2283 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2284 ;;
2285 esac
8d138742
CE
2286 # Ok, now we have the path, separated by spaces, we can step through it
2287 # and add multilib dir if necessary.
2288 lt_tmp_lt_search_path_spec=
2289 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2290 for lt_sys_path in $lt_search_path_spec; do
2291 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2292 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2293 else
2294 test -d "$lt_sys_path" && \
2295 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2296 fi
2297 done
b0322a85 2298 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
8d138742
CE
2299BEGIN {RS=" "; FS="/|\n";} {
2300 lt_foo="";
2301 lt_count=0;
2302 for (lt_i = NF; lt_i > 0; lt_i--) {
2303 if ($lt_i != "" && $lt_i != ".") {
2304 if ($lt_i == "..") {
2305 lt_count++;
2306 } else {
2307 if (lt_count == 0) {
2308 lt_foo="/" $lt_i lt_foo;
2309 } else {
2310 lt_count--;
2311 }
2312 }
2313 }
2314 }
2315 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2316 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2317}'`
b0322a85
CE
2318 # AWK program above erroneously prepends '/' to C:/dos/paths
2319 # for these hosts.
2320 case $host_os in
2321 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2322 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2323 esac
2324 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
8d138742
CE
2325else
2326 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2327fi])
2328library_names_spec=
2329libname_spec='lib$name'
2330soname_spec=
2331shrext_cmds=".so"
2332postinstall_cmds=
2333postuninstall_cmds=
2334finish_cmds=
2335finish_eval=
2336shlibpath_var=
2337shlibpath_overrides_runpath=unknown
2338version_type=none
2339dynamic_linker="$host_os ld.so"
2340sys_lib_dlsearch_path_spec="/lib /usr/lib"
2341need_lib_prefix=unknown
2342hardcode_into_libs=no
2343
2344# when you set need_version to no, make sure it does not cause -set_version
2345# flags to be left without arguments
2346need_version=unknown
d9898ee8 2347
2348case $host_os in
8d138742 2349aix3*)
b0322a85 2350 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2351 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2352 shlibpath_var=LIBPATH
d9898ee8 2353
8d138742
CE
2354 # AIX 3 has no versioning support, so we append a major version to the name.
2355 soname_spec='${libname}${release}${shared_ext}$major'
d9898ee8 2356 ;;
2357
8d138742 2358aix[[4-9]]*)
b0322a85 2359 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2360 need_lib_prefix=no
2361 need_version=no
2362 hardcode_into_libs=yes
2363 if test "$host_cpu" = ia64; then
2364 # AIX 5 supports IA64
2365 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2366 shlibpath_var=LD_LIBRARY_PATH
ac40fd9e 2367 else
8d138742
CE
2368 # With GCC up to 2.95.x, collect2 would create an import file
2369 # for dependence libraries. The import file would start with
2370 # the line `#! .'. This would cause the generated library to
2371 # depend on `.', always an invalid library. This was fixed in
2372 # development snapshots of GCC prior to 3.0.
2373 case $host_os in
2374 aix4 | aix4.[[01]] | aix4.[[01]].*)
2375 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2376 echo ' yes '
2377 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2378 :
2379 else
2380 can_build_shared=no
2381 fi
d9898ee8 2382 ;;
2383 esac
8d138742
CE
2384 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2385 # soname into executable. Probably we can add versioning support to
2386 # collect2, so additional links can be useful in future.
2387 if test "$aix_use_runtimelinking" = yes; then
2388 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2389 # instead of lib<name>.a to let people know that these are not
2390 # typical AIX shared libraries.
2391 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2392 else
2393 # We preserve .a as extension for shared libraries through AIX4.2
2394 # and later when we are not doing run time linking.
2395 library_names_spec='${libname}${release}.a $libname.a'
2396 soname_spec='${libname}${release}${shared_ext}$major'
2397 fi
2398 shlibpath_var=LIBPATH
d9898ee8 2399 fi
2400 ;;
2401
8d138742 2402amigaos*)
d9898ee8 2403 case $host_cpu in
8d138742
CE
2404 powerpc)
2405 # Since July 2007 AmigaOS4 officially supports .so libraries.
2406 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2407 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
d9898ee8 2408 ;;
8d138742
CE
2409 m68k)
2410 library_names_spec='$libname.ixlibrary $libname.a'
2411 # Create ${libname}_ixlibrary.a entries in /sys/libs.
b0322a85 2412 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
d9898ee8 2413 ;;
2414 esac
2415 ;;
2416
8d138742
CE
2417beos*)
2418 library_names_spec='${libname}${shared_ext}'
2419 dynamic_linker="$host_os ld.so"
2420 shlibpath_var=LIBRARY_PATH
d9898ee8 2421 ;;
2422
8d138742 2423bsdi[[45]]*)
b0322a85 2424 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2425 need_version=no
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2427 soname_spec='${libname}${release}${shared_ext}$major'
2428 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2429 shlibpath_var=LD_LIBRARY_PATH
2430 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2431 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2432 # the default ld.so.conf also contains /usr/contrib/lib and
2433 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2434 # libtool to hard-code these into programs
d9898ee8 2435 ;;
2436
8d138742
CE
2437cygwin* | mingw* | pw32* | cegcc*)
2438 version_type=windows
2439 shrext_cmds=".dll"
2440 need_version=no
2441 need_lib_prefix=no
d9898ee8 2442
b0322a85
CE
2443 case $GCC,$cc_basename in
2444 yes,*)
2445 # gcc
8d138742
CE
2446 library_names_spec='$libname.dll.a'
2447 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2448 postinstall_cmds='base_file=`basename \${file}`~
2449 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2450 dldir=$destdir/`dirname \$dlpath`~
2451 test -d \$dldir || mkdir -p \$dldir~
2452 $install_prog $dir/$dlname \$dldir/$dlname~
2453 chmod a+x \$dldir/$dlname~
2454 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2455 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2456 fi'
2457 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2458 dlpath=$dir/\$dldll~
2459 $RM \$dlpath'
2460 shlibpath_overrides_runpath=yes
d9898ee8 2461
8d138742
CE
2462 case $host_os in
2463 cygwin*)
2464 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2465 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
b0322a85
CE
2466m4_if([$1], [],[
2467 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
8d138742
CE
2468 ;;
2469 mingw* | cegcc*)
2470 # MinGW DLLs use traditional 'lib' prefix
2471 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
8d138742
CE
2472 ;;
2473 pw32*)
2474 # pw32 DLLs use 'pw' prefix rather than 'lib'
2475 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2476 ;;
2477 esac
b0322a85
CE
2478 dynamic_linker='Win32 ld.exe'
2479 ;;
2480
2481 *,cl*)
2482 # Native MSVC
2483 libname_spec='$name'
2484 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2485 library_names_spec='${libname}.dll.lib'
2486
2487 case $build_os in
2488 mingw*)
2489 sys_lib_search_path_spec=
2490 lt_save_ifs=$IFS
2491 IFS=';'
2492 for lt_path in $LIB
2493 do
2494 IFS=$lt_save_ifs
2495 # Let DOS variable expansion print the short 8.3 style file name.
2496 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2497 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2498 done
2499 IFS=$lt_save_ifs
2500 # Convert to MSYS style.
2501 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2502 ;;
2503 cygwin*)
2504 # Convert to unix form, then to dos form, then back to unix form
2505 # but this time dos style (no spaces!) so that the unix form looks
2506 # like /cygdrive/c/PROGRA~1:/cygdr...
2507 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2508 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2509 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2510 ;;
2511 *)
2512 sys_lib_search_path_spec="$LIB"
2513 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2514 # It is most probably a Windows format PATH.
2515 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2516 else
2517 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2518 fi
2519 # FIXME: find the short name or the path components, as spaces are
2520 # common. (e.g. "Program Files" -> "PROGRA~1")
2521 ;;
2522 esac
2523
2524 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2525 postinstall_cmds='base_file=`basename \${file}`~
2526 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2527 dldir=$destdir/`dirname \$dlpath`~
2528 test -d \$dldir || mkdir -p \$dldir~
2529 $install_prog $dir/$dlname \$dldir/$dlname'
2530 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2531 dlpath=$dir/\$dldll~
2532 $RM \$dlpath'
2533 shlibpath_overrides_runpath=yes
2534 dynamic_linker='Win32 link.exe'
8d138742 2535 ;;
d9898ee8 2536
8d138742 2537 *)
b0322a85 2538 # Assume MSVC wrapper
8d138742 2539 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
b0322a85 2540 dynamic_linker='Win32 ld.exe'
8d138742
CE
2541 ;;
2542 esac
8d138742
CE
2543 # FIXME: first we should search . and the directory the executable is in
2544 shlibpath_var=PATH
d9898ee8 2545 ;;
2546
8d138742
CE
2547darwin* | rhapsody*)
2548 dynamic_linker="$host_os dyld"
2549 version_type=darwin
2550 need_lib_prefix=no
2551 need_version=no
2552 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2553 soname_spec='${libname}${release}${major}$shared_ext'
2554 shlibpath_overrides_runpath=yes
2555 shlibpath_var=DYLD_LIBRARY_PATH
2556 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2557m4_if([$1], [],[
2558 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2559 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
d9898ee8 2560 ;;
2561
8d138742 2562dgux*)
b0322a85 2563 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2564 need_lib_prefix=no
2565 need_version=no
2566 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2567 soname_spec='${libname}${release}${shared_ext}$major'
2568 shlibpath_var=LD_LIBRARY_PATH
ac40fd9e 2569 ;;
2570
8d138742
CE
2571freebsd* | dragonfly*)
2572 # DragonFly does not have aout. When/if they implement a new
2573 # versioning mechanism, adjust this.
2574 if test -x /usr/bin/objformat; then
2575 objformat=`/usr/bin/objformat`
2576 else
2577 case $host_os in
b0322a85 2578 freebsd[[23]].*) objformat=aout ;;
8d138742
CE
2579 *) objformat=elf ;;
2580 esac
2581 fi
2582 version_type=freebsd-$objformat
2583 case $version_type in
2584 freebsd-elf*)
2585 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2586 need_version=no
2587 need_lib_prefix=no
2588 ;;
2589 freebsd-*)
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2591 need_version=yes
2592 ;;
2593 esac
2594 shlibpath_var=LD_LIBRARY_PATH
2595 case $host_os in
b0322a85 2596 freebsd2.*)
8d138742 2597 shlibpath_overrides_runpath=yes
d9898ee8 2598 ;;
8d138742
CE
2599 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2600 shlibpath_overrides_runpath=yes
2601 hardcode_into_libs=yes
d9898ee8 2602 ;;
8d138742
CE
2603 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2604 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2605 shlibpath_overrides_runpath=no
2606 hardcode_into_libs=yes
d9898ee8 2607 ;;
8d138742
CE
2608 *) # from 4.6 on, and DragonFly
2609 shlibpath_overrides_runpath=yes
2610 hardcode_into_libs=yes
d9898ee8 2611 ;;
2612 esac
2613 ;;
2614
8d138742 2615gnu*)
b0322a85 2616 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2617 need_lib_prefix=no
2618 need_version=no
2619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2620 soname_spec='${libname}${release}${shared_ext}$major'
2621 shlibpath_var=LD_LIBRARY_PATH
b0322a85
CE
2622 shlibpath_overrides_runpath=no
2623 hardcode_into_libs=yes
2624 ;;
2625
2626haiku*)
2627 version_type=linux # correct to gnu/linux during the next big refactor
2628 need_lib_prefix=no
2629 need_version=no
2630 dynamic_linker="$host_os runtime_loader"
2631 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2632 soname_spec='${libname}${release}${shared_ext}$major'
2633 shlibpath_var=LIBRARY_PATH
2634 shlibpath_overrides_runpath=yes
2635 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
8d138742 2636 hardcode_into_libs=yes
d9898ee8 2637 ;;
d9898ee8 2638
8d138742
CE
2639hpux9* | hpux10* | hpux11*)
2640 # Give a soname corresponding to the major version so that dld.sl refuses to
2641 # link against other versions.
2642 version_type=sunos
2643 need_lib_prefix=no
2644 need_version=no
2645 case $host_cpu in
2646 ia64*)
2647 shrext_cmds='.so'
2648 hardcode_into_libs=yes
2649 dynamic_linker="$host_os dld.so"
2650 shlibpath_var=LD_LIBRARY_PATH
2651 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2653 soname_spec='${libname}${release}${shared_ext}$major'
2654 if test "X$HPUX_IA64_MODE" = X32; then
2655 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2656 else
2657 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2658 fi
2659 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2660 ;;
2661 hppa*64*)
2662 shrext_cmds='.sl'
2663 hardcode_into_libs=yes
2664 dynamic_linker="$host_os dld.sl"
2665 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2666 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2667 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2668 soname_spec='${libname}${release}${shared_ext}$major'
2669 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2670 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2671 ;;
2672 *)
2673 shrext_cmds='.sl'
2674 dynamic_linker="$host_os dld.sl"
2675 shlibpath_var=SHLIB_PATH
2676 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678 soname_spec='${libname}${release}${shared_ext}$major'
2679 ;;
2680 esac
b0322a85 2681 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
8d138742 2682 postinstall_cmds='chmod 555 $lib'
b0322a85
CE
2683 # or fails outright, so override atomically:
2684 install_override_mode=555
d9898ee8 2685 ;;
d9898ee8 2686
8d138742 2687interix[[3-9]]*)
b0322a85 2688 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2689 need_lib_prefix=no
2690 need_version=no
2691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2692 soname_spec='${libname}${release}${shared_ext}$major'
2693 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2694 shlibpath_var=LD_LIBRARY_PATH
2695 shlibpath_overrides_runpath=no
2696 hardcode_into_libs=yes
2697 ;;
d9898ee8 2698
8d138742
CE
2699irix5* | irix6* | nonstopux*)
2700 case $host_os in
2701 nonstopux*) version_type=nonstopux ;;
2702 *)
2703 if test "$lt_cv_prog_gnu_ld" = yes; then
b0322a85 2704 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2705 else
2706 version_type=irix
2707 fi ;;
2708 esac
2709 need_lib_prefix=no
2710 need_version=no
2711 soname_spec='${libname}${release}${shared_ext}$major'
2712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2713 case $host_os in
2714 irix5* | nonstopux*)
2715 libsuff= shlibsuff=
2716 ;;
2717 *)
2718 case $LD in # libtool.m4 will add one of these switches to LD
2719 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2720 libsuff= shlibsuff= libmagic=32-bit;;
2721 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2722 libsuff=32 shlibsuff=N32 libmagic=N32;;
2723 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2724 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2725 *) libsuff= shlibsuff= libmagic=never-match;;
2726 esac
2727 ;;
d9898ee8 2728 esac
8d138742
CE
2729 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2730 shlibpath_overrides_runpath=no
2731 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2732 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2733 hardcode_into_libs=yes
2734 ;;
d9898ee8 2735
8d138742
CE
2736# No shared lib support for Linux oldld, aout, or coff.
2737linux*oldld* | linux*aout* | linux*coff*)
2738 dynamic_linker=no
2739 ;;
d9898ee8 2740
b0322a85
CE
2741# This must be glibc/ELF.
2742linux* | k*bsd*-gnu | kopensolaris*-gnu)
2743 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2744 need_lib_prefix=no
2745 need_version=no
2746 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2747 soname_spec='${libname}${release}${shared_ext}$major'
2748 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2749 shlibpath_var=LD_LIBRARY_PATH
2750 shlibpath_overrides_runpath=no
b0322a85 2751
8d138742 2752 # Some binutils ld are patched to set DT_RUNPATH
b0322a85
CE
2753 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2754 [lt_cv_shlibpath_overrides_runpath=no
2755 save_LDFLAGS=$LDFLAGS
2756 save_libdir=$libdir
2757 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2758 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2759 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2760 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2761 [lt_cv_shlibpath_overrides_runpath=yes])])
2762 LDFLAGS=$save_LDFLAGS
2763 libdir=$save_libdir
2764 ])
2765 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
d9898ee8 2766
8d138742
CE
2767 # This implies no fast_install, which is unacceptable.
2768 # Some rework will be needed to allow for fast_install
2769 # before this can be enabled.
2770 hardcode_into_libs=yes
d9898ee8 2771
8d138742
CE
2772 # Add ABI-specific directories to the system library path.
2773 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
d9898ee8 2774
8d138742
CE
2775 # Append ld.so.conf contents to the search path
2776 if test -f /etc/ld.so.conf; then
b0322a85 2777 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 2778 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
b0322a85 2779
8d138742 2780 fi
d9898ee8 2781
8d138742
CE
2782 # We used to test for /lib/ld.so.1 and disable shared libraries on
2783 # powerpc, because MkLinux only supported shared libraries with the
2784 # GNU dynamic linker. Since this was broken with cross compilers,
2785 # most powerpc-linux boxes support dynamic linking these days and
2786 # people can always --disable-shared, the test was removed, and we
2787 # assume the GNU/Linux dynamic linker is in use.
2788 dynamic_linker='GNU/Linux ld.so'
2789 ;;
d9898ee8 2790
8d138742
CE
2791netbsd*)
2792 version_type=sunos
2793 need_lib_prefix=no
2794 need_version=no
2795 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2796 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2797 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2798 dynamic_linker='NetBSD (a.out) ld.so'
2799 else
2800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2801 soname_spec='${libname}${release}${shared_ext}$major'
2802 dynamic_linker='NetBSD ld.elf_so'
2803 fi
2804 shlibpath_var=LD_LIBRARY_PATH
2805 shlibpath_overrides_runpath=yes
2806 hardcode_into_libs=yes
2807 ;;
d9898ee8 2808
8d138742 2809newsos6)
b0322a85 2810 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2811 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2812 shlibpath_var=LD_LIBRARY_PATH
2813 shlibpath_overrides_runpath=yes
2814 ;;
d9898ee8 2815
8d138742
CE
2816*nto* | *qnx*)
2817 version_type=qnx
2818 need_lib_prefix=no
2819 need_version=no
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 shlibpath_var=LD_LIBRARY_PATH
2823 shlibpath_overrides_runpath=no
2824 hardcode_into_libs=yes
2825 dynamic_linker='ldqnx.so'
2826 ;;
d9898ee8 2827
8d138742
CE
2828openbsd*)
2829 version_type=sunos
2830 sys_lib_dlsearch_path_spec="/usr/lib"
2831 need_lib_prefix=no
2832 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2833 case $host_os in
2834 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2835 *) need_version=no ;;
2836 esac
2837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2838 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2839 shlibpath_var=LD_LIBRARY_PATH
2840 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2841 case $host_os in
2842 openbsd2.[[89]] | openbsd2.[[89]].*)
2843 shlibpath_overrides_runpath=no
2844 ;;
2845 *)
2846 shlibpath_overrides_runpath=yes
2847 ;;
2848 esac
2849 else
2850 shlibpath_overrides_runpath=yes
2851 fi
2852 ;;
d9898ee8 2853
8d138742
CE
2854os2*)
2855 libname_spec='$name'
2856 shrext_cmds=".dll"
2857 need_lib_prefix=no
2858 library_names_spec='$libname${shared_ext} $libname.a'
2859 dynamic_linker='OS/2 ld.exe'
2860 shlibpath_var=LIBPATH
2861 ;;
d9898ee8 2862
8d138742
CE
2863osf3* | osf4* | osf5*)
2864 version_type=osf
2865 need_lib_prefix=no
2866 need_version=no
2867 soname_spec='${libname}${release}${shared_ext}$major'
2868 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2869 shlibpath_var=LD_LIBRARY_PATH
2870 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2871 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2872 ;;
d9898ee8 2873
8d138742
CE
2874rdos*)
2875 dynamic_linker=no
2876 ;;
d9898ee8 2877
8d138742 2878solaris*)
b0322a85 2879 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2880 need_lib_prefix=no
2881 need_version=no
2882 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2883 soname_spec='${libname}${release}${shared_ext}$major'
2884 shlibpath_var=LD_LIBRARY_PATH
2885 shlibpath_overrides_runpath=yes
2886 hardcode_into_libs=yes
2887 # ldd complains unless libraries are executable
2888 postinstall_cmds='chmod +x $lib'
2889 ;;
d9898ee8 2890
8d138742
CE
2891sunos4*)
2892 version_type=sunos
2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2894 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2895 shlibpath_var=LD_LIBRARY_PATH
2896 shlibpath_overrides_runpath=yes
2897 if test "$with_gnu_ld" = yes; then
2898 need_lib_prefix=no
2899 fi
2900 need_version=yes
2901 ;;
d9898ee8 2902
8d138742 2903sysv4 | sysv4.3*)
b0322a85 2904 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2906 soname_spec='${libname}${release}${shared_ext}$major'
2907 shlibpath_var=LD_LIBRARY_PATH
2908 case $host_vendor in
2909 sni)
2910 shlibpath_overrides_runpath=no
2911 need_lib_prefix=no
2912 runpath_var=LD_RUN_PATH
2913 ;;
2914 siemens)
2915 need_lib_prefix=no
2916 ;;
2917 motorola)
2918 need_lib_prefix=no
2919 need_version=no
2920 shlibpath_overrides_runpath=no
2921 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2922 ;;
2923 esac
2924 ;;
d9898ee8 2925
8d138742
CE
2926sysv4*MP*)
2927 if test -d /usr/nec ;then
b0322a85 2928 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2929 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2930 soname_spec='$libname${shared_ext}.$major'
2931 shlibpath_var=LD_LIBRARY_PATH
d9898ee8 2932 fi
2933 ;;
2934
8d138742
CE
2935sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2936 version_type=freebsd-elf
2937 need_lib_prefix=no
2938 need_version=no
2939 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2940 soname_spec='${libname}${release}${shared_ext}$major'
2941 shlibpath_var=LD_LIBRARY_PATH
2942 shlibpath_overrides_runpath=yes
2943 hardcode_into_libs=yes
2944 if test "$with_gnu_ld" = yes; then
2945 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2946 else
2947 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2948 case $host_os in
2949 sco3.2v5*)
2950 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2951 ;;
2952 esac
d9898ee8 2953 fi
8d138742
CE
2954 sys_lib_dlsearch_path_spec='/usr/lib'
2955 ;;
d9898ee8 2956
8d138742
CE
2957tpf*)
2958 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
b0322a85 2959 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2960 need_lib_prefix=no
2961 need_version=no
2962 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2963 shlibpath_var=LD_LIBRARY_PATH
2964 shlibpath_overrides_runpath=no
2965 hardcode_into_libs=yes
2966 ;;
d9898ee8 2967
8d138742 2968uts4*)
b0322a85 2969 version_type=linux # correct to gnu/linux during the next big refactor
8d138742
CE
2970 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2971 soname_spec='${libname}${release}${shared_ext}$major'
2972 shlibpath_var=LD_LIBRARY_PATH
2973 ;;
d9898ee8 2974
8d138742
CE
2975*)
2976 dynamic_linker=no
2977 ;;
2978esac
2979AC_MSG_RESULT([$dynamic_linker])
2980test "$dynamic_linker" = no && can_build_shared=no
d9898ee8 2981
8d138742
CE
2982variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2983if test "$GCC" = yes; then
2984 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2985fi
d9898ee8 2986
8d138742
CE
2987if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2988 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2989fi
2990if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2991 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2992fi
d9898ee8 2993
8d138742
CE
2994_LT_DECL([], [variables_saved_for_relink], [1],
2995 [Variables whose values should be saved in libtool wrapper scripts and
2996 restored at link time])
2997_LT_DECL([], [need_lib_prefix], [0],
2998 [Do we need the "lib" prefix for modules?])
2999_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3000_LT_DECL([], [version_type], [0], [Library versioning type])
3001_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3002_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3003_LT_DECL([], [shlibpath_overrides_runpath], [0],
3004 [Is shlibpath searched before the hard-coded library search path?])
3005_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3006_LT_DECL([], [library_names_spec], [1],
3007 [[List of archive names. First name is the real one, the rest are links.
3008 The last name is the one that the linker finds with -lNAME]])
3009_LT_DECL([], [soname_spec], [1],
3010 [[The coded name of the library, if different from the real name]])
b0322a85
CE
3011_LT_DECL([], [install_override_mode], [1],
3012 [Permission mode override for installation of shared libraries])
8d138742
CE
3013_LT_DECL([], [postinstall_cmds], [2],
3014 [Command to use after installation of a shared archive])
3015_LT_DECL([], [postuninstall_cmds], [2],
3016 [Command to use after uninstallation of a shared archive])
3017_LT_DECL([], [finish_cmds], [2],
3018 [Commands used to finish a libtool library installation in a directory])
3019_LT_DECL([], [finish_eval], [1],
3020 [[As "finish_cmds", except a single script fragment to be evaled but
3021 not shown]])
3022_LT_DECL([], [hardcode_into_libs], [0],
3023 [Whether we should hardcode library paths into libraries])
3024_LT_DECL([], [sys_lib_search_path_spec], [2],
3025 [Compile-time system search path for libraries])
3026_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3027 [Run-time system search path for libraries])
3028])# _LT_SYS_DYNAMIC_LINKER
3029
3030
3031# _LT_PATH_TOOL_PREFIX(TOOL)
3032# --------------------------
3033# find a file program which can recognize shared library
3034AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3035[m4_require([_LT_DECL_EGREP])dnl
3036AC_MSG_CHECKING([for $1])
3037AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3038[case $MAGIC_CMD in
3039[[\\/*] | ?:[\\/]*])
3040 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3041 ;;
3042*)
3043 lt_save_MAGIC_CMD="$MAGIC_CMD"
3044 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3045dnl $ac_dummy forces splitting on constant user-supplied paths.
3046dnl POSIX.2 word splitting is done only on the output of word expansions,
3047dnl not every word. This closes a longstanding sh security hole.
3048 ac_dummy="m4_if([$2], , $PATH, [$2])"
3049 for ac_dir in $ac_dummy; do
3050 IFS="$lt_save_ifs"
3051 test -z "$ac_dir" && ac_dir=.
3052 if test -f $ac_dir/$1; then
3053 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3054 if test -n "$file_magic_test_file"; then
3055 case $deplibs_check_method in
3056 "file_magic "*)
3057 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3058 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3059 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3060 $EGREP "$file_magic_regex" > /dev/null; then
3061 :
3062 else
3063 cat <<_LT_EOF 1>&2
d9898ee8 3064
8d138742
CE
3065*** Warning: the command libtool uses to detect shared libraries,
3066*** $file_magic_cmd, produces output that libtool cannot recognize.
3067*** The result is that libtool may fail to recognize shared libraries
3068*** as such. This will affect the creation of libtool libraries that
3069*** depend on shared libraries, but programs linked with such libtool
3070*** libraries will work regardless of this problem. Nevertheless, you
3071*** may want to report the problem to your system manager and/or to
3072*** bug-libtool@gnu.org
d9898ee8 3073
8d138742
CE
3074_LT_EOF
3075 fi ;;
3076 esac
3077 fi
3078 break
3079 fi
3080 done
3081 IFS="$lt_save_ifs"
3082 MAGIC_CMD="$lt_save_MAGIC_CMD"
3083 ;;
3084esac])
3085MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3086if test -n "$MAGIC_CMD"; then
3087 AC_MSG_RESULT($MAGIC_CMD)
d9898ee8 3088else
8d138742 3089 AC_MSG_RESULT(no)
d9898ee8 3090fi
8d138742
CE
3091_LT_DECL([], [MAGIC_CMD], [0],
3092 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3093])# _LT_PATH_TOOL_PREFIX
d9898ee8 3094
8d138742
CE
3095# Old name:
3096AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3097dnl aclocal-1.4 backwards compatibility:
3098dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
d9898ee8 3099
d9898ee8 3100
8d138742
CE
3101# _LT_PATH_MAGIC
3102# --------------
3103# find a file program which can recognize a shared library
3104m4_defun([_LT_PATH_MAGIC],
3105[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3106if test -z "$lt_cv_path_MAGIC_CMD"; then
3107 if test -n "$ac_tool_prefix"; then
3108 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3109 else
3110 MAGIC_CMD=:
3111 fi
3112fi
3113])# _LT_PATH_MAGIC
d9898ee8 3114
d9898ee8 3115
8d138742
CE
3116# LT_PATH_LD
3117# ----------
3118# find the pathname to the GNU or non-GNU linker
3119AC_DEFUN([LT_PATH_LD],
3120[AC_REQUIRE([AC_PROG_CC])dnl
3121AC_REQUIRE([AC_CANONICAL_HOST])dnl
3122AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3123m4_require([_LT_DECL_SED])dnl
3124m4_require([_LT_DECL_EGREP])dnl
b0322a85 3125m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
d9898ee8 3126
8d138742
CE
3127AC_ARG_WITH([gnu-ld],
3128 [AS_HELP_STRING([--with-gnu-ld],
3129 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3130 [test "$withval" = no || with_gnu_ld=yes],
3131 [with_gnu_ld=no])dnl
d9898ee8 3132
8d138742
CE
3133ac_prog=ld
3134if test "$GCC" = yes; then
3135 # Check if gcc -print-prog-name=ld gives a path.
3136 AC_MSG_CHECKING([for ld used by $CC])
3137 case $host in
3138 *-*-mingw*)
3139 # gcc leaves a trailing carriage return which upsets mingw
3140 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3141 *)
3142 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3143 esac
3144 case $ac_prog in
3145 # Accept absolute paths.
3146 [[\\/]]* | ?:[[\\/]]*)
3147 re_direlt='/[[^/]][[^/]]*/\.\./'
3148 # Canonicalize the pathname of ld
3149 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3150 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3151 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3152 done
3153 test -z "$LD" && LD="$ac_prog"
3154 ;;
3155 "")
3156 # If it fails, then pretend we aren't using GCC.
3157 ac_prog=ld
3158 ;;
3159 *)
3160 # If it is relative, then search for the first ld in PATH.
3161 with_gnu_ld=unknown
3162 ;;
3163 esac
3164elif test "$with_gnu_ld" = yes; then
3165 AC_MSG_CHECKING([for GNU ld])
d9898ee8 3166else
8d138742 3167 AC_MSG_CHECKING([for non-GNU ld])
d9898ee8 3168fi
8d138742
CE
3169AC_CACHE_VAL(lt_cv_path_LD,
3170[if test -z "$LD"; then
3171 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3172 for ac_dir in $PATH; do
3173 IFS="$lt_save_ifs"
3174 test -z "$ac_dir" && ac_dir=.
3175 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3176 lt_cv_path_LD="$ac_dir/$ac_prog"
3177 # Check to see if the program is GNU ld. I'd rather use --version,
3178 # but apparently some variants of GNU ld only accept -v.
3179 # Break only if it was the GNU/non-GNU ld that we prefer.
3180 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3181 *GNU* | *'with BFD'*)
3182 test "$with_gnu_ld" != no && break
3183 ;;
3184 *)
3185 test "$with_gnu_ld" != yes && break
d9898ee8 3186 ;;
3187 esac
d9898ee8 3188 fi
8d138742
CE
3189 done
3190 IFS="$lt_save_ifs"
3191else
3192 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3193fi])
3194LD="$lt_cv_path_LD"
3195if test -n "$LD"; then
3196 AC_MSG_RESULT($LD)
3197else
3198 AC_MSG_RESULT(no)
3199fi
3200test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3201_LT_PATH_LD_GNU
3202AC_SUBST([LD])
d9898ee8 3203
8d138742
CE
3204_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3205])# LT_PATH_LD
d9898ee8 3206
8d138742
CE
3207# Old names:
3208AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3209AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3210dnl aclocal-1.4 backwards compatibility:
3211dnl AC_DEFUN([AM_PROG_LD], [])
3212dnl AC_DEFUN([AC_PROG_LD], [])
d9898ee8 3213
d9898ee8 3214
8d138742
CE
3215# _LT_PATH_LD_GNU
3216#- --------------
3217m4_defun([_LT_PATH_LD_GNU],
3218[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3219[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3220case `$LD -v 2>&1 </dev/null` in
3221*GNU* | *'with BFD'*)
3222 lt_cv_prog_gnu_ld=yes
3223 ;;
3224*)
3225 lt_cv_prog_gnu_ld=no
3226 ;;
3227esac])
3228with_gnu_ld=$lt_cv_prog_gnu_ld
3229])# _LT_PATH_LD_GNU
d9898ee8 3230
8d138742
CE
3231
3232# _LT_CMD_RELOAD
3233# --------------
3234# find reload flag for linker
3235# -- PORTME Some linkers may need a different reload flag.
3236m4_defun([_LT_CMD_RELOAD],
3237[AC_CACHE_CHECK([for $LD option to reload object files],
3238 lt_cv_ld_reload_flag,
3239 [lt_cv_ld_reload_flag='-r'])
3240reload_flag=$lt_cv_ld_reload_flag
3241case $reload_flag in
3242"" | " "*) ;;
3243*) reload_flag=" $reload_flag" ;;
3244esac
3245reload_cmds='$LD$reload_flag -o $output$reload_objs'
3246case $host_os in
b0322a85
CE
3247 cygwin* | mingw* | pw32* | cegcc*)
3248 if test "$GCC" != yes; then
3249 reload_cmds=false
3250 fi
3251 ;;
8d138742
CE
3252 darwin*)
3253 if test "$GCC" = yes; then
3254 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
d9898ee8 3255 else
8d138742 3256 reload_cmds='$LD$reload_flag -o $output$reload_objs'
d9898ee8 3257 fi
3258 ;;
8d138742 3259esac
b0322a85
CE
3260_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3261_LT_TAGDECL([], [reload_cmds], [2])dnl
8d138742 3262])# _LT_CMD_RELOAD
d9898ee8 3263
d9898ee8 3264
8d138742
CE
3265# _LT_CHECK_MAGIC_METHOD
3266# ----------------------
3267# how to check for library dependencies
3268# -- PORTME fill in with the dynamic library characteristics
3269m4_defun([_LT_CHECK_MAGIC_METHOD],
3270[m4_require([_LT_DECL_EGREP])
3271m4_require([_LT_DECL_OBJDUMP])
3272AC_CACHE_CHECK([how to recognize dependent libraries],
3273lt_cv_deplibs_check_method,
3274[lt_cv_file_magic_cmd='$MAGIC_CMD'
3275lt_cv_file_magic_test_file=
3276lt_cv_deplibs_check_method='unknown'
3277# Need to set the preceding variable on all platforms that support
3278# interlibrary dependencies.
3279# 'none' -- dependencies not supported.
3280# `unknown' -- same as none, but documents that we really don't know.
3281# 'pass_all' -- all dependencies passed with no checks.
3282# 'test_compile' -- check by making test program.
3283# 'file_magic [[regex]]' -- check by looking for files in library path
3284# which responds to the $file_magic_cmd with a given extended regex.
3285# If you have `file' or equivalent on your system and you're not sure
3286# whether `pass_all' will *always* work, you probably want this one.
3287
3288case $host_os in
3289aix[[4-9]]*)
3290 lt_cv_deplibs_check_method=pass_all
d9898ee8 3291 ;;
d9898ee8 3292
8d138742
CE
3293beos*)
3294 lt_cv_deplibs_check_method=pass_all
3295 ;;
3296
3297bsdi[[45]]*)
3298 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3299 lt_cv_file_magic_cmd='/usr/bin/file -L'
3300 lt_cv_file_magic_test_file=/shlib/libc.so
3301 ;;
3302
3303cygwin*)
3304 # func_win32_libid is a shell function defined in ltmain.sh
3305 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3306 lt_cv_file_magic_cmd='func_win32_libid'
3307 ;;
3308
3309mingw* | pw32*)
3310 # Base MSYS/MinGW do not provide the 'file' command needed by
3311 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3312 # unless we find 'file', for example because we are cross-compiling.
b0322a85
CE
3313 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3314 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
8d138742
CE
3315 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3316 lt_cv_file_magic_cmd='func_win32_libid'
3317 else
b0322a85
CE
3318 # Keep this pattern in sync with the one in func_win32_libid.
3319 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8d138742
CE
3320 lt_cv_file_magic_cmd='$OBJDUMP -f'
3321 fi
3322 ;;
3323
b0322a85 3324cegcc*)
8d138742
CE
3325 # use the weaker test based on 'objdump'. See mingw*.
3326 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3327 lt_cv_file_magic_cmd='$OBJDUMP -f'
3328 ;;
3329
3330darwin* | rhapsody*)
3331 lt_cv_deplibs_check_method=pass_all
3332 ;;
3333
3334freebsd* | dragonfly*)
3335 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3336 case $host_cpu in
3337 i*86 )
3338 # Not sure whether the presence of OpenBSD here was a mistake.
3339 # Let's accept both of them until this is cleared up.
3340 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3341 lt_cv_file_magic_cmd=/usr/bin/file
3342 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3343 ;;
d9898ee8 3344 esac
8d138742
CE
3345 else
3346 lt_cv_deplibs_check_method=pass_all
3347 fi
3348 ;;
3349
3350gnu*)
3351 lt_cv_deplibs_check_method=pass_all
3352 ;;
3353
b0322a85
CE
3354haiku*)
3355 lt_cv_deplibs_check_method=pass_all
3356 ;;
3357
8d138742
CE
3358hpux10.20* | hpux11*)
3359 lt_cv_file_magic_cmd=/usr/bin/file
3360 case $host_cpu in
3361 ia64*)
3362 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3363 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
d9898ee8 3364 ;;
8d138742 3365 hppa*64*)
b0322a85 3366 [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 3367 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
d9898ee8 3368 ;;
8d138742 3369 *)
b0322a85 3370 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
8d138742 3371 lt_cv_file_magic_test_file=/usr/lib/libc.sl
d9898ee8 3372 ;;
8d138742
CE
3373 esac
3374 ;;
d9898ee8 3375
8d138742
CE
3376interix[[3-9]]*)
3377 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3378 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3379 ;;
d9898ee8 3380
8d138742
CE
3381irix5* | irix6* | nonstopux*)
3382 case $LD in
3383 *-32|*"-32 ") libmagic=32-bit;;
3384 *-n32|*"-n32 ") libmagic=N32;;
3385 *-64|*"-64 ") libmagic=64-bit;;
3386 *) libmagic=never-match;;
3387 esac
3388 lt_cv_deplibs_check_method=pass_all
3389 ;;
d9898ee8 3390
b0322a85
CE
3391# This must be glibc/ELF.
3392linux* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
3393 lt_cv_deplibs_check_method=pass_all
3394 ;;
d9898ee8 3395
8d138742
CE
3396netbsd*)
3397 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3398 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3399 else
3400 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3401 fi
3402 ;;
d9898ee8 3403
8d138742
CE
3404newos6*)
3405 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3406 lt_cv_file_magic_cmd=/usr/bin/file
3407 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3408 ;;
d9898ee8 3409
8d138742
CE
3410*nto* | *qnx*)
3411 lt_cv_deplibs_check_method=pass_all
3412 ;;
d9898ee8 3413
8d138742
CE
3414openbsd*)
3415 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3416 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3417 else
3418 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3419 fi
3420 ;;
d9898ee8 3421
8d138742
CE
3422osf3* | osf4* | osf5*)
3423 lt_cv_deplibs_check_method=pass_all
3424 ;;
d9898ee8 3425
8d138742
CE
3426rdos*)
3427 lt_cv_deplibs_check_method=pass_all
3428 ;;
d9898ee8 3429
8d138742
CE
3430solaris*)
3431 lt_cv_deplibs_check_method=pass_all
3432 ;;
d9898ee8 3433
8d138742
CE
3434sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3435 lt_cv_deplibs_check_method=pass_all
3436 ;;
d9898ee8 3437
8d138742
CE
3438sysv4 | sysv4.3*)
3439 case $host_vendor in
3440 motorola)
3441 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]]'
3442 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
d9898ee8 3443 ;;
8d138742
CE
3444 ncr)
3445 lt_cv_deplibs_check_method=pass_all
d9898ee8 3446 ;;
8d138742
CE
3447 sequent)
3448 lt_cv_file_magic_cmd='/bin/file'
3449 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
d9898ee8 3450 ;;
8d138742
CE
3451 sni)
3452 lt_cv_file_magic_cmd='/bin/file'
3453 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3454 lt_cv_file_magic_test_file=/lib/libc.so
d9898ee8 3455 ;;
8d138742
CE
3456 siemens)
3457 lt_cv_deplibs_check_method=pass_all
d9898ee8 3458 ;;
8d138742
CE
3459 pc)
3460 lt_cv_deplibs_check_method=pass_all
d9898ee8 3461 ;;
8d138742
CE
3462 esac
3463 ;;
d9898ee8 3464
8d138742
CE
3465tpf*)
3466 lt_cv_deplibs_check_method=pass_all
3467 ;;
3468esac
3469])
b0322a85
CE
3470
3471file_magic_glob=
3472want_nocaseglob=no
3473if test "$build" = "$host"; then
3474 case $host_os in
3475 mingw* | pw32*)
3476 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3477 want_nocaseglob=yes
3478 else
3479 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3480 fi
3481 ;;
3482 esac
3483fi
3484
8d138742
CE
3485file_magic_cmd=$lt_cv_file_magic_cmd
3486deplibs_check_method=$lt_cv_deplibs_check_method
3487test -z "$deplibs_check_method" && deplibs_check_method=unknown
d9898ee8 3488
8d138742
CE
3489_LT_DECL([], [deplibs_check_method], [1],
3490 [Method to check whether dependent libraries are shared objects])
3491_LT_DECL([], [file_magic_cmd], [1],
b0322a85
CE
3492 [Command to use when deplibs_check_method = "file_magic"])
3493_LT_DECL([], [file_magic_glob], [1],
3494 [How to find potential files when deplibs_check_method = "file_magic"])
3495_LT_DECL([], [want_nocaseglob], [1],
3496 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
8d138742 3497])# _LT_CHECK_MAGIC_METHOD
d9898ee8 3498
d9898ee8 3499
8d138742
CE
3500# LT_PATH_NM
3501# ----------
3502# find the pathname to a BSD- or MS-compatible name lister
3503AC_DEFUN([LT_PATH_NM],
3504[AC_REQUIRE([AC_PROG_CC])dnl
3505AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3506[if test -n "$NM"; then
3507 # Let the user override the test.
3508 lt_cv_path_NM="$NM"
3509else
3510 lt_nm_to_check="${ac_tool_prefix}nm"
3511 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3512 lt_nm_to_check="$lt_nm_to_check nm"
3513 fi
3514 for lt_tmp_nm in $lt_nm_to_check; do
3515 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3516 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3517 IFS="$lt_save_ifs"
3518 test -z "$ac_dir" && ac_dir=.
3519 tmp_nm="$ac_dir/$lt_tmp_nm"
3520 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3521 # Check to see if the nm accepts a BSD-compat flag.
3522 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3523 # nm: unknown option "B" ignored
3524 # Tru64's nm complains that /dev/null is an invalid object file
3525 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3526 */dev/null* | *'Invalid file or object type'*)
3527 lt_cv_path_NM="$tmp_nm -B"
3528 break
3529 ;;
3530 *)
3531 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3532 */dev/null*)
3533 lt_cv_path_NM="$tmp_nm -p"
3534 break
3535 ;;
3536 *)
3537 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3538 continue # so that we can try to find one that supports BSD flags
3539 ;;
3540 esac
3541 ;;
3542 esac
3543 fi
3544 done
3545 IFS="$lt_save_ifs"
d9898ee8 3546 done
8d138742
CE
3547 : ${lt_cv_path_NM=no}
3548fi])
3549if test "$lt_cv_path_NM" != "no"; then
3550 NM="$lt_cv_path_NM"
d9898ee8 3551else
8d138742 3552 # Didn't find any BSD compatible name lister, look for dumpbin.
b0322a85
CE
3553 if test -n "$DUMPBIN"; then :
3554 # Let the user override the test.
3555 else
3556 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3557 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3558 *COFF*)
3559 DUMPBIN="$DUMPBIN -symbols"
3560 ;;
3561 *)
3562 DUMPBIN=:
3563 ;;
3564 esac
3565 fi
8d138742
CE
3566 AC_SUBST([DUMPBIN])
3567 if test "$DUMPBIN" != ":"; then
3568 NM="$DUMPBIN"
3569 fi
d9898ee8 3570fi
8d138742
CE
3571test -z "$NM" && NM=nm
3572AC_SUBST([NM])
3573_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3574
3575AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3576 [lt_cv_nm_interface="BSD nm"
3577 echo "int some_variable = 0;" > conftest.$ac_ext
b0322a85 3578 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
3579 (eval "$ac_compile" 2>conftest.err)
3580 cat conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 3581 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
3582 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3583 cat conftest.err >&AS_MESSAGE_LOG_FD
b0322a85 3584 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
8d138742
CE
3585 cat conftest.out >&AS_MESSAGE_LOG_FD
3586 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3587 lt_cv_nm_interface="MS dumpbin"
3588 fi
3589 rm -f conftest*])
3590])# LT_PATH_NM
d9898ee8 3591
8d138742
CE
3592# Old names:
3593AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3594AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3595dnl aclocal-1.4 backwards compatibility:
3596dnl AC_DEFUN([AM_PROG_NM], [])
3597dnl AC_DEFUN([AC_PROG_NM], [])
d9898ee8 3598
b0322a85
CE
3599# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3600# --------------------------------
3601# how to determine the name of the shared library
3602# associated with a specific link library.
3603# -- PORTME fill in with the dynamic library characteristics
3604m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3605[m4_require([_LT_DECL_EGREP])
3606m4_require([_LT_DECL_OBJDUMP])
3607m4_require([_LT_DECL_DLLTOOL])
3608AC_CACHE_CHECK([how to associate runtime and link libraries],
3609lt_cv_sharedlib_from_linklib_cmd,
3610[lt_cv_sharedlib_from_linklib_cmd='unknown'
3611
3612case $host_os in
3613cygwin* | mingw* | pw32* | cegcc*)
3614 # two different shell functions defined in ltmain.sh
3615 # decide which to use based on capabilities of $DLLTOOL
3616 case `$DLLTOOL --help 2>&1` in
3617 *--identify-strict*)
3618 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3619 ;;
3620 *)
3621 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3622 ;;
3623 esac
3624 ;;
3625*)
3626 # fallback: assume linklib IS sharedlib
3627 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3628 ;;
3629esac
3630])
3631sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3632test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3633
3634_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3635 [Command to associate shared and link libraries])
3636])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3637
3638
3639# _LT_PATH_MANIFEST_TOOL
3640# ----------------------
3641# locate the manifest tool
3642m4_defun([_LT_PATH_MANIFEST_TOOL],
3643[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3644test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3645AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3646 [lt_cv_path_mainfest_tool=no
3647 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3648 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3649 cat conftest.err >&AS_MESSAGE_LOG_FD
3650 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3651 lt_cv_path_mainfest_tool=yes
3652 fi
3653 rm -f conftest*])
3654if test "x$lt_cv_path_mainfest_tool" != xyes; then
3655 MANIFEST_TOOL=:
3656fi
3657_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3658])# _LT_PATH_MANIFEST_TOOL
3659
3660
8d138742
CE
3661# LT_LIB_M
3662# --------
3663# check for math library
3664AC_DEFUN([LT_LIB_M],
3665[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3666LIBM=
3667case $host in
b0322a85 3668*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
8d138742 3669 # These system don't have libm, or don't need it
ac40fd9e 3670 ;;
8d138742
CE
3671*-ncr-sysv4.3*)
3672 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3673 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3674 ;;
3675*)
3676 AC_CHECK_LIB(m, cos, LIBM="-lm")
d9898ee8 3677 ;;
3678esac
8d138742
CE
3679AC_SUBST([LIBM])
3680])# LT_LIB_M
d9898ee8 3681
8d138742
CE
3682# Old name:
3683AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3684dnl aclocal-1.4 backwards compatibility:
3685dnl AC_DEFUN([AC_CHECK_LIBM], [])
d9898ee8 3686
d9898ee8 3687
8d138742
CE
3688# _LT_COMPILER_NO_RTTI([TAGNAME])
3689# -------------------------------
3690m4_defun([_LT_COMPILER_NO_RTTI],
3691[m4_require([_LT_TAG_COMPILER])dnl
d9898ee8 3692
8d138742 3693_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
d9898ee8 3694
8d138742 3695if test "$GCC" = yes; then
b0322a85
CE
3696 case $cc_basename in
3697 nvcc*)
3698 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3699 *)
3700 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3701 esac
d9898ee8 3702
8d138742
CE
3703 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3704 lt_cv_prog_compiler_rtti_exceptions,
3705 [-fno-rtti -fno-exceptions], [],
3706 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3707fi
3708_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3709 [Compiler flag to turn off builtin functions])
3710])# _LT_COMPILER_NO_RTTI
d9898ee8 3711
d9898ee8 3712
8d138742
CE
3713# _LT_CMD_GLOBAL_SYMBOLS
3714# ----------------------
3715m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3716[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3717AC_REQUIRE([AC_PROG_CC])dnl
b0322a85 3718AC_REQUIRE([AC_PROG_AWK])dnl
8d138742
CE
3719AC_REQUIRE([LT_PATH_NM])dnl
3720AC_REQUIRE([LT_PATH_LD])dnl
3721m4_require([_LT_DECL_SED])dnl
3722m4_require([_LT_DECL_EGREP])dnl
3723m4_require([_LT_TAG_COMPILER])dnl
d9898ee8 3724
8d138742
CE
3725# Check for command to grab the raw symbol name followed by C symbol from nm.
3726AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3727AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3728[
3729# These are sane defaults that work on at least a few old systems.
3730# [They come from Ultrix. What could be older than Ultrix?!! ;)]
d9898ee8 3731
8d138742
CE
3732# Character class describing NM global symbol codes.
3733symcode='[[BCDEGRST]]'
d9898ee8 3734
8d138742
CE
3735# Regexp to match symbols that can be accessed directly from C.
3736sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
d9898ee8 3737
8d138742 3738# Define system-specific variables.
d9898ee8 3739case $host_os in
8d138742
CE
3740aix*)
3741 symcode='[[BCDT]]'
d9898ee8 3742 ;;
8d138742
CE
3743cygwin* | mingw* | pw32* | cegcc*)
3744 symcode='[[ABCDGISTW]]'
3745 ;;
3746hpux*)
3747 if test "$host_cpu" = ia64; then
3748 symcode='[[ABCDEGRST]]'
d9898ee8 3749 fi
3750 ;;
8d138742
CE
3751irix* | nonstopux*)
3752 symcode='[[BCDEGRST]]'
3753 ;;
3754osf*)
3755 symcode='[[BCDEGQRST]]'
3756 ;;
3757solaris*)
3758 symcode='[[BDRT]]'
3759 ;;
3760sco3.2v5*)
3761 symcode='[[DT]]'
3762 ;;
3763sysv4.2uw2*)
3764 symcode='[[DT]]'
3765 ;;
3766sysv5* | sco5v6* | unixware* | OpenUNIX*)
3767 symcode='[[ABDT]]'
3768 ;;
3769sysv4)
3770 symcode='[[DFNSTU]]'
3771 ;;
3772esac
d9898ee8 3773
8d138742
CE
3774# If we're using GNU nm, then use its standard symbol codes.
3775case `$NM -V 2>&1` in
3776*GNU* | *'with BFD'*)
3777 symcode='[[ABCDGIRSTW]]' ;;
3778esac
d9898ee8 3779
8d138742
CE
3780# Transform an extracted symbol line into a proper C declaration.
3781# Some systems (esp. on ia64) link data and code symbols differently,
3782# so use this general approach.
3783lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
d9898ee8 3784
8d138742 3785# Transform an extracted symbol line into symbol name and symbol address
b0322a85
CE
3786lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3787lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
d9898ee8 3788
8d138742
CE
3789# Handle CRLF in mingw tool chain
3790opt_cr=
3791case $build_os in
3792mingw*)
3793 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3794 ;;
3795esac
d9898ee8 3796
8d138742
CE
3797# Try without a prefix underscore, then with it.
3798for ac_symprfx in "" "_"; do
d9898ee8 3799
8d138742
CE
3800 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3801 symxfrm="\\1 $ac_symprfx\\2 \\2"
d9898ee8 3802
8d138742
CE
3803 # Write the raw and C identifiers.
3804 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3805 # Fake it for dumpbin and say T for any non-static function
3806 # and D for any global variable.
3807 # Also find C++ and __fastcall symbols from MSVC++,
3808 # which start with @ or ?.
3809 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3810" {last_section=section; section=\$ 3};"\
b0322a85 3811" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8d138742
CE
3812" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3813" \$ 0!~/External *\|/{next};"\
3814" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3815" {if(hide[section]) next};"\
3816" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3817" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3818" s[1]~/^[@?]/{print s[1], s[1]; next};"\
3819" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3820" ' prfx=^$ac_symprfx]"
3821 else
3822 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3823 fi
b0322a85 3824 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
d9898ee8 3825
8d138742
CE
3826 # Check to see that the pipe works correctly.
3827 pipe_works=no
d9898ee8 3828
8d138742
CE
3829 rm -f conftest*
3830 cat > conftest.$ac_ext <<_LT_EOF
3831#ifdef __cplusplus
3832extern "C" {
3833#endif
3834char nm_test_var;
3835void nm_test_func(void);
3836void nm_test_func(void){}
3837#ifdef __cplusplus
3838}
3839#endif
3840int main(){nm_test_var='a';nm_test_func();return(0);}
3841_LT_EOF
d9898ee8 3842
8d138742
CE
3843 if AC_TRY_EVAL(ac_compile); then
3844 # Now try to grab the symbols.
3845 nlist=conftest.nm
b0322a85 3846 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
8d138742
CE
3847 # Try sorting and uniquifying the output.
3848 if sort "$nlist" | uniq > "$nlist"T; then
3849 mv -f "$nlist"T "$nlist"
3850 else
3851 rm -f "$nlist"T
3852 fi
d9898ee8 3853
8d138742
CE
3854 # Make sure that we snagged all the symbols we need.
3855 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3856 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3857 cat <<_LT_EOF > conftest.$ac_ext
b0322a85
CE
3858/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3859#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3860/* DATA imports from DLLs on WIN32 con't be const, because runtime
3861 relocations are performed -- see ld's documentation on pseudo-relocs. */
3862# define LT@&t@_DLSYM_CONST
3863#elif defined(__osf__)
3864/* This system does not cope well with relocations in const data. */
3865# define LT@&t@_DLSYM_CONST
3866#else
3867# define LT@&t@_DLSYM_CONST const
3868#endif
3869
8d138742
CE
3870#ifdef __cplusplus
3871extern "C" {
3872#endif
d9898ee8 3873
8d138742
CE
3874_LT_EOF
3875 # Now generate the symbol file.
3876 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
d9898ee8 3877
8d138742 3878 cat <<_LT_EOF >> conftest.$ac_ext
d9898ee8 3879
8d138742 3880/* The mapping between symbol names and symbols. */
b0322a85 3881LT@&t@_DLSYM_CONST struct {
8d138742
CE
3882 const char *name;
3883 void *address;
3884}
3885lt__PROGRAM__LTX_preloaded_symbols[[]] =
3886{
3887 { "@PROGRAM@", (void *) 0 },
3888_LT_EOF
3889 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3890 cat <<\_LT_EOF >> conftest.$ac_ext
3891 {0, (void *) 0}
3892};
d9898ee8 3893
8d138742
CE
3894/* This works around a problem in FreeBSD linker */
3895#ifdef FREEBSD_WORKAROUND
3896static const void *lt_preloaded_setup() {
3897 return lt__PROGRAM__LTX_preloaded_symbols;
3898}
3899#endif
d9898ee8 3900
8d138742
CE
3901#ifdef __cplusplus
3902}
3903#endif
3904_LT_EOF
3905 # Now try linking the two files.
3906 mv conftest.$ac_objext conftstm.$ac_objext
b0322a85
CE
3907 lt_globsym_save_LIBS=$LIBS
3908 lt_globsym_save_CFLAGS=$CFLAGS
8d138742
CE
3909 LIBS="conftstm.$ac_objext"
3910 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3911 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3912 pipe_works=yes
3913 fi
b0322a85
CE
3914 LIBS=$lt_globsym_save_LIBS
3915 CFLAGS=$lt_globsym_save_CFLAGS
8d138742
CE
3916 else
3917 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3918 fi
3919 else
3920 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3921 fi
3922 else
3923 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3924 fi
3925 else
3926 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3927 cat conftest.$ac_ext >&5
3928 fi
3929 rm -rf conftest* conftst*
d9898ee8 3930
8d138742
CE
3931 # Do not use the global_symbol_pipe unless it works.
3932 if test "$pipe_works" = yes; then
3933 break
3934 else
3935 lt_cv_sys_global_symbol_pipe=
3936 fi
3937done
3938])
3939if test -z "$lt_cv_sys_global_symbol_pipe"; then
3940 lt_cv_sys_global_symbol_to_cdecl=
3941fi
3942if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3943 AC_MSG_RESULT(failed)
3944else
3945 AC_MSG_RESULT(ok)
3946fi
d9898ee8 3947
b0322a85
CE
3948# Response file support.
3949if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3950 nm_file_list_spec='@'
3951elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3952 nm_file_list_spec='@'
3953fi
3954
8d138742
CE
3955_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3956 [Take the output of nm and produce a listing of raw symbols and C names])
3957_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3958 [Transform the output of nm in a proper C declaration])
3959_LT_DECL([global_symbol_to_c_name_address],
3960 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3961 [Transform the output of nm in a C name address pair])
3962_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3963 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3964 [Transform the output of nm in a C name address pair when lib prefix is needed])
b0322a85
CE
3965_LT_DECL([], [nm_file_list_spec], [1],
3966 [Specify filename containing input files for $NM])
8d138742 3967]) # _LT_CMD_GLOBAL_SYMBOLS
d9898ee8 3968
d9898ee8 3969
8d138742
CE
3970# _LT_COMPILER_PIC([TAGNAME])
3971# ---------------------------
3972m4_defun([_LT_COMPILER_PIC],
3973[m4_require([_LT_TAG_COMPILER])dnl
3974_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3975_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3976_LT_TAGVAR(lt_prog_compiler_static, $1)=
d9898ee8 3977
8d138742
CE
3978m4_if([$1], [CXX], [
3979 # C++ specific cases for pic, static, wl, etc.
3980 if test "$GXX" = yes; then
3981 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3982 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
d9898ee8 3983
8d138742
CE
3984 case $host_os in
3985 aix*)
3986 # All AIX code is PIC.
3987 if test "$host_cpu" = ia64; then
3988 # AIX 5 now supports IA64 processor
3989 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3990 fi
3991 ;;
d9898ee8 3992
8d138742
CE
3993 amigaos*)
3994 case $host_cpu in
3995 powerpc)
3996 # see comment about AmigaOS4 .so support
3997 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3998 ;;
3999 m68k)
4000 # FIXME: we need at least 68020 code to build shared libraries, but
4001 # adding the `-m68020' flag to GCC prevents building anything better,
4002 # like `-m68040'.
4003 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4004 ;;
4005 esac
4006 ;;
d9898ee8 4007
8d138742
CE
4008 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4009 # PIC is the default for these OSes.
4010 ;;
4011 mingw* | cygwin* | os2* | pw32* | cegcc*)
4012 # This hack is so that the source file can tell whether it is being
4013 # built for inclusion in a dll (and should export symbols for example).
4014 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4015 # (--disable-auto-import) libraries
4016 m4_if([$1], [GCJ], [],
4017 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4018 ;;
4019 darwin* | rhapsody*)
4020 # PIC is the default on this platform
4021 # Common symbols not allowed in MH_DYLIB files
4022 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4023 ;;
4024 *djgpp*)
4025 # DJGPP does not support shared libraries at all
4026 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4027 ;;
b0322a85
CE
4028 haiku*)
4029 # PIC is the default for Haiku.
4030 # The "-static" flag exists, but is broken.
4031 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4032 ;;
8d138742
CE
4033 interix[[3-9]]*)
4034 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4035 # Instead, we relocate shared libraries at runtime.
4036 ;;
4037 sysv4*MP*)
4038 if test -d /usr/nec; then
4039 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4040 fi
4041 ;;
4042 hpux*)
4043 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4044 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4045 # sets the default TLS model and affects inlining.
4046 case $host_cpu in
4047 hppa*64*)
4048 ;;
4049 *)
4050 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4051 ;;
4052 esac
4053 ;;
4054 *qnx* | *nto*)
4055 # QNX uses GNU C++, but need to define -shared option too, otherwise
4056 # it will coredump.
4057 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
d9898ee8 4058 ;;
4059 *)
8d138742 4060 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
d9898ee8 4061 ;;
4062 esac
8d138742
CE
4063 else
4064 case $host_os in
4065 aix[[4-9]]*)
4066 # All AIX code is PIC.
4067 if test "$host_cpu" = ia64; then
4068 # AIX 5 now supports IA64 processor
4069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4070 else
4071 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4072 fi
4073 ;;
4074 chorus*)
4075 case $cc_basename in
4076 cxch68*)
4077 # Green Hills C++ Compiler
4078 # _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"
4079 ;;
4080 esac
4081 ;;
b0322a85
CE
4082 mingw* | cygwin* | os2* | pw32* | cegcc*)
4083 # This hack is so that the source file can tell whether it is being
4084 # built for inclusion in a dll (and should export symbols for example).
4085 m4_if([$1], [GCJ], [],
4086 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4087 ;;
8d138742
CE
4088 dgux*)
4089 case $cc_basename in
4090 ec++*)
4091 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4092 ;;
4093 ghcx*)
4094 # Green Hills C++ Compiler
4095 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4096 ;;
4097 *)
4098 ;;
4099 esac
4100 ;;
4101 freebsd* | dragonfly*)
4102 # FreeBSD uses GNU C++
4103 ;;
4104 hpux9* | hpux10* | hpux11*)
4105 case $cc_basename in
4106 CC*)
4107 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4108 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4109 if test "$host_cpu" != ia64; then
4110 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4111 fi
4112 ;;
4113 aCC*)
4114 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4116 case $host_cpu in
4117 hppa*64*|ia64*)
4118 # +Z the default
4119 ;;
4120 *)
4121 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4122 ;;
4123 esac
4124 ;;
4125 *)
4126 ;;
4127 esac
4128 ;;
4129 interix*)
4130 # This is c89, which is MS Visual C++ (no shared libs)
4131 # Anyone wants to do a port?
4132 ;;
4133 irix5* | irix6* | nonstopux*)
4134 case $cc_basename in
4135 CC*)
4136 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4137 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4138 # CC pic flag -KPIC is the default.
4139 ;;
4140 *)
4141 ;;
4142 esac
4143 ;;
b0322a85 4144 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
4145 case $cc_basename in
4146 KCC*)
4147 # KAI C++ Compiler
4148 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4150 ;;
4151 ecpc* )
4152 # old Intel C++ for x86_64 which still supported -KPIC.
4153 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4155 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4156 ;;
4157 icpc* )
4158 # Intel C++, used to be incompatible with GCC.
4159 # ICC 10 doesn't accept -KPIC any more.
4160 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4161 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4162 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4163 ;;
4164 pgCC* | pgcpp*)
4165 # Portland Group C++ compiler
4166 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4167 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4168 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4169 ;;
4170 cxx*)
4171 # Compaq C++
4172 # Make sure the PIC flag is empty. It appears that all Alpha
4173 # Linux and Compaq Tru64 Unix objects are PIC.
4174 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4176 ;;
b0322a85
CE
4177 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4178 # IBM XL 8.0, 9.0 on PPC and BlueGene
8d138742
CE
4179 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4182 ;;
4183 *)
4184 case `$CC -V 2>&1 | sed 5q` in
4185 *Sun\ C*)
4186 # Sun C++ 5.9
4187 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4188 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4189 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4190 ;;
4191 esac
4192 ;;
4193 esac
4194 ;;
4195 lynxos*)
4196 ;;
4197 m88k*)
4198 ;;
4199 mvs*)
4200 case $cc_basename in
4201 cxx*)
4202 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4203 ;;
4204 *)
4205 ;;
4206 esac
4207 ;;
4208 netbsd*)
4209 ;;
4210 *qnx* | *nto*)
4211 # QNX uses GNU C++, but need to define -shared option too, otherwise
4212 # it will coredump.
4213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4214 ;;
4215 osf3* | osf4* | osf5*)
4216 case $cc_basename in
4217 KCC*)
4218 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4219 ;;
4220 RCC*)
4221 # Rational C++ 2.4.1
4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4223 ;;
4224 cxx*)
4225 # Digital/Compaq C++
4226 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4227 # Make sure the PIC flag is empty. It appears that all Alpha
4228 # Linux and Compaq Tru64 Unix objects are PIC.
4229 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4230 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4231 ;;
4232 *)
4233 ;;
4234 esac
4235 ;;
4236 psos*)
4237 ;;
4238 solaris*)
4239 case $cc_basename in
b0322a85 4240 CC* | sunCC*)
8d138742
CE
4241 # Sun C++ 4.2, 5.x and Centerline C++
4242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4243 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4244 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4245 ;;
4246 gcx*)
4247 # Green Hills C++ Compiler
4248 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4249 ;;
4250 *)
4251 ;;
4252 esac
4253 ;;
4254 sunos4*)
4255 case $cc_basename in
4256 CC*)
4257 # Sun C++ 4.x
4258 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4259 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4260 ;;
4261 lcc*)
4262 # Lucid
4263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4264 ;;
4265 *)
4266 ;;
4267 esac
4268 ;;
4269 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4270 case $cc_basename in
4271 CC*)
4272 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4273 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4274 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4275 ;;
4276 esac
4277 ;;
4278 tandem*)
4279 case $cc_basename in
4280 NCC*)
4281 # NonStop-UX NCC 3.20
4282 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4283 ;;
4284 *)
4285 ;;
4286 esac
4287 ;;
4288 vxworks*)
4289 ;;
4290 *)
4291 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4292 ;;
4293 esac
4294 fi
4295],
4296[
4297 if test "$GCC" = yes; then
4298 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
d9898ee8 4300
8d138742
CE
4301 case $host_os in
4302 aix*)
4303 # All AIX code is PIC.
4304 if test "$host_cpu" = ia64; then
4305 # AIX 5 now supports IA64 processor
4306 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4307 fi
4308 ;;
d9898ee8 4309
8d138742
CE
4310 amigaos*)
4311 case $host_cpu in
4312 powerpc)
4313 # see comment about AmigaOS4 .so support
4314 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4315 ;;
4316 m68k)
4317 # FIXME: we need at least 68020 code to build shared libraries, but
4318 # adding the `-m68020' flag to GCC prevents building anything better,
4319 # like `-m68040'.
4320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4321 ;;
4322 esac
4323 ;;
d9898ee8 4324
8d138742
CE
4325 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4326 # PIC is the default for these OSes.
4327 ;;
d9898ee8 4328
8d138742
CE
4329 mingw* | cygwin* | pw32* | os2* | cegcc*)
4330 # This hack is so that the source file can tell whether it is being
4331 # built for inclusion in a dll (and should export symbols for example).
4332 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4333 # (--disable-auto-import) libraries
4334 m4_if([$1], [GCJ], [],
4335 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4336 ;;
d9898ee8 4337
8d138742
CE
4338 darwin* | rhapsody*)
4339 # PIC is the default on this platform
4340 # Common symbols not allowed in MH_DYLIB files
4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4342 ;;
d9898ee8 4343
b0322a85
CE
4344 haiku*)
4345 # PIC is the default for Haiku.
4346 # The "-static" flag exists, but is broken.
4347 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4348 ;;
4349
8d138742
CE
4350 hpux*)
4351 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4352 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4353 # sets the default TLS model and affects inlining.
4354 case $host_cpu in
4355 hppa*64*)
4356 # +Z the default
4357 ;;
4358 *)
4359 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4360 ;;
4361 esac
4362 ;;
d9898ee8 4363
8d138742
CE
4364 interix[[3-9]]*)
4365 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4366 # Instead, we relocate shared libraries at runtime.
4367 ;;
d9898ee8 4368
8d138742
CE
4369 msdosdjgpp*)
4370 # Just because we use GCC doesn't mean we suddenly get shared libraries
4371 # on systems that don't support them.
4372 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4373 enable_shared=no
4374 ;;
d9898ee8 4375
8d138742
CE
4376 *nto* | *qnx*)
4377 # QNX uses GNU C++, but need to define -shared option too, otherwise
4378 # it will coredump.
4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4380 ;;
d9898ee8 4381
8d138742
CE
4382 sysv4*MP*)
4383 if test -d /usr/nec; then
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4385 fi
4386 ;;
d9898ee8 4387
8d138742
CE
4388 *)
4389 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4390 ;;
4391 esac
b0322a85
CE
4392
4393 case $cc_basename in
4394 nvcc*) # Cuda Compiler Driver 2.2
4395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4396 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4398 fi
4399 ;;
4400 esac
8d138742
CE
4401 else
4402 # PORTME Check for flag to pass linker flags through the system compiler.
4403 case $host_os in
4404 aix*)
4405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406 if test "$host_cpu" = ia64; then
4407 # AIX 5 now supports IA64 processor
4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4409 else
4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4411 fi
4412 ;;
d9898ee8 4413
8d138742
CE
4414 mingw* | cygwin* | pw32* | os2* | cegcc*)
4415 # This hack is so that the source file can tell whether it is being
4416 # built for inclusion in a dll (and should export symbols for example).
4417 m4_if([$1], [GCJ], [],
4418 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4419 ;;
d9898ee8 4420
8d138742
CE
4421 hpux9* | hpux10* | hpux11*)
4422 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4423 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4424 # not for PA HP-UX.
4425 case $host_cpu in
4426 hppa*64*|ia64*)
4427 # +Z the default
4428 ;;
4429 *)
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4431 ;;
4432 esac
4433 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4434 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4435 ;;
d9898ee8 4436
8d138742
CE
4437 irix5* | irix6* | nonstopux*)
4438 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4439 # PIC (with -KPIC) is the default.
4440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4441 ;;
d9898ee8 4442
b0322a85 4443 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
4444 case $cc_basename in
4445 # old Intel for x86_64 which still supported -KPIC.
4446 ecc*)
4447 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4449 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4450 ;;
4451 # icc used to be incompatible with GCC.
4452 # ICC 10 doesn't accept -KPIC any more.
4453 icc* | ifort*)
4454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4455 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4456 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4457 ;;
4458 # Lahey Fortran 8.1.
4459 lf95*)
4460 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4461 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4462 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4463 ;;
b0322a85
CE
4464 nagfor*)
4465 # NAG Fortran compiler
4466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4467 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4468 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4469 ;;
4470 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8d138742
CE
4471 # Portland Group compilers (*not* the Pentium gcc compiler,
4472 # which looks to be a dead project)
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)='-Bstatic'
4476 ;;
4477 ccc*)
4478 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4479 # All Alpha code is PIC.
4480 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4481 ;;
b0322a85
CE
4482 xl* | bgxl* | bgf* | mpixl*)
4483 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8d138742
CE
4484 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4485 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4486 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4487 ;;
4488 *)
4489 case `$CC -V 2>&1 | sed 5q` in
b0322a85
CE
4490 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4491 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4493 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4494 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4495 ;;
4496 *Sun\ F* | *Sun*Fortran*)
4497 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4498 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4500 ;;
8d138742
CE
4501 *Sun\ C*)
4502 # Sun C 5.9
4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4505 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4506 ;;
b0322a85
CE
4507 *Intel*\ [[CF]]*Compiler*)
4508 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4509 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4510 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4511 ;;
4512 *Portland\ Group*)
4513 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8d138742 4515 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8d138742
CE
4516 ;;
4517 esac
4518 ;;
4519 esac
4520 ;;
d9898ee8 4521
8d138742
CE
4522 newsos6)
4523 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4524 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4525 ;;
d9898ee8 4526
8d138742
CE
4527 *nto* | *qnx*)
4528 # QNX uses GNU C++, but need to define -shared option too, otherwise
4529 # it will coredump.
4530 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4531 ;;
d9898ee8 4532
8d138742
CE
4533 osf3* | osf4* | osf5*)
4534 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4535 # All OSF/1 code is PIC.
4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4537 ;;
d9898ee8 4538
8d138742
CE
4539 rdos*)
4540 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4541 ;;
d9898ee8 4542
8d138742
CE
4543 solaris*)
4544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4546 case $cc_basename in
b0322a85 4547 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8d138742
CE
4548 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4549 *)
4550 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4551 esac
4552 ;;
d9898ee8 4553
8d138742
CE
4554 sunos4*)
4555 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4556 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4558 ;;
d9898ee8 4559
8d138742
CE
4560 sysv4 | sysv4.2uw2* | sysv4.3*)
4561 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4562 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4563 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4564 ;;
d9898ee8 4565
8d138742
CE
4566 sysv4*MP*)
4567 if test -d /usr/nec ;then
4568 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4570 fi
4571 ;;
d9898ee8 4572
8d138742
CE
4573 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4574 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4575 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4576 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4577 ;;
d9898ee8 4578
8d138742
CE
4579 unicos*)
4580 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4581 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4582 ;;
d9898ee8 4583
8d138742
CE
4584 uts4*)
4585 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4586 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4587 ;;
d9898ee8 4588
8d138742
CE
4589 *)
4590 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4591 ;;
4592 esac
4593 fi
4594])
4595case $host_os in
4596 # For platforms which do not support PIC, -DPIC is meaningless:
4597 *djgpp*)
4598 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4599 ;;
4600 *)
4601 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4602 ;;
4603esac
b0322a85
CE
4604
4605AC_CACHE_CHECK([for $compiler option to produce PIC],
4606 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4607 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4608_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
d9898ee8 4609
8d138742
CE
4610#
4611# Check to make sure the PIC flag actually works.
4612#
4613if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4614 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4615 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4616 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4617 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4618 "" | " "*) ;;
4619 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4620 esac],
4621 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4622 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4623fi
4624_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4625 [Additional compiler flags for building library objects])
d9898ee8 4626
b0322a85
CE
4627_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4628 [How to pass a linker flag through the compiler])
8d138742
CE
4629#
4630# Check to make sure the static flag actually works.
4631#
4632wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4633_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4634 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4635 $lt_tmp_static_flag,
4636 [],
4637 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4638_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4639 [Compiler flag to prevent dynamic linking])
4640])# _LT_COMPILER_PIC
d9898ee8 4641
d9898ee8 4642
8d138742
CE
4643# _LT_LINKER_SHLIBS([TAGNAME])
4644# ----------------------------
4645# See if the linker supports building shared libraries.
4646m4_defun([_LT_LINKER_SHLIBS],
4647[AC_REQUIRE([LT_PATH_LD])dnl
4648AC_REQUIRE([LT_PATH_NM])dnl
b0322a85 4649m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8d138742
CE
4650m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4651m4_require([_LT_DECL_EGREP])dnl
4652m4_require([_LT_DECL_SED])dnl
4653m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4654m4_require([_LT_TAG_COMPILER])dnl
4655AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4656m4_if([$1], [CXX], [
4657 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
b0322a85 4658 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8d138742
CE
4659 case $host_os in
4660 aix[[4-9]]*)
4661 # If we're using GNU nm, then we don't want the "-C" option.
4662 # -C means demangle to AIX nm, but means don't demangle with GNU nm
b0322a85
CE
4663 # Also, AIX nm treats weak defined symbols like other global defined
4664 # symbols, whereas GNU nm marks them as "W".
8d138742 4665 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
b0322a85 4666 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
8d138742
CE
4667 else
4668 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4669 fi
4670 ;;
4671 pw32*)
4672 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
b0322a85 4673 ;;
8d138742 4674 cygwin* | mingw* | cegcc*)
b0322a85
CE
4675 case $cc_basename in
4676 cl*)
4677 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4678 ;;
4679 *)
4680 _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'
4681 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4682 ;;
4683 esac
4684 ;;
8d138742
CE
4685 *)
4686 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
b0322a85 4687 ;;
8d138742 4688 esac
8d138742
CE
4689], [
4690 runpath_var=
4691 _LT_TAGVAR(allow_undefined_flag, $1)=
4692 _LT_TAGVAR(always_export_symbols, $1)=no
4693 _LT_TAGVAR(archive_cmds, $1)=
4694 _LT_TAGVAR(archive_expsym_cmds, $1)=
4695 _LT_TAGVAR(compiler_needs_object, $1)=no
4696 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4697 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4698 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4699 _LT_TAGVAR(hardcode_automatic, $1)=no
4700 _LT_TAGVAR(hardcode_direct, $1)=no
4701 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4702 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
4703 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4704 _LT_TAGVAR(hardcode_minus_L, $1)=no
4705 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4706 _LT_TAGVAR(inherit_rpath, $1)=no
4707 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4708 _LT_TAGVAR(module_cmds, $1)=
4709 _LT_TAGVAR(module_expsym_cmds, $1)=
4710 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4711 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4712 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4713 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4714 # include_expsyms should be a list of space-separated symbols to be *always*
4715 # included in the symbol list
4716 _LT_TAGVAR(include_expsyms, $1)=
4717 # exclude_expsyms can be an extended regexp of symbols to exclude
4718 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4719 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4720 # as well as any symbol that contains `d'.
4721 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4722 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4723 # platforms (ab)use it in PIC code, but their linkers get confused if
4724 # the symbol is explicitly referenced. Since portable code cannot
4725 # rely on this symbol name, it's probably fine to never include it in
4726 # preloaded symbol tables.
4727 # Exclude shared library initialization/finalization symbols.
4728dnl Note also adjust exclude_expsyms for C++ above.
4729 extract_expsyms_cmds=
d9898ee8 4730
8d138742
CE
4731 case $host_os in
4732 cygwin* | mingw* | pw32* | cegcc*)
4733 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4734 # When not using gcc, we currently assume that we are using
4735 # Microsoft Visual C++.
4736 if test "$GCC" != yes; then
4737 with_gnu_ld=no
4738 fi
4739 ;;
4740 interix*)
4741 # we just hope/assume this is gcc and not c89 (= MSVC++)
4742 with_gnu_ld=yes
4743 ;;
4744 openbsd*)
4745 with_gnu_ld=no
4746 ;;
4747 esac
d9898ee8 4748
8d138742 4749 _LT_TAGVAR(ld_shlibs, $1)=yes
b0322a85
CE
4750
4751 # On some targets, GNU ld is compatible enough with the native linker
4752 # that we're better off using the native interface for both.
4753 lt_use_gnu_ld_interface=no
8d138742 4754 if test "$with_gnu_ld" = yes; then
b0322a85
CE
4755 case $host_os in
4756 aix*)
4757 # The AIX port of GNU ld has always aspired to compatibility
4758 # with the native linker. However, as the warning in the GNU ld
4759 # block says, versions before 2.19.5* couldn't really create working
4760 # shared libraries, regardless of the interface used.
4761 case `$LD -v 2>&1` in
4762 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4763 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4764 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4765 *)
4766 lt_use_gnu_ld_interface=yes
4767 ;;
4768 esac
4769 ;;
4770 *)
4771 lt_use_gnu_ld_interface=yes
4772 ;;
4773 esac
4774 fi
4775
4776 if test "$lt_use_gnu_ld_interface" = yes; then
8d138742
CE
4777 # If archive_cmds runs LD, not CC, wlarc should be empty
4778 wlarc='${wl}'
d9898ee8 4779
8d138742
CE
4780 # Set some defaults for GNU ld with shared library support. These
4781 # are reset later if shared libraries are not supported. Putting them
4782 # here allows them to be overridden if necessary.
4783 runpath_var=LD_RUN_PATH
4784 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4785 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4786 # ancient GNU ld didn't support --whole-archive et. al.
4787 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4788 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4789 else
4790 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4791 fi
4792 supports_anon_versioning=no
4793 case `$LD -v 2>&1` in
b0322a85 4794 *GNU\ gold*) supports_anon_versioning=yes ;;
8d138742
CE
4795 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4796 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4797 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4798 *\ 2.11.*) ;; # other 2.11 versions
4799 *) supports_anon_versioning=yes ;;
4800 esac
d9898ee8 4801
8d138742
CE
4802 # See if GNU ld supports shared libraries.
4803 case $host_os in
4804 aix[[3-9]]*)
4805 # On AIX/PPC, the GNU linker is very broken
4806 if test "$host_cpu" != ia64; then
4807 _LT_TAGVAR(ld_shlibs, $1)=no
4808 cat <<_LT_EOF 1>&2
d9898ee8 4809
b0322a85 4810*** Warning: the GNU linker, at least up to release 2.19, is reported
8d138742
CE
4811*** to be unable to reliably create shared libraries on AIX.
4812*** Therefore, libtool is disabling shared libraries support. If you
b0322a85
CE
4813*** really care for shared libraries, you may want to install binutils
4814*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4815*** You will then need to restart the configuration process.
d9898ee8 4816
8d138742
CE
4817_LT_EOF
4818 fi
4819 ;;
d9898ee8 4820
8d138742
CE
4821 amigaos*)
4822 case $host_cpu in
4823 powerpc)
4824 # see comment about AmigaOS4 .so support
4825 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4826 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4827 ;;
4828 m68k)
4829 _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)'
4830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4831 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4832 ;;
4833 esac
4834 ;;
d9898ee8 4835
8d138742
CE
4836 beos*)
4837 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4838 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4839 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4840 # support --undefined. This deserves some investigation. FIXME
4841 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4842 else
4843 _LT_TAGVAR(ld_shlibs, $1)=no
4844 fi
4845 ;;
d9898ee8 4846
8d138742
CE
4847 cygwin* | mingw* | pw32* | cegcc*)
4848 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4849 # as there is no search path for DLLs.
4850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
b0322a85 4851 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8d138742
CE
4852 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4853 _LT_TAGVAR(always_export_symbols, $1)=no
4854 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
b0322a85
CE
4855 _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'
4856 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8d138742
CE
4857
4858 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4859 _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'
4860 # If the export-symbols file already is a .def file (1st line
4861 # is EXPORTS), use it as is; otherwise, prepend...
4862 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4863 cp $export_symbols $output_objdir/$soname.def;
4864 else
4865 echo EXPORTS > $output_objdir/$soname.def;
4866 cat $export_symbols >> $output_objdir/$soname.def;
4867 fi~
4868 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4869 else
4870 _LT_TAGVAR(ld_shlibs, $1)=no
4871 fi
4872 ;;
d9898ee8 4873
b0322a85
CE
4874 haiku*)
4875 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4876 _LT_TAGVAR(link_all_deplibs, $1)=yes
4877 ;;
4878
8d138742
CE
4879 interix[[3-9]]*)
4880 _LT_TAGVAR(hardcode_direct, $1)=no
4881 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4882 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4883 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4884 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4885 # Instead, shared libraries are loaded at an image base (0x10000000 by
4886 # default) and relocated if they conflict, which is a slow very memory
4887 # consuming and fragmenting process. To avoid this, we pick a random,
4888 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4889 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4890 _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'
4891 _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'
4892 ;;
d9898ee8 4893
b0322a85 4894 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
4895 tmp_diet=no
4896 if test "$host_os" = linux-dietlibc; then
4897 case $cc_basename in
4898 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4899 esac
4900 fi
4901 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4902 && test "$tmp_diet" = no
4903 then
b0322a85 4904 tmp_addflag=' $pic_flag'
8d138742
CE
4905 tmp_sharedflag='-shared'
4906 case $cc_basename,$host_cpu in
4907 pgcc*) # Portland Group C compiler
b0322a85 4908 _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
4909 tmp_addflag=' $pic_flag'
4910 ;;
b0322a85
CE
4911 pgf77* | pgf90* | pgf95* | pgfortran*)
4912 # Portland Group f77 and f90 compilers
4913 _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
4914 tmp_addflag=' $pic_flag -Mnomain' ;;
4915 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4916 tmp_addflag=' -i_dynamic' ;;
4917 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4918 tmp_addflag=' -i_dynamic -nofor_main' ;;
4919 ifc* | ifort*) # Intel Fortran compiler
4920 tmp_addflag=' -nofor_main' ;;
4921 lf95*) # Lahey Fortran 8.1
4922 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4923 tmp_sharedflag='--shared' ;;
b0322a85 4924 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8d138742
CE
4925 tmp_sharedflag='-qmkshrobj'
4926 tmp_addflag= ;;
b0322a85
CE
4927 nvcc*) # Cuda Compiler Driver 2.2
4928 _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'
4929 _LT_TAGVAR(compiler_needs_object, $1)=yes
4930 ;;
8d138742
CE
4931 esac
4932 case `$CC -V 2>&1 | sed 5q` in
4933 *Sun\ C*) # Sun C 5.9
b0322a85 4934 _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
4935 _LT_TAGVAR(compiler_needs_object, $1)=yes
4936 tmp_sharedflag='-G' ;;
4937 *Sun\ F*) # Sun Fortran 8.3
4938 tmp_sharedflag='-G' ;;
4939 esac
4940 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
d9898ee8 4941
8d138742
CE
4942 if test "x$supports_anon_versioning" = xyes; then
4943 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4944 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4945 echo "local: *; };" >> $output_objdir/$libname.ver~
4946 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4947 fi
d9898ee8 4948
8d138742 4949 case $cc_basename in
b0322a85 4950 xlf* | bgf* | bgxlf* | mpixlf*)
8d138742
CE
4951 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4952 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
b0322a85
CE
4953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4954 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
8d138742
CE
4955 if test "x$supports_anon_versioning" = xyes; then
4956 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4957 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4958 echo "local: *; };" >> $output_objdir/$libname.ver~
b0322a85 4959 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8d138742
CE
4960 fi
4961 ;;
4962 esac
4963 else
4964 _LT_TAGVAR(ld_shlibs, $1)=no
4965 fi
4966 ;;
d9898ee8 4967
8d138742
CE
4968 netbsd*)
4969 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4970 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4971 wlarc=
4972 else
b0322a85
CE
4973 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4974 _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
4975 fi
4976 ;;
d9898ee8 4977
8d138742
CE
4978 solaris*)
4979 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4980 _LT_TAGVAR(ld_shlibs, $1)=no
4981 cat <<_LT_EOF 1>&2
d9898ee8 4982
8d138742
CE
4983*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4984*** create shared libraries on Solaris systems. Therefore, libtool
4985*** is disabling shared libraries support. We urge you to upgrade GNU
4986*** binutils to release 2.9.1 or newer. Another option is to modify
4987*** your PATH or compiler configuration so that the native linker is
4988*** used, and then restart.
d9898ee8 4989
8d138742
CE
4990_LT_EOF
4991 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
b0322a85
CE
4992 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4993 _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
4994 else
4995 _LT_TAGVAR(ld_shlibs, $1)=no
4996 fi
4997 ;;
d9898ee8 4998
8d138742
CE
4999 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5000 case `$LD -v 2>&1` in
5001 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5002 _LT_TAGVAR(ld_shlibs, $1)=no
5003 cat <<_LT_EOF 1>&2
d9898ee8 5004
8d138742
CE
5005*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5006*** reliably create shared libraries on SCO systems. Therefore, libtool
5007*** is disabling shared libraries support. We urge you to upgrade GNU
5008*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5009*** your PATH or compiler configuration so that the native linker is
5010*** used, and then restart.
d9898ee8 5011
8d138742
CE
5012_LT_EOF
5013 ;;
5014 *)
5015 # For security reasons, it is highly recommended that you always
5016 # use absolute paths for naming shared libraries, and exclude the
5017 # DT_RUNPATH tag from executables and libraries. But doing so
5018 # requires that you compile everything twice, which is a pain.
5019 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5020 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5021 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5022 _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'
5023 else
5024 _LT_TAGVAR(ld_shlibs, $1)=no
5025 fi
5026 ;;
5027 esac
5028 ;;
d9898ee8 5029
8d138742
CE
5030 sunos4*)
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5032 wlarc=
5033 _LT_TAGVAR(hardcode_direct, $1)=yes
5034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5035 ;;
d9898ee8 5036
8d138742
CE
5037 *)
5038 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
b0322a85
CE
5039 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5040 _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
5041 else
5042 _LT_TAGVAR(ld_shlibs, $1)=no
5043 fi
5044 ;;
5045 esac
d9898ee8 5046
8d138742
CE
5047 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5048 runpath_var=
5049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5050 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5051 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5052 fi
5053 else
5054 # PORTME fill in a description of your system's linker (not GNU ld)
5055 case $host_os in
5056 aix3*)
5057 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5058 _LT_TAGVAR(always_export_symbols, $1)=yes
5059 _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'
5060 # Note: this linker hardcodes the directories in LIBPATH if there
5061 # are no directories specified by -L.
5062 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5063 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5064 # Neither direct hardcoding nor static linking is supported with a
5065 # broken collect2.
5066 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5067 fi
5068 ;;
d9898ee8 5069
8d138742
CE
5070 aix[[4-9]]*)
5071 if test "$host_cpu" = ia64; then
5072 # On IA64, the linker does run time linking by default, so we don't
5073 # have to do anything special.
5074 aix_use_runtimelinking=no
5075 exp_sym_flag='-Bexport'
5076 no_entry_flag=""
5077 else
5078 # If we're using GNU nm, then we don't want the "-C" option.
5079 # -C means demangle to AIX nm, but means don't demangle with GNU nm
b0322a85
CE
5080 # Also, AIX nm treats weak defined symbols like other global
5081 # defined symbols, whereas GNU nm marks them as "W".
8d138742 5082 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
b0322a85 5083 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
8d138742
CE
5084 else
5085 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5086 fi
5087 aix_use_runtimelinking=no
d9898ee8 5088
8d138742
CE
5089 # Test if we are trying to use run time linking or normal
5090 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5091 # need to do runtime linking.
5092 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5093 for ld_flag in $LDFLAGS; do
5094 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5095 aix_use_runtimelinking=yes
5096 break
5097 fi
5098 done
5099 ;;
5100 esac
d9898ee8 5101
8d138742
CE
5102 exp_sym_flag='-bexport'
5103 no_entry_flag='-bnoentry'
5104 fi
d9898ee8 5105
8d138742
CE
5106 # When large executables or shared objects are built, AIX ld can
5107 # have problems creating the table of contents. If linking a library
5108 # or program results in "error TOC overflow" add -mminimal-toc to
5109 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5110 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
d9898ee8 5111
8d138742
CE
5112 _LT_TAGVAR(archive_cmds, $1)=''
5113 _LT_TAGVAR(hardcode_direct, $1)=yes
5114 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5115 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5116 _LT_TAGVAR(link_all_deplibs, $1)=yes
5117 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
d9898ee8 5118
8d138742
CE
5119 if test "$GCC" = yes; then
5120 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5121 # We only want to do this on AIX 4.2 and lower, the check
5122 # below for broken collect2 doesn't work under 4.3+
5123 collect2name=`${CC} -print-prog-name=collect2`
5124 if test -f "$collect2name" &&
5125 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5126 then
5127 # We have reworked collect2
5128 :
5129 else
5130 # We have old collect2
5131 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5132 # It fails to find uninstalled libraries when the uninstalled
5133 # path is not listed in the libpath. Setting hardcode_minus_L
5134 # to unsupported forces relinking
5135 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5137 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5138 fi
5139 ;;
5140 esac
5141 shared_flag='-shared'
5142 if test "$aix_use_runtimelinking" = yes; then
5143 shared_flag="$shared_flag "'${wl}-G'
5144 fi
5145 else
5146 # not using gcc
5147 if test "$host_cpu" = ia64; then
5148 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5149 # chokes on -Wl,-G. The following line is correct:
5150 shared_flag='-G'
5151 else
5152 if test "$aix_use_runtimelinking" = yes; then
5153 shared_flag='${wl}-G'
5154 else
5155 shared_flag='${wl}-bM:SRE'
5156 fi
5157 fi
5158 fi
d9898ee8 5159
8d138742
CE
5160 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5161 # It seems that -bexpall does not export symbols beginning with
5162 # underscore (_), so it is better to generate a list of symbols to export.
5163 _LT_TAGVAR(always_export_symbols, $1)=yes
5164 if test "$aix_use_runtimelinking" = yes; then
5165 # Warning - without using the other runtime loading flags (-brtl),
5166 # -berok will link without error, but may produce a broken library.
5167 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5168 # Determine the default libpath from the value encoded in an
5169 # empty executable.
b0322a85 5170 _LT_SYS_MODULE_PATH_AIX([$1])
8d138742 5171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
b0322a85 5172 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8d138742
CE
5173 else
5174 if test "$host_cpu" = ia64; then
5175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5176 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5177 _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"
5178 else
5179 # Determine the default libpath from the value encoded in an
5180 # empty executable.
b0322a85 5181 _LT_SYS_MODULE_PATH_AIX([$1])
8d138742
CE
5182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5183 # Warning - without using the other run time loading flags,
5184 # -berok will link without error, but may produce a broken library.
5185 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5186 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
b0322a85
CE
5187 if test "$with_gnu_ld" = yes; then
5188 # We only use this code for GNU lds that support --whole-archive.
5189 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5190 else
5191 # Exported symbols can be pulled into shared objects from archives
5192 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5193 fi
8d138742
CE
5194 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5195 # This is similar to how AIX traditionally builds its shared libraries.
5196 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5197 fi
5198 fi
5199 ;;
d9898ee8 5200
8d138742
CE
5201 amigaos*)
5202 case $host_cpu in
5203 powerpc)
5204 # see comment about AmigaOS4 .so support
5205 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5206 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5207 ;;
5208 m68k)
5209 _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)'
5210 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5211 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5212 ;;
5213 esac
5214 ;;
d9898ee8 5215
8d138742
CE
5216 bsdi[[45]]*)
5217 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5218 ;;
d9898ee8 5219
8d138742
CE
5220 cygwin* | mingw* | pw32* | cegcc*)
5221 # When not using gcc, we currently assume that we are using
5222 # Microsoft Visual C++.
5223 # hardcode_libdir_flag_spec is actually meaningless, as there is
5224 # no search path for DLLs.
b0322a85
CE
5225 case $cc_basename in
5226 cl*)
5227 # Native MSVC
5228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5229 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5230 _LT_TAGVAR(always_export_symbols, $1)=yes
5231 _LT_TAGVAR(file_list_spec, $1)='@'
5232 # Tell ltmain to make .lib files, not .a files.
5233 libext=lib
5234 # Tell ltmain to make .dll files, not .so files.
5235 shrext_cmds=".dll"
5236 # FIXME: Setting linknames here is a bad hack.
5237 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5238 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5239 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5240 else
5241 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5242 fi~
5243 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5244 linknames='
5245 # The linker will not automatically build a static lib if we build a DLL.
5246 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5247 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5248 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5249 _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'
5250 # Don't use ranlib
5251 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5252 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5253 lt_tool_outputfile="@TOOL_OUTPUT@"~
5254 case $lt_outputfile in
5255 *.exe|*.EXE) ;;
5256 *)
5257 lt_outputfile="$lt_outputfile.exe"
5258 lt_tool_outputfile="$lt_tool_outputfile.exe"
5259 ;;
5260 esac~
5261 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5262 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5263 $RM "$lt_outputfile.manifest";
5264 fi'
5265 ;;
5266 *)
5267 # Assume MSVC wrapper
5268 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5269 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5270 # Tell ltmain to make .lib files, not .a files.
5271 libext=lib
5272 # Tell ltmain to make .dll files, not .so files.
5273 shrext_cmds=".dll"
5274 # FIXME: Setting linknames here is a bad hack.
5275 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5276 # The linker will automatically build a .lib file if we build a DLL.
5277 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5278 # FIXME: Should let the user specify the lib program.
5279 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5280 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5281 ;;
5282 esac
8d138742 5283 ;;
d9898ee8 5284
8d138742
CE
5285 darwin* | rhapsody*)
5286 _LT_DARWIN_LINKER_FEATURES($1)
5287 ;;
d9898ee8 5288
8d138742
CE
5289 dgux*)
5290 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5292 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5293 ;;
d9898ee8 5294
8d138742
CE
5295 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5296 # support. Future versions do this automatically, but an explicit c++rt0.o
5297 # does not break anything, and helps significantly (at the cost of a little
5298 # extra space).
5299 freebsd2.2*)
5300 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5302 _LT_TAGVAR(hardcode_direct, $1)=yes
5303 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5304 ;;
d9898ee8 5305
8d138742 5306 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
b0322a85 5307 freebsd2.*)
8d138742
CE
5308 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5309 _LT_TAGVAR(hardcode_direct, $1)=yes
5310 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5311 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5312 ;;
d9898ee8 5313
8d138742
CE
5314 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5315 freebsd* | dragonfly*)
b0322a85 5316 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5318 _LT_TAGVAR(hardcode_direct, $1)=yes
5319 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5320 ;;
d9898ee8 5321
8d138742
CE
5322 hpux9*)
5323 if test "$GCC" = yes; then
b0322a85 5324 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8d138742
CE
5325 else
5326 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5327 fi
5328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5329 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5330 _LT_TAGVAR(hardcode_direct, $1)=yes
d9898ee8 5331
8d138742
CE
5332 # hardcode_minus_L: Not really in the search PATH,
5333 # but as the default location of the library.
5334 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5335 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5336 ;;
d9898ee8 5337
8d138742 5338 hpux10*)
b0322a85
CE
5339 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5340 _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 5341 else
8d138742 5342 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
d9898ee8 5343 fi
8d138742
CE
5344 if test "$with_gnu_ld" = no; then
5345 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8d138742
CE
5346 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5347 _LT_TAGVAR(hardcode_direct, $1)=yes
5348 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5349 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5350 # hardcode_minus_L: Not really in the search PATH,
5351 # but as the default location of the library.
5352 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5353 fi
5354 ;;
d9898ee8 5355
8d138742 5356 hpux11*)
b0322a85 5357 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
8d138742
CE
5358 case $host_cpu in
5359 hppa*64*)
5360 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5361 ;;
5362 ia64*)
b0322a85 5363 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8d138742
CE
5364 ;;
5365 *)
b0322a85 5366 _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
5367 ;;
5368 esac
5369 else
5370 case $host_cpu in
5371 hppa*64*)
5372 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5373 ;;
5374 ia64*)
5375 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5376 ;;
5377 *)
b0322a85
CE
5378 m4_if($1, [], [
5379 # Older versions of the 11.00 compiler do not understand -b yet
5380 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5381 _LT_LINKER_OPTION([if $CC understands -b],
5382 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5383 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5384 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5385 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
8d138742
CE
5386 ;;
5387 esac
5388 fi
5389 if test "$with_gnu_ld" = no; then
5390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5391 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d9898ee8 5392
8d138742
CE
5393 case $host_cpu in
5394 hppa*64*|ia64*)
5395 _LT_TAGVAR(hardcode_direct, $1)=no
5396 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5397 ;;
5398 *)
5399 _LT_TAGVAR(hardcode_direct, $1)=yes
5400 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5401 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
d9898ee8 5402
8d138742
CE
5403 # hardcode_minus_L: Not really in the search PATH,
5404 # but as the default location of the library.
5405 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5406 ;;
5407 esac
5408 fi
5409 ;;
d9898ee8 5410
8d138742
CE
5411 irix5* | irix6* | nonstopux*)
5412 if test "$GCC" = yes; then
b0322a85 5413 _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
5414 # Try to use the -exported_symbol ld option, if it does not
5415 # work, assume that -exports_file does not work either and
5416 # implicitly export all symbols.
b0322a85
CE
5417 # This should be the same for all languages, so no per-tag cache variable.
5418 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5419 [lt_cv_irix_exported_symbol],
5420 [save_LDFLAGS="$LDFLAGS"
5421 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5422 AC_LINK_IFELSE(
5423 [AC_LANG_SOURCE(
5424 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5425 [C++], [[int foo (void) { return 0; }]],
5426 [Fortran 77], [[
5427 subroutine foo
5428 end]],
5429 [Fortran], [[
5430 subroutine foo
5431 end]])])],
5432 [lt_cv_irix_exported_symbol=yes],
5433 [lt_cv_irix_exported_symbol=no])
5434 LDFLAGS="$save_LDFLAGS"])
5435 if test "$lt_cv_irix_exported_symbol" = yes; then
5436 _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'
5437 fi
8d138742 5438 else
b0322a85
CE
5439 _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'
5440 _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
5441 fi
5442 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5443 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5444 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5445 _LT_TAGVAR(inherit_rpath, $1)=yes
5446 _LT_TAGVAR(link_all_deplibs, $1)=yes
5447 ;;
d9898ee8 5448
8d138742
CE
5449 netbsd*)
5450 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5451 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
d9898ee8 5452 else
8d138742 5453 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
d9898ee8 5454 fi
8d138742
CE
5455 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5456 _LT_TAGVAR(hardcode_direct, $1)=yes
5457 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5458 ;;
d9898ee8 5459
8d138742
CE
5460 newsos6)
5461 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5462 _LT_TAGVAR(hardcode_direct, $1)=yes
5463 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5464 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5465 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5466 ;;
d9898ee8 5467
8d138742
CE
5468 *nto* | *qnx*)
5469 ;;
d9898ee8 5470
8d138742
CE
5471 openbsd*)
5472 if test -f /usr/libexec/ld.so; then
5473 _LT_TAGVAR(hardcode_direct, $1)=yes
5474 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5475 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5476 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5477 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5478 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5480 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5481 else
5482 case $host_os in
5483 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5484 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5485 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5486 ;;
5487 *)
5488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5489 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5490 ;;
5491 esac
5492 fi
5493 else
5494 _LT_TAGVAR(ld_shlibs, $1)=no
5495 fi
5496 ;;
d9898ee8 5497
8d138742
CE
5498 os2*)
5499 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5500 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5501 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
b0322a85 5502 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
8d138742
CE
5503 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5504 ;;
d9898ee8 5505
8d138742
CE
5506 osf3*)
5507 if test "$GCC" = yes; then
5508 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
b0322a85 5509 _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
5510 else
5511 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
b0322a85 5512 _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 5513 fi
8d138742
CE
5514 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5515 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5516 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d9898ee8 5517 ;;
8d138742
CE
5518
5519 osf4* | osf5*) # as osf3* with the addition of -msym flag
5520 if test "$GCC" = yes; then
5521 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
b0322a85 5522 _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'
8d138742
CE
5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5524 else
5525 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
b0322a85 5526 _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 5527 _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~
b0322a85 5528 $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
5529
5530 # Both c and cxx compiler support -rpath directly
5531 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5532 fi
5533 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5534 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
d9898ee8 5535 ;;
8d138742
CE
5536
5537 solaris*)
5538 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5539 if test "$GCC" = yes; then
5540 wlarc='${wl}'
b0322a85 5541 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8d138742 5542 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
b0322a85 5543 $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
5544 else
5545 case `$CC -V 2>&1` in
5546 *"Compilers 5.0"*)
5547 wlarc=''
5548 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5549 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5550 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5551 ;;
5552 *)
5553 wlarc='${wl}'
5554 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5555 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5556 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5557 ;;
5558 esac
5559 fi
5560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5561 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5562 case $host_os in
5563 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5564 *)
5565 # The compiler driver will combine and reorder linker options,
5566 # but understands `-z linker_flag'. GCC discards it without `$wl',
5567 # but is careful enough not to reorder.
5568 # Supported since Solaris 2.6 (maybe 2.5.1?)
5569 if test "$GCC" = yes; then
5570 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5571 else
5572 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5573 fi
5574 ;;
5575 esac
5576 _LT_TAGVAR(link_all_deplibs, $1)=yes
d9898ee8 5577 ;;
8d138742
CE
5578
5579 sunos4*)
5580 if test "x$host_vendor" = xsequent; then
5581 # Use $CC to link under sequent, because it throws in some extra .o
5582 # files that make .init and .fini sections work.
5583 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5584 else
5585 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5586 fi
5587 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5588 _LT_TAGVAR(hardcode_direct, $1)=yes
5589 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5590 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d9898ee8 5591 ;;
8d138742
CE
5592
5593 sysv4)
5594 case $host_vendor in
5595 sni)
5596 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5597 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5598 ;;
5599 siemens)
5600 ## LD is ld it makes a PLAMLIB
5601 ## CC just makes a GrossModule.
5602 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5603 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5604 _LT_TAGVAR(hardcode_direct, $1)=no
5605 ;;
5606 motorola)
5607 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5608 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5609 ;;
5610 esac
5611 runpath_var='LD_RUN_PATH'
5612 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d9898ee8 5613 ;;
8d138742
CE
5614
5615 sysv4.3*)
5616 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5617 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5618 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
d9898ee8 5619 ;;
8d138742 5620
d9898ee8 5621 sysv4*MP*)
5622 if test -d /usr/nec; then
8d138742
CE
5623 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5624 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5625 runpath_var=LD_RUN_PATH
5626 hardcode_runpath_var=yes
5627 _LT_TAGVAR(ld_shlibs, $1)=yes
d9898ee8 5628 fi
5629 ;;
8d138742
CE
5630
5631 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5632 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5633 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5634 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5635 runpath_var='LD_RUN_PATH'
5636
5637 if test "$GCC" = yes; then
5638 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5639 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5640 else
5641 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5642 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5643 fi
5644 ;;
5645
5646 sysv5* | sco3.2v5* | sco5v6*)
5647 # Note: We can NOT use -z defs as we might desire, because we do not
5648 # link with -lc, and that would cause any symbols used from libc to
5649 # always be unresolved, which means just about no library would
5650 # ever link correctly. If we're not using GNU ld we use -z text
5651 # though, which does catch some bad symbols but isn't as heavy-handed
5652 # as -z defs.
5653 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5654 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5655 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5656 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5658 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5659 _LT_TAGVAR(link_all_deplibs, $1)=yes
5660 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5661 runpath_var='LD_RUN_PATH'
5662
5663 if test "$GCC" = yes; then
5664 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5665 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5666 else
5667 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5668 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5669 fi
5670 ;;
5671
5672 uts4*)
5673 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5674 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
d9898ee8 5676 ;;
8d138742 5677
d9898ee8 5678 *)
8d138742 5679 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 5680 ;;
5681 esac
8d138742
CE
5682
5683 if test x$host_vendor = xsni; then
5684 case $host in
5685 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5686 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
d9898ee8 5687 ;;
8d138742
CE
5688 esac
5689 fi
5690 fi
5691])
5692AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5693test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5694
5695_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5696
5697_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5698_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5699_LT_DECL([], [extract_expsyms_cmds], [2],
5700 [The commands to extract the exported symbol list from a shared archive])
5701
5702#
5703# Do we need to explicitly link libc?
5704#
5705case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5706x|xyes)
5707 # Assume -lc should be added
5708 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5709
5710 if test "$enable_shared" = yes && test "$GCC" = yes; then
5711 case $_LT_TAGVAR(archive_cmds, $1) in
5712 *'~'*)
5713 # FIXME: we may have to deal with multi-command sequences.
5714 ;;
5715 '$CC '*)
5716 # Test whether the compiler implicitly links with -lc since on some
5717 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5718 # to ld, don't add -lc before -lgcc.
b0322a85
CE
5719 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5720 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5721 [$RM conftest*
5722 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5723
5724 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5725 soname=conftest
5726 lib=conftest
5727 libobjs=conftest.$ac_objext
5728 deplibs=
5729 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5730 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5731 compiler_flags=-v
5732 linker_flags=-v
5733 verstring=
5734 output_objdir=.
5735 libname=conftest
5736 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5737 _LT_TAGVAR(allow_undefined_flag, $1)=
5738 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5739 then
5740 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5741 else
5742 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5743 fi
5744 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5745 else
5746 cat conftest.err 1>&5
5747 fi
5748 $RM conftest*
5749 ])
5750 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
8d138742
CE
5751 ;;
5752 esac
5753 fi
5754 ;;
5755esac
5756
5757_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5758 [Whether or not to add -lc for building shared libraries])
5759_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5760 [enable_shared_with_static_runtimes], [0],
5761 [Whether or not to disallow shared libs when runtime libs are static])
5762_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5763 [Compiler flag to allow reflexive dlopens])
5764_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5765 [Compiler flag to generate shared objects directly from archives])
5766_LT_TAGDECL([], [compiler_needs_object], [1],
5767 [Whether the compiler copes with passing no objects directly])
5768_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5769 [Create an old-style archive from a shared archive])
5770_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5771 [Create a temporary old-style archive to link instead of a shared archive])
5772_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5773_LT_TAGDECL([], [archive_expsym_cmds], [2])
5774_LT_TAGDECL([], [module_cmds], [2],
5775 [Commands used to build a loadable module if different from building
5776 a shared archive.])
5777_LT_TAGDECL([], [module_expsym_cmds], [2])
5778_LT_TAGDECL([], [with_gnu_ld], [1],
5779 [Whether we are building with GNU ld or not])
5780_LT_TAGDECL([], [allow_undefined_flag], [1],
5781 [Flag that allows shared libraries with undefined symbols to be built])
5782_LT_TAGDECL([], [no_undefined_flag], [1],
5783 [Flag that enforces no undefined symbols])
5784_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5785 [Flag to hardcode $libdir into a binary during linking.
5786 This must work even if $libdir does not exist])
8d138742
CE
5787_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5788 [Whether we need a single "-rpath" flag with a separated argument])
5789_LT_TAGDECL([], [hardcode_direct], [0],
5790 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5791 DIR into the resulting binary])
5792_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5793 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5794 DIR into the resulting binary and the resulting library dependency is
5795 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5796 library is relocated])
5797_LT_TAGDECL([], [hardcode_minus_L], [0],
5798 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5799 into the resulting binary])
5800_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5801 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5802 into the resulting binary])
5803_LT_TAGDECL([], [hardcode_automatic], [0],
5804 [Set to "yes" if building a shared library automatically hardcodes DIR
5805 into the library and all subsequent libraries and executables linked
5806 against it])
5807_LT_TAGDECL([], [inherit_rpath], [0],
5808 [Set to yes if linker adds runtime paths of dependent libraries
5809 to runtime path list])
5810_LT_TAGDECL([], [link_all_deplibs], [0],
5811 [Whether libtool must link a program against all its dependency libraries])
8d138742
CE
5812_LT_TAGDECL([], [always_export_symbols], [0],
5813 [Set to "yes" if exported symbols are required])
5814_LT_TAGDECL([], [export_symbols_cmds], [2],
5815 [The commands to list exported symbols])
5816_LT_TAGDECL([], [exclude_expsyms], [1],
5817 [Symbols that should not be listed in the preloaded symbols])
5818_LT_TAGDECL([], [include_expsyms], [1],
5819 [Symbols that must always be exported])
5820_LT_TAGDECL([], [prelink_cmds], [2],
5821 [Commands necessary for linking programs (against libraries) with templates])
b0322a85
CE
5822_LT_TAGDECL([], [postlink_cmds], [2],
5823 [Commands necessary for finishing linking programs])
8d138742
CE
5824_LT_TAGDECL([], [file_list_spec], [1],
5825 [Specify filename containing input files])
5826dnl FIXME: Not yet implemented
5827dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5828dnl [Compiler flag to generate thread safe objects])
5829])# _LT_LINKER_SHLIBS
5830
5831
5832# _LT_LANG_C_CONFIG([TAG])
5833# ------------------------
5834# Ensure that the configuration variables for a C compiler are suitably
5835# defined. These variables are subsequently used by _LT_CONFIG to write
5836# the compiler configuration to `libtool'.
5837m4_defun([_LT_LANG_C_CONFIG],
5838[m4_require([_LT_DECL_EGREP])dnl
5839lt_save_CC="$CC"
5840AC_LANG_PUSH(C)
5841
5842# Source file extension for C test sources.
5843ac_ext=c
5844
5845# Object file extension for compiled C test sources.
5846objext=o
5847_LT_TAGVAR(objext, $1)=$objext
5848
5849# Code to be used in simple compile tests
5850lt_simple_compile_test_code="int some_variable = 0;"
5851
5852# Code to be used in simple link tests
5853lt_simple_link_test_code='int main(){return(0);}'
5854
5855_LT_TAG_COMPILER
5856# Save the default compiler, since it gets overwritten when the other
5857# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5858compiler_DEFAULT=$CC
5859
5860# save warnings/boilerplate of simple test code
5861_LT_COMPILER_BOILERPLATE
5862_LT_LINKER_BOILERPLATE
5863
5864if test -n "$compiler"; then
5865 _LT_COMPILER_NO_RTTI($1)
5866 _LT_COMPILER_PIC($1)
5867 _LT_COMPILER_C_O($1)
5868 _LT_COMPILER_FILE_LOCKS($1)
5869 _LT_LINKER_SHLIBS($1)
5870 _LT_SYS_DYNAMIC_LINKER($1)
5871 _LT_LINKER_HARDCODE_LIBPATH($1)
5872 LT_SYS_DLOPEN_SELF
5873 _LT_CMD_STRIPLIB
5874
5875 # Report which library types will actually be built
5876 AC_MSG_CHECKING([if libtool supports shared libraries])
5877 AC_MSG_RESULT([$can_build_shared])
5878
5879 AC_MSG_CHECKING([whether to build shared libraries])
5880 test "$can_build_shared" = "no" && enable_shared=no
5881
5882 # On AIX, shared libraries and static libraries use the same namespace, and
5883 # are all built from PIC.
5884 case $host_os in
5885 aix3*)
5886 test "$enable_shared" = yes && enable_static=no
5887 if test -n "$RANLIB"; then
5888 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5889 postinstall_cmds='$RANLIB $lib'
5890 fi
5891 ;;
5892
5893 aix[[4-9]]*)
5894 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5895 test "$enable_shared" = yes && enable_static=no
5896 fi
5897 ;;
5898 esac
5899 AC_MSG_RESULT([$enable_shared])
5900
5901 AC_MSG_CHECKING([whether to build static libraries])
5902 # Make sure either enable_shared or enable_static is yes.
5903 test "$enable_shared" = yes || enable_static=yes
5904 AC_MSG_RESULT([$enable_static])
5905
5906 _LT_CONFIG($1)
5907fi
5908AC_LANG_POP
5909CC="$lt_save_CC"
5910])# _LT_LANG_C_CONFIG
5911
5912
8d138742
CE
5913# _LT_LANG_CXX_CONFIG([TAG])
5914# --------------------------
5915# Ensure that the configuration variables for a C++ compiler are suitably
5916# defined. These variables are subsequently used by _LT_CONFIG to write
5917# the compiler configuration to `libtool'.
5918m4_defun([_LT_LANG_CXX_CONFIG],
b0322a85 5919[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8d138742 5920m4_require([_LT_DECL_EGREP])dnl
b0322a85
CE
5921m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5922if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5923 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5924 (test "X$CXX" != "Xg++"))) ; then
5925 AC_PROG_CXXCPP
5926else
5927 _lt_caught_CXX_error=yes
5928fi
8d138742
CE
5929
5930AC_LANG_PUSH(C++)
5931_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5932_LT_TAGVAR(allow_undefined_flag, $1)=
5933_LT_TAGVAR(always_export_symbols, $1)=no
5934_LT_TAGVAR(archive_expsym_cmds, $1)=
5935_LT_TAGVAR(compiler_needs_object, $1)=no
5936_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5937_LT_TAGVAR(hardcode_direct, $1)=no
5938_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5939_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
5940_LT_TAGVAR(hardcode_libdir_separator, $1)=
5941_LT_TAGVAR(hardcode_minus_L, $1)=no
5942_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5943_LT_TAGVAR(hardcode_automatic, $1)=no
5944_LT_TAGVAR(inherit_rpath, $1)=no
5945_LT_TAGVAR(module_cmds, $1)=
5946_LT_TAGVAR(module_expsym_cmds, $1)=
5947_LT_TAGVAR(link_all_deplibs, $1)=unknown
5948_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
5949_LT_TAGVAR(reload_flag, $1)=$reload_flag
5950_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
5951_LT_TAGVAR(no_undefined_flag, $1)=
5952_LT_TAGVAR(whole_archive_flag_spec, $1)=
5953_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5954
5955# Source file extension for C++ test sources.
5956ac_ext=cpp
5957
5958# Object file extension for compiled C++ test sources.
5959objext=o
5960_LT_TAGVAR(objext, $1)=$objext
5961
5962# No sense in running all these tests if we already determined that
5963# the CXX compiler isn't working. Some variables (like enable_shared)
5964# are currently assumed to apply to all compilers on this platform,
5965# and will be corrupted by setting them based on a non-working compiler.
5966if test "$_lt_caught_CXX_error" != yes; then
5967 # Code to be used in simple compile tests
5968 lt_simple_compile_test_code="int some_variable = 0;"
5969
5970 # Code to be used in simple link tests
5971 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5972
5973 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5974 _LT_TAG_COMPILER
5975
5976 # save warnings/boilerplate of simple test code
5977 _LT_COMPILER_BOILERPLATE
5978 _LT_LINKER_BOILERPLATE
5979
5980 # Allow CC to be a program name with arguments.
5981 lt_save_CC=$CC
b0322a85 5982 lt_save_CFLAGS=$CFLAGS
8d138742
CE
5983 lt_save_LD=$LD
5984 lt_save_GCC=$GCC
5985 GCC=$GXX
5986 lt_save_with_gnu_ld=$with_gnu_ld
5987 lt_save_path_LD=$lt_cv_path_LD
5988 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5989 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5990 else
5991 $as_unset lt_cv_prog_gnu_ld
5992 fi
5993 if test -n "${lt_cv_path_LDCXX+set}"; then
5994 lt_cv_path_LD=$lt_cv_path_LDCXX
5995 else
5996 $as_unset lt_cv_path_LD
5997 fi
5998 test -z "${LDCXX+set}" || LD=$LDCXX
5999 CC=${CXX-"c++"}
b0322a85 6000 CFLAGS=$CXXFLAGS
8d138742
CE
6001 compiler=$CC
6002 _LT_TAGVAR(compiler, $1)=$CC
6003 _LT_CC_BASENAME([$compiler])
6004
6005 if test -n "$compiler"; then
6006 # We don't want -fno-exception when compiling C++ code, so set the
6007 # no_builtin_flag separately
6008 if test "$GXX" = yes; then
6009 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6010 else
6011 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6012 fi
6013
6014 if test "$GXX" = yes; then
6015 # Set up default GNU C++ configuration
6016
6017 LT_PATH_LD
6018
6019 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6020 # archiving commands below assume that GNU ld is being used.
6021 if test "$with_gnu_ld" = yes; then
b0322a85
CE
6022 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6023 _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
CE
6024
6025 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6026 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6027
6028 # If archive_cmds runs LD, not CC, wlarc should be empty
6029 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6030 # investigate it a little bit more. (MM)
6031 wlarc='${wl}'
6032
6033 # ancient GNU ld didn't support --whole-archive et. al.
6034 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6035 $GREP 'no-whole-archive' > /dev/null; then
6036 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6037 else
6038 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6039 fi
6040 else
6041 with_gnu_ld=no
6042 wlarc=
6043
6044 # A generic and very simple default shared library creation
6045 # command for GNU C++ for the case where it uses the native
6046 # linker, instead of GNU ld. If possible, this setting should
6047 # overridden to take advantage of the native linker features on
6048 # the platform it is being used on.
6049 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050 fi
6051
6052 # Commands to make compiler produce verbose output that lists
6053 # what "hidden" libraries, object files and flags are used when
6054 # linking a shared library.
b0322a85 6055 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
6056
6057 else
6058 GXX=no
6059 with_gnu_ld=no
6060 wlarc=
6061 fi
6062
6063 # PORTME: fill in a description of your system's C++ link characteristics
6064 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6065 _LT_TAGVAR(ld_shlibs, $1)=yes
6066 case $host_os in
6067 aix3*)
6068 # FIXME: insert proper C++ library support
6069 _LT_TAGVAR(ld_shlibs, $1)=no
6070 ;;
6071 aix[[4-9]]*)
6072 if test "$host_cpu" = ia64; then
6073 # On IA64, the linker does run time linking by default, so we don't
6074 # have to do anything special.
6075 aix_use_runtimelinking=no
6076 exp_sym_flag='-Bexport'
6077 no_entry_flag=""
6078 else
6079 aix_use_runtimelinking=no
6080
6081 # Test if we are trying to use run time linking or normal
6082 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6083 # need to do runtime linking.
6084 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6085 for ld_flag in $LDFLAGS; do
6086 case $ld_flag in
6087 *-brtl*)
6088 aix_use_runtimelinking=yes
6089 break
6090 ;;
6091 esac
6092 done
6093 ;;
6094 esac
6095
6096 exp_sym_flag='-bexport'
6097 no_entry_flag='-bnoentry'
6098 fi
6099
6100 # When large executables or shared objects are built, AIX ld can
6101 # have problems creating the table of contents. If linking a library
6102 # or program results in "error TOC overflow" add -mminimal-toc to
6103 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6104 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6105
6106 _LT_TAGVAR(archive_cmds, $1)=''
6107 _LT_TAGVAR(hardcode_direct, $1)=yes
6108 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6109 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6110 _LT_TAGVAR(link_all_deplibs, $1)=yes
6111 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6112
6113 if test "$GXX" = yes; then
6114 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6115 # We only want to do this on AIX 4.2 and lower, the check
6116 # below for broken collect2 doesn't work under 4.3+
6117 collect2name=`${CC} -print-prog-name=collect2`
6118 if test -f "$collect2name" &&
6119 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6120 then
6121 # We have reworked collect2
6122 :
6123 else
6124 # We have old collect2
6125 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6126 # It fails to find uninstalled libraries when the uninstalled
6127 # path is not listed in the libpath. Setting hardcode_minus_L
6128 # to unsupported forces relinking
6129 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6130 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6131 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6132 fi
6133 esac
6134 shared_flag='-shared'
6135 if test "$aix_use_runtimelinking" = yes; then
6136 shared_flag="$shared_flag "'${wl}-G'
6137 fi
6138 else
6139 # not using gcc
6140 if test "$host_cpu" = ia64; then
6141 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6142 # chokes on -Wl,-G. The following line is correct:
6143 shared_flag='-G'
6144 else
6145 if test "$aix_use_runtimelinking" = yes; then
6146 shared_flag='${wl}-G'
6147 else
6148 shared_flag='${wl}-bM:SRE'
6149 fi
6150 fi
6151 fi
6152
6153 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6154 # It seems that -bexpall does not export symbols beginning with
6155 # underscore (_), so it is better to generate a list of symbols to
6156 # export.
6157 _LT_TAGVAR(always_export_symbols, $1)=yes
6158 if test "$aix_use_runtimelinking" = yes; then
6159 # Warning - without using the other runtime loading flags (-brtl),
6160 # -berok will link without error, but may produce a broken library.
6161 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6162 # Determine the default libpath from the value encoded in an empty
6163 # executable.
b0322a85 6164 _LT_SYS_MODULE_PATH_AIX([$1])
8d138742
CE
6165 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6166
b0322a85 6167 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8d138742
CE
6168 else
6169 if test "$host_cpu" = ia64; then
6170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6171 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6172 _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"
6173 else
6174 # Determine the default libpath from the value encoded in an
6175 # empty executable.
b0322a85 6176 _LT_SYS_MODULE_PATH_AIX([$1])
8d138742
CE
6177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6178 # Warning - without using the other run time loading flags,
6179 # -berok will link without error, but may produce a broken library.
6180 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6181 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
b0322a85
CE
6182 if test "$with_gnu_ld" = yes; then
6183 # We only use this code for GNU lds that support --whole-archive.
6184 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6185 else
6186 # Exported symbols can be pulled into shared objects from archives
6187 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6188 fi
8d138742
CE
6189 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6190 # This is similar to how AIX traditionally builds its shared
6191 # libraries.
6192 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6193 fi
6194 fi
6195 ;;
6196
6197 beos*)
6198 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6199 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6200 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6201 # support --undefined. This deserves some investigation. FIXME
6202 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6203 else
6204 _LT_TAGVAR(ld_shlibs, $1)=no
6205 fi
d9898ee8 6206 ;;
8d138742
CE
6207
6208 chorus*)
6209 case $cc_basename in
6210 *)
6211 # FIXME: insert proper C++ library support
6212 _LT_TAGVAR(ld_shlibs, $1)=no
6213 ;;
6214 esac
6215 ;;
6216
6217 cygwin* | mingw* | pw32* | cegcc*)
b0322a85
CE
6218 case $GXX,$cc_basename in
6219 ,cl* | no,cl*)
6220 # Native MSVC
6221 # hardcode_libdir_flag_spec is actually meaningless, as there is
6222 # no search path for DLLs.
6223 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6224 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6225 _LT_TAGVAR(always_export_symbols, $1)=yes
6226 _LT_TAGVAR(file_list_spec, $1)='@'
6227 # Tell ltmain to make .lib files, not .a files.
6228 libext=lib
6229 # Tell ltmain to make .dll files, not .so files.
6230 shrext_cmds=".dll"
6231 # FIXME: Setting linknames here is a bad hack.
6232 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6233 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6234 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6235 else
6236 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6237 fi~
6238 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6239 linknames='
6240 # The linker will not automatically build a static lib if we build a DLL.
6241 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6242 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6243 # Don't use ranlib
6244 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6245 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6246 lt_tool_outputfile="@TOOL_OUTPUT@"~
6247 case $lt_outputfile in
6248 *.exe|*.EXE) ;;
6249 *)
6250 lt_outputfile="$lt_outputfile.exe"
6251 lt_tool_outputfile="$lt_tool_outputfile.exe"
6252 ;;
6253 esac~
6254 func_to_tool_file "$lt_outputfile"~
6255 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6256 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6257 $RM "$lt_outputfile.manifest";
6258 fi'
6259 ;;
6260 *)
6261 # g++
6262 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6263 # as there is no search path for DLLs.
6264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6265 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6266 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6267 _LT_TAGVAR(always_export_symbols, $1)=no
6268 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6269
6270 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6271 _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'
6272 # If the export-symbols file already is a .def file (1st line
6273 # is EXPORTS), use it as is; otherwise, prepend...
6274 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6275 cp $export_symbols $output_objdir/$soname.def;
6276 else
6277 echo EXPORTS > $output_objdir/$soname.def;
6278 cat $export_symbols >> $output_objdir/$soname.def;
6279 fi~
6280 $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'
6281 else
6282 _LT_TAGVAR(ld_shlibs, $1)=no
6283 fi
6284 ;;
6285 esac
6286 ;;
8d138742
CE
6287 darwin* | rhapsody*)
6288 _LT_DARWIN_LINKER_FEATURES($1)
d9898ee8 6289 ;;
8d138742
CE
6290
6291 dgux*)
6292 case $cc_basename in
6293 ec++*)
6294 # FIXME: insert proper C++ library support
6295 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6296 ;;
8d138742
CE
6297 ghcx*)
6298 # Green Hills C++ Compiler
6299 # FIXME: insert proper C++ library support
6300 _LT_TAGVAR(ld_shlibs, $1)=no
6301 ;;
6302 *)
6303 # FIXME: insert proper C++ library support
6304 _LT_TAGVAR(ld_shlibs, $1)=no
6305 ;;
6306 esac
6307 ;;
6308
b0322a85 6309 freebsd2.*)
8d138742
CE
6310 # C++ shared libraries reported to be fairly broken before
6311 # switch to ELF
6312 _LT_TAGVAR(ld_shlibs, $1)=no
6313 ;;
6314
6315 freebsd-elf*)
6316 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6317 ;;
6318
6319 freebsd* | dragonfly*)
6320 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6321 # conventions
6322 _LT_TAGVAR(ld_shlibs, $1)=yes
6323 ;;
6324
6325 gnu*)
6326 ;;
6327
b0322a85
CE
6328 haiku*)
6329 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6330 _LT_TAGVAR(link_all_deplibs, $1)=yes
6331 ;;
6332
8d138742
CE
6333 hpux9*)
6334 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6335 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6336 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6337 _LT_TAGVAR(hardcode_direct, $1)=yes
6338 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6339 # but as the default
6340 # location of the library.
6341
6342 case $cc_basename in
6343 CC*)
6344 # FIXME: insert proper C++ library support
6345 _LT_TAGVAR(ld_shlibs, $1)=no
6346 ;;
6347 aCC*)
6348 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6349 # Commands to make compiler produce verbose output that lists
6350 # what "hidden" libraries, object files and flags are used when
6351 # linking a shared library.
6352 #
6353 # There doesn't appear to be a way to prevent this compiler from
6354 # explicitly linking system object files so we need to strip them
6355 # from the output so that they don't get included in the library
6356 # dependencies.
b0322a85 6357 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
6358 ;;
6359 *)
6360 if test "$GXX" = yes; then
b0322a85 6361 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8d138742
CE
6362 else
6363 # FIXME: insert proper C++ library support
6364 _LT_TAGVAR(ld_shlibs, $1)=no
6365 fi
6366 ;;
6367 esac
6368 ;;
6369
6370 hpux10*|hpux11*)
6371 if test $with_gnu_ld = no; then
6372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6373 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6374
6375 case $host_cpu in
6376 hppa*64*|ia64*)
6377 ;;
6378 *)
6379 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6380 ;;
6381 esac
6382 fi
6383 case $host_cpu in
6384 hppa*64*|ia64*)
6385 _LT_TAGVAR(hardcode_direct, $1)=no
6386 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6387 ;;
6388 *)
6389 _LT_TAGVAR(hardcode_direct, $1)=yes
6390 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6391 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6392 # but as the default
6393 # location of the library.
6394 ;;
6395 esac
6396
6397 case $cc_basename in
6398 CC*)
6399 # FIXME: insert proper C++ library support
6400 _LT_TAGVAR(ld_shlibs, $1)=no
6401 ;;
6402 aCC*)
d9898ee8 6403 case $host_cpu in
8d138742
CE
6404 hppa*64*)
6405 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6406 ;;
6407 ia64*)
6408 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6409 ;;
6410 *)
6411 _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'
6412 ;;
d9898ee8 6413 esac
8d138742
CE
6414 # Commands to make compiler produce verbose output that lists
6415 # what "hidden" libraries, object files and flags are used when
6416 # linking a shared library.
6417 #
6418 # There doesn't appear to be a way to prevent this compiler from
6419 # explicitly linking system object files so we need to strip them
6420 # from the output so that they don't get included in the library
6421 # dependencies.
b0322a85 6422 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 6423 ;;
8d138742
CE
6424 *)
6425 if test "$GXX" = yes; then
6426 if test $with_gnu_ld = no; then
6427 case $host_cpu in
6428 hppa*64*)
6429 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6430 ;;
6431 ia64*)
b0322a85 6432 _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
6433 ;;
6434 *)
b0322a85 6435 _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
6436 ;;
6437 esac
6438 fi
6439 else
6440 # FIXME: insert proper C++ library support
6441 _LT_TAGVAR(ld_shlibs, $1)=no
6442 fi
d9898ee8 6443 ;;
8d138742
CE
6444 esac
6445 ;;
6446
6447 interix[[3-9]]*)
6448 _LT_TAGVAR(hardcode_direct, $1)=no
6449 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6450 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6451 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6452 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6453 # Instead, shared libraries are loaded at an image base (0x10000000 by
6454 # default) and relocated if they conflict, which is a slow very memory
6455 # consuming and fragmenting process. To avoid this, we pick a random,
6456 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6457 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6458 _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'
6459 _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 6460 ;;
8d138742
CE
6461 irix5* | irix6*)
6462 case $cc_basename in
6463 CC*)
6464 # SGI C++
b0322a85 6465 _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
6466
6467 # Archives containing C++ object files must be created using
6468 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6469 # necessary to make sure instantiated templates are included
6470 # in the archive.
6471 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
d9898ee8 6472 ;;
8d138742
CE
6473 *)
6474 if test "$GXX" = yes; then
6475 if test "$with_gnu_ld" = no; then
b0322a85 6476 _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 6477 else
b0322a85 6478 _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
6479 fi
6480 fi
6481 _LT_TAGVAR(link_all_deplibs, $1)=yes
d9898ee8 6482 ;;
8d138742
CE
6483 esac
6484 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6485 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6486 _LT_TAGVAR(inherit_rpath, $1)=yes
6487 ;;
6488
b0322a85 6489 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
6490 case $cc_basename in
6491 KCC*)
6492 # Kuck and Associates, Inc. (KAI) C++ Compiler
6493
6494 # KCC will only create a shared library if the output file
6495 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6496 # to its proper name (with version) after linking.
6497 _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'
6498 _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'
6499 # Commands to make compiler produce verbose output that lists
6500 # what "hidden" libraries, object files and flags are used when
6501 # linking a shared library.
6502 #
6503 # There doesn't appear to be a way to prevent this compiler from
6504 # explicitly linking system object files so we need to strip them
6505 # from the output so that they don't get included in the library
6506 # dependencies.
b0322a85 6507 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
CE
6508
6509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6510 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6511
6512 # Archives containing C++ object files must be created using
6513 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6514 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
d9898ee8 6515 ;;
8d138742 6516 icpc* | ecpc* )
d9898ee8 6517 # Intel C++
8d138742
CE
6518 with_gnu_ld=yes
6519 # version 8.0 and above of icpc choke on multiply defined symbols
6520 # if we add $predep_objects and $postdep_objects, however 7.1 and
6521 # earlier do not add the objects themselves.
6522 case `$CC -V 2>&1` in
6523 *"Version 7."*)
6524 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6525 _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'
6526 ;;
6527 *) # Version 8.0 or newer
6528 tmp_idyn=
6529 case $host_cpu in
6530 ia64*) tmp_idyn=' -i_dynamic';;
6531 esac
6532 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6533 _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'
6534 ;;
6535 esac
6536 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6538 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6539 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
d9898ee8 6540 ;;
8d138742
CE
6541 pgCC* | pgcpp*)
6542 # Portland Group C++ compiler
6543 case `$CC -V` in
b0322a85 6544 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8d138742
CE
6545 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6546 rm -rf $tpldir~
6547 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
b0322a85 6548 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8d138742
CE
6549 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6550 rm -rf $tpldir~
6551 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
b0322a85 6552 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8d138742
CE
6553 $RANLIB $oldlib'
6554 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6555 rm -rf $tpldir~
6556 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
b0322a85 6557 $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
CE
6558 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6559 rm -rf $tpldir~
6560 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
b0322a85 6561 $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 6562 ;;
b0322a85 6563 *) # Version 6 and above use weak symbols
8d138742
CE
6564 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6565 _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'
6566 ;;
6567 esac
6568
6569 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6570 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
b0322a85 6571 _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 6572 ;;
d9898ee8 6573 cxx*)
6574 # Compaq C++
8d138742
CE
6575 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6576 _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'
6577
6578 runpath_var=LD_RUN_PATH
6579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6580 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6581
6582 # Commands to make compiler produce verbose output that lists
6583 # what "hidden" libraries, object files and flags are used when
6584 # linking a shared library.
6585 #
6586 # There doesn't appear to be a way to prevent this compiler from
6587 # explicitly linking system object files so we need to strip them
6588 # from the output so that they don't get included in the library
6589 # dependencies.
b0322a85 6590 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 6591 ;;
b0322a85 6592 xl* | mpixl* | bgxl*)
8d138742
CE
6593 # IBM XL 8.0 on PPC, with GNU ld
6594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6595 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6596 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6597 if test "x$supports_anon_versioning" = xyes; then
6598 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6599 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6600 echo "local: *; };" >> $output_objdir/$libname.ver~
6601 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6602 fi
d9898ee8 6603 ;;
6604 *)
ac40fd9e 6605 case `$CC -V 2>&1 | sed 5q` in
6606 *Sun\ C*)
6607 # Sun C++ 5.9
8d138742
CE
6608 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6609 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6610 _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'
6611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
b0322a85 6612 _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
6613 _LT_TAGVAR(compiler_needs_object, $1)=yes
6614
6615 # Not sure whether something based on
6616 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6617 # would be better.
b0322a85 6618 output_verbose_link_cmd='func_echo_all'
8d138742
CE
6619
6620 # Archives containing C++ object files must be created using
6621 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6622 # necessary to make sure instantiated templates are included
6623 # in the archive.
6624 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
ac40fd9e 6625 ;;
6626 esac
d9898ee8 6627 ;;
6628 esac
6629 ;;
8d138742 6630
d9898ee8 6631 lynxos*)
8d138742
CE
6632 # FIXME: insert proper C++ library support
6633 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6634 ;;
8d138742 6635
d9898ee8 6636 m88k*)
8d138742
CE
6637 # FIXME: insert proper C++ library support
6638 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6639 ;;
8d138742 6640
d9898ee8 6641 mvs*)
8d138742
CE
6642 case $cc_basename in
6643 cxx*)
6644 # FIXME: insert proper C++ library support
6645 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6646 ;;
6647 *)
8d138742
CE
6648 # FIXME: insert proper C++ library support
6649 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6650 ;;
6651 esac
6652 ;;
8d138742 6653
d9898ee8 6654 netbsd*)
8d138742
CE
6655 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6656 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6657 wlarc=
6658 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6659 _LT_TAGVAR(hardcode_direct, $1)=yes
6660 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6661 fi
6662 # Workaround some broken pre-1.5 toolchains
6663 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6664 ;;
6665
6666 *nto* | *qnx*)
6667 _LT_TAGVAR(ld_shlibs, $1)=yes
6668 ;;
6669
6670 openbsd2*)
6671 # C++ shared libraries are fairly broken
6672 _LT_TAGVAR(ld_shlibs, $1)=no
6673 ;;
6674
6675 openbsd*)
6676 if test -f /usr/libexec/ld.so; then
6677 _LT_TAGVAR(hardcode_direct, $1)=yes
6678 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6679 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6680 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6681 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6682 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6683 _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'
6684 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6685 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6686 fi
b0322a85 6687 output_verbose_link_cmd=func_echo_all
8d138742
CE
6688 else
6689 _LT_TAGVAR(ld_shlibs, $1)=no
6690 fi
d9898ee8 6691 ;;
8d138742 6692
d9898ee8 6693 osf3* | osf4* | osf5*)
8d138742
CE
6694 case $cc_basename in
6695 KCC*)
6696 # Kuck and Associates, Inc. (KAI) C++ Compiler
6697
6698 # KCC will only create a shared library if the output file
6699 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6700 # to its proper name (with version) after linking.
6701 _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'
6702
6703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6704 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6705
6706 # Archives containing C++ object files must be created using
6707 # the KAI C++ compiler.
6708 case $host in
6709 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6710 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6711 esac
d9898ee8 6712 ;;
8d138742 6713 RCC*)
d9898ee8 6714 # Rational C++ 2.4.1
8d138742
CE
6715 # FIXME: insert proper C++ library support
6716 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6717 ;;
8d138742
CE
6718 cxx*)
6719 case $host in
6720 osf3*)
6721 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
b0322a85 6722 _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'
8d138742
CE
6723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6724 ;;
6725 *)
6726 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
b0322a85 6727 _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
CE
6728 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6729 echo "-hidden">> $lib.exp~
b0322a85 6730 $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~
8d138742
CE
6731 $RM $lib.exp'
6732 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6733 ;;
6734 esac
6735
6736 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6737
6738 # Commands to make compiler produce verbose output that lists
6739 # what "hidden" libraries, object files and flags are used when
6740 # linking a shared library.
6741 #
6742 # There doesn't appear to be a way to prevent this compiler from
6743 # explicitly linking system object files so we need to strip them
6744 # from the output so that they don't get included in the library
6745 # dependencies.
b0322a85 6746 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 6747 ;;
6748 *)
8d138742
CE
6749 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6750 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6751 case $host in
6752 osf3*)
b0322a85 6753 _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
6754 ;;
6755 *)
b0322a85 6756 _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
6757 ;;
6758 esac
6759
6760 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6761 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6762
6763 # Commands to make compiler produce verbose output that lists
6764 # what "hidden" libraries, object files and flags are used when
6765 # linking a shared library.
b0322a85 6766 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
6767
6768 else
6769 # FIXME: insert proper C++ library support
6770 _LT_TAGVAR(ld_shlibs, $1)=no
6771 fi
d9898ee8 6772 ;;
8d138742
CE
6773 esac
6774 ;;
6775
d9898ee8 6776 psos*)
8d138742
CE
6777 # FIXME: insert proper C++ library support
6778 _LT_TAGVAR(ld_shlibs, $1)=no
6779 ;;
6780
6781 sunos4*)
6782 case $cc_basename in
6783 CC*)
6784 # Sun C++ 4.x
6785 # FIXME: insert proper C++ library support
6786 _LT_TAGVAR(ld_shlibs, $1)=no
6787 ;;
6788 lcc*)
6789 # Lucid
6790 # FIXME: insert proper C++ library support
6791 _LT_TAGVAR(ld_shlibs, $1)=no
6792 ;;
6793 *)
6794 # FIXME: insert proper C++ library support
6795 _LT_TAGVAR(ld_shlibs, $1)=no
6796 ;;
6797 esac
6798 ;;
6799
d9898ee8 6800 solaris*)
8d138742 6801 case $cc_basename in
b0322a85 6802 CC* | sunCC*)
d9898ee8 6803 # Sun C++ 4.2, 5.x and Centerline C++
8d138742
CE
6804 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6805 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6806 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6807 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6808 $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'
6809
6810 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6811 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6812 case $host_os in
6813 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6814 *)
6815 # The compiler driver will combine and reorder linker options,
6816 # but understands `-z linker_flag'.
6817 # Supported since Solaris 2.6 (maybe 2.5.1?)
6818 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6819 ;;
6820 esac
6821 _LT_TAGVAR(link_all_deplibs, $1)=yes
6822
b0322a85 6823 output_verbose_link_cmd='func_echo_all'
8d138742
CE
6824
6825 # Archives containing C++ object files must be created using
6826 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6827 # necessary to make sure instantiated templates are included
6828 # in the archive.
6829 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
d9898ee8 6830 ;;
8d138742 6831 gcx*)
d9898ee8 6832 # Green Hills C++ Compiler
8d138742
CE
6833 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6834
6835 # The C++ compiler must be used to create the archive.
6836 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
d9898ee8 6837 ;;
8d138742
CE
6838 *)
6839 # GNU C++ compiler with Solaris linker
6840 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6841 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6842 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
b0322a85 6843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8d138742 6844 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
b0322a85 6845 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8d138742
CE
6846
6847 # Commands to make compiler produce verbose output that lists
6848 # what "hidden" libraries, object files and flags are used when
6849 # linking a shared library.
b0322a85 6850 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
6851 else
6852 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6853 # platform.
6854 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6855 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6856 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6857
6858 # Commands to make compiler produce verbose output that lists
6859 # what "hidden" libraries, object files and flags are used when
6860 # linking a shared library.
b0322a85 6861 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8d138742
CE
6862 fi
6863
6864 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6865 case $host_os in
6866 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6867 *)
6868 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6869 ;;
6870 esac
6871 fi
d9898ee8 6872 ;;
8d138742
CE
6873 esac
6874 ;;
6875
6876 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6877 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6878 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6879 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6880 runpath_var='LD_RUN_PATH'
6881
6882 case $cc_basename in
6883 CC*)
6884 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6885 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6886 ;;
6887 *)
6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6889 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6890 ;;
6891 esac
6892 ;;
6893
6894 sysv5* | sco3.2v5* | sco5v6*)
6895 # Note: We can NOT use -z defs as we might desire, because we do not
6896 # link with -lc, and that would cause any symbols used from libc to
6897 # always be unresolved, which means just about no library would
6898 # ever link correctly. If we're not using GNU ld we use -z text
6899 # though, which does catch some bad symbols but isn't as heavy-handed
6900 # as -z defs.
6901 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6902 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6903 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6904 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6906 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6907 _LT_TAGVAR(link_all_deplibs, $1)=yes
6908 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6909 runpath_var='LD_RUN_PATH'
6910
d9898ee8 6911 case $cc_basename in
8d138742
CE
6912 CC*)
6913 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6914 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
b0322a85
CE
6915 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6916 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6917 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6918 '"$_LT_TAGVAR(reload_cmds, $1)"
d9898ee8 6919 ;;
6920 *)
8d138742
CE
6921 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6922 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
d9898ee8 6923 ;;
6924 esac
8d138742
CE
6925 ;;
6926
d9898ee8 6927 tandem*)
8d138742
CE
6928 case $cc_basename in
6929 NCC*)
d9898ee8 6930 # NonStop-UX NCC 3.20
8d138742
CE
6931 # FIXME: insert proper C++ library support
6932 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6933 ;;
8d138742
CE
6934 *)
6935 # FIXME: insert proper C++ library support
6936 _LT_TAGVAR(ld_shlibs, $1)=no
d9898ee8 6937 ;;
8d138742
CE
6938 esac
6939 ;;
6940
d9898ee8 6941 vxworks*)
8d138742
CE
6942 # FIXME: insert proper C++ library support
6943 _LT_TAGVAR(ld_shlibs, $1)=no
6944 ;;
6945
d9898ee8 6946 *)
8d138742
CE
6947 # FIXME: insert proper C++ library support
6948 _LT_TAGVAR(ld_shlibs, $1)=no
6949 ;;
6950 esac
6951
6952 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6953 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6954
6955 _LT_TAGVAR(GCC, $1)="$GXX"
6956 _LT_TAGVAR(LD, $1)="$LD"
6957
6958 ## CAVEAT EMPTOR:
6959 ## There is no encapsulation within the following macros, do not change
6960 ## the running order or otherwise move them around unless you know exactly
6961 ## what you are doing...
6962 _LT_SYS_HIDDEN_LIBDEPS($1)
6963 _LT_COMPILER_PIC($1)
6964 _LT_COMPILER_C_O($1)
6965 _LT_COMPILER_FILE_LOCKS($1)
6966 _LT_LINKER_SHLIBS($1)
6967 _LT_SYS_DYNAMIC_LINKER($1)
6968 _LT_LINKER_HARDCODE_LIBPATH($1)
6969
6970 _LT_CONFIG($1)
6971 fi # test -n "$compiler"
6972
6973 CC=$lt_save_CC
b0322a85 6974 CFLAGS=$lt_save_CFLAGS
8d138742
CE
6975 LDCXX=$LD
6976 LD=$lt_save_LD
6977 GCC=$lt_save_GCC
6978 with_gnu_ld=$lt_save_with_gnu_ld
6979 lt_cv_path_LDCXX=$lt_cv_path_LD
6980 lt_cv_path_LD=$lt_save_path_LD
6981 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6982 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6983fi # test "$_lt_caught_CXX_error" != yes
6984
6985AC_LANG_POP
6986])# _LT_LANG_CXX_CONFIG
6987
6988
b0322a85
CE
6989# _LT_FUNC_STRIPNAME_CNF
6990# ----------------------
6991# func_stripname_cnf prefix suffix name
6992# strip PREFIX and SUFFIX off of NAME.
6993# PREFIX and SUFFIX must not contain globbing or regex special
6994# characters, hashes, percent signs, but SUFFIX may contain a leading
6995# dot (in which case that matches only a dot).
6996#
6997# This function is identical to the (non-XSI) version of func_stripname,
6998# except this one can be used by m4 code that may be executed by configure,
6999# rather than the libtool script.
7000m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7001AC_REQUIRE([_LT_DECL_SED])
7002AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7003func_stripname_cnf ()
7004{
7005 case ${2} in
7006 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7007 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7008 esac
7009} # func_stripname_cnf
7010])# _LT_FUNC_STRIPNAME_CNF
7011
8d138742
CE
7012# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7013# ---------------------------------
7014# Figure out "hidden" library dependencies from verbose
7015# compiler output when linking a shared library.
7016# Parse the compiler output and extract the necessary
7017# objects, libraries and library flags.
7018m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7019[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
b0322a85 7020AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8d138742
CE
7021# Dependencies to place before and after the object being linked:
7022_LT_TAGVAR(predep_objects, $1)=
7023_LT_TAGVAR(postdep_objects, $1)=
7024_LT_TAGVAR(predeps, $1)=
7025_LT_TAGVAR(postdeps, $1)=
7026_LT_TAGVAR(compiler_lib_search_path, $1)=
7027
7028dnl we can't use the lt_simple_compile_test_code here,
7029dnl because it contains code intended for an executable,
7030dnl not a library. It's possible we should let each
7031dnl tag define a new lt_????_link_test_code variable,
7032dnl but it's only used here...
7033m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7034int a;
7035void foo (void) { a = 0; }
7036_LT_EOF
7037], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7038class Foo
7039{
7040public:
7041 Foo (void) { a = 0; }
7042private:
7043 int a;
7044};
7045_LT_EOF
7046], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7047 subroutine foo
7048 implicit none
7049 integer*4 a
7050 a=0
7051 return
7052 end
7053_LT_EOF
7054], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7055 subroutine foo
7056 implicit none
7057 integer a
7058 a=0
7059 return
7060 end
7061_LT_EOF
7062], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7063public class foo {
7064 private int a;
7065 public void bar (void) {
7066 a = 0;
7067 }
7068};
7069_LT_EOF
b0322a85
CE
7070], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7071package foo
7072func foo() {
7073}
7074_LT_EOF
8d138742 7075])
b0322a85
CE
7076
7077_lt_libdeps_save_CFLAGS=$CFLAGS
7078case "$CC $CFLAGS " in #(
7079*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7080*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7081*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7082esac
7083
8d138742
CE
7084dnl Parse the compiler output and extract the necessary
7085dnl objects, libraries and library flags.
7086if AC_TRY_EVAL(ac_compile); then
7087 # Parse the compiler output and extract the necessary
7088 # objects, libraries and library flags.
7089
7090 # Sentinel used to keep track of whether or not we are before
7091 # the conftest object file.
7092 pre_test_object_deps_done=no
7093
7094 for p in `eval "$output_verbose_link_cmd"`; do
b0322a85 7095 case ${prev}${p} in
8d138742
CE
7096
7097 -L* | -R* | -l*)
7098 # Some compilers place space between "-{L,R}" and the path.
7099 # Remove the space.
7100 if test $p = "-L" ||
7101 test $p = "-R"; then
7102 prev=$p
7103 continue
8d138742
CE
7104 fi
7105
b0322a85
CE
7106 # Expand the sysroot to ease extracting the directories later.
7107 if test -z "$prev"; then
7108 case $p in
7109 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7110 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7111 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7112 esac
7113 fi
7114 case $p in
7115 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7116 esac
8d138742 7117 if test "$pre_test_object_deps_done" = no; then
b0322a85
CE
7118 case ${prev} in
7119 -L | -R)
8d138742
CE
7120 # Internal compiler library paths should come after those
7121 # provided the user. The postdeps already come after the
7122 # user supplied libs so there is no need to process them.
7123 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7124 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7125 else
7126 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7127 fi
7128 ;;
7129 # The "-l" case would never come before the object being
7130 # linked, so don't bother handling this case.
7131 esac
7132 else
7133 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7134 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7135 else
7136 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7137 fi
7138 fi
b0322a85 7139 prev=
8d138742
CE
7140 ;;
7141
b0322a85 7142 *.lto.$objext) ;; # Ignore GCC LTO objects
8d138742
CE
7143 *.$objext)
7144 # This assumes that the test object file only shows up
7145 # once in the compiler output.
7146 if test "$p" = "conftest.$objext"; then
7147 pre_test_object_deps_done=yes
7148 continue
7149 fi
7150
7151 if test "$pre_test_object_deps_done" = no; then
7152 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7153 _LT_TAGVAR(predep_objects, $1)="$p"
7154 else
7155 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7156 fi
7157 else
7158 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7159 _LT_TAGVAR(postdep_objects, $1)="$p"
7160 else
7161 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7162 fi
7163 fi
7164 ;;
7165
7166 *) ;; # Ignore the rest.
7167
7168 esac
7169 done
7170
7171 # Clean up.
7172 rm -f a.out a.exe
7173else
7174 echo "libtool.m4: error: problem compiling $1 test program"
7175fi
7176
7177$RM -f confest.$objext
b0322a85 7178CFLAGS=$_lt_libdeps_save_CFLAGS
8d138742
CE
7179
7180# PORTME: override above test on systems where it is broken
7181m4_if([$1], [CXX],
7182[case $host_os in
7183interix[[3-9]]*)
7184 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7185 # hack all around it, let's just trust "g++" to DTRT.
7186 _LT_TAGVAR(predep_objects,$1)=
7187 _LT_TAGVAR(postdep_objects,$1)=
7188 _LT_TAGVAR(postdeps,$1)=
7189 ;;
7190
7191linux*)
7192 case `$CC -V 2>&1 | sed 5q` in
7193 *Sun\ C*)
7194 # Sun C++ 5.9
7195
7196 # The more standards-conforming stlport4 library is
7197 # incompatible with the Cstd library. Avoid specifying
7198 # it if it's in CXXFLAGS. Ignore libCrun as
7199 # -library=stlport4 depends on it.
7200 case " $CXX $CXXFLAGS " in
7201 *" -library=stlport4 "*)
7202 solaris_use_stlport4=yes
7203 ;;
d9898ee8 7204 esac
8d138742
CE
7205
7206 if test "$solaris_use_stlport4" != yes; then
7207 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7208 fi
7209 ;;
7210 esac
7211 ;;
7212
7213solaris*)
7214 case $cc_basename in
b0322a85 7215 CC* | sunCC*)
8d138742
CE
7216 # The more standards-conforming stlport4 library is
7217 # incompatible with the Cstd library. Avoid specifying
7218 # it if it's in CXXFLAGS. Ignore libCrun as
7219 # -library=stlport4 depends on it.
7220 case " $CXX $CXXFLAGS " in
7221 *" -library=stlport4 "*)
7222 solaris_use_stlport4=yes
7223 ;;
7224 esac
7225
7226 # Adding this requires a known-good setup of shared libraries for
7227 # Sun compiler versions before 5.6, else PIC objects from an old
7228 # archive will be linked into the output, leading to subtle bugs.
7229 if test "$solaris_use_stlport4" != yes; then
7230 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7231 fi
7232 ;;
7233 esac
7234 ;;
7235esac
7236])
7237
7238case " $_LT_TAGVAR(postdeps, $1) " in
7239*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7240esac
7241 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7242if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7243 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7244fi
7245_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7246 [The directories searched by this compiler when creating a shared library])
7247_LT_TAGDECL([], [predep_objects], [1],
7248 [Dependencies to place before and after the objects being linked to
7249 create a shared library])
7250_LT_TAGDECL([], [postdep_objects], [1])
7251_LT_TAGDECL([], [predeps], [1])
7252_LT_TAGDECL([], [postdeps], [1])
7253_LT_TAGDECL([], [compiler_lib_search_path], [1],
7254 [The library search path used internally by the compiler when linking
7255 a shared library])
7256])# _LT_SYS_HIDDEN_LIBDEPS
7257
7258
8d138742
CE
7259# _LT_LANG_F77_CONFIG([TAG])
7260# --------------------------
7261# Ensure that the configuration variables for a Fortran 77 compiler are
7262# suitably defined. These variables are subsequently used by _LT_CONFIG
7263# to write the compiler configuration to `libtool'.
7264m4_defun([_LT_LANG_F77_CONFIG],
b0322a85
CE
7265[AC_LANG_PUSH(Fortran 77)
7266if test -z "$F77" || test "X$F77" = "Xno"; then
7267 _lt_disable_F77=yes
7268fi
8d138742
CE
7269
7270_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7271_LT_TAGVAR(allow_undefined_flag, $1)=
7272_LT_TAGVAR(always_export_symbols, $1)=no
7273_LT_TAGVAR(archive_expsym_cmds, $1)=
7274_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7275_LT_TAGVAR(hardcode_direct, $1)=no
7276_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7277_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
7278_LT_TAGVAR(hardcode_libdir_separator, $1)=
7279_LT_TAGVAR(hardcode_minus_L, $1)=no
7280_LT_TAGVAR(hardcode_automatic, $1)=no
7281_LT_TAGVAR(inherit_rpath, $1)=no
7282_LT_TAGVAR(module_cmds, $1)=
7283_LT_TAGVAR(module_expsym_cmds, $1)=
7284_LT_TAGVAR(link_all_deplibs, $1)=unknown
7285_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
7286_LT_TAGVAR(reload_flag, $1)=$reload_flag
7287_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
7288_LT_TAGVAR(no_undefined_flag, $1)=
7289_LT_TAGVAR(whole_archive_flag_spec, $1)=
7290_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7291
7292# Source file extension for f77 test sources.
7293ac_ext=f
7294
7295# Object file extension for compiled f77 test sources.
7296objext=o
7297_LT_TAGVAR(objext, $1)=$objext
7298
7299# No sense in running all these tests if we already determined that
7300# the F77 compiler isn't working. Some variables (like enable_shared)
7301# are currently assumed to apply to all compilers on this platform,
7302# and will be corrupted by setting them based on a non-working compiler.
7303if test "$_lt_disable_F77" != yes; then
7304 # Code to be used in simple compile tests
7305 lt_simple_compile_test_code="\
7306 subroutine t
7307 return
7308 end
7309"
7310
7311 # Code to be used in simple link tests
7312 lt_simple_link_test_code="\
7313 program t
7314 end
7315"
7316
7317 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7318 _LT_TAG_COMPILER
7319
7320 # save warnings/boilerplate of simple test code
7321 _LT_COMPILER_BOILERPLATE
7322 _LT_LINKER_BOILERPLATE
7323
7324 # Allow CC to be a program name with arguments.
7325 lt_save_CC="$CC"
7326 lt_save_GCC=$GCC
b0322a85 7327 lt_save_CFLAGS=$CFLAGS
8d138742 7328 CC=${F77-"f77"}
b0322a85 7329 CFLAGS=$FFLAGS
8d138742
CE
7330 compiler=$CC
7331 _LT_TAGVAR(compiler, $1)=$CC
7332 _LT_CC_BASENAME([$compiler])
7333 GCC=$G77
7334 if test -n "$compiler"; then
7335 AC_MSG_CHECKING([if libtool supports shared libraries])
7336 AC_MSG_RESULT([$can_build_shared])
7337
7338 AC_MSG_CHECKING([whether to build shared libraries])
7339 test "$can_build_shared" = "no" && enable_shared=no
7340
7341 # On AIX, shared libraries and static libraries use the same namespace, and
7342 # are all built from PIC.
7343 case $host_os in
7344 aix3*)
7345 test "$enable_shared" = yes && enable_static=no
7346 if test -n "$RANLIB"; then
7347 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7348 postinstall_cmds='$RANLIB $lib'
7349 fi
7350 ;;
7351 aix[[4-9]]*)
7352 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7353 test "$enable_shared" = yes && enable_static=no
7354 fi
7355 ;;
7356 esac
7357 AC_MSG_RESULT([$enable_shared])
7358
7359 AC_MSG_CHECKING([whether to build static libraries])
7360 # Make sure either enable_shared or enable_static is yes.
7361 test "$enable_shared" = yes || enable_static=yes
7362 AC_MSG_RESULT([$enable_static])
7363
7364 _LT_TAGVAR(GCC, $1)="$G77"
7365 _LT_TAGVAR(LD, $1)="$LD"
7366
7367 ## CAVEAT EMPTOR:
7368 ## There is no encapsulation within the following macros, do not change
7369 ## the running order or otherwise move them around unless you know exactly
7370 ## what you are doing...
7371 _LT_COMPILER_PIC($1)
7372 _LT_COMPILER_C_O($1)
7373 _LT_COMPILER_FILE_LOCKS($1)
7374 _LT_LINKER_SHLIBS($1)
7375 _LT_SYS_DYNAMIC_LINKER($1)
7376 _LT_LINKER_HARDCODE_LIBPATH($1)
7377
7378 _LT_CONFIG($1)
7379 fi # test -n "$compiler"
7380
7381 GCC=$lt_save_GCC
7382 CC="$lt_save_CC"
b0322a85 7383 CFLAGS="$lt_save_CFLAGS"
8d138742
CE
7384fi # test "$_lt_disable_F77" != yes
7385
7386AC_LANG_POP
7387])# _LT_LANG_F77_CONFIG
7388
7389
8d138742
CE
7390# _LT_LANG_FC_CONFIG([TAG])
7391# -------------------------
7392# Ensure that the configuration variables for a Fortran compiler are
7393# suitably defined. These variables are subsequently used by _LT_CONFIG
7394# to write the compiler configuration to `libtool'.
7395m4_defun([_LT_LANG_FC_CONFIG],
b0322a85
CE
7396[AC_LANG_PUSH(Fortran)
7397
7398if test -z "$FC" || test "X$FC" = "Xno"; then
7399 _lt_disable_FC=yes
7400fi
8d138742
CE
7401
7402_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7403_LT_TAGVAR(allow_undefined_flag, $1)=
7404_LT_TAGVAR(always_export_symbols, $1)=no
7405_LT_TAGVAR(archive_expsym_cmds, $1)=
7406_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7407_LT_TAGVAR(hardcode_direct, $1)=no
7408_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7409_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8d138742
CE
7410_LT_TAGVAR(hardcode_libdir_separator, $1)=
7411_LT_TAGVAR(hardcode_minus_L, $1)=no
7412_LT_TAGVAR(hardcode_automatic, $1)=no
7413_LT_TAGVAR(inherit_rpath, $1)=no
7414_LT_TAGVAR(module_cmds, $1)=
7415_LT_TAGVAR(module_expsym_cmds, $1)=
7416_LT_TAGVAR(link_all_deplibs, $1)=unknown
7417_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
7418_LT_TAGVAR(reload_flag, $1)=$reload_flag
7419_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
7420_LT_TAGVAR(no_undefined_flag, $1)=
7421_LT_TAGVAR(whole_archive_flag_spec, $1)=
7422_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7423
7424# Source file extension for fc test sources.
7425ac_ext=${ac_fc_srcext-f}
7426
7427# Object file extension for compiled fc test sources.
7428objext=o
7429_LT_TAGVAR(objext, $1)=$objext
7430
7431# No sense in running all these tests if we already determined that
7432# the FC compiler isn't working. Some variables (like enable_shared)
7433# are currently assumed to apply to all compilers on this platform,
7434# and will be corrupted by setting them based on a non-working compiler.
7435if test "$_lt_disable_FC" != yes; then
7436 # Code to be used in simple compile tests
7437 lt_simple_compile_test_code="\
7438 subroutine t
7439 return
7440 end
7441"
7442
7443 # Code to be used in simple link tests
7444 lt_simple_link_test_code="\
7445 program t
7446 end
7447"
7448
7449 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7450 _LT_TAG_COMPILER
7451
7452 # save warnings/boilerplate of simple test code
7453 _LT_COMPILER_BOILERPLATE
7454 _LT_LINKER_BOILERPLATE
7455
7456 # Allow CC to be a program name with arguments.
7457 lt_save_CC="$CC"
7458 lt_save_GCC=$GCC
b0322a85 7459 lt_save_CFLAGS=$CFLAGS
8d138742 7460 CC=${FC-"f95"}
b0322a85 7461 CFLAGS=$FCFLAGS
8d138742
CE
7462 compiler=$CC
7463 GCC=$ac_cv_fc_compiler_gnu
7464
7465 _LT_TAGVAR(compiler, $1)=$CC
7466 _LT_CC_BASENAME([$compiler])
7467
7468 if test -n "$compiler"; then
7469 AC_MSG_CHECKING([if libtool supports shared libraries])
7470 AC_MSG_RESULT([$can_build_shared])
7471
7472 AC_MSG_CHECKING([whether to build shared libraries])
7473 test "$can_build_shared" = "no" && enable_shared=no
7474
7475 # On AIX, shared libraries and static libraries use the same namespace, and
7476 # are all built from PIC.
7477 case $host_os in
7478 aix3*)
7479 test "$enable_shared" = yes && enable_static=no
7480 if test -n "$RANLIB"; then
7481 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7482 postinstall_cmds='$RANLIB $lib'
7483 fi
7484 ;;
7485 aix[[4-9]]*)
7486 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7487 test "$enable_shared" = yes && enable_static=no
7488 fi
7489 ;;
7490 esac
7491 AC_MSG_RESULT([$enable_shared])
7492
7493 AC_MSG_CHECKING([whether to build static libraries])
7494 # Make sure either enable_shared or enable_static is yes.
7495 test "$enable_shared" = yes || enable_static=yes
7496 AC_MSG_RESULT([$enable_static])
7497
7498 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7499 _LT_TAGVAR(LD, $1)="$LD"
7500
7501 ## CAVEAT EMPTOR:
7502 ## There is no encapsulation within the following macros, do not change
7503 ## the running order or otherwise move them around unless you know exactly
7504 ## what you are doing...
7505 _LT_SYS_HIDDEN_LIBDEPS($1)
7506 _LT_COMPILER_PIC($1)
7507 _LT_COMPILER_C_O($1)
7508 _LT_COMPILER_FILE_LOCKS($1)
7509 _LT_LINKER_SHLIBS($1)
7510 _LT_SYS_DYNAMIC_LINKER($1)
7511 _LT_LINKER_HARDCODE_LIBPATH($1)
7512
7513 _LT_CONFIG($1)
7514 fi # test -n "$compiler"
7515
7516 GCC=$lt_save_GCC
b0322a85
CE
7517 CC=$lt_save_CC
7518 CFLAGS=$lt_save_CFLAGS
8d138742
CE
7519fi # test "$_lt_disable_FC" != yes
7520
7521AC_LANG_POP
7522])# _LT_LANG_FC_CONFIG
7523
7524
7525# _LT_LANG_GCJ_CONFIG([TAG])
7526# --------------------------
7527# Ensure that the configuration variables for the GNU Java Compiler compiler
7528# are suitably defined. These variables are subsequently used by _LT_CONFIG
7529# to write the compiler configuration to `libtool'.
7530m4_defun([_LT_LANG_GCJ_CONFIG],
7531[AC_REQUIRE([LT_PROG_GCJ])dnl
7532AC_LANG_SAVE
7533
7534# Source file extension for Java test sources.
7535ac_ext=java
7536
7537# Object file extension for compiled Java test sources.
7538objext=o
7539_LT_TAGVAR(objext, $1)=$objext
7540
7541# Code to be used in simple compile tests
7542lt_simple_compile_test_code="class foo {}"
7543
7544# Code to be used in simple link tests
7545lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7546
7547# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7548_LT_TAG_COMPILER
7549
7550# save warnings/boilerplate of simple test code
7551_LT_COMPILER_BOILERPLATE
7552_LT_LINKER_BOILERPLATE
7553
7554# Allow CC to be a program name with arguments.
b0322a85
CE
7555lt_save_CC=$CC
7556lt_save_CFLAGS=$CFLAGS
8d138742
CE
7557lt_save_GCC=$GCC
7558GCC=yes
7559CC=${GCJ-"gcj"}
b0322a85 7560CFLAGS=$GCJFLAGS
8d138742
CE
7561compiler=$CC
7562_LT_TAGVAR(compiler, $1)=$CC
7563_LT_TAGVAR(LD, $1)="$LD"
7564_LT_CC_BASENAME([$compiler])
7565
7566# GCJ did not exist at the time GCC didn't implicitly link libc in.
7567_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7568
7569_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
b0322a85
CE
7570_LT_TAGVAR(reload_flag, $1)=$reload_flag
7571_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8d138742
CE
7572
7573if test -n "$compiler"; then
7574 _LT_COMPILER_NO_RTTI($1)
7575 _LT_COMPILER_PIC($1)
7576 _LT_COMPILER_C_O($1)
7577 _LT_COMPILER_FILE_LOCKS($1)
7578 _LT_LINKER_SHLIBS($1)
7579 _LT_LINKER_HARDCODE_LIBPATH($1)
7580
7581 _LT_CONFIG($1)
7582fi
7583
7584AC_LANG_RESTORE
7585
7586GCC=$lt_save_GCC
b0322a85
CE
7587CC=$lt_save_CC
7588CFLAGS=$lt_save_CFLAGS
8d138742
CE
7589])# _LT_LANG_GCJ_CONFIG
7590
7591
b0322a85
CE
7592# _LT_LANG_GO_CONFIG([TAG])
7593# --------------------------
7594# Ensure that the configuration variables for the GNU Go compiler
7595# are suitably defined. These variables are subsequently used by _LT_CONFIG
7596# to write the compiler configuration to `libtool'.
7597m4_defun([_LT_LANG_GO_CONFIG],
7598[AC_REQUIRE([LT_PROG_GO])dnl
7599AC_LANG_SAVE
7600
7601# Source file extension for Go test sources.
7602ac_ext=go
7603
7604# Object file extension for compiled Go test sources.
7605objext=o
7606_LT_TAGVAR(objext, $1)=$objext
7607
7608# Code to be used in simple compile tests
7609lt_simple_compile_test_code="package main; func main() { }"
7610
7611# Code to be used in simple link tests
7612lt_simple_link_test_code='package main; func main() { }'
7613
7614# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7615_LT_TAG_COMPILER
7616
7617# save warnings/boilerplate of simple test code
7618_LT_COMPILER_BOILERPLATE
7619_LT_LINKER_BOILERPLATE
7620
7621# Allow CC to be a program name with arguments.
7622lt_save_CC=$CC
7623lt_save_CFLAGS=$CFLAGS
7624lt_save_GCC=$GCC
7625GCC=yes
7626CC=${GOC-"gccgo"}
7627CFLAGS=$GOFLAGS
7628compiler=$CC
7629_LT_TAGVAR(compiler, $1)=$CC
7630_LT_TAGVAR(LD, $1)="$LD"
7631_LT_CC_BASENAME([$compiler])
7632
7633# Go did not exist at the time GCC didn't implicitly link libc in.
7634_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7635
7636_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7637_LT_TAGVAR(reload_flag, $1)=$reload_flag
7638_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7639
7640if test -n "$compiler"; then
7641 _LT_COMPILER_NO_RTTI($1)
7642 _LT_COMPILER_PIC($1)
7643 _LT_COMPILER_C_O($1)
7644 _LT_COMPILER_FILE_LOCKS($1)
7645 _LT_LINKER_SHLIBS($1)
7646 _LT_LINKER_HARDCODE_LIBPATH($1)
7647
7648 _LT_CONFIG($1)
7649fi
7650
7651AC_LANG_RESTORE
7652
7653GCC=$lt_save_GCC
7654CC=$lt_save_CC
7655CFLAGS=$lt_save_CFLAGS
7656])# _LT_LANG_GO_CONFIG
7657
7658
8d138742
CE
7659# _LT_LANG_RC_CONFIG([TAG])
7660# -------------------------
7661# Ensure that the configuration variables for the Windows resource compiler
7662# are suitably defined. These variables are subsequently used by _LT_CONFIG
7663# to write the compiler configuration to `libtool'.
7664m4_defun([_LT_LANG_RC_CONFIG],
7665[AC_REQUIRE([LT_PROG_RC])dnl
7666AC_LANG_SAVE
7667
7668# Source file extension for RC test sources.
7669ac_ext=rc
7670
7671# Object file extension for compiled RC test sources.
7672objext=o
7673_LT_TAGVAR(objext, $1)=$objext
7674
7675# Code to be used in simple compile tests
7676lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7677
7678# Code to be used in simple link tests
7679lt_simple_link_test_code="$lt_simple_compile_test_code"
7680
7681# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7682_LT_TAG_COMPILER
7683
7684# save warnings/boilerplate of simple test code
7685_LT_COMPILER_BOILERPLATE
7686_LT_LINKER_BOILERPLATE
7687
7688# Allow CC to be a program name with arguments.
7689lt_save_CC="$CC"
b0322a85 7690lt_save_CFLAGS=$CFLAGS
8d138742
CE
7691lt_save_GCC=$GCC
7692GCC=
7693CC=${RC-"windres"}
b0322a85 7694CFLAGS=
8d138742
CE
7695compiler=$CC
7696_LT_TAGVAR(compiler, $1)=$CC
7697_LT_CC_BASENAME([$compiler])
7698_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7699
7700if test -n "$compiler"; then
7701 :
7702 _LT_CONFIG($1)
7703fi
7704
7705GCC=$lt_save_GCC
7706AC_LANG_RESTORE
b0322a85
CE
7707CC=$lt_save_CC
7708CFLAGS=$lt_save_CFLAGS
8d138742
CE
7709])# _LT_LANG_RC_CONFIG
7710
7711
7712# LT_PROG_GCJ
7713# -----------
7714AC_DEFUN([LT_PROG_GCJ],
7715[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7716 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7717 [AC_CHECK_TOOL(GCJ, gcj,)
7718 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7719 AC_SUBST(GCJFLAGS)])])[]dnl
7720])
7721
7722# Old name:
7723AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7724dnl aclocal-1.4 backwards compatibility:
7725dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7726
7727
b0322a85
CE
7728# LT_PROG_GO
7729# ----------
7730AC_DEFUN([LT_PROG_GO],
7731[AC_CHECK_TOOL(GOC, gccgo,)
7732])
7733
7734
8d138742
CE
7735# LT_PROG_RC
7736# ----------
7737AC_DEFUN([LT_PROG_RC],
7738[AC_CHECK_TOOL(RC, windres,)
7739])
7740
7741# Old name:
7742AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7743dnl aclocal-1.4 backwards compatibility:
7744dnl AC_DEFUN([LT_AC_PROG_RC], [])
7745
7746
7747# _LT_DECL_EGREP
7748# --------------
7749# If we don't have a new enough Autoconf to choose the best grep
7750# available, choose the one first in the user's PATH.
7751m4_defun([_LT_DECL_EGREP],
7752[AC_REQUIRE([AC_PROG_EGREP])dnl
7753AC_REQUIRE([AC_PROG_FGREP])dnl
7754test -z "$GREP" && GREP=grep
7755_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7756_LT_DECL([], [EGREP], [1], [An ERE matcher])
7757_LT_DECL([], [FGREP], [1], [A literal string matcher])
7758dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7759AC_SUBST([GREP])
7760])
7761
7762
7763# _LT_DECL_OBJDUMP
7764# --------------
7765# If we don't have a new enough Autoconf to choose the best objdump
7766# available, choose the one first in the user's PATH.
7767m4_defun([_LT_DECL_OBJDUMP],
7768[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7769test -z "$OBJDUMP" && OBJDUMP=objdump
7770_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7771AC_SUBST([OBJDUMP])
7772])
7773
b0322a85
CE
7774# _LT_DECL_DLLTOOL
7775# ----------------
7776# Ensure DLLTOOL variable is set.
7777m4_defun([_LT_DECL_DLLTOOL],
7778[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7779test -z "$DLLTOOL" && DLLTOOL=dlltool
7780_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7781AC_SUBST([DLLTOOL])
7782])
8d138742
CE
7783
7784# _LT_DECL_SED
7785# ------------
7786# Check for a fully-functional sed program, that truncates
7787# as few characters as possible. Prefer GNU sed if found.
7788m4_defun([_LT_DECL_SED],
7789[AC_PROG_SED
7790test -z "$SED" && SED=sed
7791Xsed="$SED -e 1s/^X//"
7792_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7793_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7794 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7795])# _LT_DECL_SED
7796
7797m4_ifndef([AC_PROG_SED], [
7798# NOTE: This macro has been submitted for inclusion into #
7799# GNU Autoconf as AC_PROG_SED. When it is available in #
7800# a released version of Autoconf we should remove this #
7801# macro and use it instead. #
7802
7803m4_defun([AC_PROG_SED],
7804[AC_MSG_CHECKING([for a sed that does not truncate output])
7805AC_CACHE_VAL(lt_cv_path_SED,
7806[# Loop through the user's path and test for sed and gsed.
7807# Then use that list of sed's as ones to test for truncation.
7808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809for as_dir in $PATH
7810do
7811 IFS=$as_save_IFS
7812 test -z "$as_dir" && as_dir=.
7813 for lt_ac_prog in sed gsed; do
7814 for ac_exec_ext in '' $ac_executable_extensions; do
7815 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7816 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7817 fi
7818 done
7819 done
7820done
7821IFS=$as_save_IFS
7822lt_ac_max=0
7823lt_ac_count=0
7824# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7825# along with /bin/sed that truncates output.
7826for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7827 test ! -f $lt_ac_sed && continue
7828 cat /dev/null > conftest.in
7829 lt_ac_count=0
7830 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7831 # Check for GNU sed and select it if it is found.
7832 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7833 lt_cv_path_SED=$lt_ac_sed
7834 break
7835 fi
7836 while true; do
7837 cat conftest.in conftest.in >conftest.tmp
7838 mv conftest.tmp conftest.in
7839 cp conftest.in conftest.nl
7840 echo >>conftest.nl
7841 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7842 cmp -s conftest.out conftest.nl || break
7843 # 10000 chars as input seems more than enough
7844 test $lt_ac_count -gt 10 && break
7845 lt_ac_count=`expr $lt_ac_count + 1`
7846 if test $lt_ac_count -gt $lt_ac_max; then
7847 lt_ac_max=$lt_ac_count
7848 lt_cv_path_SED=$lt_ac_sed
7849 fi
7850 done
7851done
7852])
7853SED=$lt_cv_path_SED
7854AC_SUBST([SED])
7855AC_MSG_RESULT([$SED])
7856])#AC_PROG_SED
7857])#m4_ifndef
7858
7859# Old name:
7860AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7861dnl aclocal-1.4 backwards compatibility:
7862dnl AC_DEFUN([LT_AC_PROG_SED], [])
7863
7864
7865# _LT_CHECK_SHELL_FEATURES
7866# ------------------------
7867# Find out whether the shell is Bourne or XSI compatible,
7868# or has some other useful features.
7869m4_defun([_LT_CHECK_SHELL_FEATURES],
7870[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7871# Try some XSI features
7872xsi_shell=no
7873( _lt_dummy="a/b/c"
b0322a85
CE
7874 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7875 = c,a/b,b/c, \
8d138742
CE
7876 && eval 'test $(( 1 + 1 )) -eq 2 \
7877 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7878 && xsi_shell=yes
7879AC_MSG_RESULT([$xsi_shell])
7880_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7881
7882AC_MSG_CHECKING([whether the shell understands "+="])
7883lt_shell_append=no
7884( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7885 >/dev/null 2>&1 \
7886 && lt_shell_append=yes
7887AC_MSG_RESULT([$lt_shell_append])
7888_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7889
7890if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7891 lt_unset=unset
7892else
7893 lt_unset=false
7894fi
7895_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7896
7897# test EBCDIC or ASCII
7898case `echo X|tr X '\101'` in
7899 A) # ASCII based system
7900 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7901 lt_SP2NL='tr \040 \012'
7902 lt_NL2SP='tr \015\012 \040\040'
7903 ;;
7904 *) # EBCDIC based system
7905 lt_SP2NL='tr \100 \n'
7906 lt_NL2SP='tr \r\n \100\100'
7907 ;;
7908esac
7909_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7910_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7911])# _LT_CHECK_SHELL_FEATURES
7912
7913
b0322a85
CE
7914# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7915# ------------------------------------------------------
7916# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7917# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7918m4_defun([_LT_PROG_FUNCTION_REPLACE],
7919[dnl {
7920sed -e '/^$1 ()$/,/^} # $1 /c\
7921$1 ()\
7922{\
7923m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7924} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7925 && mv -f "$cfgfile.tmp" "$cfgfile" \
7926 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7927test 0 -eq $? || _lt_function_replace_fail=:
7928])
8d138742 7929
8d138742 7930
b0322a85
CE
7931# _LT_PROG_REPLACE_SHELLFNS
7932# -------------------------
7933# Replace existing portable implementations of several shell functions with
7934# equivalent extended shell implementations where those features are available..
7935m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7936[if test x"$xsi_shell" = xyes; then
7937 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7938 case ${1} in
7939 */*) func_dirname_result="${1%/*}${2}" ;;
7940 * ) func_dirname_result="${3}" ;;
7941 esac])
7942
7943 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7944 func_basename_result="${1##*/}"])
7945
7946 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7947 case ${1} in
7948 */*) func_dirname_result="${1%/*}${2}" ;;
7949 * ) func_dirname_result="${3}" ;;
7950 esac
7951 func_basename_result="${1##*/}"])
8d138742 7952
b0322a85
CE
7953 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7954 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7955 # positional parameters, so assign one to ordinary parameter first.
7956 func_stripname_result=${3}
7957 func_stripname_result=${func_stripname_result#"${1}"}
7958 func_stripname_result=${func_stripname_result%"${2}"}])
8d138742 7959
b0322a85
CE
7960 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7961 func_split_long_opt_name=${1%%=*}
7962 func_split_long_opt_arg=${1#*=}])
8d138742 7963
b0322a85
CE
7964 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7965 func_split_short_opt_arg=${1#??}
7966 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8d138742 7967
b0322a85
CE
7968 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7969 case ${1} in
7970 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7971 *) func_lo2o_result=${1} ;;
7972 esac])
8d138742 7973
b0322a85 7974 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8d138742 7975
b0322a85 7976 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8d138742 7977
b0322a85
CE
7978 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7979fi
8d138742 7980
b0322a85
CE
7981if test x"$lt_shell_append" = xyes; then
7982 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8d138742 7983
b0322a85
CE
7984 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7985 func_quote_for_eval "${2}"
7986dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7987 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8d138742 7988
b0322a85
CE
7989 # Save a `func_append' function call where possible by direct use of '+='
7990 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7991 && mv -f "$cfgfile.tmp" "$cfgfile" \
7992 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7993 test 0 -eq $? || _lt_function_replace_fail=:
7994else
7995 # Save a `func_append' function call even when '+=' is not available
7996 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7997 && mv -f "$cfgfile.tmp" "$cfgfile" \
7998 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7999 test 0 -eq $? || _lt_function_replace_fail=:
8000fi
8d138742 8001
b0322a85
CE
8002if test x"$_lt_function_replace_fail" = x":"; then
8003 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8004fi
8005])
8d138742 8006
b0322a85
CE
8007# _LT_PATH_CONVERSION_FUNCTIONS
8008# -----------------------------
8009# Determine which file name conversion functions should be used by
8010# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8011# for certain cross-compile configurations and native mingw.
8012m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8013[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8014AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8015AC_MSG_CHECKING([how to convert $build file names to $host format])
8016AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8017[case $host in
8018 *-*-mingw* )
8019 case $build in
8020 *-*-mingw* ) # actually msys
8021 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8022 ;;
8023 *-*-cygwin* )
8024 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8025 ;;
8026 * ) # otherwise, assume *nix
8027 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8028 ;;
8029 esac
8d138742 8030 ;;
b0322a85
CE
8031 *-*-cygwin* )
8032 case $build in
8033 *-*-mingw* ) # actually msys
8034 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8035 ;;
8036 *-*-cygwin* )
8037 lt_cv_to_host_file_cmd=func_convert_file_noop
8038 ;;
8039 * ) # otherwise, assume *nix
8040 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8041 ;;
8042 esac
8d138742 8043 ;;
b0322a85
CE
8044 * ) # unhandled hosts (and "normal" native builds)
8045 lt_cv_to_host_file_cmd=func_convert_file_noop
8046 ;;
8047esac
8d138742 8048])
b0322a85
CE
8049to_host_file_cmd=$lt_cv_to_host_file_cmd
8050AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8051_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8052 [0], [convert $build file names to $host format])dnl
8053
8054AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8055AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8056[#assume ordinary cross tools, or native build.
8057lt_cv_to_tool_file_cmd=func_convert_file_noop
8058case $host in
8059 *-*-mingw* )
8060 case $build in
8061 *-*-mingw* ) # actually msys
8062 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8063 ;;
8064 esac
8065 ;;
8066esac
8067])
8068to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8069AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8070_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8071 [0], [convert $build files to toolchain format])dnl
8072])# _LT_PATH_CONVERSION_FUNCTIONS
8d138742
CE
8073
8074# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8075#
b0322a85 8076# Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
8d138742
CE
8077# Written by Thomas Tanner, 1999
8078#
8079# This file is free software; the Free Software Foundation gives
8080# unlimited permission to copy and/or distribute it, with or without
8081# modifications, as long as this notice is preserved.
8082
b0322a85 8083# serial 18 LTDL_INIT
8d138742
CE
8084
8085# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8086# ------------------------------------------
8087# DIRECTORY contains the libltdl sources. It is okay to call this
8088# function multiple times, as long as the same DIRECTORY is always given.
8089AC_DEFUN([LT_CONFIG_LTDL_DIR],
8090[AC_BEFORE([$0], [LTDL_INIT])
8091_$0($*)
8092])# LT_CONFIG_LTDL_DIR
8093
8094# We break this out into a separate macro, so that we can call it safely
8095# internally without being caught accidentally by the sed scan in libtoolize.
8096m4_defun([_LT_CONFIG_LTDL_DIR],
8097[dnl remove trailing slashes
8098m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8099m4_case(_LTDL_DIR,
8100 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8101 m4_if(_ARG_DIR, [.],
8102 [],
8103 [m4_define([_LTDL_DIR], _ARG_DIR)
8104 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8105 [m4_if(_ARG_DIR, _LTDL_DIR,
8106 [],
8107 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8108m4_popdef([_ARG_DIR])
8109])# _LT_CONFIG_LTDL_DIR
8110
8111# Initialise:
8112m4_define([_LTDL_DIR], [])
8113
8114
8115# _LT_BUILD_PREFIX
8116# ----------------
8117# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8118# to `${top_builddir}/'.
8119m4_define([_LT_BUILD_PREFIX],
8120[m4_ifdef([AC_AUTOCONF_VERSION],
8121 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8122 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8123 [${top_build_prefix}],
8124 [${top_builddir}/])],
8125 [${top_build_prefix}])],
8126 [${top_builddir}/])[]dnl
8127])
8128
8129
8130# LTDL_CONVENIENCE
8131# ----------------
8132# sets LIBLTDL to the link flags for the libltdl convenience library and
8133# LTDLINCL to the include flags for the libltdl header and adds
8134# --enable-ltdl-convenience to the configure arguments. Note that
8135# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
8136# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8137# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8138# quotes!). If your package is not flat and you're not using automake,
8139# define top_build_prefix, top_builddir, and top_srcdir appropriately
8140# in your Makefiles.
8141AC_DEFUN([LTDL_CONVENIENCE],
8142[AC_BEFORE([$0], [LTDL_INIT])dnl
8143dnl Although the argument is deprecated and no longer documented,
8144dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8145dnl here make sure it is the same as any other declaration of libltdl's
8146dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8147dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8148m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8149_$0()
8150])# LTDL_CONVENIENCE
8151
8152# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8153# now we have LT_CONFIG_LTDL_DIR:
8154AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8155[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8156_LTDL_CONVENIENCE])
8157
8158dnl aclocal-1.4 backwards compatibility:
8159dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8160
8161
8162# _LTDL_CONVENIENCE
8163# -----------------
8164# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8165m4_defun([_LTDL_CONVENIENCE],
8166[case $enable_ltdl_convenience in
8167 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8168 "") enable_ltdl_convenience=yes
8169 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8170esac
8171LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8172LTDLDEPS=$LIBLTDL
8173LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8174
8175AC_SUBST([LIBLTDL])
8176AC_SUBST([LTDLDEPS])
8177AC_SUBST([LTDLINCL])
8178
8179# For backwards non-gettext consistent compatibility...
8180INCLTDL="$LTDLINCL"
8181AC_SUBST([INCLTDL])
8182])# _LTDL_CONVENIENCE
8183
8184
8185# LTDL_INSTALLABLE
8186# ----------------
8187# sets LIBLTDL to the link flags for the libltdl installable library
8188# and LTDLINCL to the include flags for the libltdl header and adds
8189# --enable-ltdl-install to the configure arguments. Note that
8190# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
8191# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8192# available, otherwise with '${top_builddir}/', and LTDLINCL will be
8193# prefixed with '${top_srcdir}/' (note the single quotes!). If your
8194# package is not flat and you're not using automake, define top_build_prefix,
8195# top_builddir, and top_srcdir appropriately in your Makefiles.
8196# In the future, this macro may have to be called after LT_INIT.
8197AC_DEFUN([LTDL_INSTALLABLE],
8198[AC_BEFORE([$0], [LTDL_INIT])dnl
8199dnl Although the argument is deprecated and no longer documented,
8200dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8201dnl here make sure it is the same as any other declaration of libltdl's
8202dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8203dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8204m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8205_$0()
8206])# LTDL_INSTALLABLE
8207
8208# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8209# now we have LT_CONFIG_LTDL_DIR:
8210AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8211[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8212_LTDL_INSTALLABLE])
8213
8214dnl aclocal-1.4 backwards compatibility:
8215dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8216
8217
8218# _LTDL_INSTALLABLE
8219# -----------------
8220# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8221m4_defun([_LTDL_INSTALLABLE],
8222[if test -f $prefix/lib/libltdl.la; then
8223 lt_save_LDFLAGS="$LDFLAGS"
8224 LDFLAGS="-L$prefix/lib $LDFLAGS"
8225 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8226 LDFLAGS="$lt_save_LDFLAGS"
8227 if test x"${lt_lib_ltdl-no}" = xyes; then
8228 if test x"$enable_ltdl_install" != xyes; then
8229 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8230 AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8231 enable_ltdl_install=no
8232 fi
8233 elif test x"$enable_ltdl_install" = xno; then
8234 AC_MSG_WARN([libltdl not installed, but installation disabled])
d9898ee8 8235 fi
8d138742 8236fi
d9898ee8 8237
8d138742
CE
8238# If configure.ac declared an installable ltdl, and the user didn't override
8239# with --disable-ltdl-install, we will install the shipped libltdl.
8240case $enable_ltdl_install in
8241 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8242 LIBLTDL="-lltdl"
8243 LTDLDEPS=
8244 LTDLINCL=
d9898ee8 8245 ;;
8d138742
CE
8246 *) enable_ltdl_install=yes
8247 ac_configure_args="$ac_configure_args --enable-ltdl-install"
8248 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8249 LTDLDEPS=$LIBLTDL
8250 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
d9898ee8 8251 ;;
8d138742 8252esac
d9898ee8 8253
8d138742
CE
8254AC_SUBST([LIBLTDL])
8255AC_SUBST([LTDLDEPS])
8256AC_SUBST([LTDLINCL])
d9898ee8 8257
8d138742
CE
8258# For backwards non-gettext consistent compatibility...
8259INCLTDL="$LTDLINCL"
8260AC_SUBST([INCLTDL])
8261])# LTDL_INSTALLABLE
d9898ee8 8262
d9898ee8 8263
8d138742
CE
8264# _LTDL_MODE_DISPATCH
8265# -------------------
8266m4_define([_LTDL_MODE_DISPATCH],
8267[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8268m4_if(_LTDL_DIR, [],
8269 [],
8270 dnl if _LTDL_MODE was not set already, the default value is `subproject':
8271 [m4_case(m4_default(_LTDL_MODE, [subproject]),
8272 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8273 _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8274 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8275 [recursive], [],
8276 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8277dnl Be careful not to expand twice:
8278m4_define([$0], [])
8279])# _LTDL_MODE_DISPATCH
8280
8281
8282# _LT_LIBOBJ(MODULE_NAME)
8283# -----------------------
8284# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8285# of into LIBOBJS.
8286AC_DEFUN([_LT_LIBOBJ], [
8287 m4_pattern_allow([^_LT_LIBOBJS$])
8288 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8289])# _LT_LIBOBJS
d9898ee8 8290
d9898ee8 8291
8d138742
CE
8292# LTDL_INIT([OPTIONS])
8293# --------------------
8294# Clients of libltdl can use this macro to allow the installer to
8295# choose between a shipped copy of the ltdl sources or a preinstalled
8296# version of the library. If the shipped ltdl sources are not in a
8297# subdirectory named libltdl, the directory name must be given by
8298# LT_CONFIG_LTDL_DIR.
8299AC_DEFUN([LTDL_INIT],
8300[dnl Parse OPTIONS
8301_LT_SET_OPTIONS([$0], [$1])
8302
8303dnl We need to keep our own list of libobjs separate from our parent project,
8304dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8305dnl we look for our own LIBOBJs.
8306m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8307m4_pushdef([AC_LIBSOURCES])
8308
8309dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8310m4_if(_LTDL_MODE, [],
8311 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8312 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8313 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8314
8315AC_ARG_WITH([included_ltdl],
8316 [AS_HELP_STRING([--with-included-ltdl],
8317 [use the GNU ltdl sources included here])])
8318
8319if test "x$with_included_ltdl" != xyes; then
8320 # We are not being forced to use the included libltdl sources, so
8321 # decide whether there is a useful installed version we can use.
8322 AC_CHECK_HEADER([ltdl.h],
8323 [AC_CHECK_DECL([lt_dlinterface_register],
8324 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8325 [with_included_ltdl=no],
8326 [with_included_ltdl=yes])],
8327 [with_included_ltdl=yes],
8328 [AC_INCLUDES_DEFAULT
8329 #include <ltdl.h>])],
8330 [with_included_ltdl=yes],
8331 [AC_INCLUDES_DEFAULT]
8332 )
8333fi
d9898ee8 8334
8d138742
CE
8335dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8336dnl was called yet, then for old times' sake, we assume libltdl is in an
8337dnl eponymous directory:
8338AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
d9898ee8 8339
8d138742
CE
8340AC_ARG_WITH([ltdl_include],
8341 [AS_HELP_STRING([--with-ltdl-include=DIR],
8342 [use the ltdl headers installed in DIR])])
8343
8344if test -n "$with_ltdl_include"; then
8345 if test -f "$with_ltdl_include/ltdl.h"; then :
d9898ee8 8346 else
8d138742
CE
8347 AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8348 fi
8349else
8350 with_ltdl_include=no
8351fi
d9898ee8 8352
8d138742
CE
8353AC_ARG_WITH([ltdl_lib],
8354 [AS_HELP_STRING([--with-ltdl-lib=DIR],
8355 [use the libltdl.la installed in DIR])])
d9898ee8 8356
8d138742
CE
8357if test -n "$with_ltdl_lib"; then
8358 if test -f "$with_ltdl_lib/libltdl.la"; then :
8359 else
8360 AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8361 fi
8362else
8363 with_ltdl_lib=no
8364fi
8365
8366case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8367 ,yes,no,no,)
8368 m4_case(m4_default(_LTDL_TYPE, [convenience]),
8369 [convenience], [_LTDL_CONVENIENCE],
8370 [installable], [_LTDL_INSTALLABLE],
8371 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
d9898ee8 8372 ;;
8d138742
CE
8373 ,no,no,no,)
8374 # If the included ltdl is not to be used, then use the
8375 # preinstalled libltdl we found.
8376 AC_DEFINE([HAVE_LTDL], [1],
8377 [Define this if a modern libltdl is already installed])
8378 LIBLTDL=-lltdl
8379 LTDLDEPS=
8380 LTDLINCL=
d9898ee8 8381 ;;
8d138742
CE
8382 ,no*,no,*)
8383 AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8384 ;;
8385 *) with_included_ltdl=no
8386 LIBLTDL="-L$with_ltdl_lib -lltdl"
8387 LTDLDEPS=
8388 LTDLINCL="-I$with_ltdl_include"
8389 ;;
8390esac
8391INCLTDL="$LTDLINCL"
8392
8393# Report our decision...
8394AC_MSG_CHECKING([where to find libltdl headers])
8395AC_MSG_RESULT([$LTDLINCL])
8396AC_MSG_CHECKING([where to find libltdl library])
8397AC_MSG_RESULT([$LIBLTDL])
8398
8399_LTDL_SETUP
8400
8401dnl restore autoconf definition.
8402m4_popdef([AC_LIBOBJ])
8403m4_popdef([AC_LIBSOURCES])
8404
8405AC_CONFIG_COMMANDS_PRE([
8406 _ltdl_libobjs=
8407 _ltdl_ltlibobjs=
8408 if test -n "$_LT_LIBOBJS"; then
8409 # Remove the extension.
8410 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8411 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8412 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8413 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8414 done
8415 fi
8416 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8417 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8418])
d9898ee8 8419
8d138742
CE
8420# Only expand once:
8421m4_define([LTDL_INIT])
8422])# LTDL_INIT
d9898ee8 8423
8d138742
CE
8424# Old names:
8425AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8426AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8427AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8428dnl aclocal-1.4 backwards compatibility:
8429dnl AC_DEFUN([AC_LIB_LTDL], [])
8430dnl AC_DEFUN([AC_WITH_LTDL], [])
8431dnl AC_DEFUN([LT_WITH_LTDL], [])
d9898ee8 8432
d9898ee8 8433
8d138742
CE
8434# _LTDL_SETUP
8435# -----------
8436# Perform all the checks necessary for compilation of the ltdl objects
8437# -- including compiler checks and header checks. This is a public
8438# interface mainly for the benefit of libltdl's own configure.ac, most
8439# other users should call LTDL_INIT instead.
8440AC_DEFUN([_LTDL_SETUP],
8441[AC_REQUIRE([AC_PROG_CC])dnl
8442AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8443AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8444AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8445AC_REQUIRE([LT_LIB_DLLOAD])dnl
8446AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8447AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8448AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8449AC_REQUIRE([gl_FUNC_ARGZ])dnl
8450
8451m4_require([_LT_CHECK_OBJDIR])dnl
8452m4_require([_LT_HEADER_DLFCN])dnl
8453m4_require([_LT_CHECK_DLPREOPEN])dnl
8454m4_require([_LT_DECL_SED])dnl
8455
8456dnl Don't require this, or it will be expanded earlier than the code
8457dnl that sets the variables it relies on:
8458_LT_ENABLE_INSTALL
8459
8460dnl _LTDL_MODE specific code must be called at least once:
8461_LTDL_MODE_DISPATCH
8462
8463# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8464# the user used. This is so that ltdl.h can pick up the parent projects
8465# config.h file, The first file in AC_CONFIG_HEADERS must contain the
8466# definitions required by ltdl.c.
8467# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8468AC_CONFIG_COMMANDS_PRE([dnl
8469m4_pattern_allow([^LT_CONFIG_H$])dnl
8470m4_ifset([AH_HEADER],
8471 [LT_CONFIG_H=AH_HEADER],
8472 [m4_ifset([AC_LIST_HEADERS],
8473 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
8474 [])])])
8475AC_SUBST([LT_CONFIG_H])
8476
8477AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8478 [], [], [AC_INCLUDES_DEFAULT])
8479
8480AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8481AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8482
b0322a85 8483m4_pattern_allow([LT_LIBEXT])dnl
8d138742
CE
8484AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8485
b0322a85
CE
8486name=
8487eval "lt_libprefix=\"$libname_spec\""
8488m4_pattern_allow([LT_LIBPREFIX])dnl
8489AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8490
8d138742 8491name=ltdl
b0322a85 8492eval "LTDLOPEN=\"$libname_spec\""
8d138742
CE
8493AC_SUBST([LTDLOPEN])
8494])# _LTDL_SETUP
8495
8496
8497# _LT_ENABLE_INSTALL
8498# ------------------
8499m4_define([_LT_ENABLE_INSTALL],
8500[AC_ARG_ENABLE([ltdl-install],
8501 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
d9898ee8 8502
8d138742
CE
8503case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8504 *yes*) ;;
8505 *) enable_ltdl_convenience=yes ;;
8506esac
ac40fd9e 8507
8d138742
CE
8508m4_ifdef([AM_CONDITIONAL],
8509[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8510 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8511])# _LT_ENABLE_INSTALL
d9898ee8 8512
d9898ee8 8513
8d138742
CE
8514# LT_SYS_DLOPEN_DEPLIBS
8515# ---------------------
8516AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8517[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8518AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8519 [lt_cv_sys_dlopen_deplibs],
8520 [# PORTME does your system automatically load deplibs for dlopen?
8521 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8522 # For now, we just catch OSes we know something about -- in the
8523 # future, we'll try test this programmatically.
8524 lt_cv_sys_dlopen_deplibs=unknown
8525 case $host_os in
8526 aix3*|aix4.1.*|aix4.2.*)
8527 # Unknown whether this is true for these versions of AIX, but
8528 # we want this `case' here to explicitly catch those versions.
8529 lt_cv_sys_dlopen_deplibs=unknown
8530 ;;
8531 aix[[4-9]]*)
8532 lt_cv_sys_dlopen_deplibs=yes
8533 ;;
8534 amigaos*)
8535 case $host_cpu in
8536 powerpc)
8537 lt_cv_sys_dlopen_deplibs=no
d9898ee8 8538 ;;
8d138742
CE
8539 esac
8540 ;;
8541 darwin*)
8542 # Assuming the user has installed a libdl from somewhere, this is true
8543 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8544 lt_cv_sys_dlopen_deplibs=yes
8545 ;;
8546 freebsd* | dragonfly*)
8547 lt_cv_sys_dlopen_deplibs=yes
8548 ;;
b0322a85 8549 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8d138742
CE
8550 # GNU and its variants, using gnu ld.so (Glibc)
8551 lt_cv_sys_dlopen_deplibs=yes
8552 ;;
8553 hpux10*|hpux11*)
8554 lt_cv_sys_dlopen_deplibs=yes
8555 ;;
8556 interix*)
8557 lt_cv_sys_dlopen_deplibs=yes
8558 ;;
8559 irix[[12345]]*|irix6.[[01]]*)
8560 # Catch all versions of IRIX before 6.2, and indicate that we don't
8561 # know how it worked for any of those versions.
8562 lt_cv_sys_dlopen_deplibs=unknown
8563 ;;
8564 irix*)
8565 # The case above catches anything before 6.2, and it's known that
8566 # at 6.2 and later dlopen does load deplibs.
8567 lt_cv_sys_dlopen_deplibs=yes
8568 ;;
8569 netbsd*)
8570 lt_cv_sys_dlopen_deplibs=yes
8571 ;;
8572 openbsd*)
8573 lt_cv_sys_dlopen_deplibs=yes
8574 ;;
8575 osf[[1234]]*)
8576 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8577 # it did *not* use an RPATH in a shared library to find objects the
8578 # library depends on, so we explicitly say `no'.
8579 lt_cv_sys_dlopen_deplibs=no
8580 ;;
8581 osf5.0|osf5.0a|osf5.1)
8582 # dlopen *does* load deplibs and with the right loader patch applied
8583 # it even uses RPATH in a shared library to search for shared objects
8584 # that the library depends on, but there's no easy way to know if that
8585 # patch is installed. Since this is the case, all we can really
8586 # say is unknown -- it depends on the patch being installed. If
8587 # it is, this changes to `yes'. Without it, it would be `no'.
8588 lt_cv_sys_dlopen_deplibs=unknown
8589 ;;
8590 osf*)
8591 # the two cases above should catch all versions of osf <= 5.1. Read
8592 # the comments above for what we know about them.
8593 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8594 # is used to find them so we can finally say `yes'.
8595 lt_cv_sys_dlopen_deplibs=yes
8596 ;;
8597 qnx*)
8598 lt_cv_sys_dlopen_deplibs=yes
8599 ;;
8600 solaris*)
8601 lt_cv_sys_dlopen_deplibs=yes
8602 ;;
8603 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8604 libltdl_cv_sys_dlopen_deplibs=yes
8605 ;;
8606 esac
8607 ])
8608if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8609 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8610 [Define if the OS needs help to load dependent libraries for dlopen().])
8611fi
8612])# LT_SYS_DLOPEN_DEPLIBS
d9898ee8 8613
8d138742
CE
8614# Old name:
8615AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8616dnl aclocal-1.4 backwards compatibility:
8617dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
d9898ee8 8618
d9898ee8 8619
8d138742
CE
8620# LT_SYS_MODULE_EXT
8621# -----------------
8622AC_DEFUN([LT_SYS_MODULE_EXT],
8623[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8624AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8625 [libltdl_cv_shlibext],
8626[
8627module=yes
8628eval libltdl_cv_shlibext=$shrext_cmds
b0322a85
CE
8629module=no
8630eval libltdl_cv_shrext=$shrext_cmds
8d138742
CE
8631 ])
8632if test -n "$libltdl_cv_shlibext"; then
8633 m4_pattern_allow([LT_MODULE_EXT])dnl
8634 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8635 [Define to the extension used for runtime loadable modules, say, ".so".])
8636fi
b0322a85
CE
8637if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
8638 m4_pattern_allow([LT_SHARED_EXT])dnl
8639 AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
8640 [Define to the shared library suffix, say, ".dylib".])
8641fi
8d138742
CE
8642])# LT_SYS_MODULE_EXT
8643
8644# Old name:
8645AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8646dnl aclocal-1.4 backwards compatibility:
8647dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8648
8649
8650# LT_SYS_MODULE_PATH
8651# ------------------
8652AC_DEFUN([LT_SYS_MODULE_PATH],
8653[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8654AC_CACHE_CHECK([which variable specifies run-time module search path],
8655 [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8656if test -n "$lt_cv_module_path_var"; then
8657 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8658 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8659 [Define to the name of the environment variable that determines the run-time module search path.])
8660fi
8661])# LT_SYS_MODULE_PATH
8662
8663# Old name:
8664AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8665dnl aclocal-1.4 backwards compatibility:
8666dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8667
8668
8669# LT_SYS_DLSEARCH_PATH
8670# --------------------
8671AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8672[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8673AC_CACHE_CHECK([for the default library search path],
8674 [lt_cv_sys_dlsearch_path],
8675 [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8676if test -n "$lt_cv_sys_dlsearch_path"; then
8677 sys_dlsearch_path=
8678 for dir in $lt_cv_sys_dlsearch_path; do
8679 if test -z "$sys_dlsearch_path"; then
8680 sys_dlsearch_path="$dir"
8681 else
8682 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8683 fi
8684 done
8685 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8686 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8687 [Define to the system default library search path.])
8688fi
8689])# LT_SYS_DLSEARCH_PATH
8690
8691# Old name:
8692AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8693dnl aclocal-1.4 backwards compatibility:
8694dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
d9898ee8 8695
d9898ee8 8696
8d138742
CE
8697# _LT_CHECK_DLPREOPEN
8698# -------------------
8699m4_defun([_LT_CHECK_DLPREOPEN],
8700[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8701AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8702 [libltdl_cv_preloaded_symbols],
8703 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8704 libltdl_cv_preloaded_symbols=yes
8705 else
8706 libltdl_cv_preloaded_symbols=no
d9898ee8 8707 fi
8d138742
CE
8708 ])
8709if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8710 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8711 [Define if libtool can extract symbol lists from object files.])
d9898ee8 8712fi
8d138742 8713])# _LT_CHECK_DLPREOPEN
d9898ee8 8714
d9898ee8 8715
8d138742
CE
8716# LT_LIB_DLLOAD
8717# -------------
8718AC_DEFUN([LT_LIB_DLLOAD],
8719[m4_pattern_allow([^LT_DLLOADERS$])
8720LT_DLLOADERS=
8721AC_SUBST([LT_DLLOADERS])
8722
8723AC_LANG_PUSH([C])
8724
8725LIBADD_DLOPEN=
8726AC_SEARCH_LIBS([dlopen], [dl],
8727 [AC_DEFINE([HAVE_LIBDL], [1],
8728 [Define if you have the libdl library or equivalent.])
8729 if test "$ac_cv_search_dlopen" != "none required" ; then
8730 LIBADD_DLOPEN="-ldl"
8731 fi
8732 libltdl_cv_lib_dl_dlopen="yes"
8733 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8734 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8735# include <dlfcn.h>
8736#endif
8737 ]], [[dlopen(0, 0);]])],
8738 [AC_DEFINE([HAVE_LIBDL], [1],
8739 [Define if you have the libdl library or equivalent.])
8740 libltdl_cv_func_dlopen="yes"
8741 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8742 [AC_CHECK_LIB([svld], [dlopen],
8743 [AC_DEFINE([HAVE_LIBDL], [1],
8744 [Define if you have the libdl library or equivalent.])
8745 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8746 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8747if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8748then
8749 lt_save_LIBS="$LIBS"
8750 LIBS="$LIBS $LIBADD_DLOPEN"
8751 AC_CHECK_FUNCS([dlerror])
8752 LIBS="$lt_save_LIBS"
8753fi
8754AC_SUBST([LIBADD_DLOPEN])
8755
8756LIBADD_SHL_LOAD=
8757AC_CHECK_FUNC([shl_load],
8758 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8759 [Define if you have the shl_load function.])
8760 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8761 [AC_CHECK_LIB([dld], [shl_load],
8762 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8763 [Define if you have the shl_load function.])
8764 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8765 LIBADD_SHL_LOAD="-ldld"])])
8766AC_SUBST([LIBADD_SHL_LOAD])
d9898ee8 8767
8d138742
CE
8768case $host_os in
8769darwin[[1567]].*)
8770# We only want this for pre-Mac OS X 10.4.
8771 AC_CHECK_FUNC([_dyld_func_lookup],
8772 [AC_DEFINE([HAVE_DYLD], [1],
8773 [Define if you have the _dyld_func_lookup function.])
8774 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
d9898ee8 8775 ;;
8d138742
CE
8776beos*)
8777 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
d9898ee8 8778 ;;
8d138742
CE
8779cygwin* | mingw* | os2* | pw32*)
8780 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8781 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
d9898ee8 8782 ;;
8d138742 8783esac
d9898ee8 8784
8d138742
CE
8785AC_CHECK_LIB([dld], [dld_link],
8786 [AC_DEFINE([HAVE_DLD], [1],
8787 [Define if you have the GNU dld library.])
8788 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8789AC_SUBST([LIBADD_DLD_LINK])
d9898ee8 8790
8d138742
CE
8791m4_pattern_allow([^LT_DLPREOPEN$])
8792LT_DLPREOPEN=
8793if test -n "$LT_DLLOADERS"
8794then
8795 for lt_loader in $LT_DLLOADERS; do
8796 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8797 done
8798 AC_DEFINE([HAVE_LIBDLLOADER], [1],
8799 [Define if libdlloader will be built on this platform])
8800fi
8801AC_SUBST([LT_DLPREOPEN])
d9898ee8 8802
8d138742
CE
8803dnl This isn't used anymore, but set it for backwards compatibility
8804LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8805AC_SUBST([LIBADD_DL])
d9898ee8 8806
8d138742
CE
8807AC_LANG_POP
8808])# LT_LIB_DLLOAD
d9898ee8 8809
8d138742
CE
8810# Old name:
8811AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8812dnl aclocal-1.4 backwards compatibility:
8813dnl AC_DEFUN([AC_LTDL_DLLIB], [])
d9898ee8 8814
d9898ee8 8815
8d138742
CE
8816# LT_SYS_SYMBOL_USCORE
8817# --------------------
8818# does the compiler prefix global symbols with an underscore?
8819AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8820[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8821AC_CACHE_CHECK([for _ prefix in compiled symbols],
8822 [lt_cv_sys_symbol_underscore],
8823 [lt_cv_sys_symbol_underscore=no
8824 cat > conftest.$ac_ext <<_LT_EOF
8825void nm_test_func(){}
8826int main(){nm_test_func;return 0;}
8827_LT_EOF
8828 if AC_TRY_EVAL(ac_compile); then
8829 # Now try to grab the symbols.
8830 ac_nlist=conftest.nm
8831 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8832 # See whether the symbols have a leading underscore.
8833 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8834 lt_cv_sys_symbol_underscore=yes
d9898ee8 8835 else
8d138742
CE
8836 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8837 :
8838 else
8839 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8840 fi
d9898ee8 8841 fi
8d138742
CE
8842 else
8843 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8844 fi
8845 else
8846 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8847 cat conftest.c >&AS_MESSAGE_LOG_FD
8848 fi
8849 rm -rf conftest*
8850 ])
8851 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8852 AC_SUBST([sys_symbol_underscore])
8853])# LT_SYS_SYMBOL_USCORE
d9898ee8 8854
8d138742
CE
8855# Old name:
8856AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8857dnl aclocal-1.4 backwards compatibility:
8858dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
d9898ee8 8859
d9898ee8 8860
8d138742
CE
8861# LT_FUNC_DLSYM_USCORE
8862# --------------------
8863AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8864[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8865if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8866 if test x"$libltdl_cv_func_dlopen" = xyes ||
8867 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8868 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8869 [libltdl_cv_need_uscore],
8870 [libltdl_cv_need_uscore=unknown
8871 save_LIBS="$LIBS"
8872 LIBS="$LIBS $LIBADD_DLOPEN"
8873 _LT_TRY_DLOPEN_SELF(
8874 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8875 [], [libltdl_cv_need_uscore=cross])
8876 LIBS="$save_LIBS"
8877 ])
8878 fi
8879fi
d9898ee8 8880
8d138742
CE
8881if test x"$libltdl_cv_need_uscore" = xyes; then
8882 AC_DEFINE([NEED_USCORE], [1],
8883 [Define if dlsym() requires a leading underscore in symbol names.])
8884fi
8885])# LT_FUNC_DLSYM_USCORE
d9898ee8 8886
8d138742
CE
8887# Old name:
8888AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8889dnl aclocal-1.4 backwards compatibility:
8890dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
d9898ee8 8891
8d138742
CE
8892# Helper functions for option handling. -*- Autoconf -*-
8893#
b0322a85
CE
8894# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8895# Inc.
8d138742
CE
8896# Written by Gary V. Vaughan, 2004
8897#
8898# This file is free software; the Free Software Foundation gives
8899# unlimited permission to copy and/or distribute it, with or without
8900# modifications, as long as this notice is preserved.
d9898ee8 8901
b0322a85 8902# serial 7 ltoptions.m4
d9898ee8 8903
8d138742
CE
8904# This is to help aclocal find these macros, as it can't see m4_define.
8905AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
d9898ee8 8906
d9898ee8 8907
8d138742
CE
8908# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8909# ------------------------------------------
8910m4_define([_LT_MANGLE_OPTION],
8911[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
d9898ee8 8912
d9898ee8 8913
8d138742
CE
8914# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8915# ---------------------------------------
8916# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8917# matching handler defined, dispatch to it. Other OPTION-NAMEs are
8918# saved as a flag.
8919m4_define([_LT_SET_OPTION],
8920[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8921m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8922 _LT_MANGLE_DEFUN([$1], [$2]),
8923 [m4_warning([Unknown $1 option `$2'])])[]dnl
8924])
d9898ee8 8925
d9898ee8 8926
8d138742
CE
8927# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8928# ------------------------------------------------------------
8929# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8930m4_define([_LT_IF_OPTION],
8931[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8932
8933
8934# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8935# -------------------------------------------------------
8936# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8937# are set.
8938m4_define([_LT_UNLESS_OPTIONS],
8939[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8940 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8941 [m4_define([$0_found])])])[]dnl
8942m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8943])[]dnl
8944])
d9898ee8 8945
d9898ee8 8946
8d138742
CE
8947# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8948# ----------------------------------------
8949# OPTION-LIST is a space-separated list of Libtool options associated
8950# with MACRO-NAME. If any OPTION has a matching handler declared with
8951# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8952# the unknown option and exit.
8953m4_defun([_LT_SET_OPTIONS],
8954[# Set options
8955m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8956 [_LT_SET_OPTION([$1], _LT_Option)])
8957
8958m4_if([$1],[LT_INIT],[
8959 dnl
8960 dnl Simply set some default values (i.e off) if boolean options were not
8961 dnl specified:
8962 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8963 ])
8964 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8965 ])
8966 dnl
8967 dnl If no reference was made to various pairs of opposing options, then
8968 dnl we run the default mode handler for the pair. For example, if neither
8969 dnl `shared' nor `disable-shared' was passed, we enable building of shared
8970 dnl archives by default:
8971 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8972 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8973 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8974 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8975 [_LT_ENABLE_FAST_INSTALL])
8976 ])
8977])# _LT_SET_OPTIONS
8978
d9898ee8 8979
d9898ee8 8980
8d138742
CE
8981# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8982# -----------------------------------------
8983m4_define([_LT_MANGLE_DEFUN],
8984[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
d9898ee8 8985
d9898ee8 8986
8d138742
CE
8987# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8988# -----------------------------------------------
8989m4_define([LT_OPTION_DEFINE],
8990[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8991])# LT_OPTION_DEFINE
d9898ee8 8992
d9898ee8 8993
8d138742
CE
8994# dlopen
8995# ------
8996LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8997])
d9898ee8 8998
8d138742
CE
8999AU_DEFUN([AC_LIBTOOL_DLOPEN],
9000[_LT_SET_OPTION([LT_INIT], [dlopen])
9001AC_DIAGNOSE([obsolete],
9002[$0: Remove this warning and the call to _LT_SET_OPTION when you
9003put the `dlopen' option into LT_INIT's first parameter.])
9004])
d9898ee8 9005
8d138742
CE
9006dnl aclocal-1.4 backwards compatibility:
9007dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
d9898ee8 9008
d9898ee8 9009
8d138742
CE
9010# win32-dll
9011# ---------
9012# Declare package support for building win32 dll's.
9013LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9014[enable_win32_dll=yes
d9898ee8 9015
8d138742 9016case $host in
b0322a85 9017*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8d138742
CE
9018 AC_CHECK_TOOL(AS, as, false)
9019 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9020 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9021 ;;
9022esac
d9898ee8 9023
8d138742 9024test -z "$AS" && AS=as
b0322a85 9025_LT_DECL([], [AS], [1], [Assembler program])dnl
d9898ee8 9026
8d138742 9027test -z "$DLLTOOL" && DLLTOOL=dlltool
b0322a85 9028_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
d9898ee8 9029
8d138742 9030test -z "$OBJDUMP" && OBJDUMP=objdump
b0322a85 9031_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8d138742 9032])# win32-dll
d9898ee8 9033
8d138742
CE
9034AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9035[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9036_LT_SET_OPTION([LT_INIT], [win32-dll])
9037AC_DIAGNOSE([obsolete],
9038[$0: Remove this warning and the call to _LT_SET_OPTION when you
9039put the `win32-dll' option into LT_INIT's first parameter.])
9040])
d9898ee8 9041
8d138742
CE
9042dnl aclocal-1.4 backwards compatibility:
9043dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9044
9045
9046# _LT_ENABLE_SHARED([DEFAULT])
9047# ----------------------------
9048# implement the --enable-shared flag, and supports the `shared' and
9049# `disable-shared' LT_INIT options.
9050# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9051m4_define([_LT_ENABLE_SHARED],
9052[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9053AC_ARG_ENABLE([shared],
9054 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9055 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9056 [p=${PACKAGE-default}
9057 case $enableval in
9058 yes) enable_shared=yes ;;
9059 no) enable_shared=no ;;
9060 *)
9061 enable_shared=no
9062 # Look at the argument we got. We use all the common list separators.
9063 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9064 for pkg in $enableval; do
9065 IFS="$lt_save_ifs"
9066 if test "X$pkg" = "X$p"; then
9067 enable_shared=yes
9068 fi
9069 done
9070 IFS="$lt_save_ifs"
d9898ee8 9071 ;;
8d138742
CE
9072 esac],
9073 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
d9898ee8 9074
8d138742
CE
9075 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9076 [Whether or not to build shared libraries])
9077])# _LT_ENABLE_SHARED
d9898ee8 9078
8d138742
CE
9079LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9080LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
d9898ee8 9081
8d138742
CE
9082# Old names:
9083AC_DEFUN([AC_ENABLE_SHARED],
9084[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9085])
d9898ee8 9086
8d138742
CE
9087AC_DEFUN([AC_DISABLE_SHARED],
9088[_LT_SET_OPTION([LT_INIT], [disable-shared])
9089])
d9898ee8 9090
8d138742
CE
9091AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9092AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
d9898ee8 9093
8d138742
CE
9094dnl aclocal-1.4 backwards compatibility:
9095dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9096dnl AC_DEFUN([AM_DISABLE_SHARED], [])
d9898ee8 9097
d9898ee8 9098
d9898ee8 9099
8d138742
CE
9100# _LT_ENABLE_STATIC([DEFAULT])
9101# ----------------------------
9102# implement the --enable-static flag, and support the `static' and
9103# `disable-static' LT_INIT options.
9104# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9105m4_define([_LT_ENABLE_STATIC],
9106[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9107AC_ARG_ENABLE([static],
9108 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9109 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9110 [p=${PACKAGE-default}
9111 case $enableval in
9112 yes) enable_static=yes ;;
9113 no) enable_static=no ;;
9114 *)
9115 enable_static=no
9116 # Look at the argument we got. We use all the common list separators.
9117 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9118 for pkg in $enableval; do
9119 IFS="$lt_save_ifs"
9120 if test "X$pkg" = "X$p"; then
9121 enable_static=yes
9122 fi
9123 done
9124 IFS="$lt_save_ifs"
d9898ee8 9125 ;;
8d138742
CE
9126 esac],
9127 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
d9898ee8 9128
8d138742
CE
9129 _LT_DECL([build_old_libs], [enable_static], [0],
9130 [Whether or not to build static libraries])
9131])# _LT_ENABLE_STATIC
d9898ee8 9132
8d138742
CE
9133LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9134LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
d9898ee8 9135
8d138742
CE
9136# Old names:
9137AC_DEFUN([AC_ENABLE_STATIC],
9138[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9139])
d9898ee8 9140
8d138742
CE
9141AC_DEFUN([AC_DISABLE_STATIC],
9142[_LT_SET_OPTION([LT_INIT], [disable-static])
9143])
d9898ee8 9144
8d138742
CE
9145AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9146AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
d9898ee8 9147
8d138742
CE
9148dnl aclocal-1.4 backwards compatibility:
9149dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9150dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9151
9152
9153
9154# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9155# ----------------------------------
9156# implement the --enable-fast-install flag, and support the `fast-install'
9157# and `disable-fast-install' LT_INIT options.
9158# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9159m4_define([_LT_ENABLE_FAST_INSTALL],
9160[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9161AC_ARG_ENABLE([fast-install],
9162 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9163 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9164 [p=${PACKAGE-default}
9165 case $enableval in
9166 yes) enable_fast_install=yes ;;
9167 no) enable_fast_install=no ;;
9168 *)
9169 enable_fast_install=no
9170 # Look at the argument we got. We use all the common list separators.
9171 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9172 for pkg in $enableval; do
9173 IFS="$lt_save_ifs"
9174 if test "X$pkg" = "X$p"; then
9175 enable_fast_install=yes
ac40fd9e 9176 fi
8d138742
CE
9177 done
9178 IFS="$lt_save_ifs"
d9898ee8 9179 ;;
8d138742
CE
9180 esac],
9181 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
d9898ee8 9182
8d138742
CE
9183_LT_DECL([fast_install], [enable_fast_install], [0],
9184 [Whether or not to optimize for fast installation])dnl
9185])# _LT_ENABLE_FAST_INSTALL
d9898ee8 9186
8d138742
CE
9187LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9188LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
d9898ee8 9189
8d138742
CE
9190# Old names:
9191AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9192[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9193AC_DIAGNOSE([obsolete],
9194[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9195the `fast-install' option into LT_INIT's first parameter.])
9196])
d9898ee8 9197
8d138742
CE
9198AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9199[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9200AC_DIAGNOSE([obsolete],
9201[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9202the `disable-fast-install' option into LT_INIT's first parameter.])
9203])
d9898ee8 9204
8d138742
CE
9205dnl aclocal-1.4 backwards compatibility:
9206dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9207dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
d9898ee8 9208
d9898ee8 9209
8d138742
CE
9210# _LT_WITH_PIC([MODE])
9211# --------------------
9212# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9213# LT_INIT options.
9214# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9215m4_define([_LT_WITH_PIC],
9216[AC_ARG_WITH([pic],
b0322a85 9217 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8d138742 9218 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
b0322a85
CE
9219 [lt_p=${PACKAGE-default}
9220 case $withval in
9221 yes|no) pic_mode=$withval ;;
9222 *)
9223 pic_mode=default
9224 # Look at the argument we got. We use all the common list separators.
9225 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9226 for lt_pkg in $withval; do
9227 IFS="$lt_save_ifs"
9228 if test "X$lt_pkg" = "X$lt_p"; then
9229 pic_mode=yes
9230 fi
9231 done
9232 IFS="$lt_save_ifs"
9233 ;;
9234 esac],
8d138742 9235 [pic_mode=default])
d9898ee8 9236
8d138742 9237test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
d9898ee8 9238
8d138742
CE
9239_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9240])# _LT_WITH_PIC
d9898ee8 9241
8d138742
CE
9242LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9243LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9244
9245# Old name:
9246AU_DEFUN([AC_LIBTOOL_PICMODE],
9247[_LT_SET_OPTION([LT_INIT], [pic-only])
9248AC_DIAGNOSE([obsolete],
9249[$0: Remove this warning and the call to _LT_SET_OPTION when you
9250put the `pic-only' option into LT_INIT's first parameter.])
d9898ee8 9251])
d9898ee8 9252
8d138742
CE
9253dnl aclocal-1.4 backwards compatibility:
9254dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
d9898ee8 9255
d9898ee8 9256
8d138742
CE
9257m4_define([_LTDL_MODE], [])
9258LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9259 [m4_define([_LTDL_MODE], [nonrecursive])])
9260LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9261 [m4_define([_LTDL_MODE], [recursive])])
9262LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9263 [m4_define([_LTDL_MODE], [subproject])])
d9898ee8 9264
8d138742
CE
9265m4_define([_LTDL_TYPE], [])
9266LT_OPTION_DEFINE([LTDL_INIT], [installable],
9267 [m4_define([_LTDL_TYPE], [installable])])
9268LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9269 [m4_define([_LTDL_TYPE], [convenience])])
d9898ee8 9270
8d138742 9271# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
d9898ee8 9272#
8d138742
CE
9273# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9274# Written by Gary V. Vaughan, 2004
d9898ee8 9275#
8d138742
CE
9276# This file is free software; the Free Software Foundation gives
9277# unlimited permission to copy and/or distribute it, with or without
9278# modifications, as long as this notice is preserved.
d9898ee8 9279
8d138742 9280# serial 6 ltsugar.m4
d9898ee8 9281
8d138742
CE
9282# This is to help aclocal find these macros, as it can't see m4_define.
9283AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
d9898ee8 9284
9285
8d138742
CE
9286# lt_join(SEP, ARG1, [ARG2...])
9287# -----------------------------
9288# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9289# associated separator.
9290# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9291# versions in m4sugar had bugs.
9292m4_define([lt_join],
9293[m4_if([$#], [1], [],
9294 [$#], [2], [[$2]],
9295 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9296m4_define([_lt_join],
9297[m4_if([$#$2], [2], [],
9298 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9299
9300
9301# lt_car(LIST)
9302# lt_cdr(LIST)
9303# ------------
9304# Manipulate m4 lists.
9305# These macros are necessary as long as will still need to support
9306# Autoconf-2.59 which quotes differently.
9307m4_define([lt_car], [[$1]])
9308m4_define([lt_cdr],
9309[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9310 [$#], 1, [],
9311 [m4_dquote(m4_shift($@))])])
9312m4_define([lt_unquote], $1)
9313
9314
9315# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9316# ------------------------------------------
9317# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9318# Note that neither SEPARATOR nor STRING are expanded; they are appended
9319# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9320# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9321# than defined and empty).
9322#
9323# This macro is needed until we can rely on Autoconf 2.62, since earlier
9324# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9325m4_define([lt_append],
9326[m4_define([$1],
9327 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9328
9329
9330
9331# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9332# ----------------------------------------------------------
9333# Produce a SEP delimited list of all paired combinations of elements of
9334# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9335# has the form PREFIXmINFIXSUFFIXn.
9336# Needed until we can rely on m4_combine added in Autoconf 2.62.
9337m4_define([lt_combine],
9338[m4_if(m4_eval([$# > 3]), [1],
9339 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9340[[m4_foreach([_Lt_prefix], [$2],
9341 [m4_foreach([_Lt_suffix],
9342 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9343 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9344
9345
9346# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9347# -----------------------------------------------------------------------
9348# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9349# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9350m4_define([lt_if_append_uniq],
9351[m4_ifdef([$1],
9352 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9353 [lt_append([$1], [$2], [$3])$4],
9354 [$5])],
9355 [lt_append([$1], [$2], [$3])$4])])
9356
9357
9358# lt_dict_add(DICT, KEY, VALUE)
9359# -----------------------------
9360m4_define([lt_dict_add],
9361[m4_define([$1($2)], [$3])])
d9898ee8 9362
d9898ee8 9363
8d138742
CE
9364# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9365# --------------------------------------------
9366m4_define([lt_dict_add_subkey],
9367[m4_define([$1($2:$3)], [$4])])
d9898ee8 9368
8d138742
CE
9369
9370# lt_dict_fetch(DICT, KEY, [SUBKEY])
9371# ----------------------------------
9372m4_define([lt_dict_fetch],
9373[m4_ifval([$3],
9374 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9375 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9376
9377
9378# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9379# -----------------------------------------------------------------
9380m4_define([lt_if_dict_fetch],
9381[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9382 [$5],
9383 [$6])])
9384
9385
9386# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9387# --------------------------------------------------------------
9388m4_define([lt_dict_filter],
9389[m4_if([$5], [], [],
9390 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9391 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9392 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
d9898ee8 9393])
9394
8d138742
CE
9395# ltversion.m4 -- version numbers -*- Autoconf -*-
9396#
9397# Copyright (C) 2004 Free Software Foundation, Inc.
9398# Written by Scott James Remnant, 2004
9399#
9400# This file is free software; the Free Software Foundation gives
9401# unlimited permission to copy and/or distribute it, with or without
9402# modifications, as long as this notice is preserved.
ac40fd9e 9403
b0322a85 9404# @configure_input@
ac40fd9e 9405
b0322a85 9406# serial 3337 ltversion.m4
8d138742 9407# This file is part of GNU Libtool
ac40fd9e 9408
b0322a85
CE
9409m4_define([LT_PACKAGE_VERSION], [2.4.2])
9410m4_define([LT_PACKAGE_REVISION], [1.3337])
ac40fd9e 9411
8d138742 9412AC_DEFUN([LTVERSION_VERSION],
b0322a85
CE
9413[macro_version='2.4.2'
9414macro_revision='1.3337'
8d138742
CE
9415_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9416_LT_DECL(, macro_revision, 0)
d9898ee8 9417])
9418
8d138742
CE
9419# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9420#
b0322a85 9421# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
8d138742
CE
9422# Written by Scott James Remnant, 2004.
9423#
9424# This file is free software; the Free Software Foundation gives
9425# unlimited permission to copy and/or distribute it, with or without
9426# modifications, as long as this notice is preserved.
9427
b0322a85 9428# serial 5 lt~obsolete.m4
8d138742
CE
9429
9430# These exist entirely to fool aclocal when bootstrapping libtool.
9431#
9432# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9433# which have later been changed to m4_define as they aren't part of the
9434# exported API, or moved to Autoconf or Automake where they belong.
9435#
9436# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9437# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9438# using a macro with the same name in our local m4/libtool.m4 it'll
9439# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9440# and doesn't know about Autoconf macros at all.)
9441#
9442# So we provide this file, which has a silly filename so it's always
9443# included after everything else. This provides aclocal with the
9444# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9445# because those macros already exist, or will be overwritten later.
9446# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9447#
9448# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9449# Yes, that means every name once taken will need to remain here until
9450# we give up compatibility with versions before 1.7, at which point
9451# we need to keep only those names which we still refer to.
9452
9453# This is to help aclocal find these macros, as it can't see m4_define.
9454AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9455
9456m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9457m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9458m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9459m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9460m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9461m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9462m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9463m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9464m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9465m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9466m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9467m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9468m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9469m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9470m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9471m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9472m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9473m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9474m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9475m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9476m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9477m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9478m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9479m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9480m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9481m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9482m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9483m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9484m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9485m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9486m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9487m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9488m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9489m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9490m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9491m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9492m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9493m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9494m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9495m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9496m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9497m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8d138742
CE
9498m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9499m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9500m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9501m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9502m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9503m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9504m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9505m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9506m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9507m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9508m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9509m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
b0322a85
CE
9510m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9511m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9512m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9513m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9514m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9515m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9516m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
8d138742 9517
d9898ee8 9518# Configure sysconftool
9519# Copyright 2000-2005 Double Precision, Inc. See COPYING for
9520# distribution information.
9521#
9522# AC_PROG_SYSCONFTOOL
9523
9524AC_DEFUN([AC_PROG_SYSCONFTOOL],
9525[
9526
9527 AC_PATH_PROGS(SYSCONFTOOL_PERL, perl5 perl, perl)
9528
9529 if test "$SYSCONFTOOL_PERL" = "perl"
9530 then
9531 AC_ERROR(perl not found - please install perl)
9532 fi
9533
9534 AC_MSG_CHECKING(for sysconftool...)
9535 SYSCONFTOOL=""
9536 for sysconf_dir in $ac_aux_dir . .. ../..
9537 do
9538 if test -f $srcdir/$sysconf_dir/sysconftool
9539 then
9540 SYSCONFTOOL=$srcdir/$sysconf_dir/sysconftool
9541 break
9542 fi
9543 done
9544
9545 if test "$SYSCONFTOOL" = ""
9546 then
9547 AC_ERROR(sysconftool missing - not in the package)
9548 fi
9549
9550 AC_MSG_RESULT( $SYSCONFTOOL)
9551 SYSCONFTOOL="$SYSCONFTOOL_PERL $SYSCONFTOOL"
9552 AC_SUBST(SYSCONFTOOL)
9553]
9554)
9555
b0322a85 9556# Copyright (C) 2002-2013 Free Software Foundation, Inc.
d9898ee8 9557#
9558# This file is free software; the Free Software Foundation
9559# gives unlimited permission to copy and/or distribute it,
9560# with or without modifications, as long as this notice is preserved.
9561
9562# AM_AUTOMAKE_VERSION(VERSION)
9563# ----------------------------
9564# Automake X.Y traces this macro to ensure aclocal.m4 has been
9565# generated from the m4 files accompanying Automake X.Y.
dd184caf 9566# (This private macro should not be called outside this file.)
9567AC_DEFUN([AM_AUTOMAKE_VERSION],
b0322a85 9568[am__api_version='1.13'
dd184caf 9569dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9570dnl require some minimum version. Point them to the right macro.
b0322a85 9571m4_if([$1], [1.13.4], [],
dd184caf 9572 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9573])
9574
9575# _AM_AUTOCONF_VERSION(VERSION)
9576# -----------------------------
9577# aclocal traces this macro to find the Autoconf version.
9578# This is a private macro too. Using m4_define simplifies
9579# the logic in aclocal, which can simply ignore this definition.
9580m4_define([_AM_AUTOCONF_VERSION], [])
d9898ee8 9581
9582# AM_SET_CURRENT_AUTOMAKE_VERSION
9583# -------------------------------
dd184caf 9584# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8d138742 9585# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
d9898ee8 9586AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
b0322a85 9587[AM_AUTOMAKE_VERSION([1.13.4])dnl
ac40fd9e 9588m4_ifndef([AC_AUTOCONF_VERSION],
9589 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8d138742 9590_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
d9898ee8 9591
9592# AM_AUX_DIR_EXPAND -*- Autoconf -*-
9593
b0322a85 9594# Copyright (C) 2001-2013 Free Software Foundation, Inc.
d9898ee8 9595#
9596# This file is free software; the Free Software Foundation
9597# gives unlimited permission to copy and/or distribute it,
9598# with or without modifications, as long as this notice is preserved.
9599
9600# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
b0322a85
CE
9601# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
9602# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
d9898ee8 9603#
9604# Of course, Automake must honor this variable whenever it calls a
9605# tool from the auxiliary directory. The problem is that $srcdir (and
9606# therefore $ac_aux_dir as well) can be either absolute or relative,
9607# depending on how configure is run. This is pretty annoying, since
9608# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9609# source directory, any form will work fine, but in subdirectories a
9610# relative path needs to be adjusted first.
9611#
9612# $ac_aux_dir/missing
9613# fails when called from a subdirectory if $ac_aux_dir is relative
9614# $top_srcdir/$ac_aux_dir/missing
9615# fails if $ac_aux_dir is absolute,
9616# fails when called from a subdirectory in a VPATH build with
9617# a relative $ac_aux_dir
9618#
9619# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9620# are both prefixed by $srcdir. In an in-source build this is usually
b0322a85 9621# harmless because $srcdir is '.', but things will broke when you
d9898ee8 9622# start a VPATH build or use an absolute $srcdir.
9623#
9624# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9625# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9626# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9627# and then we would define $MISSING as
9628# MISSING="\${SHELL} $am_aux_dir/missing"
9629# This will work as long as MISSING is not called from configure, because
9630# unfortunately $(top_srcdir) has no meaning in configure.
9631# However there are other variables, like CC, which are often used in
9632# configure, and could therefore not use this "fixed" $ac_aux_dir.
9633#
9634# Another solution, used here, is to always expand $ac_aux_dir to an
9635# absolute PATH. The drawback is that using absolute paths prevent a
9636# configured tree to be moved without reconfiguration.
9637
9638AC_DEFUN([AM_AUX_DIR_EXPAND],
9639[dnl Rely on autoconf to set up CDPATH properly.
9640AC_PREREQ([2.50])dnl
9641# expand $ac_aux_dir to an absolute path
9642am_aux_dir=`cd $ac_aux_dir && pwd`
9643])
9644
9645# AM_CONDITIONAL -*- Autoconf -*-
9646
b0322a85 9647# Copyright (C) 1997-2013 Free Software Foundation, Inc.
d9898ee8 9648#
9649# This file is free software; the Free Software Foundation
9650# gives unlimited permission to copy and/or distribute it,
9651# with or without modifications, as long as this notice is preserved.
9652
d9898ee8 9653# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9654# -------------------------------------
9655# Define a conditional.
9656AC_DEFUN([AM_CONDITIONAL],
b0322a85
CE
9657[AC_PREREQ([2.52])dnl
9658 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9659 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
dd184caf 9660AC_SUBST([$1_TRUE])dnl
9661AC_SUBST([$1_FALSE])dnl
9662_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9663_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8d138742 9664m4_define([_AM_COND_VALUE_$1], [$2])dnl
d9898ee8 9665if $2; then
9666 $1_TRUE=
9667 $1_FALSE='#'
9668else
9669 $1_TRUE='#'
9670 $1_FALSE=
9671fi
9672AC_CONFIG_COMMANDS_PRE(
9673[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9674 AC_MSG_ERROR([[conditional "$1" was never defined.
9675Usually this means the macro was only invoked conditionally.]])
9676fi])])
9677
b0322a85 9678# Copyright (C) 1999-2013 Free Software Foundation, Inc.
d9898ee8 9679#
9680# This file is free software; the Free Software Foundation
9681# gives unlimited permission to copy and/or distribute it,
9682# with or without modifications, as long as this notice is preserved.
9683
d9898ee8 9684
b0322a85 9685# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
d9898ee8 9686# written in clear, in which case automake, when reading aclocal.m4,
9687# will think it sees a *use*, and therefore will trigger all it's
9688# C support machinery. Also note that it means that autoscan, seeing
9689# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9690
9691
9692# _AM_DEPENDENCIES(NAME)
9693# ----------------------
9694# See how the compiler implements dependency checking.
b0322a85 9695# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
d9898ee8 9696# We try a few techniques and use that to set a single cache variable.
9697#
9698# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9699# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9700# dependency, and given that the user is not expected to run this macro,
9701# just rely on AC_PROG_CC.
9702AC_DEFUN([_AM_DEPENDENCIES],
9703[AC_REQUIRE([AM_SET_DEPDIR])dnl
9704AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9705AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9706AC_REQUIRE([AM_DEP_TRACK])dnl
9707
b0322a85
CE
9708m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
9709 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
9710 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9711 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9712 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
9713 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9714 [depcc="$$1" am_compiler_list=])
d9898ee8 9715
9716AC_CACHE_CHECK([dependency style of $depcc],
9717 [am_cv_$1_dependencies_compiler_type],
9718[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9719 # We make a subdir and do the tests there. Otherwise we can end up
9720 # making bogus files that we don't know about and never remove. For
9721 # instance it was reported that on HP-UX the gcc test will end up
b0322a85
CE
9722 # making a dummy file named 'D' -- because '-MD' means "put the output
9723 # in D".
9724 rm -rf conftest.dir
d9898ee8 9725 mkdir conftest.dir
9726 # Copy depcomp to subdir because otherwise we won't find it if we're
9727 # using a relative directory.
9728 cp "$am_depcomp" conftest.dir
9729 cd conftest.dir
9730 # We will build objects and dependencies in a subdirectory because
9731 # it helps to detect inapplicable dependency modes. For instance
9732 # both Tru64's cc and ICC support -MD to output dependencies as a
9733 # side effect of compilation, but ICC will put the dependencies in
9734 # the current directory while Tru64 will put them in the object
9735 # directory.
9736 mkdir sub
9737
9738 am_cv_$1_dependencies_compiler_type=none
9739 if test "$am_compiler_list" = ""; then
9740 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9741 fi
8d138742
CE
9742 am__universal=false
9743 m4_case([$1], [CC],
9744 [case " $depcc " in #(
9745 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9746 esac],
9747 [CXX],
9748 [case " $depcc " in #(
9749 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9750 esac])
9751
d9898ee8 9752 for depmode in $am_compiler_list; do
9753 # Setup a source with many dependencies, because some compilers
9754 # like to wrap large dependency lists on column 80 (with \), and
9755 # we should not choose a depcomp mode which is confused by this.
9756 #
9757 # We need to recreate these files for each test, as the compiler may
9758 # overwrite some of them when testing with obscure command lines.
9759 # This happens at least with the AIX C compiler.
9760 : > sub/conftest.c
9761 for i in 1 2 3 4 5 6; do
9762 echo '#include "conftst'$i'.h"' >> sub/conftest.c
b0322a85
CE
9763 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9764 # Solaris 10 /bin/sh.
9765 echo '/* dummy */' > sub/conftst$i.h
d9898ee8 9766 done
9767 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9768
b0322a85 9769 # We check with '-c' and '-o' for the sake of the "dashmstdout"
8d138742 9770 # mode. It turns out that the SunPro C++ compiler does not properly
b0322a85
CE
9771 # handle '-M -o', and we need to detect this. Also, some Intel
9772 # versions had trouble with output in subdirs.
8d138742
CE
9773 am__obj=sub/conftest.${OBJEXT-o}
9774 am__minus_obj="-o $am__obj"
d9898ee8 9775 case $depmode in
8d138742
CE
9776 gcc)
9777 # This depmode causes a compiler race in universal mode.
9778 test "$am__universal" = false || continue
9779 ;;
d9898ee8 9780 nosideeffect)
b0322a85
CE
9781 # After this tag, mechanisms are not by side-effect, so they'll
9782 # only be used when explicitly requested.
d9898ee8 9783 if test "x$enable_dependency_tracking" = xyes; then
9784 continue
9785 else
9786 break
9787 fi
9788 ;;
b0322a85
CE
9789 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9790 # This compiler won't grok '-c -o', but also, the minuso test has
8d138742
CE
9791 # not run yet. These depmodes are late enough in the game, and
9792 # so weak that their functioning should not be impacted.
9793 am__obj=conftest.${OBJEXT-o}
9794 am__minus_obj=
9795 ;;
d9898ee8 9796 none) break ;;
9797 esac
d9898ee8 9798 if depmode=$depmode \
8d138742 9799 source=sub/conftest.c object=$am__obj \
d9898ee8 9800 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8d138742 9801 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
d9898ee8 9802 >/dev/null 2>conftest.err &&
dd184caf 9803 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
d9898ee8 9804 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8d138742 9805 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
d9898ee8 9806 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9807 # icc doesn't choke on unknown options, it will just issue warnings
9808 # or remarks (even with -Werror). So we grep stderr for any message
9809 # that says an option was ignored or not supported.
9810 # When given -MP, icc 7.0 and 7.1 complain thusly:
9811 # icc: Command line warning: ignoring option '-M'; no argument required
9812 # The diagnosis changed in icc 8.0:
9813 # icc: Command line remark: option '-MP' not supported
9814 if (grep 'ignoring option' conftest.err ||
9815 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9816 am_cv_$1_dependencies_compiler_type=$depmode
9817 break
9818 fi
9819 fi
9820 done
9821
9822 cd ..
9823 rm -rf conftest.dir
9824else
9825 am_cv_$1_dependencies_compiler_type=none
9826fi
9827])
9828AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9829AM_CONDITIONAL([am__fastdep$1], [
9830 test "x$enable_dependency_tracking" != xno \
9831 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9832])
9833
9834
9835# AM_SET_DEPDIR
9836# -------------
9837# Choose a directory name for dependency files.
b0322a85 9838# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
d9898ee8 9839AC_DEFUN([AM_SET_DEPDIR],
9840[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9841AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9842])
9843
9844
9845# AM_DEP_TRACK
9846# ------------
9847AC_DEFUN([AM_DEP_TRACK],
b0322a85
CE
9848[AC_ARG_ENABLE([dependency-tracking], [dnl
9849AS_HELP_STRING(
9850 [--enable-dependency-tracking],
9851 [do not reject slow dependency extractors])
9852AS_HELP_STRING(
9853 [--disable-dependency-tracking],
9854 [speeds up one-time build])])
d9898ee8 9855if test "x$enable_dependency_tracking" != xno; then
9856 am_depcomp="$ac_aux_dir/depcomp"
9857 AMDEPBACKSLASH='\'
b0322a85 9858 am__nodep='_no'
d9898ee8 9859fi
9860AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
dd184caf 9861AC_SUBST([AMDEPBACKSLASH])dnl
9862_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
b0322a85
CE
9863AC_SUBST([am__nodep])dnl
9864_AM_SUBST_NOTMAKE([am__nodep])dnl
d9898ee8 9865])
9866
9867# Generate code to set up dependency tracking. -*- Autoconf -*-
9868
b0322a85 9869# Copyright (C) 1999-2013 Free Software Foundation, Inc.
d9898ee8 9870#
9871# This file is free software; the Free Software Foundation
9872# gives unlimited permission to copy and/or distribute it,
9873# with or without modifications, as long as this notice is preserved.
9874
d9898ee8 9875
9876# _AM_OUTPUT_DEPENDENCY_COMMANDS
9877# ------------------------------
9878AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8d138742 9879[{
b0322a85 9880 # Older Autoconf quotes --file arguments for eval, but not when files
8d138742
CE
9881 # are listed without --file. Let's play safe and only enable the eval
9882 # if we detect the quoting.
9883 case $CONFIG_FILES in
9884 *\'*) eval set x "$CONFIG_FILES" ;;
9885 *) set x $CONFIG_FILES ;;
9886 esac
9887 shift
9888 for mf
9889 do
9890 # Strip MF so we end up with the name of the file.
9891 mf=`echo "$mf" | sed -e 's/:.*$//'`
9892 # Check whether this is an Automake generated Makefile or not.
b0322a85 9893 # We used to match only the files named 'Makefile.in', but
8d138742
CE
9894 # some people rename them; so instead we look at the file content.
9895 # Grep'ing the first line is not enough: some people post-process
9896 # each Makefile.in and add a new line on top of each file to say so.
9897 # Grep'ing the whole file is not good either: AIX grep has a line
9898 # limit of 2048, but all sed's we know have understand at least 4000.
9899 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9900 dirpart=`AS_DIRNAME("$mf")`
9901 else
9902 continue
9903 fi
9904 # Extract the definition of DEPDIR, am__include, and am__quote
b0322a85 9905 # from the Makefile without running 'make'.
8d138742
CE
9906 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9907 test -z "$DEPDIR" && continue
9908 am__include=`sed -n 's/^am__include = //p' < "$mf"`
b0322a85 9909 test -z "$am__include" && continue
8d138742 9910 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8d138742
CE
9911 # Find all dependency output files, they are included files with
9912 # $(DEPDIR) in their names. We invoke sed twice because it is the
9913 # simplest approach to changing $(DEPDIR) to its actual value in the
9914 # expansion.
9915 for file in `sed -n "
9916 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
b0322a85 9917 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
8d138742
CE
9918 # Make sure the directory exists.
9919 test -f "$dirpart/$file" && continue
9920 fdir=`AS_DIRNAME(["$file"])`
9921 AS_MKDIR_P([$dirpart/$fdir])
9922 # echo "creating $dirpart/$file"
9923 echo '# dummy' > "$dirpart/$file"
9924 done
d9898ee8 9925 done
8d138742 9926}
d9898ee8 9927])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9928
9929
9930# AM_OUTPUT_DEPENDENCY_COMMANDS
9931# -----------------------------
9932# This macro should only be invoked once -- use via AC_REQUIRE.
9933#
9934# This code is only required when automatic dependency tracking
b0322a85 9935# is enabled. FIXME. This creates each '.P' file that we will
d9898ee8 9936# need in order to bootstrap the dependency handling code.
9937AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9938[AC_CONFIG_COMMANDS([depfiles],
9939 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9940 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9941])
9942
d9898ee8 9943# Do all the work for Automake. -*- Autoconf -*-
9944
b0322a85 9945# Copyright (C) 1996-2013 Free Software Foundation, Inc.
d9898ee8 9946#
9947# This file is free software; the Free Software Foundation
9948# gives unlimited permission to copy and/or distribute it,
9949# with or without modifications, as long as this notice is preserved.
9950
d9898ee8 9951# This macro actually does too much. Some checks are only needed if
9952# your package does certain things. But this isn't really a big deal.
9953
9954# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9955# AM_INIT_AUTOMAKE([OPTIONS])
9956# -----------------------------------------------
9957# The call with PACKAGE and VERSION arguments is the old style
9958# call (pre autoconf-2.50), which is being phased out. PACKAGE
9959# and VERSION should now be passed to AC_INIT and removed from
9960# the call to AM_INIT_AUTOMAKE.
9961# We support both call styles for the transition. After
9962# the next Automake release, Autoconf can make the AC_INIT
9963# arguments mandatory, and then we can depend on a new Autoconf
9964# release and drop the old call support.
9965AC_DEFUN([AM_INIT_AUTOMAKE],
b0322a85 9966[AC_PREREQ([2.65])dnl
d9898ee8 9967dnl Autoconf wants to disallow AM_ names. We explicitly allow
9968dnl the ones we care about.
9969m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9970AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9971AC_REQUIRE([AC_PROG_INSTALL])dnl
dd184caf 9972if test "`cd $srcdir && pwd`" != "`pwd`"; then
9973 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9974 # is not polluted with repeated "-I."
9975 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9976 # test to see if srcdir already configured
9977 if test -f $srcdir/config.status; then
9978 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9979 fi
d9898ee8 9980fi
9981
9982# test whether we have cygpath
9983if test -z "$CYGPATH_W"; then
9984 if (cygpath --version) >/dev/null 2>/dev/null; then
9985 CYGPATH_W='cygpath -w'
9986 else
9987 CYGPATH_W=echo
9988 fi
9989fi
9990AC_SUBST([CYGPATH_W])
9991
9992# Define the identity of the package.
9993dnl Distinguish between old-style and new-style calls.
9994m4_ifval([$2],
b0322a85
CE
9995[AC_DIAGNOSE([obsolete],
9996 [$0: two- and three-arguments forms are deprecated.])
9997m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
d9898ee8 9998 AC_SUBST([PACKAGE], [$1])dnl
9999 AC_SUBST([VERSION], [$2])],
10000[_AM_SET_OPTIONS([$1])dnl
dd184caf 10001dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
b0322a85
CE
10002m4_if(
10003 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10004 [ok:ok],,
dd184caf 10005 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
d9898ee8 10006 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10007 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10008
10009_AM_IF_OPTION([no-define],,
b0322a85
CE
10010[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10011 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
d9898ee8 10012
10013# Some tools Automake needs.
10014AC_REQUIRE([AM_SANITY_CHECK])dnl
10015AC_REQUIRE([AC_ARG_PROGRAM])dnl
b0322a85
CE
10016AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10017AM_MISSING_PROG([AUTOCONF], [autoconf])
10018AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10019AM_MISSING_PROG([AUTOHEADER], [autoheader])
10020AM_MISSING_PROG([MAKEINFO], [makeinfo])
8d138742
CE
10021AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10022AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
b0322a85
CE
10023AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10024# For better backward compatibility. To be removed once Automake 1.9.x
10025# dies out for good. For more background, see:
10026# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10027# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10028AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
d9898ee8 10029# We need awk for the "check" target. The system "awk" is bad on
10030# some platforms.
10031AC_REQUIRE([AC_PROG_AWK])dnl
10032AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10033AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10034_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8d138742
CE
10035 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10036 [_AM_PROG_TAR([v7])])])
d9898ee8 10037_AM_IF_OPTION([no-dependencies],,
10038[AC_PROVIDE_IFELSE([AC_PROG_CC],
b0322a85
CE
10039 [_AM_DEPENDENCIES([CC])],
10040 [m4_define([AC_PROG_CC],
10041 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
d9898ee8 10042AC_PROVIDE_IFELSE([AC_PROG_CXX],
b0322a85
CE
10043 [_AM_DEPENDENCIES([CXX])],
10044 [m4_define([AC_PROG_CXX],
10045 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
dd184caf 10046AC_PROVIDE_IFELSE([AC_PROG_OBJC],
b0322a85
CE
10047 [_AM_DEPENDENCIES([OBJC])],
10048 [m4_define([AC_PROG_OBJC],
10049 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10050AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10051 [_AM_DEPENDENCIES([OBJCXX])],
10052 [m4_define([AC_PROG_OBJCXX],
10053 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
d9898ee8 10054])
b0322a85
CE
10055AC_REQUIRE([AM_SILENT_RULES])dnl
10056dnl The testsuite driver may need to know about EXEEXT, so add the
10057dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
10058dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
8d138742
CE
10059AC_CONFIG_COMMANDS_PRE(dnl
10060[m4_provide_if([_AM_COMPILER_EXEEXT],
10061 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
d9898ee8 10062])
10063
b0322a85 10064dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
8d138742
CE
10065dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10066dnl mangled by Autoconf and run in a shell conditional statement.
10067m4_define([_AC_COMPILER_EXEEXT],
10068m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10069
d9898ee8 10070
10071# When config.status generates a header, we must update the stamp-h file.
10072# This file resides in the same directory as the config header
10073# that is generated. The stamp files are numbered to have different names.
10074
10075# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10076# loop where config.status creates the headers, so we can generate
10077# our stamp files there.
10078AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10079[# Compute $1's index in $config_headers.
ac40fd9e 10080_am_arg=$1
d9898ee8 10081_am_stamp_count=1
10082for _am_header in $config_headers :; do
10083 case $_am_header in
ac40fd9e 10084 $_am_arg | $_am_arg:* )
d9898ee8 10085 break ;;
10086 * )
10087 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10088 esac
10089done
ac40fd9e 10090echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
d9898ee8 10091
b0322a85 10092# Copyright (C) 2001-2013 Free Software Foundation, Inc.
d9898ee8 10093#
10094# This file is free software; the Free Software Foundation
10095# gives unlimited permission to copy and/or distribute it,
10096# with or without modifications, as long as this notice is preserved.
10097
10098# AM_PROG_INSTALL_SH
10099# ------------------
10100# Define $install_sh.
10101AC_DEFUN([AM_PROG_INSTALL_SH],
10102[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8d138742
CE
10103if test x"${install_sh}" != xset; then
10104 case $am_aux_dir in
10105 *\ * | *\ *)
10106 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10107 *)
10108 install_sh="\${SHELL} $am_aux_dir/install-sh"
10109 esac
10110fi
b0322a85 10111AC_SUBST([install_sh])])
d9898ee8 10112
b0322a85 10113# Copyright (C) 2003-2013 Free Software Foundation, Inc.
d9898ee8 10114#
10115# This file is free software; the Free Software Foundation
10116# gives unlimited permission to copy and/or distribute it,
10117# with or without modifications, as long as this notice is preserved.
10118
d9898ee8 10119# Check whether the underlying file-system supports filenames
10120# with a leading dot. For instance MS-DOS doesn't.
10121AC_DEFUN([AM_SET_LEADING_DOT],
10122[rm -rf .tst 2>/dev/null
10123mkdir .tst 2>/dev/null
10124if test -d .tst; then
10125 am__leading_dot=.
10126else
10127 am__leading_dot=_
10128fi
10129rmdir .tst 2>/dev/null
10130AC_SUBST([am__leading_dot])])
10131
10132# Check to see how 'make' treats includes. -*- Autoconf -*-
10133
b0322a85 10134# Copyright (C) 2001-2013 Free Software Foundation, Inc.
d9898ee8 10135#
10136# This file is free software; the Free Software Foundation
10137# gives unlimited permission to copy and/or distribute it,
10138# with or without modifications, as long as this notice is preserved.
10139
d9898ee8 10140# AM_MAKE_INCLUDE()
10141# -----------------
10142# Check to see how make treats includes.
10143AC_DEFUN([AM_MAKE_INCLUDE],
10144[am_make=${MAKE-make}
10145cat > confinc << 'END'
10146am__doit:
8d138742 10147 @echo this is the am__doit target
d9898ee8 10148.PHONY: am__doit
10149END
10150# If we don't find an include directive, just comment out the code.
10151AC_MSG_CHECKING([for style of include used by $am_make])
10152am__include="#"
10153am__quote=
10154_am_result=none
10155# First try GNU make style include.
10156echo "include confinc" > confmf
b0322a85 10157# Ignore all kinds of additional output from 'make'.
8d138742
CE
10158case `$am_make -s -f confmf 2> /dev/null` in #(
10159*the\ am__doit\ target*)
10160 am__include=include
10161 am__quote=
10162 _am_result=GNU
10163 ;;
10164esac
d9898ee8 10165# Now try BSD make style include.
10166if test "$am__include" = "#"; then
10167 echo '.include "confinc"' > confmf
8d138742
CE
10168 case `$am_make -s -f confmf 2> /dev/null` in #(
10169 *the\ am__doit\ target*)
10170 am__include=.include
10171 am__quote="\""
10172 _am_result=BSD
10173 ;;
10174 esac
d9898ee8 10175fi
10176AC_SUBST([am__include])
10177AC_SUBST([am__quote])
10178AC_MSG_RESULT([$_am_result])
10179rm -f confinc confmf
10180])
10181
10182# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10183
b0322a85 10184# Copyright (C) 1997-2013 Free Software Foundation, Inc.
d9898ee8 10185#
10186# This file is free software; the Free Software Foundation
10187# gives unlimited permission to copy and/or distribute it,
10188# with or without modifications, as long as this notice is preserved.
10189
d9898ee8 10190# AM_MISSING_PROG(NAME, PROGRAM)
10191# ------------------------------
10192AC_DEFUN([AM_MISSING_PROG],
10193[AC_REQUIRE([AM_MISSING_HAS_RUN])
10194$1=${$1-"${am_missing_run}$2"}
10195AC_SUBST($1)])
10196
d9898ee8 10197# AM_MISSING_HAS_RUN
10198# ------------------
b0322a85
CE
10199# Define MISSING if not defined so far and test if it is modern enough.
10200# If it is, set am_missing_run to use it, otherwise, to nothing.
d9898ee8 10201AC_DEFUN([AM_MISSING_HAS_RUN],
10202[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
dd184caf 10203AC_REQUIRE_AUX_FILE([missing])dnl
8d138742
CE
10204if test x"${MISSING+set}" != xset; then
10205 case $am_aux_dir in
10206 *\ * | *\ *)
10207 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10208 *)
10209 MISSING="\${SHELL} $am_aux_dir/missing" ;;
10210 esac
10211fi
d9898ee8 10212# Use eval to expand $SHELL
b0322a85
CE
10213if eval "$MISSING --is-lightweight"; then
10214 am_missing_run="$MISSING "
d9898ee8 10215else
10216 am_missing_run=
b0322a85 10217 AC_MSG_WARN(['missing' script is too old or missing])
d9898ee8 10218fi
10219])
10220
b0322a85
CE
10221# -*- Autoconf -*-
10222# Obsolete and "removed" macros, that must however still report explicit
10223# error messages when used, to smooth transition.
10224#
10225# Copyright (C) 1996-2013 Free Software Foundation, Inc.
d9898ee8 10226#
10227# This file is free software; the Free Software Foundation
10228# gives unlimited permission to copy and/or distribute it,
10229# with or without modifications, as long as this notice is preserved.
10230
b0322a85
CE
10231AC_DEFUN([AM_CONFIG_HEADER],
10232[AC_DIAGNOSE([obsolete],
10233['$0': this macro is obsolete.
10234You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
10235AC_CONFIG_HEADERS($@)])
10236
10237AC_DEFUN([AM_PROG_CC_STDC],
10238[AC_PROG_CC
10239am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
10240AC_DIAGNOSE([obsolete],
10241['$0': this macro is obsolete.
10242You should simply use the 'AC][_PROG_CC' macro instead.
10243Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
10244but upon 'ac_cv_prog_cc_stdc'.])])
10245
10246AC_DEFUN([AM_C_PROTOTYPES],
10247 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
10248AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
d9898ee8 10249
10250# Helper functions for option handling. -*- Autoconf -*-
10251
b0322a85 10252# Copyright (C) 2001-2013 Free Software Foundation, Inc.
d9898ee8 10253#
10254# This file is free software; the Free Software Foundation
10255# gives unlimited permission to copy and/or distribute it,
10256# with or without modifications, as long as this notice is preserved.
10257
d9898ee8 10258# _AM_MANGLE_OPTION(NAME)
10259# -----------------------
10260AC_DEFUN([_AM_MANGLE_OPTION],
10261[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10262
10263# _AM_SET_OPTION(NAME)
b0322a85 10264# --------------------
d9898ee8 10265# Set option NAME. Presently that only means defining a flag for this option.
10266AC_DEFUN([_AM_SET_OPTION],
b0322a85 10267[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
d9898ee8 10268
10269# _AM_SET_OPTIONS(OPTIONS)
b0322a85 10270# ------------------------
d9898ee8 10271# OPTIONS is a space-separated list of Automake options.
10272AC_DEFUN([_AM_SET_OPTIONS],
8d138742 10273[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
d9898ee8 10274
10275# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10276# -------------------------------------------
10277# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10278AC_DEFUN([_AM_IF_OPTION],
10279[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10280
10281# Check to make sure that the build environment is sane. -*- Autoconf -*-
10282
b0322a85 10283# Copyright (C) 1996-2013 Free Software Foundation, Inc.
d9898ee8 10284#
10285# This file is free software; the Free Software Foundation
10286# gives unlimited permission to copy and/or distribute it,
10287# with or without modifications, as long as this notice is preserved.
10288
d9898ee8 10289# AM_SANITY_CHECK
10290# ---------------
10291AC_DEFUN([AM_SANITY_CHECK],
10292[AC_MSG_CHECKING([whether build environment is sane])
8d138742
CE
10293# Reject unsafe characters in $srcdir or the absolute working directory
10294# name. Accept space and tab only in the latter.
10295am_lf='
10296'
10297case `pwd` in
10298 *[[\\\"\#\$\&\'\`$am_lf]]*)
10299 AC_MSG_ERROR([unsafe absolute working directory name]);;
10300esac
10301case $srcdir in
10302 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
b0322a85 10303 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
8d138742
CE
10304esac
10305
b0322a85 10306# Do 'set' in a subshell so we don't clobber the current shell's
d9898ee8 10307# arguments. Must try -L first in case configure is actually a
10308# symlink; some systems play weird games with the mod time of symlinks
10309# (eg FreeBSD returns the mod time of the symlink's containing
10310# directory).
10311if (
b0322a85
CE
10312 am_has_slept=no
10313 for am_try in 1 2; do
10314 echo "timestamp, slept: $am_has_slept" > conftest.file
10315 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10316 if test "$[*]" = "X"; then
10317 # -L didn't work.
10318 set X `ls -t "$srcdir/configure" conftest.file`
10319 fi
10320 if test "$[*]" != "X $srcdir/configure conftest.file" \
10321 && test "$[*]" != "X conftest.file $srcdir/configure"; then
10322
10323 # If neither matched, then we have a broken ls. This can happen
10324 # if, for instance, CONFIG_SHELL is bash and it inherits a
10325 # broken ls alias from the environment. This has actually
10326 # happened. Such a system could not be considered "sane".
10327 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10328 alias in your environment])
10329 fi
10330 if test "$[2]" = conftest.file || test $am_try -eq 2; then
10331 break
10332 fi
10333 # Just in case.
10334 sleep 1
10335 am_has_slept=yes
10336 done
d9898ee8 10337 test "$[2]" = conftest.file
10338 )
10339then
10340 # Ok.
10341 :
10342else
10343 AC_MSG_ERROR([newly created file is older than distributed files!
10344Check your system clock])
10345fi
b0322a85
CE
10346AC_MSG_RESULT([yes])
10347# If we didn't sleep, we still need to ensure time stamps of config.status and
10348# generated files are strictly newer.
10349am_sleep_pid=
10350if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10351 ( sleep 1 ) &
10352 am_sleep_pid=$!
10353fi
10354AC_CONFIG_COMMANDS_PRE(
10355 [AC_MSG_CHECKING([that generated files are newer than configure])
10356 if test -n "$am_sleep_pid"; then
10357 # Hide warnings about reused PIDs.
10358 wait $am_sleep_pid 2>/dev/null
10359 fi
10360 AC_MSG_RESULT([done])])
10361rm -f conftest.file
10362])
10363
10364# Copyright (C) 2009-2013 Free Software Foundation, Inc.
10365#
10366# This file is free software; the Free Software Foundation
10367# gives unlimited permission to copy and/or distribute it,
10368# with or without modifications, as long as this notice is preserved.
10369
10370# AM_SILENT_RULES([DEFAULT])
10371# --------------------------
10372# Enable less verbose build rules; with the default set to DEFAULT
10373# ("yes" being less verbose, "no" or empty being verbose).
10374AC_DEFUN([AM_SILENT_RULES],
10375[AC_ARG_ENABLE([silent-rules], [dnl
10376AS_HELP_STRING(
10377 [--enable-silent-rules],
10378 [less verbose build output (undo: "make V=1")])
10379AS_HELP_STRING(
10380 [--disable-silent-rules],
10381 [verbose build output (undo: "make V=0")])dnl
10382])
10383case $enable_silent_rules in @%:@ (((
10384 yes) AM_DEFAULT_VERBOSITY=0;;
10385 no) AM_DEFAULT_VERBOSITY=1;;
10386 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10387esac
10388dnl
10389dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10390dnl do not support nested variable expansions.
10391dnl See automake bug#9928 and bug#10237.
10392am_make=${MAKE-make}
10393AC_CACHE_CHECK([whether $am_make supports nested variables],
10394 [am_cv_make_support_nested_variables],
10395 [if AS_ECHO([['TRUE=$(BAR$(V))
10396BAR0=false
10397BAR1=true
10398V=1
10399am__doit:
10400 @$(TRUE)
10401.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10402 am_cv_make_support_nested_variables=yes
10403else
10404 am_cv_make_support_nested_variables=no
10405fi])
10406if test $am_cv_make_support_nested_variables = yes; then
10407 dnl Using '$V' instead of '$(V)' breaks IRIX make.
10408 AM_V='$(V)'
10409 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10410else
10411 AM_V=$AM_DEFAULT_VERBOSITY
10412 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10413fi
10414AC_SUBST([AM_V])dnl
10415AM_SUBST_NOTMAKE([AM_V])dnl
10416AC_SUBST([AM_DEFAULT_V])dnl
10417AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10418AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10419AM_BACKSLASH='\'
10420AC_SUBST([AM_BACKSLASH])dnl
10421_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10422])
d9898ee8 10423
b0322a85 10424# Copyright (C) 2001-2013 Free Software Foundation, Inc.
d9898ee8 10425#
10426# This file is free software; the Free Software Foundation
10427# gives unlimited permission to copy and/or distribute it,
10428# with or without modifications, as long as this notice is preserved.
10429
10430# AM_PROG_INSTALL_STRIP
10431# ---------------------
b0322a85 10432# One issue with vendor 'install' (even GNU) is that you can't
d9898ee8 10433# specify the program used to strip binaries. This is especially
10434# annoying in cross-compiling environments, where the build's strip
10435# is unlikely to handle the host's binaries.
10436# Fortunately install-sh will honor a STRIPPROG variable, so we
b0322a85 10437# always use install-sh in "make install-strip", and initialize
d9898ee8 10438# STRIPPROG with the value of the STRIP variable (set by the user).
10439AC_DEFUN([AM_PROG_INSTALL_STRIP],
10440[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
b0322a85
CE
10441# Installed binaries are usually stripped using 'strip' when the user
10442# run "make install-strip". However 'strip' might not be the right
d9898ee8 10443# tool to use in cross-compilation environments, therefore Automake
b0322a85
CE
10444# will honor the 'STRIP' environment variable to overrule this program.
10445dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
d9898ee8 10446if test "$cross_compiling" != no; then
10447 AC_CHECK_TOOL([STRIP], [strip], :)
10448fi
dd184caf 10449INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
d9898ee8 10450AC_SUBST([INSTALL_STRIP_PROGRAM])])
10451
b0322a85 10452# Copyright (C) 2006-2013 Free Software Foundation, Inc.
dd184caf 10453#
10454# This file is free software; the Free Software Foundation
10455# gives unlimited permission to copy and/or distribute it,
10456# with or without modifications, as long as this notice is preserved.
10457
10458# _AM_SUBST_NOTMAKE(VARIABLE)
10459# ---------------------------
ac40fd9e 10460# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
dd184caf 10461# This macro is traced by Automake.
10462AC_DEFUN([_AM_SUBST_NOTMAKE])
10463
8d138742 10464# AM_SUBST_NOTMAKE(VARIABLE)
b0322a85 10465# --------------------------
8d138742
CE
10466# Public sister of _AM_SUBST_NOTMAKE.
10467AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10468
d9898ee8 10469# Check how to create a tarball. -*- Autoconf -*-
10470
b0322a85 10471# Copyright (C) 2004-2013 Free Software Foundation, Inc.
d9898ee8 10472#
10473# This file is free software; the Free Software Foundation
10474# gives unlimited permission to copy and/or distribute it,
10475# with or without modifications, as long as this notice is preserved.
10476
d9898ee8 10477# _AM_PROG_TAR(FORMAT)
10478# --------------------
10479# Check how to create a tarball in format FORMAT.
b0322a85 10480# FORMAT should be one of 'v7', 'ustar', or 'pax'.
d9898ee8 10481#
10482# Substitute a variable $(am__tar) that is a command
10483# writing to stdout a FORMAT-tarball containing the directory
10484# $tardir.
10485# tardir=directory && $(am__tar) > result.tar
10486#
10487# Substitute a variable $(am__untar) that extract such
10488# a tarball read from stdin.
10489# $(am__untar) < result.tar
b0322a85 10490#
d9898ee8 10491AC_DEFUN([_AM_PROG_TAR],
b0322a85
CE
10492[# Always define AMTAR for backward compatibility. Yes, it's still used
10493# in the wild :-( We should find a proper way to deprecate it ...
10494AC_SUBST([AMTAR], ['$${TAR-tar}'])
10495
10496# We'll loop over all known methods to create a tar archive until one works.
d9898ee8 10497_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
d9898ee8 10498
b0322a85
CE
10499m4_if([$1], [v7],
10500 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10501
10502 [m4_case([$1],
10503 [ustar],
10504 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10505 # There is notably a 21 bits limit for the UID and the GID. In fact,
10506 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10507 # and bug#13588).
10508 am_max_uid=2097151 # 2^21 - 1
10509 am_max_gid=$am_max_uid
10510 # The $UID and $GID variables are not portable, so we need to resort
10511 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
10512 # below are definitely unexpected, so allow the users to see them
10513 # (that is, avoid stderr redirection).
10514 am_uid=`id -u || echo unknown`
10515 am_gid=`id -g || echo unknown`
10516 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10517 if test $am_uid -le $am_max_uid; then
10518 AC_MSG_RESULT([yes])
10519 else
10520 AC_MSG_RESULT([no])
10521 _am_tools=none
10522 fi
10523 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10524 if test $am_gid -le $am_max_gid; then
10525 AC_MSG_RESULT([yes])
10526 else
10527 AC_MSG_RESULT([no])
10528 _am_tools=none
10529 fi],
d9898ee8 10530
b0322a85
CE
10531 [pax],
10532 [],
10533
10534 [m4_fatal([Unknown tar format])])
10535
10536 AC_MSG_CHECKING([how to create a $1 tar archive])
10537
10538 # Go ahead even if we have the value already cached. We do so because we
10539 # need to set the values for the 'am__tar' and 'am__untar' variables.
10540 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10541
10542 for _am_tool in $_am_tools; do
10543 case $_am_tool in
10544 gnutar)
10545 for _am_tar in tar gnutar gtar; do
10546 AM_RUN_LOG([$_am_tar --version]) && break
10547 done
10548 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10549 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10550 am__untar="$_am_tar -xf -"
10551 ;;
10552 plaintar)
10553 # Must skip GNU tar: if it does not support --format= it doesn't create
10554 # ustar tarball either.
10555 (tar --version) >/dev/null 2>&1 && continue
10556 am__tar='tar chf - "$$tardir"'
10557 am__tar_='tar chf - "$tardir"'
10558 am__untar='tar xf -'
10559 ;;
10560 pax)
10561 am__tar='pax -L -x $1 -w "$$tardir"'
10562 am__tar_='pax -L -x $1 -w "$tardir"'
10563 am__untar='pax -r'
10564 ;;
10565 cpio)
10566 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10567 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10568 am__untar='cpio -i -H $1 -d'
10569 ;;
10570 none)
10571 am__tar=false
10572 am__tar_=false
10573 am__untar=false
10574 ;;
10575 esac
10576
10577 # If the value was cached, stop now. We just wanted to have am__tar
10578 # and am__untar set.
10579 test -n "${am_cv_prog_tar_$1}" && break
10580
10581 # tar/untar a dummy directory, and stop if the command works.
10582 rm -rf conftest.dir
10583 mkdir conftest.dir
10584 echo GrepMe > conftest.dir/file
10585 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10586 rm -rf conftest.dir
10587 if test -s conftest.tar; then
10588 AM_RUN_LOG([$am__untar <conftest.tar])
10589 AM_RUN_LOG([cat conftest.dir/file])
10590 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10591 fi
10592 done
d9898ee8 10593 rm -rf conftest.dir
d9898ee8 10594
b0322a85
CE
10595 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10596 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10597
d9898ee8 10598AC_SUBST([am__tar])
10599AC_SUBST([am__untar])
10600]) # _AM_PROG_TAR
10601