1285206Sdes# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2238106Sdes
3285206Sdes# Copyright (C) 1996-2013 Free Software Foundation, Inc.
4249141Sdes
5238106Sdes# This file is free software; the Free Software Foundation
6238106Sdes# gives unlimited permission to copy and/or distribute it,
7238106Sdes# with or without modifications, as long as this notice is preserved.
8238106Sdes
9238106Sdes# This program is distributed in the hope that it will be useful,
10238106Sdes# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11238106Sdes# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12238106Sdes# PARTICULAR PURPOSE.
13238106Sdes
14285206Sdesm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15238106Sdes# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
16238106Sdes#
17238106Sdes#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
18249141Sdes#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
19249141Sdes#                 Foundation, Inc.
20238106Sdes#   Written by Gordon Matzigkeit, 1996
21238106Sdes#
22238106Sdes# This file is free software; the Free Software Foundation gives
23238106Sdes# unlimited permission to copy and/or distribute it, with or without
24238106Sdes# modifications, as long as this notice is preserved.
25238106Sdes
26238106Sdesm4_define([_LT_COPYING], [dnl
27238106Sdes#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
28249141Sdes#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
29249141Sdes#                 Foundation, Inc.
30238106Sdes#   Written by Gordon Matzigkeit, 1996
31238106Sdes#
32238106Sdes#   This file is part of GNU Libtool.
33238106Sdes#
34238106Sdes# GNU Libtool is free software; you can redistribute it and/or
35238106Sdes# modify it under the terms of the GNU General Public License as
36238106Sdes# published by the Free Software Foundation; either version 2 of
37238106Sdes# the License, or (at your option) any later version.
38238106Sdes#
39238106Sdes# As a special exception to the GNU General Public License,
40238106Sdes# if you distribute this file as part of a program or library that
41238106Sdes# is built using GNU Libtool, you may include this file under the
42238106Sdes# same distribution terms that you use for the rest of that program.
43238106Sdes#
44238106Sdes# GNU Libtool is distributed in the hope that it will be useful,
45238106Sdes# but WITHOUT ANY WARRANTY; without even the implied warranty of
46238106Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47238106Sdes# GNU General Public License for more details.
48238106Sdes#
49238106Sdes# You should have received a copy of the GNU General Public License
50238106Sdes# along with GNU Libtool; see the file COPYING.  If not, a copy
51238106Sdes# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
52238106Sdes# obtained by writing to the Free Software Foundation, Inc.,
53238106Sdes# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
54238106Sdes])
55238106Sdes
56238106Sdes# serial 57 LT_INIT
57238106Sdes
58238106Sdes
59238106Sdes# LT_PREREQ(VERSION)
60238106Sdes# ------------------
61238106Sdes# Complain and exit if this libtool version is less that VERSION.
62238106Sdesm4_defun([LT_PREREQ],
63238106Sdes[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
64238106Sdes       [m4_default([$3],
65238106Sdes		   [m4_fatal([Libtool version $1 or higher is required],
66238106Sdes		             63)])],
67238106Sdes       [$2])])
68238106Sdes
69238106Sdes
70238106Sdes# _LT_CHECK_BUILDDIR
71238106Sdes# ------------------
72238106Sdes# Complain if the absolute build directory name contains unusual characters
73238106Sdesm4_defun([_LT_CHECK_BUILDDIR],
74238106Sdes[case `pwd` in
75238106Sdes  *\ * | *\	*)
76238106Sdes    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
77238106Sdesesac
78238106Sdes])
79238106Sdes
80238106Sdes
81238106Sdes# LT_INIT([OPTIONS])
82238106Sdes# ------------------
83238106SdesAC_DEFUN([LT_INIT],
84238106Sdes[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
85238106SdesAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
86238106SdesAC_BEFORE([$0], [LT_LANG])dnl
87238106SdesAC_BEFORE([$0], [LT_OUTPUT])dnl
88238106SdesAC_BEFORE([$0], [LTDL_INIT])dnl
89238106Sdesm4_require([_LT_CHECK_BUILDDIR])dnl
90238106Sdes
91238106Sdesdnl Autoconf doesn't catch unexpanded LT_ macros by default:
92238106Sdesm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
93238106Sdesm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
94238106Sdesdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
95238106Sdesdnl unless we require an AC_DEFUNed macro:
96238106SdesAC_REQUIRE([LTOPTIONS_VERSION])dnl
97238106SdesAC_REQUIRE([LTSUGAR_VERSION])dnl
98238106SdesAC_REQUIRE([LTVERSION_VERSION])dnl
99238106SdesAC_REQUIRE([LTOBSOLETE_VERSION])dnl
100238106Sdesm4_require([_LT_PROG_LTMAIN])dnl
101238106Sdes
102238106Sdes_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
103238106Sdes
104238106Sdesdnl Parse OPTIONS
105238106Sdes_LT_SET_OPTIONS([$0], [$1])
106238106Sdes
107238106Sdes# This can be used to rebuild libtool when needed
108238106SdesLIBTOOL_DEPS="$ltmain"
109238106Sdes
110238106Sdes# Always use our own libtool.
111238106SdesLIBTOOL='$(SHELL) $(top_builddir)/libtool'
112238106SdesAC_SUBST(LIBTOOL)dnl
113238106Sdes
114238106Sdes_LT_SETUP
115238106Sdes
116238106Sdes# Only expand once:
117238106Sdesm4_define([LT_INIT])
118238106Sdes])# LT_INIT
119238106Sdes
120238106Sdes# Old names:
121238106SdesAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
122238106SdesAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
123238106Sdesdnl aclocal-1.4 backwards compatibility:
124238106Sdesdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
125238106Sdesdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
126238106Sdes
127238106Sdes
128238106Sdes# _LT_CC_BASENAME(CC)
129238106Sdes# -------------------
130238106Sdes# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
131238106Sdesm4_defun([_LT_CC_BASENAME],
132238106Sdes[for cc_temp in $1""; do
133238106Sdes  case $cc_temp in
134238106Sdes    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
135238106Sdes    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
136238106Sdes    \-*) ;;
137238106Sdes    *) break;;
138238106Sdes  esac
139238106Sdesdone
140238106Sdescc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
141238106Sdes])
142238106Sdes
143238106Sdes
144238106Sdes# _LT_FILEUTILS_DEFAULTS
145238106Sdes# ----------------------
146238106Sdes# It is okay to use these file commands and assume they have been set
147238106Sdes# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
148238106Sdesm4_defun([_LT_FILEUTILS_DEFAULTS],
149238106Sdes[: ${CP="cp -f"}
150238106Sdes: ${MV="mv -f"}
151238106Sdes: ${RM="rm -f"}
152238106Sdes])# _LT_FILEUTILS_DEFAULTS
153238106Sdes
154238106Sdes
155238106Sdes# _LT_SETUP
156238106Sdes# ---------
157238106Sdesm4_defun([_LT_SETUP],
158238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
159238106SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl
160238106SdesAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
161238106SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
162238106Sdes
163249141Sdes_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
164249141Sdesdnl
165238106Sdes_LT_DECL([], [host_alias], [0], [The host system])dnl
166238106Sdes_LT_DECL([], [host], [0])dnl
167238106Sdes_LT_DECL([], [host_os], [0])dnl
168238106Sdesdnl
169238106Sdes_LT_DECL([], [build_alias], [0], [The build system])dnl
170238106Sdes_LT_DECL([], [build], [0])dnl
171238106Sdes_LT_DECL([], [build_os], [0])dnl
172238106Sdesdnl
173238106SdesAC_REQUIRE([AC_PROG_CC])dnl
174238106SdesAC_REQUIRE([LT_PATH_LD])dnl
175238106SdesAC_REQUIRE([LT_PATH_NM])dnl
176238106Sdesdnl
177238106SdesAC_REQUIRE([AC_PROG_LN_S])dnl
178238106Sdestest -z "$LN_S" && LN_S="ln -s"
179238106Sdes_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
180238106Sdesdnl
181238106SdesAC_REQUIRE([LT_CMD_MAX_LEN])dnl
182238106Sdes_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
183238106Sdes_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
184238106Sdesdnl
185238106Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl
186238106Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl
187238106Sdesm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
188238106Sdesm4_require([_LT_CMD_RELOAD])dnl
189238106Sdesm4_require([_LT_CHECK_MAGIC_METHOD])dnl
190238106Sdesm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
191238106Sdesm4_require([_LT_CMD_OLD_ARCHIVE])dnl
192238106Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
193238106Sdesm4_require([_LT_WITH_SYSROOT])dnl
194238106Sdes
195238106Sdes_LT_CONFIG_LIBTOOL_INIT([
196238106Sdes# See if we are running on zsh, and set the options which allow our
197238106Sdes# commands through without removal of \ escapes INIT.
198238106Sdesif test -n "\${ZSH_VERSION+set}" ; then
199238106Sdes   setopt NO_GLOB_SUBST
200238106Sdesfi
201238106Sdes])
202238106Sdesif test -n "${ZSH_VERSION+set}" ; then
203238106Sdes   setopt NO_GLOB_SUBST
204238106Sdesfi
205238106Sdes
206238106Sdes_LT_CHECK_OBJDIR
207238106Sdes
208238106Sdesm4_require([_LT_TAG_COMPILER])dnl
209238106Sdes
210238106Sdescase $host_os in
211238106Sdesaix3*)
212238106Sdes  # AIX sometimes has problems with the GCC collect2 program.  For some
213238106Sdes  # reason, if we set the COLLECT_NAMES environment variable, the problems
214238106Sdes  # vanish in a puff of smoke.
215238106Sdes  if test "X${COLLECT_NAMES+set}" != Xset; then
216238106Sdes    COLLECT_NAMES=
217238106Sdes    export COLLECT_NAMES
218238106Sdes  fi
219238106Sdes  ;;
220238106Sdesesac
221238106Sdes
222238106Sdes# Global variables:
223238106Sdesofile=libtool
224238106Sdescan_build_shared=yes
225238106Sdes
226238106Sdes# All known linkers require a `.a' archive for static linking (except MSVC,
227238106Sdes# which needs '.lib').
228238106Sdeslibext=a
229238106Sdes
230238106Sdeswith_gnu_ld="$lt_cv_prog_gnu_ld"
231238106Sdes
232238106Sdesold_CC="$CC"
233238106Sdesold_CFLAGS="$CFLAGS"
234238106Sdes
235238106Sdes# Set sane defaults for various variables
236238106Sdestest -z "$CC" && CC=cc
237238106Sdestest -z "$LTCC" && LTCC=$CC
238238106Sdestest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
239238106Sdestest -z "$LD" && LD=ld
240238106Sdestest -z "$ac_objext" && ac_objext=o
241238106Sdes
242238106Sdes_LT_CC_BASENAME([$compiler])
243238106Sdes
244238106Sdes# Only perform the check for file, if the check method requires it
245238106Sdestest -z "$MAGIC_CMD" && MAGIC_CMD=file
246238106Sdescase $deplibs_check_method in
247238106Sdesfile_magic*)
248238106Sdes  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
249238106Sdes    _LT_PATH_MAGIC
250238106Sdes  fi
251238106Sdes  ;;
252238106Sdesesac
253238106Sdes
254238106Sdes# Use C for the default configuration in the libtool script
255238106SdesLT_SUPPORTED_TAG([CC])
256238106Sdes_LT_LANG_C_CONFIG
257238106Sdes_LT_LANG_DEFAULT_CONFIG
258238106Sdes_LT_CONFIG_COMMANDS
259238106Sdes])# _LT_SETUP
260238106Sdes
261238106Sdes
262238106Sdes# _LT_PREPARE_SED_QUOTE_VARS
263238106Sdes# --------------------------
264238106Sdes# Define a few sed substitution that help us do robust quoting.
265238106Sdesm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
266238106Sdes[# Backslashify metacharacters that are still active within
267238106Sdes# double-quoted strings.
268238106Sdessed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
269238106Sdes
270238106Sdes# Same as above, but do not quote variable references.
271238106Sdesdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
272238106Sdes
273238106Sdes# Sed substitution to delay expansion of an escaped shell variable in a
274238106Sdes# double_quote_subst'ed string.
275238106Sdesdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
276238106Sdes
277238106Sdes# Sed substitution to delay expansion of an escaped single quote.
278238106Sdesdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
279238106Sdes
280238106Sdes# Sed substitution to avoid accidental globbing in evaled expressions
281238106Sdesno_glob_subst='s/\*/\\\*/g'
282238106Sdes])
283238106Sdes
284238106Sdes# _LT_PROG_LTMAIN
285238106Sdes# ---------------
286238106Sdes# Note that this code is called both from `configure', and `config.status'
287238106Sdes# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
288238106Sdes# `config.status' has no value for ac_aux_dir unless we are using Automake,
289238106Sdes# so we pass a copy along to make sure it has a sensible value anyway.
290238106Sdesm4_defun([_LT_PROG_LTMAIN],
291238106Sdes[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
292238106Sdes_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
293238106Sdesltmain="$ac_aux_dir/ltmain.sh"
294238106Sdes])# _LT_PROG_LTMAIN
295238106Sdes
296238106Sdes
297238106Sdes
298238106Sdes# So that we can recreate a full libtool script including additional
299238106Sdes# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
300238106Sdes# in macros and then make a single call at the end using the `libtool'
301238106Sdes# label.
302238106Sdes
303238106Sdes
304238106Sdes# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
305238106Sdes# ----------------------------------------
306238106Sdes# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
307238106Sdesm4_define([_LT_CONFIG_LIBTOOL_INIT],
308238106Sdes[m4_ifval([$1],
309238106Sdes          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
310238106Sdes                     [$1
311238106Sdes])])])
312238106Sdes
313238106Sdes# Initialize.
314238106Sdesm4_define([_LT_OUTPUT_LIBTOOL_INIT])
315238106Sdes
316238106Sdes
317238106Sdes# _LT_CONFIG_LIBTOOL([COMMANDS])
318238106Sdes# ------------------------------
319238106Sdes# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
320238106Sdesm4_define([_LT_CONFIG_LIBTOOL],
321238106Sdes[m4_ifval([$1],
322238106Sdes          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
323238106Sdes                     [$1
324238106Sdes])])])
325238106Sdes
326238106Sdes# Initialize.
327238106Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
328238106Sdes
329238106Sdes
330238106Sdes# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
331238106Sdes# -----------------------------------------------------
332238106Sdesm4_defun([_LT_CONFIG_SAVE_COMMANDS],
333238106Sdes[_LT_CONFIG_LIBTOOL([$1])
334238106Sdes_LT_CONFIG_LIBTOOL_INIT([$2])
335238106Sdes])
336238106Sdes
337238106Sdes
338238106Sdes# _LT_FORMAT_COMMENT([COMMENT])
339238106Sdes# -----------------------------
340238106Sdes# Add leading comment marks to the start of each line, and a trailing
341238106Sdes# full-stop to the whole comment if one is not present already.
342238106Sdesm4_define([_LT_FORMAT_COMMENT],
343238106Sdes[m4_ifval([$1], [
344238106Sdesm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
345238106Sdes              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
346238106Sdes)])
347238106Sdes
348238106Sdes
349238106Sdes
350238106Sdes
351238106Sdes
352238106Sdes# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
353238106Sdes# -------------------------------------------------------------------
354238106Sdes# CONFIGNAME is the name given to the value in the libtool script.
355238106Sdes# VARNAME is the (base) name used in the configure script.
356238106Sdes# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
357238106Sdes# VARNAME.  Any other value will be used directly.
358238106Sdesm4_define([_LT_DECL],
359238106Sdes[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
360238106Sdes    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
361238106Sdes	[m4_ifval([$1], [$1], [$2])])
362238106Sdes    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
363238106Sdes    m4_ifval([$4],
364238106Sdes	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
365238106Sdes    lt_dict_add_subkey([lt_decl_dict], [$2],
366238106Sdes	[tagged?], [m4_ifval([$5], [yes], [no])])])
367238106Sdes])
368238106Sdes
369238106Sdes
370238106Sdes# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
371238106Sdes# --------------------------------------------------------
372238106Sdesm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
373238106Sdes
374238106Sdes
375238106Sdes# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
376238106Sdes# ------------------------------------------------
377238106Sdesm4_define([lt_decl_tag_varnames],
378238106Sdes[_lt_decl_filter([tagged?], [yes], $@)])
379238106Sdes
380238106Sdes
381238106Sdes# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
382238106Sdes# ---------------------------------------------------------
383238106Sdesm4_define([_lt_decl_filter],
384238106Sdes[m4_case([$#],
385238106Sdes  [0], [m4_fatal([$0: too few arguments: $#])],
386238106Sdes  [1], [m4_fatal([$0: too few arguments: $#: $1])],
387238106Sdes  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
388238106Sdes  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
389238106Sdes  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
390238106Sdes])
391238106Sdes
392238106Sdes
393238106Sdes# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
394238106Sdes# --------------------------------------------------
395238106Sdesm4_define([lt_decl_quote_varnames],
396238106Sdes[_lt_decl_filter([value], [1], $@)])
397238106Sdes
398238106Sdes
399238106Sdes# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
400238106Sdes# ---------------------------------------------------
401238106Sdesm4_define([lt_decl_dquote_varnames],
402238106Sdes[_lt_decl_filter([value], [2], $@)])
403238106Sdes
404238106Sdes
405238106Sdes# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
406238106Sdes# ---------------------------------------------------
407238106Sdesm4_define([lt_decl_varnames_tagged],
408238106Sdes[m4_assert([$# <= 2])dnl
409238106Sdes_$0(m4_quote(m4_default([$1], [[, ]])),
410238106Sdes    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
411238106Sdes    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
412238106Sdesm4_define([_lt_decl_varnames_tagged],
413238106Sdes[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
414238106Sdes
415238106Sdes
416238106Sdes# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
417238106Sdes# ------------------------------------------------
418238106Sdesm4_define([lt_decl_all_varnames],
419238106Sdes[_$0(m4_quote(m4_default([$1], [[, ]])),
420238106Sdes     m4_if([$2], [],
421238106Sdes	   m4_quote(lt_decl_varnames),
422238106Sdes	m4_quote(m4_shift($@))))[]dnl
423238106Sdes])
424238106Sdesm4_define([_lt_decl_all_varnames],
425238106Sdes[lt_join($@, lt_decl_varnames_tagged([$1],
426238106Sdes			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
427238106Sdes])
428238106Sdes
429238106Sdes
430238106Sdes# _LT_CONFIG_STATUS_DECLARE([VARNAME])
431238106Sdes# ------------------------------------
432238106Sdes# Quote a variable value, and forward it to `config.status' so that its
433238106Sdes# declaration there will have the same value as in `configure'.  VARNAME
434238106Sdes# must have a single quote delimited value for this to work.
435238106Sdesm4_define([_LT_CONFIG_STATUS_DECLARE],
436238106Sdes[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
437238106Sdes
438238106Sdes
439238106Sdes# _LT_CONFIG_STATUS_DECLARATIONS
440238106Sdes# ------------------------------
441238106Sdes# We delimit libtool config variables with single quotes, so when
442238106Sdes# we write them to config.status, we have to be sure to quote all
443238106Sdes# embedded single quotes properly.  In configure, this macro expands
444238106Sdes# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
445238106Sdes#
446238106Sdes#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
447238106Sdesm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
448238106Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
449238106Sdes    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
450238106Sdes
451238106Sdes
452238106Sdes# _LT_LIBTOOL_TAGS
453238106Sdes# ----------------
454238106Sdes# Output comment and list of tags supported by the script
455238106Sdesm4_defun([_LT_LIBTOOL_TAGS],
456238106Sdes[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
457238106Sdesavailable_tags="_LT_TAGS"dnl
458238106Sdes])
459238106Sdes
460238106Sdes
461238106Sdes# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
462238106Sdes# -----------------------------------
463238106Sdes# Extract the dictionary values for VARNAME (optionally with TAG) and
464238106Sdes# expand to a commented shell variable setting:
465238106Sdes#
466238106Sdes#    # Some comment about what VAR is for.
467238106Sdes#    visible_name=$lt_internal_name
468238106Sdesm4_define([_LT_LIBTOOL_DECLARE],
469238106Sdes[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
470238106Sdes					   [description])))[]dnl
471238106Sdesm4_pushdef([_libtool_name],
472238106Sdes    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
473238106Sdesm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
474238106Sdes    [0], [_libtool_name=[$]$1],
475238106Sdes    [1], [_libtool_name=$lt_[]$1],
476238106Sdes    [2], [_libtool_name=$lt_[]$1],
477238106Sdes    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
478238106Sdesm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
479238106Sdes])
480238106Sdes
481238106Sdes
482238106Sdes# _LT_LIBTOOL_CONFIG_VARS
483238106Sdes# -----------------------
484238106Sdes# Produce commented declarations of non-tagged libtool config variables
485238106Sdes# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
486238106Sdes# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
487238106Sdes# section) are produced by _LT_LIBTOOL_TAG_VARS.
488238106Sdesm4_defun([_LT_LIBTOOL_CONFIG_VARS],
489238106Sdes[m4_foreach([_lt_var],
490238106Sdes    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
491238106Sdes    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
492238106Sdes
493238106Sdes
494238106Sdes# _LT_LIBTOOL_TAG_VARS(TAG)
495238106Sdes# -------------------------
496238106Sdesm4_define([_LT_LIBTOOL_TAG_VARS],
497238106Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
498238106Sdes    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
499238106Sdes
500238106Sdes
501238106Sdes# _LT_TAGVAR(VARNAME, [TAGNAME])
502238106Sdes# ------------------------------
503238106Sdesm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
504238106Sdes
505238106Sdes
506238106Sdes# _LT_CONFIG_COMMANDS
507238106Sdes# -------------------
508238106Sdes# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
509238106Sdes# variables for single and double quote escaping we saved from calls
510238106Sdes# to _LT_DECL, we can put quote escaped variables declarations
511238106Sdes# into `config.status', and then the shell code to quote escape them in
512238106Sdes# for loops in `config.status'.  Finally, any additional code accumulated
513238106Sdes# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
514238106Sdesm4_defun([_LT_CONFIG_COMMANDS],
515238106Sdes[AC_PROVIDE_IFELSE([LT_OUTPUT],
516238106Sdes	dnl If the libtool generation code has been placed in $CONFIG_LT,
517238106Sdes	dnl instead of duplicating it all over again into config.status,
518238106Sdes	dnl then we will have config.status run $CONFIG_LT later, so it
519238106Sdes	dnl needs to know what name is stored there:
520238106Sdes        [AC_CONFIG_COMMANDS([libtool],
521238106Sdes            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
522238106Sdes    dnl If the libtool generation code is destined for config.status,
523238106Sdes    dnl expand the accumulated commands and init code now:
524238106Sdes    [AC_CONFIG_COMMANDS([libtool],
525238106Sdes        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
526238106Sdes])#_LT_CONFIG_COMMANDS
527238106Sdes
528238106Sdes
529238106Sdes# Initialize.
530238106Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
531238106Sdes[
532238106Sdes
533238106Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout
534238106Sdes# if CDPATH is set.
535238106Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
536238106Sdes
537238106Sdessed_quote_subst='$sed_quote_subst'
538238106Sdesdouble_quote_subst='$double_quote_subst'
539238106Sdesdelay_variable_subst='$delay_variable_subst'
540238106Sdes_LT_CONFIG_STATUS_DECLARATIONS
541238106SdesLTCC='$LTCC'
542238106SdesLTCFLAGS='$LTCFLAGS'
543238106Sdescompiler='$compiler_DEFAULT'
544238106Sdes
545238106Sdes# A function that is used when there is no print builtin or printf.
546238106Sdesfunc_fallback_echo ()
547238106Sdes{
548238106Sdes  eval 'cat <<_LTECHO_EOF
549238106Sdes\$[]1
550238106Sdes_LTECHO_EOF'
551238106Sdes}
552238106Sdes
553238106Sdes# Quote evaled strings.
554238106Sdesfor var in lt_decl_all_varnames([[ \
555238106Sdes]], lt_decl_quote_varnames); do
556238106Sdes    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
557238106Sdes    *[[\\\\\\\`\\"\\\$]]*)
558238106Sdes      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
559238106Sdes      ;;
560238106Sdes    *)
561238106Sdes      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
562238106Sdes      ;;
563238106Sdes    esac
564238106Sdesdone
565238106Sdes
566238106Sdes# Double-quote double-evaled strings.
567238106Sdesfor var in lt_decl_all_varnames([[ \
568238106Sdes]], lt_decl_dquote_varnames); do
569238106Sdes    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
570238106Sdes    *[[\\\\\\\`\\"\\\$]]*)
571238106Sdes      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
572238106Sdes      ;;
573238106Sdes    *)
574238106Sdes      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
575238106Sdes      ;;
576238106Sdes    esac
577238106Sdesdone
578238106Sdes
579238106Sdes_LT_OUTPUT_LIBTOOL_INIT
580238106Sdes])
581238106Sdes
582238106Sdes# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
583238106Sdes# ------------------------------------
584238106Sdes# Generate a child script FILE with all initialization necessary to
585238106Sdes# reuse the environment learned by the parent script, and make the
586238106Sdes# file executable.  If COMMENT is supplied, it is inserted after the
587238106Sdes# `#!' sequence but before initialization text begins.  After this
588238106Sdes# macro, additional text can be appended to FILE to form the body of
589238106Sdes# the child script.  The macro ends with non-zero status if the
590238106Sdes# file could not be fully written (such as if the disk is full).
591238106Sdesm4_ifdef([AS_INIT_GENERATED],
592238106Sdes[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
593238106Sdes[m4_defun([_LT_GENERATED_FILE_INIT],
594238106Sdes[m4_require([AS_PREPARE])]dnl
595238106Sdes[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
596238106Sdes[lt_write_fail=0
597238106Sdescat >$1 <<_ASEOF || lt_write_fail=1
598238106Sdes#! $SHELL
599238106Sdes# Generated by $as_me.
600238106Sdes$2
601238106SdesSHELL=\${CONFIG_SHELL-$SHELL}
602238106Sdesexport SHELL
603238106Sdes_ASEOF
604238106Sdescat >>$1 <<\_ASEOF || lt_write_fail=1
605238106SdesAS_SHELL_SANITIZE
606238106Sdes_AS_PREPARE
607238106Sdesexec AS_MESSAGE_FD>&1
608238106Sdes_ASEOF
609238106Sdestest $lt_write_fail = 0 && chmod +x $1[]dnl
610238106Sdesm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
611238106Sdes
612238106Sdes# LT_OUTPUT
613238106Sdes# ---------
614238106Sdes# This macro allows early generation of the libtool script (before
615238106Sdes# AC_OUTPUT is called), incase it is used in configure for compilation
616238106Sdes# tests.
617238106SdesAC_DEFUN([LT_OUTPUT],
618238106Sdes[: ${CONFIG_LT=./config.lt}
619238106SdesAC_MSG_NOTICE([creating $CONFIG_LT])
620238106Sdes_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
621238106Sdes[# Run this file to recreate a libtool stub with the current configuration.])
622238106Sdes
623238106Sdescat >>"$CONFIG_LT" <<\_LTEOF
624238106Sdeslt_cl_silent=false
625238106Sdesexec AS_MESSAGE_LOG_FD>>config.log
626238106Sdes{
627238106Sdes  echo
628238106Sdes  AS_BOX([Running $as_me.])
629238106Sdes} >&AS_MESSAGE_LOG_FD
630238106Sdes
631238106Sdeslt_cl_help="\
632238106Sdes\`$as_me' creates a local libtool stub from the current configuration,
633238106Sdesfor use in further configure time tests before the real libtool is
634238106Sdesgenerated.
635238106Sdes
636238106SdesUsage: $[0] [[OPTIONS]]
637238106Sdes
638238106Sdes  -h, --help      print this help, then exit
639238106Sdes  -V, --version   print version number, then exit
640238106Sdes  -q, --quiet     do not print progress messages
641238106Sdes  -d, --debug     don't remove temporary files
642238106Sdes
643238106SdesReport bugs to <bug-libtool@gnu.org>."
644238106Sdes
645238106Sdeslt_cl_version="\
646238106Sdesm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
647238106Sdesm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
648238106Sdesconfigured by $[0], generated by m4_PACKAGE_STRING.
649238106Sdes
650249141SdesCopyright (C) 2011 Free Software Foundation, Inc.
651238106SdesThis config.lt script is free software; the Free Software Foundation
652238106Sdesgives unlimited permision to copy, distribute and modify it."
653238106Sdes
654238106Sdeswhile test $[#] != 0
655238106Sdesdo
656238106Sdes  case $[1] in
657238106Sdes    --version | --v* | -V )
658238106Sdes      echo "$lt_cl_version"; exit 0 ;;
659238106Sdes    --help | --h* | -h )
660238106Sdes      echo "$lt_cl_help"; exit 0 ;;
661238106Sdes    --debug | --d* | -d )
662238106Sdes      debug=: ;;
663238106Sdes    --quiet | --q* | --silent | --s* | -q )
664238106Sdes      lt_cl_silent=: ;;
665238106Sdes
666238106Sdes    -*) AC_MSG_ERROR([unrecognized option: $[1]
667238106SdesTry \`$[0] --help' for more information.]) ;;
668238106Sdes
669238106Sdes    *) AC_MSG_ERROR([unrecognized argument: $[1]
670238106SdesTry \`$[0] --help' for more information.]) ;;
671238106Sdes  esac
672238106Sdes  shift
673238106Sdesdone
674238106Sdes
675238106Sdesif $lt_cl_silent; then
676238106Sdes  exec AS_MESSAGE_FD>/dev/null
677238106Sdesfi
678238106Sdes_LTEOF
679238106Sdes
680238106Sdescat >>"$CONFIG_LT" <<_LTEOF
681238106Sdes_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
682238106Sdes_LTEOF
683238106Sdes
684238106Sdescat >>"$CONFIG_LT" <<\_LTEOF
685238106SdesAC_MSG_NOTICE([creating $ofile])
686238106Sdes_LT_OUTPUT_LIBTOOL_COMMANDS
687238106SdesAS_EXIT(0)
688238106Sdes_LTEOF
689238106Sdeschmod +x "$CONFIG_LT"
690238106Sdes
691238106Sdes# configure is writing to config.log, but config.lt does its own redirection,
692238106Sdes# appending to config.log, which fails on DOS, as config.log is still kept
693238106Sdes# open by configure.  Here we exec the FD to /dev/null, effectively closing
694238106Sdes# config.log, so it can be properly (re)opened and appended to by config.lt.
695238106Sdeslt_cl_success=:
696238106Sdestest "$silent" = yes &&
697238106Sdes  lt_config_lt_args="$lt_config_lt_args --quiet"
698238106Sdesexec AS_MESSAGE_LOG_FD>/dev/null
699238106Sdes$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
700238106Sdesexec AS_MESSAGE_LOG_FD>>config.log
701238106Sdes$lt_cl_success || AS_EXIT(1)
702238106Sdes])# LT_OUTPUT
703238106Sdes
704238106Sdes
705238106Sdes# _LT_CONFIG(TAG)
706238106Sdes# ---------------
707238106Sdes# If TAG is the built-in tag, create an initial libtool script with a
708238106Sdes# default configuration from the untagged config vars.  Otherwise add code
709238106Sdes# to config.status for appending the configuration named by TAG from the
710238106Sdes# matching tagged config vars.
711238106Sdesm4_defun([_LT_CONFIG],
712238106Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
713238106Sdes_LT_CONFIG_SAVE_COMMANDS([
714238106Sdes  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
715238106Sdes  m4_if(_LT_TAG, [C], [
716238106Sdes    # See if we are running on zsh, and set the options which allow our
717238106Sdes    # commands through without removal of \ escapes.
718238106Sdes    if test -n "${ZSH_VERSION+set}" ; then
719238106Sdes      setopt NO_GLOB_SUBST
720238106Sdes    fi
721238106Sdes
722238106Sdes    cfgfile="${ofile}T"
723238106Sdes    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
724238106Sdes    $RM "$cfgfile"
725238106Sdes
726238106Sdes    cat <<_LT_EOF >> "$cfgfile"
727238106Sdes#! $SHELL
728238106Sdes
729238106Sdes# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
730238106Sdes# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
731238106Sdes# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
732238106Sdes# NOTE: Changes made to this file will be lost: look at ltmain.sh.
733238106Sdes#
734238106Sdes_LT_COPYING
735238106Sdes_LT_LIBTOOL_TAGS
736238106Sdes
737238106Sdes# ### BEGIN LIBTOOL CONFIG
738238106Sdes_LT_LIBTOOL_CONFIG_VARS
739238106Sdes_LT_LIBTOOL_TAG_VARS
740238106Sdes# ### END LIBTOOL CONFIG
741238106Sdes
742238106Sdes_LT_EOF
743238106Sdes
744238106Sdes  case $host_os in
745238106Sdes  aix3*)
746238106Sdes    cat <<\_LT_EOF >> "$cfgfile"
747238106Sdes# AIX sometimes has problems with the GCC collect2 program.  For some
748238106Sdes# reason, if we set the COLLECT_NAMES environment variable, the problems
749238106Sdes# vanish in a puff of smoke.
750238106Sdesif test "X${COLLECT_NAMES+set}" != Xset; then
751238106Sdes  COLLECT_NAMES=
752238106Sdes  export COLLECT_NAMES
753238106Sdesfi
754238106Sdes_LT_EOF
755238106Sdes    ;;
756238106Sdes  esac
757238106Sdes
758238106Sdes  _LT_PROG_LTMAIN
759238106Sdes
760238106Sdes  # We use sed instead of cat because bash on DJGPP gets confused if
761238106Sdes  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
762238106Sdes  # text mode, it properly converts lines to CR/LF.  This bash problem
763238106Sdes  # is reportedly fixed, but why not run on old versions too?
764238106Sdes  sed '$q' "$ltmain" >> "$cfgfile" \
765238106Sdes     || (rm -f "$cfgfile"; exit 1)
766238106Sdes
767238106Sdes  _LT_PROG_REPLACE_SHELLFNS
768238106Sdes
769238106Sdes   mv -f "$cfgfile" "$ofile" ||
770238106Sdes    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
771238106Sdes  chmod +x "$ofile"
772238106Sdes],
773238106Sdes[cat <<_LT_EOF >> "$ofile"
774238106Sdes
775238106Sdesdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
776238106Sdesdnl in a comment (ie after a #).
777238106Sdes# ### BEGIN LIBTOOL TAG CONFIG: $1
778238106Sdes_LT_LIBTOOL_TAG_VARS(_LT_TAG)
779238106Sdes# ### END LIBTOOL TAG CONFIG: $1
780238106Sdes_LT_EOF
781238106Sdes])dnl /m4_if
782238106Sdes],
783238106Sdes[m4_if([$1], [], [
784238106Sdes    PACKAGE='$PACKAGE'
785238106Sdes    VERSION='$VERSION'
786238106Sdes    TIMESTAMP='$TIMESTAMP'
787238106Sdes    RM='$RM'
788238106Sdes    ofile='$ofile'], [])
789238106Sdes])dnl /_LT_CONFIG_SAVE_COMMANDS
790238106Sdes])# _LT_CONFIG
791238106Sdes
792238106Sdes
793238106Sdes# LT_SUPPORTED_TAG(TAG)
794238106Sdes# ---------------------
795238106Sdes# Trace this macro to discover what tags are supported by the libtool
796238106Sdes# --tag option, using:
797238106Sdes#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
798238106SdesAC_DEFUN([LT_SUPPORTED_TAG], [])
799238106Sdes
800238106Sdes
801238106Sdes# C support is built-in for now
802238106Sdesm4_define([_LT_LANG_C_enabled], [])
803238106Sdesm4_define([_LT_TAGS], [])
804238106Sdes
805238106Sdes
806238106Sdes# LT_LANG(LANG)
807238106Sdes# -------------
808238106Sdes# Enable libtool support for the given language if not already enabled.
809238106SdesAC_DEFUN([LT_LANG],
810238106Sdes[AC_BEFORE([$0], [LT_OUTPUT])dnl
811238106Sdesm4_case([$1],
812238106Sdes  [C],			[_LT_LANG(C)],
813238106Sdes  [C++],		[_LT_LANG(CXX)],
814249141Sdes  [Go],			[_LT_LANG(GO)],
815238106Sdes  [Java],		[_LT_LANG(GCJ)],
816238106Sdes  [Fortran 77],		[_LT_LANG(F77)],
817238106Sdes  [Fortran],		[_LT_LANG(FC)],
818238106Sdes  [Windows Resource],	[_LT_LANG(RC)],
819238106Sdes  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
820238106Sdes    [_LT_LANG($1)],
821238106Sdes    [m4_fatal([$0: unsupported language: "$1"])])])dnl
822238106Sdes])# LT_LANG
823238106Sdes
824238106Sdes
825238106Sdes# _LT_LANG(LANGNAME)
826238106Sdes# ------------------
827238106Sdesm4_defun([_LT_LANG],
828238106Sdes[m4_ifdef([_LT_LANG_]$1[_enabled], [],
829238106Sdes  [LT_SUPPORTED_TAG([$1])dnl
830238106Sdes  m4_append([_LT_TAGS], [$1 ])dnl
831238106Sdes  m4_define([_LT_LANG_]$1[_enabled], [])dnl
832238106Sdes  _LT_LANG_$1_CONFIG($1)])dnl
833238106Sdes])# _LT_LANG
834238106Sdes
835238106Sdes
836249141Sdesm4_ifndef([AC_PROG_GO], [
837249141Sdes# NOTE: This macro has been submitted for inclusion into   #
838249141Sdes#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
839249141Sdes#  a released version of Autoconf we should remove this    #
840249141Sdes#  macro and use it instead.                               #
841249141Sdesm4_defun([AC_PROG_GO],
842249141Sdes[AC_LANG_PUSH(Go)dnl
843249141SdesAC_ARG_VAR([GOC],     [Go compiler command])dnl
844249141SdesAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
845249141Sdes_AC_ARG_VAR_LDFLAGS()dnl
846249141SdesAC_CHECK_TOOL(GOC, gccgo)
847249141Sdesif test -z "$GOC"; then
848249141Sdes  if test -n "$ac_tool_prefix"; then
849249141Sdes    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
850249141Sdes  fi
851249141Sdesfi
852249141Sdesif test -z "$GOC"; then
853249141Sdes  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
854249141Sdesfi
855249141Sdes])#m4_defun
856249141Sdes])#m4_ifndef
857249141Sdes
858249141Sdes
859238106Sdes# _LT_LANG_DEFAULT_CONFIG
860238106Sdes# -----------------------
861238106Sdesm4_defun([_LT_LANG_DEFAULT_CONFIG],
862238106Sdes[AC_PROVIDE_IFELSE([AC_PROG_CXX],
863238106Sdes  [LT_LANG(CXX)],
864238106Sdes  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
865238106Sdes
866238106SdesAC_PROVIDE_IFELSE([AC_PROG_F77],
867238106Sdes  [LT_LANG(F77)],
868238106Sdes  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
869238106Sdes
870238106SdesAC_PROVIDE_IFELSE([AC_PROG_FC],
871238106Sdes  [LT_LANG(FC)],
872238106Sdes  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
873238106Sdes
874238106Sdesdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
875238106Sdesdnl pulling things in needlessly.
876238106SdesAC_PROVIDE_IFELSE([AC_PROG_GCJ],
877238106Sdes  [LT_LANG(GCJ)],
878238106Sdes  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
879238106Sdes    [LT_LANG(GCJ)],
880238106Sdes    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
881238106Sdes      [LT_LANG(GCJ)],
882238106Sdes      [m4_ifdef([AC_PROG_GCJ],
883238106Sdes	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
884238106Sdes       m4_ifdef([A][M_PROG_GCJ],
885238106Sdes	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
886238106Sdes       m4_ifdef([LT_PROG_GCJ],
887238106Sdes	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
888238106Sdes
889249141SdesAC_PROVIDE_IFELSE([AC_PROG_GO],
890249141Sdes  [LT_LANG(GO)],
891249141Sdes  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
892249141Sdes
893238106SdesAC_PROVIDE_IFELSE([LT_PROG_RC],
894238106Sdes  [LT_LANG(RC)],
895238106Sdes  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
896238106Sdes])# _LT_LANG_DEFAULT_CONFIG
897238106Sdes
898238106Sdes# Obsolete macros:
899238106SdesAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
900238106SdesAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
901238106SdesAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
902238106SdesAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
903238106SdesAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
904238106Sdesdnl aclocal-1.4 backwards compatibility:
905238106Sdesdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
906238106Sdesdnl AC_DEFUN([AC_LIBTOOL_F77], [])
907238106Sdesdnl AC_DEFUN([AC_LIBTOOL_FC], [])
908238106Sdesdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
909238106Sdesdnl AC_DEFUN([AC_LIBTOOL_RC], [])
910238106Sdes
911238106Sdes
912238106Sdes# _LT_TAG_COMPILER
913238106Sdes# ----------------
914238106Sdesm4_defun([_LT_TAG_COMPILER],
915238106Sdes[AC_REQUIRE([AC_PROG_CC])dnl
916238106Sdes
917238106Sdes_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
918238106Sdes_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
919238106Sdes_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
920238106Sdes_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
921238106Sdes
922238106Sdes# If no C compiler was specified, use CC.
923238106SdesLTCC=${LTCC-"$CC"}
924238106Sdes
925238106Sdes# If no C compiler flags were specified, use CFLAGS.
926238106SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
927238106Sdes
928238106Sdes# Allow CC to be a program name with arguments.
929238106Sdescompiler=$CC
930238106Sdes])# _LT_TAG_COMPILER
931238106Sdes
932238106Sdes
933238106Sdes# _LT_COMPILER_BOILERPLATE
934238106Sdes# ------------------------
935238106Sdes# Check for compiler boilerplate output or warnings with
936238106Sdes# the simple compiler test code.
937238106Sdesm4_defun([_LT_COMPILER_BOILERPLATE],
938238106Sdes[m4_require([_LT_DECL_SED])dnl
939238106Sdesac_outfile=conftest.$ac_objext
940238106Sdesecho "$lt_simple_compile_test_code" >conftest.$ac_ext
941238106Sdeseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
942238106Sdes_lt_compiler_boilerplate=`cat conftest.err`
943238106Sdes$RM conftest*
944238106Sdes])# _LT_COMPILER_BOILERPLATE
945238106Sdes
946238106Sdes
947238106Sdes# _LT_LINKER_BOILERPLATE
948238106Sdes# ----------------------
949238106Sdes# Check for linker boilerplate output or warnings with
950238106Sdes# the simple link test code.
951238106Sdesm4_defun([_LT_LINKER_BOILERPLATE],
952238106Sdes[m4_require([_LT_DECL_SED])dnl
953238106Sdesac_outfile=conftest.$ac_objext
954238106Sdesecho "$lt_simple_link_test_code" >conftest.$ac_ext
955238106Sdeseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
956238106Sdes_lt_linker_boilerplate=`cat conftest.err`
957238106Sdes$RM -r conftest*
958238106Sdes])# _LT_LINKER_BOILERPLATE
959238106Sdes
960238106Sdes# _LT_REQUIRED_DARWIN_CHECKS
961238106Sdes# -------------------------
962238106Sdesm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
963238106Sdes  case $host_os in
964238106Sdes    rhapsody* | darwin*)
965238106Sdes    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
966238106Sdes    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
967238106Sdes    AC_CHECK_TOOL([LIPO], [lipo], [:])
968238106Sdes    AC_CHECK_TOOL([OTOOL], [otool], [:])
969238106Sdes    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
970238106Sdes    _LT_DECL([], [DSYMUTIL], [1],
971238106Sdes      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
972238106Sdes    _LT_DECL([], [NMEDIT], [1],
973238106Sdes      [Tool to change global to local symbols on Mac OS X])
974238106Sdes    _LT_DECL([], [LIPO], [1],
975238106Sdes      [Tool to manipulate fat objects and archives on Mac OS X])
976238106Sdes    _LT_DECL([], [OTOOL], [1],
977238106Sdes      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
978238106Sdes    _LT_DECL([], [OTOOL64], [1],
979238106Sdes      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
980238106Sdes
981238106Sdes    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
982238106Sdes      [lt_cv_apple_cc_single_mod=no
983238106Sdes      if test -z "${LT_MULTI_MODULE}"; then
984238106Sdes	# By default we will add the -single_module flag. You can override
985238106Sdes	# by either setting the environment variable LT_MULTI_MODULE
986238106Sdes	# non-empty at configure time, or by adding -multi_module to the
987238106Sdes	# link flags.
988238106Sdes	rm -rf libconftest.dylib*
989238106Sdes	echo "int foo(void){return 1;}" > conftest.c
990238106Sdes	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
991238106Sdes-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
992238106Sdes	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
993238106Sdes	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
994238106Sdes        _lt_result=$?
995249141Sdes	# If there is a non-empty error log, and "single_module"
996249141Sdes	# appears in it, assume the flag caused a linker warning
997249141Sdes        if test -s conftest.err && $GREP single_module conftest.err; then
998249141Sdes	  cat conftest.err >&AS_MESSAGE_LOG_FD
999249141Sdes	# Otherwise, if the output was created with a 0 exit code from
1000249141Sdes	# the compiler, it worked.
1001249141Sdes	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1002238106Sdes	  lt_cv_apple_cc_single_mod=yes
1003238106Sdes	else
1004238106Sdes	  cat conftest.err >&AS_MESSAGE_LOG_FD
1005238106Sdes	fi
1006238106Sdes	rm -rf libconftest.dylib*
1007238106Sdes	rm -f conftest.*
1008238106Sdes      fi])
1009249141Sdes
1010238106Sdes    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1011238106Sdes      [lt_cv_ld_exported_symbols_list],
1012238106Sdes      [lt_cv_ld_exported_symbols_list=no
1013238106Sdes      save_LDFLAGS=$LDFLAGS
1014238106Sdes      echo "_main" > conftest.sym
1015238106Sdes      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1016238106Sdes      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1017238106Sdes	[lt_cv_ld_exported_symbols_list=yes],
1018238106Sdes	[lt_cv_ld_exported_symbols_list=no])
1019238106Sdes	LDFLAGS="$save_LDFLAGS"
1020238106Sdes    ])
1021249141Sdes
1022238106Sdes    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1023238106Sdes      [lt_cv_ld_force_load=no
1024238106Sdes      cat > conftest.c << _LT_EOF
1025238106Sdesint forced_loaded() { return 2;}
1026238106Sdes_LT_EOF
1027238106Sdes      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1028238106Sdes      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1029238106Sdes      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1030238106Sdes      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1031238106Sdes      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1032238106Sdes      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1033238106Sdes      cat > conftest.c << _LT_EOF
1034238106Sdesint main() { return 0;}
1035238106Sdes_LT_EOF
1036238106Sdes      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1037238106Sdes      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1038238106Sdes      _lt_result=$?
1039249141Sdes      if test -s conftest.err && $GREP force_load conftest.err; then
1040249141Sdes	cat conftest.err >&AS_MESSAGE_LOG_FD
1041249141Sdes      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1042238106Sdes	lt_cv_ld_force_load=yes
1043238106Sdes      else
1044238106Sdes	cat conftest.err >&AS_MESSAGE_LOG_FD
1045238106Sdes      fi
1046238106Sdes        rm -f conftest.err libconftest.a conftest conftest.c
1047238106Sdes        rm -rf conftest.dSYM
1048238106Sdes    ])
1049238106Sdes    case $host_os in
1050238106Sdes    rhapsody* | darwin1.[[012]])
1051238106Sdes      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1052238106Sdes    darwin1.*)
1053238106Sdes      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1054238106Sdes    darwin*) # darwin 5.x on
1055238106Sdes      # if running on 10.5 or later, the deployment target defaults
1056238106Sdes      # to the OS version, if on x86, and 10.4, the deployment
1057238106Sdes      # target defaults to 10.4. Don't you love it?
1058238106Sdes      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1059238106Sdes	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1060238106Sdes	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1061238106Sdes	10.[[012]]*)
1062238106Sdes	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1063238106Sdes	10.*)
1064238106Sdes	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1065238106Sdes      esac
1066238106Sdes    ;;
1067238106Sdes  esac
1068238106Sdes    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1069238106Sdes      _lt_dar_single_mod='$single_module'
1070238106Sdes    fi
1071238106Sdes    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1072238106Sdes      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1073238106Sdes    else
1074238106Sdes      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1075238106Sdes    fi
1076238106Sdes    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1077238106Sdes      _lt_dsymutil='~$DSYMUTIL $lib || :'
1078238106Sdes    else
1079238106Sdes      _lt_dsymutil=
1080238106Sdes    fi
1081238106Sdes    ;;
1082238106Sdes  esac
1083238106Sdes])
1084238106Sdes
1085238106Sdes
1086249141Sdes# _LT_DARWIN_LINKER_FEATURES([TAG])
1087249141Sdes# ---------------------------------
1088238106Sdes# Checks for linker and compiler features on darwin
1089238106Sdesm4_defun([_LT_DARWIN_LINKER_FEATURES],
1090238106Sdes[
1091238106Sdes  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1092238106Sdes  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1093238106Sdes  _LT_TAGVAR(hardcode_direct, $1)=no
1094238106Sdes  _LT_TAGVAR(hardcode_automatic, $1)=yes
1095238106Sdes  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1096238106Sdes  if test "$lt_cv_ld_force_load" = "yes"; then
1097238106Sdes    _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\"`'
1098249141Sdes    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1099249141Sdes                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1100238106Sdes  else
1101238106Sdes    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1102238106Sdes  fi
1103238106Sdes  _LT_TAGVAR(link_all_deplibs, $1)=yes
1104238106Sdes  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1105238106Sdes  case $cc_basename in
1106238106Sdes     ifort*) _lt_dar_can_shared=yes ;;
1107238106Sdes     *) _lt_dar_can_shared=$GCC ;;
1108238106Sdes  esac
1109238106Sdes  if test "$_lt_dar_can_shared" = "yes"; then
1110238106Sdes    output_verbose_link_cmd=func_echo_all
1111238106Sdes    _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}"
1112238106Sdes    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1113238106Sdes    _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}"
1114238106Sdes    _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}"
1115238106Sdes    m4_if([$1], [CXX],
1116238106Sdes[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1117238106Sdes      _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}"
1118238106Sdes      _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}"
1119238106Sdes    fi
1120238106Sdes],[])
1121238106Sdes  else
1122238106Sdes  _LT_TAGVAR(ld_shlibs, $1)=no
1123238106Sdes  fi
1124238106Sdes])
1125238106Sdes
1126238106Sdes# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1127238106Sdes# ----------------------------------
1128238106Sdes# Links a minimal program and checks the executable
1129238106Sdes# for the system default hardcoded library path. In most cases,
1130238106Sdes# this is /usr/lib:/lib, but when the MPI compilers are used
1131238106Sdes# the location of the communication and MPI libs are included too.
1132238106Sdes# If we don't find anything, use the default library path according
1133238106Sdes# to the aix ld manual.
1134238106Sdes# Store the results from the different compilers for each TAGNAME.
1135238106Sdes# Allow to override them for all tags through lt_cv_aix_libpath.
1136238106Sdesm4_defun([_LT_SYS_MODULE_PATH_AIX],
1137238106Sdes[m4_require([_LT_DECL_SED])dnl
1138238106Sdesif test "${lt_cv_aix_libpath+set}" = set; then
1139238106Sdes  aix_libpath=$lt_cv_aix_libpath
1140238106Sdeselse
1141238106Sdes  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1142238106Sdes  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1143238106Sdes  lt_aix_libpath_sed='[
1144238106Sdes      /Import File Strings/,/^$/ {
1145238106Sdes	  /^0/ {
1146238106Sdes	      s/^0  *\([^ ]*\) *$/\1/
1147238106Sdes	      p
1148238106Sdes	  }
1149238106Sdes      }]'
1150238106Sdes  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1151238106Sdes  # Check for a 64-bit object if we didn't find anything.
1152238106Sdes  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1153238106Sdes    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1154238106Sdes  fi],[])
1155238106Sdes  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1156238106Sdes    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1157238106Sdes  fi
1158238106Sdes  ])
1159238106Sdes  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1160238106Sdesfi
1161238106Sdes])# _LT_SYS_MODULE_PATH_AIX
1162238106Sdes
1163238106Sdes
1164238106Sdes# _LT_SHELL_INIT(ARG)
1165238106Sdes# -------------------
1166238106Sdesm4_define([_LT_SHELL_INIT],
1167238106Sdes[m4_divert_text([M4SH-INIT], [$1
1168238106Sdes])])# _LT_SHELL_INIT
1169238106Sdes
1170238106Sdes
1171238106Sdes
1172238106Sdes# _LT_PROG_ECHO_BACKSLASH
1173238106Sdes# -----------------------
1174238106Sdes# Find how we can fake an echo command that does not interpret backslash.
1175238106Sdes# In particular, with Autoconf 2.60 or later we add some code to the start
1176238106Sdes# of the generated configure script which will find a shell with a builtin
1177238106Sdes# printf (which we can use as an echo command).
1178238106Sdesm4_defun([_LT_PROG_ECHO_BACKSLASH],
1179238106Sdes[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1180238106SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1181238106SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1182238106Sdes
1183238106SdesAC_MSG_CHECKING([how to print strings])
1184238106Sdes# Test print first, because it will be a builtin if present.
1185238106Sdesif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1186238106Sdes   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1187238106Sdes  ECHO='print -r --'
1188238106Sdeselif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1189238106Sdes  ECHO='printf %s\n'
1190238106Sdeselse
1191238106Sdes  # Use this function as a fallback that always works.
1192238106Sdes  func_fallback_echo ()
1193238106Sdes  {
1194238106Sdes    eval 'cat <<_LTECHO_EOF
1195238106Sdes$[]1
1196238106Sdes_LTECHO_EOF'
1197238106Sdes  }
1198238106Sdes  ECHO='func_fallback_echo'
1199238106Sdesfi
1200238106Sdes
1201238106Sdes# func_echo_all arg...
1202238106Sdes# Invoke $ECHO with all args, space-separated.
1203238106Sdesfunc_echo_all ()
1204238106Sdes{
1205238106Sdes    $ECHO "$*" 
1206238106Sdes}
1207238106Sdes
1208238106Sdescase "$ECHO" in
1209238106Sdes  printf*) AC_MSG_RESULT([printf]) ;;
1210238106Sdes  print*) AC_MSG_RESULT([print -r]) ;;
1211238106Sdes  *) AC_MSG_RESULT([cat]) ;;
1212238106Sdesesac
1213238106Sdes
1214238106Sdesm4_ifdef([_AS_DETECT_SUGGESTED],
1215238106Sdes[_AS_DETECT_SUGGESTED([
1216238106Sdes  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1217238106Sdes    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1218238106Sdes    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1219238106Sdes    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1220238106Sdes    PATH=/empty FPATH=/empty; export PATH FPATH
1221238106Sdes    test "X`printf %s $ECHO`" = "X$ECHO" \
1222238106Sdes      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1223238106Sdes
1224238106Sdes_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1225238106Sdes_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1226238106Sdes])# _LT_PROG_ECHO_BACKSLASH
1227238106Sdes
1228238106Sdes
1229238106Sdes# _LT_WITH_SYSROOT
1230238106Sdes# ----------------
1231238106SdesAC_DEFUN([_LT_WITH_SYSROOT],
1232238106Sdes[AC_MSG_CHECKING([for sysroot])
1233238106SdesAC_ARG_WITH([sysroot],
1234238106Sdes[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1235238106Sdes                        (or the compiler's sysroot if not specified).],
1236238106Sdes[], [with_sysroot=no])
1237238106Sdes
1238238106Sdesdnl lt_sysroot will always be passed unquoted.  We quote it here
1239238106Sdesdnl in case the user passed a directory name.
1240238106Sdeslt_sysroot=
1241238106Sdescase ${with_sysroot} in #(
1242238106Sdes yes)
1243238106Sdes   if test "$GCC" = yes; then
1244238106Sdes     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1245238106Sdes   fi
1246238106Sdes   ;; #(
1247238106Sdes /*)
1248238106Sdes   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1249238106Sdes   ;; #(
1250238106Sdes no|'')
1251238106Sdes   ;; #(
1252238106Sdes *)
1253238106Sdes   AC_MSG_RESULT([${with_sysroot}])
1254238106Sdes   AC_MSG_ERROR([The sysroot must be an absolute path.])
1255238106Sdes   ;;
1256238106Sdesesac
1257238106Sdes
1258238106Sdes AC_MSG_RESULT([${lt_sysroot:-no}])
1259238106Sdes_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1260238106Sdes[dependent libraries, and in which our libraries should be installed.])])
1261238106Sdes
1262238106Sdes# _LT_ENABLE_LOCK
1263238106Sdes# ---------------
1264238106Sdesm4_defun([_LT_ENABLE_LOCK],
1265238106Sdes[AC_ARG_ENABLE([libtool-lock],
1266238106Sdes  [AS_HELP_STRING([--disable-libtool-lock],
1267238106Sdes    [avoid locking (might break parallel builds)])])
1268238106Sdestest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1269238106Sdes
1270238106Sdes# Some flags need to be propagated to the compiler or linker for good
1271238106Sdes# libtool support.
1272238106Sdescase $host in
1273238106Sdesia64-*-hpux*)
1274238106Sdes  # Find out which ABI we are using.
1275238106Sdes  echo 'int i;' > conftest.$ac_ext
1276238106Sdes  if AC_TRY_EVAL(ac_compile); then
1277238106Sdes    case `/usr/bin/file conftest.$ac_objext` in
1278238106Sdes      *ELF-32*)
1279238106Sdes	HPUX_IA64_MODE="32"
1280238106Sdes	;;
1281238106Sdes      *ELF-64*)
1282238106Sdes	HPUX_IA64_MODE="64"
1283238106Sdes	;;
1284238106Sdes    esac
1285238106Sdes  fi
1286238106Sdes  rm -rf conftest*
1287238106Sdes  ;;
1288238106Sdes*-*-irix6*)
1289238106Sdes  # Find out which ABI we are using.
1290238106Sdes  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1291238106Sdes  if AC_TRY_EVAL(ac_compile); then
1292238106Sdes    if test "$lt_cv_prog_gnu_ld" = yes; then
1293238106Sdes      case `/usr/bin/file conftest.$ac_objext` in
1294238106Sdes	*32-bit*)
1295238106Sdes	  LD="${LD-ld} -melf32bsmip"
1296238106Sdes	  ;;
1297238106Sdes	*N32*)
1298238106Sdes	  LD="${LD-ld} -melf32bmipn32"
1299238106Sdes	  ;;
1300238106Sdes	*64-bit*)
1301238106Sdes	  LD="${LD-ld} -melf64bmip"
1302238106Sdes	;;
1303238106Sdes      esac
1304238106Sdes    else
1305238106Sdes      case `/usr/bin/file conftest.$ac_objext` in
1306238106Sdes	*32-bit*)
1307238106Sdes	  LD="${LD-ld} -32"
1308238106Sdes	  ;;
1309238106Sdes	*N32*)
1310238106Sdes	  LD="${LD-ld} -n32"
1311238106Sdes	  ;;
1312238106Sdes	*64-bit*)
1313238106Sdes	  LD="${LD-ld} -64"
1314238106Sdes	  ;;
1315238106Sdes      esac
1316238106Sdes    fi
1317238106Sdes  fi
1318238106Sdes  rm -rf conftest*
1319238106Sdes  ;;
1320238106Sdes
1321285206Sdesx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1322238106Sdess390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1323238106Sdes  # Find out which ABI we are using.
1324238106Sdes  echo 'int i;' > conftest.$ac_ext
1325238106Sdes  if AC_TRY_EVAL(ac_compile); then
1326238106Sdes    case `/usr/bin/file conftest.o` in
1327238106Sdes      *32-bit*)
1328238106Sdes	case $host in
1329238106Sdes	  x86_64-*kfreebsd*-gnu)
1330238106Sdes	    LD="${LD-ld} -m elf_i386_fbsd"
1331238106Sdes	    ;;
1332238106Sdes	  x86_64-*linux*)
1333238106Sdes	    LD="${LD-ld} -m elf_i386"
1334238106Sdes	    ;;
1335285206Sdes	  powerpc64le-*linux*)
1336285206Sdes	    LD="${LD-ld} -m elf32lppclinux"
1337285206Sdes	    ;;
1338285206Sdes	  powerpc64-*linux*)
1339238106Sdes	    LD="${LD-ld} -m elf32ppclinux"
1340238106Sdes	    ;;
1341238106Sdes	  s390x-*linux*)
1342238106Sdes	    LD="${LD-ld} -m elf_s390"
1343238106Sdes	    ;;
1344238106Sdes	  sparc64-*linux*)
1345238106Sdes	    LD="${LD-ld} -m elf32_sparc"
1346238106Sdes	    ;;
1347238106Sdes	esac
1348238106Sdes	;;
1349238106Sdes      *64-bit*)
1350238106Sdes	case $host in
1351238106Sdes	  x86_64-*kfreebsd*-gnu)
1352238106Sdes	    LD="${LD-ld} -m elf_x86_64_fbsd"
1353238106Sdes	    ;;
1354238106Sdes	  x86_64-*linux*)
1355238106Sdes	    LD="${LD-ld} -m elf_x86_64"
1356238106Sdes	    ;;
1357285206Sdes	  powerpcle-*linux*)
1358285206Sdes	    LD="${LD-ld} -m elf64lppc"
1359285206Sdes	    ;;
1360285206Sdes	  powerpc-*linux*)
1361238106Sdes	    LD="${LD-ld} -m elf64ppc"
1362238106Sdes	    ;;
1363238106Sdes	  s390*-*linux*|s390*-*tpf*)
1364238106Sdes	    LD="${LD-ld} -m elf64_s390"
1365238106Sdes	    ;;
1366238106Sdes	  sparc*-*linux*)
1367238106Sdes	    LD="${LD-ld} -m elf64_sparc"
1368238106Sdes	    ;;
1369238106Sdes	esac
1370238106Sdes	;;
1371238106Sdes    esac
1372238106Sdes  fi
1373238106Sdes  rm -rf conftest*
1374238106Sdes  ;;
1375238106Sdes
1376238106Sdes*-*-sco3.2v5*)
1377238106Sdes  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1378238106Sdes  SAVE_CFLAGS="$CFLAGS"
1379238106Sdes  CFLAGS="$CFLAGS -belf"
1380238106Sdes  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1381238106Sdes    [AC_LANG_PUSH(C)
1382238106Sdes     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1383238106Sdes     AC_LANG_POP])
1384238106Sdes  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1385238106Sdes    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1386238106Sdes    CFLAGS="$SAVE_CFLAGS"
1387238106Sdes  fi
1388238106Sdes  ;;
1389249141Sdes*-*solaris*)
1390238106Sdes  # Find out which ABI we are using.
1391238106Sdes  echo 'int i;' > conftest.$ac_ext
1392238106Sdes  if AC_TRY_EVAL(ac_compile); then
1393238106Sdes    case `/usr/bin/file conftest.o` in
1394238106Sdes    *64-bit*)
1395238106Sdes      case $lt_cv_prog_gnu_ld in
1396249141Sdes      yes*)
1397249141Sdes        case $host in
1398249141Sdes        i?86-*-solaris*)
1399249141Sdes          LD="${LD-ld} -m elf_x86_64"
1400249141Sdes          ;;
1401249141Sdes        sparc*-*-solaris*)
1402249141Sdes          LD="${LD-ld} -m elf64_sparc"
1403249141Sdes          ;;
1404249141Sdes        esac
1405249141Sdes        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1406249141Sdes        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1407249141Sdes          LD="${LD-ld}_sol2"
1408249141Sdes        fi
1409249141Sdes        ;;
1410238106Sdes      *)
1411238106Sdes	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1412238106Sdes	  LD="${LD-ld} -64"
1413238106Sdes	fi
1414238106Sdes	;;
1415238106Sdes      esac
1416238106Sdes      ;;
1417238106Sdes    esac
1418238106Sdes  fi
1419238106Sdes  rm -rf conftest*
1420238106Sdes  ;;
1421238106Sdesesac
1422238106Sdes
1423238106Sdesneed_locks="$enable_libtool_lock"
1424238106Sdes])# _LT_ENABLE_LOCK
1425238106Sdes
1426238106Sdes
1427238106Sdes# _LT_PROG_AR
1428238106Sdes# -----------
1429238106Sdesm4_defun([_LT_PROG_AR],
1430238106Sdes[AC_CHECK_TOOLS(AR, [ar], false)
1431238106Sdes: ${AR=ar}
1432238106Sdes: ${AR_FLAGS=cru}
1433238106Sdes_LT_DECL([], [AR], [1], [The archiver])
1434238106Sdes_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1435238106Sdes
1436238106SdesAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1437238106Sdes  [lt_cv_ar_at_file=no
1438238106Sdes   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1439238106Sdes     [echo conftest.$ac_objext > conftest.lst
1440238106Sdes      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1441238106Sdes      AC_TRY_EVAL([lt_ar_try])
1442238106Sdes      if test "$ac_status" -eq 0; then
1443238106Sdes	# Ensure the archiver fails upon bogus file names.
1444238106Sdes	rm -f conftest.$ac_objext libconftest.a
1445238106Sdes	AC_TRY_EVAL([lt_ar_try])
1446238106Sdes	if test "$ac_status" -ne 0; then
1447238106Sdes          lt_cv_ar_at_file=@
1448238106Sdes        fi
1449238106Sdes      fi
1450238106Sdes      rm -f conftest.* libconftest.a
1451238106Sdes     ])
1452238106Sdes  ])
1453238106Sdes
1454238106Sdesif test "x$lt_cv_ar_at_file" = xno; then
1455238106Sdes  archiver_list_spec=
1456238106Sdeselse
1457238106Sdes  archiver_list_spec=$lt_cv_ar_at_file
1458238106Sdesfi
1459238106Sdes_LT_DECL([], [archiver_list_spec], [1],
1460238106Sdes  [How to feed a file listing to the archiver])
1461238106Sdes])# _LT_PROG_AR
1462238106Sdes
1463238106Sdes
1464238106Sdes# _LT_CMD_OLD_ARCHIVE
1465238106Sdes# -------------------
1466238106Sdesm4_defun([_LT_CMD_OLD_ARCHIVE],
1467238106Sdes[_LT_PROG_AR
1468238106Sdes
1469238106SdesAC_CHECK_TOOL(STRIP, strip, :)
1470238106Sdestest -z "$STRIP" && STRIP=:
1471238106Sdes_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1472238106Sdes
1473238106SdesAC_CHECK_TOOL(RANLIB, ranlib, :)
1474238106Sdestest -z "$RANLIB" && RANLIB=:
1475238106Sdes_LT_DECL([], [RANLIB], [1],
1476238106Sdes    [Commands used to install an old-style archive])
1477238106Sdes
1478238106Sdes# Determine commands to create old-style static archives.
1479238106Sdesold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1480238106Sdesold_postinstall_cmds='chmod 644 $oldlib'
1481238106Sdesold_postuninstall_cmds=
1482238106Sdes
1483238106Sdesif test -n "$RANLIB"; then
1484238106Sdes  case $host_os in
1485238106Sdes  openbsd*)
1486249141Sdes    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1487238106Sdes    ;;
1488238106Sdes  *)
1489249141Sdes    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1490238106Sdes    ;;
1491238106Sdes  esac
1492249141Sdes  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1493238106Sdesfi
1494238106Sdes
1495238106Sdescase $host_os in
1496238106Sdes  darwin*)
1497238106Sdes    lock_old_archive_extraction=yes ;;
1498238106Sdes  *)
1499238106Sdes    lock_old_archive_extraction=no ;;
1500238106Sdesesac
1501238106Sdes_LT_DECL([], [old_postinstall_cmds], [2])
1502238106Sdes_LT_DECL([], [old_postuninstall_cmds], [2])
1503238106Sdes_LT_TAGDECL([], [old_archive_cmds], [2],
1504238106Sdes    [Commands used to build an old-style archive])
1505238106Sdes_LT_DECL([], [lock_old_archive_extraction], [0],
1506238106Sdes    [Whether to use a lock for old archive extraction])
1507238106Sdes])# _LT_CMD_OLD_ARCHIVE
1508238106Sdes
1509238106Sdes
1510238106Sdes# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1511238106Sdes#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1512238106Sdes# ----------------------------------------------------------------
1513238106Sdes# Check whether the given compiler option works
1514238106SdesAC_DEFUN([_LT_COMPILER_OPTION],
1515238106Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1516238106Sdesm4_require([_LT_DECL_SED])dnl
1517238106SdesAC_CACHE_CHECK([$1], [$2],
1518238106Sdes  [$2=no
1519238106Sdes   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1520238106Sdes   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1521238106Sdes   lt_compiler_flag="$3"
1522238106Sdes   # Insert the option either (1) after the last *FLAGS variable, or
1523238106Sdes   # (2) before a word containing "conftest.", or (3) at the end.
1524238106Sdes   # Note that $ac_compile itself does not contain backslashes and begins
1525238106Sdes   # with a dollar sign (not a hyphen), so the echo should work correctly.
1526238106Sdes   # The option is referenced via a variable to avoid confusing sed.
1527238106Sdes   lt_compile=`echo "$ac_compile" | $SED \
1528238106Sdes   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1529238106Sdes   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1530238106Sdes   -e 's:$: $lt_compiler_flag:'`
1531238106Sdes   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1532238106Sdes   (eval "$lt_compile" 2>conftest.err)
1533238106Sdes   ac_status=$?
1534238106Sdes   cat conftest.err >&AS_MESSAGE_LOG_FD
1535238106Sdes   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1536238106Sdes   if (exit $ac_status) && test -s "$ac_outfile"; then
1537238106Sdes     # The compiler can only warn and ignore the option if not recognized
1538238106Sdes     # So say no if there are warnings other than the usual output.
1539238106Sdes     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1540238106Sdes     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1541238106Sdes     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1542238106Sdes       $2=yes
1543238106Sdes     fi
1544238106Sdes   fi
1545238106Sdes   $RM conftest*
1546238106Sdes])
1547238106Sdes
1548238106Sdesif test x"[$]$2" = xyes; then
1549238106Sdes    m4_if([$5], , :, [$5])
1550238106Sdeselse
1551238106Sdes    m4_if([$6], , :, [$6])
1552238106Sdesfi
1553238106Sdes])# _LT_COMPILER_OPTION
1554238106Sdes
1555238106Sdes# Old name:
1556238106SdesAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1557238106Sdesdnl aclocal-1.4 backwards compatibility:
1558238106Sdesdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1559238106Sdes
1560238106Sdes
1561238106Sdes# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1562238106Sdes#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1563238106Sdes# ----------------------------------------------------
1564238106Sdes# Check whether the given linker option works
1565238106SdesAC_DEFUN([_LT_LINKER_OPTION],
1566238106Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1567238106Sdesm4_require([_LT_DECL_SED])dnl
1568238106SdesAC_CACHE_CHECK([$1], [$2],
1569238106Sdes  [$2=no
1570238106Sdes   save_LDFLAGS="$LDFLAGS"
1571238106Sdes   LDFLAGS="$LDFLAGS $3"
1572238106Sdes   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1573238106Sdes   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1574238106Sdes     # The linker can only warn and ignore the option if not recognized
1575238106Sdes     # So say no if there are warnings
1576238106Sdes     if test -s conftest.err; then
1577238106Sdes       # Append any errors to the config.log.
1578238106Sdes       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1579238106Sdes       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1580238106Sdes       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1581238106Sdes       if diff conftest.exp conftest.er2 >/dev/null; then
1582238106Sdes         $2=yes
1583238106Sdes       fi
1584238106Sdes     else
1585238106Sdes       $2=yes
1586238106Sdes     fi
1587238106Sdes   fi
1588238106Sdes   $RM -r conftest*
1589238106Sdes   LDFLAGS="$save_LDFLAGS"
1590238106Sdes])
1591238106Sdes
1592238106Sdesif test x"[$]$2" = xyes; then
1593238106Sdes    m4_if([$4], , :, [$4])
1594238106Sdeselse
1595238106Sdes    m4_if([$5], , :, [$5])
1596238106Sdesfi
1597238106Sdes])# _LT_LINKER_OPTION
1598238106Sdes
1599238106Sdes# Old name:
1600238106SdesAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1601238106Sdesdnl aclocal-1.4 backwards compatibility:
1602238106Sdesdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1603238106Sdes
1604238106Sdes
1605238106Sdes# LT_CMD_MAX_LEN
1606238106Sdes#---------------
1607238106SdesAC_DEFUN([LT_CMD_MAX_LEN],
1608238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1609238106Sdes# find the maximum length of command line arguments
1610238106SdesAC_MSG_CHECKING([the maximum length of command line arguments])
1611238106SdesAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1612238106Sdes  i=0
1613238106Sdes  teststring="ABCD"
1614238106Sdes
1615238106Sdes  case $build_os in
1616238106Sdes  msdosdjgpp*)
1617238106Sdes    # On DJGPP, this test can blow up pretty badly due to problems in libc
1618238106Sdes    # (any single argument exceeding 2000 bytes causes a buffer overrun
1619238106Sdes    # during glob expansion).  Even if it were fixed, the result of this
1620238106Sdes    # check would be larger than it should be.
1621238106Sdes    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1622238106Sdes    ;;
1623238106Sdes
1624238106Sdes  gnu*)
1625238106Sdes    # Under GNU Hurd, this test is not required because there is
1626238106Sdes    # no limit to the length of command line arguments.
1627238106Sdes    # Libtool will interpret -1 as no limit whatsoever
1628238106Sdes    lt_cv_sys_max_cmd_len=-1;
1629238106Sdes    ;;
1630238106Sdes
1631238106Sdes  cygwin* | mingw* | cegcc*)
1632238106Sdes    # On Win9x/ME, this test blows up -- it succeeds, but takes
1633238106Sdes    # about 5 minutes as the teststring grows exponentially.
1634238106Sdes    # Worse, since 9x/ME are not pre-emptively multitasking,
1635238106Sdes    # you end up with a "frozen" computer, even though with patience
1636238106Sdes    # the test eventually succeeds (with a max line length of 256k).
1637238106Sdes    # Instead, let's just punt: use the minimum linelength reported by
1638238106Sdes    # all of the supported platforms: 8192 (on NT/2K/XP).
1639238106Sdes    lt_cv_sys_max_cmd_len=8192;
1640238106Sdes    ;;
1641238106Sdes
1642238106Sdes  mint*)
1643238106Sdes    # On MiNT this can take a long time and run out of memory.
1644238106Sdes    lt_cv_sys_max_cmd_len=8192;
1645238106Sdes    ;;
1646238106Sdes
1647238106Sdes  amigaos*)
1648238106Sdes    # On AmigaOS with pdksh, this test takes hours, literally.
1649238106Sdes    # So we just punt and use a minimum line length of 8192.
1650238106Sdes    lt_cv_sys_max_cmd_len=8192;
1651238106Sdes    ;;
1652238106Sdes
1653238106Sdes  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1654238106Sdes    # This has been around since 386BSD, at least.  Likely further.
1655238106Sdes    if test -x /sbin/sysctl; then
1656238106Sdes      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1657238106Sdes    elif test -x /usr/sbin/sysctl; then
1658238106Sdes      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1659238106Sdes    else
1660238106Sdes      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1661238106Sdes    fi
1662238106Sdes    # And add a safety zone
1663238106Sdes    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1664238106Sdes    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1665238106Sdes    ;;
1666238106Sdes
1667238106Sdes  interix*)
1668238106Sdes    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1669238106Sdes    lt_cv_sys_max_cmd_len=196608
1670238106Sdes    ;;
1671238106Sdes
1672249141Sdes  os2*)
1673249141Sdes    # The test takes a long time on OS/2.
1674249141Sdes    lt_cv_sys_max_cmd_len=8192
1675249141Sdes    ;;
1676249141Sdes
1677238106Sdes  osf*)
1678238106Sdes    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1679238106Sdes    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1680238106Sdes    # nice to cause kernel panics so lets avoid the loop below.
1681238106Sdes    # First set a reasonable default.
1682238106Sdes    lt_cv_sys_max_cmd_len=16384
1683238106Sdes    #
1684238106Sdes    if test -x /sbin/sysconfig; then
1685238106Sdes      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1686238106Sdes        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1687238106Sdes      esac
1688238106Sdes    fi
1689238106Sdes    ;;
1690238106Sdes  sco3.2v5*)
1691238106Sdes    lt_cv_sys_max_cmd_len=102400
1692238106Sdes    ;;
1693238106Sdes  sysv5* | sco5v6* | sysv4.2uw2*)
1694238106Sdes    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1695238106Sdes    if test -n "$kargmax"; then
1696238106Sdes      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1697238106Sdes    else
1698238106Sdes      lt_cv_sys_max_cmd_len=32768
1699238106Sdes    fi
1700238106Sdes    ;;
1701238106Sdes  *)
1702238106Sdes    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1703238106Sdes    if test -n "$lt_cv_sys_max_cmd_len"; then
1704238106Sdes      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1705238106Sdes      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1706238106Sdes    else
1707238106Sdes      # Make teststring a little bigger before we do anything with it.
1708238106Sdes      # a 1K string should be a reasonable start.
1709238106Sdes      for i in 1 2 3 4 5 6 7 8 ; do
1710238106Sdes        teststring=$teststring$teststring
1711238106Sdes      done
1712238106Sdes      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1713238106Sdes      # If test is not a shell built-in, we'll probably end up computing a
1714238106Sdes      # maximum length that is only half of the actual maximum length, but
1715238106Sdes      # we can't tell.
1716249141Sdes      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1717238106Sdes	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1718238106Sdes	      test $i != 17 # 1/2 MB should be enough
1719238106Sdes      do
1720238106Sdes        i=`expr $i + 1`
1721238106Sdes        teststring=$teststring$teststring
1722238106Sdes      done
1723238106Sdes      # Only check the string length outside the loop.
1724238106Sdes      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1725238106Sdes      teststring=
1726238106Sdes      # Add a significant safety factor because C++ compilers can tack on
1727238106Sdes      # massive amounts of additional arguments before passing them to the
1728238106Sdes      # linker.  It appears as though 1/2 is a usable value.
1729238106Sdes      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1730238106Sdes    fi
1731238106Sdes    ;;
1732238106Sdes  esac
1733238106Sdes])
1734238106Sdesif test -n $lt_cv_sys_max_cmd_len ; then
1735238106Sdes  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1736238106Sdeselse
1737238106Sdes  AC_MSG_RESULT(none)
1738238106Sdesfi
1739238106Sdesmax_cmd_len=$lt_cv_sys_max_cmd_len
1740238106Sdes_LT_DECL([], [max_cmd_len], [0],
1741238106Sdes    [What is the maximum length of a command?])
1742238106Sdes])# LT_CMD_MAX_LEN
1743238106Sdes
1744238106Sdes# Old name:
1745238106SdesAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1746238106Sdesdnl aclocal-1.4 backwards compatibility:
1747238106Sdesdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1748238106Sdes
1749238106Sdes
1750238106Sdes# _LT_HEADER_DLFCN
1751238106Sdes# ----------------
1752238106Sdesm4_defun([_LT_HEADER_DLFCN],
1753238106Sdes[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1754238106Sdes])# _LT_HEADER_DLFCN
1755238106Sdes
1756238106Sdes
1757238106Sdes# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1758238106Sdes#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1759238106Sdes# ----------------------------------------------------------------
1760238106Sdesm4_defun([_LT_TRY_DLOPEN_SELF],
1761238106Sdes[m4_require([_LT_HEADER_DLFCN])dnl
1762238106Sdesif test "$cross_compiling" = yes; then :
1763238106Sdes  [$4]
1764238106Sdeselse
1765238106Sdes  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1766238106Sdes  lt_status=$lt_dlunknown
1767238106Sdes  cat > conftest.$ac_ext <<_LT_EOF
1768238106Sdes[#line $LINENO "configure"
1769238106Sdes#include "confdefs.h"
1770238106Sdes
1771238106Sdes#if HAVE_DLFCN_H
1772238106Sdes#include <dlfcn.h>
1773238106Sdes#endif
1774238106Sdes
1775238106Sdes#include <stdio.h>
1776238106Sdes
1777238106Sdes#ifdef RTLD_GLOBAL
1778238106Sdes#  define LT_DLGLOBAL		RTLD_GLOBAL
1779238106Sdes#else
1780238106Sdes#  ifdef DL_GLOBAL
1781238106Sdes#    define LT_DLGLOBAL		DL_GLOBAL
1782238106Sdes#  else
1783238106Sdes#    define LT_DLGLOBAL		0
1784238106Sdes#  endif
1785238106Sdes#endif
1786238106Sdes
1787238106Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1788238106Sdes   find out it does not work in some platform. */
1789238106Sdes#ifndef LT_DLLAZY_OR_NOW
1790238106Sdes#  ifdef RTLD_LAZY
1791238106Sdes#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1792238106Sdes#  else
1793238106Sdes#    ifdef DL_LAZY
1794238106Sdes#      define LT_DLLAZY_OR_NOW		DL_LAZY
1795238106Sdes#    else
1796238106Sdes#      ifdef RTLD_NOW
1797238106Sdes#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1798238106Sdes#      else
1799238106Sdes#        ifdef DL_NOW
1800238106Sdes#          define LT_DLLAZY_OR_NOW	DL_NOW
1801238106Sdes#        else
1802238106Sdes#          define LT_DLLAZY_OR_NOW	0
1803238106Sdes#        endif
1804238106Sdes#      endif
1805238106Sdes#    endif
1806238106Sdes#  endif
1807238106Sdes#endif
1808238106Sdes
1809238106Sdes/* When -fvisbility=hidden is used, assume the code has been annotated
1810238106Sdes   correspondingly for the symbols needed.  */
1811238106Sdes#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1812238106Sdesint fnord () __attribute__((visibility("default")));
1813238106Sdes#endif
1814238106Sdes
1815238106Sdesint fnord () { return 42; }
1816238106Sdesint main ()
1817238106Sdes{
1818238106Sdes  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1819238106Sdes  int status = $lt_dlunknown;
1820238106Sdes
1821238106Sdes  if (self)
1822238106Sdes    {
1823238106Sdes      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1824238106Sdes      else
1825238106Sdes        {
1826238106Sdes	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1827238106Sdes          else puts (dlerror ());
1828238106Sdes	}
1829238106Sdes      /* dlclose (self); */
1830238106Sdes    }
1831238106Sdes  else
1832238106Sdes    puts (dlerror ());
1833238106Sdes
1834238106Sdes  return status;
1835238106Sdes}]
1836238106Sdes_LT_EOF
1837238106Sdes  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1838238106Sdes    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1839238106Sdes    lt_status=$?
1840238106Sdes    case x$lt_status in
1841238106Sdes      x$lt_dlno_uscore) $1 ;;
1842238106Sdes      x$lt_dlneed_uscore) $2 ;;
1843238106Sdes      x$lt_dlunknown|x*) $3 ;;
1844238106Sdes    esac
1845238106Sdes  else :
1846238106Sdes    # compilation failed
1847238106Sdes    $3
1848238106Sdes  fi
1849238106Sdesfi
1850238106Sdesrm -fr conftest*
1851238106Sdes])# _LT_TRY_DLOPEN_SELF
1852238106Sdes
1853238106Sdes
1854238106Sdes# LT_SYS_DLOPEN_SELF
1855238106Sdes# ------------------
1856238106SdesAC_DEFUN([LT_SYS_DLOPEN_SELF],
1857238106Sdes[m4_require([_LT_HEADER_DLFCN])dnl
1858238106Sdesif test "x$enable_dlopen" != xyes; then
1859238106Sdes  enable_dlopen=unknown
1860238106Sdes  enable_dlopen_self=unknown
1861238106Sdes  enable_dlopen_self_static=unknown
1862238106Sdeselse
1863238106Sdes  lt_cv_dlopen=no
1864238106Sdes  lt_cv_dlopen_libs=
1865238106Sdes
1866238106Sdes  case $host_os in
1867238106Sdes  beos*)
1868238106Sdes    lt_cv_dlopen="load_add_on"
1869238106Sdes    lt_cv_dlopen_libs=
1870238106Sdes    lt_cv_dlopen_self=yes
1871238106Sdes    ;;
1872238106Sdes
1873238106Sdes  mingw* | pw32* | cegcc*)
1874238106Sdes    lt_cv_dlopen="LoadLibrary"
1875238106Sdes    lt_cv_dlopen_libs=
1876238106Sdes    ;;
1877238106Sdes
1878238106Sdes  cygwin*)
1879238106Sdes    lt_cv_dlopen="dlopen"
1880238106Sdes    lt_cv_dlopen_libs=
1881238106Sdes    ;;
1882238106Sdes
1883238106Sdes  darwin*)
1884238106Sdes  # if libdl is installed we need to link against it
1885238106Sdes    AC_CHECK_LIB([dl], [dlopen],
1886238106Sdes		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1887238106Sdes    lt_cv_dlopen="dyld"
1888238106Sdes    lt_cv_dlopen_libs=
1889238106Sdes    lt_cv_dlopen_self=yes
1890238106Sdes    ])
1891238106Sdes    ;;
1892238106Sdes
1893238106Sdes  *)
1894238106Sdes    AC_CHECK_FUNC([shl_load],
1895238106Sdes	  [lt_cv_dlopen="shl_load"],
1896238106Sdes      [AC_CHECK_LIB([dld], [shl_load],
1897238106Sdes	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1898238106Sdes	[AC_CHECK_FUNC([dlopen],
1899238106Sdes	      [lt_cv_dlopen="dlopen"],
1900238106Sdes	  [AC_CHECK_LIB([dl], [dlopen],
1901238106Sdes		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1902238106Sdes	    [AC_CHECK_LIB([svld], [dlopen],
1903238106Sdes		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1904238106Sdes	      [AC_CHECK_LIB([dld], [dld_link],
1905238106Sdes		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1906238106Sdes	      ])
1907238106Sdes	    ])
1908238106Sdes	  ])
1909238106Sdes	])
1910238106Sdes      ])
1911238106Sdes    ;;
1912238106Sdes  esac
1913238106Sdes
1914238106Sdes  if test "x$lt_cv_dlopen" != xno; then
1915238106Sdes    enable_dlopen=yes
1916238106Sdes  else
1917238106Sdes    enable_dlopen=no
1918238106Sdes  fi
1919238106Sdes
1920238106Sdes  case $lt_cv_dlopen in
1921238106Sdes  dlopen)
1922238106Sdes    save_CPPFLAGS="$CPPFLAGS"
1923238106Sdes    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1924238106Sdes
1925238106Sdes    save_LDFLAGS="$LDFLAGS"
1926238106Sdes    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1927238106Sdes
1928238106Sdes    save_LIBS="$LIBS"
1929238106Sdes    LIBS="$lt_cv_dlopen_libs $LIBS"
1930238106Sdes
1931238106Sdes    AC_CACHE_CHECK([whether a program can dlopen itself],
1932238106Sdes	  lt_cv_dlopen_self, [dnl
1933238106Sdes	  _LT_TRY_DLOPEN_SELF(
1934238106Sdes	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1935238106Sdes	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1936238106Sdes    ])
1937238106Sdes
1938238106Sdes    if test "x$lt_cv_dlopen_self" = xyes; then
1939238106Sdes      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1940238106Sdes      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1941238106Sdes	  lt_cv_dlopen_self_static, [dnl
1942238106Sdes	  _LT_TRY_DLOPEN_SELF(
1943238106Sdes	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1944238106Sdes	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1945238106Sdes      ])
1946238106Sdes    fi
1947238106Sdes
1948238106Sdes    CPPFLAGS="$save_CPPFLAGS"
1949238106Sdes    LDFLAGS="$save_LDFLAGS"
1950238106Sdes    LIBS="$save_LIBS"
1951238106Sdes    ;;
1952238106Sdes  esac
1953238106Sdes
1954238106Sdes  case $lt_cv_dlopen_self in
1955238106Sdes  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1956238106Sdes  *) enable_dlopen_self=unknown ;;
1957238106Sdes  esac
1958238106Sdes
1959238106Sdes  case $lt_cv_dlopen_self_static in
1960238106Sdes  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1961238106Sdes  *) enable_dlopen_self_static=unknown ;;
1962238106Sdes  esac
1963238106Sdesfi
1964238106Sdes_LT_DECL([dlopen_support], [enable_dlopen], [0],
1965238106Sdes	 [Whether dlopen is supported])
1966238106Sdes_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1967238106Sdes	 [Whether dlopen of programs is supported])
1968238106Sdes_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1969238106Sdes	 [Whether dlopen of statically linked programs is supported])
1970238106Sdes])# LT_SYS_DLOPEN_SELF
1971238106Sdes
1972238106Sdes# Old name:
1973238106SdesAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1974238106Sdesdnl aclocal-1.4 backwards compatibility:
1975238106Sdesdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1976238106Sdes
1977238106Sdes
1978238106Sdes# _LT_COMPILER_C_O([TAGNAME])
1979238106Sdes# ---------------------------
1980238106Sdes# Check to see if options -c and -o are simultaneously supported by compiler.
1981238106Sdes# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1982238106Sdesm4_defun([_LT_COMPILER_C_O],
1983238106Sdes[m4_require([_LT_DECL_SED])dnl
1984238106Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1985238106Sdesm4_require([_LT_TAG_COMPILER])dnl
1986238106SdesAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1987238106Sdes  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1988238106Sdes  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1989238106Sdes   $RM -r conftest 2>/dev/null
1990238106Sdes   mkdir conftest
1991238106Sdes   cd conftest
1992238106Sdes   mkdir out
1993238106Sdes   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1994238106Sdes
1995238106Sdes   lt_compiler_flag="-o out/conftest2.$ac_objext"
1996238106Sdes   # Insert the option either (1) after the last *FLAGS variable, or
1997238106Sdes   # (2) before a word containing "conftest.", or (3) at the end.
1998238106Sdes   # Note that $ac_compile itself does not contain backslashes and begins
1999238106Sdes   # with a dollar sign (not a hyphen), so the echo should work correctly.
2000238106Sdes   lt_compile=`echo "$ac_compile" | $SED \
2001238106Sdes   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2002238106Sdes   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2003238106Sdes   -e 's:$: $lt_compiler_flag:'`
2004238106Sdes   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2005238106Sdes   (eval "$lt_compile" 2>out/conftest.err)
2006238106Sdes   ac_status=$?
2007238106Sdes   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2008238106Sdes   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2009238106Sdes   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2010238106Sdes   then
2011238106Sdes     # The compiler can only warn and ignore the option if not recognized
2012238106Sdes     # So say no if there are warnings
2013238106Sdes     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2014238106Sdes     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2015238106Sdes     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2016238106Sdes       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2017238106Sdes     fi
2018238106Sdes   fi
2019238106Sdes   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2020238106Sdes   $RM conftest*
2021238106Sdes   # SGI C++ compiler will create directory out/ii_files/ for
2022238106Sdes   # template instantiation
2023238106Sdes   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2024238106Sdes   $RM out/* && rmdir out
2025238106Sdes   cd ..
2026238106Sdes   $RM -r conftest
2027238106Sdes   $RM conftest*
2028238106Sdes])
2029238106Sdes_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2030238106Sdes	[Does compiler simultaneously support -c and -o options?])
2031238106Sdes])# _LT_COMPILER_C_O
2032238106Sdes
2033238106Sdes
2034238106Sdes# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2035238106Sdes# ----------------------------------
2036238106Sdes# Check to see if we can do hard links to lock some files if needed
2037238106Sdesm4_defun([_LT_COMPILER_FILE_LOCKS],
2038238106Sdes[m4_require([_LT_ENABLE_LOCK])dnl
2039238106Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2040238106Sdes_LT_COMPILER_C_O([$1])
2041238106Sdes
2042238106Sdeshard_links="nottested"
2043238106Sdesif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2044238106Sdes  # do not overwrite the value of need_locks provided by the user
2045238106Sdes  AC_MSG_CHECKING([if we can lock with hard links])
2046238106Sdes  hard_links=yes
2047238106Sdes  $RM conftest*
2048238106Sdes  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2049238106Sdes  touch conftest.a
2050238106Sdes  ln conftest.a conftest.b 2>&5 || hard_links=no
2051238106Sdes  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2052238106Sdes  AC_MSG_RESULT([$hard_links])
2053238106Sdes  if test "$hard_links" = no; then
2054238106Sdes    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2055238106Sdes    need_locks=warn
2056238106Sdes  fi
2057238106Sdeselse
2058238106Sdes  need_locks=no
2059238106Sdesfi
2060238106Sdes_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2061238106Sdes])# _LT_COMPILER_FILE_LOCKS
2062238106Sdes
2063238106Sdes
2064238106Sdes# _LT_CHECK_OBJDIR
2065238106Sdes# ----------------
2066238106Sdesm4_defun([_LT_CHECK_OBJDIR],
2067238106Sdes[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2068238106Sdes[rm -f .libs 2>/dev/null
2069238106Sdesmkdir .libs 2>/dev/null
2070238106Sdesif test -d .libs; then
2071238106Sdes  lt_cv_objdir=.libs
2072238106Sdeselse
2073238106Sdes  # MS-DOS does not allow filenames that begin with a dot.
2074238106Sdes  lt_cv_objdir=_libs
2075238106Sdesfi
2076238106Sdesrmdir .libs 2>/dev/null])
2077238106Sdesobjdir=$lt_cv_objdir
2078238106Sdes_LT_DECL([], [objdir], [0],
2079238106Sdes         [The name of the directory that contains temporary libtool files])dnl
2080238106Sdesm4_pattern_allow([LT_OBJDIR])dnl
2081238106SdesAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2082238106Sdes  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2083238106Sdes])# _LT_CHECK_OBJDIR
2084238106Sdes
2085238106Sdes
2086238106Sdes# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2087238106Sdes# --------------------------------------
2088238106Sdes# Check hardcoding attributes.
2089238106Sdesm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2090238106Sdes[AC_MSG_CHECKING([how to hardcode library paths into programs])
2091238106Sdes_LT_TAGVAR(hardcode_action, $1)=
2092238106Sdesif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2093238106Sdes   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2094238106Sdes   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2095238106Sdes
2096238106Sdes  # We can hardcode non-existent directories.
2097238106Sdes  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2098238106Sdes     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2099238106Sdes     # have to relink, otherwise we might link with an installed library
2100238106Sdes     # when we should be linking with a yet-to-be-installed one
2101238106Sdes     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2102238106Sdes     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2103238106Sdes    # Linking always hardcodes the temporary library directory.
2104238106Sdes    _LT_TAGVAR(hardcode_action, $1)=relink
2105238106Sdes  else
2106238106Sdes    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2107238106Sdes    _LT_TAGVAR(hardcode_action, $1)=immediate
2108238106Sdes  fi
2109238106Sdeselse
2110238106Sdes  # We cannot hardcode anything, or else we can only hardcode existing
2111238106Sdes  # directories.
2112238106Sdes  _LT_TAGVAR(hardcode_action, $1)=unsupported
2113238106Sdesfi
2114238106SdesAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2115238106Sdes
2116238106Sdesif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2117238106Sdes   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2118238106Sdes  # Fast installation is not supported
2119238106Sdes  enable_fast_install=no
2120238106Sdeselif test "$shlibpath_overrides_runpath" = yes ||
2121238106Sdes     test "$enable_shared" = no; then
2122238106Sdes  # Fast installation is not necessary
2123238106Sdes  enable_fast_install=needless
2124238106Sdesfi
2125238106Sdes_LT_TAGDECL([], [hardcode_action], [0],
2126238106Sdes    [How to hardcode a shared library path into an executable])
2127238106Sdes])# _LT_LINKER_HARDCODE_LIBPATH
2128238106Sdes
2129238106Sdes
2130238106Sdes# _LT_CMD_STRIPLIB
2131238106Sdes# ----------------
2132238106Sdesm4_defun([_LT_CMD_STRIPLIB],
2133238106Sdes[m4_require([_LT_DECL_EGREP])
2134238106Sdesstriplib=
2135238106Sdesold_striplib=
2136238106SdesAC_MSG_CHECKING([whether stripping libraries is possible])
2137238106Sdesif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2138238106Sdes  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2139238106Sdes  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2140238106Sdes  AC_MSG_RESULT([yes])
2141238106Sdeselse
2142238106Sdes# FIXME - insert some real tests, host_os isn't really good enough
2143238106Sdes  case $host_os in
2144238106Sdes  darwin*)
2145238106Sdes    if test -n "$STRIP" ; then
2146238106Sdes      striplib="$STRIP -x"
2147238106Sdes      old_striplib="$STRIP -S"
2148238106Sdes      AC_MSG_RESULT([yes])
2149238106Sdes    else
2150238106Sdes      AC_MSG_RESULT([no])
2151238106Sdes    fi
2152238106Sdes    ;;
2153238106Sdes  *)
2154238106Sdes    AC_MSG_RESULT([no])
2155238106Sdes    ;;
2156238106Sdes  esac
2157238106Sdesfi
2158238106Sdes_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2159238106Sdes_LT_DECL([], [striplib], [1])
2160238106Sdes])# _LT_CMD_STRIPLIB
2161238106Sdes
2162238106Sdes
2163238106Sdes# _LT_SYS_DYNAMIC_LINKER([TAG])
2164238106Sdes# -----------------------------
2165238106Sdes# PORTME Fill in your ld.so characteristics
2166238106Sdesm4_defun([_LT_SYS_DYNAMIC_LINKER],
2167238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2168238106Sdesm4_require([_LT_DECL_EGREP])dnl
2169238106Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2170238106Sdesm4_require([_LT_DECL_OBJDUMP])dnl
2171238106Sdesm4_require([_LT_DECL_SED])dnl
2172238106Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2173238106SdesAC_MSG_CHECKING([dynamic linker characteristics])
2174238106Sdesm4_if([$1],
2175238106Sdes	[], [
2176238106Sdesif test "$GCC" = yes; then
2177238106Sdes  case $host_os in
2178238106Sdes    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2179238106Sdes    *) lt_awk_arg="/^libraries:/" ;;
2180238106Sdes  esac
2181238106Sdes  case $host_os in
2182238106Sdes    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2183238106Sdes    *) lt_sed_strip_eq="s,=/,/,g" ;;
2184238106Sdes  esac
2185238106Sdes  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2186238106Sdes  case $lt_search_path_spec in
2187238106Sdes  *\;*)
2188238106Sdes    # if the path contains ";" then we assume it to be the separator
2189238106Sdes    # otherwise default to the standard path separator (i.e. ":") - it is
2190238106Sdes    # assumed that no part of a normal pathname contains ";" but that should
2191238106Sdes    # okay in the real world where ";" in dirpaths is itself problematic.
2192238106Sdes    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2193238106Sdes    ;;
2194238106Sdes  *)
2195238106Sdes    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2196238106Sdes    ;;
2197238106Sdes  esac
2198238106Sdes  # Ok, now we have the path, separated by spaces, we can step through it
2199238106Sdes  # and add multilib dir if necessary.
2200238106Sdes  lt_tmp_lt_search_path_spec=
2201238106Sdes  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2202238106Sdes  for lt_sys_path in $lt_search_path_spec; do
2203238106Sdes    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2204238106Sdes      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2205238106Sdes    else
2206238106Sdes      test -d "$lt_sys_path" && \
2207238106Sdes	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2208238106Sdes    fi
2209238106Sdes  done
2210238106Sdes  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2211238106SdesBEGIN {RS=" "; FS="/|\n";} {
2212238106Sdes  lt_foo="";
2213238106Sdes  lt_count=0;
2214238106Sdes  for (lt_i = NF; lt_i > 0; lt_i--) {
2215238106Sdes    if ($lt_i != "" && $lt_i != ".") {
2216238106Sdes      if ($lt_i == "..") {
2217238106Sdes        lt_count++;
2218238106Sdes      } else {
2219238106Sdes        if (lt_count == 0) {
2220238106Sdes          lt_foo="/" $lt_i lt_foo;
2221238106Sdes        } else {
2222238106Sdes          lt_count--;
2223238106Sdes        }
2224238106Sdes      }
2225238106Sdes    }
2226238106Sdes  }
2227238106Sdes  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2228238106Sdes  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2229238106Sdes}'`
2230238106Sdes  # AWK program above erroneously prepends '/' to C:/dos/paths
2231238106Sdes  # for these hosts.
2232238106Sdes  case $host_os in
2233238106Sdes    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2234238106Sdes      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2235238106Sdes  esac
2236238106Sdes  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2237238106Sdeselse
2238238106Sdes  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2239238106Sdesfi])
2240238106Sdeslibrary_names_spec=
2241238106Sdeslibname_spec='lib$name'
2242238106Sdessoname_spec=
2243238106Sdesshrext_cmds=".so"
2244238106Sdespostinstall_cmds=
2245238106Sdespostuninstall_cmds=
2246238106Sdesfinish_cmds=
2247238106Sdesfinish_eval=
2248238106Sdesshlibpath_var=
2249238106Sdesshlibpath_overrides_runpath=unknown
2250238106Sdesversion_type=none
2251238106Sdesdynamic_linker="$host_os ld.so"
2252238106Sdessys_lib_dlsearch_path_spec="/lib /usr/lib"
2253238106Sdesneed_lib_prefix=unknown
2254238106Sdeshardcode_into_libs=no
2255238106Sdes
2256238106Sdes# when you set need_version to no, make sure it does not cause -set_version
2257238106Sdes# flags to be left without arguments
2258238106Sdesneed_version=unknown
2259238106Sdes
2260238106Sdescase $host_os in
2261238106Sdesaix3*)
2262249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2263238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2264238106Sdes  shlibpath_var=LIBPATH
2265238106Sdes
2266238106Sdes  # AIX 3 has no versioning support, so we append a major version to the name.
2267238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2268238106Sdes  ;;
2269238106Sdes
2270238106Sdesaix[[4-9]]*)
2271249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2272238106Sdes  need_lib_prefix=no
2273238106Sdes  need_version=no
2274238106Sdes  hardcode_into_libs=yes
2275238106Sdes  if test "$host_cpu" = ia64; then
2276238106Sdes    # AIX 5 supports IA64
2277238106Sdes    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2278238106Sdes    shlibpath_var=LD_LIBRARY_PATH
2279238106Sdes  else
2280238106Sdes    # With GCC up to 2.95.x, collect2 would create an import file
2281238106Sdes    # for dependence libraries.  The import file would start with
2282238106Sdes    # the line `#! .'.  This would cause the generated library to
2283238106Sdes    # depend on `.', always an invalid library.  This was fixed in
2284238106Sdes    # development snapshots of GCC prior to 3.0.
2285238106Sdes    case $host_os in
2286238106Sdes      aix4 | aix4.[[01]] | aix4.[[01]].*)
2287238106Sdes      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2288238106Sdes	   echo ' yes '
2289238106Sdes	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2290238106Sdes	:
2291238106Sdes      else
2292238106Sdes	can_build_shared=no
2293238106Sdes      fi
2294238106Sdes      ;;
2295238106Sdes    esac
2296238106Sdes    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2297238106Sdes    # soname into executable. Probably we can add versioning support to
2298238106Sdes    # collect2, so additional links can be useful in future.
2299238106Sdes    if test "$aix_use_runtimelinking" = yes; then
2300238106Sdes      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2301238106Sdes      # instead of lib<name>.a to let people know that these are not
2302238106Sdes      # typical AIX shared libraries.
2303238106Sdes      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2304238106Sdes    else
2305238106Sdes      # We preserve .a as extension for shared libraries through AIX4.2
2306238106Sdes      # and later when we are not doing run time linking.
2307238106Sdes      library_names_spec='${libname}${release}.a $libname.a'
2308238106Sdes      soname_spec='${libname}${release}${shared_ext}$major'
2309238106Sdes    fi
2310238106Sdes    shlibpath_var=LIBPATH
2311238106Sdes  fi
2312238106Sdes  ;;
2313238106Sdes
2314238106Sdesamigaos*)
2315238106Sdes  case $host_cpu in
2316238106Sdes  powerpc)
2317238106Sdes    # Since July 2007 AmigaOS4 officially supports .so libraries.
2318238106Sdes    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2319238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2320238106Sdes    ;;
2321238106Sdes  m68k)
2322238106Sdes    library_names_spec='$libname.ixlibrary $libname.a'
2323238106Sdes    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2324238106Sdes    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'
2325238106Sdes    ;;
2326238106Sdes  esac
2327238106Sdes  ;;
2328238106Sdes
2329238106Sdesbeos*)
2330238106Sdes  library_names_spec='${libname}${shared_ext}'
2331238106Sdes  dynamic_linker="$host_os ld.so"
2332238106Sdes  shlibpath_var=LIBRARY_PATH
2333238106Sdes  ;;
2334238106Sdes
2335238106Sdesbsdi[[45]]*)
2336249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2337238106Sdes  need_version=no
2338238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2339238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2340238106Sdes  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2341238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2342238106Sdes  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2343238106Sdes  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2344238106Sdes  # the default ld.so.conf also contains /usr/contrib/lib and
2345238106Sdes  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2346238106Sdes  # libtool to hard-code these into programs
2347238106Sdes  ;;
2348238106Sdes
2349238106Sdescygwin* | mingw* | pw32* | cegcc*)
2350238106Sdes  version_type=windows
2351238106Sdes  shrext_cmds=".dll"
2352238106Sdes  need_version=no
2353238106Sdes  need_lib_prefix=no
2354238106Sdes
2355238106Sdes  case $GCC,$cc_basename in
2356238106Sdes  yes,*)
2357238106Sdes    # gcc
2358238106Sdes    library_names_spec='$libname.dll.a'
2359238106Sdes    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2360238106Sdes    postinstall_cmds='base_file=`basename \${file}`~
2361238106Sdes      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2362238106Sdes      dldir=$destdir/`dirname \$dlpath`~
2363238106Sdes      test -d \$dldir || mkdir -p \$dldir~
2364238106Sdes      $install_prog $dir/$dlname \$dldir/$dlname~
2365238106Sdes      chmod a+x \$dldir/$dlname~
2366238106Sdes      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2367238106Sdes        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2368238106Sdes      fi'
2369238106Sdes    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2370238106Sdes      dlpath=$dir/\$dldll~
2371238106Sdes       $RM \$dlpath'
2372238106Sdes    shlibpath_overrides_runpath=yes
2373238106Sdes
2374238106Sdes    case $host_os in
2375238106Sdes    cygwin*)
2376238106Sdes      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2377238106Sdes      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2378238106Sdesm4_if([$1], [],[
2379238106Sdes      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2380238106Sdes      ;;
2381238106Sdes    mingw* | cegcc*)
2382238106Sdes      # MinGW DLLs use traditional 'lib' prefix
2383238106Sdes      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2384238106Sdes      ;;
2385238106Sdes    pw32*)
2386238106Sdes      # pw32 DLLs use 'pw' prefix rather than 'lib'
2387238106Sdes      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2388238106Sdes      ;;
2389238106Sdes    esac
2390238106Sdes    dynamic_linker='Win32 ld.exe'
2391238106Sdes    ;;
2392238106Sdes
2393238106Sdes  *,cl*)
2394238106Sdes    # Native MSVC
2395238106Sdes    libname_spec='$name'
2396238106Sdes    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2397238106Sdes    library_names_spec='${libname}.dll.lib'
2398238106Sdes
2399238106Sdes    case $build_os in
2400238106Sdes    mingw*)
2401238106Sdes      sys_lib_search_path_spec=
2402238106Sdes      lt_save_ifs=$IFS
2403238106Sdes      IFS=';'
2404238106Sdes      for lt_path in $LIB
2405238106Sdes      do
2406238106Sdes        IFS=$lt_save_ifs
2407238106Sdes        # Let DOS variable expansion print the short 8.3 style file name.
2408238106Sdes        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2409238106Sdes        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2410238106Sdes      done
2411238106Sdes      IFS=$lt_save_ifs
2412238106Sdes      # Convert to MSYS style.
2413238106Sdes      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2414238106Sdes      ;;
2415238106Sdes    cygwin*)
2416238106Sdes      # Convert to unix form, then to dos form, then back to unix form
2417238106Sdes      # but this time dos style (no spaces!) so that the unix form looks
2418238106Sdes      # like /cygdrive/c/PROGRA~1:/cygdr...
2419238106Sdes      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2420238106Sdes      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2421238106Sdes      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2422238106Sdes      ;;
2423238106Sdes    *)
2424238106Sdes      sys_lib_search_path_spec="$LIB"
2425238106Sdes      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2426238106Sdes        # It is most probably a Windows format PATH.
2427238106Sdes        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2428238106Sdes      else
2429238106Sdes        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2430238106Sdes      fi
2431238106Sdes      # FIXME: find the short name or the path components, as spaces are
2432238106Sdes      # common. (e.g. "Program Files" -> "PROGRA~1")
2433238106Sdes      ;;
2434238106Sdes    esac
2435238106Sdes
2436238106Sdes    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2437238106Sdes    postinstall_cmds='base_file=`basename \${file}`~
2438238106Sdes      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2439238106Sdes      dldir=$destdir/`dirname \$dlpath`~
2440238106Sdes      test -d \$dldir || mkdir -p \$dldir~
2441238106Sdes      $install_prog $dir/$dlname \$dldir/$dlname'
2442238106Sdes    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2443238106Sdes      dlpath=$dir/\$dldll~
2444238106Sdes       $RM \$dlpath'
2445238106Sdes    shlibpath_overrides_runpath=yes
2446238106Sdes    dynamic_linker='Win32 link.exe'
2447238106Sdes    ;;
2448238106Sdes
2449238106Sdes  *)
2450238106Sdes    # Assume MSVC wrapper
2451238106Sdes    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2452238106Sdes    dynamic_linker='Win32 ld.exe'
2453238106Sdes    ;;
2454238106Sdes  esac
2455238106Sdes  # FIXME: first we should search . and the directory the executable is in
2456238106Sdes  shlibpath_var=PATH
2457238106Sdes  ;;
2458238106Sdes
2459238106Sdesdarwin* | rhapsody*)
2460238106Sdes  dynamic_linker="$host_os dyld"
2461238106Sdes  version_type=darwin
2462238106Sdes  need_lib_prefix=no
2463238106Sdes  need_version=no
2464238106Sdes  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2465238106Sdes  soname_spec='${libname}${release}${major}$shared_ext'
2466238106Sdes  shlibpath_overrides_runpath=yes
2467238106Sdes  shlibpath_var=DYLD_LIBRARY_PATH
2468238106Sdes  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2469238106Sdesm4_if([$1], [],[
2470238106Sdes  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2471238106Sdes  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2472238106Sdes  ;;
2473238106Sdes
2474238106Sdesdgux*)
2475249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2476238106Sdes  need_lib_prefix=no
2477238106Sdes  need_version=no
2478238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2479238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2480238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2481238106Sdes  ;;
2482238106Sdes
2483238106Sdesfreebsd* | dragonfly*)
2484238106Sdes  # DragonFly does not have aout.  When/if they implement a new
2485238106Sdes  # versioning mechanism, adjust this.
2486238106Sdes  if test -x /usr/bin/objformat; then
2487238106Sdes    objformat=`/usr/bin/objformat`
2488238106Sdes  else
2489238106Sdes    case $host_os in
2490249141Sdes    freebsd[[23]].*) objformat=aout ;;
2491238106Sdes    *) objformat=elf ;;
2492238106Sdes    esac
2493238106Sdes  fi
2494238106Sdes  version_type=freebsd-$objformat
2495238106Sdes  case $version_type in
2496238106Sdes    freebsd-elf*)
2497238106Sdes      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2498238106Sdes      need_version=no
2499238106Sdes      need_lib_prefix=no
2500238106Sdes      ;;
2501238106Sdes    freebsd-*)
2502238106Sdes      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2503238106Sdes      need_version=yes
2504238106Sdes      ;;
2505238106Sdes  esac
2506238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2507238106Sdes  case $host_os in
2508249141Sdes  freebsd2.*)
2509238106Sdes    shlibpath_overrides_runpath=yes
2510238106Sdes    ;;
2511238106Sdes  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2512238106Sdes    shlibpath_overrides_runpath=yes
2513238106Sdes    hardcode_into_libs=yes
2514238106Sdes    ;;
2515238106Sdes  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2516238106Sdes  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2517238106Sdes    shlibpath_overrides_runpath=no
2518238106Sdes    hardcode_into_libs=yes
2519238106Sdes    ;;
2520238106Sdes  *) # from 4.6 on, and DragonFly
2521238106Sdes    shlibpath_overrides_runpath=yes
2522238106Sdes    hardcode_into_libs=yes
2523238106Sdes    ;;
2524238106Sdes  esac
2525238106Sdes  ;;
2526238106Sdes
2527238106Sdesgnu*)
2528249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2529238106Sdes  need_lib_prefix=no
2530238106Sdes  need_version=no
2531238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2532238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2533238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2534249141Sdes  shlibpath_overrides_runpath=no
2535238106Sdes  hardcode_into_libs=yes
2536238106Sdes  ;;
2537238106Sdes
2538238106Sdeshaiku*)
2539249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2540238106Sdes  need_lib_prefix=no
2541238106Sdes  need_version=no
2542238106Sdes  dynamic_linker="$host_os runtime_loader"
2543238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2544238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2545238106Sdes  shlibpath_var=LIBRARY_PATH
2546238106Sdes  shlibpath_overrides_runpath=yes
2547238106Sdes  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2548238106Sdes  hardcode_into_libs=yes
2549238106Sdes  ;;
2550238106Sdes
2551238106Sdeshpux9* | hpux10* | hpux11*)
2552238106Sdes  # Give a soname corresponding to the major version so that dld.sl refuses to
2553238106Sdes  # link against other versions.
2554238106Sdes  version_type=sunos
2555238106Sdes  need_lib_prefix=no
2556238106Sdes  need_version=no
2557238106Sdes  case $host_cpu in
2558238106Sdes  ia64*)
2559238106Sdes    shrext_cmds='.so'
2560238106Sdes    hardcode_into_libs=yes
2561238106Sdes    dynamic_linker="$host_os dld.so"
2562238106Sdes    shlibpath_var=LD_LIBRARY_PATH
2563238106Sdes    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2564238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2565238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
2566238106Sdes    if test "X$HPUX_IA64_MODE" = X32; then
2567238106Sdes      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2568238106Sdes    else
2569238106Sdes      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2570238106Sdes    fi
2571238106Sdes    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2572238106Sdes    ;;
2573238106Sdes  hppa*64*)
2574238106Sdes    shrext_cmds='.sl'
2575238106Sdes    hardcode_into_libs=yes
2576238106Sdes    dynamic_linker="$host_os dld.sl"
2577238106Sdes    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2578238106Sdes    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2579238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2580238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
2581238106Sdes    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2582238106Sdes    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2583238106Sdes    ;;
2584238106Sdes  *)
2585238106Sdes    shrext_cmds='.sl'
2586238106Sdes    dynamic_linker="$host_os dld.sl"
2587238106Sdes    shlibpath_var=SHLIB_PATH
2588238106Sdes    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2589238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2590238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
2591238106Sdes    ;;
2592238106Sdes  esac
2593238106Sdes  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2594238106Sdes  postinstall_cmds='chmod 555 $lib'
2595238106Sdes  # or fails outright, so override atomically:
2596238106Sdes  install_override_mode=555
2597238106Sdes  ;;
2598238106Sdes
2599238106Sdesinterix[[3-9]]*)
2600249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2601238106Sdes  need_lib_prefix=no
2602238106Sdes  need_version=no
2603238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2604238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2605238106Sdes  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2606238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2607238106Sdes  shlibpath_overrides_runpath=no
2608238106Sdes  hardcode_into_libs=yes
2609238106Sdes  ;;
2610238106Sdes
2611238106Sdesirix5* | irix6* | nonstopux*)
2612238106Sdes  case $host_os in
2613238106Sdes    nonstopux*) version_type=nonstopux ;;
2614238106Sdes    *)
2615238106Sdes	if test "$lt_cv_prog_gnu_ld" = yes; then
2616249141Sdes		version_type=linux # correct to gnu/linux during the next big refactor
2617238106Sdes	else
2618238106Sdes		version_type=irix
2619238106Sdes	fi ;;
2620238106Sdes  esac
2621238106Sdes  need_lib_prefix=no
2622238106Sdes  need_version=no
2623238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2624238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2625238106Sdes  case $host_os in
2626238106Sdes  irix5* | nonstopux*)
2627238106Sdes    libsuff= shlibsuff=
2628238106Sdes    ;;
2629238106Sdes  *)
2630238106Sdes    case $LD in # libtool.m4 will add one of these switches to LD
2631238106Sdes    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2632238106Sdes      libsuff= shlibsuff= libmagic=32-bit;;
2633238106Sdes    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2634238106Sdes      libsuff=32 shlibsuff=N32 libmagic=N32;;
2635238106Sdes    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2636238106Sdes      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2637238106Sdes    *) libsuff= shlibsuff= libmagic=never-match;;
2638238106Sdes    esac
2639238106Sdes    ;;
2640238106Sdes  esac
2641238106Sdes  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2642238106Sdes  shlibpath_overrides_runpath=no
2643238106Sdes  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2644238106Sdes  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2645238106Sdes  hardcode_into_libs=yes
2646238106Sdes  ;;
2647238106Sdes
2648238106Sdes# No shared lib support for Linux oldld, aout, or coff.
2649238106Sdeslinux*oldld* | linux*aout* | linux*coff*)
2650238106Sdes  dynamic_linker=no
2651238106Sdes  ;;
2652238106Sdes
2653249141Sdes# This must be glibc/ELF.
2654238106Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu)
2655249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2656238106Sdes  need_lib_prefix=no
2657238106Sdes  need_version=no
2658238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2659238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2660238106Sdes  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2661238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2662238106Sdes  shlibpath_overrides_runpath=no
2663238106Sdes
2664238106Sdes  # Some binutils ld are patched to set DT_RUNPATH
2665238106Sdes  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2666238106Sdes    [lt_cv_shlibpath_overrides_runpath=no
2667238106Sdes    save_LDFLAGS=$LDFLAGS
2668238106Sdes    save_libdir=$libdir
2669238106Sdes    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2670238106Sdes	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2671238106Sdes    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2672238106Sdes      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2673238106Sdes	 [lt_cv_shlibpath_overrides_runpath=yes])])
2674238106Sdes    LDFLAGS=$save_LDFLAGS
2675238106Sdes    libdir=$save_libdir
2676238106Sdes    ])
2677238106Sdes  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2678238106Sdes
2679238106Sdes  # This implies no fast_install, which is unacceptable.
2680238106Sdes  # Some rework will be needed to allow for fast_install
2681238106Sdes  # before this can be enabled.
2682238106Sdes  hardcode_into_libs=yes
2683238106Sdes
2684238106Sdes  # Add ABI-specific directories to the system library path.
2685238106Sdes  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2686238106Sdes
2687238106Sdes  # Append ld.so.conf contents to the search path
2688238106Sdes  if test -f /etc/ld.so.conf; then
2689238106Sdes    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' ' '`
2690238106Sdes    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2691238106Sdes
2692238106Sdes  fi
2693238106Sdes
2694238106Sdes  # We used to test for /lib/ld.so.1 and disable shared libraries on
2695238106Sdes  # powerpc, because MkLinux only supported shared libraries with the
2696238106Sdes  # GNU dynamic linker.  Since this was broken with cross compilers,
2697238106Sdes  # most powerpc-linux boxes support dynamic linking these days and
2698238106Sdes  # people can always --disable-shared, the test was removed, and we
2699238106Sdes  # assume the GNU/Linux dynamic linker is in use.
2700238106Sdes  dynamic_linker='GNU/Linux ld.so'
2701238106Sdes  ;;
2702238106Sdes
2703238106Sdesnetbsd*)
2704238106Sdes  version_type=sunos
2705238106Sdes  need_lib_prefix=no
2706238106Sdes  need_version=no
2707238106Sdes  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2708238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2709238106Sdes    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2710238106Sdes    dynamic_linker='NetBSD (a.out) ld.so'
2711238106Sdes  else
2712238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2713238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
2714238106Sdes    dynamic_linker='NetBSD ld.elf_so'
2715238106Sdes  fi
2716238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2717238106Sdes  shlibpath_overrides_runpath=yes
2718238106Sdes  hardcode_into_libs=yes
2719238106Sdes  ;;
2720238106Sdes
2721238106Sdesnewsos6)
2722249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2723238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2724238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2725238106Sdes  shlibpath_overrides_runpath=yes
2726238106Sdes  ;;
2727238106Sdes
2728238106Sdes*nto* | *qnx*)
2729238106Sdes  version_type=qnx
2730238106Sdes  need_lib_prefix=no
2731238106Sdes  need_version=no
2732238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2733238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2734238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2735238106Sdes  shlibpath_overrides_runpath=no
2736238106Sdes  hardcode_into_libs=yes
2737238106Sdes  dynamic_linker='ldqnx.so'
2738238106Sdes  ;;
2739238106Sdes
2740238106Sdesopenbsd*)
2741238106Sdes  version_type=sunos
2742238106Sdes  sys_lib_dlsearch_path_spec="/usr/lib"
2743238106Sdes  need_lib_prefix=no
2744238106Sdes  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2745238106Sdes  case $host_os in
2746238106Sdes    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2747238106Sdes    *)				need_version=no  ;;
2748238106Sdes  esac
2749238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2750238106Sdes  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2751238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2752238106Sdes  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2753238106Sdes    case $host_os in
2754238106Sdes      openbsd2.[[89]] | openbsd2.[[89]].*)
2755238106Sdes	shlibpath_overrides_runpath=no
2756238106Sdes	;;
2757238106Sdes      *)
2758238106Sdes	shlibpath_overrides_runpath=yes
2759238106Sdes	;;
2760238106Sdes      esac
2761238106Sdes  else
2762238106Sdes    shlibpath_overrides_runpath=yes
2763238106Sdes  fi
2764238106Sdes  ;;
2765238106Sdes
2766238106Sdesos2*)
2767238106Sdes  libname_spec='$name'
2768238106Sdes  shrext_cmds=".dll"
2769238106Sdes  need_lib_prefix=no
2770238106Sdes  library_names_spec='$libname${shared_ext} $libname.a'
2771238106Sdes  dynamic_linker='OS/2 ld.exe'
2772238106Sdes  shlibpath_var=LIBPATH
2773238106Sdes  ;;
2774238106Sdes
2775238106Sdesosf3* | osf4* | osf5*)
2776238106Sdes  version_type=osf
2777238106Sdes  need_lib_prefix=no
2778238106Sdes  need_version=no
2779238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2780238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2781238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2782238106Sdes  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2783238106Sdes  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2784238106Sdes  ;;
2785238106Sdes
2786238106Sdesrdos*)
2787238106Sdes  dynamic_linker=no
2788238106Sdes  ;;
2789238106Sdes
2790238106Sdessolaris*)
2791249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2792238106Sdes  need_lib_prefix=no
2793238106Sdes  need_version=no
2794238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2795238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2796238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2797238106Sdes  shlibpath_overrides_runpath=yes
2798238106Sdes  hardcode_into_libs=yes
2799238106Sdes  # ldd complains unless libraries are executable
2800238106Sdes  postinstall_cmds='chmod +x $lib'
2801238106Sdes  ;;
2802238106Sdes
2803238106Sdessunos4*)
2804238106Sdes  version_type=sunos
2805238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2806238106Sdes  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2807238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2808238106Sdes  shlibpath_overrides_runpath=yes
2809238106Sdes  if test "$with_gnu_ld" = yes; then
2810238106Sdes    need_lib_prefix=no
2811238106Sdes  fi
2812238106Sdes  need_version=yes
2813238106Sdes  ;;
2814238106Sdes
2815238106Sdessysv4 | sysv4.3*)
2816249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2817238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2818238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2819238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2820238106Sdes  case $host_vendor in
2821238106Sdes    sni)
2822238106Sdes      shlibpath_overrides_runpath=no
2823238106Sdes      need_lib_prefix=no
2824238106Sdes      runpath_var=LD_RUN_PATH
2825238106Sdes      ;;
2826238106Sdes    siemens)
2827238106Sdes      need_lib_prefix=no
2828238106Sdes      ;;
2829238106Sdes    motorola)
2830238106Sdes      need_lib_prefix=no
2831238106Sdes      need_version=no
2832238106Sdes      shlibpath_overrides_runpath=no
2833238106Sdes      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2834238106Sdes      ;;
2835238106Sdes  esac
2836238106Sdes  ;;
2837238106Sdes
2838238106Sdessysv4*MP*)
2839238106Sdes  if test -d /usr/nec ;then
2840249141Sdes    version_type=linux # correct to gnu/linux during the next big refactor
2841238106Sdes    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2842238106Sdes    soname_spec='$libname${shared_ext}.$major'
2843238106Sdes    shlibpath_var=LD_LIBRARY_PATH
2844238106Sdes  fi
2845238106Sdes  ;;
2846238106Sdes
2847238106Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2848238106Sdes  version_type=freebsd-elf
2849238106Sdes  need_lib_prefix=no
2850238106Sdes  need_version=no
2851238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2852238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2853238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2854238106Sdes  shlibpath_overrides_runpath=yes
2855238106Sdes  hardcode_into_libs=yes
2856238106Sdes  if test "$with_gnu_ld" = yes; then
2857238106Sdes    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2858238106Sdes  else
2859238106Sdes    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2860238106Sdes    case $host_os in
2861238106Sdes      sco3.2v5*)
2862238106Sdes        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2863238106Sdes	;;
2864238106Sdes    esac
2865238106Sdes  fi
2866238106Sdes  sys_lib_dlsearch_path_spec='/usr/lib'
2867238106Sdes  ;;
2868238106Sdes
2869238106Sdestpf*)
2870238106Sdes  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2871249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2872238106Sdes  need_lib_prefix=no
2873238106Sdes  need_version=no
2874238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2875238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2876238106Sdes  shlibpath_overrides_runpath=no
2877238106Sdes  hardcode_into_libs=yes
2878238106Sdes  ;;
2879238106Sdes
2880238106Sdesuts4*)
2881249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
2882238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2883238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
2884238106Sdes  shlibpath_var=LD_LIBRARY_PATH
2885238106Sdes  ;;
2886238106Sdes
2887238106Sdes*)
2888238106Sdes  dynamic_linker=no
2889238106Sdes  ;;
2890238106Sdesesac
2891238106SdesAC_MSG_RESULT([$dynamic_linker])
2892238106Sdestest "$dynamic_linker" = no && can_build_shared=no
2893238106Sdes
2894238106Sdesvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2895238106Sdesif test "$GCC" = yes; then
2896238106Sdes  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2897238106Sdesfi
2898238106Sdes
2899238106Sdesif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2900238106Sdes  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2901238106Sdesfi
2902238106Sdesif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2903238106Sdes  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2904238106Sdesfi
2905238106Sdes
2906238106Sdes_LT_DECL([], [variables_saved_for_relink], [1],
2907238106Sdes    [Variables whose values should be saved in libtool wrapper scripts and
2908238106Sdes    restored at link time])
2909238106Sdes_LT_DECL([], [need_lib_prefix], [0],
2910238106Sdes    [Do we need the "lib" prefix for modules?])
2911238106Sdes_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2912238106Sdes_LT_DECL([], [version_type], [0], [Library versioning type])
2913238106Sdes_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2914238106Sdes_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2915238106Sdes_LT_DECL([], [shlibpath_overrides_runpath], [0],
2916238106Sdes    [Is shlibpath searched before the hard-coded library search path?])
2917238106Sdes_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2918238106Sdes_LT_DECL([], [library_names_spec], [1],
2919238106Sdes    [[List of archive names.  First name is the real one, the rest are links.
2920238106Sdes    The last name is the one that the linker finds with -lNAME]])
2921238106Sdes_LT_DECL([], [soname_spec], [1],
2922238106Sdes    [[The coded name of the library, if different from the real name]])
2923238106Sdes_LT_DECL([], [install_override_mode], [1],
2924238106Sdes    [Permission mode override for installation of shared libraries])
2925238106Sdes_LT_DECL([], [postinstall_cmds], [2],
2926238106Sdes    [Command to use after installation of a shared archive])
2927238106Sdes_LT_DECL([], [postuninstall_cmds], [2],
2928238106Sdes    [Command to use after uninstallation of a shared archive])
2929238106Sdes_LT_DECL([], [finish_cmds], [2],
2930238106Sdes    [Commands used to finish a libtool library installation in a directory])
2931238106Sdes_LT_DECL([], [finish_eval], [1],
2932238106Sdes    [[As "finish_cmds", except a single script fragment to be evaled but
2933238106Sdes    not shown]])
2934238106Sdes_LT_DECL([], [hardcode_into_libs], [0],
2935238106Sdes    [Whether we should hardcode library paths into libraries])
2936238106Sdes_LT_DECL([], [sys_lib_search_path_spec], [2],
2937238106Sdes    [Compile-time system search path for libraries])
2938238106Sdes_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2939238106Sdes    [Run-time system search path for libraries])
2940238106Sdes])# _LT_SYS_DYNAMIC_LINKER
2941238106Sdes
2942238106Sdes
2943238106Sdes# _LT_PATH_TOOL_PREFIX(TOOL)
2944238106Sdes# --------------------------
2945238106Sdes# find a file program which can recognize shared library
2946238106SdesAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2947238106Sdes[m4_require([_LT_DECL_EGREP])dnl
2948238106SdesAC_MSG_CHECKING([for $1])
2949238106SdesAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2950238106Sdes[case $MAGIC_CMD in
2951238106Sdes[[\\/*] |  ?:[\\/]*])
2952238106Sdes  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2953238106Sdes  ;;
2954238106Sdes*)
2955238106Sdes  lt_save_MAGIC_CMD="$MAGIC_CMD"
2956238106Sdes  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2957238106Sdesdnl $ac_dummy forces splitting on constant user-supplied paths.
2958238106Sdesdnl POSIX.2 word splitting is done only on the output of word expansions,
2959238106Sdesdnl not every word.  This closes a longstanding sh security hole.
2960238106Sdes  ac_dummy="m4_if([$2], , $PATH, [$2])"
2961238106Sdes  for ac_dir in $ac_dummy; do
2962238106Sdes    IFS="$lt_save_ifs"
2963238106Sdes    test -z "$ac_dir" && ac_dir=.
2964238106Sdes    if test -f $ac_dir/$1; then
2965238106Sdes      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2966238106Sdes      if test -n "$file_magic_test_file"; then
2967238106Sdes	case $deplibs_check_method in
2968238106Sdes	"file_magic "*)
2969238106Sdes	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2970238106Sdes	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2971238106Sdes	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2972238106Sdes	    $EGREP "$file_magic_regex" > /dev/null; then
2973238106Sdes	    :
2974238106Sdes	  else
2975238106Sdes	    cat <<_LT_EOF 1>&2
2976238106Sdes
2977238106Sdes*** Warning: the command libtool uses to detect shared libraries,
2978238106Sdes*** $file_magic_cmd, produces output that libtool cannot recognize.
2979238106Sdes*** The result is that libtool may fail to recognize shared libraries
2980238106Sdes*** as such.  This will affect the creation of libtool libraries that
2981238106Sdes*** depend on shared libraries, but programs linked with such libtool
2982238106Sdes*** libraries will work regardless of this problem.  Nevertheless, you
2983238106Sdes*** may want to report the problem to your system manager and/or to
2984238106Sdes*** bug-libtool@gnu.org
2985238106Sdes
2986238106Sdes_LT_EOF
2987238106Sdes	  fi ;;
2988238106Sdes	esac
2989238106Sdes      fi
2990238106Sdes      break
2991238106Sdes    fi
2992238106Sdes  done
2993238106Sdes  IFS="$lt_save_ifs"
2994238106Sdes  MAGIC_CMD="$lt_save_MAGIC_CMD"
2995238106Sdes  ;;
2996238106Sdesesac])
2997238106SdesMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2998238106Sdesif test -n "$MAGIC_CMD"; then
2999238106Sdes  AC_MSG_RESULT($MAGIC_CMD)
3000238106Sdeselse
3001238106Sdes  AC_MSG_RESULT(no)
3002238106Sdesfi
3003238106Sdes_LT_DECL([], [MAGIC_CMD], [0],
3004238106Sdes	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3005238106Sdes])# _LT_PATH_TOOL_PREFIX
3006238106Sdes
3007238106Sdes# Old name:
3008238106SdesAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3009238106Sdesdnl aclocal-1.4 backwards compatibility:
3010238106Sdesdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3011238106Sdes
3012238106Sdes
3013238106Sdes# _LT_PATH_MAGIC
3014238106Sdes# --------------
3015238106Sdes# find a file program which can recognize a shared library
3016238106Sdesm4_defun([_LT_PATH_MAGIC],
3017238106Sdes[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3018238106Sdesif test -z "$lt_cv_path_MAGIC_CMD"; then
3019238106Sdes  if test -n "$ac_tool_prefix"; then
3020238106Sdes    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3021238106Sdes  else
3022238106Sdes    MAGIC_CMD=:
3023238106Sdes  fi
3024238106Sdesfi
3025238106Sdes])# _LT_PATH_MAGIC
3026238106Sdes
3027238106Sdes
3028238106Sdes# LT_PATH_LD
3029238106Sdes# ----------
3030238106Sdes# find the pathname to the GNU or non-GNU linker
3031238106SdesAC_DEFUN([LT_PATH_LD],
3032238106Sdes[AC_REQUIRE([AC_PROG_CC])dnl
3033238106SdesAC_REQUIRE([AC_CANONICAL_HOST])dnl
3034238106SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3035238106Sdesm4_require([_LT_DECL_SED])dnl
3036238106Sdesm4_require([_LT_DECL_EGREP])dnl
3037238106Sdesm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3038238106Sdes
3039238106SdesAC_ARG_WITH([gnu-ld],
3040238106Sdes    [AS_HELP_STRING([--with-gnu-ld],
3041238106Sdes	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3042238106Sdes    [test "$withval" = no || with_gnu_ld=yes],
3043238106Sdes    [with_gnu_ld=no])dnl
3044238106Sdes
3045238106Sdesac_prog=ld
3046238106Sdesif test "$GCC" = yes; then
3047238106Sdes  # Check if gcc -print-prog-name=ld gives a path.
3048238106Sdes  AC_MSG_CHECKING([for ld used by $CC])
3049238106Sdes  case $host in
3050238106Sdes  *-*-mingw*)
3051238106Sdes    # gcc leaves a trailing carriage return which upsets mingw
3052238106Sdes    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3053238106Sdes  *)
3054238106Sdes    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3055238106Sdes  esac
3056238106Sdes  case $ac_prog in
3057238106Sdes    # Accept absolute paths.
3058238106Sdes    [[\\/]]* | ?:[[\\/]]*)
3059238106Sdes      re_direlt='/[[^/]][[^/]]*/\.\./'
3060238106Sdes      # Canonicalize the pathname of ld
3061238106Sdes      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3062238106Sdes      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3063238106Sdes	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3064238106Sdes      done
3065238106Sdes      test -z "$LD" && LD="$ac_prog"
3066238106Sdes      ;;
3067238106Sdes  "")
3068238106Sdes    # If it fails, then pretend we aren't using GCC.
3069238106Sdes    ac_prog=ld
3070238106Sdes    ;;
3071238106Sdes  *)
3072238106Sdes    # If it is relative, then search for the first ld in PATH.
3073238106Sdes    with_gnu_ld=unknown
3074238106Sdes    ;;
3075238106Sdes  esac
3076238106Sdeselif test "$with_gnu_ld" = yes; then
3077238106Sdes  AC_MSG_CHECKING([for GNU ld])
3078238106Sdeselse
3079238106Sdes  AC_MSG_CHECKING([for non-GNU ld])
3080238106Sdesfi
3081238106SdesAC_CACHE_VAL(lt_cv_path_LD,
3082238106Sdes[if test -z "$LD"; then
3083238106Sdes  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3084238106Sdes  for ac_dir in $PATH; do
3085238106Sdes    IFS="$lt_save_ifs"
3086238106Sdes    test -z "$ac_dir" && ac_dir=.
3087238106Sdes    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3088238106Sdes      lt_cv_path_LD="$ac_dir/$ac_prog"
3089238106Sdes      # Check to see if the program is GNU ld.  I'd rather use --version,
3090238106Sdes      # but apparently some variants of GNU ld only accept -v.
3091238106Sdes      # Break only if it was the GNU/non-GNU ld that we prefer.
3092238106Sdes      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3093238106Sdes      *GNU* | *'with BFD'*)
3094238106Sdes	test "$with_gnu_ld" != no && break
3095238106Sdes	;;
3096238106Sdes      *)
3097238106Sdes	test "$with_gnu_ld" != yes && break
3098238106Sdes	;;
3099238106Sdes      esac
3100238106Sdes    fi
3101238106Sdes  done
3102238106Sdes  IFS="$lt_save_ifs"
3103238106Sdeselse
3104238106Sdes  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3105238106Sdesfi])
3106238106SdesLD="$lt_cv_path_LD"
3107238106Sdesif test -n "$LD"; then
3108238106Sdes  AC_MSG_RESULT($LD)
3109238106Sdeselse
3110238106Sdes  AC_MSG_RESULT(no)
3111238106Sdesfi
3112238106Sdestest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3113238106Sdes_LT_PATH_LD_GNU
3114238106SdesAC_SUBST([LD])
3115238106Sdes
3116238106Sdes_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3117238106Sdes])# LT_PATH_LD
3118238106Sdes
3119238106Sdes# Old names:
3120238106SdesAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3121238106SdesAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3122238106Sdesdnl aclocal-1.4 backwards compatibility:
3123238106Sdesdnl AC_DEFUN([AM_PROG_LD], [])
3124238106Sdesdnl AC_DEFUN([AC_PROG_LD], [])
3125238106Sdes
3126238106Sdes
3127238106Sdes# _LT_PATH_LD_GNU
3128238106Sdes#- --------------
3129238106Sdesm4_defun([_LT_PATH_LD_GNU],
3130238106Sdes[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3131238106Sdes[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3132238106Sdescase `$LD -v 2>&1 </dev/null` in
3133238106Sdes*GNU* | *'with BFD'*)
3134238106Sdes  lt_cv_prog_gnu_ld=yes
3135238106Sdes  ;;
3136238106Sdes*)
3137238106Sdes  lt_cv_prog_gnu_ld=no
3138238106Sdes  ;;
3139238106Sdesesac])
3140238106Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld
3141238106Sdes])# _LT_PATH_LD_GNU
3142238106Sdes
3143238106Sdes
3144238106Sdes# _LT_CMD_RELOAD
3145238106Sdes# --------------
3146238106Sdes# find reload flag for linker
3147238106Sdes#   -- PORTME Some linkers may need a different reload flag.
3148238106Sdesm4_defun([_LT_CMD_RELOAD],
3149238106Sdes[AC_CACHE_CHECK([for $LD option to reload object files],
3150238106Sdes  lt_cv_ld_reload_flag,
3151238106Sdes  [lt_cv_ld_reload_flag='-r'])
3152238106Sdesreload_flag=$lt_cv_ld_reload_flag
3153238106Sdescase $reload_flag in
3154238106Sdes"" | " "*) ;;
3155238106Sdes*) reload_flag=" $reload_flag" ;;
3156238106Sdesesac
3157238106Sdesreload_cmds='$LD$reload_flag -o $output$reload_objs'
3158238106Sdescase $host_os in
3159238106Sdes  cygwin* | mingw* | pw32* | cegcc*)
3160238106Sdes    if test "$GCC" != yes; then
3161238106Sdes      reload_cmds=false
3162238106Sdes    fi
3163238106Sdes    ;;
3164238106Sdes  darwin*)
3165238106Sdes    if test "$GCC" = yes; then
3166238106Sdes      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3167238106Sdes    else
3168238106Sdes      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3169238106Sdes    fi
3170238106Sdes    ;;
3171238106Sdesesac
3172238106Sdes_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3173238106Sdes_LT_TAGDECL([], [reload_cmds], [2])dnl
3174238106Sdes])# _LT_CMD_RELOAD
3175238106Sdes
3176238106Sdes
3177238106Sdes# _LT_CHECK_MAGIC_METHOD
3178238106Sdes# ----------------------
3179238106Sdes# how to check for library dependencies
3180238106Sdes#  -- PORTME fill in with the dynamic library characteristics
3181238106Sdesm4_defun([_LT_CHECK_MAGIC_METHOD],
3182238106Sdes[m4_require([_LT_DECL_EGREP])
3183238106Sdesm4_require([_LT_DECL_OBJDUMP])
3184238106SdesAC_CACHE_CHECK([how to recognize dependent libraries],
3185238106Sdeslt_cv_deplibs_check_method,
3186238106Sdes[lt_cv_file_magic_cmd='$MAGIC_CMD'
3187238106Sdeslt_cv_file_magic_test_file=
3188238106Sdeslt_cv_deplibs_check_method='unknown'
3189238106Sdes# Need to set the preceding variable on all platforms that support
3190238106Sdes# interlibrary dependencies.
3191238106Sdes# 'none' -- dependencies not supported.
3192238106Sdes# `unknown' -- same as none, but documents that we really don't know.
3193238106Sdes# 'pass_all' -- all dependencies passed with no checks.
3194238106Sdes# 'test_compile' -- check by making test program.
3195238106Sdes# 'file_magic [[regex]]' -- check by looking for files in library path
3196238106Sdes# which responds to the $file_magic_cmd with a given extended regex.
3197238106Sdes# If you have `file' or equivalent on your system and you're not sure
3198238106Sdes# whether `pass_all' will *always* work, you probably want this one.
3199238106Sdes
3200238106Sdescase $host_os in
3201238106Sdesaix[[4-9]]*)
3202238106Sdes  lt_cv_deplibs_check_method=pass_all
3203238106Sdes  ;;
3204238106Sdes
3205238106Sdesbeos*)
3206238106Sdes  lt_cv_deplibs_check_method=pass_all
3207238106Sdes  ;;
3208238106Sdes
3209238106Sdesbsdi[[45]]*)
3210238106Sdes  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3211238106Sdes  lt_cv_file_magic_cmd='/usr/bin/file -L'
3212238106Sdes  lt_cv_file_magic_test_file=/shlib/libc.so
3213238106Sdes  ;;
3214238106Sdes
3215238106Sdescygwin*)
3216238106Sdes  # func_win32_libid is a shell function defined in ltmain.sh
3217238106Sdes  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3218238106Sdes  lt_cv_file_magic_cmd='func_win32_libid'
3219238106Sdes  ;;
3220238106Sdes
3221238106Sdesmingw* | pw32*)
3222238106Sdes  # Base MSYS/MinGW do not provide the 'file' command needed by
3223238106Sdes  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3224238106Sdes  # unless we find 'file', for example because we are cross-compiling.
3225238106Sdes  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3226238106Sdes  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3227238106Sdes    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3228238106Sdes    lt_cv_file_magic_cmd='func_win32_libid'
3229238106Sdes  else
3230238106Sdes    # Keep this pattern in sync with the one in func_win32_libid.
3231238106Sdes    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3232238106Sdes    lt_cv_file_magic_cmd='$OBJDUMP -f'
3233238106Sdes  fi
3234238106Sdes  ;;
3235238106Sdes
3236238106Sdescegcc*)
3237238106Sdes  # use the weaker test based on 'objdump'. See mingw*.
3238238106Sdes  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3239238106Sdes  lt_cv_file_magic_cmd='$OBJDUMP -f'
3240238106Sdes  ;;
3241238106Sdes
3242238106Sdesdarwin* | rhapsody*)
3243238106Sdes  lt_cv_deplibs_check_method=pass_all
3244238106Sdes  ;;
3245238106Sdes
3246238106Sdesfreebsd* | dragonfly*)
3247238106Sdes  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3248238106Sdes    case $host_cpu in
3249238106Sdes    i*86 )
3250238106Sdes      # Not sure whether the presence of OpenBSD here was a mistake.
3251238106Sdes      # Let's accept both of them until this is cleared up.
3252238106Sdes      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3253238106Sdes      lt_cv_file_magic_cmd=/usr/bin/file
3254238106Sdes      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3255238106Sdes      ;;
3256238106Sdes    esac
3257238106Sdes  else
3258238106Sdes    lt_cv_deplibs_check_method=pass_all
3259238106Sdes  fi
3260238106Sdes  ;;
3261238106Sdes
3262238106Sdesgnu*)
3263238106Sdes  lt_cv_deplibs_check_method=pass_all
3264238106Sdes  ;;
3265238106Sdes
3266238106Sdeshaiku*)
3267238106Sdes  lt_cv_deplibs_check_method=pass_all
3268238106Sdes  ;;
3269238106Sdes
3270238106Sdeshpux10.20* | hpux11*)
3271238106Sdes  lt_cv_file_magic_cmd=/usr/bin/file
3272238106Sdes  case $host_cpu in
3273238106Sdes  ia64*)
3274238106Sdes    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3275238106Sdes    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3276238106Sdes    ;;
3277238106Sdes  hppa*64*)
3278238106Sdes    [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]']
3279238106Sdes    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3280238106Sdes    ;;
3281238106Sdes  *)
3282238106Sdes    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3283238106Sdes    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3284238106Sdes    ;;
3285238106Sdes  esac
3286238106Sdes  ;;
3287238106Sdes
3288238106Sdesinterix[[3-9]]*)
3289238106Sdes  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3290238106Sdes  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3291238106Sdes  ;;
3292238106Sdes
3293238106Sdesirix5* | irix6* | nonstopux*)
3294238106Sdes  case $LD in
3295238106Sdes  *-32|*"-32 ") libmagic=32-bit;;
3296238106Sdes  *-n32|*"-n32 ") libmagic=N32;;
3297238106Sdes  *-64|*"-64 ") libmagic=64-bit;;
3298238106Sdes  *) libmagic=never-match;;
3299238106Sdes  esac
3300238106Sdes  lt_cv_deplibs_check_method=pass_all
3301238106Sdes  ;;
3302238106Sdes
3303249141Sdes# This must be glibc/ELF.
3304238106Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu)
3305238106Sdes  lt_cv_deplibs_check_method=pass_all
3306238106Sdes  ;;
3307238106Sdes
3308238106Sdesnetbsd*)
3309238106Sdes  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3310238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3311238106Sdes  else
3312238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3313238106Sdes  fi
3314238106Sdes  ;;
3315238106Sdes
3316238106Sdesnewos6*)
3317238106Sdes  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3318238106Sdes  lt_cv_file_magic_cmd=/usr/bin/file
3319238106Sdes  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3320238106Sdes  ;;
3321238106Sdes
3322238106Sdes*nto* | *qnx*)
3323238106Sdes  lt_cv_deplibs_check_method=pass_all
3324238106Sdes  ;;
3325238106Sdes
3326238106Sdesopenbsd*)
3327238106Sdes  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3328238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3329238106Sdes  else
3330238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3331238106Sdes  fi
3332238106Sdes  ;;
3333238106Sdes
3334238106Sdesosf3* | osf4* | osf5*)
3335238106Sdes  lt_cv_deplibs_check_method=pass_all
3336238106Sdes  ;;
3337238106Sdes
3338238106Sdesrdos*)
3339238106Sdes  lt_cv_deplibs_check_method=pass_all
3340238106Sdes  ;;
3341238106Sdes
3342238106Sdessolaris*)
3343238106Sdes  lt_cv_deplibs_check_method=pass_all
3344238106Sdes  ;;
3345238106Sdes
3346238106Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3347238106Sdes  lt_cv_deplibs_check_method=pass_all
3348238106Sdes  ;;
3349238106Sdes
3350238106Sdessysv4 | sysv4.3*)
3351238106Sdes  case $host_vendor in
3352238106Sdes  motorola)
3353238106Sdes    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]]'
3354238106Sdes    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3355238106Sdes    ;;
3356238106Sdes  ncr)
3357238106Sdes    lt_cv_deplibs_check_method=pass_all
3358238106Sdes    ;;
3359238106Sdes  sequent)
3360238106Sdes    lt_cv_file_magic_cmd='/bin/file'
3361238106Sdes    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3362238106Sdes    ;;
3363238106Sdes  sni)
3364238106Sdes    lt_cv_file_magic_cmd='/bin/file'
3365238106Sdes    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3366238106Sdes    lt_cv_file_magic_test_file=/lib/libc.so
3367238106Sdes    ;;
3368238106Sdes  siemens)
3369238106Sdes    lt_cv_deplibs_check_method=pass_all
3370238106Sdes    ;;
3371238106Sdes  pc)
3372238106Sdes    lt_cv_deplibs_check_method=pass_all
3373238106Sdes    ;;
3374238106Sdes  esac
3375238106Sdes  ;;
3376238106Sdes
3377238106Sdestpf*)
3378238106Sdes  lt_cv_deplibs_check_method=pass_all
3379238106Sdes  ;;
3380238106Sdesesac
3381238106Sdes])
3382238106Sdes
3383238106Sdesfile_magic_glob=
3384238106Sdeswant_nocaseglob=no
3385238106Sdesif test "$build" = "$host"; then
3386238106Sdes  case $host_os in
3387238106Sdes  mingw* | pw32*)
3388238106Sdes    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3389238106Sdes      want_nocaseglob=yes
3390238106Sdes    else
3391238106Sdes      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3392238106Sdes    fi
3393238106Sdes    ;;
3394238106Sdes  esac
3395238106Sdesfi
3396238106Sdes
3397238106Sdesfile_magic_cmd=$lt_cv_file_magic_cmd
3398238106Sdesdeplibs_check_method=$lt_cv_deplibs_check_method
3399238106Sdestest -z "$deplibs_check_method" && deplibs_check_method=unknown
3400238106Sdes
3401238106Sdes_LT_DECL([], [deplibs_check_method], [1],
3402238106Sdes    [Method to check whether dependent libraries are shared objects])
3403238106Sdes_LT_DECL([], [file_magic_cmd], [1],
3404238106Sdes    [Command to use when deplibs_check_method = "file_magic"])
3405238106Sdes_LT_DECL([], [file_magic_glob], [1],
3406238106Sdes    [How to find potential files when deplibs_check_method = "file_magic"])
3407238106Sdes_LT_DECL([], [want_nocaseglob], [1],
3408238106Sdes    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3409238106Sdes])# _LT_CHECK_MAGIC_METHOD
3410238106Sdes
3411238106Sdes
3412238106Sdes# LT_PATH_NM
3413238106Sdes# ----------
3414238106Sdes# find the pathname to a BSD- or MS-compatible name lister
3415238106SdesAC_DEFUN([LT_PATH_NM],
3416238106Sdes[AC_REQUIRE([AC_PROG_CC])dnl
3417238106SdesAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3418238106Sdes[if test -n "$NM"; then
3419238106Sdes  # Let the user override the test.
3420238106Sdes  lt_cv_path_NM="$NM"
3421238106Sdeselse
3422238106Sdes  lt_nm_to_check="${ac_tool_prefix}nm"
3423238106Sdes  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3424238106Sdes    lt_nm_to_check="$lt_nm_to_check nm"
3425238106Sdes  fi
3426238106Sdes  for lt_tmp_nm in $lt_nm_to_check; do
3427238106Sdes    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3428238106Sdes    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3429238106Sdes      IFS="$lt_save_ifs"
3430238106Sdes      test -z "$ac_dir" && ac_dir=.
3431238106Sdes      tmp_nm="$ac_dir/$lt_tmp_nm"
3432238106Sdes      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3433238106Sdes	# Check to see if the nm accepts a BSD-compat flag.
3434238106Sdes	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3435238106Sdes	#   nm: unknown option "B" ignored
3436238106Sdes	# Tru64's nm complains that /dev/null is an invalid object file
3437238106Sdes	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3438238106Sdes	*/dev/null* | *'Invalid file or object type'*)
3439238106Sdes	  lt_cv_path_NM="$tmp_nm -B"
3440238106Sdes	  break
3441238106Sdes	  ;;
3442238106Sdes	*)
3443238106Sdes	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3444238106Sdes	  */dev/null*)
3445238106Sdes	    lt_cv_path_NM="$tmp_nm -p"
3446238106Sdes	    break
3447238106Sdes	    ;;
3448238106Sdes	  *)
3449238106Sdes	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3450238106Sdes	    continue # so that we can try to find one that supports BSD flags
3451238106Sdes	    ;;
3452238106Sdes	  esac
3453238106Sdes	  ;;
3454238106Sdes	esac
3455238106Sdes      fi
3456238106Sdes    done
3457238106Sdes    IFS="$lt_save_ifs"
3458238106Sdes  done
3459238106Sdes  : ${lt_cv_path_NM=no}
3460238106Sdesfi])
3461238106Sdesif test "$lt_cv_path_NM" != "no"; then
3462238106Sdes  NM="$lt_cv_path_NM"
3463238106Sdeselse
3464238106Sdes  # Didn't find any BSD compatible name lister, look for dumpbin.
3465238106Sdes  if test -n "$DUMPBIN"; then :
3466238106Sdes    # Let the user override the test.
3467238106Sdes  else
3468238106Sdes    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3469238106Sdes    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3470238106Sdes    *COFF*)
3471238106Sdes      DUMPBIN="$DUMPBIN -symbols"
3472238106Sdes      ;;
3473238106Sdes    *)
3474238106Sdes      DUMPBIN=:
3475238106Sdes      ;;
3476238106Sdes    esac
3477238106Sdes  fi
3478238106Sdes  AC_SUBST([DUMPBIN])
3479238106Sdes  if test "$DUMPBIN" != ":"; then
3480238106Sdes    NM="$DUMPBIN"
3481238106Sdes  fi
3482238106Sdesfi
3483238106Sdestest -z "$NM" && NM=nm
3484238106SdesAC_SUBST([NM])
3485238106Sdes_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3486238106Sdes
3487238106SdesAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3488238106Sdes  [lt_cv_nm_interface="BSD nm"
3489238106Sdes  echo "int some_variable = 0;" > conftest.$ac_ext
3490238106Sdes  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3491238106Sdes  (eval "$ac_compile" 2>conftest.err)
3492238106Sdes  cat conftest.err >&AS_MESSAGE_LOG_FD
3493238106Sdes  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3494238106Sdes  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3495238106Sdes  cat conftest.err >&AS_MESSAGE_LOG_FD
3496238106Sdes  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3497238106Sdes  cat conftest.out >&AS_MESSAGE_LOG_FD
3498238106Sdes  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3499238106Sdes    lt_cv_nm_interface="MS dumpbin"
3500238106Sdes  fi
3501238106Sdes  rm -f conftest*])
3502238106Sdes])# LT_PATH_NM
3503238106Sdes
3504238106Sdes# Old names:
3505238106SdesAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3506238106SdesAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3507238106Sdesdnl aclocal-1.4 backwards compatibility:
3508238106Sdesdnl AC_DEFUN([AM_PROG_NM], [])
3509238106Sdesdnl AC_DEFUN([AC_PROG_NM], [])
3510238106Sdes
3511238106Sdes# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3512238106Sdes# --------------------------------
3513238106Sdes# how to determine the name of the shared library
3514238106Sdes# associated with a specific link library.
3515238106Sdes#  -- PORTME fill in with the dynamic library characteristics
3516238106Sdesm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3517238106Sdes[m4_require([_LT_DECL_EGREP])
3518238106Sdesm4_require([_LT_DECL_OBJDUMP])
3519238106Sdesm4_require([_LT_DECL_DLLTOOL])
3520238106SdesAC_CACHE_CHECK([how to associate runtime and link libraries],
3521238106Sdeslt_cv_sharedlib_from_linklib_cmd,
3522238106Sdes[lt_cv_sharedlib_from_linklib_cmd='unknown'
3523238106Sdes
3524238106Sdescase $host_os in
3525238106Sdescygwin* | mingw* | pw32* | cegcc*)
3526238106Sdes  # two different shell functions defined in ltmain.sh
3527238106Sdes  # decide which to use based on capabilities of $DLLTOOL
3528238106Sdes  case `$DLLTOOL --help 2>&1` in
3529238106Sdes  *--identify-strict*)
3530238106Sdes    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3531238106Sdes    ;;
3532238106Sdes  *)
3533238106Sdes    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3534238106Sdes    ;;
3535238106Sdes  esac
3536238106Sdes  ;;
3537238106Sdes*)
3538238106Sdes  # fallback: assume linklib IS sharedlib
3539238106Sdes  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3540238106Sdes  ;;
3541238106Sdesesac
3542238106Sdes])
3543238106Sdessharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3544238106Sdestest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3545238106Sdes
3546238106Sdes_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3547238106Sdes    [Command to associate shared and link libraries])
3548238106Sdes])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3549238106Sdes
3550238106Sdes
3551238106Sdes# _LT_PATH_MANIFEST_TOOL
3552238106Sdes# ----------------------
3553238106Sdes# locate the manifest tool
3554238106Sdesm4_defun([_LT_PATH_MANIFEST_TOOL],
3555238106Sdes[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3556238106Sdestest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3557238106SdesAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3558238106Sdes  [lt_cv_path_mainfest_tool=no
3559238106Sdes  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3560238106Sdes  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3561238106Sdes  cat conftest.err >&AS_MESSAGE_LOG_FD
3562238106Sdes  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3563238106Sdes    lt_cv_path_mainfest_tool=yes
3564238106Sdes  fi
3565238106Sdes  rm -f conftest*])
3566238106Sdesif test "x$lt_cv_path_mainfest_tool" != xyes; then
3567238106Sdes  MANIFEST_TOOL=:
3568238106Sdesfi
3569238106Sdes_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3570238106Sdes])# _LT_PATH_MANIFEST_TOOL
3571238106Sdes
3572238106Sdes
3573238106Sdes# LT_LIB_M
3574238106Sdes# --------
3575238106Sdes# check for math library
3576238106SdesAC_DEFUN([LT_LIB_M],
3577238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3578238106SdesLIBM=
3579238106Sdescase $host in
3580238106Sdes*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3581238106Sdes  # These system don't have libm, or don't need it
3582238106Sdes  ;;
3583238106Sdes*-ncr-sysv4.3*)
3584238106Sdes  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3585238106Sdes  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3586238106Sdes  ;;
3587238106Sdes*)
3588238106Sdes  AC_CHECK_LIB(m, cos, LIBM="-lm")
3589238106Sdes  ;;
3590238106Sdesesac
3591238106SdesAC_SUBST([LIBM])
3592238106Sdes])# LT_LIB_M
3593238106Sdes
3594238106Sdes# Old name:
3595238106SdesAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3596238106Sdesdnl aclocal-1.4 backwards compatibility:
3597238106Sdesdnl AC_DEFUN([AC_CHECK_LIBM], [])
3598238106Sdes
3599238106Sdes
3600238106Sdes# _LT_COMPILER_NO_RTTI([TAGNAME])
3601238106Sdes# -------------------------------
3602238106Sdesm4_defun([_LT_COMPILER_NO_RTTI],
3603238106Sdes[m4_require([_LT_TAG_COMPILER])dnl
3604238106Sdes
3605238106Sdes_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3606238106Sdes
3607238106Sdesif test "$GCC" = yes; then
3608238106Sdes  case $cc_basename in
3609238106Sdes  nvcc*)
3610238106Sdes    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3611238106Sdes  *)
3612238106Sdes    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3613238106Sdes  esac
3614238106Sdes
3615238106Sdes  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3616238106Sdes    lt_cv_prog_compiler_rtti_exceptions,
3617238106Sdes    [-fno-rtti -fno-exceptions], [],
3618238106Sdes    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3619238106Sdesfi
3620238106Sdes_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3621238106Sdes	[Compiler flag to turn off builtin functions])
3622238106Sdes])# _LT_COMPILER_NO_RTTI
3623238106Sdes
3624238106Sdes
3625238106Sdes# _LT_CMD_GLOBAL_SYMBOLS
3626238106Sdes# ----------------------
3627238106Sdesm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3628238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3629238106SdesAC_REQUIRE([AC_PROG_CC])dnl
3630238106SdesAC_REQUIRE([AC_PROG_AWK])dnl
3631238106SdesAC_REQUIRE([LT_PATH_NM])dnl
3632238106SdesAC_REQUIRE([LT_PATH_LD])dnl
3633238106Sdesm4_require([_LT_DECL_SED])dnl
3634238106Sdesm4_require([_LT_DECL_EGREP])dnl
3635238106Sdesm4_require([_LT_TAG_COMPILER])dnl
3636238106Sdes
3637238106Sdes# Check for command to grab the raw symbol name followed by C symbol from nm.
3638238106SdesAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3639238106SdesAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3640238106Sdes[
3641238106Sdes# These are sane defaults that work on at least a few old systems.
3642238106Sdes# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3643238106Sdes
3644238106Sdes# Character class describing NM global symbol codes.
3645238106Sdessymcode='[[BCDEGRST]]'
3646238106Sdes
3647238106Sdes# Regexp to match symbols that can be accessed directly from C.
3648238106Sdessympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3649238106Sdes
3650238106Sdes# Define system-specific variables.
3651238106Sdescase $host_os in
3652238106Sdesaix*)
3653238106Sdes  symcode='[[BCDT]]'
3654238106Sdes  ;;
3655238106Sdescygwin* | mingw* | pw32* | cegcc*)
3656238106Sdes  symcode='[[ABCDGISTW]]'
3657238106Sdes  ;;
3658238106Sdeshpux*)
3659238106Sdes  if test "$host_cpu" = ia64; then
3660238106Sdes    symcode='[[ABCDEGRST]]'
3661238106Sdes  fi
3662238106Sdes  ;;
3663238106Sdesirix* | nonstopux*)
3664238106Sdes  symcode='[[BCDEGRST]]'
3665238106Sdes  ;;
3666238106Sdesosf*)
3667238106Sdes  symcode='[[BCDEGQRST]]'
3668238106Sdes  ;;
3669238106Sdessolaris*)
3670238106Sdes  symcode='[[BDRT]]'
3671238106Sdes  ;;
3672238106Sdessco3.2v5*)
3673238106Sdes  symcode='[[DT]]'
3674238106Sdes  ;;
3675238106Sdessysv4.2uw2*)
3676238106Sdes  symcode='[[DT]]'
3677238106Sdes  ;;
3678238106Sdessysv5* | sco5v6* | unixware* | OpenUNIX*)
3679238106Sdes  symcode='[[ABDT]]'
3680238106Sdes  ;;
3681238106Sdessysv4)
3682238106Sdes  symcode='[[DFNSTU]]'
3683238106Sdes  ;;
3684238106Sdesesac
3685238106Sdes
3686238106Sdes# If we're using GNU nm, then use its standard symbol codes.
3687238106Sdescase `$NM -V 2>&1` in
3688238106Sdes*GNU* | *'with BFD'*)
3689238106Sdes  symcode='[[ABCDGIRSTW]]' ;;
3690238106Sdesesac
3691238106Sdes
3692238106Sdes# Transform an extracted symbol line into a proper C declaration.
3693238106Sdes# Some systems (esp. on ia64) link data and code symbols differently,
3694238106Sdes# so use this general approach.
3695238106Sdeslt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3696238106Sdes
3697238106Sdes# Transform an extracted symbol line into symbol name and symbol address
3698238106Sdeslt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3699238106Sdeslt_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'"
3700238106Sdes
3701238106Sdes# Handle CRLF in mingw tool chain
3702238106Sdesopt_cr=
3703238106Sdescase $build_os in
3704238106Sdesmingw*)
3705238106Sdes  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3706238106Sdes  ;;
3707238106Sdesesac
3708238106Sdes
3709238106Sdes# Try without a prefix underscore, then with it.
3710238106Sdesfor ac_symprfx in "" "_"; do
3711238106Sdes
3712238106Sdes  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3713238106Sdes  symxfrm="\\1 $ac_symprfx\\2 \\2"
3714238106Sdes
3715238106Sdes  # Write the raw and C identifiers.
3716238106Sdes  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3717238106Sdes    # Fake it for dumpbin and say T for any non-static function
3718238106Sdes    # and D for any global variable.
3719238106Sdes    # Also find C++ and __fastcall symbols from MSVC++,
3720238106Sdes    # which start with @ or ?.
3721238106Sdes    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3722238106Sdes"     {last_section=section; section=\$ 3};"\
3723249141Sdes"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3724238106Sdes"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3725238106Sdes"     \$ 0!~/External *\|/{next};"\
3726238106Sdes"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3727238106Sdes"     {if(hide[section]) next};"\
3728238106Sdes"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3729238106Sdes"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3730238106Sdes"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3731238106Sdes"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3732238106Sdes"     ' prfx=^$ac_symprfx]"
3733238106Sdes  else
3734238106Sdes    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3735238106Sdes  fi
3736238106Sdes  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3737238106Sdes
3738238106Sdes  # Check to see that the pipe works correctly.
3739238106Sdes  pipe_works=no
3740238106Sdes
3741238106Sdes  rm -f conftest*
3742238106Sdes  cat > conftest.$ac_ext <<_LT_EOF
3743238106Sdes#ifdef __cplusplus
3744238106Sdesextern "C" {
3745238106Sdes#endif
3746238106Sdeschar nm_test_var;
3747238106Sdesvoid nm_test_func(void);
3748238106Sdesvoid nm_test_func(void){}
3749238106Sdes#ifdef __cplusplus
3750238106Sdes}
3751238106Sdes#endif
3752238106Sdesint main(){nm_test_var='a';nm_test_func();return(0);}
3753238106Sdes_LT_EOF
3754238106Sdes
3755238106Sdes  if AC_TRY_EVAL(ac_compile); then
3756238106Sdes    # Now try to grab the symbols.
3757238106Sdes    nlist=conftest.nm
3758238106Sdes    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3759238106Sdes      # Try sorting and uniquifying the output.
3760238106Sdes      if sort "$nlist" | uniq > "$nlist"T; then
3761238106Sdes	mv -f "$nlist"T "$nlist"
3762238106Sdes      else
3763238106Sdes	rm -f "$nlist"T
3764238106Sdes      fi
3765238106Sdes
3766238106Sdes      # Make sure that we snagged all the symbols we need.
3767238106Sdes      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3768238106Sdes	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3769238106Sdes	  cat <<_LT_EOF > conftest.$ac_ext
3770238106Sdes/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
3771238106Sdes#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3772238106Sdes/* DATA imports from DLLs on WIN32 con't be const, because runtime
3773238106Sdes   relocations are performed -- see ld's documentation on pseudo-relocs.  */
3774238106Sdes# define LT@&t@_DLSYM_CONST
3775238106Sdes#elif defined(__osf__)
3776238106Sdes/* This system does not cope well with relocations in const data.  */
3777238106Sdes# define LT@&t@_DLSYM_CONST
3778238106Sdes#else
3779238106Sdes# define LT@&t@_DLSYM_CONST const
3780238106Sdes#endif
3781238106Sdes
3782238106Sdes#ifdef __cplusplus
3783238106Sdesextern "C" {
3784238106Sdes#endif
3785238106Sdes
3786238106Sdes_LT_EOF
3787238106Sdes	  # Now generate the symbol file.
3788238106Sdes	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3789238106Sdes
3790238106Sdes	  cat <<_LT_EOF >> conftest.$ac_ext
3791238106Sdes
3792238106Sdes/* The mapping between symbol names and symbols.  */
3793238106SdesLT@&t@_DLSYM_CONST struct {
3794238106Sdes  const char *name;
3795238106Sdes  void       *address;
3796238106Sdes}
3797238106Sdeslt__PROGRAM__LTX_preloaded_symbols[[]] =
3798238106Sdes{
3799238106Sdes  { "@PROGRAM@", (void *) 0 },
3800238106Sdes_LT_EOF
3801238106Sdes	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3802238106Sdes	  cat <<\_LT_EOF >> conftest.$ac_ext
3803238106Sdes  {0, (void *) 0}
3804238106Sdes};
3805238106Sdes
3806238106Sdes/* This works around a problem in FreeBSD linker */
3807238106Sdes#ifdef FREEBSD_WORKAROUND
3808238106Sdesstatic const void *lt_preloaded_setup() {
3809238106Sdes  return lt__PROGRAM__LTX_preloaded_symbols;
3810238106Sdes}
3811238106Sdes#endif
3812238106Sdes
3813238106Sdes#ifdef __cplusplus
3814238106Sdes}
3815238106Sdes#endif
3816238106Sdes_LT_EOF
3817238106Sdes	  # Now try linking the two files.
3818238106Sdes	  mv conftest.$ac_objext conftstm.$ac_objext
3819238106Sdes	  lt_globsym_save_LIBS=$LIBS
3820238106Sdes	  lt_globsym_save_CFLAGS=$CFLAGS
3821238106Sdes	  LIBS="conftstm.$ac_objext"
3822238106Sdes	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3823238106Sdes	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3824238106Sdes	    pipe_works=yes
3825238106Sdes	  fi
3826238106Sdes	  LIBS=$lt_globsym_save_LIBS
3827238106Sdes	  CFLAGS=$lt_globsym_save_CFLAGS
3828238106Sdes	else
3829238106Sdes	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3830238106Sdes	fi
3831238106Sdes      else
3832238106Sdes	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3833238106Sdes      fi
3834238106Sdes    else
3835238106Sdes      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3836238106Sdes    fi
3837238106Sdes  else
3838238106Sdes    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3839238106Sdes    cat conftest.$ac_ext >&5
3840238106Sdes  fi
3841238106Sdes  rm -rf conftest* conftst*
3842238106Sdes
3843238106Sdes  # Do not use the global_symbol_pipe unless it works.
3844238106Sdes  if test "$pipe_works" = yes; then
3845238106Sdes    break
3846238106Sdes  else
3847238106Sdes    lt_cv_sys_global_symbol_pipe=
3848238106Sdes  fi
3849238106Sdesdone
3850238106Sdes])
3851238106Sdesif test -z "$lt_cv_sys_global_symbol_pipe"; then
3852238106Sdes  lt_cv_sys_global_symbol_to_cdecl=
3853238106Sdesfi
3854238106Sdesif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3855238106Sdes  AC_MSG_RESULT(failed)
3856238106Sdeselse
3857238106Sdes  AC_MSG_RESULT(ok)
3858238106Sdesfi
3859238106Sdes
3860238106Sdes# Response file support.
3861238106Sdesif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3862238106Sdes  nm_file_list_spec='@'
3863238106Sdeselif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3864238106Sdes  nm_file_list_spec='@'
3865238106Sdesfi
3866238106Sdes
3867238106Sdes_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3868238106Sdes    [Take the output of nm and produce a listing of raw symbols and C names])
3869238106Sdes_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3870238106Sdes    [Transform the output of nm in a proper C declaration])
3871238106Sdes_LT_DECL([global_symbol_to_c_name_address],
3872238106Sdes    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3873238106Sdes    [Transform the output of nm in a C name address pair])
3874238106Sdes_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3875238106Sdes    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3876238106Sdes    [Transform the output of nm in a C name address pair when lib prefix is needed])
3877238106Sdes_LT_DECL([], [nm_file_list_spec], [1],
3878238106Sdes    [Specify filename containing input files for $NM])
3879238106Sdes]) # _LT_CMD_GLOBAL_SYMBOLS
3880238106Sdes
3881238106Sdes
3882238106Sdes# _LT_COMPILER_PIC([TAGNAME])
3883238106Sdes# ---------------------------
3884238106Sdesm4_defun([_LT_COMPILER_PIC],
3885238106Sdes[m4_require([_LT_TAG_COMPILER])dnl
3886238106Sdes_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3887238106Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3888238106Sdes_LT_TAGVAR(lt_prog_compiler_static, $1)=
3889238106Sdes
3890238106Sdesm4_if([$1], [CXX], [
3891238106Sdes  # C++ specific cases for pic, static, wl, etc.
3892238106Sdes  if test "$GXX" = yes; then
3893238106Sdes    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3894238106Sdes    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3895238106Sdes
3896238106Sdes    case $host_os in
3897238106Sdes    aix*)
3898238106Sdes      # All AIX code is PIC.
3899238106Sdes      if test "$host_cpu" = ia64; then
3900238106Sdes	# AIX 5 now supports IA64 processor
3901238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3902238106Sdes      fi
3903238106Sdes      ;;
3904238106Sdes
3905238106Sdes    amigaos*)
3906238106Sdes      case $host_cpu in
3907238106Sdes      powerpc)
3908238106Sdes            # see comment about AmigaOS4 .so support
3909238106Sdes            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3910238106Sdes        ;;
3911238106Sdes      m68k)
3912238106Sdes            # FIXME: we need at least 68020 code to build shared libraries, but
3913238106Sdes            # adding the `-m68020' flag to GCC prevents building anything better,
3914238106Sdes            # like `-m68040'.
3915238106Sdes            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3916238106Sdes        ;;
3917238106Sdes      esac
3918238106Sdes      ;;
3919238106Sdes
3920238106Sdes    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3921238106Sdes      # PIC is the default for these OSes.
3922238106Sdes      ;;
3923238106Sdes    mingw* | cygwin* | os2* | pw32* | cegcc*)
3924238106Sdes      # This hack is so that the source file can tell whether it is being
3925238106Sdes      # built for inclusion in a dll (and should export symbols for example).
3926238106Sdes      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3927238106Sdes      # (--disable-auto-import) libraries
3928238106Sdes      m4_if([$1], [GCJ], [],
3929238106Sdes	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3930238106Sdes      ;;
3931238106Sdes    darwin* | rhapsody*)
3932238106Sdes      # PIC is the default on this platform
3933238106Sdes      # Common symbols not allowed in MH_DYLIB files
3934238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3935238106Sdes      ;;
3936238106Sdes    *djgpp*)
3937238106Sdes      # DJGPP does not support shared libraries at all
3938238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3939238106Sdes      ;;
3940238106Sdes    haiku*)
3941238106Sdes      # PIC is the default for Haiku.
3942238106Sdes      # The "-static" flag exists, but is broken.
3943238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)=
3944238106Sdes      ;;
3945238106Sdes    interix[[3-9]]*)
3946238106Sdes      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3947238106Sdes      # Instead, we relocate shared libraries at runtime.
3948238106Sdes      ;;
3949238106Sdes    sysv4*MP*)
3950238106Sdes      if test -d /usr/nec; then
3951238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3952238106Sdes      fi
3953238106Sdes      ;;
3954238106Sdes    hpux*)
3955238106Sdes      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3956238106Sdes      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3957238106Sdes      # sets the default TLS model and affects inlining.
3958238106Sdes      case $host_cpu in
3959238106Sdes      hppa*64*)
3960238106Sdes	;;
3961238106Sdes      *)
3962238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3963238106Sdes	;;
3964238106Sdes      esac
3965238106Sdes      ;;
3966238106Sdes    *qnx* | *nto*)
3967238106Sdes      # QNX uses GNU C++, but need to define -shared option too, otherwise
3968238106Sdes      # it will coredump.
3969238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3970238106Sdes      ;;
3971238106Sdes    *)
3972238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3973238106Sdes      ;;
3974238106Sdes    esac
3975238106Sdes  else
3976238106Sdes    case $host_os in
3977238106Sdes      aix[[4-9]]*)
3978238106Sdes	# All AIX code is PIC.
3979238106Sdes	if test "$host_cpu" = ia64; then
3980238106Sdes	  # AIX 5 now supports IA64 processor
3981238106Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3982238106Sdes	else
3983238106Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3984238106Sdes	fi
3985238106Sdes	;;
3986238106Sdes      chorus*)
3987238106Sdes	case $cc_basename in
3988238106Sdes	cxch68*)
3989238106Sdes	  # Green Hills C++ Compiler
3990238106Sdes	  # _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"
3991238106Sdes	  ;;
3992238106Sdes	esac
3993238106Sdes	;;
3994238106Sdes      mingw* | cygwin* | os2* | pw32* | cegcc*)
3995238106Sdes	# This hack is so that the source file can tell whether it is being
3996238106Sdes	# built for inclusion in a dll (and should export symbols for example).
3997238106Sdes	m4_if([$1], [GCJ], [],
3998238106Sdes	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3999238106Sdes	;;
4000238106Sdes      dgux*)
4001238106Sdes	case $cc_basename in
4002238106Sdes	  ec++*)
4003238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4004238106Sdes	    ;;
4005238106Sdes	  ghcx*)
4006238106Sdes	    # Green Hills C++ Compiler
4007238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4008238106Sdes	    ;;
4009238106Sdes	  *)
4010238106Sdes	    ;;
4011238106Sdes	esac
4012238106Sdes	;;
4013238106Sdes      freebsd* | dragonfly*)
4014238106Sdes	# FreeBSD uses GNU C++
4015238106Sdes	;;
4016238106Sdes      hpux9* | hpux10* | hpux11*)
4017238106Sdes	case $cc_basename in
4018238106Sdes	  CC*)
4019238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4020238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4021238106Sdes	    if test "$host_cpu" != ia64; then
4022238106Sdes	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4023238106Sdes	    fi
4024238106Sdes	    ;;
4025238106Sdes	  aCC*)
4026238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4027238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4028238106Sdes	    case $host_cpu in
4029238106Sdes	    hppa*64*|ia64*)
4030238106Sdes	      # +Z the default
4031238106Sdes	      ;;
4032238106Sdes	    *)
4033238106Sdes	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4034238106Sdes	      ;;
4035238106Sdes	    esac
4036238106Sdes	    ;;
4037238106Sdes	  *)
4038238106Sdes	    ;;
4039238106Sdes	esac
4040238106Sdes	;;
4041238106Sdes      interix*)
4042238106Sdes	# This is c89, which is MS Visual C++ (no shared libs)
4043238106Sdes	# Anyone wants to do a port?
4044238106Sdes	;;
4045238106Sdes      irix5* | irix6* | nonstopux*)
4046238106Sdes	case $cc_basename in
4047238106Sdes	  CC*)
4048238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4049238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4050238106Sdes	    # CC pic flag -KPIC is the default.
4051238106Sdes	    ;;
4052238106Sdes	  *)
4053238106Sdes	    ;;
4054238106Sdes	esac
4055238106Sdes	;;
4056238106Sdes      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4057238106Sdes	case $cc_basename in
4058238106Sdes	  KCC*)
4059238106Sdes	    # KAI C++ Compiler
4060238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4061238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4062238106Sdes	    ;;
4063238106Sdes	  ecpc* )
4064238106Sdes	    # old Intel C++ for x86_64 which still supported -KPIC.
4065238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4066238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4067238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4068238106Sdes	    ;;
4069238106Sdes	  icpc* )
4070238106Sdes	    # Intel C++, used to be incompatible with GCC.
4071238106Sdes	    # ICC 10 doesn't accept -KPIC any more.
4072238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4073238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4074238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4075238106Sdes	    ;;
4076238106Sdes	  pgCC* | pgcpp*)
4077238106Sdes	    # Portland Group C++ compiler
4078238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4079238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4080238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4081238106Sdes	    ;;
4082238106Sdes	  cxx*)
4083238106Sdes	    # Compaq C++
4084238106Sdes	    # Make sure the PIC flag is empty.  It appears that all Alpha
4085238106Sdes	    # Linux and Compaq Tru64 Unix objects are PIC.
4086238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4087238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4088238106Sdes	    ;;
4089238106Sdes	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4090238106Sdes	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4091238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4092238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4093238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4094238106Sdes	    ;;
4095238106Sdes	  *)
4096238106Sdes	    case `$CC -V 2>&1 | sed 5q` in
4097238106Sdes	    *Sun\ C*)
4098238106Sdes	      # Sun C++ 5.9
4099238106Sdes	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4100238106Sdes	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4101238106Sdes	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4102238106Sdes	      ;;
4103238106Sdes	    esac
4104238106Sdes	    ;;
4105238106Sdes	esac
4106238106Sdes	;;
4107238106Sdes      lynxos*)
4108238106Sdes	;;
4109238106Sdes      m88k*)
4110238106Sdes	;;
4111238106Sdes      mvs*)
4112238106Sdes	case $cc_basename in
4113238106Sdes	  cxx*)
4114238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4115238106Sdes	    ;;
4116238106Sdes	  *)
4117238106Sdes	    ;;
4118238106Sdes	esac
4119238106Sdes	;;
4120238106Sdes      netbsd*)
4121238106Sdes	;;
4122238106Sdes      *qnx* | *nto*)
4123238106Sdes        # QNX uses GNU C++, but need to define -shared option too, otherwise
4124238106Sdes        # it will coredump.
4125238106Sdes        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4126238106Sdes        ;;
4127238106Sdes      osf3* | osf4* | osf5*)
4128238106Sdes	case $cc_basename in
4129238106Sdes	  KCC*)
4130238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4131238106Sdes	    ;;
4132238106Sdes	  RCC*)
4133238106Sdes	    # Rational C++ 2.4.1
4134238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4135238106Sdes	    ;;
4136238106Sdes	  cxx*)
4137238106Sdes	    # Digital/Compaq C++
4138238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4139238106Sdes	    # Make sure the PIC flag is empty.  It appears that all Alpha
4140238106Sdes	    # Linux and Compaq Tru64 Unix objects are PIC.
4141238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4142238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4143238106Sdes	    ;;
4144238106Sdes	  *)
4145238106Sdes	    ;;
4146238106Sdes	esac
4147238106Sdes	;;
4148238106Sdes      psos*)
4149238106Sdes	;;
4150238106Sdes      solaris*)
4151238106Sdes	case $cc_basename in
4152238106Sdes	  CC* | sunCC*)
4153238106Sdes	    # Sun C++ 4.2, 5.x and Centerline C++
4154238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4155238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4156238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4157238106Sdes	    ;;
4158238106Sdes	  gcx*)
4159238106Sdes	    # Green Hills C++ Compiler
4160238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4161238106Sdes	    ;;
4162238106Sdes	  *)
4163238106Sdes	    ;;
4164238106Sdes	esac
4165238106Sdes	;;
4166238106Sdes      sunos4*)
4167238106Sdes	case $cc_basename in
4168238106Sdes	  CC*)
4169238106Sdes	    # Sun C++ 4.x
4170238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4171238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4172238106Sdes	    ;;
4173238106Sdes	  lcc*)
4174238106Sdes	    # Lucid
4175238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4176238106Sdes	    ;;
4177238106Sdes	  *)
4178238106Sdes	    ;;
4179238106Sdes	esac
4180238106Sdes	;;
4181238106Sdes      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4182238106Sdes	case $cc_basename in
4183238106Sdes	  CC*)
4184238106Sdes	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4185238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4186238106Sdes	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4187238106Sdes	    ;;
4188238106Sdes	esac
4189238106Sdes	;;
4190238106Sdes      tandem*)
4191238106Sdes	case $cc_basename in
4192238106Sdes	  NCC*)
4193238106Sdes	    # NonStop-UX NCC 3.20
4194238106Sdes	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4195238106Sdes	    ;;
4196238106Sdes	  *)
4197238106Sdes	    ;;
4198238106Sdes	esac
4199238106Sdes	;;
4200238106Sdes      vxworks*)
4201238106Sdes	;;
4202238106Sdes      *)
4203238106Sdes	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4204238106Sdes	;;
4205238106Sdes    esac
4206238106Sdes  fi
4207238106Sdes],
4208238106Sdes[
4209238106Sdes  if test "$GCC" = yes; then
4210238106Sdes    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4211238106Sdes    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4212238106Sdes
4213238106Sdes    case $host_os in
4214238106Sdes      aix*)
4215238106Sdes      # All AIX code is PIC.
4216238106Sdes      if test "$host_cpu" = ia64; then
4217238106Sdes	# AIX 5 now supports IA64 processor
4218238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4219238106Sdes      fi
4220238106Sdes      ;;
4221238106Sdes
4222238106Sdes    amigaos*)
4223238106Sdes      case $host_cpu in
4224238106Sdes      powerpc)
4225238106Sdes            # see comment about AmigaOS4 .so support
4226238106Sdes            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4227238106Sdes        ;;
4228238106Sdes      m68k)
4229238106Sdes            # FIXME: we need at least 68020 code to build shared libraries, but
4230238106Sdes            # adding the `-m68020' flag to GCC prevents building anything better,
4231238106Sdes            # like `-m68040'.
4232238106Sdes            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4233238106Sdes        ;;
4234238106Sdes      esac
4235238106Sdes      ;;
4236238106Sdes
4237238106Sdes    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4238238106Sdes      # PIC is the default for these OSes.
4239238106Sdes      ;;
4240238106Sdes
4241238106Sdes    mingw* | cygwin* | pw32* | os2* | cegcc*)
4242238106Sdes      # This hack is so that the source file can tell whether it is being
4243238106Sdes      # built for inclusion in a dll (and should export symbols for example).
4244238106Sdes      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4245238106Sdes      # (--disable-auto-import) libraries
4246238106Sdes      m4_if([$1], [GCJ], [],
4247238106Sdes	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4248238106Sdes      ;;
4249238106Sdes
4250238106Sdes    darwin* | rhapsody*)
4251238106Sdes      # PIC is the default on this platform
4252238106Sdes      # Common symbols not allowed in MH_DYLIB files
4253238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4254238106Sdes      ;;
4255238106Sdes
4256238106Sdes    haiku*)
4257238106Sdes      # PIC is the default for Haiku.
4258238106Sdes      # The "-static" flag exists, but is broken.
4259238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4260238106Sdes      ;;
4261238106Sdes
4262238106Sdes    hpux*)
4263238106Sdes      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4264238106Sdes      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4265238106Sdes      # sets the default TLS model and affects inlining.
4266238106Sdes      case $host_cpu in
4267238106Sdes      hppa*64*)
4268238106Sdes	# +Z the default
4269238106Sdes	;;
4270238106Sdes      *)
4271238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4272238106Sdes	;;
4273238106Sdes      esac
4274238106Sdes      ;;
4275238106Sdes
4276238106Sdes    interix[[3-9]]*)
4277238106Sdes      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4278238106Sdes      # Instead, we relocate shared libraries at runtime.
4279238106Sdes      ;;
4280238106Sdes
4281238106Sdes    msdosdjgpp*)
4282238106Sdes      # Just because we use GCC doesn't mean we suddenly get shared libraries
4283238106Sdes      # on systems that don't support them.
4284238106Sdes      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4285238106Sdes      enable_shared=no
4286238106Sdes      ;;
4287238106Sdes
4288238106Sdes    *nto* | *qnx*)
4289238106Sdes      # QNX uses GNU C++, but need to define -shared option too, otherwise
4290238106Sdes      # it will coredump.
4291238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4292238106Sdes      ;;
4293238106Sdes
4294238106Sdes    sysv4*MP*)
4295238106Sdes      if test -d /usr/nec; then
4296238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4297238106Sdes      fi
4298238106Sdes      ;;
4299238106Sdes
4300238106Sdes    *)
4301238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4302238106Sdes      ;;
4303238106Sdes    esac
4304238106Sdes
4305238106Sdes    case $cc_basename in
4306238106Sdes    nvcc*) # Cuda Compiler Driver 2.2
4307238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4308249141Sdes      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4309249141Sdes        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4310249141Sdes      fi
4311238106Sdes      ;;
4312238106Sdes    esac
4313238106Sdes  else
4314238106Sdes    # PORTME Check for flag to pass linker flags through the system compiler.
4315238106Sdes    case $host_os in
4316238106Sdes    aix*)
4317238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4318238106Sdes      if test "$host_cpu" = ia64; then
4319238106Sdes	# AIX 5 now supports IA64 processor
4320238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4321238106Sdes      else
4322238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4323238106Sdes      fi
4324238106Sdes      ;;
4325238106Sdes
4326238106Sdes    mingw* | cygwin* | pw32* | os2* | cegcc*)
4327238106Sdes      # This hack is so that the source file can tell whether it is being
4328238106Sdes      # built for inclusion in a dll (and should export symbols for example).
4329238106Sdes      m4_if([$1], [GCJ], [],
4330238106Sdes	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4331238106Sdes      ;;
4332238106Sdes
4333238106Sdes    hpux9* | hpux10* | hpux11*)
4334238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4335238106Sdes      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4336238106Sdes      # not for PA HP-UX.
4337238106Sdes      case $host_cpu in
4338238106Sdes      hppa*64*|ia64*)
4339238106Sdes	# +Z the default
4340238106Sdes	;;
4341238106Sdes      *)
4342238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4343238106Sdes	;;
4344238106Sdes      esac
4345238106Sdes      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4346238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4347238106Sdes      ;;
4348238106Sdes
4349238106Sdes    irix5* | irix6* | nonstopux*)
4350238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4351238106Sdes      # PIC (with -KPIC) is the default.
4352238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4353238106Sdes      ;;
4354238106Sdes
4355238106Sdes    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4356238106Sdes      case $cc_basename in
4357238106Sdes      # old Intel for x86_64 which still supported -KPIC.
4358238106Sdes      ecc*)
4359238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4360238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4361238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4362238106Sdes        ;;
4363238106Sdes      # icc used to be incompatible with GCC.
4364238106Sdes      # ICC 10 doesn't accept -KPIC any more.
4365238106Sdes      icc* | ifort*)
4366238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4367238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4368238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4369238106Sdes        ;;
4370238106Sdes      # Lahey Fortran 8.1.
4371238106Sdes      lf95*)
4372238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4373238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4374238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4375238106Sdes	;;
4376238106Sdes      nagfor*)
4377238106Sdes	# NAG Fortran compiler
4378238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4379238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4380238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4381238106Sdes	;;
4382238106Sdes      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4383238106Sdes        # Portland Group compilers (*not* the Pentium gcc compiler,
4384238106Sdes	# which looks to be a dead project)
4385238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4387238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4388238106Sdes        ;;
4389238106Sdes      ccc*)
4390238106Sdes        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4391238106Sdes        # All Alpha code is PIC.
4392238106Sdes        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4393238106Sdes        ;;
4394238106Sdes      xl* | bgxl* | bgf* | mpixl*)
4395238106Sdes	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4396238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4397238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4398238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4399238106Sdes	;;
4400238106Sdes      *)
4401238106Sdes	case `$CC -V 2>&1 | sed 5q` in
4402249141Sdes	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4403238106Sdes	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4404238106Sdes	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4405238106Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4406238106Sdes	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4407238106Sdes	  ;;
4408249141Sdes	*Sun\ F* | *Sun*Fortran*)
4409249141Sdes	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4410249141Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4411249141Sdes	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4412249141Sdes	  ;;
4413238106Sdes	*Sun\ C*)
4414238106Sdes	  # Sun C 5.9
4415238106Sdes	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4416238106Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4417238106Sdes	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4418238106Sdes	  ;;
4419249141Sdes        *Intel*\ [[CF]]*Compiler*)
4420249141Sdes	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4421249141Sdes	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4422249141Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4423249141Sdes	  ;;
4424249141Sdes	*Portland\ Group*)
4425249141Sdes	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4426249141Sdes	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4427249141Sdes	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4428249141Sdes	  ;;
4429238106Sdes	esac
4430238106Sdes	;;
4431238106Sdes      esac
4432238106Sdes      ;;
4433238106Sdes
4434238106Sdes    newsos6)
4435238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4436238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4437238106Sdes      ;;
4438238106Sdes
4439238106Sdes    *nto* | *qnx*)
4440238106Sdes      # QNX uses GNU C++, but need to define -shared option too, otherwise
4441238106Sdes      # it will coredump.
4442238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4443238106Sdes      ;;
4444238106Sdes
4445238106Sdes    osf3* | osf4* | osf5*)
4446238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4447238106Sdes      # All OSF/1 code is PIC.
4448238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4449238106Sdes      ;;
4450238106Sdes
4451238106Sdes    rdos*)
4452238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4453238106Sdes      ;;
4454238106Sdes
4455238106Sdes    solaris*)
4456238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4457238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4458238106Sdes      case $cc_basename in
4459238106Sdes      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4460238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4461238106Sdes      *)
4462238106Sdes	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4463238106Sdes      esac
4464238106Sdes      ;;
4465238106Sdes
4466238106Sdes    sunos4*)
4467238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4468238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4469238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4470238106Sdes      ;;
4471238106Sdes
4472238106Sdes    sysv4 | sysv4.2uw2* | sysv4.3*)
4473238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4474238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4475238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4476238106Sdes      ;;
4477238106Sdes
4478238106Sdes    sysv4*MP*)
4479238106Sdes      if test -d /usr/nec ;then
4480238106Sdes	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4481238106Sdes	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4482238106Sdes      fi
4483238106Sdes      ;;
4484238106Sdes
4485238106Sdes    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4486238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4487238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4488238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4489238106Sdes      ;;
4490238106Sdes
4491238106Sdes    unicos*)
4492238106Sdes      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4493238106Sdes      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4494238106Sdes      ;;
4495238106Sdes
4496238106Sdes    uts4*)
4497238106Sdes      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4498238106Sdes      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4499238106Sdes      ;;
4500238106Sdes
4501238106Sdes    *)
4502238106Sdes      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4503238106Sdes      ;;
4504238106Sdes    esac
4505238106Sdes  fi
4506238106Sdes])
4507238106Sdescase $host_os in
4508238106Sdes  # For platforms which do not support PIC, -DPIC is meaningless:
4509238106Sdes  *djgpp*)
4510238106Sdes    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4511238106Sdes    ;;
4512238106Sdes  *)
4513238106Sdes    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4514238106Sdes    ;;
4515238106Sdesesac
4516238106Sdes
4517238106SdesAC_CACHE_CHECK([for $compiler option to produce PIC],
4518238106Sdes  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4519238106Sdes  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4520238106Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4521238106Sdes
4522238106Sdes#
4523238106Sdes# Check to make sure the PIC flag actually works.
4524238106Sdes#
4525238106Sdesif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4526238106Sdes  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4527238106Sdes    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4528238106Sdes    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4529238106Sdes    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4530238106Sdes     "" | " "*) ;;
4531238106Sdes     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4532238106Sdes     esac],
4533238106Sdes    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4534238106Sdes     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4535238106Sdesfi
4536238106Sdes_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4537238106Sdes	[Additional compiler flags for building library objects])
4538238106Sdes
4539238106Sdes_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4540238106Sdes	[How to pass a linker flag through the compiler])
4541238106Sdes#
4542238106Sdes# Check to make sure the static flag actually works.
4543238106Sdes#
4544238106Sdeswl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4545238106Sdes_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4546238106Sdes  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4547238106Sdes  $lt_tmp_static_flag,
4548238106Sdes  [],
4549238106Sdes  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4550238106Sdes_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4551238106Sdes	[Compiler flag to prevent dynamic linking])
4552238106Sdes])# _LT_COMPILER_PIC
4553238106Sdes
4554238106Sdes
4555238106Sdes# _LT_LINKER_SHLIBS([TAGNAME])
4556238106Sdes# ----------------------------
4557238106Sdes# See if the linker supports building shared libraries.
4558238106Sdesm4_defun([_LT_LINKER_SHLIBS],
4559238106Sdes[AC_REQUIRE([LT_PATH_LD])dnl
4560238106SdesAC_REQUIRE([LT_PATH_NM])dnl
4561238106Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4562238106Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4563238106Sdesm4_require([_LT_DECL_EGREP])dnl
4564238106Sdesm4_require([_LT_DECL_SED])dnl
4565238106Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4566238106Sdesm4_require([_LT_TAG_COMPILER])dnl
4567238106SdesAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4568238106Sdesm4_if([$1], [CXX], [
4569238106Sdes  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4570238106Sdes  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4571238106Sdes  case $host_os in
4572238106Sdes  aix[[4-9]]*)
4573238106Sdes    # If we're using GNU nm, then we don't want the "-C" option.
4574238106Sdes    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4575238106Sdes    # Also, AIX nm treats weak defined symbols like other global defined
4576238106Sdes    # symbols, whereas GNU nm marks them as "W".
4577238106Sdes    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4578238106Sdes      _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'
4579238106Sdes    else
4580238106Sdes      _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'
4581238106Sdes    fi
4582238106Sdes    ;;
4583238106Sdes  pw32*)
4584238106Sdes    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4585238106Sdes    ;;
4586238106Sdes  cygwin* | mingw* | cegcc*)
4587238106Sdes    case $cc_basename in
4588249141Sdes    cl*)
4589249141Sdes      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4590249141Sdes      ;;
4591238106Sdes    *)
4592238106Sdes      _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'
4593238106Sdes      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4594238106Sdes      ;;
4595238106Sdes    esac
4596238106Sdes    ;;
4597238106Sdes  *)
4598238106Sdes    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4599238106Sdes    ;;
4600238106Sdes  esac
4601238106Sdes], [
4602238106Sdes  runpath_var=
4603238106Sdes  _LT_TAGVAR(allow_undefined_flag, $1)=
4604238106Sdes  _LT_TAGVAR(always_export_symbols, $1)=no
4605238106Sdes  _LT_TAGVAR(archive_cmds, $1)=
4606238106Sdes  _LT_TAGVAR(archive_expsym_cmds, $1)=
4607238106Sdes  _LT_TAGVAR(compiler_needs_object, $1)=no
4608238106Sdes  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4609238106Sdes  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4610238106Sdes  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4611238106Sdes  _LT_TAGVAR(hardcode_automatic, $1)=no
4612238106Sdes  _LT_TAGVAR(hardcode_direct, $1)=no
4613238106Sdes  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4614238106Sdes  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4615238106Sdes  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4616238106Sdes  _LT_TAGVAR(hardcode_minus_L, $1)=no
4617238106Sdes  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4618238106Sdes  _LT_TAGVAR(inherit_rpath, $1)=no
4619238106Sdes  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4620238106Sdes  _LT_TAGVAR(module_cmds, $1)=
4621238106Sdes  _LT_TAGVAR(module_expsym_cmds, $1)=
4622238106Sdes  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4623238106Sdes  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4624238106Sdes  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4625238106Sdes  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4626238106Sdes  # include_expsyms should be a list of space-separated symbols to be *always*
4627238106Sdes  # included in the symbol list
4628238106Sdes  _LT_TAGVAR(include_expsyms, $1)=
4629238106Sdes  # exclude_expsyms can be an extended regexp of symbols to exclude
4630238106Sdes  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4631238106Sdes  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4632238106Sdes  # as well as any symbol that contains `d'.
4633238106Sdes  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4634238106Sdes  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4635238106Sdes  # platforms (ab)use it in PIC code, but their linkers get confused if
4636238106Sdes  # the symbol is explicitly referenced.  Since portable code cannot
4637238106Sdes  # rely on this symbol name, it's probably fine to never include it in
4638238106Sdes  # preloaded symbol tables.
4639238106Sdes  # Exclude shared library initialization/finalization symbols.
4640238106Sdesdnl Note also adjust exclude_expsyms for C++ above.
4641238106Sdes  extract_expsyms_cmds=
4642238106Sdes
4643238106Sdes  case $host_os in
4644238106Sdes  cygwin* | mingw* | pw32* | cegcc*)
4645238106Sdes    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4646238106Sdes    # When not using gcc, we currently assume that we are using
4647238106Sdes    # Microsoft Visual C++.
4648238106Sdes    if test "$GCC" != yes; then
4649238106Sdes      with_gnu_ld=no
4650238106Sdes    fi
4651238106Sdes    ;;
4652238106Sdes  interix*)
4653238106Sdes    # we just hope/assume this is gcc and not c89 (= MSVC++)
4654238106Sdes    with_gnu_ld=yes
4655238106Sdes    ;;
4656238106Sdes  openbsd*)
4657238106Sdes    with_gnu_ld=no
4658238106Sdes    ;;
4659238106Sdes  esac
4660238106Sdes
4661238106Sdes  _LT_TAGVAR(ld_shlibs, $1)=yes
4662238106Sdes
4663238106Sdes  # On some targets, GNU ld is compatible enough with the native linker
4664238106Sdes  # that we're better off using the native interface for both.
4665238106Sdes  lt_use_gnu_ld_interface=no
4666238106Sdes  if test "$with_gnu_ld" = yes; then
4667238106Sdes    case $host_os in
4668238106Sdes      aix*)
4669238106Sdes	# The AIX port of GNU ld has always aspired to compatibility
4670238106Sdes	# with the native linker.  However, as the warning in the GNU ld
4671238106Sdes	# block says, versions before 2.19.5* couldn't really create working
4672238106Sdes	# shared libraries, regardless of the interface used.
4673238106Sdes	case `$LD -v 2>&1` in
4674238106Sdes	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4675238106Sdes	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4676238106Sdes	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4677238106Sdes	  *)
4678238106Sdes	    lt_use_gnu_ld_interface=yes
4679238106Sdes	    ;;
4680238106Sdes	esac
4681238106Sdes	;;
4682238106Sdes      *)
4683238106Sdes	lt_use_gnu_ld_interface=yes
4684238106Sdes	;;
4685238106Sdes    esac
4686238106Sdes  fi
4687238106Sdes
4688238106Sdes  if test "$lt_use_gnu_ld_interface" = yes; then
4689238106Sdes    # If archive_cmds runs LD, not CC, wlarc should be empty
4690238106Sdes    wlarc='${wl}'
4691238106Sdes
4692238106Sdes    # Set some defaults for GNU ld with shared library support. These
4693238106Sdes    # are reset later if shared libraries are not supported. Putting them
4694238106Sdes    # here allows them to be overridden if necessary.
4695238106Sdes    runpath_var=LD_RUN_PATH
4696238106Sdes    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4697238106Sdes    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4698238106Sdes    # ancient GNU ld didn't support --whole-archive et. al.
4699238106Sdes    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4700238106Sdes      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4701238106Sdes    else
4702238106Sdes      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4703238106Sdes    fi
4704238106Sdes    supports_anon_versioning=no
4705238106Sdes    case `$LD -v 2>&1` in
4706238106Sdes      *GNU\ gold*) supports_anon_versioning=yes ;;
4707238106Sdes      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4708238106Sdes      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4709238106Sdes      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4710238106Sdes      *\ 2.11.*) ;; # other 2.11 versions
4711238106Sdes      *) supports_anon_versioning=yes ;;
4712238106Sdes    esac
4713238106Sdes
4714238106Sdes    # See if GNU ld supports shared libraries.
4715238106Sdes    case $host_os in
4716238106Sdes    aix[[3-9]]*)
4717238106Sdes      # On AIX/PPC, the GNU linker is very broken
4718238106Sdes      if test "$host_cpu" != ia64; then
4719238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4720238106Sdes	cat <<_LT_EOF 1>&2
4721238106Sdes
4722238106Sdes*** Warning: the GNU linker, at least up to release 2.19, is reported
4723238106Sdes*** to be unable to reliably create shared libraries on AIX.
4724238106Sdes*** Therefore, libtool is disabling shared libraries support.  If you
4725238106Sdes*** really care for shared libraries, you may want to install binutils
4726238106Sdes*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4727238106Sdes*** You will then need to restart the configuration process.
4728238106Sdes
4729238106Sdes_LT_EOF
4730238106Sdes      fi
4731238106Sdes      ;;
4732238106Sdes
4733238106Sdes    amigaos*)
4734238106Sdes      case $host_cpu in
4735238106Sdes      powerpc)
4736238106Sdes            # see comment about AmigaOS4 .so support
4737238106Sdes            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4738238106Sdes            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4739238106Sdes        ;;
4740238106Sdes      m68k)
4741238106Sdes            _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)'
4742238106Sdes            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4743238106Sdes            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4744238106Sdes        ;;
4745238106Sdes      esac
4746238106Sdes      ;;
4747238106Sdes
4748238106Sdes    beos*)
4749238106Sdes      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4750238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4751238106Sdes	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4752238106Sdes	# support --undefined.  This deserves some investigation.  FIXME
4753238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4754238106Sdes      else
4755238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4756238106Sdes      fi
4757238106Sdes      ;;
4758238106Sdes
4759238106Sdes    cygwin* | mingw* | pw32* | cegcc*)
4760238106Sdes      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4761238106Sdes      # as there is no search path for DLLs.
4762238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4763238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4764238106Sdes      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4765238106Sdes      _LT_TAGVAR(always_export_symbols, $1)=no
4766238106Sdes      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4767238106Sdes      _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'
4768238106Sdes      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4769238106Sdes
4770238106Sdes      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4771238106Sdes        _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'
4772238106Sdes	# If the export-symbols file already is a .def file (1st line
4773238106Sdes	# is EXPORTS), use it as is; otherwise, prepend...
4774238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4775238106Sdes	  cp $export_symbols $output_objdir/$soname.def;
4776238106Sdes	else
4777238106Sdes	  echo EXPORTS > $output_objdir/$soname.def;
4778238106Sdes	  cat $export_symbols >> $output_objdir/$soname.def;
4779238106Sdes	fi~
4780238106Sdes	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4781238106Sdes      else
4782238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4783238106Sdes      fi
4784238106Sdes      ;;
4785238106Sdes
4786238106Sdes    haiku*)
4787238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4788238106Sdes      _LT_TAGVAR(link_all_deplibs, $1)=yes
4789238106Sdes      ;;
4790238106Sdes
4791238106Sdes    interix[[3-9]]*)
4792238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=no
4793238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4794238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4795238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4796238106Sdes      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4797238106Sdes      # Instead, shared libraries are loaded at an image base (0x10000000 by
4798238106Sdes      # default) and relocated if they conflict, which is a slow very memory
4799238106Sdes      # consuming and fragmenting process.  To avoid this, we pick a random,
4800238106Sdes      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4801238106Sdes      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4802238106Sdes      _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'
4803238106Sdes      _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'
4804238106Sdes      ;;
4805238106Sdes
4806238106Sdes    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4807238106Sdes      tmp_diet=no
4808238106Sdes      if test "$host_os" = linux-dietlibc; then
4809238106Sdes	case $cc_basename in
4810238106Sdes	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4811238106Sdes	esac
4812238106Sdes      fi
4813238106Sdes      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4814238106Sdes	 && test "$tmp_diet" = no
4815238106Sdes      then
4816238106Sdes	tmp_addflag=' $pic_flag'
4817238106Sdes	tmp_sharedflag='-shared'
4818238106Sdes	case $cc_basename,$host_cpu in
4819238106Sdes        pgcc*)				# Portland Group C compiler
4820238106Sdes	  _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'
4821238106Sdes	  tmp_addflag=' $pic_flag'
4822238106Sdes	  ;;
4823238106Sdes	pgf77* | pgf90* | pgf95* | pgfortran*)
4824238106Sdes					# Portland Group f77 and f90 compilers
4825238106Sdes	  _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'
4826238106Sdes	  tmp_addflag=' $pic_flag -Mnomain' ;;
4827238106Sdes	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4828238106Sdes	  tmp_addflag=' -i_dynamic' ;;
4829238106Sdes	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4830238106Sdes	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4831238106Sdes	ifc* | ifort*)			# Intel Fortran compiler
4832238106Sdes	  tmp_addflag=' -nofor_main' ;;
4833238106Sdes	lf95*)				# Lahey Fortran 8.1
4834238106Sdes	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4835238106Sdes	  tmp_sharedflag='--shared' ;;
4836238106Sdes	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4837238106Sdes	  tmp_sharedflag='-qmkshrobj'
4838238106Sdes	  tmp_addflag= ;;
4839238106Sdes	nvcc*)	# Cuda Compiler Driver 2.2
4840238106Sdes	  _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'
4841238106Sdes	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4842238106Sdes	  ;;
4843238106Sdes	esac
4844238106Sdes	case `$CC -V 2>&1 | sed 5q` in
4845238106Sdes	*Sun\ C*)			# Sun C 5.9
4846238106Sdes	  _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'
4847238106Sdes	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4848238106Sdes	  tmp_sharedflag='-G' ;;
4849238106Sdes	*Sun\ F*)			# Sun Fortran 8.3
4850238106Sdes	  tmp_sharedflag='-G' ;;
4851238106Sdes	esac
4852238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4853238106Sdes
4854238106Sdes        if test "x$supports_anon_versioning" = xyes; then
4855238106Sdes          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4856238106Sdes	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4857238106Sdes	    echo "local: *; };" >> $output_objdir/$libname.ver~
4858238106Sdes	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4859238106Sdes        fi
4860238106Sdes
4861238106Sdes	case $cc_basename in
4862238106Sdes	xlf* | bgf* | bgxlf* | mpixlf*)
4863238106Sdes	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4864238106Sdes	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4865249141Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4866238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4867238106Sdes	  if test "x$supports_anon_versioning" = xyes; then
4868238106Sdes	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4869238106Sdes	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4870238106Sdes	      echo "local: *; };" >> $output_objdir/$libname.ver~
4871238106Sdes	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4872238106Sdes	  fi
4873238106Sdes	  ;;
4874238106Sdes	esac
4875238106Sdes      else
4876238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
4877238106Sdes      fi
4878238106Sdes      ;;
4879238106Sdes
4880238106Sdes    netbsd*)
4881238106Sdes      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4882238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4883238106Sdes	wlarc=
4884238106Sdes      else
4885238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4886238106Sdes	_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'
4887238106Sdes      fi
4888238106Sdes      ;;
4889238106Sdes
4890238106Sdes    solaris*)
4891238106Sdes      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4892238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4893238106Sdes	cat <<_LT_EOF 1>&2
4894238106Sdes
4895238106Sdes*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4896238106Sdes*** create shared libraries on Solaris systems.  Therefore, libtool
4897238106Sdes*** is disabling shared libraries support.  We urge you to upgrade GNU
4898238106Sdes*** binutils to release 2.9.1 or newer.  Another option is to modify
4899238106Sdes*** your PATH or compiler configuration so that the native linker is
4900238106Sdes*** used, and then restart.
4901238106Sdes
4902238106Sdes_LT_EOF
4903238106Sdes      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4904238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4905238106Sdes	_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'
4906238106Sdes      else
4907238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4908238106Sdes      fi
4909238106Sdes      ;;
4910238106Sdes
4911238106Sdes    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4912238106Sdes      case `$LD -v 2>&1` in
4913238106Sdes        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4914238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4915238106Sdes	cat <<_LT_EOF 1>&2
4916238106Sdes
4917238106Sdes*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4918238106Sdes*** reliably create shared libraries on SCO systems.  Therefore, libtool
4919238106Sdes*** is disabling shared libraries support.  We urge you to upgrade GNU
4920238106Sdes*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4921238106Sdes*** your PATH or compiler configuration so that the native linker is
4922238106Sdes*** used, and then restart.
4923238106Sdes
4924238106Sdes_LT_EOF
4925238106Sdes	;;
4926238106Sdes	*)
4927238106Sdes	  # For security reasons, it is highly recommended that you always
4928238106Sdes	  # use absolute paths for naming shared libraries, and exclude the
4929238106Sdes	  # DT_RUNPATH tag from executables and libraries.  But doing so
4930238106Sdes	  # requires that you compile everything twice, which is a pain.
4931238106Sdes	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4932238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4933238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4934238106Sdes	    _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'
4935238106Sdes	  else
4936238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
4937238106Sdes	  fi
4938238106Sdes	;;
4939238106Sdes      esac
4940238106Sdes      ;;
4941238106Sdes
4942238106Sdes    sunos4*)
4943238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4944238106Sdes      wlarc=
4945238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
4946238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4947238106Sdes      ;;
4948238106Sdes
4949238106Sdes    *)
4950238106Sdes      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4951238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4952238106Sdes	_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'
4953238106Sdes      else
4954238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
4955238106Sdes      fi
4956238106Sdes      ;;
4957238106Sdes    esac
4958238106Sdes
4959238106Sdes    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4960238106Sdes      runpath_var=
4961238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4962238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4963238106Sdes      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4964238106Sdes    fi
4965238106Sdes  else
4966238106Sdes    # PORTME fill in a description of your system's linker (not GNU ld)
4967238106Sdes    case $host_os in
4968238106Sdes    aix3*)
4969238106Sdes      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4970238106Sdes      _LT_TAGVAR(always_export_symbols, $1)=yes
4971238106Sdes      _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'
4972238106Sdes      # Note: this linker hardcodes the directories in LIBPATH if there
4973238106Sdes      # are no directories specified by -L.
4974238106Sdes      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4975238106Sdes      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4976238106Sdes	# Neither direct hardcoding nor static linking is supported with a
4977238106Sdes	# broken collect2.
4978238106Sdes	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4979238106Sdes      fi
4980238106Sdes      ;;
4981238106Sdes
4982238106Sdes    aix[[4-9]]*)
4983238106Sdes      if test "$host_cpu" = ia64; then
4984238106Sdes	# On IA64, the linker does run time linking by default, so we don't
4985238106Sdes	# have to do anything special.
4986238106Sdes	aix_use_runtimelinking=no
4987238106Sdes	exp_sym_flag='-Bexport'
4988238106Sdes	no_entry_flag=""
4989238106Sdes      else
4990238106Sdes	# If we're using GNU nm, then we don't want the "-C" option.
4991238106Sdes	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4992238106Sdes	# Also, AIX nm treats weak defined symbols like other global
4993238106Sdes	# defined symbols, whereas GNU nm marks them as "W".
4994238106Sdes	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4995238106Sdes	  _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'
4996238106Sdes	else
4997238106Sdes	  _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'
4998238106Sdes	fi
4999238106Sdes	aix_use_runtimelinking=no
5000238106Sdes
5001238106Sdes	# Test if we are trying to use run time linking or normal
5002238106Sdes	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5003238106Sdes	# need to do runtime linking.
5004238106Sdes	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5005238106Sdes	  for ld_flag in $LDFLAGS; do
5006238106Sdes	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5007238106Sdes	    aix_use_runtimelinking=yes
5008238106Sdes	    break
5009238106Sdes	  fi
5010238106Sdes	  done
5011238106Sdes	  ;;
5012238106Sdes	esac
5013238106Sdes
5014238106Sdes	exp_sym_flag='-bexport'
5015238106Sdes	no_entry_flag='-bnoentry'
5016238106Sdes      fi
5017238106Sdes
5018238106Sdes      # When large executables or shared objects are built, AIX ld can
5019238106Sdes      # have problems creating the table of contents.  If linking a library
5020238106Sdes      # or program results in "error TOC overflow" add -mminimal-toc to
5021238106Sdes      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5022238106Sdes      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5023238106Sdes
5024238106Sdes      _LT_TAGVAR(archive_cmds, $1)=''
5025238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5026238106Sdes      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5027238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5028238106Sdes      _LT_TAGVAR(link_all_deplibs, $1)=yes
5029238106Sdes      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5030238106Sdes
5031238106Sdes      if test "$GCC" = yes; then
5032238106Sdes	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5033238106Sdes	# We only want to do this on AIX 4.2 and lower, the check
5034238106Sdes	# below for broken collect2 doesn't work under 4.3+
5035238106Sdes	  collect2name=`${CC} -print-prog-name=collect2`
5036238106Sdes	  if test -f "$collect2name" &&
5037238106Sdes	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5038238106Sdes	  then
5039238106Sdes	  # We have reworked collect2
5040238106Sdes	  :
5041238106Sdes	  else
5042238106Sdes	  # We have old collect2
5043238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5044238106Sdes	  # It fails to find uninstalled libraries when the uninstalled
5045238106Sdes	  # path is not listed in the libpath.  Setting hardcode_minus_L
5046238106Sdes	  # to unsupported forces relinking
5047238106Sdes	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5048238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5049238106Sdes	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5050238106Sdes	  fi
5051238106Sdes	  ;;
5052238106Sdes	esac
5053238106Sdes	shared_flag='-shared'
5054238106Sdes	if test "$aix_use_runtimelinking" = yes; then
5055238106Sdes	  shared_flag="$shared_flag "'${wl}-G'
5056238106Sdes	fi
5057238106Sdes      else
5058238106Sdes	# not using gcc
5059238106Sdes	if test "$host_cpu" = ia64; then
5060238106Sdes	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5061238106Sdes	# chokes on -Wl,-G. The following line is correct:
5062238106Sdes	  shared_flag='-G'
5063238106Sdes	else
5064238106Sdes	  if test "$aix_use_runtimelinking" = yes; then
5065238106Sdes	    shared_flag='${wl}-G'
5066238106Sdes	  else
5067238106Sdes	    shared_flag='${wl}-bM:SRE'
5068238106Sdes	  fi
5069238106Sdes	fi
5070238106Sdes      fi
5071238106Sdes
5072238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5073238106Sdes      # It seems that -bexpall does not export symbols beginning with
5074238106Sdes      # underscore (_), so it is better to generate a list of symbols to export.
5075238106Sdes      _LT_TAGVAR(always_export_symbols, $1)=yes
5076238106Sdes      if test "$aix_use_runtimelinking" = yes; then
5077238106Sdes	# Warning - without using the other runtime loading flags (-brtl),
5078238106Sdes	# -berok will link without error, but may produce a broken library.
5079238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5080238106Sdes        # Determine the default libpath from the value encoded in an
5081238106Sdes        # empty executable.
5082238106Sdes        _LT_SYS_MODULE_PATH_AIX([$1])
5083238106Sdes        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5084238106Sdes        _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"
5085238106Sdes      else
5086238106Sdes	if test "$host_cpu" = ia64; then
5087238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5088238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5089238106Sdes	  _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"
5090238106Sdes	else
5091238106Sdes	 # Determine the default libpath from the value encoded in an
5092238106Sdes	 # empty executable.
5093238106Sdes	 _LT_SYS_MODULE_PATH_AIX([$1])
5094238106Sdes	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5095238106Sdes	  # Warning - without using the other run time loading flags,
5096238106Sdes	  # -berok will link without error, but may produce a broken library.
5097238106Sdes	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5098238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5099238106Sdes	  if test "$with_gnu_ld" = yes; then
5100238106Sdes	    # We only use this code for GNU lds that support --whole-archive.
5101238106Sdes	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5102238106Sdes	  else
5103238106Sdes	    # Exported symbols can be pulled into shared objects from archives
5104238106Sdes	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5105238106Sdes	  fi
5106238106Sdes	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5107238106Sdes	  # This is similar to how AIX traditionally builds its shared libraries.
5108238106Sdes	  _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'
5109238106Sdes	fi
5110238106Sdes      fi
5111238106Sdes      ;;
5112238106Sdes
5113238106Sdes    amigaos*)
5114238106Sdes      case $host_cpu in
5115238106Sdes      powerpc)
5116238106Sdes            # see comment about AmigaOS4 .so support
5117238106Sdes            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5118238106Sdes            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5119238106Sdes        ;;
5120238106Sdes      m68k)
5121238106Sdes            _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)'
5122238106Sdes            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5123238106Sdes            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5124238106Sdes        ;;
5125238106Sdes      esac
5126238106Sdes      ;;
5127238106Sdes
5128238106Sdes    bsdi[[45]]*)
5129238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5130238106Sdes      ;;
5131238106Sdes
5132238106Sdes    cygwin* | mingw* | pw32* | cegcc*)
5133238106Sdes      # When not using gcc, we currently assume that we are using
5134238106Sdes      # Microsoft Visual C++.
5135238106Sdes      # hardcode_libdir_flag_spec is actually meaningless, as there is
5136238106Sdes      # no search path for DLLs.
5137238106Sdes      case $cc_basename in
5138238106Sdes      cl*)
5139238106Sdes	# Native MSVC
5140238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5141238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5142238106Sdes	_LT_TAGVAR(always_export_symbols, $1)=yes
5143238106Sdes	_LT_TAGVAR(file_list_spec, $1)='@'
5144238106Sdes	# Tell ltmain to make .lib files, not .a files.
5145238106Sdes	libext=lib
5146238106Sdes	# Tell ltmain to make .dll files, not .so files.
5147238106Sdes	shrext_cmds=".dll"
5148238106Sdes	# FIXME: Setting linknames here is a bad hack.
5149238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5150238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5151238106Sdes	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5152238106Sdes	  else
5153238106Sdes	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5154238106Sdes	  fi~
5155238106Sdes	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5156238106Sdes	  linknames='
5157238106Sdes	# The linker will not automatically build a static lib if we build a DLL.
5158238106Sdes	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5159238106Sdes	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5160249141Sdes	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5161238106Sdes	_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'
5162238106Sdes	# Don't use ranlib
5163238106Sdes	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5164238106Sdes	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5165238106Sdes	  lt_tool_outputfile="@TOOL_OUTPUT@"~
5166238106Sdes	  case $lt_outputfile in
5167238106Sdes	    *.exe|*.EXE) ;;
5168238106Sdes	    *)
5169238106Sdes	      lt_outputfile="$lt_outputfile.exe"
5170238106Sdes	      lt_tool_outputfile="$lt_tool_outputfile.exe"
5171238106Sdes	      ;;
5172238106Sdes	  esac~
5173238106Sdes	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5174238106Sdes	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5175238106Sdes	    $RM "$lt_outputfile.manifest";
5176238106Sdes	  fi'
5177238106Sdes	;;
5178238106Sdes      *)
5179238106Sdes	# Assume MSVC wrapper
5180238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5181238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5182238106Sdes	# Tell ltmain to make .lib files, not .a files.
5183238106Sdes	libext=lib
5184238106Sdes	# Tell ltmain to make .dll files, not .so files.
5185238106Sdes	shrext_cmds=".dll"
5186238106Sdes	# FIXME: Setting linknames here is a bad hack.
5187238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5188238106Sdes	# The linker will automatically build a .lib file if we build a DLL.
5189238106Sdes	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5190238106Sdes	# FIXME: Should let the user specify the lib program.
5191238106Sdes	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5192238106Sdes	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5193238106Sdes	;;
5194238106Sdes      esac
5195238106Sdes      ;;
5196238106Sdes
5197238106Sdes    darwin* | rhapsody*)
5198238106Sdes      _LT_DARWIN_LINKER_FEATURES($1)
5199238106Sdes      ;;
5200238106Sdes
5201238106Sdes    dgux*)
5202238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5203238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5204238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5205238106Sdes      ;;
5206238106Sdes
5207238106Sdes    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5208238106Sdes    # support.  Future versions do this automatically, but an explicit c++rt0.o
5209238106Sdes    # does not break anything, and helps significantly (at the cost of a little
5210238106Sdes    # extra space).
5211238106Sdes    freebsd2.2*)
5212238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5213238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5214238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5215238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5216238106Sdes      ;;
5217238106Sdes
5218238106Sdes    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5219249141Sdes    freebsd2.*)
5220238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5221238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5222238106Sdes      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5223238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5224238106Sdes      ;;
5225238106Sdes
5226238106Sdes    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5227238106Sdes    freebsd* | dragonfly*)
5228238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5229238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5230238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5231238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5232238106Sdes      ;;
5233238106Sdes
5234238106Sdes    hpux9*)
5235238106Sdes      if test "$GCC" = yes; then
5236238106Sdes	_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'
5237238106Sdes      else
5238238106Sdes	_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'
5239238106Sdes      fi
5240238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5241238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5242238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5243238106Sdes
5244238106Sdes      # hardcode_minus_L: Not really in the search PATH,
5245238106Sdes      # but as the default location of the library.
5246238106Sdes      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5247238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5248238106Sdes      ;;
5249238106Sdes
5250238106Sdes    hpux10*)
5251238106Sdes      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5252238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5253238106Sdes      else
5254238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5255238106Sdes      fi
5256238106Sdes      if test "$with_gnu_ld" = no; then
5257238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5258238106Sdes	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5259238106Sdes	_LT_TAGVAR(hardcode_direct, $1)=yes
5260238106Sdes	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5261238106Sdes	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5262238106Sdes	# hardcode_minus_L: Not really in the search PATH,
5263238106Sdes	# but as the default location of the library.
5264238106Sdes	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5265238106Sdes      fi
5266238106Sdes      ;;
5267238106Sdes
5268238106Sdes    hpux11*)
5269238106Sdes      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5270238106Sdes	case $host_cpu in
5271238106Sdes	hppa*64*)
5272238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5273238106Sdes	  ;;
5274238106Sdes	ia64*)
5275238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5276238106Sdes	  ;;
5277238106Sdes	*)
5278238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5279238106Sdes	  ;;
5280238106Sdes	esac
5281238106Sdes      else
5282238106Sdes	case $host_cpu in
5283238106Sdes	hppa*64*)
5284238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5285238106Sdes	  ;;
5286238106Sdes	ia64*)
5287238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5288238106Sdes	  ;;
5289238106Sdes	*)
5290238106Sdes	m4_if($1, [], [
5291238106Sdes	  # Older versions of the 11.00 compiler do not understand -b yet
5292238106Sdes	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5293238106Sdes	  _LT_LINKER_OPTION([if $CC understands -b],
5294238106Sdes	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5295238106Sdes	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5296238106Sdes	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5297238106Sdes	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5298238106Sdes	  ;;
5299238106Sdes	esac
5300238106Sdes      fi
5301238106Sdes      if test "$with_gnu_ld" = no; then
5302238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5303238106Sdes	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5304238106Sdes
5305238106Sdes	case $host_cpu in
5306238106Sdes	hppa*64*|ia64*)
5307238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=no
5308238106Sdes	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5309238106Sdes	  ;;
5310238106Sdes	*)
5311238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=yes
5312238106Sdes	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5313238106Sdes	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5314238106Sdes
5315238106Sdes	  # hardcode_minus_L: Not really in the search PATH,
5316238106Sdes	  # but as the default location of the library.
5317238106Sdes	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5318238106Sdes	  ;;
5319238106Sdes	esac
5320238106Sdes      fi
5321238106Sdes      ;;
5322238106Sdes
5323238106Sdes    irix5* | irix6* | nonstopux*)
5324238106Sdes      if test "$GCC" = yes; then
5325238106Sdes	_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'
5326238106Sdes	# Try to use the -exported_symbol ld option, if it does not
5327238106Sdes	# work, assume that -exports_file does not work either and
5328238106Sdes	# implicitly export all symbols.
5329238106Sdes	# This should be the same for all languages, so no per-tag cache variable.
5330238106Sdes	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5331238106Sdes	  [lt_cv_irix_exported_symbol],
5332238106Sdes	  [save_LDFLAGS="$LDFLAGS"
5333238106Sdes	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5334238106Sdes	   AC_LINK_IFELSE(
5335238106Sdes	     [AC_LANG_SOURCE(
5336238106Sdes	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5337238106Sdes			      [C++], [[int foo (void) { return 0; }]],
5338238106Sdes			      [Fortran 77], [[
5339238106Sdes      subroutine foo
5340238106Sdes      end]],
5341238106Sdes			      [Fortran], [[
5342238106Sdes      subroutine foo
5343238106Sdes      end]])])],
5344238106Sdes	      [lt_cv_irix_exported_symbol=yes],
5345238106Sdes	      [lt_cv_irix_exported_symbol=no])
5346238106Sdes           LDFLAGS="$save_LDFLAGS"])
5347238106Sdes	if test "$lt_cv_irix_exported_symbol" = yes; then
5348238106Sdes          _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'
5349238106Sdes	fi
5350238106Sdes      else
5351238106Sdes	_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'
5352238106Sdes	_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'
5353238106Sdes      fi
5354238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5355238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5356238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5357238106Sdes      _LT_TAGVAR(inherit_rpath, $1)=yes
5358238106Sdes      _LT_TAGVAR(link_all_deplibs, $1)=yes
5359238106Sdes      ;;
5360238106Sdes
5361238106Sdes    netbsd*)
5362238106Sdes      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5363238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5364238106Sdes      else
5365238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5366238106Sdes      fi
5367238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5368238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5369238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5370238106Sdes      ;;
5371238106Sdes
5372238106Sdes    newsos6)
5373238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5374238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5375238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5376238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5377238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5378238106Sdes      ;;
5379238106Sdes
5380238106Sdes    *nto* | *qnx*)
5381238106Sdes      ;;
5382238106Sdes
5383238106Sdes    openbsd*)
5384238106Sdes      if test -f /usr/libexec/ld.so; then
5385238106Sdes	_LT_TAGVAR(hardcode_direct, $1)=yes
5386238106Sdes	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5387238106Sdes	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5388238106Sdes	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5389238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5390238106Sdes	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5391238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5392238106Sdes	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5393238106Sdes	else
5394238106Sdes	  case $host_os in
5395238106Sdes	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5396238106Sdes	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5397238106Sdes	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5398238106Sdes	     ;;
5399238106Sdes	   *)
5400238106Sdes	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5401238106Sdes	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5402238106Sdes	     ;;
5403238106Sdes	  esac
5404238106Sdes	fi
5405238106Sdes      else
5406238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
5407238106Sdes      fi
5408238106Sdes      ;;
5409238106Sdes
5410238106Sdes    os2*)
5411238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5412238106Sdes      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5413238106Sdes      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5414238106Sdes      _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'
5415238106Sdes      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5416238106Sdes      ;;
5417238106Sdes
5418238106Sdes    osf3*)
5419238106Sdes      if test "$GCC" = yes; then
5420238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5421238106Sdes	_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'
5422238106Sdes      else
5423238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5424238106Sdes	_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'
5425238106Sdes      fi
5426238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5427238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5428238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5429238106Sdes      ;;
5430238106Sdes
5431238106Sdes    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5432238106Sdes      if test "$GCC" = yes; then
5433238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5434238106Sdes	_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'
5435238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5436238106Sdes      else
5437238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5438238106Sdes	_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'
5439238106Sdes	_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~
5440238106Sdes	$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'
5441238106Sdes
5442238106Sdes	# Both c and cxx compiler support -rpath directly
5443238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5444238106Sdes      fi
5445238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5446238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5447238106Sdes      ;;
5448238106Sdes
5449238106Sdes    solaris*)
5450238106Sdes      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5451238106Sdes      if test "$GCC" = yes; then
5452238106Sdes	wlarc='${wl}'
5453238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5454238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5455238106Sdes	  $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'
5456238106Sdes      else
5457238106Sdes	case `$CC -V 2>&1` in
5458238106Sdes	*"Compilers 5.0"*)
5459238106Sdes	  wlarc=''
5460238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5461238106Sdes	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5462238106Sdes	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5463238106Sdes	  ;;
5464238106Sdes	*)
5465238106Sdes	  wlarc='${wl}'
5466238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5467238106Sdes	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5468238106Sdes	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5469238106Sdes	  ;;
5470238106Sdes	esac
5471238106Sdes      fi
5472238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5473238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5474238106Sdes      case $host_os in
5475238106Sdes      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5476238106Sdes      *)
5477238106Sdes	# The compiler driver will combine and reorder linker options,
5478238106Sdes	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5479238106Sdes	# but is careful enough not to reorder.
5480238106Sdes	# Supported since Solaris 2.6 (maybe 2.5.1?)
5481238106Sdes	if test "$GCC" = yes; then
5482238106Sdes	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5483238106Sdes	else
5484238106Sdes	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5485238106Sdes	fi
5486238106Sdes	;;
5487238106Sdes      esac
5488238106Sdes      _LT_TAGVAR(link_all_deplibs, $1)=yes
5489238106Sdes      ;;
5490238106Sdes
5491238106Sdes    sunos4*)
5492238106Sdes      if test "x$host_vendor" = xsequent; then
5493238106Sdes	# Use $CC to link under sequent, because it throws in some extra .o
5494238106Sdes	# files that make .init and .fini sections work.
5495238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5496238106Sdes      else
5497238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5498238106Sdes      fi
5499238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5500238106Sdes      _LT_TAGVAR(hardcode_direct, $1)=yes
5501238106Sdes      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5502238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5503238106Sdes      ;;
5504238106Sdes
5505238106Sdes    sysv4)
5506238106Sdes      case $host_vendor in
5507238106Sdes	sni)
5508238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5509238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5510238106Sdes	;;
5511238106Sdes	siemens)
5512238106Sdes	  ## LD is ld it makes a PLAMLIB
5513238106Sdes	  ## CC just makes a GrossModule.
5514238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5515238106Sdes	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5516238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=no
5517238106Sdes        ;;
5518238106Sdes	motorola)
5519238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5520238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5521238106Sdes	;;
5522238106Sdes      esac
5523238106Sdes      runpath_var='LD_RUN_PATH'
5524238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5525238106Sdes      ;;
5526238106Sdes
5527238106Sdes    sysv4.3*)
5528238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5529238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5530238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5531238106Sdes      ;;
5532238106Sdes
5533238106Sdes    sysv4*MP*)
5534238106Sdes      if test -d /usr/nec; then
5535238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5536238106Sdes	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5537238106Sdes	runpath_var=LD_RUN_PATH
5538238106Sdes	hardcode_runpath_var=yes
5539238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=yes
5540238106Sdes      fi
5541238106Sdes      ;;
5542238106Sdes
5543238106Sdes    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5544238106Sdes      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5545238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5546238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5547238106Sdes      runpath_var='LD_RUN_PATH'
5548238106Sdes
5549238106Sdes      if test "$GCC" = yes; then
5550238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5551238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5552238106Sdes      else
5553238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5554238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5555238106Sdes      fi
5556238106Sdes      ;;
5557238106Sdes
5558238106Sdes    sysv5* | sco3.2v5* | sco5v6*)
5559238106Sdes      # Note: We can NOT use -z defs as we might desire, because we do not
5560238106Sdes      # link with -lc, and that would cause any symbols used from libc to
5561238106Sdes      # always be unresolved, which means just about no library would
5562238106Sdes      # ever link correctly.  If we're not using GNU ld we use -z text
5563238106Sdes      # though, which does catch some bad symbols but isn't as heavy-handed
5564238106Sdes      # as -z defs.
5565238106Sdes      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5566238106Sdes      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5567238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5568238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5569238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5570238106Sdes      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5571238106Sdes      _LT_TAGVAR(link_all_deplibs, $1)=yes
5572238106Sdes      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5573238106Sdes      runpath_var='LD_RUN_PATH'
5574238106Sdes
5575238106Sdes      if test "$GCC" = yes; then
5576238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5577238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5578238106Sdes      else
5579238106Sdes	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5580238106Sdes	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5581238106Sdes      fi
5582238106Sdes      ;;
5583238106Sdes
5584238106Sdes    uts4*)
5585238106Sdes      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5586238106Sdes      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5587238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5588238106Sdes      ;;
5589238106Sdes
5590238106Sdes    *)
5591238106Sdes      _LT_TAGVAR(ld_shlibs, $1)=no
5592238106Sdes      ;;
5593238106Sdes    esac
5594238106Sdes
5595238106Sdes    if test x$host_vendor = xsni; then
5596238106Sdes      case $host in
5597238106Sdes      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5598238106Sdes	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5599238106Sdes	;;
5600238106Sdes      esac
5601238106Sdes    fi
5602238106Sdes  fi
5603238106Sdes])
5604238106SdesAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5605238106Sdestest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5606238106Sdes
5607238106Sdes_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5608238106Sdes
5609238106Sdes_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5610238106Sdes_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5611238106Sdes_LT_DECL([], [extract_expsyms_cmds], [2],
5612238106Sdes    [The commands to extract the exported symbol list from a shared archive])
5613238106Sdes
5614238106Sdes#
5615238106Sdes# Do we need to explicitly link libc?
5616238106Sdes#
5617238106Sdescase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5618238106Sdesx|xyes)
5619238106Sdes  # Assume -lc should be added
5620238106Sdes  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5621238106Sdes
5622238106Sdes  if test "$enable_shared" = yes && test "$GCC" = yes; then
5623238106Sdes    case $_LT_TAGVAR(archive_cmds, $1) in
5624238106Sdes    *'~'*)
5625238106Sdes      # FIXME: we may have to deal with multi-command sequences.
5626238106Sdes      ;;
5627238106Sdes    '$CC '*)
5628238106Sdes      # Test whether the compiler implicitly links with -lc since on some
5629238106Sdes      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5630238106Sdes      # to ld, don't add -lc before -lgcc.
5631238106Sdes      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5632238106Sdes	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5633238106Sdes	[$RM conftest*
5634238106Sdes	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5635238106Sdes
5636238106Sdes	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5637238106Sdes	  soname=conftest
5638238106Sdes	  lib=conftest
5639238106Sdes	  libobjs=conftest.$ac_objext
5640238106Sdes	  deplibs=
5641238106Sdes	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5642238106Sdes	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5643238106Sdes	  compiler_flags=-v
5644238106Sdes	  linker_flags=-v
5645238106Sdes	  verstring=
5646238106Sdes	  output_objdir=.
5647238106Sdes	  libname=conftest
5648238106Sdes	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5649238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)=
5650238106Sdes	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5651238106Sdes	  then
5652238106Sdes	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5653238106Sdes	  else
5654238106Sdes	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5655238106Sdes	  fi
5656238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5657238106Sdes	else
5658238106Sdes	  cat conftest.err 1>&5
5659238106Sdes	fi
5660238106Sdes	$RM conftest*
5661238106Sdes	])
5662238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5663238106Sdes      ;;
5664238106Sdes    esac
5665238106Sdes  fi
5666238106Sdes  ;;
5667238106Sdesesac
5668238106Sdes
5669238106Sdes_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5670238106Sdes    [Whether or not to add -lc for building shared libraries])
5671238106Sdes_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5672238106Sdes    [enable_shared_with_static_runtimes], [0],
5673238106Sdes    [Whether or not to disallow shared libs when runtime libs are static])
5674238106Sdes_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5675238106Sdes    [Compiler flag to allow reflexive dlopens])
5676238106Sdes_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5677238106Sdes    [Compiler flag to generate shared objects directly from archives])
5678238106Sdes_LT_TAGDECL([], [compiler_needs_object], [1],
5679238106Sdes    [Whether the compiler copes with passing no objects directly])
5680238106Sdes_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5681238106Sdes    [Create an old-style archive from a shared archive])
5682238106Sdes_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5683238106Sdes    [Create a temporary old-style archive to link instead of a shared archive])
5684238106Sdes_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5685238106Sdes_LT_TAGDECL([], [archive_expsym_cmds], [2])
5686238106Sdes_LT_TAGDECL([], [module_cmds], [2],
5687238106Sdes    [Commands used to build a loadable module if different from building
5688238106Sdes    a shared archive.])
5689238106Sdes_LT_TAGDECL([], [module_expsym_cmds], [2])
5690238106Sdes_LT_TAGDECL([], [with_gnu_ld], [1],
5691238106Sdes    [Whether we are building with GNU ld or not])
5692238106Sdes_LT_TAGDECL([], [allow_undefined_flag], [1],
5693238106Sdes    [Flag that allows shared libraries with undefined symbols to be built])
5694238106Sdes_LT_TAGDECL([], [no_undefined_flag], [1],
5695238106Sdes    [Flag that enforces no undefined symbols])
5696238106Sdes_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5697238106Sdes    [Flag to hardcode $libdir into a binary during linking.
5698238106Sdes    This must work even if $libdir does not exist])
5699238106Sdes_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5700238106Sdes    [Whether we need a single "-rpath" flag with a separated argument])
5701238106Sdes_LT_TAGDECL([], [hardcode_direct], [0],
5702238106Sdes    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5703238106Sdes    DIR into the resulting binary])
5704238106Sdes_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5705238106Sdes    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5706238106Sdes    DIR into the resulting binary and the resulting library dependency is
5707238106Sdes    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5708238106Sdes    library is relocated])
5709238106Sdes_LT_TAGDECL([], [hardcode_minus_L], [0],
5710238106Sdes    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5711238106Sdes    into the resulting binary])
5712238106Sdes_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5713238106Sdes    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5714238106Sdes    into the resulting binary])
5715238106Sdes_LT_TAGDECL([], [hardcode_automatic], [0],
5716238106Sdes    [Set to "yes" if building a shared library automatically hardcodes DIR
5717238106Sdes    into the library and all subsequent libraries and executables linked
5718238106Sdes    against it])
5719238106Sdes_LT_TAGDECL([], [inherit_rpath], [0],
5720238106Sdes    [Set to yes if linker adds runtime paths of dependent libraries
5721238106Sdes    to runtime path list])
5722238106Sdes_LT_TAGDECL([], [link_all_deplibs], [0],
5723238106Sdes    [Whether libtool must link a program against all its dependency libraries])
5724238106Sdes_LT_TAGDECL([], [always_export_symbols], [0],
5725238106Sdes    [Set to "yes" if exported symbols are required])
5726238106Sdes_LT_TAGDECL([], [export_symbols_cmds], [2],
5727238106Sdes    [The commands to list exported symbols])
5728238106Sdes_LT_TAGDECL([], [exclude_expsyms], [1],
5729238106Sdes    [Symbols that should not be listed in the preloaded symbols])
5730238106Sdes_LT_TAGDECL([], [include_expsyms], [1],
5731238106Sdes    [Symbols that must always be exported])
5732238106Sdes_LT_TAGDECL([], [prelink_cmds], [2],
5733238106Sdes    [Commands necessary for linking programs (against libraries) with templates])
5734238106Sdes_LT_TAGDECL([], [postlink_cmds], [2],
5735238106Sdes    [Commands necessary for finishing linking programs])
5736238106Sdes_LT_TAGDECL([], [file_list_spec], [1],
5737238106Sdes    [Specify filename containing input files])
5738238106Sdesdnl FIXME: Not yet implemented
5739238106Sdesdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5740238106Sdesdnl    [Compiler flag to generate thread safe objects])
5741238106Sdes])# _LT_LINKER_SHLIBS
5742238106Sdes
5743238106Sdes
5744238106Sdes# _LT_LANG_C_CONFIG([TAG])
5745238106Sdes# ------------------------
5746238106Sdes# Ensure that the configuration variables for a C compiler are suitably
5747238106Sdes# defined.  These variables are subsequently used by _LT_CONFIG to write
5748238106Sdes# the compiler configuration to `libtool'.
5749238106Sdesm4_defun([_LT_LANG_C_CONFIG],
5750238106Sdes[m4_require([_LT_DECL_EGREP])dnl
5751238106Sdeslt_save_CC="$CC"
5752238106SdesAC_LANG_PUSH(C)
5753238106Sdes
5754238106Sdes# Source file extension for C test sources.
5755238106Sdesac_ext=c
5756238106Sdes
5757238106Sdes# Object file extension for compiled C test sources.
5758238106Sdesobjext=o
5759238106Sdes_LT_TAGVAR(objext, $1)=$objext
5760238106Sdes
5761238106Sdes# Code to be used in simple compile tests
5762238106Sdeslt_simple_compile_test_code="int some_variable = 0;"
5763238106Sdes
5764238106Sdes# Code to be used in simple link tests
5765238106Sdeslt_simple_link_test_code='int main(){return(0);}'
5766238106Sdes
5767238106Sdes_LT_TAG_COMPILER
5768238106Sdes# Save the default compiler, since it gets overwritten when the other
5769238106Sdes# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5770238106Sdescompiler_DEFAULT=$CC
5771238106Sdes
5772238106Sdes# save warnings/boilerplate of simple test code
5773238106Sdes_LT_COMPILER_BOILERPLATE
5774238106Sdes_LT_LINKER_BOILERPLATE
5775238106Sdes
5776238106Sdesif test -n "$compiler"; then
5777238106Sdes  _LT_COMPILER_NO_RTTI($1)
5778238106Sdes  _LT_COMPILER_PIC($1)
5779238106Sdes  _LT_COMPILER_C_O($1)
5780238106Sdes  _LT_COMPILER_FILE_LOCKS($1)
5781238106Sdes  _LT_LINKER_SHLIBS($1)
5782238106Sdes  _LT_SYS_DYNAMIC_LINKER($1)
5783238106Sdes  _LT_LINKER_HARDCODE_LIBPATH($1)
5784238106Sdes  LT_SYS_DLOPEN_SELF
5785238106Sdes  _LT_CMD_STRIPLIB
5786238106Sdes
5787238106Sdes  # Report which library types will actually be built
5788238106Sdes  AC_MSG_CHECKING([if libtool supports shared libraries])
5789238106Sdes  AC_MSG_RESULT([$can_build_shared])
5790238106Sdes
5791238106Sdes  AC_MSG_CHECKING([whether to build shared libraries])
5792238106Sdes  test "$can_build_shared" = "no" && enable_shared=no
5793238106Sdes
5794238106Sdes  # On AIX, shared libraries and static libraries use the same namespace, and
5795238106Sdes  # are all built from PIC.
5796238106Sdes  case $host_os in
5797238106Sdes  aix3*)
5798238106Sdes    test "$enable_shared" = yes && enable_static=no
5799238106Sdes    if test -n "$RANLIB"; then
5800238106Sdes      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5801238106Sdes      postinstall_cmds='$RANLIB $lib'
5802238106Sdes    fi
5803238106Sdes    ;;
5804238106Sdes
5805238106Sdes  aix[[4-9]]*)
5806238106Sdes    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5807238106Sdes      test "$enable_shared" = yes && enable_static=no
5808238106Sdes    fi
5809238106Sdes    ;;
5810238106Sdes  esac
5811238106Sdes  AC_MSG_RESULT([$enable_shared])
5812238106Sdes
5813238106Sdes  AC_MSG_CHECKING([whether to build static libraries])
5814238106Sdes  # Make sure either enable_shared or enable_static is yes.
5815238106Sdes  test "$enable_shared" = yes || enable_static=yes
5816238106Sdes  AC_MSG_RESULT([$enable_static])
5817238106Sdes
5818238106Sdes  _LT_CONFIG($1)
5819238106Sdesfi
5820238106SdesAC_LANG_POP
5821238106SdesCC="$lt_save_CC"
5822238106Sdes])# _LT_LANG_C_CONFIG
5823238106Sdes
5824238106Sdes
5825238106Sdes# _LT_LANG_CXX_CONFIG([TAG])
5826238106Sdes# --------------------------
5827238106Sdes# Ensure that the configuration variables for a C++ compiler are suitably
5828238106Sdes# defined.  These variables are subsequently used by _LT_CONFIG to write
5829238106Sdes# the compiler configuration to `libtool'.
5830238106Sdesm4_defun([_LT_LANG_CXX_CONFIG],
5831238106Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5832238106Sdesm4_require([_LT_DECL_EGREP])dnl
5833238106Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl
5834238106Sdesif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5835238106Sdes    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5836238106Sdes    (test "X$CXX" != "Xg++"))) ; then
5837238106Sdes  AC_PROG_CXXCPP
5838238106Sdeselse
5839238106Sdes  _lt_caught_CXX_error=yes
5840238106Sdesfi
5841238106Sdes
5842238106SdesAC_LANG_PUSH(C++)
5843238106Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5844238106Sdes_LT_TAGVAR(allow_undefined_flag, $1)=
5845238106Sdes_LT_TAGVAR(always_export_symbols, $1)=no
5846238106Sdes_LT_TAGVAR(archive_expsym_cmds, $1)=
5847238106Sdes_LT_TAGVAR(compiler_needs_object, $1)=no
5848238106Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5849238106Sdes_LT_TAGVAR(hardcode_direct, $1)=no
5850238106Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5851238106Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5852238106Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)=
5853238106Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no
5854238106Sdes_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5855238106Sdes_LT_TAGVAR(hardcode_automatic, $1)=no
5856238106Sdes_LT_TAGVAR(inherit_rpath, $1)=no
5857238106Sdes_LT_TAGVAR(module_cmds, $1)=
5858238106Sdes_LT_TAGVAR(module_expsym_cmds, $1)=
5859238106Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown
5860238106Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5861238106Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag
5862238106Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5863238106Sdes_LT_TAGVAR(no_undefined_flag, $1)=
5864238106Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)=
5865238106Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5866238106Sdes
5867238106Sdes# Source file extension for C++ test sources.
5868238106Sdesac_ext=cpp
5869238106Sdes
5870238106Sdes# Object file extension for compiled C++ test sources.
5871238106Sdesobjext=o
5872238106Sdes_LT_TAGVAR(objext, $1)=$objext
5873238106Sdes
5874238106Sdes# No sense in running all these tests if we already determined that
5875238106Sdes# the CXX compiler isn't working.  Some variables (like enable_shared)
5876238106Sdes# are currently assumed to apply to all compilers on this platform,
5877238106Sdes# and will be corrupted by setting them based on a non-working compiler.
5878238106Sdesif test "$_lt_caught_CXX_error" != yes; then
5879238106Sdes  # Code to be used in simple compile tests
5880238106Sdes  lt_simple_compile_test_code="int some_variable = 0;"
5881238106Sdes
5882238106Sdes  # Code to be used in simple link tests
5883238106Sdes  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5884238106Sdes
5885238106Sdes  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5886238106Sdes  _LT_TAG_COMPILER
5887238106Sdes
5888238106Sdes  # save warnings/boilerplate of simple test code
5889238106Sdes  _LT_COMPILER_BOILERPLATE
5890238106Sdes  _LT_LINKER_BOILERPLATE
5891238106Sdes
5892238106Sdes  # Allow CC to be a program name with arguments.
5893238106Sdes  lt_save_CC=$CC
5894238106Sdes  lt_save_CFLAGS=$CFLAGS
5895238106Sdes  lt_save_LD=$LD
5896238106Sdes  lt_save_GCC=$GCC
5897238106Sdes  GCC=$GXX
5898238106Sdes  lt_save_with_gnu_ld=$with_gnu_ld
5899238106Sdes  lt_save_path_LD=$lt_cv_path_LD
5900238106Sdes  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5901238106Sdes    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5902238106Sdes  else
5903238106Sdes    $as_unset lt_cv_prog_gnu_ld
5904238106Sdes  fi
5905238106Sdes  if test -n "${lt_cv_path_LDCXX+set}"; then
5906238106Sdes    lt_cv_path_LD=$lt_cv_path_LDCXX
5907238106Sdes  else
5908238106Sdes    $as_unset lt_cv_path_LD
5909238106Sdes  fi
5910238106Sdes  test -z "${LDCXX+set}" || LD=$LDCXX
5911238106Sdes  CC=${CXX-"c++"}
5912238106Sdes  CFLAGS=$CXXFLAGS
5913238106Sdes  compiler=$CC
5914238106Sdes  _LT_TAGVAR(compiler, $1)=$CC
5915238106Sdes  _LT_CC_BASENAME([$compiler])
5916238106Sdes
5917238106Sdes  if test -n "$compiler"; then
5918238106Sdes    # We don't want -fno-exception when compiling C++ code, so set the
5919238106Sdes    # no_builtin_flag separately
5920238106Sdes    if test "$GXX" = yes; then
5921238106Sdes      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5922238106Sdes    else
5923238106Sdes      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5924238106Sdes    fi
5925238106Sdes
5926238106Sdes    if test "$GXX" = yes; then
5927238106Sdes      # Set up default GNU C++ configuration
5928238106Sdes
5929238106Sdes      LT_PATH_LD
5930238106Sdes
5931238106Sdes      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5932238106Sdes      # archiving commands below assume that GNU ld is being used.
5933238106Sdes      if test "$with_gnu_ld" = yes; then
5934238106Sdes        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5935238106Sdes        _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'
5936238106Sdes
5937238106Sdes        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5938238106Sdes        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5939238106Sdes
5940238106Sdes        # If archive_cmds runs LD, not CC, wlarc should be empty
5941238106Sdes        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5942238106Sdes        #     investigate it a little bit more. (MM)
5943238106Sdes        wlarc='${wl}'
5944238106Sdes
5945238106Sdes        # ancient GNU ld didn't support --whole-archive et. al.
5946238106Sdes        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5947238106Sdes	  $GREP 'no-whole-archive' > /dev/null; then
5948238106Sdes          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5949238106Sdes        else
5950238106Sdes          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5951238106Sdes        fi
5952238106Sdes      else
5953238106Sdes        with_gnu_ld=no
5954238106Sdes        wlarc=
5955238106Sdes
5956238106Sdes        # A generic and very simple default shared library creation
5957238106Sdes        # command for GNU C++ for the case where it uses the native
5958238106Sdes        # linker, instead of GNU ld.  If possible, this setting should
5959238106Sdes        # overridden to take advantage of the native linker features on
5960238106Sdes        # the platform it is being used on.
5961238106Sdes        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5962238106Sdes      fi
5963238106Sdes
5964238106Sdes      # Commands to make compiler produce verbose output that lists
5965238106Sdes      # what "hidden" libraries, object files and flags are used when
5966238106Sdes      # linking a shared library.
5967238106Sdes      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5968238106Sdes
5969238106Sdes    else
5970238106Sdes      GXX=no
5971238106Sdes      with_gnu_ld=no
5972238106Sdes      wlarc=
5973238106Sdes    fi
5974238106Sdes
5975238106Sdes    # PORTME: fill in a description of your system's C++ link characteristics
5976238106Sdes    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5977238106Sdes    _LT_TAGVAR(ld_shlibs, $1)=yes
5978238106Sdes    case $host_os in
5979238106Sdes      aix3*)
5980238106Sdes        # FIXME: insert proper C++ library support
5981238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
5982238106Sdes        ;;
5983238106Sdes      aix[[4-9]]*)
5984238106Sdes        if test "$host_cpu" = ia64; then
5985238106Sdes          # On IA64, the linker does run time linking by default, so we don't
5986238106Sdes          # have to do anything special.
5987238106Sdes          aix_use_runtimelinking=no
5988238106Sdes          exp_sym_flag='-Bexport'
5989238106Sdes          no_entry_flag=""
5990238106Sdes        else
5991238106Sdes          aix_use_runtimelinking=no
5992238106Sdes
5993238106Sdes          # Test if we are trying to use run time linking or normal
5994238106Sdes          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5995238106Sdes          # need to do runtime linking.
5996238106Sdes          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5997238106Sdes	    for ld_flag in $LDFLAGS; do
5998238106Sdes	      case $ld_flag in
5999238106Sdes	      *-brtl*)
6000238106Sdes	        aix_use_runtimelinking=yes
6001238106Sdes	        break
6002238106Sdes	        ;;
6003238106Sdes	      esac
6004238106Sdes	    done
6005238106Sdes	    ;;
6006238106Sdes          esac
6007238106Sdes
6008238106Sdes          exp_sym_flag='-bexport'
6009238106Sdes          no_entry_flag='-bnoentry'
6010238106Sdes        fi
6011238106Sdes
6012238106Sdes        # When large executables or shared objects are built, AIX ld can
6013238106Sdes        # have problems creating the table of contents.  If linking a library
6014238106Sdes        # or program results in "error TOC overflow" add -mminimal-toc to
6015238106Sdes        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6016238106Sdes        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6017238106Sdes
6018238106Sdes        _LT_TAGVAR(archive_cmds, $1)=''
6019238106Sdes        _LT_TAGVAR(hardcode_direct, $1)=yes
6020238106Sdes        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6021238106Sdes        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6022238106Sdes        _LT_TAGVAR(link_all_deplibs, $1)=yes
6023238106Sdes        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6024238106Sdes
6025238106Sdes        if test "$GXX" = yes; then
6026238106Sdes          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6027238106Sdes          # We only want to do this on AIX 4.2 and lower, the check
6028238106Sdes          # below for broken collect2 doesn't work under 4.3+
6029238106Sdes	  collect2name=`${CC} -print-prog-name=collect2`
6030238106Sdes	  if test -f "$collect2name" &&
6031238106Sdes	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6032238106Sdes	  then
6033238106Sdes	    # We have reworked collect2
6034238106Sdes	    :
6035238106Sdes	  else
6036238106Sdes	    # We have old collect2
6037238106Sdes	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6038238106Sdes	    # It fails to find uninstalled libraries when the uninstalled
6039238106Sdes	    # path is not listed in the libpath.  Setting hardcode_minus_L
6040238106Sdes	    # to unsupported forces relinking
6041238106Sdes	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6042238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6043238106Sdes	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6044238106Sdes	  fi
6045238106Sdes          esac
6046238106Sdes          shared_flag='-shared'
6047238106Sdes	  if test "$aix_use_runtimelinking" = yes; then
6048238106Sdes	    shared_flag="$shared_flag "'${wl}-G'
6049238106Sdes	  fi
6050238106Sdes        else
6051238106Sdes          # not using gcc
6052238106Sdes          if test "$host_cpu" = ia64; then
6053238106Sdes	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6054238106Sdes	  # chokes on -Wl,-G. The following line is correct:
6055238106Sdes	  shared_flag='-G'
6056238106Sdes          else
6057238106Sdes	    if test "$aix_use_runtimelinking" = yes; then
6058238106Sdes	      shared_flag='${wl}-G'
6059238106Sdes	    else
6060238106Sdes	      shared_flag='${wl}-bM:SRE'
6061238106Sdes	    fi
6062238106Sdes          fi
6063238106Sdes        fi
6064238106Sdes
6065238106Sdes        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6066238106Sdes        # It seems that -bexpall does not export symbols beginning with
6067238106Sdes        # underscore (_), so it is better to generate a list of symbols to
6068238106Sdes	# export.
6069238106Sdes        _LT_TAGVAR(always_export_symbols, $1)=yes
6070238106Sdes        if test "$aix_use_runtimelinking" = yes; then
6071238106Sdes          # Warning - without using the other runtime loading flags (-brtl),
6072238106Sdes          # -berok will link without error, but may produce a broken library.
6073238106Sdes          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6074238106Sdes          # Determine the default libpath from the value encoded in an empty
6075238106Sdes          # executable.
6076238106Sdes          _LT_SYS_MODULE_PATH_AIX([$1])
6077238106Sdes          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6078238106Sdes
6079238106Sdes          _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"
6080238106Sdes        else
6081238106Sdes          if test "$host_cpu" = ia64; then
6082238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6083238106Sdes	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6084238106Sdes	    _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"
6085238106Sdes          else
6086238106Sdes	    # Determine the default libpath from the value encoded in an
6087238106Sdes	    # empty executable.
6088238106Sdes	    _LT_SYS_MODULE_PATH_AIX([$1])
6089238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6090238106Sdes	    # Warning - without using the other run time loading flags,
6091238106Sdes	    # -berok will link without error, but may produce a broken library.
6092238106Sdes	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6093238106Sdes	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6094238106Sdes	    if test "$with_gnu_ld" = yes; then
6095238106Sdes	      # We only use this code for GNU lds that support --whole-archive.
6096238106Sdes	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6097238106Sdes	    else
6098238106Sdes	      # Exported symbols can be pulled into shared objects from archives
6099238106Sdes	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6100238106Sdes	    fi
6101238106Sdes	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6102238106Sdes	    # This is similar to how AIX traditionally builds its shared
6103238106Sdes	    # libraries.
6104238106Sdes	    _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'
6105238106Sdes          fi
6106238106Sdes        fi
6107238106Sdes        ;;
6108238106Sdes
6109238106Sdes      beos*)
6110238106Sdes	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6111238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6112238106Sdes	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6113238106Sdes	  # support --undefined.  This deserves some investigation.  FIXME
6114238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6115238106Sdes	else
6116238106Sdes	  _LT_TAGVAR(ld_shlibs, $1)=no
6117238106Sdes	fi
6118238106Sdes	;;
6119238106Sdes
6120238106Sdes      chorus*)
6121238106Sdes        case $cc_basename in
6122238106Sdes          *)
6123238106Sdes	  # FIXME: insert proper C++ library support
6124238106Sdes	  _LT_TAGVAR(ld_shlibs, $1)=no
6125238106Sdes	  ;;
6126238106Sdes        esac
6127238106Sdes        ;;
6128238106Sdes
6129238106Sdes      cygwin* | mingw* | pw32* | cegcc*)
6130238106Sdes	case $GXX,$cc_basename in
6131238106Sdes	,cl* | no,cl*)
6132238106Sdes	  # Native MSVC
6133238106Sdes	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6134238106Sdes	  # no search path for DLLs.
6135238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6136238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6137238106Sdes	  _LT_TAGVAR(always_export_symbols, $1)=yes
6138238106Sdes	  _LT_TAGVAR(file_list_spec, $1)='@'
6139238106Sdes	  # Tell ltmain to make .lib files, not .a files.
6140238106Sdes	  libext=lib
6141238106Sdes	  # Tell ltmain to make .dll files, not .so files.
6142238106Sdes	  shrext_cmds=".dll"
6143238106Sdes	  # FIXME: Setting linknames here is a bad hack.
6144238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6145238106Sdes	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6146238106Sdes	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6147238106Sdes	    else
6148238106Sdes	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6149238106Sdes	    fi~
6150238106Sdes	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6151238106Sdes	    linknames='
6152238106Sdes	  # The linker will not automatically build a static lib if we build a DLL.
6153238106Sdes	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6154238106Sdes	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6155238106Sdes	  # Don't use ranlib
6156238106Sdes	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6157238106Sdes	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6158238106Sdes	    lt_tool_outputfile="@TOOL_OUTPUT@"~
6159238106Sdes	    case $lt_outputfile in
6160238106Sdes	      *.exe|*.EXE) ;;
6161238106Sdes	      *)
6162238106Sdes		lt_outputfile="$lt_outputfile.exe"
6163238106Sdes		lt_tool_outputfile="$lt_tool_outputfile.exe"
6164238106Sdes		;;
6165238106Sdes	    esac~
6166238106Sdes	    func_to_tool_file "$lt_outputfile"~
6167238106Sdes	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6168238106Sdes	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6169238106Sdes	      $RM "$lt_outputfile.manifest";
6170238106Sdes	    fi'
6171238106Sdes	  ;;
6172238106Sdes	*)
6173238106Sdes	  # g++
6174238106Sdes	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6175238106Sdes	  # as there is no search path for DLLs.
6176238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6177238106Sdes	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6178238106Sdes	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6179238106Sdes	  _LT_TAGVAR(always_export_symbols, $1)=no
6180238106Sdes	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6181238106Sdes
6182238106Sdes	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6183238106Sdes	    _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'
6184238106Sdes	    # If the export-symbols file already is a .def file (1st line
6185238106Sdes	    # is EXPORTS), use it as is; otherwise, prepend...
6186238106Sdes	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6187238106Sdes	      cp $export_symbols $output_objdir/$soname.def;
6188238106Sdes	    else
6189238106Sdes	      echo EXPORTS > $output_objdir/$soname.def;
6190238106Sdes	      cat $export_symbols >> $output_objdir/$soname.def;
6191238106Sdes	    fi~
6192238106Sdes	    $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'
6193238106Sdes	  else
6194238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6195238106Sdes	  fi
6196238106Sdes	  ;;
6197238106Sdes	esac
6198238106Sdes	;;
6199238106Sdes      darwin* | rhapsody*)
6200238106Sdes        _LT_DARWIN_LINKER_FEATURES($1)
6201238106Sdes	;;
6202238106Sdes
6203238106Sdes      dgux*)
6204238106Sdes        case $cc_basename in
6205238106Sdes          ec++*)
6206238106Sdes	    # FIXME: insert proper C++ library support
6207238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6208238106Sdes	    ;;
6209238106Sdes          ghcx*)
6210238106Sdes	    # Green Hills C++ Compiler
6211238106Sdes	    # FIXME: insert proper C++ library support
6212238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6213238106Sdes	    ;;
6214238106Sdes          *)
6215238106Sdes	    # FIXME: insert proper C++ library support
6216238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6217238106Sdes	    ;;
6218238106Sdes        esac
6219238106Sdes        ;;
6220238106Sdes
6221249141Sdes      freebsd2.*)
6222238106Sdes        # C++ shared libraries reported to be fairly broken before
6223238106Sdes	# switch to ELF
6224238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
6225238106Sdes        ;;
6226238106Sdes
6227238106Sdes      freebsd-elf*)
6228238106Sdes        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6229238106Sdes        ;;
6230238106Sdes
6231238106Sdes      freebsd* | dragonfly*)
6232238106Sdes        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6233238106Sdes        # conventions
6234238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=yes
6235238106Sdes        ;;
6236238106Sdes
6237238106Sdes      gnu*)
6238238106Sdes        ;;
6239238106Sdes
6240238106Sdes      haiku*)
6241238106Sdes        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6242238106Sdes        _LT_TAGVAR(link_all_deplibs, $1)=yes
6243238106Sdes        ;;
6244238106Sdes
6245238106Sdes      hpux9*)
6246238106Sdes        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6247238106Sdes        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6248238106Sdes        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6249238106Sdes        _LT_TAGVAR(hardcode_direct, $1)=yes
6250238106Sdes        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6251238106Sdes				             # but as the default
6252238106Sdes				             # location of the library.
6253238106Sdes
6254238106Sdes        case $cc_basename in
6255238106Sdes          CC*)
6256238106Sdes            # FIXME: insert proper C++ library support
6257238106Sdes            _LT_TAGVAR(ld_shlibs, $1)=no
6258238106Sdes            ;;
6259238106Sdes          aCC*)
6260238106Sdes            _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'
6261238106Sdes            # Commands to make compiler produce verbose output that lists
6262238106Sdes            # what "hidden" libraries, object files and flags are used when
6263238106Sdes            # linking a shared library.
6264238106Sdes            #
6265238106Sdes            # There doesn't appear to be a way to prevent this compiler from
6266238106Sdes            # explicitly linking system object files so we need to strip them
6267238106Sdes            # from the output so that they don't get included in the library
6268238106Sdes            # dependencies.
6269238106Sdes            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"'
6270238106Sdes            ;;
6271238106Sdes          *)
6272238106Sdes            if test "$GXX" = yes; then
6273238106Sdes              _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'
6274238106Sdes            else
6275238106Sdes              # FIXME: insert proper C++ library support
6276238106Sdes              _LT_TAGVAR(ld_shlibs, $1)=no
6277238106Sdes            fi
6278238106Sdes            ;;
6279238106Sdes        esac
6280238106Sdes        ;;
6281238106Sdes
6282238106Sdes      hpux10*|hpux11*)
6283238106Sdes        if test $with_gnu_ld = no; then
6284238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6285238106Sdes	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6286238106Sdes
6287238106Sdes          case $host_cpu in
6288238106Sdes            hppa*64*|ia64*)
6289238106Sdes              ;;
6290238106Sdes            *)
6291238106Sdes	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6292238106Sdes              ;;
6293238106Sdes          esac
6294238106Sdes        fi
6295238106Sdes        case $host_cpu in
6296238106Sdes          hppa*64*|ia64*)
6297238106Sdes            _LT_TAGVAR(hardcode_direct, $1)=no
6298238106Sdes            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6299238106Sdes            ;;
6300238106Sdes          *)
6301238106Sdes            _LT_TAGVAR(hardcode_direct, $1)=yes
6302238106Sdes            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6303238106Sdes            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6304238106Sdes					         # but as the default
6305238106Sdes					         # location of the library.
6306238106Sdes            ;;
6307238106Sdes        esac
6308238106Sdes
6309238106Sdes        case $cc_basename in
6310238106Sdes          CC*)
6311238106Sdes	    # FIXME: insert proper C++ library support
6312238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6313238106Sdes	    ;;
6314238106Sdes          aCC*)
6315238106Sdes	    case $host_cpu in
6316238106Sdes	      hppa*64*)
6317238106Sdes	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6318238106Sdes	        ;;
6319238106Sdes	      ia64*)
6320238106Sdes	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6321238106Sdes	        ;;
6322238106Sdes	      *)
6323238106Sdes	        _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'
6324238106Sdes	        ;;
6325238106Sdes	    esac
6326238106Sdes	    # Commands to make compiler produce verbose output that lists
6327238106Sdes	    # what "hidden" libraries, object files and flags are used when
6328238106Sdes	    # linking a shared library.
6329238106Sdes	    #
6330238106Sdes	    # There doesn't appear to be a way to prevent this compiler from
6331238106Sdes	    # explicitly linking system object files so we need to strip them
6332238106Sdes	    # from the output so that they don't get included in the library
6333238106Sdes	    # dependencies.
6334238106Sdes	    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"'
6335238106Sdes	    ;;
6336238106Sdes          *)
6337238106Sdes	    if test "$GXX" = yes; then
6338238106Sdes	      if test $with_gnu_ld = no; then
6339238106Sdes	        case $host_cpu in
6340238106Sdes	          hppa*64*)
6341238106Sdes	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6342238106Sdes	            ;;
6343238106Sdes	          ia64*)
6344238106Sdes	            _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'
6345238106Sdes	            ;;
6346238106Sdes	          *)
6347238106Sdes	            _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'
6348238106Sdes	            ;;
6349238106Sdes	        esac
6350238106Sdes	      fi
6351238106Sdes	    else
6352238106Sdes	      # FIXME: insert proper C++ library support
6353238106Sdes	      _LT_TAGVAR(ld_shlibs, $1)=no
6354238106Sdes	    fi
6355238106Sdes	    ;;
6356238106Sdes        esac
6357238106Sdes        ;;
6358238106Sdes
6359238106Sdes      interix[[3-9]]*)
6360238106Sdes	_LT_TAGVAR(hardcode_direct, $1)=no
6361238106Sdes	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6362238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6363238106Sdes	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6364238106Sdes	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6365238106Sdes	# Instead, shared libraries are loaded at an image base (0x10000000 by
6366238106Sdes	# default) and relocated if they conflict, which is a slow very memory
6367238106Sdes	# consuming and fragmenting process.  To avoid this, we pick a random,
6368238106Sdes	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6369238106Sdes	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6370238106Sdes	_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'
6371238106Sdes	_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'
6372238106Sdes	;;
6373238106Sdes      irix5* | irix6*)
6374238106Sdes        case $cc_basename in
6375238106Sdes          CC*)
6376238106Sdes	    # SGI C++
6377238106Sdes	    _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'
6378238106Sdes
6379238106Sdes	    # Archives containing C++ object files must be created using
6380238106Sdes	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6381238106Sdes	    # necessary to make sure instantiated templates are included
6382238106Sdes	    # in the archive.
6383238106Sdes	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6384238106Sdes	    ;;
6385238106Sdes          *)
6386238106Sdes	    if test "$GXX" = yes; then
6387238106Sdes	      if test "$with_gnu_ld" = no; then
6388238106Sdes	        _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'
6389238106Sdes	      else
6390238106Sdes	        _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'
6391238106Sdes	      fi
6392238106Sdes	    fi
6393238106Sdes	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6394238106Sdes	    ;;
6395238106Sdes        esac
6396238106Sdes        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6397238106Sdes        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6398238106Sdes        _LT_TAGVAR(inherit_rpath, $1)=yes
6399238106Sdes        ;;
6400238106Sdes
6401238106Sdes      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6402238106Sdes        case $cc_basename in
6403238106Sdes          KCC*)
6404238106Sdes	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6405238106Sdes
6406238106Sdes	    # KCC will only create a shared library if the output file
6407238106Sdes	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6408238106Sdes	    # to its proper name (with version) after linking.
6409238106Sdes	    _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'
6410238106Sdes	    _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'
6411238106Sdes	    # Commands to make compiler produce verbose output that lists
6412238106Sdes	    # what "hidden" libraries, object files and flags are used when
6413238106Sdes	    # linking a shared library.
6414238106Sdes	    #
6415238106Sdes	    # There doesn't appear to be a way to prevent this compiler from
6416238106Sdes	    # explicitly linking system object files so we need to strip them
6417238106Sdes	    # from the output so that they don't get included in the library
6418238106Sdes	    # dependencies.
6419238106Sdes	    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"'
6420238106Sdes
6421238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6422238106Sdes	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6423238106Sdes
6424238106Sdes	    # Archives containing C++ object files must be created using
6425238106Sdes	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6426238106Sdes	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6427238106Sdes	    ;;
6428238106Sdes	  icpc* | ecpc* )
6429238106Sdes	    # Intel C++
6430238106Sdes	    with_gnu_ld=yes
6431238106Sdes	    # version 8.0 and above of icpc choke on multiply defined symbols
6432238106Sdes	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6433238106Sdes	    # earlier do not add the objects themselves.
6434238106Sdes	    case `$CC -V 2>&1` in
6435238106Sdes	      *"Version 7."*)
6436238106Sdes	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6437238106Sdes		_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'
6438238106Sdes		;;
6439238106Sdes	      *)  # Version 8.0 or newer
6440238106Sdes	        tmp_idyn=
6441238106Sdes	        case $host_cpu in
6442238106Sdes		  ia64*) tmp_idyn=' -i_dynamic';;
6443238106Sdes		esac
6444238106Sdes	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6445238106Sdes		_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'
6446238106Sdes		;;
6447238106Sdes	    esac
6448238106Sdes	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6449238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6450238106Sdes	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6451238106Sdes	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6452238106Sdes	    ;;
6453238106Sdes          pgCC* | pgcpp*)
6454238106Sdes            # Portland Group C++ compiler
6455238106Sdes	    case `$CC -V` in
6456238106Sdes	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6457238106Sdes	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6458238106Sdes		rm -rf $tpldir~
6459238106Sdes		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6460238106Sdes		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6461238106Sdes	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6462238106Sdes		rm -rf $tpldir~
6463238106Sdes		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6464238106Sdes		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6465238106Sdes		$RANLIB $oldlib'
6466238106Sdes	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6467238106Sdes		rm -rf $tpldir~
6468238106Sdes		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6469238106Sdes		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6470238106Sdes	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6471238106Sdes		rm -rf $tpldir~
6472238106Sdes		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6473238106Sdes		$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'
6474238106Sdes	      ;;
6475238106Sdes	    *) # Version 6 and above use weak symbols
6476238106Sdes	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6477238106Sdes	      _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'
6478238106Sdes	      ;;
6479238106Sdes	    esac
6480238106Sdes
6481238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6482238106Sdes	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6483238106Sdes	    _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'
6484238106Sdes            ;;
6485238106Sdes	  cxx*)
6486238106Sdes	    # Compaq C++
6487238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6488238106Sdes	    _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'
6489238106Sdes
6490238106Sdes	    runpath_var=LD_RUN_PATH
6491238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6492238106Sdes	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6493238106Sdes
6494238106Sdes	    # Commands to make compiler produce verbose output that lists
6495238106Sdes	    # what "hidden" libraries, object files and flags are used when
6496238106Sdes	    # linking a shared library.
6497238106Sdes	    #
6498238106Sdes	    # There doesn't appear to be a way to prevent this compiler from
6499238106Sdes	    # explicitly linking system object files so we need to strip them
6500238106Sdes	    # from the output so that they don't get included in the library
6501238106Sdes	    # dependencies.
6502238106Sdes	    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'
6503238106Sdes	    ;;
6504238106Sdes	  xl* | mpixl* | bgxl*)
6505238106Sdes	    # IBM XL 8.0 on PPC, with GNU ld
6506238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6507238106Sdes	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6508238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6509238106Sdes	    if test "x$supports_anon_versioning" = xyes; then
6510238106Sdes	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6511238106Sdes		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6512238106Sdes		echo "local: *; };" >> $output_objdir/$libname.ver~
6513238106Sdes		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6514238106Sdes	    fi
6515238106Sdes	    ;;
6516238106Sdes	  *)
6517238106Sdes	    case `$CC -V 2>&1 | sed 5q` in
6518238106Sdes	    *Sun\ C*)
6519238106Sdes	      # Sun C++ 5.9
6520238106Sdes	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6521238106Sdes	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6522238106Sdes	      _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'
6523238106Sdes	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6524238106Sdes	      _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'
6525238106Sdes	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6526238106Sdes
6527238106Sdes	      # Not sure whether something based on
6528238106Sdes	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6529238106Sdes	      # would be better.
6530238106Sdes	      output_verbose_link_cmd='func_echo_all'
6531238106Sdes
6532238106Sdes	      # Archives containing C++ object files must be created using
6533238106Sdes	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6534238106Sdes	      # necessary to make sure instantiated templates are included
6535238106Sdes	      # in the archive.
6536238106Sdes	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6537238106Sdes	      ;;
6538238106Sdes	    esac
6539238106Sdes	    ;;
6540238106Sdes	esac
6541238106Sdes	;;
6542238106Sdes
6543238106Sdes      lynxos*)
6544238106Sdes        # FIXME: insert proper C++ library support
6545238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
6546238106Sdes	;;
6547238106Sdes
6548238106Sdes      m88k*)
6549238106Sdes        # FIXME: insert proper C++ library support
6550238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
6551238106Sdes	;;
6552238106Sdes
6553238106Sdes      mvs*)
6554238106Sdes        case $cc_basename in
6555238106Sdes          cxx*)
6556238106Sdes	    # FIXME: insert proper C++ library support
6557238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6558238106Sdes	    ;;
6559238106Sdes	  *)
6560238106Sdes	    # FIXME: insert proper C++ library support
6561238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6562238106Sdes	    ;;
6563238106Sdes	esac
6564238106Sdes	;;
6565238106Sdes
6566238106Sdes      netbsd*)
6567238106Sdes        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6568238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6569238106Sdes	  wlarc=
6570238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6571238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=yes
6572238106Sdes	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6573238106Sdes	fi
6574238106Sdes	# Workaround some broken pre-1.5 toolchains
6575238106Sdes	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6576238106Sdes	;;
6577238106Sdes
6578238106Sdes      *nto* | *qnx*)
6579238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=yes
6580238106Sdes	;;
6581238106Sdes
6582238106Sdes      openbsd2*)
6583238106Sdes        # C++ shared libraries are fairly broken
6584238106Sdes	_LT_TAGVAR(ld_shlibs, $1)=no
6585238106Sdes	;;
6586238106Sdes
6587238106Sdes      openbsd*)
6588238106Sdes	if test -f /usr/libexec/ld.so; then
6589238106Sdes	  _LT_TAGVAR(hardcode_direct, $1)=yes
6590238106Sdes	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6591238106Sdes	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6592238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6593238106Sdes	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6594238106Sdes	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6595238106Sdes	    _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'
6596238106Sdes	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6597238106Sdes	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6598238106Sdes	  fi
6599238106Sdes	  output_verbose_link_cmd=func_echo_all
6600238106Sdes	else
6601238106Sdes	  _LT_TAGVAR(ld_shlibs, $1)=no
6602238106Sdes	fi
6603238106Sdes	;;
6604238106Sdes
6605238106Sdes      osf3* | osf4* | osf5*)
6606238106Sdes        case $cc_basename in
6607238106Sdes          KCC*)
6608238106Sdes	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6609238106Sdes
6610238106Sdes	    # KCC will only create a shared library if the output file
6611238106Sdes	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6612238106Sdes	    # to its proper name (with version) after linking.
6613238106Sdes	    _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'
6614238106Sdes
6615238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6616238106Sdes	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6617238106Sdes
6618238106Sdes	    # Archives containing C++ object files must be created using
6619238106Sdes	    # the KAI C++ compiler.
6620238106Sdes	    case $host in
6621238106Sdes	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6622238106Sdes	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6623238106Sdes	    esac
6624238106Sdes	    ;;
6625238106Sdes          RCC*)
6626238106Sdes	    # Rational C++ 2.4.1
6627238106Sdes	    # FIXME: insert proper C++ library support
6628238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6629238106Sdes	    ;;
6630238106Sdes          cxx*)
6631238106Sdes	    case $host in
6632238106Sdes	      osf3*)
6633238106Sdes	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6634238106Sdes	        _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'
6635238106Sdes	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6636238106Sdes		;;
6637238106Sdes	      *)
6638238106Sdes	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6639238106Sdes	        _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'
6640238106Sdes	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6641238106Sdes	          echo "-hidden">> $lib.exp~
6642238106Sdes	          $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~
6643238106Sdes	          $RM $lib.exp'
6644238106Sdes	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6645238106Sdes		;;
6646238106Sdes	    esac
6647238106Sdes
6648238106Sdes	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6649238106Sdes
6650238106Sdes	    # Commands to make compiler produce verbose output that lists
6651238106Sdes	    # what "hidden" libraries, object files and flags are used when
6652238106Sdes	    # linking a shared library.
6653238106Sdes	    #
6654238106Sdes	    # There doesn't appear to be a way to prevent this compiler from
6655238106Sdes	    # explicitly linking system object files so we need to strip them
6656238106Sdes	    # from the output so that they don't get included in the library
6657238106Sdes	    # dependencies.
6658238106Sdes	    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"'
6659238106Sdes	    ;;
6660238106Sdes	  *)
6661238106Sdes	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6662238106Sdes	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6663238106Sdes	      case $host in
6664238106Sdes	        osf3*)
6665238106Sdes	          _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'
6666238106Sdes		  ;;
6667238106Sdes	        *)
6668238106Sdes	          _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'
6669238106Sdes		  ;;
6670238106Sdes	      esac
6671238106Sdes
6672238106Sdes	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6673238106Sdes	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6674238106Sdes
6675238106Sdes	      # Commands to make compiler produce verbose output that lists
6676238106Sdes	      # what "hidden" libraries, object files and flags are used when
6677238106Sdes	      # linking a shared library.
6678238106Sdes	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6679238106Sdes
6680238106Sdes	    else
6681238106Sdes	      # FIXME: insert proper C++ library support
6682238106Sdes	      _LT_TAGVAR(ld_shlibs, $1)=no
6683238106Sdes	    fi
6684238106Sdes	    ;;
6685238106Sdes        esac
6686238106Sdes        ;;
6687238106Sdes
6688238106Sdes      psos*)
6689238106Sdes        # FIXME: insert proper C++ library support
6690238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
6691238106Sdes        ;;
6692238106Sdes
6693238106Sdes      sunos4*)
6694238106Sdes        case $cc_basename in
6695238106Sdes          CC*)
6696238106Sdes	    # Sun C++ 4.x
6697238106Sdes	    # FIXME: insert proper C++ library support
6698238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6699238106Sdes	    ;;
6700238106Sdes          lcc*)
6701238106Sdes	    # Lucid
6702238106Sdes	    # FIXME: insert proper C++ library support
6703238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6704238106Sdes	    ;;
6705238106Sdes          *)
6706238106Sdes	    # FIXME: insert proper C++ library support
6707238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6708238106Sdes	    ;;
6709238106Sdes        esac
6710238106Sdes        ;;
6711238106Sdes
6712238106Sdes      solaris*)
6713238106Sdes        case $cc_basename in
6714238106Sdes          CC* | sunCC*)
6715238106Sdes	    # Sun C++ 4.2, 5.x and Centerline C++
6716238106Sdes            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6717238106Sdes	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6718238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6719238106Sdes	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6720238106Sdes	      $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'
6721238106Sdes
6722238106Sdes	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6723238106Sdes	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6724238106Sdes	    case $host_os in
6725238106Sdes	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6726238106Sdes	      *)
6727238106Sdes		# The compiler driver will combine and reorder linker options,
6728238106Sdes		# but understands `-z linker_flag'.
6729238106Sdes	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6730238106Sdes		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6731238106Sdes	        ;;
6732238106Sdes	    esac
6733238106Sdes	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6734238106Sdes
6735238106Sdes	    output_verbose_link_cmd='func_echo_all'
6736238106Sdes
6737238106Sdes	    # Archives containing C++ object files must be created using
6738238106Sdes	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6739238106Sdes	    # necessary to make sure instantiated templates are included
6740238106Sdes	    # in the archive.
6741238106Sdes	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6742238106Sdes	    ;;
6743238106Sdes          gcx*)
6744238106Sdes	    # Green Hills C++ Compiler
6745238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6746238106Sdes
6747238106Sdes	    # The C++ compiler must be used to create the archive.
6748238106Sdes	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6749238106Sdes	    ;;
6750238106Sdes          *)
6751238106Sdes	    # GNU C++ compiler with Solaris linker
6752238106Sdes	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6753238106Sdes	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6754238106Sdes	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6755238106Sdes	        _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'
6756238106Sdes	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6757238106Sdes		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6758238106Sdes
6759238106Sdes	        # Commands to make compiler produce verbose output that lists
6760238106Sdes	        # what "hidden" libraries, object files and flags are used when
6761238106Sdes	        # linking a shared library.
6762238106Sdes	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6763238106Sdes	      else
6764238106Sdes	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6765238106Sdes	        # platform.
6766238106Sdes	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6767238106Sdes	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6768238106Sdes		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6769238106Sdes
6770238106Sdes	        # Commands to make compiler produce verbose output that lists
6771238106Sdes	        # what "hidden" libraries, object files and flags are used when
6772238106Sdes	        # linking a shared library.
6773238106Sdes	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6774238106Sdes	      fi
6775238106Sdes
6776238106Sdes	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6777238106Sdes	      case $host_os in
6778238106Sdes		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6779238106Sdes		*)
6780238106Sdes		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6781238106Sdes		  ;;
6782238106Sdes	      esac
6783238106Sdes	    fi
6784238106Sdes	    ;;
6785238106Sdes        esac
6786238106Sdes        ;;
6787238106Sdes
6788238106Sdes    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6789238106Sdes      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6790238106Sdes      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6791238106Sdes      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6792238106Sdes      runpath_var='LD_RUN_PATH'
6793238106Sdes
6794238106Sdes      case $cc_basename in
6795238106Sdes        CC*)
6796238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6797238106Sdes	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6798238106Sdes	  ;;
6799238106Sdes	*)
6800238106Sdes	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6801238106Sdes	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6802238106Sdes	  ;;
6803238106Sdes      esac
6804238106Sdes      ;;
6805238106Sdes
6806238106Sdes      sysv5* | sco3.2v5* | sco5v6*)
6807238106Sdes	# Note: We can NOT use -z defs as we might desire, because we do not
6808238106Sdes	# link with -lc, and that would cause any symbols used from libc to
6809238106Sdes	# always be unresolved, which means just about no library would
6810238106Sdes	# ever link correctly.  If we're not using GNU ld we use -z text
6811238106Sdes	# though, which does catch some bad symbols but isn't as heavy-handed
6812238106Sdes	# as -z defs.
6813238106Sdes	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6814238106Sdes	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6815238106Sdes	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6816238106Sdes	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6817238106Sdes	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6818238106Sdes	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6819238106Sdes	_LT_TAGVAR(link_all_deplibs, $1)=yes
6820238106Sdes	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6821238106Sdes	runpath_var='LD_RUN_PATH'
6822238106Sdes
6823238106Sdes	case $cc_basename in
6824238106Sdes          CC*)
6825238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6826238106Sdes	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6827238106Sdes	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6828238106Sdes	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
6829238106Sdes	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6830238106Sdes	      '"$_LT_TAGVAR(reload_cmds, $1)"
6831238106Sdes	    ;;
6832238106Sdes	  *)
6833238106Sdes	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6834238106Sdes	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6835238106Sdes	    ;;
6836238106Sdes	esac
6837238106Sdes      ;;
6838238106Sdes
6839238106Sdes      tandem*)
6840238106Sdes        case $cc_basename in
6841238106Sdes          NCC*)
6842238106Sdes	    # NonStop-UX NCC 3.20
6843238106Sdes	    # FIXME: insert proper C++ library support
6844238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6845238106Sdes	    ;;
6846238106Sdes          *)
6847238106Sdes	    # FIXME: insert proper C++ library support
6848238106Sdes	    _LT_TAGVAR(ld_shlibs, $1)=no
6849238106Sdes	    ;;
6850238106Sdes        esac
6851238106Sdes        ;;
6852238106Sdes
6853238106Sdes      vxworks*)
6854238106Sdes        # FIXME: insert proper C++ library support
6855238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
6856238106Sdes        ;;
6857238106Sdes
6858238106Sdes      *)
6859238106Sdes        # FIXME: insert proper C++ library support
6860238106Sdes        _LT_TAGVAR(ld_shlibs, $1)=no
6861238106Sdes        ;;
6862238106Sdes    esac
6863238106Sdes
6864238106Sdes    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6865238106Sdes    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6866238106Sdes
6867238106Sdes    _LT_TAGVAR(GCC, $1)="$GXX"
6868238106Sdes    _LT_TAGVAR(LD, $1)="$LD"
6869238106Sdes
6870238106Sdes    ## CAVEAT EMPTOR:
6871238106Sdes    ## There is no encapsulation within the following macros, do not change
6872238106Sdes    ## the running order or otherwise move them around unless you know exactly
6873238106Sdes    ## what you are doing...
6874238106Sdes    _LT_SYS_HIDDEN_LIBDEPS($1)
6875238106Sdes    _LT_COMPILER_PIC($1)
6876238106Sdes    _LT_COMPILER_C_O($1)
6877238106Sdes    _LT_COMPILER_FILE_LOCKS($1)
6878238106Sdes    _LT_LINKER_SHLIBS($1)
6879238106Sdes    _LT_SYS_DYNAMIC_LINKER($1)
6880238106Sdes    _LT_LINKER_HARDCODE_LIBPATH($1)
6881238106Sdes
6882238106Sdes    _LT_CONFIG($1)
6883238106Sdes  fi # test -n "$compiler"
6884238106Sdes
6885238106Sdes  CC=$lt_save_CC
6886238106Sdes  CFLAGS=$lt_save_CFLAGS
6887238106Sdes  LDCXX=$LD
6888238106Sdes  LD=$lt_save_LD
6889238106Sdes  GCC=$lt_save_GCC
6890238106Sdes  with_gnu_ld=$lt_save_with_gnu_ld
6891238106Sdes  lt_cv_path_LDCXX=$lt_cv_path_LD
6892238106Sdes  lt_cv_path_LD=$lt_save_path_LD
6893238106Sdes  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6894238106Sdes  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6895238106Sdesfi # test "$_lt_caught_CXX_error" != yes
6896238106Sdes
6897238106SdesAC_LANG_POP
6898238106Sdes])# _LT_LANG_CXX_CONFIG
6899238106Sdes
6900238106Sdes
6901238106Sdes# _LT_FUNC_STRIPNAME_CNF
6902238106Sdes# ----------------------
6903238106Sdes# func_stripname_cnf prefix suffix name
6904238106Sdes# strip PREFIX and SUFFIX off of NAME.
6905238106Sdes# PREFIX and SUFFIX must not contain globbing or regex special
6906238106Sdes# characters, hashes, percent signs, but SUFFIX may contain a leading
6907238106Sdes# dot (in which case that matches only a dot).
6908238106Sdes#
6909238106Sdes# This function is identical to the (non-XSI) version of func_stripname,
6910238106Sdes# except this one can be used by m4 code that may be executed by configure,
6911238106Sdes# rather than the libtool script.
6912238106Sdesm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6913238106SdesAC_REQUIRE([_LT_DECL_SED])
6914238106SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6915238106Sdesfunc_stripname_cnf ()
6916238106Sdes{
6917238106Sdes  case ${2} in
6918238106Sdes  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6919238106Sdes  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6920238106Sdes  esac
6921238106Sdes} # func_stripname_cnf
6922238106Sdes])# _LT_FUNC_STRIPNAME_CNF
6923238106Sdes
6924238106Sdes# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6925238106Sdes# ---------------------------------
6926238106Sdes# Figure out "hidden" library dependencies from verbose
6927238106Sdes# compiler output when linking a shared library.
6928238106Sdes# Parse the compiler output and extract the necessary
6929238106Sdes# objects, libraries and library flags.
6930238106Sdesm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6931238106Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6932238106SdesAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6933238106Sdes# Dependencies to place before and after the object being linked:
6934238106Sdes_LT_TAGVAR(predep_objects, $1)=
6935238106Sdes_LT_TAGVAR(postdep_objects, $1)=
6936238106Sdes_LT_TAGVAR(predeps, $1)=
6937238106Sdes_LT_TAGVAR(postdeps, $1)=
6938238106Sdes_LT_TAGVAR(compiler_lib_search_path, $1)=
6939238106Sdes
6940238106Sdesdnl we can't use the lt_simple_compile_test_code here,
6941238106Sdesdnl because it contains code intended for an executable,
6942238106Sdesdnl not a library.  It's possible we should let each
6943238106Sdesdnl tag define a new lt_????_link_test_code variable,
6944238106Sdesdnl but it's only used here...
6945238106Sdesm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6946238106Sdesint a;
6947238106Sdesvoid foo (void) { a = 0; }
6948238106Sdes_LT_EOF
6949238106Sdes], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6950238106Sdesclass Foo
6951238106Sdes{
6952238106Sdespublic:
6953238106Sdes  Foo (void) { a = 0; }
6954238106Sdesprivate:
6955238106Sdes  int a;
6956238106Sdes};
6957238106Sdes_LT_EOF
6958238106Sdes], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6959238106Sdes      subroutine foo
6960238106Sdes      implicit none
6961238106Sdes      integer*4 a
6962238106Sdes      a=0
6963238106Sdes      return
6964238106Sdes      end
6965238106Sdes_LT_EOF
6966238106Sdes], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6967238106Sdes      subroutine foo
6968238106Sdes      implicit none
6969238106Sdes      integer a
6970238106Sdes      a=0
6971238106Sdes      return
6972238106Sdes      end
6973238106Sdes_LT_EOF
6974238106Sdes], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6975238106Sdespublic class foo {
6976238106Sdes  private int a;
6977238106Sdes  public void bar (void) {
6978238106Sdes    a = 0;
6979238106Sdes  }
6980238106Sdes};
6981238106Sdes_LT_EOF
6982249141Sdes], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6983249141Sdespackage foo
6984249141Sdesfunc foo() {
6985249141Sdes}
6986249141Sdes_LT_EOF
6987238106Sdes])
6988238106Sdes
6989238106Sdes_lt_libdeps_save_CFLAGS=$CFLAGS
6990238106Sdescase "$CC $CFLAGS " in #(
6991238106Sdes*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6992238106Sdes*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6993249141Sdes*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6994238106Sdesesac
6995238106Sdes
6996238106Sdesdnl Parse the compiler output and extract the necessary
6997238106Sdesdnl objects, libraries and library flags.
6998238106Sdesif AC_TRY_EVAL(ac_compile); then
6999238106Sdes  # Parse the compiler output and extract the necessary
7000238106Sdes  # objects, libraries and library flags.
7001238106Sdes
7002238106Sdes  # Sentinel used to keep track of whether or not we are before
7003238106Sdes  # the conftest object file.
7004238106Sdes  pre_test_object_deps_done=no
7005238106Sdes
7006238106Sdes  for p in `eval "$output_verbose_link_cmd"`; do
7007238106Sdes    case ${prev}${p} in
7008238106Sdes
7009238106Sdes    -L* | -R* | -l*)
7010238106Sdes       # Some compilers place space between "-{L,R}" and the path.
7011238106Sdes       # Remove the space.
7012238106Sdes       if test $p = "-L" ||
7013238106Sdes          test $p = "-R"; then
7014238106Sdes	 prev=$p
7015238106Sdes	 continue
7016238106Sdes       fi
7017238106Sdes
7018238106Sdes       # Expand the sysroot to ease extracting the directories later.
7019238106Sdes       if test -z "$prev"; then
7020238106Sdes         case $p in
7021238106Sdes         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7022238106Sdes         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7023238106Sdes         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7024238106Sdes         esac
7025238106Sdes       fi
7026238106Sdes       case $p in
7027238106Sdes       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7028238106Sdes       esac
7029238106Sdes       if test "$pre_test_object_deps_done" = no; then
7030238106Sdes	 case ${prev} in
7031238106Sdes	 -L | -R)
7032238106Sdes	   # Internal compiler library paths should come after those
7033238106Sdes	   # provided the user.  The postdeps already come after the
7034238106Sdes	   # user supplied libs so there is no need to process them.
7035238106Sdes	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7036238106Sdes	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7037238106Sdes	   else
7038238106Sdes	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7039238106Sdes	   fi
7040238106Sdes	   ;;
7041238106Sdes	 # The "-l" case would never come before the object being
7042238106Sdes	 # linked, so don't bother handling this case.
7043238106Sdes	 esac
7044238106Sdes       else
7045238106Sdes	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7046238106Sdes	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7047238106Sdes	 else
7048238106Sdes	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7049238106Sdes	 fi
7050238106Sdes       fi
7051238106Sdes       prev=
7052238106Sdes       ;;
7053238106Sdes
7054238106Sdes    *.lto.$objext) ;; # Ignore GCC LTO objects
7055238106Sdes    *.$objext)
7056238106Sdes       # This assumes that the test object file only shows up
7057238106Sdes       # once in the compiler output.
7058238106Sdes       if test "$p" = "conftest.$objext"; then
7059238106Sdes	 pre_test_object_deps_done=yes
7060238106Sdes	 continue
7061238106Sdes       fi
7062238106Sdes
7063238106Sdes       if test "$pre_test_object_deps_done" = no; then
7064238106Sdes	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7065238106Sdes	   _LT_TAGVAR(predep_objects, $1)="$p"
7066238106Sdes	 else
7067238106Sdes	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7068238106Sdes	 fi
7069238106Sdes       else
7070238106Sdes	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7071238106Sdes	   _LT_TAGVAR(postdep_objects, $1)="$p"
7072238106Sdes	 else
7073238106Sdes	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7074238106Sdes	 fi
7075238106Sdes       fi
7076238106Sdes       ;;
7077238106Sdes
7078238106Sdes    *) ;; # Ignore the rest.
7079238106Sdes
7080238106Sdes    esac
7081238106Sdes  done
7082238106Sdes
7083238106Sdes  # Clean up.
7084238106Sdes  rm -f a.out a.exe
7085238106Sdeselse
7086238106Sdes  echo "libtool.m4: error: problem compiling $1 test program"
7087238106Sdesfi
7088238106Sdes
7089238106Sdes$RM -f confest.$objext
7090238106SdesCFLAGS=$_lt_libdeps_save_CFLAGS
7091238106Sdes
7092238106Sdes# PORTME: override above test on systems where it is broken
7093238106Sdesm4_if([$1], [CXX],
7094238106Sdes[case $host_os in
7095238106Sdesinterix[[3-9]]*)
7096238106Sdes  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7097238106Sdes  # hack all around it, let's just trust "g++" to DTRT.
7098238106Sdes  _LT_TAGVAR(predep_objects,$1)=
7099238106Sdes  _LT_TAGVAR(postdep_objects,$1)=
7100238106Sdes  _LT_TAGVAR(postdeps,$1)=
7101238106Sdes  ;;
7102238106Sdes
7103238106Sdeslinux*)
7104238106Sdes  case `$CC -V 2>&1 | sed 5q` in
7105238106Sdes  *Sun\ C*)
7106238106Sdes    # Sun C++ 5.9
7107238106Sdes
7108238106Sdes    # The more standards-conforming stlport4 library is
7109238106Sdes    # incompatible with the Cstd library. Avoid specifying
7110238106Sdes    # it if it's in CXXFLAGS. Ignore libCrun as
7111238106Sdes    # -library=stlport4 depends on it.
7112238106Sdes    case " $CXX $CXXFLAGS " in
7113238106Sdes    *" -library=stlport4 "*)
7114238106Sdes      solaris_use_stlport4=yes
7115238106Sdes      ;;
7116238106Sdes    esac
7117238106Sdes
7118238106Sdes    if test "$solaris_use_stlport4" != yes; then
7119238106Sdes      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7120238106Sdes    fi
7121238106Sdes    ;;
7122238106Sdes  esac
7123238106Sdes  ;;
7124238106Sdes
7125238106Sdessolaris*)
7126238106Sdes  case $cc_basename in
7127238106Sdes  CC* | sunCC*)
7128238106Sdes    # The more standards-conforming stlport4 library is
7129238106Sdes    # incompatible with the Cstd library. Avoid specifying
7130238106Sdes    # it if it's in CXXFLAGS. Ignore libCrun as
7131238106Sdes    # -library=stlport4 depends on it.
7132238106Sdes    case " $CXX $CXXFLAGS " in
7133238106Sdes    *" -library=stlport4 "*)
7134238106Sdes      solaris_use_stlport4=yes
7135238106Sdes      ;;
7136238106Sdes    esac
7137238106Sdes
7138238106Sdes    # Adding this requires a known-good setup of shared libraries for
7139238106Sdes    # Sun compiler versions before 5.6, else PIC objects from an old
7140238106Sdes    # archive will be linked into the output, leading to subtle bugs.
7141238106Sdes    if test "$solaris_use_stlport4" != yes; then
7142238106Sdes      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7143238106Sdes    fi
7144238106Sdes    ;;
7145238106Sdes  esac
7146238106Sdes  ;;
7147238106Sdesesac
7148238106Sdes])
7149238106Sdes
7150238106Sdescase " $_LT_TAGVAR(postdeps, $1) " in
7151238106Sdes*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7152238106Sdesesac
7153238106Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7154238106Sdesif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7155238106Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7156238106Sdesfi
7157238106Sdes_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7158238106Sdes    [The directories searched by this compiler when creating a shared library])
7159238106Sdes_LT_TAGDECL([], [predep_objects], [1],
7160238106Sdes    [Dependencies to place before and after the objects being linked to
7161238106Sdes    create a shared library])
7162238106Sdes_LT_TAGDECL([], [postdep_objects], [1])
7163238106Sdes_LT_TAGDECL([], [predeps], [1])
7164238106Sdes_LT_TAGDECL([], [postdeps], [1])
7165238106Sdes_LT_TAGDECL([], [compiler_lib_search_path], [1],
7166238106Sdes    [The library search path used internally by the compiler when linking
7167238106Sdes    a shared library])
7168238106Sdes])# _LT_SYS_HIDDEN_LIBDEPS
7169238106Sdes
7170238106Sdes
7171238106Sdes# _LT_LANG_F77_CONFIG([TAG])
7172238106Sdes# --------------------------
7173238106Sdes# Ensure that the configuration variables for a Fortran 77 compiler are
7174238106Sdes# suitably defined.  These variables are subsequently used by _LT_CONFIG
7175238106Sdes# to write the compiler configuration to `libtool'.
7176238106Sdesm4_defun([_LT_LANG_F77_CONFIG],
7177238106Sdes[AC_LANG_PUSH(Fortran 77)
7178238106Sdesif test -z "$F77" || test "X$F77" = "Xno"; then
7179238106Sdes  _lt_disable_F77=yes
7180238106Sdesfi
7181238106Sdes
7182238106Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7183238106Sdes_LT_TAGVAR(allow_undefined_flag, $1)=
7184238106Sdes_LT_TAGVAR(always_export_symbols, $1)=no
7185238106Sdes_LT_TAGVAR(archive_expsym_cmds, $1)=
7186238106Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7187238106Sdes_LT_TAGVAR(hardcode_direct, $1)=no
7188238106Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7189238106Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7190238106Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)=
7191238106Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no
7192238106Sdes_LT_TAGVAR(hardcode_automatic, $1)=no
7193238106Sdes_LT_TAGVAR(inherit_rpath, $1)=no
7194238106Sdes_LT_TAGVAR(module_cmds, $1)=
7195238106Sdes_LT_TAGVAR(module_expsym_cmds, $1)=
7196238106Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown
7197238106Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7198238106Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag
7199238106Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7200238106Sdes_LT_TAGVAR(no_undefined_flag, $1)=
7201238106Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)=
7202238106Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7203238106Sdes
7204238106Sdes# Source file extension for f77 test sources.
7205238106Sdesac_ext=f
7206238106Sdes
7207238106Sdes# Object file extension for compiled f77 test sources.
7208238106Sdesobjext=o
7209238106Sdes_LT_TAGVAR(objext, $1)=$objext
7210238106Sdes
7211238106Sdes# No sense in running all these tests if we already determined that
7212238106Sdes# the F77 compiler isn't working.  Some variables (like enable_shared)
7213238106Sdes# are currently assumed to apply to all compilers on this platform,
7214238106Sdes# and will be corrupted by setting them based on a non-working compiler.
7215238106Sdesif test "$_lt_disable_F77" != yes; then
7216238106Sdes  # Code to be used in simple compile tests
7217238106Sdes  lt_simple_compile_test_code="\
7218238106Sdes      subroutine t
7219238106Sdes      return
7220238106Sdes      end
7221238106Sdes"
7222238106Sdes
7223238106Sdes  # Code to be used in simple link tests
7224238106Sdes  lt_simple_link_test_code="\
7225238106Sdes      program t
7226238106Sdes      end
7227238106Sdes"
7228238106Sdes
7229238106Sdes  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7230238106Sdes  _LT_TAG_COMPILER
7231238106Sdes
7232238106Sdes  # save warnings/boilerplate of simple test code
7233238106Sdes  _LT_COMPILER_BOILERPLATE
7234238106Sdes  _LT_LINKER_BOILERPLATE
7235238106Sdes
7236238106Sdes  # Allow CC to be a program name with arguments.
7237238106Sdes  lt_save_CC="$CC"
7238238106Sdes  lt_save_GCC=$GCC
7239238106Sdes  lt_save_CFLAGS=$CFLAGS
7240238106Sdes  CC=${F77-"f77"}
7241238106Sdes  CFLAGS=$FFLAGS
7242238106Sdes  compiler=$CC
7243238106Sdes  _LT_TAGVAR(compiler, $1)=$CC
7244238106Sdes  _LT_CC_BASENAME([$compiler])
7245238106Sdes  GCC=$G77
7246238106Sdes  if test -n "$compiler"; then
7247238106Sdes    AC_MSG_CHECKING([if libtool supports shared libraries])
7248238106Sdes    AC_MSG_RESULT([$can_build_shared])
7249238106Sdes
7250238106Sdes    AC_MSG_CHECKING([whether to build shared libraries])
7251238106Sdes    test "$can_build_shared" = "no" && enable_shared=no
7252238106Sdes
7253238106Sdes    # On AIX, shared libraries and static libraries use the same namespace, and
7254238106Sdes    # are all built from PIC.
7255238106Sdes    case $host_os in
7256238106Sdes      aix3*)
7257238106Sdes        test "$enable_shared" = yes && enable_static=no
7258238106Sdes        if test -n "$RANLIB"; then
7259238106Sdes          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7260238106Sdes          postinstall_cmds='$RANLIB $lib'
7261238106Sdes        fi
7262238106Sdes        ;;
7263238106Sdes      aix[[4-9]]*)
7264238106Sdes	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7265238106Sdes	  test "$enable_shared" = yes && enable_static=no
7266238106Sdes	fi
7267238106Sdes        ;;
7268238106Sdes    esac
7269238106Sdes    AC_MSG_RESULT([$enable_shared])
7270238106Sdes
7271238106Sdes    AC_MSG_CHECKING([whether to build static libraries])
7272238106Sdes    # Make sure either enable_shared or enable_static is yes.
7273238106Sdes    test "$enable_shared" = yes || enable_static=yes
7274238106Sdes    AC_MSG_RESULT([$enable_static])
7275238106Sdes
7276238106Sdes    _LT_TAGVAR(GCC, $1)="$G77"
7277238106Sdes    _LT_TAGVAR(LD, $1)="$LD"
7278238106Sdes
7279238106Sdes    ## CAVEAT EMPTOR:
7280238106Sdes    ## There is no encapsulation within the following macros, do not change
7281238106Sdes    ## the running order or otherwise move them around unless you know exactly
7282238106Sdes    ## what you are doing...
7283238106Sdes    _LT_COMPILER_PIC($1)
7284238106Sdes    _LT_COMPILER_C_O($1)
7285238106Sdes    _LT_COMPILER_FILE_LOCKS($1)
7286238106Sdes    _LT_LINKER_SHLIBS($1)
7287238106Sdes    _LT_SYS_DYNAMIC_LINKER($1)
7288238106Sdes    _LT_LINKER_HARDCODE_LIBPATH($1)
7289238106Sdes
7290238106Sdes    _LT_CONFIG($1)
7291238106Sdes  fi # test -n "$compiler"
7292238106Sdes
7293238106Sdes  GCC=$lt_save_GCC
7294238106Sdes  CC="$lt_save_CC"
7295238106Sdes  CFLAGS="$lt_save_CFLAGS"
7296238106Sdesfi # test "$_lt_disable_F77" != yes
7297238106Sdes
7298238106SdesAC_LANG_POP
7299238106Sdes])# _LT_LANG_F77_CONFIG
7300238106Sdes
7301238106Sdes
7302238106Sdes# _LT_LANG_FC_CONFIG([TAG])
7303238106Sdes# -------------------------
7304238106Sdes# Ensure that the configuration variables for a Fortran compiler are
7305238106Sdes# suitably defined.  These variables are subsequently used by _LT_CONFIG
7306238106Sdes# to write the compiler configuration to `libtool'.
7307238106Sdesm4_defun([_LT_LANG_FC_CONFIG],
7308238106Sdes[AC_LANG_PUSH(Fortran)
7309238106Sdes
7310238106Sdesif test -z "$FC" || test "X$FC" = "Xno"; then
7311238106Sdes  _lt_disable_FC=yes
7312238106Sdesfi
7313238106Sdes
7314238106Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7315238106Sdes_LT_TAGVAR(allow_undefined_flag, $1)=
7316238106Sdes_LT_TAGVAR(always_export_symbols, $1)=no
7317238106Sdes_LT_TAGVAR(archive_expsym_cmds, $1)=
7318238106Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7319238106Sdes_LT_TAGVAR(hardcode_direct, $1)=no
7320238106Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7321238106Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7322238106Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)=
7323238106Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no
7324238106Sdes_LT_TAGVAR(hardcode_automatic, $1)=no
7325238106Sdes_LT_TAGVAR(inherit_rpath, $1)=no
7326238106Sdes_LT_TAGVAR(module_cmds, $1)=
7327238106Sdes_LT_TAGVAR(module_expsym_cmds, $1)=
7328238106Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown
7329238106Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7330238106Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag
7331238106Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7332238106Sdes_LT_TAGVAR(no_undefined_flag, $1)=
7333238106Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)=
7334238106Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7335238106Sdes
7336238106Sdes# Source file extension for fc test sources.
7337238106Sdesac_ext=${ac_fc_srcext-f}
7338238106Sdes
7339238106Sdes# Object file extension for compiled fc test sources.
7340238106Sdesobjext=o
7341238106Sdes_LT_TAGVAR(objext, $1)=$objext
7342238106Sdes
7343238106Sdes# No sense in running all these tests if we already determined that
7344238106Sdes# the FC compiler isn't working.  Some variables (like enable_shared)
7345238106Sdes# are currently assumed to apply to all compilers on this platform,
7346238106Sdes# and will be corrupted by setting them based on a non-working compiler.
7347238106Sdesif test "$_lt_disable_FC" != yes; then
7348238106Sdes  # Code to be used in simple compile tests
7349238106Sdes  lt_simple_compile_test_code="\
7350238106Sdes      subroutine t
7351238106Sdes      return
7352238106Sdes      end
7353238106Sdes"
7354238106Sdes
7355238106Sdes  # Code to be used in simple link tests
7356238106Sdes  lt_simple_link_test_code="\
7357238106Sdes      program t
7358238106Sdes      end
7359238106Sdes"
7360238106Sdes
7361238106Sdes  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7362238106Sdes  _LT_TAG_COMPILER
7363238106Sdes
7364238106Sdes  # save warnings/boilerplate of simple test code
7365238106Sdes  _LT_COMPILER_BOILERPLATE
7366238106Sdes  _LT_LINKER_BOILERPLATE
7367238106Sdes
7368238106Sdes  # Allow CC to be a program name with arguments.
7369238106Sdes  lt_save_CC="$CC"
7370238106Sdes  lt_save_GCC=$GCC
7371238106Sdes  lt_save_CFLAGS=$CFLAGS
7372238106Sdes  CC=${FC-"f95"}
7373238106Sdes  CFLAGS=$FCFLAGS
7374238106Sdes  compiler=$CC
7375238106Sdes  GCC=$ac_cv_fc_compiler_gnu
7376238106Sdes
7377238106Sdes  _LT_TAGVAR(compiler, $1)=$CC
7378238106Sdes  _LT_CC_BASENAME([$compiler])
7379238106Sdes
7380238106Sdes  if test -n "$compiler"; then
7381238106Sdes    AC_MSG_CHECKING([if libtool supports shared libraries])
7382238106Sdes    AC_MSG_RESULT([$can_build_shared])
7383238106Sdes
7384238106Sdes    AC_MSG_CHECKING([whether to build shared libraries])
7385238106Sdes    test "$can_build_shared" = "no" && enable_shared=no
7386238106Sdes
7387238106Sdes    # On AIX, shared libraries and static libraries use the same namespace, and
7388238106Sdes    # are all built from PIC.
7389238106Sdes    case $host_os in
7390238106Sdes      aix3*)
7391238106Sdes        test "$enable_shared" = yes && enable_static=no
7392238106Sdes        if test -n "$RANLIB"; then
7393238106Sdes          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7394238106Sdes          postinstall_cmds='$RANLIB $lib'
7395238106Sdes        fi
7396238106Sdes        ;;
7397238106Sdes      aix[[4-9]]*)
7398238106Sdes	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7399238106Sdes	  test "$enable_shared" = yes && enable_static=no
7400238106Sdes	fi
7401238106Sdes        ;;
7402238106Sdes    esac
7403238106Sdes    AC_MSG_RESULT([$enable_shared])
7404238106Sdes
7405238106Sdes    AC_MSG_CHECKING([whether to build static libraries])
7406238106Sdes    # Make sure either enable_shared or enable_static is yes.
7407238106Sdes    test "$enable_shared" = yes || enable_static=yes
7408238106Sdes    AC_MSG_RESULT([$enable_static])
7409238106Sdes
7410238106Sdes    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7411238106Sdes    _LT_TAGVAR(LD, $1)="$LD"
7412238106Sdes
7413238106Sdes    ## CAVEAT EMPTOR:
7414238106Sdes    ## There is no encapsulation within the following macros, do not change
7415238106Sdes    ## the running order or otherwise move them around unless you know exactly
7416238106Sdes    ## what you are doing...
7417238106Sdes    _LT_SYS_HIDDEN_LIBDEPS($1)
7418238106Sdes    _LT_COMPILER_PIC($1)
7419238106Sdes    _LT_COMPILER_C_O($1)
7420238106Sdes    _LT_COMPILER_FILE_LOCKS($1)
7421238106Sdes    _LT_LINKER_SHLIBS($1)
7422238106Sdes    _LT_SYS_DYNAMIC_LINKER($1)
7423238106Sdes    _LT_LINKER_HARDCODE_LIBPATH($1)
7424238106Sdes
7425238106Sdes    _LT_CONFIG($1)
7426238106Sdes  fi # test -n "$compiler"
7427238106Sdes
7428238106Sdes  GCC=$lt_save_GCC
7429238106Sdes  CC=$lt_save_CC
7430238106Sdes  CFLAGS=$lt_save_CFLAGS
7431238106Sdesfi # test "$_lt_disable_FC" != yes
7432238106Sdes
7433238106SdesAC_LANG_POP
7434238106Sdes])# _LT_LANG_FC_CONFIG
7435238106Sdes
7436238106Sdes
7437238106Sdes# _LT_LANG_GCJ_CONFIG([TAG])
7438238106Sdes# --------------------------
7439238106Sdes# Ensure that the configuration variables for the GNU Java Compiler compiler
7440238106Sdes# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7441238106Sdes# to write the compiler configuration to `libtool'.
7442238106Sdesm4_defun([_LT_LANG_GCJ_CONFIG],
7443238106Sdes[AC_REQUIRE([LT_PROG_GCJ])dnl
7444238106SdesAC_LANG_SAVE
7445238106Sdes
7446238106Sdes# Source file extension for Java test sources.
7447238106Sdesac_ext=java
7448238106Sdes
7449238106Sdes# Object file extension for compiled Java test sources.
7450238106Sdesobjext=o
7451238106Sdes_LT_TAGVAR(objext, $1)=$objext
7452238106Sdes
7453238106Sdes# Code to be used in simple compile tests
7454238106Sdeslt_simple_compile_test_code="class foo {}"
7455238106Sdes
7456238106Sdes# Code to be used in simple link tests
7457238106Sdeslt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7458238106Sdes
7459238106Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7460238106Sdes_LT_TAG_COMPILER
7461238106Sdes
7462238106Sdes# save warnings/boilerplate of simple test code
7463238106Sdes_LT_COMPILER_BOILERPLATE
7464238106Sdes_LT_LINKER_BOILERPLATE
7465238106Sdes
7466238106Sdes# Allow CC to be a program name with arguments.
7467238106Sdeslt_save_CC=$CC
7468238106Sdeslt_save_CFLAGS=$CFLAGS
7469238106Sdeslt_save_GCC=$GCC
7470238106SdesGCC=yes
7471238106SdesCC=${GCJ-"gcj"}
7472238106SdesCFLAGS=$GCJFLAGS
7473238106Sdescompiler=$CC
7474238106Sdes_LT_TAGVAR(compiler, $1)=$CC
7475238106Sdes_LT_TAGVAR(LD, $1)="$LD"
7476238106Sdes_LT_CC_BASENAME([$compiler])
7477238106Sdes
7478238106Sdes# GCJ did not exist at the time GCC didn't implicitly link libc in.
7479238106Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7480238106Sdes
7481238106Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7482238106Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag
7483238106Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7484238106Sdes
7485238106Sdesif test -n "$compiler"; then
7486238106Sdes  _LT_COMPILER_NO_RTTI($1)
7487238106Sdes  _LT_COMPILER_PIC($1)
7488238106Sdes  _LT_COMPILER_C_O($1)
7489238106Sdes  _LT_COMPILER_FILE_LOCKS($1)
7490238106Sdes  _LT_LINKER_SHLIBS($1)
7491238106Sdes  _LT_LINKER_HARDCODE_LIBPATH($1)
7492238106Sdes
7493238106Sdes  _LT_CONFIG($1)
7494238106Sdesfi
7495238106Sdes
7496238106SdesAC_LANG_RESTORE
7497238106Sdes
7498238106SdesGCC=$lt_save_GCC
7499238106SdesCC=$lt_save_CC
7500238106SdesCFLAGS=$lt_save_CFLAGS
7501238106Sdes])# _LT_LANG_GCJ_CONFIG
7502238106Sdes
7503238106Sdes
7504249141Sdes# _LT_LANG_GO_CONFIG([TAG])
7505249141Sdes# --------------------------
7506249141Sdes# Ensure that the configuration variables for the GNU Go compiler
7507249141Sdes# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7508249141Sdes# to write the compiler configuration to `libtool'.
7509249141Sdesm4_defun([_LT_LANG_GO_CONFIG],
7510249141Sdes[AC_REQUIRE([LT_PROG_GO])dnl
7511249141SdesAC_LANG_SAVE
7512249141Sdes
7513249141Sdes# Source file extension for Go test sources.
7514249141Sdesac_ext=go
7515249141Sdes
7516249141Sdes# Object file extension for compiled Go test sources.
7517249141Sdesobjext=o
7518249141Sdes_LT_TAGVAR(objext, $1)=$objext
7519249141Sdes
7520249141Sdes# Code to be used in simple compile tests
7521249141Sdeslt_simple_compile_test_code="package main; func main() { }"
7522249141Sdes
7523249141Sdes# Code to be used in simple link tests
7524249141Sdeslt_simple_link_test_code='package main; func main() { }'
7525249141Sdes
7526249141Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7527249141Sdes_LT_TAG_COMPILER
7528249141Sdes
7529249141Sdes# save warnings/boilerplate of simple test code
7530249141Sdes_LT_COMPILER_BOILERPLATE
7531249141Sdes_LT_LINKER_BOILERPLATE
7532249141Sdes
7533249141Sdes# Allow CC to be a program name with arguments.
7534249141Sdeslt_save_CC=$CC
7535249141Sdeslt_save_CFLAGS=$CFLAGS
7536249141Sdeslt_save_GCC=$GCC
7537249141SdesGCC=yes
7538249141SdesCC=${GOC-"gccgo"}
7539249141SdesCFLAGS=$GOFLAGS
7540249141Sdescompiler=$CC
7541249141Sdes_LT_TAGVAR(compiler, $1)=$CC
7542249141Sdes_LT_TAGVAR(LD, $1)="$LD"
7543249141Sdes_LT_CC_BASENAME([$compiler])
7544249141Sdes
7545249141Sdes# Go did not exist at the time GCC didn't implicitly link libc in.
7546249141Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7547249141Sdes
7548249141Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7549249141Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag
7550249141Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7551249141Sdes
7552249141Sdesif test -n "$compiler"; then
7553249141Sdes  _LT_COMPILER_NO_RTTI($1)
7554249141Sdes  _LT_COMPILER_PIC($1)
7555249141Sdes  _LT_COMPILER_C_O($1)
7556249141Sdes  _LT_COMPILER_FILE_LOCKS($1)
7557249141Sdes  _LT_LINKER_SHLIBS($1)
7558249141Sdes  _LT_LINKER_HARDCODE_LIBPATH($1)
7559249141Sdes
7560249141Sdes  _LT_CONFIG($1)
7561249141Sdesfi
7562249141Sdes
7563249141SdesAC_LANG_RESTORE
7564249141Sdes
7565249141SdesGCC=$lt_save_GCC
7566249141SdesCC=$lt_save_CC
7567249141SdesCFLAGS=$lt_save_CFLAGS
7568249141Sdes])# _LT_LANG_GO_CONFIG
7569249141Sdes
7570249141Sdes
7571238106Sdes# _LT_LANG_RC_CONFIG([TAG])
7572238106Sdes# -------------------------
7573238106Sdes# Ensure that the configuration variables for the Windows resource compiler
7574238106Sdes# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7575238106Sdes# to write the compiler configuration to `libtool'.
7576238106Sdesm4_defun([_LT_LANG_RC_CONFIG],
7577238106Sdes[AC_REQUIRE([LT_PROG_RC])dnl
7578238106SdesAC_LANG_SAVE
7579238106Sdes
7580238106Sdes# Source file extension for RC test sources.
7581238106Sdesac_ext=rc
7582238106Sdes
7583238106Sdes# Object file extension for compiled RC test sources.
7584238106Sdesobjext=o
7585238106Sdes_LT_TAGVAR(objext, $1)=$objext
7586238106Sdes
7587238106Sdes# Code to be used in simple compile tests
7588238106Sdeslt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7589238106Sdes
7590238106Sdes# Code to be used in simple link tests
7591238106Sdeslt_simple_link_test_code="$lt_simple_compile_test_code"
7592238106Sdes
7593238106Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7594238106Sdes_LT_TAG_COMPILER
7595238106Sdes
7596238106Sdes# save warnings/boilerplate of simple test code
7597238106Sdes_LT_COMPILER_BOILERPLATE
7598238106Sdes_LT_LINKER_BOILERPLATE
7599238106Sdes
7600238106Sdes# Allow CC to be a program name with arguments.
7601238106Sdeslt_save_CC="$CC"
7602238106Sdeslt_save_CFLAGS=$CFLAGS
7603238106Sdeslt_save_GCC=$GCC
7604238106SdesGCC=
7605238106SdesCC=${RC-"windres"}
7606238106SdesCFLAGS=
7607238106Sdescompiler=$CC
7608238106Sdes_LT_TAGVAR(compiler, $1)=$CC
7609238106Sdes_LT_CC_BASENAME([$compiler])
7610238106Sdes_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7611238106Sdes
7612238106Sdesif test -n "$compiler"; then
7613238106Sdes  :
7614238106Sdes  _LT_CONFIG($1)
7615238106Sdesfi
7616238106Sdes
7617238106SdesGCC=$lt_save_GCC
7618238106SdesAC_LANG_RESTORE
7619238106SdesCC=$lt_save_CC
7620238106SdesCFLAGS=$lt_save_CFLAGS
7621238106Sdes])# _LT_LANG_RC_CONFIG
7622238106Sdes
7623238106Sdes
7624238106Sdes# LT_PROG_GCJ
7625238106Sdes# -----------
7626238106SdesAC_DEFUN([LT_PROG_GCJ],
7627238106Sdes[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7628238106Sdes  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7629238106Sdes    [AC_CHECK_TOOL(GCJ, gcj,)
7630238106Sdes      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7631238106Sdes      AC_SUBST(GCJFLAGS)])])[]dnl
7632238106Sdes])
7633238106Sdes
7634238106Sdes# Old name:
7635238106SdesAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7636238106Sdesdnl aclocal-1.4 backwards compatibility:
7637238106Sdesdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7638238106Sdes
7639238106Sdes
7640249141Sdes# LT_PROG_GO
7641249141Sdes# ----------
7642249141SdesAC_DEFUN([LT_PROG_GO],
7643249141Sdes[AC_CHECK_TOOL(GOC, gccgo,)
7644249141Sdes])
7645249141Sdes
7646249141Sdes
7647238106Sdes# LT_PROG_RC
7648238106Sdes# ----------
7649238106SdesAC_DEFUN([LT_PROG_RC],
7650238106Sdes[AC_CHECK_TOOL(RC, windres,)
7651238106Sdes])
7652238106Sdes
7653238106Sdes# Old name:
7654238106SdesAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7655238106Sdesdnl aclocal-1.4 backwards compatibility:
7656238106Sdesdnl AC_DEFUN([LT_AC_PROG_RC], [])
7657238106Sdes
7658238106Sdes
7659238106Sdes# _LT_DECL_EGREP
7660238106Sdes# --------------
7661238106Sdes# If we don't have a new enough Autoconf to choose the best grep
7662238106Sdes# available, choose the one first in the user's PATH.
7663238106Sdesm4_defun([_LT_DECL_EGREP],
7664238106Sdes[AC_REQUIRE([AC_PROG_EGREP])dnl
7665238106SdesAC_REQUIRE([AC_PROG_FGREP])dnl
7666238106Sdestest -z "$GREP" && GREP=grep
7667238106Sdes_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7668238106Sdes_LT_DECL([], [EGREP], [1], [An ERE matcher])
7669238106Sdes_LT_DECL([], [FGREP], [1], [A literal string matcher])
7670238106Sdesdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7671238106SdesAC_SUBST([GREP])
7672238106Sdes])
7673238106Sdes
7674238106Sdes
7675238106Sdes# _LT_DECL_OBJDUMP
7676238106Sdes# --------------
7677238106Sdes# If we don't have a new enough Autoconf to choose the best objdump
7678238106Sdes# available, choose the one first in the user's PATH.
7679238106Sdesm4_defun([_LT_DECL_OBJDUMP],
7680238106Sdes[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7681238106Sdestest -z "$OBJDUMP" && OBJDUMP=objdump
7682238106Sdes_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7683238106SdesAC_SUBST([OBJDUMP])
7684238106Sdes])
7685238106Sdes
7686238106Sdes# _LT_DECL_DLLTOOL
7687238106Sdes# ----------------
7688238106Sdes# Ensure DLLTOOL variable is set.
7689238106Sdesm4_defun([_LT_DECL_DLLTOOL],
7690238106Sdes[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7691238106Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool
7692238106Sdes_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7693238106SdesAC_SUBST([DLLTOOL])
7694238106Sdes])
7695238106Sdes
7696238106Sdes# _LT_DECL_SED
7697238106Sdes# ------------
7698238106Sdes# Check for a fully-functional sed program, that truncates
7699238106Sdes# as few characters as possible.  Prefer GNU sed if found.
7700238106Sdesm4_defun([_LT_DECL_SED],
7701238106Sdes[AC_PROG_SED
7702238106Sdestest -z "$SED" && SED=sed
7703238106SdesXsed="$SED -e 1s/^X//"
7704238106Sdes_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7705238106Sdes_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7706238106Sdes    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7707238106Sdes])# _LT_DECL_SED
7708238106Sdes
7709238106Sdesm4_ifndef([AC_PROG_SED], [
7710238106Sdes# NOTE: This macro has been submitted for inclusion into   #
7711238106Sdes#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7712238106Sdes#  a released version of Autoconf we should remove this    #
7713238106Sdes#  macro and use it instead.                               #
7714238106Sdes
7715238106Sdesm4_defun([AC_PROG_SED],
7716238106Sdes[AC_MSG_CHECKING([for a sed that does not truncate output])
7717238106SdesAC_CACHE_VAL(lt_cv_path_SED,
7718238106Sdes[# Loop through the user's path and test for sed and gsed.
7719238106Sdes# Then use that list of sed's as ones to test for truncation.
7720238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721238106Sdesfor as_dir in $PATH
7722238106Sdesdo
7723238106Sdes  IFS=$as_save_IFS
7724238106Sdes  test -z "$as_dir" && as_dir=.
7725238106Sdes  for lt_ac_prog in sed gsed; do
7726238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7727238106Sdes      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7728238106Sdes        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7729238106Sdes      fi
7730238106Sdes    done
7731238106Sdes  done
7732238106Sdesdone
7733238106SdesIFS=$as_save_IFS
7734238106Sdeslt_ac_max=0
7735238106Sdeslt_ac_count=0
7736238106Sdes# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7737238106Sdes# along with /bin/sed that truncates output.
7738238106Sdesfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7739238106Sdes  test ! -f $lt_ac_sed && continue
7740238106Sdes  cat /dev/null > conftest.in
7741238106Sdes  lt_ac_count=0
7742238106Sdes  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7743238106Sdes  # Check for GNU sed and select it if it is found.
7744238106Sdes  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7745238106Sdes    lt_cv_path_SED=$lt_ac_sed
7746238106Sdes    break
7747238106Sdes  fi
7748238106Sdes  while true; do
7749238106Sdes    cat conftest.in conftest.in >conftest.tmp
7750238106Sdes    mv conftest.tmp conftest.in
7751238106Sdes    cp conftest.in conftest.nl
7752238106Sdes    echo >>conftest.nl
7753238106Sdes    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7754238106Sdes    cmp -s conftest.out conftest.nl || break
7755238106Sdes    # 10000 chars as input seems more than enough
7756238106Sdes    test $lt_ac_count -gt 10 && break
7757238106Sdes    lt_ac_count=`expr $lt_ac_count + 1`
7758238106Sdes    if test $lt_ac_count -gt $lt_ac_max; then
7759238106Sdes      lt_ac_max=$lt_ac_count
7760238106Sdes      lt_cv_path_SED=$lt_ac_sed
7761238106Sdes    fi
7762238106Sdes  done
7763238106Sdesdone
7764238106Sdes])
7765238106SdesSED=$lt_cv_path_SED
7766238106SdesAC_SUBST([SED])
7767238106SdesAC_MSG_RESULT([$SED])
7768238106Sdes])#AC_PROG_SED
7769238106Sdes])#m4_ifndef
7770238106Sdes
7771238106Sdes# Old name:
7772238106SdesAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7773238106Sdesdnl aclocal-1.4 backwards compatibility:
7774238106Sdesdnl AC_DEFUN([LT_AC_PROG_SED], [])
7775238106Sdes
7776238106Sdes
7777238106Sdes# _LT_CHECK_SHELL_FEATURES
7778238106Sdes# ------------------------
7779238106Sdes# Find out whether the shell is Bourne or XSI compatible,
7780238106Sdes# or has some other useful features.
7781238106Sdesm4_defun([_LT_CHECK_SHELL_FEATURES],
7782238106Sdes[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7783238106Sdes# Try some XSI features
7784238106Sdesxsi_shell=no
7785238106Sdes( _lt_dummy="a/b/c"
7786238106Sdes  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7787238106Sdes      = c,a/b,b/c, \
7788238106Sdes    && eval 'test $(( 1 + 1 )) -eq 2 \
7789238106Sdes    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7790238106Sdes  && xsi_shell=yes
7791238106SdesAC_MSG_RESULT([$xsi_shell])
7792238106Sdes_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7793238106Sdes
7794238106SdesAC_MSG_CHECKING([whether the shell understands "+="])
7795238106Sdeslt_shell_append=no
7796238106Sdes( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7797238106Sdes    >/dev/null 2>&1 \
7798238106Sdes  && lt_shell_append=yes
7799238106SdesAC_MSG_RESULT([$lt_shell_append])
7800238106Sdes_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7801238106Sdes
7802238106Sdesif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7803238106Sdes  lt_unset=unset
7804238106Sdeselse
7805238106Sdes  lt_unset=false
7806238106Sdesfi
7807238106Sdes_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7808238106Sdes
7809238106Sdes# test EBCDIC or ASCII
7810238106Sdescase `echo X|tr X '\101'` in
7811238106Sdes A) # ASCII based system
7812238106Sdes    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7813238106Sdes  lt_SP2NL='tr \040 \012'
7814238106Sdes  lt_NL2SP='tr \015\012 \040\040'
7815238106Sdes  ;;
7816238106Sdes *) # EBCDIC based system
7817238106Sdes  lt_SP2NL='tr \100 \n'
7818238106Sdes  lt_NL2SP='tr \r\n \100\100'
7819238106Sdes  ;;
7820238106Sdesesac
7821238106Sdes_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7822238106Sdes_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7823238106Sdes])# _LT_CHECK_SHELL_FEATURES
7824238106Sdes
7825238106Sdes
7826238106Sdes# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7827238106Sdes# ------------------------------------------------------
7828238106Sdes# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7829238106Sdes# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7830238106Sdesm4_defun([_LT_PROG_FUNCTION_REPLACE],
7831238106Sdes[dnl {
7832238106Sdessed -e '/^$1 ()$/,/^} # $1 /c\
7833238106Sdes$1 ()\
7834238106Sdes{\
7835238106Sdesm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
7836238106Sdes} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7837238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
7838238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7839238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
7840238106Sdes])
7841238106Sdes
7842238106Sdes
7843238106Sdes# _LT_PROG_REPLACE_SHELLFNS
7844238106Sdes# -------------------------
7845238106Sdes# Replace existing portable implementations of several shell functions with
7846238106Sdes# equivalent extended shell implementations where those features are available..
7847238106Sdesm4_defun([_LT_PROG_REPLACE_SHELLFNS],
7848238106Sdes[if test x"$xsi_shell" = xyes; then
7849238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7850238106Sdes    case ${1} in
7851238106Sdes      */*) func_dirname_result="${1%/*}${2}" ;;
7852238106Sdes      *  ) func_dirname_result="${3}" ;;
7853238106Sdes    esac])
7854238106Sdes
7855238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7856238106Sdes    func_basename_result="${1##*/}"])
7857238106Sdes
7858238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7859238106Sdes    case ${1} in
7860238106Sdes      */*) func_dirname_result="${1%/*}${2}" ;;
7861238106Sdes      *  ) func_dirname_result="${3}" ;;
7862238106Sdes    esac
7863238106Sdes    func_basename_result="${1##*/}"])
7864238106Sdes
7865238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7866238106Sdes    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7867238106Sdes    # positional parameters, so assign one to ordinary parameter first.
7868238106Sdes    func_stripname_result=${3}
7869238106Sdes    func_stripname_result=${func_stripname_result#"${1}"}
7870238106Sdes    func_stripname_result=${func_stripname_result%"${2}"}])
7871238106Sdes
7872238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7873238106Sdes    func_split_long_opt_name=${1%%=*}
7874238106Sdes    func_split_long_opt_arg=${1#*=}])
7875238106Sdes
7876238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7877238106Sdes    func_split_short_opt_arg=${1#??}
7878238106Sdes    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7879238106Sdes
7880238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7881238106Sdes    case ${1} in
7882238106Sdes      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7883238106Sdes      *)    func_lo2o_result=${1} ;;
7884238106Sdes    esac])
7885238106Sdes
7886238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
7887238106Sdes
7888238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
7889238106Sdes
7890238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
7891238106Sdesfi
7892238106Sdes
7893238106Sdesif test x"$lt_shell_append" = xyes; then
7894238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
7895238106Sdes
7896238106Sdes  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7897238106Sdes    func_quote_for_eval "${2}"
7898238106Sdesdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7899238106Sdes    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7900238106Sdes
7901238106Sdes  # Save a `func_append' function call where possible by direct use of '+='
7902238106Sdes  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7903238106Sdes    && mv -f "$cfgfile.tmp" "$cfgfile" \
7904238106Sdes      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7905238106Sdes  test 0 -eq $? || _lt_function_replace_fail=:
7906238106Sdeselse
7907238106Sdes  # Save a `func_append' function call even when '+=' is not available
7908238106Sdes  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7909238106Sdes    && mv -f "$cfgfile.tmp" "$cfgfile" \
7910238106Sdes      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7911238106Sdes  test 0 -eq $? || _lt_function_replace_fail=:
7912238106Sdesfi
7913238106Sdes
7914238106Sdesif test x"$_lt_function_replace_fail" = x":"; then
7915238106Sdes  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7916238106Sdesfi
7917238106Sdes])
7918238106Sdes
7919238106Sdes# _LT_PATH_CONVERSION_FUNCTIONS
7920238106Sdes# -----------------------------
7921238106Sdes# Determine which file name conversion functions should be used by
7922238106Sdes# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
7923238106Sdes# for certain cross-compile configurations and native mingw.
7924238106Sdesm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7925238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7926238106SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl
7927238106SdesAC_MSG_CHECKING([how to convert $build file names to $host format])
7928238106SdesAC_CACHE_VAL(lt_cv_to_host_file_cmd,
7929238106Sdes[case $host in
7930238106Sdes  *-*-mingw* )
7931238106Sdes    case $build in
7932238106Sdes      *-*-mingw* ) # actually msys
7933238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7934238106Sdes        ;;
7935238106Sdes      *-*-cygwin* )
7936238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7937238106Sdes        ;;
7938238106Sdes      * ) # otherwise, assume *nix
7939238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7940238106Sdes        ;;
7941238106Sdes    esac
7942238106Sdes    ;;
7943238106Sdes  *-*-cygwin* )
7944238106Sdes    case $build in
7945238106Sdes      *-*-mingw* ) # actually msys
7946238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7947238106Sdes        ;;
7948238106Sdes      *-*-cygwin* )
7949238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_noop
7950238106Sdes        ;;
7951238106Sdes      * ) # otherwise, assume *nix
7952238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7953238106Sdes        ;;
7954238106Sdes    esac
7955238106Sdes    ;;
7956238106Sdes  * ) # unhandled hosts (and "normal" native builds)
7957238106Sdes    lt_cv_to_host_file_cmd=func_convert_file_noop
7958238106Sdes    ;;
7959238106Sdesesac
7960238106Sdes])
7961238106Sdesto_host_file_cmd=$lt_cv_to_host_file_cmd
7962238106SdesAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7963238106Sdes_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7964238106Sdes         [0], [convert $build file names to $host format])dnl
7965238106Sdes
7966238106SdesAC_MSG_CHECKING([how to convert $build file names to toolchain format])
7967238106SdesAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7968238106Sdes[#assume ordinary cross tools, or native build.
7969238106Sdeslt_cv_to_tool_file_cmd=func_convert_file_noop
7970238106Sdescase $host in
7971238106Sdes  *-*-mingw* )
7972238106Sdes    case $build in
7973238106Sdes      *-*-mingw* ) # actually msys
7974238106Sdes        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7975238106Sdes        ;;
7976238106Sdes    esac
7977238106Sdes    ;;
7978238106Sdesesac
7979238106Sdes])
7980238106Sdesto_tool_file_cmd=$lt_cv_to_tool_file_cmd
7981238106SdesAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7982238106Sdes_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7983238106Sdes         [0], [convert $build files to toolchain format])dnl
7984238106Sdes])# _LT_PATH_CONVERSION_FUNCTIONS
7985238106Sdes
7986238106Sdes# Helper functions for option handling.                    -*- Autoconf -*-
7987238106Sdes#
7988238106Sdes#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
7989238106Sdes#   Inc.
7990238106Sdes#   Written by Gary V. Vaughan, 2004
7991238106Sdes#
7992238106Sdes# This file is free software; the Free Software Foundation gives
7993238106Sdes# unlimited permission to copy and/or distribute it, with or without
7994238106Sdes# modifications, as long as this notice is preserved.
7995238106Sdes
7996238106Sdes# serial 7 ltoptions.m4
7997238106Sdes
7998238106Sdes# This is to help aclocal find these macros, as it can't see m4_define.
7999238106SdesAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8000238106Sdes
8001238106Sdes
8002238106Sdes# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8003238106Sdes# ------------------------------------------
8004238106Sdesm4_define([_LT_MANGLE_OPTION],
8005238106Sdes[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8006238106Sdes
8007238106Sdes
8008238106Sdes# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8009238106Sdes# ---------------------------------------
8010238106Sdes# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8011238106Sdes# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8012238106Sdes# saved as a flag.
8013238106Sdesm4_define([_LT_SET_OPTION],
8014238106Sdes[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8015238106Sdesm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8016238106Sdes        _LT_MANGLE_DEFUN([$1], [$2]),
8017238106Sdes    [m4_warning([Unknown $1 option `$2'])])[]dnl
8018238106Sdes])
8019238106Sdes
8020238106Sdes
8021238106Sdes# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8022238106Sdes# ------------------------------------------------------------
8023238106Sdes# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8024238106Sdesm4_define([_LT_IF_OPTION],
8025238106Sdes[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8026238106Sdes
8027238106Sdes
8028238106Sdes# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8029238106Sdes# -------------------------------------------------------
8030238106Sdes# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8031238106Sdes# are set.
8032238106Sdesm4_define([_LT_UNLESS_OPTIONS],
8033238106Sdes[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8034238106Sdes	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8035238106Sdes		      [m4_define([$0_found])])])[]dnl
8036238106Sdesm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8037238106Sdes])[]dnl
8038238106Sdes])
8039238106Sdes
8040238106Sdes
8041238106Sdes# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8042238106Sdes# ----------------------------------------
8043238106Sdes# OPTION-LIST is a space-separated list of Libtool options associated
8044238106Sdes# with MACRO-NAME.  If any OPTION has a matching handler declared with
8045238106Sdes# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8046238106Sdes# the unknown option and exit.
8047238106Sdesm4_defun([_LT_SET_OPTIONS],
8048238106Sdes[# Set options
8049238106Sdesm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8050238106Sdes    [_LT_SET_OPTION([$1], _LT_Option)])
8051238106Sdes
8052238106Sdesm4_if([$1],[LT_INIT],[
8053238106Sdes  dnl
8054238106Sdes  dnl Simply set some default values (i.e off) if boolean options were not
8055238106Sdes  dnl specified:
8056238106Sdes  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8057238106Sdes  ])
8058238106Sdes  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8059238106Sdes  ])
8060238106Sdes  dnl
8061238106Sdes  dnl If no reference was made to various pairs of opposing options, then
8062238106Sdes  dnl we run the default mode handler for the pair.  For example, if neither
8063238106Sdes  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8064238106Sdes  dnl archives by default:
8065238106Sdes  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8066238106Sdes  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8067238106Sdes  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8068238106Sdes  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8069238106Sdes  		   [_LT_ENABLE_FAST_INSTALL])
8070238106Sdes  ])
8071238106Sdes])# _LT_SET_OPTIONS
8072238106Sdes
8073238106Sdes
8074238106Sdes
8075238106Sdes# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8076238106Sdes# -----------------------------------------
8077238106Sdesm4_define([_LT_MANGLE_DEFUN],
8078238106Sdes[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8079238106Sdes
8080238106Sdes
8081238106Sdes# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8082238106Sdes# -----------------------------------------------
8083238106Sdesm4_define([LT_OPTION_DEFINE],
8084238106Sdes[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8085238106Sdes])# LT_OPTION_DEFINE
8086238106Sdes
8087238106Sdes
8088238106Sdes# dlopen
8089238106Sdes# ------
8090238106SdesLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8091238106Sdes])
8092238106Sdes
8093238106SdesAU_DEFUN([AC_LIBTOOL_DLOPEN],
8094238106Sdes[_LT_SET_OPTION([LT_INIT], [dlopen])
8095238106SdesAC_DIAGNOSE([obsolete],
8096238106Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you
8097238106Sdesput the `dlopen' option into LT_INIT's first parameter.])
8098238106Sdes])
8099238106Sdes
8100238106Sdesdnl aclocal-1.4 backwards compatibility:
8101238106Sdesdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8102238106Sdes
8103238106Sdes
8104238106Sdes# win32-dll
8105238106Sdes# ---------
8106238106Sdes# Declare package support for building win32 dll's.
8107238106SdesLT_OPTION_DEFINE([LT_INIT], [win32-dll],
8108238106Sdes[enable_win32_dll=yes
8109238106Sdes
8110238106Sdescase $host in
8111238106Sdes*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8112238106Sdes  AC_CHECK_TOOL(AS, as, false)
8113238106Sdes  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8114238106Sdes  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8115238106Sdes  ;;
8116238106Sdesesac
8117238106Sdes
8118238106Sdestest -z "$AS" && AS=as
8119238106Sdes_LT_DECL([], [AS],      [1], [Assembler program])dnl
8120238106Sdes
8121238106Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool
8122238106Sdes_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8123238106Sdes
8124238106Sdestest -z "$OBJDUMP" && OBJDUMP=objdump
8125238106Sdes_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8126238106Sdes])# win32-dll
8127238106Sdes
8128238106SdesAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8129238106Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8130238106Sdes_LT_SET_OPTION([LT_INIT], [win32-dll])
8131238106SdesAC_DIAGNOSE([obsolete],
8132238106Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you
8133238106Sdesput the `win32-dll' option into LT_INIT's first parameter.])
8134238106Sdes])
8135238106Sdes
8136238106Sdesdnl aclocal-1.4 backwards compatibility:
8137238106Sdesdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8138238106Sdes
8139238106Sdes
8140238106Sdes# _LT_ENABLE_SHARED([DEFAULT])
8141238106Sdes# ----------------------------
8142238106Sdes# implement the --enable-shared flag, and supports the `shared' and
8143238106Sdes# `disable-shared' LT_INIT options.
8144238106Sdes# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8145238106Sdesm4_define([_LT_ENABLE_SHARED],
8146238106Sdes[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8147238106SdesAC_ARG_ENABLE([shared],
8148238106Sdes    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8149238106Sdes	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8150238106Sdes    [p=${PACKAGE-default}
8151238106Sdes    case $enableval in
8152238106Sdes    yes) enable_shared=yes ;;
8153238106Sdes    no) enable_shared=no ;;
8154238106Sdes    *)
8155238106Sdes      enable_shared=no
8156238106Sdes      # Look at the argument we got.  We use all the common list separators.
8157238106Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8158238106Sdes      for pkg in $enableval; do
8159238106Sdes	IFS="$lt_save_ifs"
8160238106Sdes	if test "X$pkg" = "X$p"; then
8161238106Sdes	  enable_shared=yes
8162238106Sdes	fi
8163238106Sdes      done
8164238106Sdes      IFS="$lt_save_ifs"
8165238106Sdes      ;;
8166238106Sdes    esac],
8167238106Sdes    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8168238106Sdes
8169238106Sdes    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8170238106Sdes	[Whether or not to build shared libraries])
8171238106Sdes])# _LT_ENABLE_SHARED
8172238106Sdes
8173238106SdesLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8174238106SdesLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8175238106Sdes
8176238106Sdes# Old names:
8177238106SdesAC_DEFUN([AC_ENABLE_SHARED],
8178238106Sdes[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8179238106Sdes])
8180238106Sdes
8181238106SdesAC_DEFUN([AC_DISABLE_SHARED],
8182238106Sdes[_LT_SET_OPTION([LT_INIT], [disable-shared])
8183238106Sdes])
8184238106Sdes
8185238106SdesAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8186238106SdesAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8187238106Sdes
8188238106Sdesdnl aclocal-1.4 backwards compatibility:
8189238106Sdesdnl AC_DEFUN([AM_ENABLE_SHARED], [])
8190238106Sdesdnl AC_DEFUN([AM_DISABLE_SHARED], [])
8191238106Sdes
8192238106Sdes
8193238106Sdes
8194238106Sdes# _LT_ENABLE_STATIC([DEFAULT])
8195238106Sdes# ----------------------------
8196238106Sdes# implement the --enable-static flag, and support the `static' and
8197238106Sdes# `disable-static' LT_INIT options.
8198238106Sdes# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8199238106Sdesm4_define([_LT_ENABLE_STATIC],
8200238106Sdes[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8201238106SdesAC_ARG_ENABLE([static],
8202238106Sdes    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8203238106Sdes	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8204238106Sdes    [p=${PACKAGE-default}
8205238106Sdes    case $enableval in
8206238106Sdes    yes) enable_static=yes ;;
8207238106Sdes    no) enable_static=no ;;
8208238106Sdes    *)
8209238106Sdes     enable_static=no
8210238106Sdes      # Look at the argument we got.  We use all the common list separators.
8211238106Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8212238106Sdes      for pkg in $enableval; do
8213238106Sdes	IFS="$lt_save_ifs"
8214238106Sdes	if test "X$pkg" = "X$p"; then
8215238106Sdes	  enable_static=yes
8216238106Sdes	fi
8217238106Sdes      done
8218238106Sdes      IFS="$lt_save_ifs"
8219238106Sdes      ;;
8220238106Sdes    esac],
8221238106Sdes    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8222238106Sdes
8223238106Sdes    _LT_DECL([build_old_libs], [enable_static], [0],
8224238106Sdes	[Whether or not to build static libraries])
8225238106Sdes])# _LT_ENABLE_STATIC
8226238106Sdes
8227238106SdesLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8228238106SdesLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8229238106Sdes
8230238106Sdes# Old names:
8231238106SdesAC_DEFUN([AC_ENABLE_STATIC],
8232238106Sdes[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8233238106Sdes])
8234238106Sdes
8235238106SdesAC_DEFUN([AC_DISABLE_STATIC],
8236238106Sdes[_LT_SET_OPTION([LT_INIT], [disable-static])
8237238106Sdes])
8238238106Sdes
8239238106SdesAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8240238106SdesAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8241238106Sdes
8242238106Sdesdnl aclocal-1.4 backwards compatibility:
8243238106Sdesdnl AC_DEFUN([AM_ENABLE_STATIC], [])
8244238106Sdesdnl AC_DEFUN([AM_DISABLE_STATIC], [])
8245238106Sdes
8246238106Sdes
8247238106Sdes
8248238106Sdes# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8249238106Sdes# ----------------------------------
8250238106Sdes# implement the --enable-fast-install flag, and support the `fast-install'
8251238106Sdes# and `disable-fast-install' LT_INIT options.
8252238106Sdes# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8253238106Sdesm4_define([_LT_ENABLE_FAST_INSTALL],
8254238106Sdes[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8255238106SdesAC_ARG_ENABLE([fast-install],
8256238106Sdes    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8257238106Sdes    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8258238106Sdes    [p=${PACKAGE-default}
8259238106Sdes    case $enableval in
8260238106Sdes    yes) enable_fast_install=yes ;;
8261238106Sdes    no) enable_fast_install=no ;;
8262238106Sdes    *)
8263238106Sdes      enable_fast_install=no
8264238106Sdes      # Look at the argument we got.  We use all the common list separators.
8265238106Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8266238106Sdes      for pkg in $enableval; do
8267238106Sdes	IFS="$lt_save_ifs"
8268238106Sdes	if test "X$pkg" = "X$p"; then
8269238106Sdes	  enable_fast_install=yes
8270238106Sdes	fi
8271238106Sdes      done
8272238106Sdes      IFS="$lt_save_ifs"
8273238106Sdes      ;;
8274238106Sdes    esac],
8275238106Sdes    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8276238106Sdes
8277238106Sdes_LT_DECL([fast_install], [enable_fast_install], [0],
8278238106Sdes	 [Whether or not to optimize for fast installation])dnl
8279238106Sdes])# _LT_ENABLE_FAST_INSTALL
8280238106Sdes
8281238106SdesLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8282238106SdesLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8283238106Sdes
8284238106Sdes# Old names:
8285238106SdesAU_DEFUN([AC_ENABLE_FAST_INSTALL],
8286238106Sdes[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8287238106SdesAC_DIAGNOSE([obsolete],
8288238106Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8289238106Sdesthe `fast-install' option into LT_INIT's first parameter.])
8290238106Sdes])
8291238106Sdes
8292238106SdesAU_DEFUN([AC_DISABLE_FAST_INSTALL],
8293238106Sdes[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8294238106SdesAC_DIAGNOSE([obsolete],
8295238106Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8296238106Sdesthe `disable-fast-install' option into LT_INIT's first parameter.])
8297238106Sdes])
8298238106Sdes
8299238106Sdesdnl aclocal-1.4 backwards compatibility:
8300238106Sdesdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8301238106Sdesdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8302238106Sdes
8303238106Sdes
8304238106Sdes# _LT_WITH_PIC([MODE])
8305238106Sdes# --------------------
8306238106Sdes# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8307238106Sdes# LT_INIT options.
8308238106Sdes# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8309238106Sdesm4_define([_LT_WITH_PIC],
8310238106Sdes[AC_ARG_WITH([pic],
8311249141Sdes    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8312238106Sdes	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8313249141Sdes    [lt_p=${PACKAGE-default}
8314249141Sdes    case $withval in
8315249141Sdes    yes|no) pic_mode=$withval ;;
8316249141Sdes    *)
8317249141Sdes      pic_mode=default
8318249141Sdes      # Look at the argument we got.  We use all the common list separators.
8319249141Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8320249141Sdes      for lt_pkg in $withval; do
8321249141Sdes	IFS="$lt_save_ifs"
8322249141Sdes	if test "X$lt_pkg" = "X$lt_p"; then
8323249141Sdes	  pic_mode=yes
8324249141Sdes	fi
8325249141Sdes      done
8326249141Sdes      IFS="$lt_save_ifs"
8327249141Sdes      ;;
8328249141Sdes    esac],
8329238106Sdes    [pic_mode=default])
8330238106Sdes
8331238106Sdestest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8332238106Sdes
8333238106Sdes_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8334238106Sdes])# _LT_WITH_PIC
8335238106Sdes
8336238106SdesLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8337238106SdesLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8338238106Sdes
8339238106Sdes# Old name:
8340238106SdesAU_DEFUN([AC_LIBTOOL_PICMODE],
8341238106Sdes[_LT_SET_OPTION([LT_INIT], [pic-only])
8342238106SdesAC_DIAGNOSE([obsolete],
8343238106Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you
8344238106Sdesput the `pic-only' option into LT_INIT's first parameter.])
8345238106Sdes])
8346238106Sdes
8347238106Sdesdnl aclocal-1.4 backwards compatibility:
8348238106Sdesdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8349238106Sdes
8350238106Sdes
8351238106Sdesm4_define([_LTDL_MODE], [])
8352238106SdesLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8353238106Sdes		 [m4_define([_LTDL_MODE], [nonrecursive])])
8354238106SdesLT_OPTION_DEFINE([LTDL_INIT], [recursive],
8355238106Sdes		 [m4_define([_LTDL_MODE], [recursive])])
8356238106SdesLT_OPTION_DEFINE([LTDL_INIT], [subproject],
8357238106Sdes		 [m4_define([_LTDL_MODE], [subproject])])
8358238106Sdes
8359238106Sdesm4_define([_LTDL_TYPE], [])
8360238106SdesLT_OPTION_DEFINE([LTDL_INIT], [installable],
8361238106Sdes		 [m4_define([_LTDL_TYPE], [installable])])
8362238106SdesLT_OPTION_DEFINE([LTDL_INIT], [convenience],
8363238106Sdes		 [m4_define([_LTDL_TYPE], [convenience])])
8364238106Sdes
8365238106Sdes# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8366238106Sdes#
8367238106Sdes# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8368238106Sdes# Written by Gary V. Vaughan, 2004
8369238106Sdes#
8370238106Sdes# This file is free software; the Free Software Foundation gives
8371238106Sdes# unlimited permission to copy and/or distribute it, with or without
8372238106Sdes# modifications, as long as this notice is preserved.
8373238106Sdes
8374238106Sdes# serial 6 ltsugar.m4
8375238106Sdes
8376238106Sdes# This is to help aclocal find these macros, as it can't see m4_define.
8377238106SdesAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8378238106Sdes
8379238106Sdes
8380238106Sdes# lt_join(SEP, ARG1, [ARG2...])
8381238106Sdes# -----------------------------
8382238106Sdes# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8383238106Sdes# associated separator.
8384238106Sdes# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8385238106Sdes# versions in m4sugar had bugs.
8386238106Sdesm4_define([lt_join],
8387238106Sdes[m4_if([$#], [1], [],
8388238106Sdes       [$#], [2], [[$2]],
8389238106Sdes       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8390238106Sdesm4_define([_lt_join],
8391238106Sdes[m4_if([$#$2], [2], [],
8392238106Sdes       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8393238106Sdes
8394238106Sdes
8395238106Sdes# lt_car(LIST)
8396238106Sdes# lt_cdr(LIST)
8397238106Sdes# ------------
8398238106Sdes# Manipulate m4 lists.
8399238106Sdes# These macros are necessary as long as will still need to support
8400238106Sdes# Autoconf-2.59 which quotes differently.
8401238106Sdesm4_define([lt_car], [[$1]])
8402238106Sdesm4_define([lt_cdr],
8403238106Sdes[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8404238106Sdes       [$#], 1, [],
8405238106Sdes       [m4_dquote(m4_shift($@))])])
8406238106Sdesm4_define([lt_unquote], $1)
8407238106Sdes
8408238106Sdes
8409238106Sdes# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8410238106Sdes# ------------------------------------------
8411238106Sdes# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8412238106Sdes# Note that neither SEPARATOR nor STRING are expanded; they are appended
8413238106Sdes# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8414238106Sdes# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8415238106Sdes# than defined and empty).
8416238106Sdes#
8417238106Sdes# This macro is needed until we can rely on Autoconf 2.62, since earlier
8418238106Sdes# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8419238106Sdesm4_define([lt_append],
8420238106Sdes[m4_define([$1],
8421238106Sdes	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8422238106Sdes
8423238106Sdes
8424238106Sdes
8425238106Sdes# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8426238106Sdes# ----------------------------------------------------------
8427238106Sdes# Produce a SEP delimited list of all paired combinations of elements of
8428238106Sdes# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8429238106Sdes# has the form PREFIXmINFIXSUFFIXn.
8430238106Sdes# Needed until we can rely on m4_combine added in Autoconf 2.62.
8431238106Sdesm4_define([lt_combine],
8432238106Sdes[m4_if(m4_eval([$# > 3]), [1],
8433238106Sdes       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8434238106Sdes[[m4_foreach([_Lt_prefix], [$2],
8435238106Sdes	     [m4_foreach([_Lt_suffix],
8436238106Sdes		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8437238106Sdes	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8438238106Sdes
8439238106Sdes
8440238106Sdes# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8441238106Sdes# -----------------------------------------------------------------------
8442238106Sdes# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8443238106Sdes# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8444238106Sdesm4_define([lt_if_append_uniq],
8445238106Sdes[m4_ifdef([$1],
8446238106Sdes	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8447238106Sdes		 [lt_append([$1], [$2], [$3])$4],
8448238106Sdes		 [$5])],
8449238106Sdes	  [lt_append([$1], [$2], [$3])$4])])
8450238106Sdes
8451238106Sdes
8452238106Sdes# lt_dict_add(DICT, KEY, VALUE)
8453238106Sdes# -----------------------------
8454238106Sdesm4_define([lt_dict_add],
8455238106Sdes[m4_define([$1($2)], [$3])])
8456238106Sdes
8457238106Sdes
8458238106Sdes# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8459238106Sdes# --------------------------------------------
8460238106Sdesm4_define([lt_dict_add_subkey],
8461238106Sdes[m4_define([$1($2:$3)], [$4])])
8462238106Sdes
8463238106Sdes
8464238106Sdes# lt_dict_fetch(DICT, KEY, [SUBKEY])
8465238106Sdes# ----------------------------------
8466238106Sdesm4_define([lt_dict_fetch],
8467238106Sdes[m4_ifval([$3],
8468238106Sdes	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8469238106Sdes    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8470238106Sdes
8471238106Sdes
8472238106Sdes# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8473238106Sdes# -----------------------------------------------------------------
8474238106Sdesm4_define([lt_if_dict_fetch],
8475238106Sdes[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8476238106Sdes	[$5],
8477238106Sdes    [$6])])
8478238106Sdes
8479238106Sdes
8480238106Sdes# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8481238106Sdes# --------------------------------------------------------------
8482238106Sdesm4_define([lt_dict_filter],
8483238106Sdes[m4_if([$5], [], [],
8484238106Sdes  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8485238106Sdes           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8486238106Sdes		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8487238106Sdes])
8488238106Sdes
8489238106Sdes# ltversion.m4 -- version numbers			-*- Autoconf -*-
8490238106Sdes#
8491238106Sdes#   Copyright (C) 2004 Free Software Foundation, Inc.
8492238106Sdes#   Written by Scott James Remnant, 2004
8493238106Sdes#
8494238106Sdes# This file is free software; the Free Software Foundation gives
8495238106Sdes# unlimited permission to copy and/or distribute it, with or without
8496238106Sdes# modifications, as long as this notice is preserved.
8497238106Sdes
8498238106Sdes# @configure_input@
8499238106Sdes
8500249141Sdes# serial 3337 ltversion.m4
8501238106Sdes# This file is part of GNU Libtool
8502238106Sdes
8503249141Sdesm4_define([LT_PACKAGE_VERSION], [2.4.2])
8504249141Sdesm4_define([LT_PACKAGE_REVISION], [1.3337])
8505238106Sdes
8506238106SdesAC_DEFUN([LTVERSION_VERSION],
8507249141Sdes[macro_version='2.4.2'
8508249141Sdesmacro_revision='1.3337'
8509238106Sdes_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8510238106Sdes_LT_DECL(, macro_revision, 0)
8511238106Sdes])
8512238106Sdes
8513238106Sdes# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8514238106Sdes#
8515238106Sdes#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
8516238106Sdes#   Written by Scott James Remnant, 2004.
8517238106Sdes#
8518238106Sdes# This file is free software; the Free Software Foundation gives
8519238106Sdes# unlimited permission to copy and/or distribute it, with or without
8520238106Sdes# modifications, as long as this notice is preserved.
8521238106Sdes
8522238106Sdes# serial 5 lt~obsolete.m4
8523238106Sdes
8524238106Sdes# These exist entirely to fool aclocal when bootstrapping libtool.
8525238106Sdes#
8526238106Sdes# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8527238106Sdes# which have later been changed to m4_define as they aren't part of the
8528238106Sdes# exported API, or moved to Autoconf or Automake where they belong.
8529238106Sdes#
8530238106Sdes# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8531238106Sdes# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8532238106Sdes# using a macro with the same name in our local m4/libtool.m4 it'll
8533238106Sdes# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8534238106Sdes# and doesn't know about Autoconf macros at all.)
8535238106Sdes#
8536238106Sdes# So we provide this file, which has a silly filename so it's always
8537238106Sdes# included after everything else.  This provides aclocal with the
8538238106Sdes# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8539238106Sdes# because those macros already exist, or will be overwritten later.
8540238106Sdes# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8541238106Sdes#
8542238106Sdes# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8543238106Sdes# Yes, that means every name once taken will need to remain here until
8544238106Sdes# we give up compatibility with versions before 1.7, at which point
8545238106Sdes# we need to keep only those names which we still refer to.
8546238106Sdes
8547238106Sdes# This is to help aclocal find these macros, as it can't see m4_define.
8548238106SdesAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8549238106Sdes
8550238106Sdesm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8551238106Sdesm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8552238106Sdesm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8553238106Sdesm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8554238106Sdesm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8555238106Sdesm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8556238106Sdesm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8557238106Sdesm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8558238106Sdesm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8559238106Sdesm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8560238106Sdesm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8561238106Sdesm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8562238106Sdesm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8563238106Sdesm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8564238106Sdesm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8565238106Sdesm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8566238106Sdesm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8567238106Sdesm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8568238106Sdesm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8569238106Sdesm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8570238106Sdesm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8571238106Sdesm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8572238106Sdesm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8573238106Sdesm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8574238106Sdesm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8575238106Sdesm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8576238106Sdesm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8577238106Sdesm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8578238106Sdesm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8579238106Sdesm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8580238106Sdesm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8581238106Sdesm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8582238106Sdesm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8583238106Sdesm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8584238106Sdesm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8585238106Sdesm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8586238106Sdesm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8587238106Sdesm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8588238106Sdesm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8589238106Sdesm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8590238106Sdesm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8591238106Sdesm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8592238106Sdesm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8593238106Sdesm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8594238106Sdesm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8595238106Sdesm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8596238106Sdesm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8597238106Sdesm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8598238106Sdesm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8599238106Sdesm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8600238106Sdesm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8601238106Sdesm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8602238106Sdesm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8603238106Sdesm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8604238106Sdesm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
8605238106Sdesm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
8606238106Sdesm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
8607238106Sdesm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
8608238106Sdesm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
8609238106Sdesm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
8610238106Sdesm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
8611238106Sdes
8612