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