1ecce36beSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2ecce36beSmrg
3ecce36beSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4ecce36beSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5ecce36beSmrg# This file is free software; the Free Software Foundation
6ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
7ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8ecce36beSmrg
9ecce36beSmrg# This program is distributed in the hope that it will be useful,
10ecce36beSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11ecce36beSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12ecce36beSmrg# PARTICULAR PURPOSE.
13ecce36beSmrg
14ecce36beSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15ecce36beSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16ecce36beSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
17ecce36beSmrg[m4_warning([this file was generated for autoconf 2.64.
18ecce36beSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19ecce36beSmrgIf you have problems, you may need to regenerate the build system entirely.
20ecce36beSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21ecce36beSmrg
22ecce36beSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23ecce36beSmrg#
24ecce36beSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25ecce36beSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26ecce36beSmrg#   Written by Gordon Matzigkeit, 1996
27ecce36beSmrg#
28ecce36beSmrg# This file is free software; the Free Software Foundation gives
29ecce36beSmrg# unlimited permission to copy and/or distribute it, with or without
30ecce36beSmrg# modifications, as long as this notice is preserved.
31ecce36beSmrg
32ecce36beSmrgm4_define([_LT_COPYING], [dnl
33ecce36beSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34ecce36beSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35ecce36beSmrg#   Written by Gordon Matzigkeit, 1996
36ecce36beSmrg#
37ecce36beSmrg#   This file is part of GNU Libtool.
38ecce36beSmrg#
39ecce36beSmrg# GNU Libtool is free software; you can redistribute it and/or
40ecce36beSmrg# modify it under the terms of the GNU General Public License as
41ecce36beSmrg# published by the Free Software Foundation; either version 2 of
42ecce36beSmrg# the License, or (at your option) any later version.
43ecce36beSmrg#
44ecce36beSmrg# As a special exception to the GNU General Public License,
45ecce36beSmrg# if you distribute this file as part of a program or library that
46ecce36beSmrg# is built using GNU Libtool, you may include this file under the
47ecce36beSmrg# same distribution terms that you use for the rest of that program.
48ecce36beSmrg#
49ecce36beSmrg# GNU Libtool is distributed in the hope that it will be useful,
50ecce36beSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51ecce36beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52ecce36beSmrg# GNU General Public License for more details.
53ecce36beSmrg#
54ecce36beSmrg# You should have received a copy of the GNU General Public License
55ecce36beSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56ecce36beSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57ecce36beSmrg# obtained by writing to the Free Software Foundation, Inc.,
58ecce36beSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59ecce36beSmrg])
60ecce36beSmrg
61ecce36beSmrg# serial 56 LT_INIT
62ecce36beSmrg
63ecce36beSmrg
64ecce36beSmrg# LT_PREREQ(VERSION)
65ecce36beSmrg# ------------------
66ecce36beSmrg# Complain and exit if this libtool version is less that VERSION.
67ecce36beSmrgm4_defun([LT_PREREQ],
68ecce36beSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69ecce36beSmrg       [m4_default([$3],
70ecce36beSmrg		   [m4_fatal([Libtool version $1 or higher is required],
71ecce36beSmrg		             63)])],
72ecce36beSmrg       [$2])])
73ecce36beSmrg
74ecce36beSmrg
75ecce36beSmrg# _LT_CHECK_BUILDDIR
76ecce36beSmrg# ------------------
77ecce36beSmrg# Complain if the absolute build directory name contains unusual characters
78ecce36beSmrgm4_defun([_LT_CHECK_BUILDDIR],
79ecce36beSmrg[case `pwd` in
80ecce36beSmrg  *\ * | *\	*)
81ecce36beSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82ecce36beSmrgesac
83ecce36beSmrg])
84ecce36beSmrg
85ecce36beSmrg
86ecce36beSmrg# LT_INIT([OPTIONS])
87ecce36beSmrg# ------------------
88ecce36beSmrgAC_DEFUN([LT_INIT],
89ecce36beSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90ecce36beSmrgAC_BEFORE([$0], [LT_LANG])dnl
91ecce36beSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92ecce36beSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93ecce36beSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
94ecce36beSmrg
95ecce36beSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96ecce36beSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97ecce36beSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98ecce36beSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99ecce36beSmrgdnl unless we require an AC_DEFUNed macro:
100ecce36beSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101ecce36beSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102ecce36beSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103ecce36beSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104ecce36beSmrgm4_require([_LT_PROG_LTMAIN])dnl
105ecce36beSmrg
106ecce36beSmrgdnl Parse OPTIONS
107ecce36beSmrg_LT_SET_OPTIONS([$0], [$1])
108ecce36beSmrg
109ecce36beSmrg# This can be used to rebuild libtool when needed
110ecce36beSmrgLIBTOOL_DEPS="$ltmain"
111ecce36beSmrg
112ecce36beSmrg# Always use our own libtool.
113ecce36beSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
114ecce36beSmrgAC_SUBST(LIBTOOL)dnl
115ecce36beSmrg
116ecce36beSmrg_LT_SETUP
117ecce36beSmrg
118ecce36beSmrg# Only expand once:
119ecce36beSmrgm4_define([LT_INIT])
120ecce36beSmrg])# LT_INIT
121ecce36beSmrg
122ecce36beSmrg# Old names:
123ecce36beSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124ecce36beSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
126ecce36beSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127ecce36beSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128ecce36beSmrg
129ecce36beSmrg
130ecce36beSmrg# _LT_CC_BASENAME(CC)
131ecce36beSmrg# -------------------
132ecce36beSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133ecce36beSmrgm4_defun([_LT_CC_BASENAME],
134ecce36beSmrg[for cc_temp in $1""; do
135ecce36beSmrg  case $cc_temp in
136ecce36beSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137ecce36beSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138ecce36beSmrg    \-*) ;;
139ecce36beSmrg    *) break;;
140ecce36beSmrg  esac
141ecce36beSmrgdone
142ecce36beSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143ecce36beSmrg])
144ecce36beSmrg
145ecce36beSmrg
146ecce36beSmrg# _LT_FILEUTILS_DEFAULTS
147ecce36beSmrg# ----------------------
148ecce36beSmrg# It is okay to use these file commands and assume they have been set
149ecce36beSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150ecce36beSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151ecce36beSmrg[: ${CP="cp -f"}
152ecce36beSmrg: ${MV="mv -f"}
153ecce36beSmrg: ${RM="rm -f"}
154ecce36beSmrg])# _LT_FILEUTILS_DEFAULTS
155ecce36beSmrg
156ecce36beSmrg
157ecce36beSmrg# _LT_SETUP
158ecce36beSmrg# ---------
159ecce36beSmrgm4_defun([_LT_SETUP],
160ecce36beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161ecce36beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162ecce36beSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163ecce36beSmrg_LT_DECL([], [host], [0])dnl
164ecce36beSmrg_LT_DECL([], [host_os], [0])dnl
165ecce36beSmrgdnl
166ecce36beSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167ecce36beSmrg_LT_DECL([], [build], [0])dnl
168ecce36beSmrg_LT_DECL([], [build_os], [0])dnl
169ecce36beSmrgdnl
170ecce36beSmrgAC_REQUIRE([AC_PROG_CC])dnl
171ecce36beSmrgAC_REQUIRE([LT_PATH_LD])dnl
172ecce36beSmrgAC_REQUIRE([LT_PATH_NM])dnl
173ecce36beSmrgdnl
174ecce36beSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175ecce36beSmrgtest -z "$LN_S" && LN_S="ln -s"
176ecce36beSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177ecce36beSmrgdnl
178ecce36beSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179ecce36beSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180ecce36beSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181ecce36beSmrgdnl
182ecce36beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183ecce36beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184ecce36beSmrgm4_require([_LT_CMD_RELOAD])dnl
185ecce36beSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186ecce36beSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187ecce36beSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188ecce36beSmrg
189ecce36beSmrg_LT_CONFIG_LIBTOOL_INIT([
190ecce36beSmrg# See if we are running on zsh, and set the options which allow our
191ecce36beSmrg# commands through without removal of \ escapes INIT.
192ecce36beSmrgif test -n "\${ZSH_VERSION+set}" ; then
193ecce36beSmrg   setopt NO_GLOB_SUBST
194ecce36beSmrgfi
195ecce36beSmrg])
196ecce36beSmrgif test -n "${ZSH_VERSION+set}" ; then
197ecce36beSmrg   setopt NO_GLOB_SUBST
198ecce36beSmrgfi
199ecce36beSmrg
200ecce36beSmrg_LT_CHECK_OBJDIR
201ecce36beSmrg
202ecce36beSmrgm4_require([_LT_TAG_COMPILER])dnl
203ecce36beSmrg_LT_PROG_ECHO_BACKSLASH
204ecce36beSmrg
205ecce36beSmrgcase $host_os in
206ecce36beSmrgaix3*)
207ecce36beSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
208ecce36beSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
209ecce36beSmrg  # vanish in a puff of smoke.
210ecce36beSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
211ecce36beSmrg    COLLECT_NAMES=
212ecce36beSmrg    export COLLECT_NAMES
213ecce36beSmrg  fi
214ecce36beSmrg  ;;
215ecce36beSmrgesac
216ecce36beSmrg
217ecce36beSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
218ecce36beSmrg# metacharacters that are still active within double-quoted strings.
219ecce36beSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220ecce36beSmrg
221ecce36beSmrg# Same as above, but do not quote variable references.
222ecce36beSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
223ecce36beSmrg
224ecce36beSmrg# Sed substitution to delay expansion of an escaped shell variable in a
225ecce36beSmrg# double_quote_subst'ed string.
226ecce36beSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227ecce36beSmrg
228ecce36beSmrg# Sed substitution to delay expansion of an escaped single quote.
229ecce36beSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230ecce36beSmrg
231ecce36beSmrg# Sed substitution to avoid accidental globbing in evaled expressions
232ecce36beSmrgno_glob_subst='s/\*/\\\*/g'
233ecce36beSmrg
234ecce36beSmrg# Global variables:
235ecce36beSmrgofile=libtool
236ecce36beSmrgcan_build_shared=yes
237ecce36beSmrg
238ecce36beSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
239ecce36beSmrg# which needs '.lib').
240ecce36beSmrglibext=a
241ecce36beSmrg
242ecce36beSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
243ecce36beSmrg
244ecce36beSmrgold_CC="$CC"
245ecce36beSmrgold_CFLAGS="$CFLAGS"
246ecce36beSmrg
247ecce36beSmrg# Set sane defaults for various variables
248ecce36beSmrgtest -z "$CC" && CC=cc
249ecce36beSmrgtest -z "$LTCC" && LTCC=$CC
250ecce36beSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
251ecce36beSmrgtest -z "$LD" && LD=ld
252ecce36beSmrgtest -z "$ac_objext" && ac_objext=o
253ecce36beSmrg
254ecce36beSmrg_LT_CC_BASENAME([$compiler])
255ecce36beSmrg
256ecce36beSmrg# Only perform the check for file, if the check method requires it
257ecce36beSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
258ecce36beSmrgcase $deplibs_check_method in
259ecce36beSmrgfile_magic*)
260ecce36beSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261ecce36beSmrg    _LT_PATH_MAGIC
262ecce36beSmrg  fi
263ecce36beSmrg  ;;
264ecce36beSmrgesac
265ecce36beSmrg
266ecce36beSmrg# Use C for the default configuration in the libtool script
267ecce36beSmrgLT_SUPPORTED_TAG([CC])
268ecce36beSmrg_LT_LANG_C_CONFIG
269ecce36beSmrg_LT_LANG_DEFAULT_CONFIG
270ecce36beSmrg_LT_CONFIG_COMMANDS
271ecce36beSmrg])# _LT_SETUP
272ecce36beSmrg
273ecce36beSmrg
274ecce36beSmrg# _LT_PROG_LTMAIN
275ecce36beSmrg# ---------------
276ecce36beSmrg# Note that this code is called both from `configure', and `config.status'
277ecce36beSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278ecce36beSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279ecce36beSmrg# so we pass a copy along to make sure it has a sensible value anyway.
280ecce36beSmrgm4_defun([_LT_PROG_LTMAIN],
281ecce36beSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282ecce36beSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283ecce36beSmrgltmain="$ac_aux_dir/ltmain.sh"
284ecce36beSmrg])# _LT_PROG_LTMAIN
285ecce36beSmrg
286ecce36beSmrg
287ecce36beSmrg
288ecce36beSmrg# So that we can recreate a full libtool script including additional
289ecce36beSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290ecce36beSmrg# in macros and then make a single call at the end using the `libtool'
291ecce36beSmrg# label.
292ecce36beSmrg
293ecce36beSmrg
294ecce36beSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295ecce36beSmrg# ----------------------------------------
296ecce36beSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297ecce36beSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298ecce36beSmrg[m4_ifval([$1],
299ecce36beSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300ecce36beSmrg                     [$1
301ecce36beSmrg])])])
302ecce36beSmrg
303ecce36beSmrg# Initialize.
304ecce36beSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305ecce36beSmrg
306ecce36beSmrg
307ecce36beSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308ecce36beSmrg# ------------------------------
309ecce36beSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310ecce36beSmrgm4_define([_LT_CONFIG_LIBTOOL],
311ecce36beSmrg[m4_ifval([$1],
312ecce36beSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313ecce36beSmrg                     [$1
314ecce36beSmrg])])])
315ecce36beSmrg
316ecce36beSmrg# Initialize.
317ecce36beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318ecce36beSmrg
319ecce36beSmrg
320ecce36beSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321ecce36beSmrg# -----------------------------------------------------
322ecce36beSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323ecce36beSmrg[_LT_CONFIG_LIBTOOL([$1])
324ecce36beSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
325ecce36beSmrg])
326ecce36beSmrg
327ecce36beSmrg
328ecce36beSmrg# _LT_FORMAT_COMMENT([COMMENT])
329ecce36beSmrg# -----------------------------
330ecce36beSmrg# Add leading comment marks to the start of each line, and a trailing
331ecce36beSmrg# full-stop to the whole comment if one is not present already.
332ecce36beSmrgm4_define([_LT_FORMAT_COMMENT],
333ecce36beSmrg[m4_ifval([$1], [
334ecce36beSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335ecce36beSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336ecce36beSmrg)])
337ecce36beSmrg
338ecce36beSmrg
339ecce36beSmrg
340ecce36beSmrg
341ecce36beSmrg
342ecce36beSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343ecce36beSmrg# -------------------------------------------------------------------
344ecce36beSmrg# CONFIGNAME is the name given to the value in the libtool script.
345ecce36beSmrg# VARNAME is the (base) name used in the configure script.
346ecce36beSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347ecce36beSmrg# VARNAME.  Any other value will be used directly.
348ecce36beSmrgm4_define([_LT_DECL],
349ecce36beSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350ecce36beSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351ecce36beSmrg	[m4_ifval([$1], [$1], [$2])])
352ecce36beSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353ecce36beSmrg    m4_ifval([$4],
354ecce36beSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355ecce36beSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356ecce36beSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357ecce36beSmrg])
358ecce36beSmrg
359ecce36beSmrg
360ecce36beSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361ecce36beSmrg# --------------------------------------------------------
362ecce36beSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363ecce36beSmrg
364ecce36beSmrg
365ecce36beSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366ecce36beSmrg# ------------------------------------------------
367ecce36beSmrgm4_define([lt_decl_tag_varnames],
368ecce36beSmrg[_lt_decl_filter([tagged?], [yes], $@)])
369ecce36beSmrg
370ecce36beSmrg
371ecce36beSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372ecce36beSmrg# ---------------------------------------------------------
373ecce36beSmrgm4_define([_lt_decl_filter],
374ecce36beSmrg[m4_case([$#],
375ecce36beSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
376ecce36beSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377ecce36beSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378ecce36beSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379ecce36beSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380ecce36beSmrg])
381ecce36beSmrg
382ecce36beSmrg
383ecce36beSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384ecce36beSmrg# --------------------------------------------------
385ecce36beSmrgm4_define([lt_decl_quote_varnames],
386ecce36beSmrg[_lt_decl_filter([value], [1], $@)])
387ecce36beSmrg
388ecce36beSmrg
389ecce36beSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390ecce36beSmrg# ---------------------------------------------------
391ecce36beSmrgm4_define([lt_decl_dquote_varnames],
392ecce36beSmrg[_lt_decl_filter([value], [2], $@)])
393ecce36beSmrg
394ecce36beSmrg
395ecce36beSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396ecce36beSmrg# ---------------------------------------------------
397ecce36beSmrgm4_define([lt_decl_varnames_tagged],
398ecce36beSmrg[m4_assert([$# <= 2])dnl
399ecce36beSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
400ecce36beSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401ecce36beSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402ecce36beSmrgm4_define([_lt_decl_varnames_tagged],
403ecce36beSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404ecce36beSmrg
405ecce36beSmrg
406ecce36beSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407ecce36beSmrg# ------------------------------------------------
408ecce36beSmrgm4_define([lt_decl_all_varnames],
409ecce36beSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410ecce36beSmrg     m4_if([$2], [],
411ecce36beSmrg	   m4_quote(lt_decl_varnames),
412ecce36beSmrg	m4_quote(m4_shift($@))))[]dnl
413ecce36beSmrg])
414ecce36beSmrgm4_define([_lt_decl_all_varnames],
415ecce36beSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
416ecce36beSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417ecce36beSmrg])
418ecce36beSmrg
419ecce36beSmrg
420ecce36beSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421ecce36beSmrg# ------------------------------------
422ecce36beSmrg# Quote a variable value, and forward it to `config.status' so that its
423ecce36beSmrg# declaration there will have the same value as in `configure'.  VARNAME
424ecce36beSmrg# must have a single quote delimited value for this to work.
425ecce36beSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426ecce36beSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427ecce36beSmrg
428ecce36beSmrg
429ecce36beSmrg# _LT_CONFIG_STATUS_DECLARATIONS
430ecce36beSmrg# ------------------------------
431ecce36beSmrg# We delimit libtool config variables with single quotes, so when
432ecce36beSmrg# we write them to config.status, we have to be sure to quote all
433ecce36beSmrg# embedded single quotes properly.  In configure, this macro expands
434ecce36beSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435ecce36beSmrg#
436ecce36beSmrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437ecce36beSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438ecce36beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439ecce36beSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440ecce36beSmrg
441ecce36beSmrg
442ecce36beSmrg# _LT_LIBTOOL_TAGS
443ecce36beSmrg# ----------------
444ecce36beSmrg# Output comment and list of tags supported by the script
445ecce36beSmrgm4_defun([_LT_LIBTOOL_TAGS],
446ecce36beSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447ecce36beSmrgavailable_tags="_LT_TAGS"dnl
448ecce36beSmrg])
449ecce36beSmrg
450ecce36beSmrg
451ecce36beSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452ecce36beSmrg# -----------------------------------
453ecce36beSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454ecce36beSmrg# expand to a commented shell variable setting:
455ecce36beSmrg#
456ecce36beSmrg#    # Some comment about what VAR is for.
457ecce36beSmrg#    visible_name=$lt_internal_name
458ecce36beSmrgm4_define([_LT_LIBTOOL_DECLARE],
459ecce36beSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460ecce36beSmrg					   [description])))[]dnl
461ecce36beSmrgm4_pushdef([_libtool_name],
462ecce36beSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463ecce36beSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464ecce36beSmrg    [0], [_libtool_name=[$]$1],
465ecce36beSmrg    [1], [_libtool_name=$lt_[]$1],
466ecce36beSmrg    [2], [_libtool_name=$lt_[]$1],
467ecce36beSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468ecce36beSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469ecce36beSmrg])
470ecce36beSmrg
471ecce36beSmrg
472ecce36beSmrg# _LT_LIBTOOL_CONFIG_VARS
473ecce36beSmrg# -----------------------
474ecce36beSmrg# Produce commented declarations of non-tagged libtool config variables
475ecce36beSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476ecce36beSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477ecce36beSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478ecce36beSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479ecce36beSmrg[m4_foreach([_lt_var],
480ecce36beSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481ecce36beSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482ecce36beSmrg
483ecce36beSmrg
484ecce36beSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
485ecce36beSmrg# -------------------------
486ecce36beSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
487ecce36beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488ecce36beSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489ecce36beSmrg
490ecce36beSmrg
491ecce36beSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492ecce36beSmrg# ------------------------------
493ecce36beSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494ecce36beSmrg
495ecce36beSmrg
496ecce36beSmrg# _LT_CONFIG_COMMANDS
497ecce36beSmrg# -------------------
498ecce36beSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499ecce36beSmrg# variables for single and double quote escaping we saved from calls
500ecce36beSmrg# to _LT_DECL, we can put quote escaped variables declarations
501ecce36beSmrg# into `config.status', and then the shell code to quote escape them in
502ecce36beSmrg# for loops in `config.status'.  Finally, any additional code accumulated
503ecce36beSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504ecce36beSmrgm4_defun([_LT_CONFIG_COMMANDS],
505ecce36beSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506ecce36beSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507ecce36beSmrg	dnl instead of duplicating it all over again into config.status,
508ecce36beSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
509ecce36beSmrg	dnl needs to know what name is stored there:
510ecce36beSmrg        [AC_CONFIG_COMMANDS([libtool],
511ecce36beSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512ecce36beSmrg    dnl If the libtool generation code is destined for config.status,
513ecce36beSmrg    dnl expand the accumulated commands and init code now:
514ecce36beSmrg    [AC_CONFIG_COMMANDS([libtool],
515ecce36beSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516ecce36beSmrg])#_LT_CONFIG_COMMANDS
517ecce36beSmrg
518ecce36beSmrg
519ecce36beSmrg# Initialize.
520ecce36beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521ecce36beSmrg[
522ecce36beSmrg
523ecce36beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524ecce36beSmrg# if CDPATH is set.
525ecce36beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526ecce36beSmrg
527ecce36beSmrgsed_quote_subst='$sed_quote_subst'
528ecce36beSmrgdouble_quote_subst='$double_quote_subst'
529ecce36beSmrgdelay_variable_subst='$delay_variable_subst'
530ecce36beSmrg_LT_CONFIG_STATUS_DECLARATIONS
531ecce36beSmrgLTCC='$LTCC'
532ecce36beSmrgLTCFLAGS='$LTCFLAGS'
533ecce36beSmrgcompiler='$compiler_DEFAULT'
534ecce36beSmrg
535ecce36beSmrg# Quote evaled strings.
536ecce36beSmrgfor var in lt_decl_all_varnames([[ \
537ecce36beSmrg]], lt_decl_quote_varnames); do
538ecce36beSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539ecce36beSmrg    *[[\\\\\\\`\\"\\\$]]*)
540ecce36beSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541ecce36beSmrg      ;;
542ecce36beSmrg    *)
543ecce36beSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544ecce36beSmrg      ;;
545ecce36beSmrg    esac
546ecce36beSmrgdone
547ecce36beSmrg
548ecce36beSmrg# Double-quote double-evaled strings.
549ecce36beSmrgfor var in lt_decl_all_varnames([[ \
550ecce36beSmrg]], lt_decl_dquote_varnames); do
551ecce36beSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552ecce36beSmrg    *[[\\\\\\\`\\"\\\$]]*)
553ecce36beSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554ecce36beSmrg      ;;
555ecce36beSmrg    *)
556ecce36beSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557ecce36beSmrg      ;;
558ecce36beSmrg    esac
559ecce36beSmrgdone
560ecce36beSmrg
561ecce36beSmrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562ecce36beSmrgcase \$lt_ECHO in
563ecce36beSmrg*'\\\[$]0 --fallback-echo"')dnl "
564ecce36beSmrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565ecce36beSmrg  ;;
566ecce36beSmrgesac
567ecce36beSmrg
568ecce36beSmrg_LT_OUTPUT_LIBTOOL_INIT
569ecce36beSmrg])
570ecce36beSmrg
571ecce36beSmrg
572ecce36beSmrg# LT_OUTPUT
573ecce36beSmrg# ---------
574ecce36beSmrg# This macro allows early generation of the libtool script (before
575ecce36beSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
576ecce36beSmrg# tests.
577ecce36beSmrgAC_DEFUN([LT_OUTPUT],
578ecce36beSmrg[: ${CONFIG_LT=./config.lt}
579ecce36beSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580ecce36beSmrgcat >"$CONFIG_LT" <<_LTEOF
581ecce36beSmrg#! $SHELL
582ecce36beSmrg# Generated by $as_me.
583ecce36beSmrg# Run this file to recreate a libtool stub with the current configuration.
584ecce36beSmrg
585ecce36beSmrglt_cl_silent=false
586ecce36beSmrgSHELL=\${CONFIG_SHELL-$SHELL}
587ecce36beSmrg_LTEOF
588ecce36beSmrg
589ecce36beSmrgcat >>"$CONFIG_LT" <<\_LTEOF
590ecce36beSmrgAS_SHELL_SANITIZE
591ecce36beSmrg_AS_PREPARE
592ecce36beSmrg
593ecce36beSmrgexec AS_MESSAGE_FD>&1
594ecce36beSmrgexec AS_MESSAGE_LOG_FD>>config.log
595ecce36beSmrg{
596ecce36beSmrg  echo
597ecce36beSmrg  AS_BOX([Running $as_me.])
598ecce36beSmrg} >&AS_MESSAGE_LOG_FD
599ecce36beSmrg
600ecce36beSmrglt_cl_help="\
601ecce36beSmrg\`$as_me' creates a local libtool stub from the current configuration,
602ecce36beSmrgfor use in further configure time tests before the real libtool is
603ecce36beSmrggenerated.
604ecce36beSmrg
605ecce36beSmrgUsage: $[0] [[OPTIONS]]
606ecce36beSmrg
607ecce36beSmrg  -h, --help      print this help, then exit
608ecce36beSmrg  -V, --version   print version number, then exit
609ecce36beSmrg  -q, --quiet     do not print progress messages
610ecce36beSmrg  -d, --debug     don't remove temporary files
611ecce36beSmrg
612ecce36beSmrgReport bugs to <bug-libtool@gnu.org>."
613ecce36beSmrg
614ecce36beSmrglt_cl_version="\
615ecce36beSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616ecce36beSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617ecce36beSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618ecce36beSmrg
619ecce36beSmrgCopyright (C) 2008 Free Software Foundation, Inc.
620ecce36beSmrgThis config.lt script is free software; the Free Software Foundation
621ecce36beSmrggives unlimited permision to copy, distribute and modify it."
622ecce36beSmrg
623ecce36beSmrgwhile test $[#] != 0
624ecce36beSmrgdo
625ecce36beSmrg  case $[1] in
626ecce36beSmrg    --version | --v* | -V )
627ecce36beSmrg      echo "$lt_cl_version"; exit 0 ;;
628ecce36beSmrg    --help | --h* | -h )
629ecce36beSmrg      echo "$lt_cl_help"; exit 0 ;;
630ecce36beSmrg    --debug | --d* | -d )
631ecce36beSmrg      debug=: ;;
632ecce36beSmrg    --quiet | --q* | --silent | --s* | -q )
633ecce36beSmrg      lt_cl_silent=: ;;
634ecce36beSmrg
635ecce36beSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636ecce36beSmrgTry \`$[0] --help' for more information.]) ;;
637ecce36beSmrg
638ecce36beSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639ecce36beSmrgTry \`$[0] --help' for more information.]) ;;
640ecce36beSmrg  esac
641ecce36beSmrg  shift
642ecce36beSmrgdone
643ecce36beSmrg
644ecce36beSmrgif $lt_cl_silent; then
645ecce36beSmrg  exec AS_MESSAGE_FD>/dev/null
646ecce36beSmrgfi
647ecce36beSmrg_LTEOF
648ecce36beSmrg
649ecce36beSmrgcat >>"$CONFIG_LT" <<_LTEOF
650ecce36beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651ecce36beSmrg_LTEOF
652ecce36beSmrg
653ecce36beSmrgcat >>"$CONFIG_LT" <<\_LTEOF
654ecce36beSmrgAC_MSG_NOTICE([creating $ofile])
655ecce36beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
656ecce36beSmrgAS_EXIT(0)
657ecce36beSmrg_LTEOF
658ecce36beSmrgchmod +x "$CONFIG_LT"
659ecce36beSmrg
660ecce36beSmrg# configure is writing to config.log, but config.lt does its own redirection,
661ecce36beSmrg# appending to config.log, which fails on DOS, as config.log is still kept
662ecce36beSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663ecce36beSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664ecce36beSmrgif test "$no_create" != yes; then
665ecce36beSmrg  lt_cl_success=:
666ecce36beSmrg  test "$silent" = yes &&
667ecce36beSmrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668ecce36beSmrg  exec AS_MESSAGE_LOG_FD>/dev/null
669ecce36beSmrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670ecce36beSmrg  exec AS_MESSAGE_LOG_FD>>config.log
671ecce36beSmrg  $lt_cl_success || AS_EXIT(1)
672ecce36beSmrgfi
673ecce36beSmrg])# LT_OUTPUT
674ecce36beSmrg
675ecce36beSmrg
676ecce36beSmrg# _LT_CONFIG(TAG)
677ecce36beSmrg# ---------------
678ecce36beSmrg# If TAG is the built-in tag, create an initial libtool script with a
679ecce36beSmrg# default configuration from the untagged config vars.  Otherwise add code
680ecce36beSmrg# to config.status for appending the configuration named by TAG from the
681ecce36beSmrg# matching tagged config vars.
682ecce36beSmrgm4_defun([_LT_CONFIG],
683ecce36beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684ecce36beSmrg_LT_CONFIG_SAVE_COMMANDS([
685ecce36beSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686ecce36beSmrg  m4_if(_LT_TAG, [C], [
687ecce36beSmrg    # See if we are running on zsh, and set the options which allow our
688ecce36beSmrg    # commands through without removal of \ escapes.
689ecce36beSmrg    if test -n "${ZSH_VERSION+set}" ; then
690ecce36beSmrg      setopt NO_GLOB_SUBST
691ecce36beSmrg    fi
692ecce36beSmrg
693ecce36beSmrg    cfgfile="${ofile}T"
694ecce36beSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695ecce36beSmrg    $RM "$cfgfile"
696ecce36beSmrg
697ecce36beSmrg    cat <<_LT_EOF >> "$cfgfile"
698ecce36beSmrg#! $SHELL
699ecce36beSmrg
700ecce36beSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701ecce36beSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702ecce36beSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703ecce36beSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704ecce36beSmrg#
705ecce36beSmrg_LT_COPYING
706ecce36beSmrg_LT_LIBTOOL_TAGS
707ecce36beSmrg
708ecce36beSmrg# ### BEGIN LIBTOOL CONFIG
709ecce36beSmrg_LT_LIBTOOL_CONFIG_VARS
710ecce36beSmrg_LT_LIBTOOL_TAG_VARS
711ecce36beSmrg# ### END LIBTOOL CONFIG
712ecce36beSmrg
713ecce36beSmrg_LT_EOF
714ecce36beSmrg
715ecce36beSmrg  case $host_os in
716ecce36beSmrg  aix3*)
717ecce36beSmrg    cat <<\_LT_EOF >> "$cfgfile"
718ecce36beSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
719ecce36beSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720ecce36beSmrg# vanish in a puff of smoke.
721ecce36beSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
722ecce36beSmrg  COLLECT_NAMES=
723ecce36beSmrg  export COLLECT_NAMES
724ecce36beSmrgfi
725ecce36beSmrg_LT_EOF
726ecce36beSmrg    ;;
727ecce36beSmrg  esac
728ecce36beSmrg
729ecce36beSmrg  _LT_PROG_LTMAIN
730ecce36beSmrg
731ecce36beSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
732ecce36beSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733ecce36beSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734ecce36beSmrg  # is reportedly fixed, but why not run on old versions too?
735ecce36beSmrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736ecce36beSmrg    || (rm -f "$cfgfile"; exit 1)
737ecce36beSmrg
738ecce36beSmrg  _LT_PROG_XSI_SHELLFNS
739ecce36beSmrg
740ecce36beSmrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741ecce36beSmrg    || (rm -f "$cfgfile"; exit 1)
742ecce36beSmrg
743ecce36beSmrg  mv -f "$cfgfile" "$ofile" ||
744ecce36beSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745ecce36beSmrg  chmod +x "$ofile"
746ecce36beSmrg],
747ecce36beSmrg[cat <<_LT_EOF >> "$ofile"
748ecce36beSmrg
749ecce36beSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750ecce36beSmrgdnl in a comment (ie after a #).
751ecce36beSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752ecce36beSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753ecce36beSmrg# ### END LIBTOOL TAG CONFIG: $1
754ecce36beSmrg_LT_EOF
755ecce36beSmrg])dnl /m4_if
756ecce36beSmrg],
757ecce36beSmrg[m4_if([$1], [], [
758ecce36beSmrg    PACKAGE='$PACKAGE'
759ecce36beSmrg    VERSION='$VERSION'
760ecce36beSmrg    TIMESTAMP='$TIMESTAMP'
761ecce36beSmrg    RM='$RM'
762ecce36beSmrg    ofile='$ofile'], [])
763ecce36beSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764ecce36beSmrg])# _LT_CONFIG
765ecce36beSmrg
766ecce36beSmrg
767ecce36beSmrg# LT_SUPPORTED_TAG(TAG)
768ecce36beSmrg# ---------------------
769ecce36beSmrg# Trace this macro to discover what tags are supported by the libtool
770ecce36beSmrg# --tag option, using:
771ecce36beSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772ecce36beSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773ecce36beSmrg
774ecce36beSmrg
775ecce36beSmrg# C support is built-in for now
776ecce36beSmrgm4_define([_LT_LANG_C_enabled], [])
777ecce36beSmrgm4_define([_LT_TAGS], [])
778ecce36beSmrg
779ecce36beSmrg
780ecce36beSmrg# LT_LANG(LANG)
781ecce36beSmrg# -------------
782ecce36beSmrg# Enable libtool support for the given language if not already enabled.
783ecce36beSmrgAC_DEFUN([LT_LANG],
784ecce36beSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785ecce36beSmrgm4_case([$1],
786ecce36beSmrg  [C],			[_LT_LANG(C)],
787ecce36beSmrg  [C++],		[_LT_LANG(CXX)],
788ecce36beSmrg  [Java],		[_LT_LANG(GCJ)],
789ecce36beSmrg  [Fortran 77],		[_LT_LANG(F77)],
790ecce36beSmrg  [Fortran],		[_LT_LANG(FC)],
791ecce36beSmrg  [Windows Resource],	[_LT_LANG(RC)],
792ecce36beSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793ecce36beSmrg    [_LT_LANG($1)],
794ecce36beSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795ecce36beSmrg])# LT_LANG
796ecce36beSmrg
797ecce36beSmrg
798ecce36beSmrg# _LT_LANG(LANGNAME)
799ecce36beSmrg# ------------------
800ecce36beSmrgm4_defun([_LT_LANG],
801ecce36beSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802ecce36beSmrg  [LT_SUPPORTED_TAG([$1])dnl
803ecce36beSmrg  m4_append([_LT_TAGS], [$1 ])dnl
804ecce36beSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805ecce36beSmrg  _LT_LANG_$1_CONFIG($1)])dnl
806ecce36beSmrg])# _LT_LANG
807ecce36beSmrg
808ecce36beSmrg
809ecce36beSmrg# _LT_LANG_DEFAULT_CONFIG
810ecce36beSmrg# -----------------------
811ecce36beSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812ecce36beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813ecce36beSmrg  [LT_LANG(CXX)],
814ecce36beSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815ecce36beSmrg
816ecce36beSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817ecce36beSmrg  [LT_LANG(F77)],
818ecce36beSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819ecce36beSmrg
820ecce36beSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821ecce36beSmrg  [LT_LANG(FC)],
822ecce36beSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823ecce36beSmrg
824ecce36beSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825ecce36beSmrgdnl pulling things in needlessly.
826ecce36beSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827ecce36beSmrg  [LT_LANG(GCJ)],
828ecce36beSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829ecce36beSmrg    [LT_LANG(GCJ)],
830ecce36beSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831ecce36beSmrg      [LT_LANG(GCJ)],
832ecce36beSmrg      [m4_ifdef([AC_PROG_GCJ],
833ecce36beSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834ecce36beSmrg       m4_ifdef([A][M_PROG_GCJ],
835ecce36beSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836ecce36beSmrg       m4_ifdef([LT_PROG_GCJ],
837ecce36beSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838ecce36beSmrg
839ecce36beSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840ecce36beSmrg  [LT_LANG(RC)],
841ecce36beSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842ecce36beSmrg])# _LT_LANG_DEFAULT_CONFIG
843ecce36beSmrg
844ecce36beSmrg# Obsolete macros:
845ecce36beSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846ecce36beSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847ecce36beSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848ecce36beSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
850ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854ecce36beSmrg
855ecce36beSmrg
856ecce36beSmrg# _LT_TAG_COMPILER
857ecce36beSmrg# ----------------
858ecce36beSmrgm4_defun([_LT_TAG_COMPILER],
859ecce36beSmrg[AC_REQUIRE([AC_PROG_CC])dnl
860ecce36beSmrg
861ecce36beSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862ecce36beSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863ecce36beSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864ecce36beSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865ecce36beSmrg
866ecce36beSmrg# If no C compiler was specified, use CC.
867ecce36beSmrgLTCC=${LTCC-"$CC"}
868ecce36beSmrg
869ecce36beSmrg# If no C compiler flags were specified, use CFLAGS.
870ecce36beSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871ecce36beSmrg
872ecce36beSmrg# Allow CC to be a program name with arguments.
873ecce36beSmrgcompiler=$CC
874ecce36beSmrg])# _LT_TAG_COMPILER
875ecce36beSmrg
876ecce36beSmrg
877ecce36beSmrg# _LT_COMPILER_BOILERPLATE
878ecce36beSmrg# ------------------------
879ecce36beSmrg# Check for compiler boilerplate output or warnings with
880ecce36beSmrg# the simple compiler test code.
881ecce36beSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
882ecce36beSmrg[m4_require([_LT_DECL_SED])dnl
883ecce36beSmrgac_outfile=conftest.$ac_objext
884ecce36beSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
885ecce36beSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886ecce36beSmrg_lt_compiler_boilerplate=`cat conftest.err`
887ecce36beSmrg$RM conftest*
888ecce36beSmrg])# _LT_COMPILER_BOILERPLATE
889ecce36beSmrg
890ecce36beSmrg
891ecce36beSmrg# _LT_LINKER_BOILERPLATE
892ecce36beSmrg# ----------------------
893ecce36beSmrg# Check for linker boilerplate output or warnings with
894ecce36beSmrg# the simple link test code.
895ecce36beSmrgm4_defun([_LT_LINKER_BOILERPLATE],
896ecce36beSmrg[m4_require([_LT_DECL_SED])dnl
897ecce36beSmrgac_outfile=conftest.$ac_objext
898ecce36beSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
899ecce36beSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900ecce36beSmrg_lt_linker_boilerplate=`cat conftest.err`
901ecce36beSmrg$RM -r conftest*
902ecce36beSmrg])# _LT_LINKER_BOILERPLATE
903ecce36beSmrg
904ecce36beSmrg# _LT_REQUIRED_DARWIN_CHECKS
905ecce36beSmrg# -------------------------
906ecce36beSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907ecce36beSmrg  case $host_os in
908ecce36beSmrg    rhapsody* | darwin*)
909ecce36beSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910ecce36beSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911ecce36beSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912ecce36beSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913ecce36beSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914ecce36beSmrg    _LT_DECL([], [DSYMUTIL], [1],
915ecce36beSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916ecce36beSmrg    _LT_DECL([], [NMEDIT], [1],
917ecce36beSmrg      [Tool to change global to local symbols on Mac OS X])
918ecce36beSmrg    _LT_DECL([], [LIPO], [1],
919ecce36beSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
920ecce36beSmrg    _LT_DECL([], [OTOOL], [1],
921ecce36beSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922ecce36beSmrg    _LT_DECL([], [OTOOL64], [1],
923ecce36beSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924ecce36beSmrg
925ecce36beSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926ecce36beSmrg      [lt_cv_apple_cc_single_mod=no
927ecce36beSmrg      if test -z "${LT_MULTI_MODULE}"; then
928ecce36beSmrg	# By default we will add the -single_module flag. You can override
929ecce36beSmrg	# by either setting the environment variable LT_MULTI_MODULE
930ecce36beSmrg	# non-empty at configure time, or by adding -multi_module to the
931ecce36beSmrg	# link flags.
932ecce36beSmrg	rm -rf libconftest.dylib*
933ecce36beSmrg	echo "int foo(void){return 1;}" > conftest.c
934ecce36beSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935ecce36beSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936ecce36beSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937ecce36beSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938ecce36beSmrg        _lt_result=$?
939ecce36beSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940ecce36beSmrg	  lt_cv_apple_cc_single_mod=yes
941ecce36beSmrg	else
942ecce36beSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943ecce36beSmrg	fi
944ecce36beSmrg	rm -rf libconftest.dylib*
945ecce36beSmrg	rm -f conftest.*
946ecce36beSmrg      fi])
947ecce36beSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948ecce36beSmrg      [lt_cv_ld_exported_symbols_list],
949ecce36beSmrg      [lt_cv_ld_exported_symbols_list=no
950ecce36beSmrg      save_LDFLAGS=$LDFLAGS
951ecce36beSmrg      echo "_main" > conftest.sym
952ecce36beSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953ecce36beSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954ecce36beSmrg	[lt_cv_ld_exported_symbols_list=yes],
955ecce36beSmrg	[lt_cv_ld_exported_symbols_list=no])
956ecce36beSmrg	LDFLAGS="$save_LDFLAGS"
957ecce36beSmrg    ])
958ecce36beSmrg    case $host_os in
959ecce36beSmrg    rhapsody* | darwin1.[[012]])
960ecce36beSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961ecce36beSmrg    darwin1.*)
962ecce36beSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963ecce36beSmrg    darwin*) # darwin 5.x on
964ecce36beSmrg      # if running on 10.5 or later, the deployment target defaults
965ecce36beSmrg      # to the OS version, if on x86, and 10.4, the deployment
966ecce36beSmrg      # target defaults to 10.4. Don't you love it?
967ecce36beSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968ecce36beSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969ecce36beSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970ecce36beSmrg	10.[[012]]*)
971ecce36beSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972ecce36beSmrg	10.*)
973ecce36beSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974ecce36beSmrg      esac
975ecce36beSmrg    ;;
976ecce36beSmrg  esac
977ecce36beSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978ecce36beSmrg      _lt_dar_single_mod='$single_module'
979ecce36beSmrg    fi
980ecce36beSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981ecce36beSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982ecce36beSmrg    else
983ecce36beSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984ecce36beSmrg    fi
985ecce36beSmrg    if test "$DSYMUTIL" != ":"; then
986ecce36beSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987ecce36beSmrg    else
988ecce36beSmrg      _lt_dsymutil=
989ecce36beSmrg    fi
990ecce36beSmrg    ;;
991ecce36beSmrg  esac
992ecce36beSmrg])
993ecce36beSmrg
994ecce36beSmrg
995ecce36beSmrg# _LT_DARWIN_LINKER_FEATURES
996ecce36beSmrg# --------------------------
997ecce36beSmrg# Checks for linker and compiler features on darwin
998ecce36beSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999ecce36beSmrg[
1000ecce36beSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001ecce36beSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002ecce36beSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003ecce36beSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004ecce36beSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005ecce36beSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006ecce36beSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007ecce36beSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008ecce36beSmrg  case $cc_basename in
1009ecce36beSmrg     ifort*) _lt_dar_can_shared=yes ;;
1010ecce36beSmrg     *) _lt_dar_can_shared=$GCC ;;
1011ecce36beSmrg  esac
1012ecce36beSmrg  if test "$_lt_dar_can_shared" = "yes"; then
1013ecce36beSmrg    output_verbose_link_cmd=echo
1014ecce36beSmrg    _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}"
1015ecce36beSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016ecce36beSmrg    _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}"
1017ecce36beSmrg    _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}"
1018ecce36beSmrg    m4_if([$1], [CXX],
1019ecce36beSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020ecce36beSmrg      _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}"
1021ecce36beSmrg      _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}"
1022ecce36beSmrg    fi
1023ecce36beSmrg],[])
1024ecce36beSmrg  else
1025ecce36beSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026ecce36beSmrg  fi
1027ecce36beSmrg])
1028ecce36beSmrg
1029ecce36beSmrg# _LT_SYS_MODULE_PATH_AIX
1030ecce36beSmrg# -----------------------
1031ecce36beSmrg# Links a minimal program and checks the executable
1032ecce36beSmrg# for the system default hardcoded library path. In most cases,
1033ecce36beSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1034ecce36beSmrg# the location of the communication and MPI libs are included too.
1035ecce36beSmrg# If we don't find anything, use the default library path according
1036ecce36beSmrg# to the aix ld manual.
1037ecce36beSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038ecce36beSmrg[m4_require([_LT_DECL_SED])dnl
1039ecce36beSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040ecce36beSmrglt_aix_libpath_sed='
1041ecce36beSmrg    /Import File Strings/,/^$/ {
1042ecce36beSmrg	/^0/ {
1043ecce36beSmrg	    s/^0  *\(.*\)$/\1/
1044ecce36beSmrg	    p
1045ecce36beSmrg	}
1046ecce36beSmrg    }'
1047ecce36beSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048ecce36beSmrg# Check for a 64-bit object if we didn't find anything.
1049ecce36beSmrgif test -z "$aix_libpath"; then
1050ecce36beSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051ecce36beSmrgfi],[])
1052ecce36beSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053ecce36beSmrg])# _LT_SYS_MODULE_PATH_AIX
1054ecce36beSmrg
1055ecce36beSmrg
1056ecce36beSmrg# _LT_SHELL_INIT(ARG)
1057ecce36beSmrg# -------------------
1058ecce36beSmrgm4_define([_LT_SHELL_INIT],
1059ecce36beSmrg[ifdef([AC_DIVERSION_NOTICE],
1060ecce36beSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061ecce36beSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1062ecce36beSmrg$1
1063ecce36beSmrgAC_DIVERT_POP
1064ecce36beSmrg])# _LT_SHELL_INIT
1065ecce36beSmrg
1066ecce36beSmrg
1067ecce36beSmrg# _LT_PROG_ECHO_BACKSLASH
1068ecce36beSmrg# -----------------------
1069ecce36beSmrg# Add some code to the start of the generated configure script which
1070ecce36beSmrg# will find an echo command which doesn't interpret backslashes.
1071ecce36beSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072ecce36beSmrg[_LT_SHELL_INIT([
1073ecce36beSmrg# Check that we are running under the correct shell.
1074ecce36beSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1075ecce36beSmrg
1076ecce36beSmrgcase X$lt_ECHO in
1077ecce36beSmrgX*--fallback-echo)
1078ecce36beSmrg  # Remove one level of quotation (which was required for Make).
1079ecce36beSmrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080ecce36beSmrg  ;;
1081ecce36beSmrgesac
1082ecce36beSmrg
1083ecce36beSmrgECHO=${lt_ECHO-echo}
1084ecce36beSmrgif test "X[$]1" = X--no-reexec; then
1085ecce36beSmrg  # Discard the --no-reexec flag, and continue.
1086ecce36beSmrg  shift
1087ecce36beSmrgelif test "X[$]1" = X--fallback-echo; then
1088ecce36beSmrg  # Avoid inline document here, it may be left over
1089ecce36beSmrg  :
1090ecce36beSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091ecce36beSmrg  # Yippee, $ECHO works!
1092ecce36beSmrg  :
1093ecce36beSmrgelse
1094ecce36beSmrg  # Restart under the correct shell.
1095ecce36beSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096ecce36beSmrgfi
1097ecce36beSmrg
1098ecce36beSmrgif test "X[$]1" = X--fallback-echo; then
1099ecce36beSmrg  # used as fallback echo
1100ecce36beSmrg  shift
1101ecce36beSmrg  cat <<_LT_EOF
1102ecce36beSmrg[$]*
1103ecce36beSmrg_LT_EOF
1104ecce36beSmrg  exit 0
1105ecce36beSmrgfi
1106ecce36beSmrg
1107ecce36beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1108ecce36beSmrg# if CDPATH is set.
1109ecce36beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110ecce36beSmrg
1111ecce36beSmrgif test -z "$lt_ECHO"; then
1112ecce36beSmrg  if test "X${echo_test_string+set}" != Xset; then
1113ecce36beSmrg    # find a string as large as possible, as long as the shell can cope with it
1114ecce36beSmrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115ecce36beSmrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116ecce36beSmrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117ecce36beSmrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118ecce36beSmrg      then
1119ecce36beSmrg        break
1120ecce36beSmrg      fi
1121ecce36beSmrg    done
1122ecce36beSmrg  fi
1123ecce36beSmrg
1124ecce36beSmrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125ecce36beSmrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126ecce36beSmrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127ecce36beSmrg    :
1128ecce36beSmrg  else
1129ecce36beSmrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130ecce36beSmrg    # backslashes.  This makes it impossible to quote backslashes using
1131ecce36beSmrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132ecce36beSmrg    #
1133ecce36beSmrg    # So, first we look for a working echo in the user's PATH.
1134ecce36beSmrg
1135ecce36beSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136ecce36beSmrg    for dir in $PATH /usr/ucb; do
1137ecce36beSmrg      IFS="$lt_save_ifs"
1138ecce36beSmrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139ecce36beSmrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140ecce36beSmrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141ecce36beSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142ecce36beSmrg        ECHO="$dir/echo"
1143ecce36beSmrg        break
1144ecce36beSmrg      fi
1145ecce36beSmrg    done
1146ecce36beSmrg    IFS="$lt_save_ifs"
1147ecce36beSmrg
1148ecce36beSmrg    if test "X$ECHO" = Xecho; then
1149ecce36beSmrg      # We didn't find a better echo, so look for alternatives.
1150ecce36beSmrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151ecce36beSmrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152ecce36beSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153ecce36beSmrg        # This shell has a builtin print -r that does the trick.
1154ecce36beSmrg        ECHO='print -r'
1155ecce36beSmrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156ecce36beSmrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157ecce36beSmrg        # If we have ksh, try running configure again with it.
1158ecce36beSmrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159ecce36beSmrg        export ORIGINAL_CONFIG_SHELL
1160ecce36beSmrg        CONFIG_SHELL=/bin/ksh
1161ecce36beSmrg        export CONFIG_SHELL
1162ecce36beSmrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163ecce36beSmrg      else
1164ecce36beSmrg        # Try using printf.
1165ecce36beSmrg        ECHO='printf %s\n'
1166ecce36beSmrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167ecce36beSmrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168ecce36beSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169ecce36beSmrg	  # Cool, printf works
1170ecce36beSmrg	  :
1171ecce36beSmrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172ecce36beSmrg	     test "X$echo_testing_string" = 'X\t' &&
1173ecce36beSmrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174ecce36beSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175ecce36beSmrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176ecce36beSmrg	  export CONFIG_SHELL
1177ecce36beSmrg	  SHELL="$CONFIG_SHELL"
1178ecce36beSmrg	  export SHELL
1179ecce36beSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180ecce36beSmrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181ecce36beSmrg	     test "X$echo_testing_string" = 'X\t' &&
1182ecce36beSmrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183ecce36beSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184ecce36beSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185ecce36beSmrg        else
1186ecce36beSmrg	  # maybe with a smaller string...
1187ecce36beSmrg	  prev=:
1188ecce36beSmrg
1189ecce36beSmrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190ecce36beSmrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191ecce36beSmrg	    then
1192ecce36beSmrg	      break
1193ecce36beSmrg	    fi
1194ecce36beSmrg	    prev="$cmd"
1195ecce36beSmrg	  done
1196ecce36beSmrg
1197ecce36beSmrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198ecce36beSmrg	    echo_test_string=`eval $prev`
1199ecce36beSmrg	    export echo_test_string
1200ecce36beSmrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201ecce36beSmrg	  else
1202ecce36beSmrg	    # Oops.  We lost completely, so just stick with echo.
1203ecce36beSmrg	    ECHO=echo
1204ecce36beSmrg	  fi
1205ecce36beSmrg        fi
1206ecce36beSmrg      fi
1207ecce36beSmrg    fi
1208ecce36beSmrg  fi
1209ecce36beSmrgfi
1210ecce36beSmrg
1211ecce36beSmrg# Copy echo and quote the copy suitably for passing to libtool from
1212ecce36beSmrg# the Makefile, instead of quoting the original, which is used later.
1213ecce36beSmrglt_ECHO=$ECHO
1214ecce36beSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215ecce36beSmrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216ecce36beSmrgfi
1217ecce36beSmrg
1218ecce36beSmrgAC_SUBST(lt_ECHO)
1219ecce36beSmrg])
1220ecce36beSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221ecce36beSmrg_LT_DECL([], [ECHO], [1],
1222ecce36beSmrg    [An echo program that does not interpret backslashes])
1223ecce36beSmrg])# _LT_PROG_ECHO_BACKSLASH
1224ecce36beSmrg
1225ecce36beSmrg
1226ecce36beSmrg# _LT_ENABLE_LOCK
1227ecce36beSmrg# ---------------
1228ecce36beSmrgm4_defun([_LT_ENABLE_LOCK],
1229ecce36beSmrg[AC_ARG_ENABLE([libtool-lock],
1230ecce36beSmrg  [AS_HELP_STRING([--disable-libtool-lock],
1231ecce36beSmrg    [avoid locking (might break parallel builds)])])
1232ecce36beSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233ecce36beSmrg
1234ecce36beSmrg# Some flags need to be propagated to the compiler or linker for good
1235ecce36beSmrg# libtool support.
1236ecce36beSmrgcase $host in
1237ecce36beSmrgia64-*-hpux*)
1238ecce36beSmrg  # Find out which ABI we are using.
1239ecce36beSmrg  echo 'int i;' > conftest.$ac_ext
1240ecce36beSmrg  if AC_TRY_EVAL(ac_compile); then
1241ecce36beSmrg    case `/usr/bin/file conftest.$ac_objext` in
1242ecce36beSmrg      *ELF-32*)
1243ecce36beSmrg	HPUX_IA64_MODE="32"
1244ecce36beSmrg	;;
1245ecce36beSmrg      *ELF-64*)
1246ecce36beSmrg	HPUX_IA64_MODE="64"
1247ecce36beSmrg	;;
1248ecce36beSmrg    esac
1249ecce36beSmrg  fi
1250ecce36beSmrg  rm -rf conftest*
1251ecce36beSmrg  ;;
1252ecce36beSmrg*-*-irix6*)
1253ecce36beSmrg  # Find out which ABI we are using.
1254ecce36beSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255ecce36beSmrg  if AC_TRY_EVAL(ac_compile); then
1256ecce36beSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257ecce36beSmrg      case `/usr/bin/file conftest.$ac_objext` in
1258ecce36beSmrg	*32-bit*)
1259ecce36beSmrg	  LD="${LD-ld} -melf32bsmip"
1260ecce36beSmrg	  ;;
1261ecce36beSmrg	*N32*)
1262ecce36beSmrg	  LD="${LD-ld} -melf32bmipn32"
1263ecce36beSmrg	  ;;
1264ecce36beSmrg	*64-bit*)
1265ecce36beSmrg	  LD="${LD-ld} -melf64bmip"
1266ecce36beSmrg	;;
1267ecce36beSmrg      esac
1268ecce36beSmrg    else
1269ecce36beSmrg      case `/usr/bin/file conftest.$ac_objext` in
1270ecce36beSmrg	*32-bit*)
1271ecce36beSmrg	  LD="${LD-ld} -32"
1272ecce36beSmrg	  ;;
1273ecce36beSmrg	*N32*)
1274ecce36beSmrg	  LD="${LD-ld} -n32"
1275ecce36beSmrg	  ;;
1276ecce36beSmrg	*64-bit*)
1277ecce36beSmrg	  LD="${LD-ld} -64"
1278ecce36beSmrg	  ;;
1279ecce36beSmrg      esac
1280ecce36beSmrg    fi
1281ecce36beSmrg  fi
1282ecce36beSmrg  rm -rf conftest*
1283ecce36beSmrg  ;;
1284ecce36beSmrg
1285ecce36beSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286ecce36beSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287ecce36beSmrg  # Find out which ABI we are using.
1288ecce36beSmrg  echo 'int i;' > conftest.$ac_ext
1289ecce36beSmrg  if AC_TRY_EVAL(ac_compile); then
1290ecce36beSmrg    case `/usr/bin/file conftest.o` in
1291ecce36beSmrg      *32-bit*)
1292ecce36beSmrg	case $host in
1293ecce36beSmrg	  x86_64-*kfreebsd*-gnu)
1294ecce36beSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295ecce36beSmrg	    ;;
1296ecce36beSmrg	  x86_64-*linux*)
1297ecce36beSmrg	    LD="${LD-ld} -m elf_i386"
1298ecce36beSmrg	    ;;
1299ecce36beSmrg	  ppc64-*linux*|powerpc64-*linux*)
1300ecce36beSmrg	    LD="${LD-ld} -m elf32ppclinux"
1301ecce36beSmrg	    ;;
1302ecce36beSmrg	  s390x-*linux*)
1303ecce36beSmrg	    LD="${LD-ld} -m elf_s390"
1304ecce36beSmrg	    ;;
1305ecce36beSmrg	  sparc64-*linux*)
1306ecce36beSmrg	    LD="${LD-ld} -m elf32_sparc"
1307ecce36beSmrg	    ;;
1308ecce36beSmrg	esac
1309ecce36beSmrg	;;
1310ecce36beSmrg      *64-bit*)
1311ecce36beSmrg	case $host in
1312ecce36beSmrg	  x86_64-*kfreebsd*-gnu)
1313ecce36beSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314ecce36beSmrg	    ;;
1315ecce36beSmrg	  x86_64-*linux*)
1316ecce36beSmrg	    LD="${LD-ld} -m elf_x86_64"
1317ecce36beSmrg	    ;;
1318ecce36beSmrg	  ppc*-*linux*|powerpc*-*linux*)
1319ecce36beSmrg	    LD="${LD-ld} -m elf64ppc"
1320ecce36beSmrg	    ;;
1321ecce36beSmrg	  s390*-*linux*|s390*-*tpf*)
1322ecce36beSmrg	    LD="${LD-ld} -m elf64_s390"
1323ecce36beSmrg	    ;;
1324ecce36beSmrg	  sparc*-*linux*)
1325ecce36beSmrg	    LD="${LD-ld} -m elf64_sparc"
1326ecce36beSmrg	    ;;
1327ecce36beSmrg	esac
1328ecce36beSmrg	;;
1329ecce36beSmrg    esac
1330ecce36beSmrg  fi
1331ecce36beSmrg  rm -rf conftest*
1332ecce36beSmrg  ;;
1333ecce36beSmrg
1334ecce36beSmrg*-*-sco3.2v5*)
1335ecce36beSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336ecce36beSmrg  SAVE_CFLAGS="$CFLAGS"
1337ecce36beSmrg  CFLAGS="$CFLAGS -belf"
1338ecce36beSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339ecce36beSmrg    [AC_LANG_PUSH(C)
1340ecce36beSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341ecce36beSmrg     AC_LANG_POP])
1342ecce36beSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343ecce36beSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344ecce36beSmrg    CFLAGS="$SAVE_CFLAGS"
1345ecce36beSmrg  fi
1346ecce36beSmrg  ;;
1347ecce36beSmrgsparc*-*solaris*)
1348ecce36beSmrg  # Find out which ABI we are using.
1349ecce36beSmrg  echo 'int i;' > conftest.$ac_ext
1350ecce36beSmrg  if AC_TRY_EVAL(ac_compile); then
1351ecce36beSmrg    case `/usr/bin/file conftest.o` in
1352ecce36beSmrg    *64-bit*)
1353ecce36beSmrg      case $lt_cv_prog_gnu_ld in
1354ecce36beSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355ecce36beSmrg      *)
1356ecce36beSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357ecce36beSmrg	  LD="${LD-ld} -64"
1358ecce36beSmrg	fi
1359ecce36beSmrg	;;
1360ecce36beSmrg      esac
1361ecce36beSmrg      ;;
1362ecce36beSmrg    esac
1363ecce36beSmrg  fi
1364ecce36beSmrg  rm -rf conftest*
1365ecce36beSmrg  ;;
1366ecce36beSmrgesac
1367ecce36beSmrg
1368ecce36beSmrgneed_locks="$enable_libtool_lock"
1369ecce36beSmrg])# _LT_ENABLE_LOCK
1370ecce36beSmrg
1371ecce36beSmrg
1372ecce36beSmrg# _LT_CMD_OLD_ARCHIVE
1373ecce36beSmrg# -------------------
1374ecce36beSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375ecce36beSmrg[AC_CHECK_TOOL(AR, ar, false)
1376ecce36beSmrgtest -z "$AR" && AR=ar
1377ecce36beSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378ecce36beSmrg_LT_DECL([], [AR], [1], [The archiver])
1379ecce36beSmrg_LT_DECL([], [AR_FLAGS], [1])
1380ecce36beSmrg
1381ecce36beSmrgAC_CHECK_TOOL(STRIP, strip, :)
1382ecce36beSmrgtest -z "$STRIP" && STRIP=:
1383ecce36beSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384ecce36beSmrg
1385ecce36beSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386ecce36beSmrgtest -z "$RANLIB" && RANLIB=:
1387ecce36beSmrg_LT_DECL([], [RANLIB], [1],
1388ecce36beSmrg    [Commands used to install an old-style archive])
1389ecce36beSmrg
1390ecce36beSmrg# Determine commands to create old-style static archives.
1391ecce36beSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392ecce36beSmrgold_postinstall_cmds='chmod 644 $oldlib'
1393ecce36beSmrgold_postuninstall_cmds=
1394ecce36beSmrg
1395ecce36beSmrgif test -n "$RANLIB"; then
1396ecce36beSmrg  case $host_os in
1397ecce36beSmrg  openbsd*)
1398ecce36beSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399ecce36beSmrg    ;;
1400ecce36beSmrg  *)
1401ecce36beSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402ecce36beSmrg    ;;
1403ecce36beSmrg  esac
1404ecce36beSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405ecce36beSmrgfi
1406ecce36beSmrg_LT_DECL([], [old_postinstall_cmds], [2])
1407ecce36beSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408ecce36beSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409ecce36beSmrg    [Commands used to build an old-style archive])
1410ecce36beSmrg])# _LT_CMD_OLD_ARCHIVE
1411ecce36beSmrg
1412ecce36beSmrg
1413ecce36beSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1414ecce36beSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1415ecce36beSmrg# ----------------------------------------------------------------
1416ecce36beSmrg# Check whether the given compiler option works
1417ecce36beSmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418ecce36beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419ecce36beSmrgm4_require([_LT_DECL_SED])dnl
1420ecce36beSmrgAC_CACHE_CHECK([$1], [$2],
1421ecce36beSmrg  [$2=no
1422ecce36beSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423ecce36beSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1424ecce36beSmrg   lt_compiler_flag="$3"
1425ecce36beSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1426ecce36beSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1427ecce36beSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1428ecce36beSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1429ecce36beSmrg   # The option is referenced via a variable to avoid confusing sed.
1430ecce36beSmrg   lt_compile=`echo "$ac_compile" | $SED \
1431ecce36beSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432ecce36beSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433ecce36beSmrg   -e 's:$: $lt_compiler_flag:'`
1434ecce36beSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435ecce36beSmrg   (eval "$lt_compile" 2>conftest.err)
1436ecce36beSmrg   ac_status=$?
1437ecce36beSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1438ecce36beSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439ecce36beSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1440ecce36beSmrg     # The compiler can only warn and ignore the option if not recognized
1441ecce36beSmrg     # So say no if there are warnings other than the usual output.
1442ecce36beSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1443ecce36beSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444ecce36beSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445ecce36beSmrg       $2=yes
1446ecce36beSmrg     fi
1447ecce36beSmrg   fi
1448ecce36beSmrg   $RM conftest*
1449ecce36beSmrg])
1450ecce36beSmrg
1451ecce36beSmrgif test x"[$]$2" = xyes; then
1452ecce36beSmrg    m4_if([$5], , :, [$5])
1453ecce36beSmrgelse
1454ecce36beSmrg    m4_if([$6], , :, [$6])
1455ecce36beSmrgfi
1456ecce36beSmrg])# _LT_COMPILER_OPTION
1457ecce36beSmrg
1458ecce36beSmrg# Old name:
1459ecce36beSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
1461ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1462ecce36beSmrg
1463ecce36beSmrg
1464ecce36beSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465ecce36beSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466ecce36beSmrg# ----------------------------------------------------
1467ecce36beSmrg# Check whether the given linker option works
1468ecce36beSmrgAC_DEFUN([_LT_LINKER_OPTION],
1469ecce36beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470ecce36beSmrgm4_require([_LT_DECL_SED])dnl
1471ecce36beSmrgAC_CACHE_CHECK([$1], [$2],
1472ecce36beSmrg  [$2=no
1473ecce36beSmrg   save_LDFLAGS="$LDFLAGS"
1474ecce36beSmrg   LDFLAGS="$LDFLAGS $3"
1475ecce36beSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1476ecce36beSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1477ecce36beSmrg     # The linker can only warn and ignore the option if not recognized
1478ecce36beSmrg     # So say no if there are warnings
1479ecce36beSmrg     if test -s conftest.err; then
1480ecce36beSmrg       # Append any errors to the config.log.
1481ecce36beSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482ecce36beSmrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1483ecce36beSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484ecce36beSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1485ecce36beSmrg         $2=yes
1486ecce36beSmrg       fi
1487ecce36beSmrg     else
1488ecce36beSmrg       $2=yes
1489ecce36beSmrg     fi
1490ecce36beSmrg   fi
1491ecce36beSmrg   $RM -r conftest*
1492ecce36beSmrg   LDFLAGS="$save_LDFLAGS"
1493ecce36beSmrg])
1494ecce36beSmrg
1495ecce36beSmrgif test x"[$]$2" = xyes; then
1496ecce36beSmrg    m4_if([$4], , :, [$4])
1497ecce36beSmrgelse
1498ecce36beSmrg    m4_if([$5], , :, [$5])
1499ecce36beSmrgfi
1500ecce36beSmrg])# _LT_LINKER_OPTION
1501ecce36beSmrg
1502ecce36beSmrg# Old name:
1503ecce36beSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
1505ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1506ecce36beSmrg
1507ecce36beSmrg
1508ecce36beSmrg# LT_CMD_MAX_LEN
1509ecce36beSmrg#---------------
1510ecce36beSmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511ecce36beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512ecce36beSmrg# find the maximum length of command line arguments
1513ecce36beSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1514ecce36beSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1515ecce36beSmrg  i=0
1516ecce36beSmrg  teststring="ABCD"
1517ecce36beSmrg
1518ecce36beSmrg  case $build_os in
1519ecce36beSmrg  msdosdjgpp*)
1520ecce36beSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1521ecce36beSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1522ecce36beSmrg    # during glob expansion).  Even if it were fixed, the result of this
1523ecce36beSmrg    # check would be larger than it should be.
1524ecce36beSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1525ecce36beSmrg    ;;
1526ecce36beSmrg
1527ecce36beSmrg  gnu*)
1528ecce36beSmrg    # Under GNU Hurd, this test is not required because there is
1529ecce36beSmrg    # no limit to the length of command line arguments.
1530ecce36beSmrg    # Libtool will interpret -1 as no limit whatsoever
1531ecce36beSmrg    lt_cv_sys_max_cmd_len=-1;
1532ecce36beSmrg    ;;
1533ecce36beSmrg
1534ecce36beSmrg  cygwin* | mingw* | cegcc*)
1535ecce36beSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1536ecce36beSmrg    # about 5 minutes as the teststring grows exponentially.
1537ecce36beSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1538ecce36beSmrg    # you end up with a "frozen" computer, even though with patience
1539ecce36beSmrg    # the test eventually succeeds (with a max line length of 256k).
1540ecce36beSmrg    # Instead, let's just punt: use the minimum linelength reported by
1541ecce36beSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1542ecce36beSmrg    lt_cv_sys_max_cmd_len=8192;
1543ecce36beSmrg    ;;
1544ecce36beSmrg
1545ecce36beSmrg  amigaos*)
1546ecce36beSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
1547ecce36beSmrg    # So we just punt and use a minimum line length of 8192.
1548ecce36beSmrg    lt_cv_sys_max_cmd_len=8192;
1549ecce36beSmrg    ;;
1550ecce36beSmrg
1551ecce36beSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1552ecce36beSmrg    # This has been around since 386BSD, at least.  Likely further.
1553ecce36beSmrg    if test -x /sbin/sysctl; then
1554ecce36beSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1555ecce36beSmrg    elif test -x /usr/sbin/sysctl; then
1556ecce36beSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1557ecce36beSmrg    else
1558ecce36beSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1559ecce36beSmrg    fi
1560ecce36beSmrg    # And add a safety zone
1561ecce36beSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1562ecce36beSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1563ecce36beSmrg    ;;
1564ecce36beSmrg
1565ecce36beSmrg  interix*)
1566ecce36beSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1567ecce36beSmrg    lt_cv_sys_max_cmd_len=196608
1568ecce36beSmrg    ;;
1569ecce36beSmrg
1570ecce36beSmrg  osf*)
1571ecce36beSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1572ecce36beSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1573ecce36beSmrg    # nice to cause kernel panics so lets avoid the loop below.
1574ecce36beSmrg    # First set a reasonable default.
1575ecce36beSmrg    lt_cv_sys_max_cmd_len=16384
1576ecce36beSmrg    #
1577ecce36beSmrg    if test -x /sbin/sysconfig; then
1578ecce36beSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1579ecce36beSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1580ecce36beSmrg      esac
1581ecce36beSmrg    fi
1582ecce36beSmrg    ;;
1583ecce36beSmrg  sco3.2v5*)
1584ecce36beSmrg    lt_cv_sys_max_cmd_len=102400
1585ecce36beSmrg    ;;
1586ecce36beSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
1587ecce36beSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1588ecce36beSmrg    if test -n "$kargmax"; then
1589ecce36beSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1590ecce36beSmrg    else
1591ecce36beSmrg      lt_cv_sys_max_cmd_len=32768
1592ecce36beSmrg    fi
1593ecce36beSmrg    ;;
1594ecce36beSmrg  *)
1595ecce36beSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596ecce36beSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597ecce36beSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598ecce36beSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599ecce36beSmrg    else
1600ecce36beSmrg      # Make teststring a little bigger before we do anything with it.
1601ecce36beSmrg      # a 1K string should be a reasonable start.
1602ecce36beSmrg      for i in 1 2 3 4 5 6 7 8 ; do
1603ecce36beSmrg        teststring=$teststring$teststring
1604ecce36beSmrg      done
1605ecce36beSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606ecce36beSmrg      # If test is not a shell built-in, we'll probably end up computing a
1607ecce36beSmrg      # maximum length that is only half of the actual maximum length, but
1608ecce36beSmrg      # we can't tell.
1609ecce36beSmrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610ecce36beSmrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611ecce36beSmrg	      test $i != 17 # 1/2 MB should be enough
1612ecce36beSmrg      do
1613ecce36beSmrg        i=`expr $i + 1`
1614ecce36beSmrg        teststring=$teststring$teststring
1615ecce36beSmrg      done
1616ecce36beSmrg      # Only check the string length outside the loop.
1617ecce36beSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618ecce36beSmrg      teststring=
1619ecce36beSmrg      # Add a significant safety factor because C++ compilers can tack on
1620ecce36beSmrg      # massive amounts of additional arguments before passing them to the
1621ecce36beSmrg      # linker.  It appears as though 1/2 is a usable value.
1622ecce36beSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623ecce36beSmrg    fi
1624ecce36beSmrg    ;;
1625ecce36beSmrg  esac
1626ecce36beSmrg])
1627ecce36beSmrgif test -n $lt_cv_sys_max_cmd_len ; then
1628ecce36beSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1629ecce36beSmrgelse
1630ecce36beSmrg  AC_MSG_RESULT(none)
1631ecce36beSmrgfi
1632ecce36beSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633ecce36beSmrg_LT_DECL([], [max_cmd_len], [0],
1634ecce36beSmrg    [What is the maximum length of a command?])
1635ecce36beSmrg])# LT_CMD_MAX_LEN
1636ecce36beSmrg
1637ecce36beSmrg# Old name:
1638ecce36beSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
1640ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1641ecce36beSmrg
1642ecce36beSmrg
1643ecce36beSmrg# _LT_HEADER_DLFCN
1644ecce36beSmrg# ----------------
1645ecce36beSmrgm4_defun([_LT_HEADER_DLFCN],
1646ecce36beSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647ecce36beSmrg])# _LT_HEADER_DLFCN
1648ecce36beSmrg
1649ecce36beSmrg
1650ecce36beSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651ecce36beSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652ecce36beSmrg# ----------------------------------------------------------------
1653ecce36beSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654ecce36beSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1655ecce36beSmrgif test "$cross_compiling" = yes; then :
1656ecce36beSmrg  [$4]
1657ecce36beSmrgelse
1658ecce36beSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659ecce36beSmrg  lt_status=$lt_dlunknown
1660ecce36beSmrg  cat > conftest.$ac_ext <<_LT_EOF
1661ecce36beSmrg[#line __oline__ "configure"
1662ecce36beSmrg#include "confdefs.h"
1663ecce36beSmrg
1664ecce36beSmrg#if HAVE_DLFCN_H
1665ecce36beSmrg#include <dlfcn.h>
1666ecce36beSmrg#endif
1667ecce36beSmrg
1668ecce36beSmrg#include <stdio.h>
1669ecce36beSmrg
1670ecce36beSmrg#ifdef RTLD_GLOBAL
1671ecce36beSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1672ecce36beSmrg#else
1673ecce36beSmrg#  ifdef DL_GLOBAL
1674ecce36beSmrg#    define LT_DLGLOBAL		DL_GLOBAL
1675ecce36beSmrg#  else
1676ecce36beSmrg#    define LT_DLGLOBAL		0
1677ecce36beSmrg#  endif
1678ecce36beSmrg#endif
1679ecce36beSmrg
1680ecce36beSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1681ecce36beSmrg   find out it does not work in some platform. */
1682ecce36beSmrg#ifndef LT_DLLAZY_OR_NOW
1683ecce36beSmrg#  ifdef RTLD_LAZY
1684ecce36beSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1685ecce36beSmrg#  else
1686ecce36beSmrg#    ifdef DL_LAZY
1687ecce36beSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1688ecce36beSmrg#    else
1689ecce36beSmrg#      ifdef RTLD_NOW
1690ecce36beSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1691ecce36beSmrg#      else
1692ecce36beSmrg#        ifdef DL_NOW
1693ecce36beSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1694ecce36beSmrg#        else
1695ecce36beSmrg#          define LT_DLLAZY_OR_NOW	0
1696ecce36beSmrg#        endif
1697ecce36beSmrg#      endif
1698ecce36beSmrg#    endif
1699ecce36beSmrg#  endif
1700ecce36beSmrg#endif
1701ecce36beSmrg
1702ecce36beSmrgvoid fnord() { int i=42;}
1703ecce36beSmrgint main ()
1704ecce36beSmrg{
1705ecce36beSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1706ecce36beSmrg  int status = $lt_dlunknown;
1707ecce36beSmrg
1708ecce36beSmrg  if (self)
1709ecce36beSmrg    {
1710ecce36beSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711ecce36beSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1712ecce36beSmrg      /* dlclose (self); */
1713ecce36beSmrg    }
1714ecce36beSmrg  else
1715ecce36beSmrg    puts (dlerror ());
1716ecce36beSmrg
1717ecce36beSmrg  return status;
1718ecce36beSmrg}]
1719ecce36beSmrg_LT_EOF
1720ecce36beSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1721ecce36beSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1722ecce36beSmrg    lt_status=$?
1723ecce36beSmrg    case x$lt_status in
1724ecce36beSmrg      x$lt_dlno_uscore) $1 ;;
1725ecce36beSmrg      x$lt_dlneed_uscore) $2 ;;
1726ecce36beSmrg      x$lt_dlunknown|x*) $3 ;;
1727ecce36beSmrg    esac
1728ecce36beSmrg  else :
1729ecce36beSmrg    # compilation failed
1730ecce36beSmrg    $3
1731ecce36beSmrg  fi
1732ecce36beSmrgfi
1733ecce36beSmrgrm -fr conftest*
1734ecce36beSmrg])# _LT_TRY_DLOPEN_SELF
1735ecce36beSmrg
1736ecce36beSmrg
1737ecce36beSmrg# LT_SYS_DLOPEN_SELF
1738ecce36beSmrg# ------------------
1739ecce36beSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740ecce36beSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1741ecce36beSmrgif test "x$enable_dlopen" != xyes; then
1742ecce36beSmrg  enable_dlopen=unknown
1743ecce36beSmrg  enable_dlopen_self=unknown
1744ecce36beSmrg  enable_dlopen_self_static=unknown
1745ecce36beSmrgelse
1746ecce36beSmrg  lt_cv_dlopen=no
1747ecce36beSmrg  lt_cv_dlopen_libs=
1748ecce36beSmrg
1749ecce36beSmrg  case $host_os in
1750ecce36beSmrg  beos*)
1751ecce36beSmrg    lt_cv_dlopen="load_add_on"
1752ecce36beSmrg    lt_cv_dlopen_libs=
1753ecce36beSmrg    lt_cv_dlopen_self=yes
1754ecce36beSmrg    ;;
1755ecce36beSmrg
1756ecce36beSmrg  mingw* | pw32* | cegcc*)
1757ecce36beSmrg    lt_cv_dlopen="LoadLibrary"
1758ecce36beSmrg    lt_cv_dlopen_libs=
1759ecce36beSmrg    ;;
1760ecce36beSmrg
1761ecce36beSmrg  cygwin*)
1762ecce36beSmrg    lt_cv_dlopen="dlopen"
1763ecce36beSmrg    lt_cv_dlopen_libs=
1764ecce36beSmrg    ;;
1765ecce36beSmrg
1766ecce36beSmrg  darwin*)
1767ecce36beSmrg  # if libdl is installed we need to link against it
1768ecce36beSmrg    AC_CHECK_LIB([dl], [dlopen],
1769ecce36beSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1770ecce36beSmrg    lt_cv_dlopen="dyld"
1771ecce36beSmrg    lt_cv_dlopen_libs=
1772ecce36beSmrg    lt_cv_dlopen_self=yes
1773ecce36beSmrg    ])
1774ecce36beSmrg    ;;
1775ecce36beSmrg
1776ecce36beSmrg  *)
1777ecce36beSmrg    AC_CHECK_FUNC([shl_load],
1778ecce36beSmrg	  [lt_cv_dlopen="shl_load"],
1779ecce36beSmrg      [AC_CHECK_LIB([dld], [shl_load],
1780ecce36beSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1781ecce36beSmrg	[AC_CHECK_FUNC([dlopen],
1782ecce36beSmrg	      [lt_cv_dlopen="dlopen"],
1783ecce36beSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1784ecce36beSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1785ecce36beSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1786ecce36beSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1787ecce36beSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1788ecce36beSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1789ecce36beSmrg	      ])
1790ecce36beSmrg	    ])
1791ecce36beSmrg	  ])
1792ecce36beSmrg	])
1793ecce36beSmrg      ])
1794ecce36beSmrg    ;;
1795ecce36beSmrg  esac
1796ecce36beSmrg
1797ecce36beSmrg  if test "x$lt_cv_dlopen" != xno; then
1798ecce36beSmrg    enable_dlopen=yes
1799ecce36beSmrg  else
1800ecce36beSmrg    enable_dlopen=no
1801ecce36beSmrg  fi
1802ecce36beSmrg
1803ecce36beSmrg  case $lt_cv_dlopen in
1804ecce36beSmrg  dlopen)
1805ecce36beSmrg    save_CPPFLAGS="$CPPFLAGS"
1806ecce36beSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1807ecce36beSmrg
1808ecce36beSmrg    save_LDFLAGS="$LDFLAGS"
1809ecce36beSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1810ecce36beSmrg
1811ecce36beSmrg    save_LIBS="$LIBS"
1812ecce36beSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1813ecce36beSmrg
1814ecce36beSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1815ecce36beSmrg	  lt_cv_dlopen_self, [dnl
1816ecce36beSmrg	  _LT_TRY_DLOPEN_SELF(
1817ecce36beSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1818ecce36beSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1819ecce36beSmrg    ])
1820ecce36beSmrg
1821ecce36beSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1822ecce36beSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1823ecce36beSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824ecce36beSmrg	  lt_cv_dlopen_self_static, [dnl
1825ecce36beSmrg	  _LT_TRY_DLOPEN_SELF(
1826ecce36beSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1827ecce36beSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1828ecce36beSmrg      ])
1829ecce36beSmrg    fi
1830ecce36beSmrg
1831ecce36beSmrg    CPPFLAGS="$save_CPPFLAGS"
1832ecce36beSmrg    LDFLAGS="$save_LDFLAGS"
1833ecce36beSmrg    LIBS="$save_LIBS"
1834ecce36beSmrg    ;;
1835ecce36beSmrg  esac
1836ecce36beSmrg
1837ecce36beSmrg  case $lt_cv_dlopen_self in
1838ecce36beSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1839ecce36beSmrg  *) enable_dlopen_self=unknown ;;
1840ecce36beSmrg  esac
1841ecce36beSmrg
1842ecce36beSmrg  case $lt_cv_dlopen_self_static in
1843ecce36beSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1844ecce36beSmrg  *) enable_dlopen_self_static=unknown ;;
1845ecce36beSmrg  esac
1846ecce36beSmrgfi
1847ecce36beSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848ecce36beSmrg	 [Whether dlopen is supported])
1849ecce36beSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850ecce36beSmrg	 [Whether dlopen of programs is supported])
1851ecce36beSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852ecce36beSmrg	 [Whether dlopen of statically linked programs is supported])
1853ecce36beSmrg])# LT_SYS_DLOPEN_SELF
1854ecce36beSmrg
1855ecce36beSmrg# Old name:
1856ecce36beSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
1858ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1859ecce36beSmrg
1860ecce36beSmrg
1861ecce36beSmrg# _LT_COMPILER_C_O([TAGNAME])
1862ecce36beSmrg# ---------------------------
1863ecce36beSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864ecce36beSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865ecce36beSmrgm4_defun([_LT_COMPILER_C_O],
1866ecce36beSmrg[m4_require([_LT_DECL_SED])dnl
1867ecce36beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868ecce36beSmrgm4_require([_LT_TAG_COMPILER])dnl
1869ecce36beSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870ecce36beSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871ecce36beSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872ecce36beSmrg   $RM -r conftest 2>/dev/null
1873ecce36beSmrg   mkdir conftest
1874ecce36beSmrg   cd conftest
1875ecce36beSmrg   mkdir out
1876ecce36beSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1877ecce36beSmrg
1878ecce36beSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1879ecce36beSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1880ecce36beSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1881ecce36beSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1882ecce36beSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1883ecce36beSmrg   lt_compile=`echo "$ac_compile" | $SED \
1884ecce36beSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885ecce36beSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886ecce36beSmrg   -e 's:$: $lt_compiler_flag:'`
1887ecce36beSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888ecce36beSmrg   (eval "$lt_compile" 2>out/conftest.err)
1889ecce36beSmrg   ac_status=$?
1890ecce36beSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891ecce36beSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892ecce36beSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893ecce36beSmrg   then
1894ecce36beSmrg     # The compiler can only warn and ignore the option if not recognized
1895ecce36beSmrg     # So say no if there are warnings
1896ecce36beSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1897ecce36beSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898ecce36beSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899ecce36beSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1900ecce36beSmrg     fi
1901ecce36beSmrg   fi
1902ecce36beSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903ecce36beSmrg   $RM conftest*
1904ecce36beSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1905ecce36beSmrg   # template instantiation
1906ecce36beSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907ecce36beSmrg   $RM out/* && rmdir out
1908ecce36beSmrg   cd ..
1909ecce36beSmrg   $RM -r conftest
1910ecce36beSmrg   $RM conftest*
1911ecce36beSmrg])
1912ecce36beSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913ecce36beSmrg	[Does compiler simultaneously support -c and -o options?])
1914ecce36beSmrg])# _LT_COMPILER_C_O
1915ecce36beSmrg
1916ecce36beSmrg
1917ecce36beSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918ecce36beSmrg# ----------------------------------
1919ecce36beSmrg# Check to see if we can do hard links to lock some files if needed
1920ecce36beSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921ecce36beSmrg[m4_require([_LT_ENABLE_LOCK])dnl
1922ecce36beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923ecce36beSmrg_LT_COMPILER_C_O([$1])
1924ecce36beSmrg
1925ecce36beSmrghard_links="nottested"
1926ecce36beSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1927ecce36beSmrg  # do not overwrite the value of need_locks provided by the user
1928ecce36beSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1929ecce36beSmrg  hard_links=yes
1930ecce36beSmrg  $RM conftest*
1931ecce36beSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1932ecce36beSmrg  touch conftest.a
1933ecce36beSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1934ecce36beSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935ecce36beSmrg  AC_MSG_RESULT([$hard_links])
1936ecce36beSmrg  if test "$hard_links" = no; then
1937ecce36beSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1938ecce36beSmrg    need_locks=warn
1939ecce36beSmrg  fi
1940ecce36beSmrgelse
1941ecce36beSmrg  need_locks=no
1942ecce36beSmrgfi
1943ecce36beSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944ecce36beSmrg])# _LT_COMPILER_FILE_LOCKS
1945ecce36beSmrg
1946ecce36beSmrg
1947ecce36beSmrg# _LT_CHECK_OBJDIR
1948ecce36beSmrg# ----------------
1949ecce36beSmrgm4_defun([_LT_CHECK_OBJDIR],
1950ecce36beSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1951ecce36beSmrg[rm -f .libs 2>/dev/null
1952ecce36beSmrgmkdir .libs 2>/dev/null
1953ecce36beSmrgif test -d .libs; then
1954ecce36beSmrg  lt_cv_objdir=.libs
1955ecce36beSmrgelse
1956ecce36beSmrg  # MS-DOS does not allow filenames that begin with a dot.
1957ecce36beSmrg  lt_cv_objdir=_libs
1958ecce36beSmrgfi
1959ecce36beSmrgrmdir .libs 2>/dev/null])
1960ecce36beSmrgobjdir=$lt_cv_objdir
1961ecce36beSmrg_LT_DECL([], [objdir], [0],
1962ecce36beSmrg         [The name of the directory that contains temporary libtool files])dnl
1963ecce36beSmrgm4_pattern_allow([LT_OBJDIR])dnl
1964ecce36beSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965ecce36beSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966ecce36beSmrg])# _LT_CHECK_OBJDIR
1967ecce36beSmrg
1968ecce36beSmrg
1969ecce36beSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970ecce36beSmrg# --------------------------------------
1971ecce36beSmrg# Check hardcoding attributes.
1972ecce36beSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1973ecce36beSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974ecce36beSmrg_LT_TAGVAR(hardcode_action, $1)=
1975ecce36beSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976ecce36beSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977ecce36beSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978ecce36beSmrg
1979ecce36beSmrg  # We can hardcode non-existent directories.
1980ecce36beSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1981ecce36beSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1982ecce36beSmrg     # have to relink, otherwise we might link with an installed library
1983ecce36beSmrg     # when we should be linking with a yet-to-be-installed one
1984ecce36beSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985ecce36beSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1986ecce36beSmrg    # Linking always hardcodes the temporary library directory.
1987ecce36beSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
1988ecce36beSmrg  else
1989ecce36beSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990ecce36beSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
1991ecce36beSmrg  fi
1992ecce36beSmrgelse
1993ecce36beSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1994ecce36beSmrg  # directories.
1995ecce36beSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
1996ecce36beSmrgfi
1997ecce36beSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1998ecce36beSmrg
1999ecce36beSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000ecce36beSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2001ecce36beSmrg  # Fast installation is not supported
2002ecce36beSmrg  enable_fast_install=no
2003ecce36beSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2004ecce36beSmrg     test "$enable_shared" = no; then
2005ecce36beSmrg  # Fast installation is not necessary
2006ecce36beSmrg  enable_fast_install=needless
2007ecce36beSmrgfi
2008ecce36beSmrg_LT_TAGDECL([], [hardcode_action], [0],
2009ecce36beSmrg    [How to hardcode a shared library path into an executable])
2010ecce36beSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2011ecce36beSmrg
2012ecce36beSmrg
2013ecce36beSmrg# _LT_CMD_STRIPLIB
2014ecce36beSmrg# ----------------
2015ecce36beSmrgm4_defun([_LT_CMD_STRIPLIB],
2016ecce36beSmrg[m4_require([_LT_DECL_EGREP])
2017ecce36beSmrgstriplib=
2018ecce36beSmrgold_striplib=
2019ecce36beSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020ecce36beSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2021ecce36beSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2022ecce36beSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2023ecce36beSmrg  AC_MSG_RESULT([yes])
2024ecce36beSmrgelse
2025ecce36beSmrg# FIXME - insert some real tests, host_os isn't really good enough
2026ecce36beSmrg  case $host_os in
2027ecce36beSmrg  darwin*)
2028ecce36beSmrg    if test -n "$STRIP" ; then
2029ecce36beSmrg      striplib="$STRIP -x"
2030ecce36beSmrg      old_striplib="$STRIP -S"
2031ecce36beSmrg      AC_MSG_RESULT([yes])
2032ecce36beSmrg    else
2033ecce36beSmrg      AC_MSG_RESULT([no])
2034ecce36beSmrg    fi
2035ecce36beSmrg    ;;
2036ecce36beSmrg  *)
2037ecce36beSmrg    AC_MSG_RESULT([no])
2038ecce36beSmrg    ;;
2039ecce36beSmrg  esac
2040ecce36beSmrgfi
2041ecce36beSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042ecce36beSmrg_LT_DECL([], [striplib], [1])
2043ecce36beSmrg])# _LT_CMD_STRIPLIB
2044ecce36beSmrg
2045ecce36beSmrg
2046ecce36beSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2047ecce36beSmrg# -----------------------------
2048ecce36beSmrg# PORTME Fill in your ld.so characteristics
2049ecce36beSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050ecce36beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051ecce36beSmrgm4_require([_LT_DECL_EGREP])dnl
2052ecce36beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053ecce36beSmrgm4_require([_LT_DECL_OBJDUMP])dnl
2054ecce36beSmrgm4_require([_LT_DECL_SED])dnl
2055ecce36beSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056ecce36beSmrgm4_if([$1],
2057ecce36beSmrg	[], [
2058ecce36beSmrgif test "$GCC" = yes; then
2059ecce36beSmrg  case $host_os in
2060ecce36beSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061ecce36beSmrg    *) lt_awk_arg="/^libraries:/" ;;
2062ecce36beSmrg  esac
2063ecce36beSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064ecce36beSmrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065ecce36beSmrg    # if the path contains ";" then we assume it to be the separator
2066ecce36beSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2067ecce36beSmrg    # assumed that no part of a normal pathname contains ";" but that should
2068ecce36beSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069ecce36beSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070ecce36beSmrg  else
2071ecce36beSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072ecce36beSmrg  fi
2073ecce36beSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2074ecce36beSmrg  # and add multilib dir if necessary.
2075ecce36beSmrg  lt_tmp_lt_search_path_spec=
2076ecce36beSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077ecce36beSmrg  for lt_sys_path in $lt_search_path_spec; do
2078ecce36beSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079ecce36beSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080ecce36beSmrg    else
2081ecce36beSmrg      test -d "$lt_sys_path" && \
2082ecce36beSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083ecce36beSmrg    fi
2084ecce36beSmrg  done
2085ecce36beSmrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086ecce36beSmrgBEGIN {RS=" "; FS="/|\n";} {
2087ecce36beSmrg  lt_foo="";
2088ecce36beSmrg  lt_count=0;
2089ecce36beSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090ecce36beSmrg    if ($lt_i != "" && $lt_i != ".") {
2091ecce36beSmrg      if ($lt_i == "..") {
2092ecce36beSmrg        lt_count++;
2093ecce36beSmrg      } else {
2094ecce36beSmrg        if (lt_count == 0) {
2095ecce36beSmrg          lt_foo="/" $lt_i lt_foo;
2096ecce36beSmrg        } else {
2097ecce36beSmrg          lt_count--;
2098ecce36beSmrg        }
2099ecce36beSmrg      }
2100ecce36beSmrg    }
2101ecce36beSmrg  }
2102ecce36beSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103ecce36beSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104ecce36beSmrg}'`
2105ecce36beSmrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106ecce36beSmrgelse
2107ecce36beSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108ecce36beSmrgfi])
2109ecce36beSmrglibrary_names_spec=
2110ecce36beSmrglibname_spec='lib$name'
2111ecce36beSmrgsoname_spec=
2112ecce36beSmrgshrext_cmds=".so"
2113ecce36beSmrgpostinstall_cmds=
2114ecce36beSmrgpostuninstall_cmds=
2115ecce36beSmrgfinish_cmds=
2116ecce36beSmrgfinish_eval=
2117ecce36beSmrgshlibpath_var=
2118ecce36beSmrgshlibpath_overrides_runpath=unknown
2119ecce36beSmrgversion_type=none
2120ecce36beSmrgdynamic_linker="$host_os ld.so"
2121ecce36beSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2122ecce36beSmrgneed_lib_prefix=unknown
2123ecce36beSmrghardcode_into_libs=no
2124ecce36beSmrg
2125ecce36beSmrg# when you set need_version to no, make sure it does not cause -set_version
2126ecce36beSmrg# flags to be left without arguments
2127ecce36beSmrgneed_version=unknown
2128ecce36beSmrg
2129ecce36beSmrgcase $host_os in
2130ecce36beSmrgaix3*)
2131ecce36beSmrg  version_type=linux
2132ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2133ecce36beSmrg  shlibpath_var=LIBPATH
2134ecce36beSmrg
2135ecce36beSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2136ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2137ecce36beSmrg  ;;
2138ecce36beSmrg
2139ecce36beSmrgaix[[4-9]]*)
2140ecce36beSmrg  version_type=linux
2141ecce36beSmrg  need_lib_prefix=no
2142ecce36beSmrg  need_version=no
2143ecce36beSmrg  hardcode_into_libs=yes
2144ecce36beSmrg  if test "$host_cpu" = ia64; then
2145ecce36beSmrg    # AIX 5 supports IA64
2146ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2147ecce36beSmrg    shlibpath_var=LD_LIBRARY_PATH
2148ecce36beSmrg  else
2149ecce36beSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2150ecce36beSmrg    # for dependence libraries.  The import file would start with
2151ecce36beSmrg    # the line `#! .'.  This would cause the generated library to
2152ecce36beSmrg    # depend on `.', always an invalid library.  This was fixed in
2153ecce36beSmrg    # development snapshots of GCC prior to 3.0.
2154ecce36beSmrg    case $host_os in
2155ecce36beSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2156ecce36beSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2157ecce36beSmrg	   echo ' yes '
2158ecce36beSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2159ecce36beSmrg	:
2160ecce36beSmrg      else
2161ecce36beSmrg	can_build_shared=no
2162ecce36beSmrg      fi
2163ecce36beSmrg      ;;
2164ecce36beSmrg    esac
2165ecce36beSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2166ecce36beSmrg    # soname into executable. Probably we can add versioning support to
2167ecce36beSmrg    # collect2, so additional links can be useful in future.
2168ecce36beSmrg    if test "$aix_use_runtimelinking" = yes; then
2169ecce36beSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2170ecce36beSmrg      # instead of lib<name>.a to let people know that these are not
2171ecce36beSmrg      # typical AIX shared libraries.
2172ecce36beSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173ecce36beSmrg    else
2174ecce36beSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2175ecce36beSmrg      # and later when we are not doing run time linking.
2176ecce36beSmrg      library_names_spec='${libname}${release}.a $libname.a'
2177ecce36beSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2178ecce36beSmrg    fi
2179ecce36beSmrg    shlibpath_var=LIBPATH
2180ecce36beSmrg  fi
2181ecce36beSmrg  ;;
2182ecce36beSmrg
2183ecce36beSmrgamigaos*)
2184ecce36beSmrg  case $host_cpu in
2185ecce36beSmrg  powerpc)
2186ecce36beSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187ecce36beSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189ecce36beSmrg    ;;
2190ecce36beSmrg  m68k)
2191ecce36beSmrg    library_names_spec='$libname.ixlibrary $libname.a'
2192ecce36beSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193ecce36beSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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'
2194ecce36beSmrg    ;;
2195ecce36beSmrg  esac
2196ecce36beSmrg  ;;
2197ecce36beSmrg
2198ecce36beSmrgbeos*)
2199ecce36beSmrg  library_names_spec='${libname}${shared_ext}'
2200ecce36beSmrg  dynamic_linker="$host_os ld.so"
2201ecce36beSmrg  shlibpath_var=LIBRARY_PATH
2202ecce36beSmrg  ;;
2203ecce36beSmrg
2204ecce36beSmrgbsdi[[45]]*)
2205ecce36beSmrg  version_type=linux
2206ecce36beSmrg  need_version=no
2207ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2208ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2209ecce36beSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2210ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2211ecce36beSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2212ecce36beSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2213ecce36beSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2214ecce36beSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2215ecce36beSmrg  # libtool to hard-code these into programs
2216ecce36beSmrg  ;;
2217ecce36beSmrg
2218ecce36beSmrgcygwin* | mingw* | pw32* | cegcc*)
2219ecce36beSmrg  version_type=windows
2220ecce36beSmrg  shrext_cmds=".dll"
2221ecce36beSmrg  need_version=no
2222ecce36beSmrg  need_lib_prefix=no
2223ecce36beSmrg
2224ecce36beSmrg  case $GCC,$host_os in
2225ecce36beSmrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2226ecce36beSmrg    library_names_spec='$libname.dll.a'
2227ecce36beSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228ecce36beSmrg    postinstall_cmds='base_file=`basename \${file}`~
2229ecce36beSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2230ecce36beSmrg      dldir=$destdir/`dirname \$dlpath`~
2231ecce36beSmrg      test -d \$dldir || mkdir -p \$dldir~
2232ecce36beSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233ecce36beSmrg      chmod a+x \$dldir/$dlname~
2234ecce36beSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235ecce36beSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236ecce36beSmrg      fi'
2237ecce36beSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2238ecce36beSmrg      dlpath=$dir/\$dldll~
2239ecce36beSmrg       $RM \$dlpath'
2240ecce36beSmrg    shlibpath_overrides_runpath=yes
2241ecce36beSmrg
2242ecce36beSmrg    case $host_os in
2243ecce36beSmrg    cygwin*)
2244ecce36beSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245ecce36beSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246ecce36beSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2247ecce36beSmrg      ;;
2248ecce36beSmrg    mingw* | cegcc*)
2249ecce36beSmrg      # MinGW DLLs use traditional 'lib' prefix
2250ecce36beSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251ecce36beSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252ecce36beSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253ecce36beSmrg        # It is most probably a Windows format PATH printed by
2254ecce36beSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255ecce36beSmrg        # path with ; separators, and with drive letters. We can handle the
2256ecce36beSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2257ecce36beSmrg        # especially as we might pass files found there to a mingw objdump,
2258ecce36beSmrg        # which wouldn't understand a cygwinified path. Ahh.
2259ecce36beSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260ecce36beSmrg      else
2261ecce36beSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262ecce36beSmrg      fi
2263ecce36beSmrg      ;;
2264ecce36beSmrg    pw32*)
2265ecce36beSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266ecce36beSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267ecce36beSmrg      ;;
2268ecce36beSmrg    esac
2269ecce36beSmrg    ;;
2270ecce36beSmrg
2271ecce36beSmrg  *)
2272ecce36beSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2273ecce36beSmrg    ;;
2274ecce36beSmrg  esac
2275ecce36beSmrg  dynamic_linker='Win32 ld.exe'
2276ecce36beSmrg  # FIXME: first we should search . and the directory the executable is in
2277ecce36beSmrg  shlibpath_var=PATH
2278ecce36beSmrg  ;;
2279ecce36beSmrg
2280ecce36beSmrgdarwin* | rhapsody*)
2281ecce36beSmrg  dynamic_linker="$host_os dyld"
2282ecce36beSmrg  version_type=darwin
2283ecce36beSmrg  need_lib_prefix=no
2284ecce36beSmrg  need_version=no
2285ecce36beSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2286ecce36beSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2287ecce36beSmrg  shlibpath_overrides_runpath=yes
2288ecce36beSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2289ecce36beSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290ecce36beSmrgm4_if([$1], [],[
2291ecce36beSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2292ecce36beSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2293ecce36beSmrg  ;;
2294ecce36beSmrg
2295ecce36beSmrgdgux*)
2296ecce36beSmrg  version_type=linux
2297ecce36beSmrg  need_lib_prefix=no
2298ecce36beSmrg  need_version=no
2299ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2300ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2301ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2302ecce36beSmrg  ;;
2303ecce36beSmrg
2304ecce36beSmrgfreebsd1*)
2305ecce36beSmrg  dynamic_linker=no
2306ecce36beSmrg  ;;
2307ecce36beSmrg
2308ecce36beSmrgfreebsd* | dragonfly*)
2309ecce36beSmrg  # DragonFly does not have aout.  When/if they implement a new
2310ecce36beSmrg  # versioning mechanism, adjust this.
2311ecce36beSmrg  if test -x /usr/bin/objformat; then
2312ecce36beSmrg    objformat=`/usr/bin/objformat`
2313ecce36beSmrg  else
2314ecce36beSmrg    case $host_os in
2315ecce36beSmrg    freebsd[[123]]*) objformat=aout ;;
2316ecce36beSmrg    *) objformat=elf ;;
2317ecce36beSmrg    esac
2318ecce36beSmrg  fi
2319ecce36beSmrg  version_type=freebsd-$objformat
2320ecce36beSmrg  case $version_type in
2321ecce36beSmrg    freebsd-elf*)
2322ecce36beSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2323ecce36beSmrg      need_version=no
2324ecce36beSmrg      need_lib_prefix=no
2325ecce36beSmrg      ;;
2326ecce36beSmrg    freebsd-*)
2327ecce36beSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2328ecce36beSmrg      need_version=yes
2329ecce36beSmrg      ;;
2330ecce36beSmrg  esac
2331ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2332ecce36beSmrg  case $host_os in
2333ecce36beSmrg  freebsd2*)
2334ecce36beSmrg    shlibpath_overrides_runpath=yes
2335ecce36beSmrg    ;;
2336ecce36beSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2337ecce36beSmrg    shlibpath_overrides_runpath=yes
2338ecce36beSmrg    hardcode_into_libs=yes
2339ecce36beSmrg    ;;
2340ecce36beSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2341ecce36beSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2342ecce36beSmrg    shlibpath_overrides_runpath=no
2343ecce36beSmrg    hardcode_into_libs=yes
2344ecce36beSmrg    ;;
2345ecce36beSmrg  *) # from 4.6 on, and DragonFly
2346ecce36beSmrg    shlibpath_overrides_runpath=yes
2347ecce36beSmrg    hardcode_into_libs=yes
2348ecce36beSmrg    ;;
2349ecce36beSmrg  esac
2350ecce36beSmrg  ;;
2351ecce36beSmrg
2352ecce36beSmrggnu*)
2353ecce36beSmrg  version_type=linux
2354ecce36beSmrg  need_lib_prefix=no
2355ecce36beSmrg  need_version=no
2356ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2357ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2358ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2359ecce36beSmrg  hardcode_into_libs=yes
2360ecce36beSmrg  ;;
2361ecce36beSmrg
2362ecce36beSmrghpux9* | hpux10* | hpux11*)
2363ecce36beSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2364ecce36beSmrg  # link against other versions.
2365ecce36beSmrg  version_type=sunos
2366ecce36beSmrg  need_lib_prefix=no
2367ecce36beSmrg  need_version=no
2368ecce36beSmrg  case $host_cpu in
2369ecce36beSmrg  ia64*)
2370ecce36beSmrg    shrext_cmds='.so'
2371ecce36beSmrg    hardcode_into_libs=yes
2372ecce36beSmrg    dynamic_linker="$host_os dld.so"
2373ecce36beSmrg    shlibpath_var=LD_LIBRARY_PATH
2374ecce36beSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376ecce36beSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2377ecce36beSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2378ecce36beSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2379ecce36beSmrg    else
2380ecce36beSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2381ecce36beSmrg    fi
2382ecce36beSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2383ecce36beSmrg    ;;
2384ecce36beSmrg  hppa*64*)
2385ecce36beSmrg    shrext_cmds='.sl'
2386ecce36beSmrg    hardcode_into_libs=yes
2387ecce36beSmrg    dynamic_linker="$host_os dld.sl"
2388ecce36beSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2389ecce36beSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2390ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2391ecce36beSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2392ecce36beSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2393ecce36beSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394ecce36beSmrg    ;;
2395ecce36beSmrg  *)
2396ecce36beSmrg    shrext_cmds='.sl'
2397ecce36beSmrg    dynamic_linker="$host_os dld.sl"
2398ecce36beSmrg    shlibpath_var=SHLIB_PATH
2399ecce36beSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2400ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2401ecce36beSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2402ecce36beSmrg    ;;
2403ecce36beSmrg  esac
2404ecce36beSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2405ecce36beSmrg  postinstall_cmds='chmod 555 $lib'
2406ecce36beSmrg  ;;
2407ecce36beSmrg
2408ecce36beSmrginterix[[3-9]]*)
2409ecce36beSmrg  version_type=linux
2410ecce36beSmrg  need_lib_prefix=no
2411ecce36beSmrg  need_version=no
2412ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2413ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2414ecce36beSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2415ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2416ecce36beSmrg  shlibpath_overrides_runpath=no
2417ecce36beSmrg  hardcode_into_libs=yes
2418ecce36beSmrg  ;;
2419ecce36beSmrg
2420ecce36beSmrgirix5* | irix6* | nonstopux*)
2421ecce36beSmrg  case $host_os in
2422ecce36beSmrg    nonstopux*) version_type=nonstopux ;;
2423ecce36beSmrg    *)
2424ecce36beSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2425ecce36beSmrg		version_type=linux
2426ecce36beSmrg	else
2427ecce36beSmrg		version_type=irix
2428ecce36beSmrg	fi ;;
2429ecce36beSmrg  esac
2430ecce36beSmrg  need_lib_prefix=no
2431ecce36beSmrg  need_version=no
2432ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2433ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2434ecce36beSmrg  case $host_os in
2435ecce36beSmrg  irix5* | nonstopux*)
2436ecce36beSmrg    libsuff= shlibsuff=
2437ecce36beSmrg    ;;
2438ecce36beSmrg  *)
2439ecce36beSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2440ecce36beSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2441ecce36beSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2442ecce36beSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2443ecce36beSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2444ecce36beSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2445ecce36beSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2446ecce36beSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2447ecce36beSmrg    esac
2448ecce36beSmrg    ;;
2449ecce36beSmrg  esac
2450ecce36beSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2451ecce36beSmrg  shlibpath_overrides_runpath=no
2452ecce36beSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2453ecce36beSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2454ecce36beSmrg  hardcode_into_libs=yes
2455ecce36beSmrg  ;;
2456ecce36beSmrg
2457ecce36beSmrg# No shared lib support for Linux oldld, aout, or coff.
2458ecce36beSmrglinux*oldld* | linux*aout* | linux*coff*)
2459ecce36beSmrg  dynamic_linker=no
2460ecce36beSmrg  ;;
2461ecce36beSmrg
2462ecce36beSmrg# This must be Linux ELF.
2463ecce36beSmrglinux* | k*bsd*-gnu)
2464ecce36beSmrg  version_type=linux
2465ecce36beSmrg  need_lib_prefix=no
2466ecce36beSmrg  need_version=no
2467ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2469ecce36beSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2470ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2471ecce36beSmrg  shlibpath_overrides_runpath=no
2472ecce36beSmrg  # Some binutils ld are patched to set DT_RUNPATH
2473ecce36beSmrg  save_LDFLAGS=$LDFLAGS
2474ecce36beSmrg  save_libdir=$libdir
2475ecce36beSmrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476ecce36beSmrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477ecce36beSmrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478ecce36beSmrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479ecce36beSmrg       [shlibpath_overrides_runpath=yes])])
2480ecce36beSmrg  LDFLAGS=$save_LDFLAGS
2481ecce36beSmrg  libdir=$save_libdir
2482ecce36beSmrg
2483ecce36beSmrg  # This implies no fast_install, which is unacceptable.
2484ecce36beSmrg  # Some rework will be needed to allow for fast_install
2485ecce36beSmrg  # before this can be enabled.
2486ecce36beSmrg  hardcode_into_libs=yes
2487ecce36beSmrg
2488ecce36beSmrg  # Append ld.so.conf contents to the search path
2489ecce36beSmrg  if test -f /etc/ld.so.conf; then
2490ecce36beSmrg    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;/^$/d' | tr '\n' ' '`
2491ecce36beSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2492ecce36beSmrg  fi
2493ecce36beSmrg
2494ecce36beSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2495ecce36beSmrg  # powerpc, because MkLinux only supported shared libraries with the
2496ecce36beSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2497ecce36beSmrg  # most powerpc-linux boxes support dynamic linking these days and
2498ecce36beSmrg  # people can always --disable-shared, the test was removed, and we
2499ecce36beSmrg  # assume the GNU/Linux dynamic linker is in use.
2500ecce36beSmrg  dynamic_linker='GNU/Linux ld.so'
2501ecce36beSmrg  ;;
2502ecce36beSmrg
2503ecce36beSmrgnetbsdelf*-gnu)
2504ecce36beSmrg  version_type=linux
2505ecce36beSmrg  need_lib_prefix=no
2506ecce36beSmrg  need_version=no
2507ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2508ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2509ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2510ecce36beSmrg  shlibpath_overrides_runpath=no
2511ecce36beSmrg  hardcode_into_libs=yes
2512ecce36beSmrg  dynamic_linker='NetBSD ld.elf_so'
2513ecce36beSmrg  ;;
2514ecce36beSmrg
2515ecce36beSmrgnetbsd*)
2516ecce36beSmrg  version_type=sunos
2517ecce36beSmrg  need_lib_prefix=no
2518ecce36beSmrg  need_version=no
2519ecce36beSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2520ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2521ecce36beSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2522ecce36beSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2523ecce36beSmrg  else
2524ecce36beSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2525ecce36beSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2526ecce36beSmrg    dynamic_linker='NetBSD ld.elf_so'
2527ecce36beSmrg  fi
2528ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2529ecce36beSmrg  shlibpath_overrides_runpath=yes
2530ecce36beSmrg  hardcode_into_libs=yes
2531ecce36beSmrg  ;;
2532ecce36beSmrg
2533ecce36beSmrgnewsos6)
2534ecce36beSmrg  version_type=linux
2535ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2536ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2537ecce36beSmrg  shlibpath_overrides_runpath=yes
2538ecce36beSmrg  ;;
2539ecce36beSmrg
2540ecce36beSmrg*nto* | *qnx*)
2541ecce36beSmrg  version_type=qnx
2542ecce36beSmrg  need_lib_prefix=no
2543ecce36beSmrg  need_version=no
2544ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2545ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2546ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2547ecce36beSmrg  shlibpath_overrides_runpath=no
2548ecce36beSmrg  hardcode_into_libs=yes
2549ecce36beSmrg  dynamic_linker='ldqnx.so'
2550ecce36beSmrg  ;;
2551ecce36beSmrg
2552ecce36beSmrgopenbsd*)
2553ecce36beSmrg  version_type=sunos
2554ecce36beSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
2555ecce36beSmrg  need_lib_prefix=no
2556ecce36beSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2557ecce36beSmrg  case $host_os in
2558ecce36beSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2559ecce36beSmrg    *)				need_version=no  ;;
2560ecce36beSmrg  esac
2561ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2562ecce36beSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2563ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2564ecce36beSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2565ecce36beSmrg    case $host_os in
2566ecce36beSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2567ecce36beSmrg	shlibpath_overrides_runpath=no
2568ecce36beSmrg	;;
2569ecce36beSmrg      *)
2570ecce36beSmrg	shlibpath_overrides_runpath=yes
2571ecce36beSmrg	;;
2572ecce36beSmrg      esac
2573ecce36beSmrg  else
2574ecce36beSmrg    shlibpath_overrides_runpath=yes
2575ecce36beSmrg  fi
2576ecce36beSmrg  ;;
2577ecce36beSmrg
2578ecce36beSmrgos2*)
2579ecce36beSmrg  libname_spec='$name'
2580ecce36beSmrg  shrext_cmds=".dll"
2581ecce36beSmrg  need_lib_prefix=no
2582ecce36beSmrg  library_names_spec='$libname${shared_ext} $libname.a'
2583ecce36beSmrg  dynamic_linker='OS/2 ld.exe'
2584ecce36beSmrg  shlibpath_var=LIBPATH
2585ecce36beSmrg  ;;
2586ecce36beSmrg
2587ecce36beSmrgosf3* | osf4* | osf5*)
2588ecce36beSmrg  version_type=osf
2589ecce36beSmrg  need_lib_prefix=no
2590ecce36beSmrg  need_version=no
2591ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2592ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2593ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2594ecce36beSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2595ecce36beSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2596ecce36beSmrg  ;;
2597ecce36beSmrg
2598ecce36beSmrgrdos*)
2599ecce36beSmrg  dynamic_linker=no
2600ecce36beSmrg  ;;
2601ecce36beSmrg
2602ecce36beSmrgsolaris*)
2603ecce36beSmrg  version_type=linux
2604ecce36beSmrg  need_lib_prefix=no
2605ecce36beSmrg  need_version=no
2606ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2607ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2608ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2609ecce36beSmrg  shlibpath_overrides_runpath=yes
2610ecce36beSmrg  hardcode_into_libs=yes
2611ecce36beSmrg  # ldd complains unless libraries are executable
2612ecce36beSmrg  postinstall_cmds='chmod +x $lib'
2613ecce36beSmrg  ;;
2614ecce36beSmrg
2615ecce36beSmrgsunos4*)
2616ecce36beSmrg  version_type=sunos
2617ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2618ecce36beSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2619ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2620ecce36beSmrg  shlibpath_overrides_runpath=yes
2621ecce36beSmrg  if test "$with_gnu_ld" = yes; then
2622ecce36beSmrg    need_lib_prefix=no
2623ecce36beSmrg  fi
2624ecce36beSmrg  need_version=yes
2625ecce36beSmrg  ;;
2626ecce36beSmrg
2627ecce36beSmrgsysv4 | sysv4.3*)
2628ecce36beSmrg  version_type=linux
2629ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2630ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2631ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2632ecce36beSmrg  case $host_vendor in
2633ecce36beSmrg    sni)
2634ecce36beSmrg      shlibpath_overrides_runpath=no
2635ecce36beSmrg      need_lib_prefix=no
2636ecce36beSmrg      runpath_var=LD_RUN_PATH
2637ecce36beSmrg      ;;
2638ecce36beSmrg    siemens)
2639ecce36beSmrg      need_lib_prefix=no
2640ecce36beSmrg      ;;
2641ecce36beSmrg    motorola)
2642ecce36beSmrg      need_lib_prefix=no
2643ecce36beSmrg      need_version=no
2644ecce36beSmrg      shlibpath_overrides_runpath=no
2645ecce36beSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2646ecce36beSmrg      ;;
2647ecce36beSmrg  esac
2648ecce36beSmrg  ;;
2649ecce36beSmrg
2650ecce36beSmrgsysv4*MP*)
2651ecce36beSmrg  if test -d /usr/nec ;then
2652ecce36beSmrg    version_type=linux
2653ecce36beSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2654ecce36beSmrg    soname_spec='$libname${shared_ext}.$major'
2655ecce36beSmrg    shlibpath_var=LD_LIBRARY_PATH
2656ecce36beSmrg  fi
2657ecce36beSmrg  ;;
2658ecce36beSmrg
2659ecce36beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2660ecce36beSmrg  version_type=freebsd-elf
2661ecce36beSmrg  need_lib_prefix=no
2662ecce36beSmrg  need_version=no
2663ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2664ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2665ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2666ecce36beSmrg  shlibpath_overrides_runpath=yes
2667ecce36beSmrg  hardcode_into_libs=yes
2668ecce36beSmrg  if test "$with_gnu_ld" = yes; then
2669ecce36beSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2670ecce36beSmrg  else
2671ecce36beSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2672ecce36beSmrg    case $host_os in
2673ecce36beSmrg      sco3.2v5*)
2674ecce36beSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2675ecce36beSmrg	;;
2676ecce36beSmrg    esac
2677ecce36beSmrg  fi
2678ecce36beSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
2679ecce36beSmrg  ;;
2680ecce36beSmrg
2681ecce36beSmrgtpf*)
2682ecce36beSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2683ecce36beSmrg  version_type=linux
2684ecce36beSmrg  need_lib_prefix=no
2685ecce36beSmrg  need_version=no
2686ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2687ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2688ecce36beSmrg  shlibpath_overrides_runpath=no
2689ecce36beSmrg  hardcode_into_libs=yes
2690ecce36beSmrg  ;;
2691ecce36beSmrg
2692ecce36beSmrguts4*)
2693ecce36beSmrg  version_type=linux
2694ecce36beSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2695ecce36beSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2696ecce36beSmrg  shlibpath_var=LD_LIBRARY_PATH
2697ecce36beSmrg  ;;
2698ecce36beSmrg
2699ecce36beSmrg*)
2700ecce36beSmrg  dynamic_linker=no
2701ecce36beSmrg  ;;
2702ecce36beSmrgesac
2703ecce36beSmrgAC_MSG_RESULT([$dynamic_linker])
2704ecce36beSmrgtest "$dynamic_linker" = no && can_build_shared=no
2705ecce36beSmrg
2706ecce36beSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2707ecce36beSmrgif test "$GCC" = yes; then
2708ecce36beSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2709ecce36beSmrgfi
2710ecce36beSmrg
2711ecce36beSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2712ecce36beSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2713ecce36beSmrgfi
2714ecce36beSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2715ecce36beSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2716ecce36beSmrgfi
2717ecce36beSmrg
2718ecce36beSmrg_LT_DECL([], [variables_saved_for_relink], [1],
2719ecce36beSmrg    [Variables whose values should be saved in libtool wrapper scripts and
2720ecce36beSmrg    restored at link time])
2721ecce36beSmrg_LT_DECL([], [need_lib_prefix], [0],
2722ecce36beSmrg    [Do we need the "lib" prefix for modules?])
2723ecce36beSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2724ecce36beSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
2725ecce36beSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2726ecce36beSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2727ecce36beSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2728ecce36beSmrg    [Is shlibpath searched before the hard-coded library search path?])
2729ecce36beSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2730ecce36beSmrg_LT_DECL([], [library_names_spec], [1],
2731ecce36beSmrg    [[List of archive names.  First name is the real one, the rest are links.
2732ecce36beSmrg    The last name is the one that the linker finds with -lNAME]])
2733ecce36beSmrg_LT_DECL([], [soname_spec], [1],
2734ecce36beSmrg    [[The coded name of the library, if different from the real name]])
2735ecce36beSmrg_LT_DECL([], [postinstall_cmds], [2],
2736ecce36beSmrg    [Command to use after installation of a shared archive])
2737ecce36beSmrg_LT_DECL([], [postuninstall_cmds], [2],
2738ecce36beSmrg    [Command to use after uninstallation of a shared archive])
2739ecce36beSmrg_LT_DECL([], [finish_cmds], [2],
2740ecce36beSmrg    [Commands used to finish a libtool library installation in a directory])
2741ecce36beSmrg_LT_DECL([], [finish_eval], [1],
2742ecce36beSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
2743ecce36beSmrg    not shown]])
2744ecce36beSmrg_LT_DECL([], [hardcode_into_libs], [0],
2745ecce36beSmrg    [Whether we should hardcode library paths into libraries])
2746ecce36beSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2747ecce36beSmrg    [Compile-time system search path for libraries])
2748ecce36beSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2749ecce36beSmrg    [Run-time system search path for libraries])
2750ecce36beSmrg])# _LT_SYS_DYNAMIC_LINKER
2751ecce36beSmrg
2752ecce36beSmrg
2753ecce36beSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
2754ecce36beSmrg# --------------------------
2755ecce36beSmrg# find a file program which can recognize shared library
2756ecce36beSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2757ecce36beSmrg[m4_require([_LT_DECL_EGREP])dnl
2758ecce36beSmrgAC_MSG_CHECKING([for $1])
2759ecce36beSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2760ecce36beSmrg[case $MAGIC_CMD in
2761ecce36beSmrg[[\\/*] |  ?:[\\/]*])
2762ecce36beSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2763ecce36beSmrg  ;;
2764ecce36beSmrg*)
2765ecce36beSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2766ecce36beSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2767ecce36beSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2768ecce36beSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2769ecce36beSmrgdnl not every word.  This closes a longstanding sh security hole.
2770ecce36beSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2771ecce36beSmrg  for ac_dir in $ac_dummy; do
2772ecce36beSmrg    IFS="$lt_save_ifs"
2773ecce36beSmrg    test -z "$ac_dir" && ac_dir=.
2774ecce36beSmrg    if test -f $ac_dir/$1; then
2775ecce36beSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2776ecce36beSmrg      if test -n "$file_magic_test_file"; then
2777ecce36beSmrg	case $deplibs_check_method in
2778ecce36beSmrg	"file_magic "*)
2779ecce36beSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2780ecce36beSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2781ecce36beSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2782ecce36beSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2783ecce36beSmrg	    :
2784ecce36beSmrg	  else
2785ecce36beSmrg	    cat <<_LT_EOF 1>&2
2786ecce36beSmrg
2787ecce36beSmrg*** Warning: the command libtool uses to detect shared libraries,
2788ecce36beSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2789ecce36beSmrg*** The result is that libtool may fail to recognize shared libraries
2790ecce36beSmrg*** as such.  This will affect the creation of libtool libraries that
2791ecce36beSmrg*** depend on shared libraries, but programs linked with such libtool
2792ecce36beSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2793ecce36beSmrg*** may want to report the problem to your system manager and/or to
2794ecce36beSmrg*** bug-libtool@gnu.org
2795ecce36beSmrg
2796ecce36beSmrg_LT_EOF
2797ecce36beSmrg	  fi ;;
2798ecce36beSmrg	esac
2799ecce36beSmrg      fi
2800ecce36beSmrg      break
2801ecce36beSmrg    fi
2802ecce36beSmrg  done
2803ecce36beSmrg  IFS="$lt_save_ifs"
2804ecce36beSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2805ecce36beSmrg  ;;
2806ecce36beSmrgesac])
2807ecce36beSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2808ecce36beSmrgif test -n "$MAGIC_CMD"; then
2809ecce36beSmrg  AC_MSG_RESULT($MAGIC_CMD)
2810ecce36beSmrgelse
2811ecce36beSmrg  AC_MSG_RESULT(no)
2812ecce36beSmrgfi
2813ecce36beSmrg_LT_DECL([], [MAGIC_CMD], [0],
2814ecce36beSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2815ecce36beSmrg])# _LT_PATH_TOOL_PREFIX
2816ecce36beSmrg
2817ecce36beSmrg# Old name:
2818ecce36beSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2819ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
2820ecce36beSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2821ecce36beSmrg
2822ecce36beSmrg
2823ecce36beSmrg# _LT_PATH_MAGIC
2824ecce36beSmrg# --------------
2825ecce36beSmrg# find a file program which can recognize a shared library
2826ecce36beSmrgm4_defun([_LT_PATH_MAGIC],
2827ecce36beSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2828ecce36beSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2829ecce36beSmrg  if test -n "$ac_tool_prefix"; then
2830ecce36beSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2831ecce36beSmrg  else
2832ecce36beSmrg    MAGIC_CMD=:
2833ecce36beSmrg  fi
2834ecce36beSmrgfi
2835ecce36beSmrg])# _LT_PATH_MAGIC
2836ecce36beSmrg
2837ecce36beSmrg
2838ecce36beSmrg# LT_PATH_LD
2839ecce36beSmrg# ----------
2840ecce36beSmrg# find the pathname to the GNU or non-GNU linker
2841ecce36beSmrgAC_DEFUN([LT_PATH_LD],
2842ecce36beSmrg[AC_REQUIRE([AC_PROG_CC])dnl
2843ecce36beSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2844ecce36beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2845ecce36beSmrgm4_require([_LT_DECL_SED])dnl
2846ecce36beSmrgm4_require([_LT_DECL_EGREP])dnl
2847ecce36beSmrg
2848ecce36beSmrgAC_ARG_WITH([gnu-ld],
2849ecce36beSmrg    [AS_HELP_STRING([--with-gnu-ld],
2850ecce36beSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2851ecce36beSmrg    [test "$withval" = no || with_gnu_ld=yes],
2852ecce36beSmrg    [with_gnu_ld=no])dnl
2853ecce36beSmrg
2854ecce36beSmrgac_prog=ld
2855ecce36beSmrgif test "$GCC" = yes; then
2856ecce36beSmrg  # Check if gcc -print-prog-name=ld gives a path.
2857ecce36beSmrg  AC_MSG_CHECKING([for ld used by $CC])
2858ecce36beSmrg  case $host in
2859ecce36beSmrg  *-*-mingw*)
2860ecce36beSmrg    # gcc leaves a trailing carriage return which upsets mingw
2861ecce36beSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2862ecce36beSmrg  *)
2863ecce36beSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2864ecce36beSmrg  esac
2865ecce36beSmrg  case $ac_prog in
2866ecce36beSmrg    # Accept absolute paths.
2867ecce36beSmrg    [[\\/]]* | ?:[[\\/]]*)
2868ecce36beSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2869ecce36beSmrg      # Canonicalize the pathname of ld
2870ecce36beSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2871ecce36beSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2872ecce36beSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2873ecce36beSmrg      done
2874ecce36beSmrg      test -z "$LD" && LD="$ac_prog"
2875ecce36beSmrg      ;;
2876ecce36beSmrg  "")
2877ecce36beSmrg    # If it fails, then pretend we aren't using GCC.
2878ecce36beSmrg    ac_prog=ld
2879ecce36beSmrg    ;;
2880ecce36beSmrg  *)
2881ecce36beSmrg    # If it is relative, then search for the first ld in PATH.
2882ecce36beSmrg    with_gnu_ld=unknown
2883ecce36beSmrg    ;;
2884ecce36beSmrg  esac
2885ecce36beSmrgelif test "$with_gnu_ld" = yes; then
2886ecce36beSmrg  AC_MSG_CHECKING([for GNU ld])
2887ecce36beSmrgelse
2888ecce36beSmrg  AC_MSG_CHECKING([for non-GNU ld])
2889ecce36beSmrgfi
2890ecce36beSmrgAC_CACHE_VAL(lt_cv_path_LD,
2891ecce36beSmrg[if test -z "$LD"; then
2892ecce36beSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2893ecce36beSmrg  for ac_dir in $PATH; do
2894ecce36beSmrg    IFS="$lt_save_ifs"
2895ecce36beSmrg    test -z "$ac_dir" && ac_dir=.
2896ecce36beSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2897ecce36beSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2898ecce36beSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2899ecce36beSmrg      # but apparently some variants of GNU ld only accept -v.
2900ecce36beSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2901ecce36beSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2902ecce36beSmrg      *GNU* | *'with BFD'*)
2903ecce36beSmrg	test "$with_gnu_ld" != no && break
2904ecce36beSmrg	;;
2905ecce36beSmrg      *)
2906ecce36beSmrg	test "$with_gnu_ld" != yes && break
2907ecce36beSmrg	;;
2908ecce36beSmrg      esac
2909ecce36beSmrg    fi
2910ecce36beSmrg  done
2911ecce36beSmrg  IFS="$lt_save_ifs"
2912ecce36beSmrgelse
2913ecce36beSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2914ecce36beSmrgfi])
2915ecce36beSmrgLD="$lt_cv_path_LD"
2916ecce36beSmrgif test -n "$LD"; then
2917ecce36beSmrg  AC_MSG_RESULT($LD)
2918ecce36beSmrgelse
2919ecce36beSmrg  AC_MSG_RESULT(no)
2920ecce36beSmrgfi
2921ecce36beSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2922ecce36beSmrg_LT_PATH_LD_GNU
2923ecce36beSmrgAC_SUBST([LD])
2924ecce36beSmrg
2925ecce36beSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2926ecce36beSmrg])# LT_PATH_LD
2927ecce36beSmrg
2928ecce36beSmrg# Old names:
2929ecce36beSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2930ecce36beSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2931ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
2932ecce36beSmrgdnl AC_DEFUN([AM_PROG_LD], [])
2933ecce36beSmrgdnl AC_DEFUN([AC_PROG_LD], [])
2934ecce36beSmrg
2935ecce36beSmrg
2936ecce36beSmrg# _LT_PATH_LD_GNU
2937ecce36beSmrg#- --------------
2938ecce36beSmrgm4_defun([_LT_PATH_LD_GNU],
2939ecce36beSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2940ecce36beSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2941ecce36beSmrgcase `$LD -v 2>&1 </dev/null` in
2942ecce36beSmrg*GNU* | *'with BFD'*)
2943ecce36beSmrg  lt_cv_prog_gnu_ld=yes
2944ecce36beSmrg  ;;
2945ecce36beSmrg*)
2946ecce36beSmrg  lt_cv_prog_gnu_ld=no
2947ecce36beSmrg  ;;
2948ecce36beSmrgesac])
2949ecce36beSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2950ecce36beSmrg])# _LT_PATH_LD_GNU
2951ecce36beSmrg
2952ecce36beSmrg
2953ecce36beSmrg# _LT_CMD_RELOAD
2954ecce36beSmrg# --------------
2955ecce36beSmrg# find reload flag for linker
2956ecce36beSmrg#   -- PORTME Some linkers may need a different reload flag.
2957ecce36beSmrgm4_defun([_LT_CMD_RELOAD],
2958ecce36beSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2959ecce36beSmrg  lt_cv_ld_reload_flag,
2960ecce36beSmrg  [lt_cv_ld_reload_flag='-r'])
2961ecce36beSmrgreload_flag=$lt_cv_ld_reload_flag
2962ecce36beSmrgcase $reload_flag in
2963ecce36beSmrg"" | " "*) ;;
2964ecce36beSmrg*) reload_flag=" $reload_flag" ;;
2965ecce36beSmrgesac
2966ecce36beSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2967ecce36beSmrgcase $host_os in
2968ecce36beSmrg  darwin*)
2969ecce36beSmrg    if test "$GCC" = yes; then
2970ecce36beSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2971ecce36beSmrg    else
2972ecce36beSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2973ecce36beSmrg    fi
2974ecce36beSmrg    ;;
2975ecce36beSmrgesac
2976ecce36beSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2977ecce36beSmrg_LT_DECL([], [reload_cmds], [2])dnl
2978ecce36beSmrg])# _LT_CMD_RELOAD
2979ecce36beSmrg
2980ecce36beSmrg
2981ecce36beSmrg# _LT_CHECK_MAGIC_METHOD
2982ecce36beSmrg# ----------------------
2983ecce36beSmrg# how to check for library dependencies
2984ecce36beSmrg#  -- PORTME fill in with the dynamic library characteristics
2985ecce36beSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2986ecce36beSmrg[m4_require([_LT_DECL_EGREP])
2987ecce36beSmrgm4_require([_LT_DECL_OBJDUMP])
2988ecce36beSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
2989ecce36beSmrglt_cv_deplibs_check_method,
2990ecce36beSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2991ecce36beSmrglt_cv_file_magic_test_file=
2992ecce36beSmrglt_cv_deplibs_check_method='unknown'
2993ecce36beSmrg# Need to set the preceding variable on all platforms that support
2994ecce36beSmrg# interlibrary dependencies.
2995ecce36beSmrg# 'none' -- dependencies not supported.
2996ecce36beSmrg# `unknown' -- same as none, but documents that we really don't know.
2997ecce36beSmrg# 'pass_all' -- all dependencies passed with no checks.
2998ecce36beSmrg# 'test_compile' -- check by making test program.
2999ecce36beSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3000ecce36beSmrg# which responds to the $file_magic_cmd with a given extended regex.
3001ecce36beSmrg# If you have `file' or equivalent on your system and you're not sure
3002ecce36beSmrg# whether `pass_all' will *always* work, you probably want this one.
3003ecce36beSmrg
3004ecce36beSmrgcase $host_os in
3005ecce36beSmrgaix[[4-9]]*)
3006ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3007ecce36beSmrg  ;;
3008ecce36beSmrg
3009ecce36beSmrgbeos*)
3010ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3011ecce36beSmrg  ;;
3012ecce36beSmrg
3013ecce36beSmrgbsdi[[45]]*)
3014ecce36beSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3015ecce36beSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3016ecce36beSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3017ecce36beSmrg  ;;
3018ecce36beSmrg
3019ecce36beSmrgcygwin*)
3020ecce36beSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3021ecce36beSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022ecce36beSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3023ecce36beSmrg  ;;
3024ecce36beSmrg
3025ecce36beSmrgmingw* | pw32*)
3026ecce36beSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3027ecce36beSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3028ecce36beSmrg  # unless we find 'file', for example because we are cross-compiling.
3029ecce36beSmrg  if ( file / ) >/dev/null 2>&1; then
3030ecce36beSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3031ecce36beSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3032ecce36beSmrg  else
3033ecce36beSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3034ecce36beSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3035ecce36beSmrg  fi
3036ecce36beSmrg  ;;
3037ecce36beSmrg
3038ecce36beSmrgcegcc)
3039ecce36beSmrg  # use the weaker test based on 'objdump'. See mingw*.
3040ecce36beSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3041ecce36beSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3042ecce36beSmrg  ;;
3043ecce36beSmrg
3044ecce36beSmrgdarwin* | rhapsody*)
3045ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3046ecce36beSmrg  ;;
3047ecce36beSmrg
3048ecce36beSmrgfreebsd* | dragonfly*)
3049ecce36beSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3050ecce36beSmrg    case $host_cpu in
3051ecce36beSmrg    i*86 )
3052ecce36beSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3053ecce36beSmrg      # Let's accept both of them until this is cleared up.
3054ecce36beSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3055ecce36beSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3056ecce36beSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3057ecce36beSmrg      ;;
3058ecce36beSmrg    esac
3059ecce36beSmrg  else
3060ecce36beSmrg    lt_cv_deplibs_check_method=pass_all
3061ecce36beSmrg  fi
3062ecce36beSmrg  ;;
3063ecce36beSmrg
3064ecce36beSmrggnu*)
3065ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3066ecce36beSmrg  ;;
3067ecce36beSmrg
3068ecce36beSmrghpux10.20* | hpux11*)
3069ecce36beSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3070ecce36beSmrg  case $host_cpu in
3071ecce36beSmrg  ia64*)
3072ecce36beSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3073ecce36beSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3074ecce36beSmrg    ;;
3075ecce36beSmrg  hppa*64*)
3076ecce36beSmrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3077ecce36beSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3078ecce36beSmrg    ;;
3079ecce36beSmrg  *)
3080ecce36beSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3081ecce36beSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3082ecce36beSmrg    ;;
3083ecce36beSmrg  esac
3084ecce36beSmrg  ;;
3085ecce36beSmrg
3086ecce36beSmrginterix[[3-9]]*)
3087ecce36beSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3088ecce36beSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3089ecce36beSmrg  ;;
3090ecce36beSmrg
3091ecce36beSmrgirix5* | irix6* | nonstopux*)
3092ecce36beSmrg  case $LD in
3093ecce36beSmrg  *-32|*"-32 ") libmagic=32-bit;;
3094ecce36beSmrg  *-n32|*"-n32 ") libmagic=N32;;
3095ecce36beSmrg  *-64|*"-64 ") libmagic=64-bit;;
3096ecce36beSmrg  *) libmagic=never-match;;
3097ecce36beSmrg  esac
3098ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3099ecce36beSmrg  ;;
3100ecce36beSmrg
3101ecce36beSmrg# This must be Linux ELF.
3102ecce36beSmrglinux* | k*bsd*-gnu)
3103ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3104ecce36beSmrg  ;;
3105ecce36beSmrg
3106ecce36beSmrgnetbsd* | netbsdelf*-gnu)
3107ecce36beSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3108ecce36beSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3109ecce36beSmrg  else
3110ecce36beSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3111ecce36beSmrg  fi
3112ecce36beSmrg  ;;
3113ecce36beSmrg
3114ecce36beSmrgnewos6*)
3115ecce36beSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3116ecce36beSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3117ecce36beSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3118ecce36beSmrg  ;;
3119ecce36beSmrg
3120ecce36beSmrg*nto* | *qnx*)
3121ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3122ecce36beSmrg  ;;
3123ecce36beSmrg
3124ecce36beSmrgopenbsd*)
3125ecce36beSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3126ecce36beSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3127ecce36beSmrg  else
3128ecce36beSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3129ecce36beSmrg  fi
3130ecce36beSmrg  ;;
3131ecce36beSmrg
3132ecce36beSmrgosf3* | osf4* | osf5*)
3133ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3134ecce36beSmrg  ;;
3135ecce36beSmrg
3136ecce36beSmrgrdos*)
3137ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3138ecce36beSmrg  ;;
3139ecce36beSmrg
3140ecce36beSmrgsolaris*)
3141ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3142ecce36beSmrg  ;;
3143ecce36beSmrg
3144ecce36beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3145ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3146ecce36beSmrg  ;;
3147ecce36beSmrg
3148ecce36beSmrgsysv4 | sysv4.3*)
3149ecce36beSmrg  case $host_vendor in
3150ecce36beSmrg  motorola)
3151ecce36beSmrg    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]]'
3152ecce36beSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3153ecce36beSmrg    ;;
3154ecce36beSmrg  ncr)
3155ecce36beSmrg    lt_cv_deplibs_check_method=pass_all
3156ecce36beSmrg    ;;
3157ecce36beSmrg  sequent)
3158ecce36beSmrg    lt_cv_file_magic_cmd='/bin/file'
3159ecce36beSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3160ecce36beSmrg    ;;
3161ecce36beSmrg  sni)
3162ecce36beSmrg    lt_cv_file_magic_cmd='/bin/file'
3163ecce36beSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3164ecce36beSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3165ecce36beSmrg    ;;
3166ecce36beSmrg  siemens)
3167ecce36beSmrg    lt_cv_deplibs_check_method=pass_all
3168ecce36beSmrg    ;;
3169ecce36beSmrg  pc)
3170ecce36beSmrg    lt_cv_deplibs_check_method=pass_all
3171ecce36beSmrg    ;;
3172ecce36beSmrg  esac
3173ecce36beSmrg  ;;
3174ecce36beSmrg
3175ecce36beSmrgtpf*)
3176ecce36beSmrg  lt_cv_deplibs_check_method=pass_all
3177ecce36beSmrg  ;;
3178ecce36beSmrgesac
3179ecce36beSmrg])
3180ecce36beSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3181ecce36beSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3182ecce36beSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3183ecce36beSmrg
3184ecce36beSmrg_LT_DECL([], [deplibs_check_method], [1],
3185ecce36beSmrg    [Method to check whether dependent libraries are shared objects])
3186ecce36beSmrg_LT_DECL([], [file_magic_cmd], [1],
3187ecce36beSmrg    [Command to use when deplibs_check_method == "file_magic"])
3188ecce36beSmrg])# _LT_CHECK_MAGIC_METHOD
3189ecce36beSmrg
3190ecce36beSmrg
3191ecce36beSmrg# LT_PATH_NM
3192ecce36beSmrg# ----------
3193ecce36beSmrg# find the pathname to a BSD- or MS-compatible name lister
3194ecce36beSmrgAC_DEFUN([LT_PATH_NM],
3195ecce36beSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3196ecce36beSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3197ecce36beSmrg[if test -n "$NM"; then
3198ecce36beSmrg  # Let the user override the test.
3199ecce36beSmrg  lt_cv_path_NM="$NM"
3200ecce36beSmrgelse
3201ecce36beSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3202ecce36beSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3203ecce36beSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3204ecce36beSmrg  fi
3205ecce36beSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3206ecce36beSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3207ecce36beSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3208ecce36beSmrg      IFS="$lt_save_ifs"
3209ecce36beSmrg      test -z "$ac_dir" && ac_dir=.
3210ecce36beSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3211ecce36beSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3212ecce36beSmrg	# Check to see if the nm accepts a BSD-compat flag.
3213ecce36beSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3214ecce36beSmrg	#   nm: unknown option "B" ignored
3215ecce36beSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3216ecce36beSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3217ecce36beSmrg	*/dev/null* | *'Invalid file or object type'*)
3218ecce36beSmrg	  lt_cv_path_NM="$tmp_nm -B"
3219ecce36beSmrg	  break
3220ecce36beSmrg	  ;;
3221ecce36beSmrg	*)
3222ecce36beSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3223ecce36beSmrg	  */dev/null*)
3224ecce36beSmrg	    lt_cv_path_NM="$tmp_nm -p"
3225ecce36beSmrg	    break
3226ecce36beSmrg	    ;;
3227ecce36beSmrg	  *)
3228ecce36beSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3229ecce36beSmrg	    continue # so that we can try to find one that supports BSD flags
3230ecce36beSmrg	    ;;
3231ecce36beSmrg	  esac
3232ecce36beSmrg	  ;;
3233ecce36beSmrg	esac
3234ecce36beSmrg      fi
3235ecce36beSmrg    done
3236ecce36beSmrg    IFS="$lt_save_ifs"
3237ecce36beSmrg  done
3238ecce36beSmrg  : ${lt_cv_path_NM=no}
3239ecce36beSmrgfi])
3240ecce36beSmrgif test "$lt_cv_path_NM" != "no"; then
3241ecce36beSmrg  NM="$lt_cv_path_NM"
3242ecce36beSmrgelse
3243ecce36beSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3244ecce36beSmrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3245ecce36beSmrg  AC_SUBST([DUMPBIN])
3246ecce36beSmrg  if test "$DUMPBIN" != ":"; then
3247ecce36beSmrg    NM="$DUMPBIN"
3248ecce36beSmrg  fi
3249ecce36beSmrgfi
3250ecce36beSmrgtest -z "$NM" && NM=nm
3251ecce36beSmrgAC_SUBST([NM])
3252ecce36beSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3253ecce36beSmrg
3254ecce36beSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3255ecce36beSmrg  [lt_cv_nm_interface="BSD nm"
3256ecce36beSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
3257ecce36beSmrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3258ecce36beSmrg  (eval "$ac_compile" 2>conftest.err)
3259ecce36beSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3260ecce36beSmrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3261ecce36beSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3262ecce36beSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3263ecce36beSmrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3264ecce36beSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3265ecce36beSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3266ecce36beSmrg    lt_cv_nm_interface="MS dumpbin"
3267ecce36beSmrg  fi
3268ecce36beSmrg  rm -f conftest*])
3269ecce36beSmrg])# LT_PATH_NM
3270ecce36beSmrg
3271ecce36beSmrg# Old names:
3272ecce36beSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3273ecce36beSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3274ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
3275ecce36beSmrgdnl AC_DEFUN([AM_PROG_NM], [])
3276ecce36beSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3277ecce36beSmrg
3278ecce36beSmrg
3279ecce36beSmrg# LT_LIB_M
3280ecce36beSmrg# --------
3281ecce36beSmrg# check for math library
3282ecce36beSmrgAC_DEFUN([LT_LIB_M],
3283ecce36beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3284ecce36beSmrgLIBM=
3285ecce36beSmrgcase $host in
3286ecce36beSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3287ecce36beSmrg  # These system don't have libm, or don't need it
3288ecce36beSmrg  ;;
3289ecce36beSmrg*-ncr-sysv4.3*)
3290ecce36beSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3291ecce36beSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3292ecce36beSmrg  ;;
3293ecce36beSmrg*)
3294ecce36beSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3295ecce36beSmrg  ;;
3296ecce36beSmrgesac
3297ecce36beSmrgAC_SUBST([LIBM])
3298ecce36beSmrg])# LT_LIB_M
3299ecce36beSmrg
3300ecce36beSmrg# Old name:
3301ecce36beSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3302ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
3303ecce36beSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3304ecce36beSmrg
3305ecce36beSmrg
3306ecce36beSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3307ecce36beSmrg# -------------------------------
3308ecce36beSmrgm4_defun([_LT_COMPILER_NO_RTTI],
3309ecce36beSmrg[m4_require([_LT_TAG_COMPILER])dnl
3310ecce36beSmrg
3311ecce36beSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3312ecce36beSmrg
3313ecce36beSmrgif test "$GCC" = yes; then
3314ecce36beSmrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3315ecce36beSmrg
3316ecce36beSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3317ecce36beSmrg    lt_cv_prog_compiler_rtti_exceptions,
3318ecce36beSmrg    [-fno-rtti -fno-exceptions], [],
3319ecce36beSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3320ecce36beSmrgfi
3321ecce36beSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3322ecce36beSmrg	[Compiler flag to turn off builtin functions])
3323ecce36beSmrg])# _LT_COMPILER_NO_RTTI
3324ecce36beSmrg
3325ecce36beSmrg
3326ecce36beSmrg# _LT_CMD_GLOBAL_SYMBOLS
3327ecce36beSmrg# ----------------------
3328ecce36beSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3329ecce36beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3330ecce36beSmrgAC_REQUIRE([AC_PROG_CC])dnl
3331ecce36beSmrgAC_REQUIRE([LT_PATH_NM])dnl
3332ecce36beSmrgAC_REQUIRE([LT_PATH_LD])dnl
3333ecce36beSmrgm4_require([_LT_DECL_SED])dnl
3334ecce36beSmrgm4_require([_LT_DECL_EGREP])dnl
3335ecce36beSmrgm4_require([_LT_TAG_COMPILER])dnl
3336ecce36beSmrg
3337ecce36beSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3338ecce36beSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3339ecce36beSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3340ecce36beSmrg[
3341ecce36beSmrg# These are sane defaults that work on at least a few old systems.
3342ecce36beSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3343ecce36beSmrg
3344ecce36beSmrg# Character class describing NM global symbol codes.
3345ecce36beSmrgsymcode='[[BCDEGRST]]'
3346ecce36beSmrg
3347ecce36beSmrg# Regexp to match symbols that can be accessed directly from C.
3348ecce36beSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3349ecce36beSmrg
3350ecce36beSmrg# Define system-specific variables.
3351ecce36beSmrgcase $host_os in
3352ecce36beSmrgaix*)
3353ecce36beSmrg  symcode='[[BCDT]]'
3354ecce36beSmrg  ;;
3355ecce36beSmrgcygwin* | mingw* | pw32* | cegcc*)
3356ecce36beSmrg  symcode='[[ABCDGISTW]]'
3357ecce36beSmrg  ;;
3358ecce36beSmrghpux*)
3359ecce36beSmrg  if test "$host_cpu" = ia64; then
3360ecce36beSmrg    symcode='[[ABCDEGRST]]'
3361ecce36beSmrg  fi
3362ecce36beSmrg  ;;
3363ecce36beSmrgirix* | nonstopux*)
3364ecce36beSmrg  symcode='[[BCDEGRST]]'
3365ecce36beSmrg  ;;
3366ecce36beSmrgosf*)
3367ecce36beSmrg  symcode='[[BCDEGQRST]]'
3368ecce36beSmrg  ;;
3369ecce36beSmrgsolaris*)
3370ecce36beSmrg  symcode='[[BDRT]]'
3371ecce36beSmrg  ;;
3372ecce36beSmrgsco3.2v5*)
3373ecce36beSmrg  symcode='[[DT]]'
3374ecce36beSmrg  ;;
3375ecce36beSmrgsysv4.2uw2*)
3376ecce36beSmrg  symcode='[[DT]]'
3377ecce36beSmrg  ;;
3378ecce36beSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3379ecce36beSmrg  symcode='[[ABDT]]'
3380ecce36beSmrg  ;;
3381ecce36beSmrgsysv4)
3382ecce36beSmrg  symcode='[[DFNSTU]]'
3383ecce36beSmrg  ;;
3384ecce36beSmrgesac
3385ecce36beSmrg
3386ecce36beSmrg# If we're using GNU nm, then use its standard symbol codes.
3387ecce36beSmrgcase `$NM -V 2>&1` in
3388ecce36beSmrg*GNU* | *'with BFD'*)
3389ecce36beSmrg  symcode='[[ABCDGIRSTW]]' ;;
3390ecce36beSmrgesac
3391ecce36beSmrg
3392ecce36beSmrg# Transform an extracted symbol line into a proper C declaration.
3393ecce36beSmrg# Some systems (esp. on ia64) link data and code symbols differently,
3394ecce36beSmrg# so use this general approach.
3395ecce36beSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3396ecce36beSmrg
3397ecce36beSmrg# Transform an extracted symbol line into symbol name and symbol address
3398ecce36beSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3399ecce36beSmrglt_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'"
3400ecce36beSmrg
3401ecce36beSmrg# Handle CRLF in mingw tool chain
3402ecce36beSmrgopt_cr=
3403ecce36beSmrgcase $build_os in
3404ecce36beSmrgmingw*)
3405ecce36beSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3406ecce36beSmrg  ;;
3407ecce36beSmrgesac
3408ecce36beSmrg
3409ecce36beSmrg# Try without a prefix underscore, then with it.
3410ecce36beSmrgfor ac_symprfx in "" "_"; do
3411ecce36beSmrg
3412ecce36beSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3413ecce36beSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3414ecce36beSmrg
3415ecce36beSmrg  # Write the raw and C identifiers.
3416ecce36beSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3417ecce36beSmrg    # Fake it for dumpbin and say T for any non-static function
3418ecce36beSmrg    # and D for any global variable.
3419ecce36beSmrg    # Also find C++ and __fastcall symbols from MSVC++,
3420ecce36beSmrg    # which start with @ or ?.
3421ecce36beSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3422ecce36beSmrg"     {last_section=section; section=\$ 3};"\
3423ecce36beSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3424ecce36beSmrg"     \$ 0!~/External *\|/{next};"\
3425ecce36beSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3426ecce36beSmrg"     {if(hide[section]) next};"\
3427ecce36beSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3428ecce36beSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3429ecce36beSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3430ecce36beSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3431ecce36beSmrg"     ' prfx=^$ac_symprfx]"
3432ecce36beSmrg  else
3433ecce36beSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3434ecce36beSmrg  fi
3435ecce36beSmrg
3436ecce36beSmrg  # Check to see that the pipe works correctly.
3437ecce36beSmrg  pipe_works=no
3438ecce36beSmrg
3439ecce36beSmrg  rm -f conftest*
3440ecce36beSmrg  cat > conftest.$ac_ext <<_LT_EOF
3441ecce36beSmrg#ifdef __cplusplus
3442ecce36beSmrgextern "C" {
3443ecce36beSmrg#endif
3444ecce36beSmrgchar nm_test_var;
3445ecce36beSmrgvoid nm_test_func(void);
3446ecce36beSmrgvoid nm_test_func(void){}
3447ecce36beSmrg#ifdef __cplusplus
3448ecce36beSmrg}
3449ecce36beSmrg#endif
3450ecce36beSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
3451ecce36beSmrg_LT_EOF
3452ecce36beSmrg
3453ecce36beSmrg  if AC_TRY_EVAL(ac_compile); then
3454ecce36beSmrg    # Now try to grab the symbols.
3455ecce36beSmrg    nlist=conftest.nm
3456ecce36beSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3457ecce36beSmrg      # Try sorting and uniquifying the output.
3458ecce36beSmrg      if sort "$nlist" | uniq > "$nlist"T; then
3459ecce36beSmrg	mv -f "$nlist"T "$nlist"
3460ecce36beSmrg      else
3461ecce36beSmrg	rm -f "$nlist"T
3462ecce36beSmrg      fi
3463ecce36beSmrg
3464ecce36beSmrg      # Make sure that we snagged all the symbols we need.
3465ecce36beSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3466ecce36beSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3467ecce36beSmrg	  cat <<_LT_EOF > conftest.$ac_ext
3468ecce36beSmrg#ifdef __cplusplus
3469ecce36beSmrgextern "C" {
3470ecce36beSmrg#endif
3471ecce36beSmrg
3472ecce36beSmrg_LT_EOF
3473ecce36beSmrg	  # Now generate the symbol file.
3474ecce36beSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3475ecce36beSmrg
3476ecce36beSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
3477ecce36beSmrg
3478ecce36beSmrg/* The mapping between symbol names and symbols.  */
3479ecce36beSmrgconst struct {
3480ecce36beSmrg  const char *name;
3481ecce36beSmrg  void       *address;
3482ecce36beSmrg}
3483ecce36beSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3484ecce36beSmrg{
3485ecce36beSmrg  { "@PROGRAM@", (void *) 0 },
3486ecce36beSmrg_LT_EOF
3487ecce36beSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3488ecce36beSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3489ecce36beSmrg  {0, (void *) 0}
3490ecce36beSmrg};
3491ecce36beSmrg
3492ecce36beSmrg/* This works around a problem in FreeBSD linker */
3493ecce36beSmrg#ifdef FREEBSD_WORKAROUND
3494ecce36beSmrgstatic const void *lt_preloaded_setup() {
3495ecce36beSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
3496ecce36beSmrg}
3497ecce36beSmrg#endif
3498ecce36beSmrg
3499ecce36beSmrg#ifdef __cplusplus
3500ecce36beSmrg}
3501ecce36beSmrg#endif
3502ecce36beSmrg_LT_EOF
3503ecce36beSmrg	  # Now try linking the two files.
3504ecce36beSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
3505ecce36beSmrg	  lt_save_LIBS="$LIBS"
3506ecce36beSmrg	  lt_save_CFLAGS="$CFLAGS"
3507ecce36beSmrg	  LIBS="conftstm.$ac_objext"
3508ecce36beSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3509ecce36beSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3510ecce36beSmrg	    pipe_works=yes
3511ecce36beSmrg	  fi
3512ecce36beSmrg	  LIBS="$lt_save_LIBS"
3513ecce36beSmrg	  CFLAGS="$lt_save_CFLAGS"
3514ecce36beSmrg	else
3515ecce36beSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3516ecce36beSmrg	fi
3517ecce36beSmrg      else
3518ecce36beSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3519ecce36beSmrg      fi
3520ecce36beSmrg    else
3521ecce36beSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3522ecce36beSmrg    fi
3523ecce36beSmrg  else
3524ecce36beSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3525ecce36beSmrg    cat conftest.$ac_ext >&5
3526ecce36beSmrg  fi
3527ecce36beSmrg  rm -rf conftest* conftst*
3528ecce36beSmrg
3529ecce36beSmrg  # Do not use the global_symbol_pipe unless it works.
3530ecce36beSmrg  if test "$pipe_works" = yes; then
3531ecce36beSmrg    break
3532ecce36beSmrg  else
3533ecce36beSmrg    lt_cv_sys_global_symbol_pipe=
3534ecce36beSmrg  fi
3535ecce36beSmrgdone
3536ecce36beSmrg])
3537ecce36beSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3538ecce36beSmrg  lt_cv_sys_global_symbol_to_cdecl=
3539ecce36beSmrgfi
3540ecce36beSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3541ecce36beSmrg  AC_MSG_RESULT(failed)
3542ecce36beSmrgelse
3543ecce36beSmrg  AC_MSG_RESULT(ok)
3544ecce36beSmrgfi
3545ecce36beSmrg
3546ecce36beSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3547ecce36beSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
3548ecce36beSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3549ecce36beSmrg    [Transform the output of nm in a proper C declaration])
3550ecce36beSmrg_LT_DECL([global_symbol_to_c_name_address],
3551ecce36beSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3552ecce36beSmrg    [Transform the output of nm in a C name address pair])
3553ecce36beSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3554ecce36beSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3555ecce36beSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3556ecce36beSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
3557ecce36beSmrg
3558ecce36beSmrg
3559ecce36beSmrg# _LT_COMPILER_PIC([TAGNAME])
3560ecce36beSmrg# ---------------------------
3561ecce36beSmrgm4_defun([_LT_COMPILER_PIC],
3562ecce36beSmrg[m4_require([_LT_TAG_COMPILER])dnl
3563ecce36beSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3564ecce36beSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3565ecce36beSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3566ecce36beSmrg
3567ecce36beSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3568ecce36beSmrgm4_if([$1], [CXX], [
3569ecce36beSmrg  # C++ specific cases for pic, static, wl, etc.
3570ecce36beSmrg  if test "$GXX" = yes; then
3571ecce36beSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3572ecce36beSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3573ecce36beSmrg
3574ecce36beSmrg    case $host_os in
3575ecce36beSmrg    aix*)
3576ecce36beSmrg      # All AIX code is PIC.
3577ecce36beSmrg      if test "$host_cpu" = ia64; then
3578ecce36beSmrg	# AIX 5 now supports IA64 processor
3579ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3580ecce36beSmrg      fi
3581ecce36beSmrg      ;;
3582ecce36beSmrg
3583ecce36beSmrg    amigaos*)
3584ecce36beSmrg      case $host_cpu in
3585ecce36beSmrg      powerpc)
3586ecce36beSmrg            # see comment about AmigaOS4 .so support
3587ecce36beSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3588ecce36beSmrg        ;;
3589ecce36beSmrg      m68k)
3590ecce36beSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3591ecce36beSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3592ecce36beSmrg            # like `-m68040'.
3593ecce36beSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3594ecce36beSmrg        ;;
3595ecce36beSmrg      esac
3596ecce36beSmrg      ;;
3597ecce36beSmrg
3598ecce36beSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3599ecce36beSmrg      # PIC is the default for these OSes.
3600ecce36beSmrg      ;;
3601ecce36beSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3602ecce36beSmrg      # This hack is so that the source file can tell whether it is being
3603ecce36beSmrg      # built for inclusion in a dll (and should export symbols for example).
3604ecce36beSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3605ecce36beSmrg      # (--disable-auto-import) libraries
3606ecce36beSmrg      m4_if([$1], [GCJ], [],
3607ecce36beSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3608ecce36beSmrg      ;;
3609ecce36beSmrg    darwin* | rhapsody*)
3610ecce36beSmrg      # PIC is the default on this platform
3611ecce36beSmrg      # Common symbols not allowed in MH_DYLIB files
3612ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3613ecce36beSmrg      ;;
3614ecce36beSmrg    *djgpp*)
3615ecce36beSmrg      # DJGPP does not support shared libraries at all
3616ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3617ecce36beSmrg      ;;
3618ecce36beSmrg    interix[[3-9]]*)
3619ecce36beSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3620ecce36beSmrg      # Instead, we relocate shared libraries at runtime.
3621ecce36beSmrg      ;;
3622ecce36beSmrg    sysv4*MP*)
3623ecce36beSmrg      if test -d /usr/nec; then
3624ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3625ecce36beSmrg      fi
3626ecce36beSmrg      ;;
3627ecce36beSmrg    hpux*)
3628ecce36beSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3629ecce36beSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3630ecce36beSmrg      # sets the default TLS model and affects inlining.
3631ecce36beSmrg      case $host_cpu in
3632ecce36beSmrg      hppa*64*)
3633ecce36beSmrg	;;
3634ecce36beSmrg      *)
3635ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3636ecce36beSmrg	;;
3637ecce36beSmrg      esac
3638ecce36beSmrg      ;;
3639ecce36beSmrg    *qnx* | *nto*)
3640ecce36beSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3641ecce36beSmrg      # it will coredump.
3642ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3643ecce36beSmrg      ;;
3644ecce36beSmrg    *)
3645ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3646ecce36beSmrg      ;;
3647ecce36beSmrg    esac
3648ecce36beSmrg  else
3649ecce36beSmrg    case $host_os in
3650ecce36beSmrg      aix[[4-9]]*)
3651ecce36beSmrg	# All AIX code is PIC.
3652ecce36beSmrg	if test "$host_cpu" = ia64; then
3653ecce36beSmrg	  # AIX 5 now supports IA64 processor
3654ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3655ecce36beSmrg	else
3656ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3657ecce36beSmrg	fi
3658ecce36beSmrg	;;
3659ecce36beSmrg      chorus*)
3660ecce36beSmrg	case $cc_basename in
3661ecce36beSmrg	cxch68*)
3662ecce36beSmrg	  # Green Hills C++ Compiler
3663ecce36beSmrg	  # _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"
3664ecce36beSmrg	  ;;
3665ecce36beSmrg	esac
3666ecce36beSmrg	;;
3667ecce36beSmrg      dgux*)
3668ecce36beSmrg	case $cc_basename in
3669ecce36beSmrg	  ec++*)
3670ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3671ecce36beSmrg	    ;;
3672ecce36beSmrg	  ghcx*)
3673ecce36beSmrg	    # Green Hills C++ Compiler
3674ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3675ecce36beSmrg	    ;;
3676ecce36beSmrg	  *)
3677ecce36beSmrg	    ;;
3678ecce36beSmrg	esac
3679ecce36beSmrg	;;
3680ecce36beSmrg      freebsd* | dragonfly*)
3681ecce36beSmrg	# FreeBSD uses GNU C++
3682ecce36beSmrg	;;
3683ecce36beSmrg      hpux9* | hpux10* | hpux11*)
3684ecce36beSmrg	case $cc_basename in
3685ecce36beSmrg	  CC*)
3686ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3687ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3688ecce36beSmrg	    if test "$host_cpu" != ia64; then
3689ecce36beSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3690ecce36beSmrg	    fi
3691ecce36beSmrg	    ;;
3692ecce36beSmrg	  aCC*)
3693ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3694ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3695ecce36beSmrg	    case $host_cpu in
3696ecce36beSmrg	    hppa*64*|ia64*)
3697ecce36beSmrg	      # +Z the default
3698ecce36beSmrg	      ;;
3699ecce36beSmrg	    *)
3700ecce36beSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3701ecce36beSmrg	      ;;
3702ecce36beSmrg	    esac
3703ecce36beSmrg	    ;;
3704ecce36beSmrg	  *)
3705ecce36beSmrg	    ;;
3706ecce36beSmrg	esac
3707ecce36beSmrg	;;
3708ecce36beSmrg      interix*)
3709ecce36beSmrg	# This is c89, which is MS Visual C++ (no shared libs)
3710ecce36beSmrg	# Anyone wants to do a port?
3711ecce36beSmrg	;;
3712ecce36beSmrg      irix5* | irix6* | nonstopux*)
3713ecce36beSmrg	case $cc_basename in
3714ecce36beSmrg	  CC*)
3715ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3716ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3717ecce36beSmrg	    # CC pic flag -KPIC is the default.
3718ecce36beSmrg	    ;;
3719ecce36beSmrg	  *)
3720ecce36beSmrg	    ;;
3721ecce36beSmrg	esac
3722ecce36beSmrg	;;
3723ecce36beSmrg      linux* | k*bsd*-gnu)
3724ecce36beSmrg	case $cc_basename in
3725ecce36beSmrg	  KCC*)
3726ecce36beSmrg	    # KAI C++ Compiler
3727ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3728ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3729ecce36beSmrg	    ;;
3730ecce36beSmrg	  ecpc* )
3731ecce36beSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3732ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3733ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3734ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3735ecce36beSmrg	    ;;
3736ecce36beSmrg	  icpc* )
3737ecce36beSmrg	    # Intel C++, used to be incompatible with GCC.
3738ecce36beSmrg	    # ICC 10 doesn't accept -KPIC any more.
3739ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3740ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3741ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3742ecce36beSmrg	    ;;
3743ecce36beSmrg	  pgCC* | pgcpp*)
3744ecce36beSmrg	    # Portland Group C++ compiler
3745ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3746ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3747ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3748ecce36beSmrg	    ;;
3749ecce36beSmrg	  cxx*)
3750ecce36beSmrg	    # Compaq C++
3751ecce36beSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3752ecce36beSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3753ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3754ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3755ecce36beSmrg	    ;;
3756ecce36beSmrg	  xlc* | xlC*)
3757ecce36beSmrg	    # IBM XL 8.0 on PPC
3758ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3759ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3760ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3761ecce36beSmrg	    ;;
3762ecce36beSmrg	  *)
3763ecce36beSmrg	    case `$CC -V 2>&1 | sed 5q` in
3764ecce36beSmrg	    *Sun\ C*)
3765ecce36beSmrg	      # Sun C++ 5.9
3766ecce36beSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3767ecce36beSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3768ecce36beSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3769ecce36beSmrg	      ;;
3770ecce36beSmrg	    esac
3771ecce36beSmrg	    ;;
3772ecce36beSmrg	esac
3773ecce36beSmrg	;;
3774ecce36beSmrg      lynxos*)
3775ecce36beSmrg	;;
3776ecce36beSmrg      m88k*)
3777ecce36beSmrg	;;
3778ecce36beSmrg      mvs*)
3779ecce36beSmrg	case $cc_basename in
3780ecce36beSmrg	  cxx*)
3781ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3782ecce36beSmrg	    ;;
3783ecce36beSmrg	  *)
3784ecce36beSmrg	    ;;
3785ecce36beSmrg	esac
3786ecce36beSmrg	;;
3787ecce36beSmrg      netbsd* | netbsdelf*-gnu)
3788ecce36beSmrg	;;
3789ecce36beSmrg      *qnx* | *nto*)
3790ecce36beSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3791ecce36beSmrg        # it will coredump.
3792ecce36beSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3793ecce36beSmrg        ;;
3794ecce36beSmrg      osf3* | osf4* | osf5*)
3795ecce36beSmrg	case $cc_basename in
3796ecce36beSmrg	  KCC*)
3797ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3798ecce36beSmrg	    ;;
3799ecce36beSmrg	  RCC*)
3800ecce36beSmrg	    # Rational C++ 2.4.1
3801ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3802ecce36beSmrg	    ;;
3803ecce36beSmrg	  cxx*)
3804ecce36beSmrg	    # Digital/Compaq C++
3805ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3806ecce36beSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3807ecce36beSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3808ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3809ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3810ecce36beSmrg	    ;;
3811ecce36beSmrg	  *)
3812ecce36beSmrg	    ;;
3813ecce36beSmrg	esac
3814ecce36beSmrg	;;
3815ecce36beSmrg      psos*)
3816ecce36beSmrg	;;
3817ecce36beSmrg      solaris*)
3818ecce36beSmrg	case $cc_basename in
3819ecce36beSmrg	  CC*)
3820ecce36beSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
3821ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3822ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3823ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3824ecce36beSmrg	    ;;
3825ecce36beSmrg	  gcx*)
3826ecce36beSmrg	    # Green Hills C++ Compiler
3827ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3828ecce36beSmrg	    ;;
3829ecce36beSmrg	  *)
3830ecce36beSmrg	    ;;
3831ecce36beSmrg	esac
3832ecce36beSmrg	;;
3833ecce36beSmrg      sunos4*)
3834ecce36beSmrg	case $cc_basename in
3835ecce36beSmrg	  CC*)
3836ecce36beSmrg	    # Sun C++ 4.x
3837ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3838ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3839ecce36beSmrg	    ;;
3840ecce36beSmrg	  lcc*)
3841ecce36beSmrg	    # Lucid
3842ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3843ecce36beSmrg	    ;;
3844ecce36beSmrg	  *)
3845ecce36beSmrg	    ;;
3846ecce36beSmrg	esac
3847ecce36beSmrg	;;
3848ecce36beSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3849ecce36beSmrg	case $cc_basename in
3850ecce36beSmrg	  CC*)
3851ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3852ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3854ecce36beSmrg	    ;;
3855ecce36beSmrg	esac
3856ecce36beSmrg	;;
3857ecce36beSmrg      tandem*)
3858ecce36beSmrg	case $cc_basename in
3859ecce36beSmrg	  NCC*)
3860ecce36beSmrg	    # NonStop-UX NCC 3.20
3861ecce36beSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3862ecce36beSmrg	    ;;
3863ecce36beSmrg	  *)
3864ecce36beSmrg	    ;;
3865ecce36beSmrg	esac
3866ecce36beSmrg	;;
3867ecce36beSmrg      vxworks*)
3868ecce36beSmrg	;;
3869ecce36beSmrg      *)
3870ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3871ecce36beSmrg	;;
3872ecce36beSmrg    esac
3873ecce36beSmrg  fi
3874ecce36beSmrg],
3875ecce36beSmrg[
3876ecce36beSmrg  if test "$GCC" = yes; then
3877ecce36beSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3878ecce36beSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3879ecce36beSmrg
3880ecce36beSmrg    case $host_os in
3881ecce36beSmrg      aix*)
3882ecce36beSmrg      # All AIX code is PIC.
3883ecce36beSmrg      if test "$host_cpu" = ia64; then
3884ecce36beSmrg	# AIX 5 now supports IA64 processor
3885ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3886ecce36beSmrg      fi
3887ecce36beSmrg      ;;
3888ecce36beSmrg
3889ecce36beSmrg    amigaos*)
3890ecce36beSmrg      case $host_cpu in
3891ecce36beSmrg      powerpc)
3892ecce36beSmrg            # see comment about AmigaOS4 .so support
3893ecce36beSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3894ecce36beSmrg        ;;
3895ecce36beSmrg      m68k)
3896ecce36beSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3897ecce36beSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3898ecce36beSmrg            # like `-m68040'.
3899ecce36beSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3900ecce36beSmrg        ;;
3901ecce36beSmrg      esac
3902ecce36beSmrg      ;;
3903ecce36beSmrg
3904ecce36beSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3905ecce36beSmrg      # PIC is the default for these OSes.
3906ecce36beSmrg      ;;
3907ecce36beSmrg
3908ecce36beSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3909ecce36beSmrg      # This hack is so that the source file can tell whether it is being
3910ecce36beSmrg      # built for inclusion in a dll (and should export symbols for example).
3911ecce36beSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3912ecce36beSmrg      # (--disable-auto-import) libraries
3913ecce36beSmrg      m4_if([$1], [GCJ], [],
3914ecce36beSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3915ecce36beSmrg      ;;
3916ecce36beSmrg
3917ecce36beSmrg    darwin* | rhapsody*)
3918ecce36beSmrg      # PIC is the default on this platform
3919ecce36beSmrg      # Common symbols not allowed in MH_DYLIB files
3920ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3921ecce36beSmrg      ;;
3922ecce36beSmrg
3923ecce36beSmrg    hpux*)
3924ecce36beSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3925ecce36beSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3926ecce36beSmrg      # sets the default TLS model and affects inlining.
3927ecce36beSmrg      case $host_cpu in
3928ecce36beSmrg      hppa*64*)
3929ecce36beSmrg	# +Z the default
3930ecce36beSmrg	;;
3931ecce36beSmrg      *)
3932ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3933ecce36beSmrg	;;
3934ecce36beSmrg      esac
3935ecce36beSmrg      ;;
3936ecce36beSmrg
3937ecce36beSmrg    interix[[3-9]]*)
3938ecce36beSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3939ecce36beSmrg      # Instead, we relocate shared libraries at runtime.
3940ecce36beSmrg      ;;
3941ecce36beSmrg
3942ecce36beSmrg    msdosdjgpp*)
3943ecce36beSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3944ecce36beSmrg      # on systems that don't support them.
3945ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3946ecce36beSmrg      enable_shared=no
3947ecce36beSmrg      ;;
3948ecce36beSmrg
3949ecce36beSmrg    *nto* | *qnx*)
3950ecce36beSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3951ecce36beSmrg      # it will coredump.
3952ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3953ecce36beSmrg      ;;
3954ecce36beSmrg
3955ecce36beSmrg    sysv4*MP*)
3956ecce36beSmrg      if test -d /usr/nec; then
3957ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3958ecce36beSmrg      fi
3959ecce36beSmrg      ;;
3960ecce36beSmrg
3961ecce36beSmrg    *)
3962ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3963ecce36beSmrg      ;;
3964ecce36beSmrg    esac
3965ecce36beSmrg  else
3966ecce36beSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
3967ecce36beSmrg    case $host_os in
3968ecce36beSmrg    aix*)
3969ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3970ecce36beSmrg      if test "$host_cpu" = ia64; then
3971ecce36beSmrg	# AIX 5 now supports IA64 processor
3972ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3973ecce36beSmrg      else
3974ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3975ecce36beSmrg      fi
3976ecce36beSmrg      ;;
3977ecce36beSmrg
3978ecce36beSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3979ecce36beSmrg      # This hack is so that the source file can tell whether it is being
3980ecce36beSmrg      # built for inclusion in a dll (and should export symbols for example).
3981ecce36beSmrg      m4_if([$1], [GCJ], [],
3982ecce36beSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3983ecce36beSmrg      ;;
3984ecce36beSmrg
3985ecce36beSmrg    hpux9* | hpux10* | hpux11*)
3986ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3987ecce36beSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3988ecce36beSmrg      # not for PA HP-UX.
3989ecce36beSmrg      case $host_cpu in
3990ecce36beSmrg      hppa*64*|ia64*)
3991ecce36beSmrg	# +Z the default
3992ecce36beSmrg	;;
3993ecce36beSmrg      *)
3994ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3995ecce36beSmrg	;;
3996ecce36beSmrg      esac
3997ecce36beSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3998ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3999ecce36beSmrg      ;;
4000ecce36beSmrg
4001ecce36beSmrg    irix5* | irix6* | nonstopux*)
4002ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003ecce36beSmrg      # PIC (with -KPIC) is the default.
4004ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4005ecce36beSmrg      ;;
4006ecce36beSmrg
4007ecce36beSmrg    linux* | k*bsd*-gnu)
4008ecce36beSmrg      case $cc_basename in
4009ecce36beSmrg      # old Intel for x86_64 which still supported -KPIC.
4010ecce36beSmrg      ecc*)
4011ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4012ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4013ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4014ecce36beSmrg        ;;
4015ecce36beSmrg      # icc used to be incompatible with GCC.
4016ecce36beSmrg      # ICC 10 doesn't accept -KPIC any more.
4017ecce36beSmrg      icc* | ifort*)
4018ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4019ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4020ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4021ecce36beSmrg        ;;
4022ecce36beSmrg      # Lahey Fortran 8.1.
4023ecce36beSmrg      lf95*)
4024ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4025ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4026ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4027ecce36beSmrg	;;
4028ecce36beSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
4029ecce36beSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4030ecce36beSmrg	# which looks to be a dead project)
4031ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4032ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4033ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4034ecce36beSmrg        ;;
4035ecce36beSmrg      ccc*)
4036ecce36beSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4037ecce36beSmrg        # All Alpha code is PIC.
4038ecce36beSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4039ecce36beSmrg        ;;
4040ecce36beSmrg      xl*)
4041ecce36beSmrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4042ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4043ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4044ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4045ecce36beSmrg	;;
4046ecce36beSmrg      *)
4047ecce36beSmrg	case `$CC -V 2>&1 | sed 5q` in
4048ecce36beSmrg	*Sun\ C*)
4049ecce36beSmrg	  # Sun C 5.9
4050ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4051ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4052ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4053ecce36beSmrg	  ;;
4054ecce36beSmrg	*Sun\ F*)
4055ecce36beSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4056ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4057ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4058ecce36beSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4059ecce36beSmrg	  ;;
4060ecce36beSmrg	esac
4061ecce36beSmrg	;;
4062ecce36beSmrg      esac
4063ecce36beSmrg      ;;
4064ecce36beSmrg
4065ecce36beSmrg    newsos6)
4066ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4067ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4068ecce36beSmrg      ;;
4069ecce36beSmrg
4070ecce36beSmrg    *nto* | *qnx*)
4071ecce36beSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4072ecce36beSmrg      # it will coredump.
4073ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4074ecce36beSmrg      ;;
4075ecce36beSmrg
4076ecce36beSmrg    osf3* | osf4* | osf5*)
4077ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4078ecce36beSmrg      # All OSF/1 code is PIC.
4079ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4080ecce36beSmrg      ;;
4081ecce36beSmrg
4082ecce36beSmrg    rdos*)
4083ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4084ecce36beSmrg      ;;
4085ecce36beSmrg
4086ecce36beSmrg    solaris*)
4087ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4088ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4089ecce36beSmrg      case $cc_basename in
4090ecce36beSmrg      f77* | f90* | f95*)
4091ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4092ecce36beSmrg      *)
4093ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4094ecce36beSmrg      esac
4095ecce36beSmrg      ;;
4096ecce36beSmrg
4097ecce36beSmrg    sunos4*)
4098ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4099ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4100ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4101ecce36beSmrg      ;;
4102ecce36beSmrg
4103ecce36beSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4104ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4105ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4106ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4107ecce36beSmrg      ;;
4108ecce36beSmrg
4109ecce36beSmrg    sysv4*MP*)
4110ecce36beSmrg      if test -d /usr/nec ;then
4111ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4112ecce36beSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4113ecce36beSmrg      fi
4114ecce36beSmrg      ;;
4115ecce36beSmrg
4116ecce36beSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4117ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4118ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4119ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4120ecce36beSmrg      ;;
4121ecce36beSmrg
4122ecce36beSmrg    unicos*)
4123ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4124ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4125ecce36beSmrg      ;;
4126ecce36beSmrg
4127ecce36beSmrg    uts4*)
4128ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4129ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4130ecce36beSmrg      ;;
4131ecce36beSmrg
4132ecce36beSmrg    *)
4133ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4134ecce36beSmrg      ;;
4135ecce36beSmrg    esac
4136ecce36beSmrg  fi
4137ecce36beSmrg])
4138ecce36beSmrgcase $host_os in
4139ecce36beSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
4140ecce36beSmrg  *djgpp*)
4141ecce36beSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4142ecce36beSmrg    ;;
4143ecce36beSmrg  *)
4144ecce36beSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4145ecce36beSmrg    ;;
4146ecce36beSmrgesac
4147ecce36beSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4148ecce36beSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4149ecce36beSmrg	[How to pass a linker flag through the compiler])
4150ecce36beSmrg
4151ecce36beSmrg#
4152ecce36beSmrg# Check to make sure the PIC flag actually works.
4153ecce36beSmrg#
4154ecce36beSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4155ecce36beSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4156ecce36beSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4157ecce36beSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4158ecce36beSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4159ecce36beSmrg     "" | " "*) ;;
4160ecce36beSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4161ecce36beSmrg     esac],
4162ecce36beSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4163ecce36beSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4164ecce36beSmrgfi
4165ecce36beSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4166ecce36beSmrg	[Additional compiler flags for building library objects])
4167ecce36beSmrg
4168ecce36beSmrg#
4169ecce36beSmrg# Check to make sure the static flag actually works.
4170ecce36beSmrg#
4171ecce36beSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4172ecce36beSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4173ecce36beSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4174ecce36beSmrg  $lt_tmp_static_flag,
4175ecce36beSmrg  [],
4176ecce36beSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4177ecce36beSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4178ecce36beSmrg	[Compiler flag to prevent dynamic linking])
4179ecce36beSmrg])# _LT_COMPILER_PIC
4180ecce36beSmrg
4181ecce36beSmrg
4182ecce36beSmrg# _LT_LINKER_SHLIBS([TAGNAME])
4183ecce36beSmrg# ----------------------------
4184ecce36beSmrg# See if the linker supports building shared libraries.
4185ecce36beSmrgm4_defun([_LT_LINKER_SHLIBS],
4186ecce36beSmrg[AC_REQUIRE([LT_PATH_LD])dnl
4187ecce36beSmrgAC_REQUIRE([LT_PATH_NM])dnl
4188ecce36beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4189ecce36beSmrgm4_require([_LT_DECL_EGREP])dnl
4190ecce36beSmrgm4_require([_LT_DECL_SED])dnl
4191ecce36beSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4192ecce36beSmrgm4_require([_LT_TAG_COMPILER])dnl
4193ecce36beSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4194ecce36beSmrgm4_if([$1], [CXX], [
4195ecce36beSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4196ecce36beSmrg  case $host_os in
4197ecce36beSmrg  aix[[4-9]]*)
4198ecce36beSmrg    # If we're using GNU nm, then we don't want the "-C" option.
4199ecce36beSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4200ecce36beSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4201ecce36beSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4202ecce36beSmrg    else
4203ecce36beSmrg      _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'
4204ecce36beSmrg    fi
4205ecce36beSmrg    ;;
4206ecce36beSmrg  pw32*)
4207ecce36beSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4208ecce36beSmrg  ;;
4209ecce36beSmrg  cygwin* | mingw* | cegcc*)
4210ecce36beSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4211ecce36beSmrg  ;;
4212ecce36beSmrg  linux* | k*bsd*-gnu)
4213ecce36beSmrg    _LT_TAGVAR(link_all_deplibs, $1)=no
4214ecce36beSmrg  ;;
4215ecce36beSmrg  *)
4216ecce36beSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4217ecce36beSmrg  ;;
4218ecce36beSmrg  esac
4219ecce36beSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4220ecce36beSmrg], [
4221ecce36beSmrg  runpath_var=
4222ecce36beSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4223ecce36beSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
4224ecce36beSmrg  _LT_TAGVAR(archive_cmds, $1)=
4225ecce36beSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4226ecce36beSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4227ecce36beSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4228ecce36beSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4229ecce36beSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4230ecce36beSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4231ecce36beSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
4232ecce36beSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4233ecce36beSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4234ecce36beSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4235ecce36beSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4236ecce36beSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4237ecce36beSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4238ecce36beSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
4239ecce36beSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4240ecce36beSmrg  _LT_TAGVAR(module_cmds, $1)=
4241ecce36beSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4242ecce36beSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4243ecce36beSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4244ecce36beSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4245ecce36beSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4246ecce36beSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
4247ecce36beSmrg  # included in the symbol list
4248ecce36beSmrg  _LT_TAGVAR(include_expsyms, $1)=
4249ecce36beSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4250ecce36beSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4251ecce36beSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4252ecce36beSmrg  # as well as any symbol that contains `d'.
4253ecce36beSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4254ecce36beSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4255ecce36beSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4256ecce36beSmrg  # the symbol is explicitly referenced.  Since portable code cannot
4257ecce36beSmrg  # rely on this symbol name, it's probably fine to never include it in
4258ecce36beSmrg  # preloaded symbol tables.
4259ecce36beSmrg  # Exclude shared library initialization/finalization symbols.
4260ecce36beSmrgdnl Note also adjust exclude_expsyms for C++ above.
4261ecce36beSmrg  extract_expsyms_cmds=
4262ecce36beSmrg
4263ecce36beSmrg  case $host_os in
4264ecce36beSmrg  cygwin* | mingw* | pw32* | cegcc*)
4265ecce36beSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4266ecce36beSmrg    # When not using gcc, we currently assume that we are using
4267ecce36beSmrg    # Microsoft Visual C++.
4268ecce36beSmrg    if test "$GCC" != yes; then
4269ecce36beSmrg      with_gnu_ld=no
4270ecce36beSmrg    fi
4271ecce36beSmrg    ;;
4272ecce36beSmrg  interix*)
4273ecce36beSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4274ecce36beSmrg    with_gnu_ld=yes
4275ecce36beSmrg    ;;
4276ecce36beSmrg  openbsd*)
4277ecce36beSmrg    with_gnu_ld=no
4278ecce36beSmrg    ;;
4279ecce36beSmrg  linux* | k*bsd*-gnu)
4280ecce36beSmrg    _LT_TAGVAR(link_all_deplibs, $1)=no
4281ecce36beSmrg    ;;
4282ecce36beSmrg  esac
4283ecce36beSmrg
4284ecce36beSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4285ecce36beSmrg  if test "$with_gnu_ld" = yes; then
4286ecce36beSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4287ecce36beSmrg    wlarc='${wl}'
4288ecce36beSmrg
4289ecce36beSmrg    # Set some defaults for GNU ld with shared library support. These
4290ecce36beSmrg    # are reset later if shared libraries are not supported. Putting them
4291ecce36beSmrg    # here allows them to be overridden if necessary.
4292ecce36beSmrg    runpath_var=LD_RUN_PATH
4293ecce36beSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4294ecce36beSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4295ecce36beSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4296ecce36beSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4297ecce36beSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4298ecce36beSmrg    else
4299ecce36beSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4300ecce36beSmrg    fi
4301ecce36beSmrg    supports_anon_versioning=no
4302ecce36beSmrg    case `$LD -v 2>&1` in
4303ecce36beSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4304ecce36beSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4305ecce36beSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4306ecce36beSmrg      *\ 2.11.*) ;; # other 2.11 versions
4307ecce36beSmrg      *) supports_anon_versioning=yes ;;
4308ecce36beSmrg    esac
4309ecce36beSmrg
4310ecce36beSmrg    # See if GNU ld supports shared libraries.
4311ecce36beSmrg    case $host_os in
4312ecce36beSmrg    aix[[3-9]]*)
4313ecce36beSmrg      # On AIX/PPC, the GNU linker is very broken
4314ecce36beSmrg      if test "$host_cpu" != ia64; then
4315ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4316ecce36beSmrg	cat <<_LT_EOF 1>&2
4317ecce36beSmrg
4318ecce36beSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4319ecce36beSmrg*** to be unable to reliably create shared libraries on AIX.
4320ecce36beSmrg*** Therefore, libtool is disabling shared libraries support.  If you
4321ecce36beSmrg*** really care for shared libraries, you may want to modify your PATH
4322ecce36beSmrg*** so that a non-GNU linker is found, and then restart.
4323ecce36beSmrg
4324ecce36beSmrg_LT_EOF
4325ecce36beSmrg      fi
4326ecce36beSmrg      ;;
4327ecce36beSmrg
4328ecce36beSmrg    amigaos*)
4329ecce36beSmrg      case $host_cpu in
4330ecce36beSmrg      powerpc)
4331ecce36beSmrg            # see comment about AmigaOS4 .so support
4332ecce36beSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4333ecce36beSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4334ecce36beSmrg        ;;
4335ecce36beSmrg      m68k)
4336ecce36beSmrg            _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)'
4337ecce36beSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4338ecce36beSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4339ecce36beSmrg        ;;
4340ecce36beSmrg      esac
4341ecce36beSmrg      ;;
4342ecce36beSmrg
4343ecce36beSmrg    beos*)
4344ecce36beSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4345ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4346ecce36beSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4347ecce36beSmrg	# support --undefined.  This deserves some investigation.  FIXME
4348ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4349ecce36beSmrg      else
4350ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4351ecce36beSmrg      fi
4352ecce36beSmrg      ;;
4353ecce36beSmrg
4354ecce36beSmrg    cygwin* | mingw* | pw32* | cegcc*)
4355ecce36beSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4356ecce36beSmrg      # as there is no search path for DLLs.
4357ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4358ecce36beSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4359ecce36beSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
4360ecce36beSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4361ecce36beSmrg      _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'
4362ecce36beSmrg
4363ecce36beSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4364ecce36beSmrg        _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'
4365ecce36beSmrg	# If the export-symbols file already is a .def file (1st line
4366ecce36beSmrg	# is EXPORTS), use it as is; otherwise, prepend...
4367ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4368ecce36beSmrg	  cp $export_symbols $output_objdir/$soname.def;
4369ecce36beSmrg	else
4370ecce36beSmrg	  echo EXPORTS > $output_objdir/$soname.def;
4371ecce36beSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
4372ecce36beSmrg	fi~
4373ecce36beSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4374ecce36beSmrg      else
4375ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4376ecce36beSmrg      fi
4377ecce36beSmrg      ;;
4378ecce36beSmrg
4379ecce36beSmrg    interix[[3-9]]*)
4380ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
4381ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4382ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4383ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4384ecce36beSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4385ecce36beSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4386ecce36beSmrg      # default) and relocated if they conflict, which is a slow very memory
4387ecce36beSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4388ecce36beSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4389ecce36beSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4390ecce36beSmrg      _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'
4391ecce36beSmrg      _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'
4392ecce36beSmrg      ;;
4393ecce36beSmrg
4394ecce36beSmrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4395ecce36beSmrg      tmp_diet=no
4396ecce36beSmrg      if test "$host_os" = linux-dietlibc; then
4397ecce36beSmrg	case $cc_basename in
4398ecce36beSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4399ecce36beSmrg	esac
4400ecce36beSmrg      fi
4401ecce36beSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4402ecce36beSmrg	 && test "$tmp_diet" = no
4403ecce36beSmrg      then
4404ecce36beSmrg	tmp_addflag=
4405ecce36beSmrg	tmp_sharedflag='-shared'
4406ecce36beSmrg	case $cc_basename,$host_cpu in
4407ecce36beSmrg        pgcc*)				# Portland Group C compiler
4408ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4409ecce36beSmrg	  tmp_addflag=' $pic_flag'
4410ecce36beSmrg	  ;;
4411ecce36beSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4412ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4413ecce36beSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4414ecce36beSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4415ecce36beSmrg	  tmp_addflag=' -i_dynamic' ;;
4416ecce36beSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4417ecce36beSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4418ecce36beSmrg	ifc* | ifort*)			# Intel Fortran compiler
4419ecce36beSmrg	  tmp_addflag=' -nofor_main' ;;
4420ecce36beSmrg	lf95*)				# Lahey Fortran 8.1
4421ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4422ecce36beSmrg	  tmp_sharedflag='--shared' ;;
4423ecce36beSmrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4424ecce36beSmrg	  tmp_sharedflag='-qmkshrobj'
4425ecce36beSmrg	  tmp_addflag= ;;
4426ecce36beSmrg	esac
4427ecce36beSmrg	case `$CC -V 2>&1 | sed 5q` in
4428ecce36beSmrg	*Sun\ C*)			# Sun C 5.9
4429ecce36beSmrg	  _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4430ecce36beSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4431ecce36beSmrg	  tmp_sharedflag='-G' ;;
4432ecce36beSmrg	*Sun\ F*)			# Sun Fortran 8.3
4433ecce36beSmrg	  tmp_sharedflag='-G' ;;
4434ecce36beSmrg	esac
4435ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4436ecce36beSmrg
4437ecce36beSmrg        if test "x$supports_anon_versioning" = xyes; then
4438ecce36beSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4439ecce36beSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4440ecce36beSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4441ecce36beSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4442ecce36beSmrg        fi
4443ecce36beSmrg
4444ecce36beSmrg	case $cc_basename in
4445ecce36beSmrg	xlf*)
4446ecce36beSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4447ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4448ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4449ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4450ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4451ecce36beSmrg	  if test "x$supports_anon_versioning" = xyes; then
4452ecce36beSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4453ecce36beSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4454ecce36beSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4455ecce36beSmrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4456ecce36beSmrg	  fi
4457ecce36beSmrg	  ;;
4458ecce36beSmrg	esac
4459ecce36beSmrg      else
4460ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
4461ecce36beSmrg      fi
4462ecce36beSmrg      ;;
4463ecce36beSmrg
4464ecce36beSmrg    netbsd* | netbsdelf*-gnu)
4465ecce36beSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4466ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4467ecce36beSmrg	wlarc=
4468ecce36beSmrg      else
4469ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4470ecce36beSmrg	_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'
4471ecce36beSmrg      fi
4472ecce36beSmrg      ;;
4473ecce36beSmrg
4474ecce36beSmrg    solaris*)
4475ecce36beSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4476ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4477ecce36beSmrg	cat <<_LT_EOF 1>&2
4478ecce36beSmrg
4479ecce36beSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4480ecce36beSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
4481ecce36beSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4482ecce36beSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4483ecce36beSmrg*** your PATH or compiler configuration so that the native linker is
4484ecce36beSmrg*** used, and then restart.
4485ecce36beSmrg
4486ecce36beSmrg_LT_EOF
4487ecce36beSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4488ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4489ecce36beSmrg	_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'
4490ecce36beSmrg      else
4491ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4492ecce36beSmrg      fi
4493ecce36beSmrg      ;;
4494ecce36beSmrg
4495ecce36beSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4496ecce36beSmrg      case `$LD -v 2>&1` in
4497ecce36beSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4498ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4499ecce36beSmrg	cat <<_LT_EOF 1>&2
4500ecce36beSmrg
4501ecce36beSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4502ecce36beSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4503ecce36beSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4504ecce36beSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4505ecce36beSmrg*** your PATH or compiler configuration so that the native linker is
4506ecce36beSmrg*** used, and then restart.
4507ecce36beSmrg
4508ecce36beSmrg_LT_EOF
4509ecce36beSmrg	;;
4510ecce36beSmrg	*)
4511ecce36beSmrg	  # For security reasons, it is highly recommended that you always
4512ecce36beSmrg	  # use absolute paths for naming shared libraries, and exclude the
4513ecce36beSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4514ecce36beSmrg	  # requires that you compile everything twice, which is a pain.
4515ecce36beSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4516ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4517ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4518ecce36beSmrg	    _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'
4519ecce36beSmrg	  else
4520ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4521ecce36beSmrg	  fi
4522ecce36beSmrg	;;
4523ecce36beSmrg      esac
4524ecce36beSmrg      ;;
4525ecce36beSmrg
4526ecce36beSmrg    sunos4*)
4527ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4528ecce36beSmrg      wlarc=
4529ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4530ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4531ecce36beSmrg      ;;
4532ecce36beSmrg
4533ecce36beSmrg    *)
4534ecce36beSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4535ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4536ecce36beSmrg	_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'
4537ecce36beSmrg      else
4538ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4539ecce36beSmrg      fi
4540ecce36beSmrg      ;;
4541ecce36beSmrg    esac
4542ecce36beSmrg
4543ecce36beSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4544ecce36beSmrg      runpath_var=
4545ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4546ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4547ecce36beSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4548ecce36beSmrg    fi
4549ecce36beSmrg  else
4550ecce36beSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
4551ecce36beSmrg    case $host_os in
4552ecce36beSmrg    aix3*)
4553ecce36beSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4554ecce36beSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4555ecce36beSmrg      _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'
4556ecce36beSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
4557ecce36beSmrg      # are no directories specified by -L.
4558ecce36beSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4559ecce36beSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4560ecce36beSmrg	# Neither direct hardcoding nor static linking is supported with a
4561ecce36beSmrg	# broken collect2.
4562ecce36beSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4563ecce36beSmrg      fi
4564ecce36beSmrg      ;;
4565ecce36beSmrg
4566ecce36beSmrg    aix[[4-9]]*)
4567ecce36beSmrg      if test "$host_cpu" = ia64; then
4568ecce36beSmrg	# On IA64, the linker does run time linking by default, so we don't
4569ecce36beSmrg	# have to do anything special.
4570ecce36beSmrg	aix_use_runtimelinking=no
4571ecce36beSmrg	exp_sym_flag='-Bexport'
4572ecce36beSmrg	no_entry_flag=""
4573ecce36beSmrg      else
4574ecce36beSmrg	# If we're using GNU nm, then we don't want the "-C" option.
4575ecce36beSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4576ecce36beSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4577ecce36beSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4578ecce36beSmrg	else
4579ecce36beSmrg	  _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'
4580ecce36beSmrg	fi
4581ecce36beSmrg	aix_use_runtimelinking=no
4582ecce36beSmrg
4583ecce36beSmrg	# Test if we are trying to use run time linking or normal
4584ecce36beSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4585ecce36beSmrg	# need to do runtime linking.
4586ecce36beSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4587ecce36beSmrg	  for ld_flag in $LDFLAGS; do
4588ecce36beSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4589ecce36beSmrg	    aix_use_runtimelinking=yes
4590ecce36beSmrg	    break
4591ecce36beSmrg	  fi
4592ecce36beSmrg	  done
4593ecce36beSmrg	  ;;
4594ecce36beSmrg	esac
4595ecce36beSmrg
4596ecce36beSmrg	exp_sym_flag='-bexport'
4597ecce36beSmrg	no_entry_flag='-bnoentry'
4598ecce36beSmrg      fi
4599ecce36beSmrg
4600ecce36beSmrg      # When large executables or shared objects are built, AIX ld can
4601ecce36beSmrg      # have problems creating the table of contents.  If linking a library
4602ecce36beSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
4603ecce36beSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4604ecce36beSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4605ecce36beSmrg
4606ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)=''
4607ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4608ecce36beSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4609ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4610ecce36beSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4611ecce36beSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4612ecce36beSmrg
4613ecce36beSmrg      if test "$GCC" = yes; then
4614ecce36beSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4615ecce36beSmrg	# We only want to do this on AIX 4.2 and lower, the check
4616ecce36beSmrg	# below for broken collect2 doesn't work under 4.3+
4617ecce36beSmrg	  collect2name=`${CC} -print-prog-name=collect2`
4618ecce36beSmrg	  if test -f "$collect2name" &&
4619ecce36beSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4620ecce36beSmrg	  then
4621ecce36beSmrg	  # We have reworked collect2
4622ecce36beSmrg	  :
4623ecce36beSmrg	  else
4624ecce36beSmrg	  # We have old collect2
4625ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4626ecce36beSmrg	  # It fails to find uninstalled libraries when the uninstalled
4627ecce36beSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4628ecce36beSmrg	  # to unsupported forces relinking
4629ecce36beSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4630ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4631ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4632ecce36beSmrg	  fi
4633ecce36beSmrg	  ;;
4634ecce36beSmrg	esac
4635ecce36beSmrg	shared_flag='-shared'
4636ecce36beSmrg	if test "$aix_use_runtimelinking" = yes; then
4637ecce36beSmrg	  shared_flag="$shared_flag "'${wl}-G'
4638ecce36beSmrg	fi
4639ecce36beSmrg	_LT_TAGVAR(link_all_deplibs, $1)=no
4640ecce36beSmrg      else
4641ecce36beSmrg	# not using gcc
4642ecce36beSmrg	if test "$host_cpu" = ia64; then
4643ecce36beSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4644ecce36beSmrg	# chokes on -Wl,-G. The following line is correct:
4645ecce36beSmrg	  shared_flag='-G'
4646ecce36beSmrg	else
4647ecce36beSmrg	  if test "$aix_use_runtimelinking" = yes; then
4648ecce36beSmrg	    shared_flag='${wl}-G'
4649ecce36beSmrg	  else
4650ecce36beSmrg	    shared_flag='${wl}-bM:SRE'
4651ecce36beSmrg	  fi
4652ecce36beSmrg	fi
4653ecce36beSmrg      fi
4654ecce36beSmrg
4655ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4656ecce36beSmrg      # It seems that -bexpall does not export symbols beginning with
4657ecce36beSmrg      # underscore (_), so it is better to generate a list of symbols to export.
4658ecce36beSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4659ecce36beSmrg      if test "$aix_use_runtimelinking" = yes; then
4660ecce36beSmrg	# Warning - without using the other runtime loading flags (-brtl),
4661ecce36beSmrg	# -berok will link without error, but may produce a broken library.
4662ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4663ecce36beSmrg        # Determine the default libpath from the value encoded in an
4664ecce36beSmrg        # empty executable.
4665ecce36beSmrg        _LT_SYS_MODULE_PATH_AIX
4666ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4667ecce36beSmrg        _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4668ecce36beSmrg      else
4669ecce36beSmrg	if test "$host_cpu" = ia64; then
4670ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4671ecce36beSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4672ecce36beSmrg	  _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"
4673ecce36beSmrg	else
4674ecce36beSmrg	 # Determine the default libpath from the value encoded in an
4675ecce36beSmrg	 # empty executable.
4676ecce36beSmrg	 _LT_SYS_MODULE_PATH_AIX
4677ecce36beSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4678ecce36beSmrg	  # Warning - without using the other run time loading flags,
4679ecce36beSmrg	  # -berok will link without error, but may produce a broken library.
4680ecce36beSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4681ecce36beSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4682ecce36beSmrg	  # Exported symbols can be pulled into shared objects from archives
4683ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4684ecce36beSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4685ecce36beSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
4686ecce36beSmrg	  _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'
4687ecce36beSmrg	fi
4688ecce36beSmrg      fi
4689ecce36beSmrg      ;;
4690ecce36beSmrg
4691ecce36beSmrg    amigaos*)
4692ecce36beSmrg      case $host_cpu in
4693ecce36beSmrg      powerpc)
4694ecce36beSmrg            # see comment about AmigaOS4 .so support
4695ecce36beSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4696ecce36beSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4697ecce36beSmrg        ;;
4698ecce36beSmrg      m68k)
4699ecce36beSmrg            _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)'
4700ecce36beSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4701ecce36beSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4702ecce36beSmrg        ;;
4703ecce36beSmrg      esac
4704ecce36beSmrg      ;;
4705ecce36beSmrg
4706ecce36beSmrg    bsdi[[45]]*)
4707ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4708ecce36beSmrg      ;;
4709ecce36beSmrg
4710ecce36beSmrg    cygwin* | mingw* | pw32* | cegcc*)
4711ecce36beSmrg      # When not using gcc, we currently assume that we are using
4712ecce36beSmrg      # Microsoft Visual C++.
4713ecce36beSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4714ecce36beSmrg      # no search path for DLLs.
4715ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4716ecce36beSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4717ecce36beSmrg      # Tell ltmain to make .lib files, not .a files.
4718ecce36beSmrg      libext=lib
4719ecce36beSmrg      # Tell ltmain to make .dll files, not .so files.
4720ecce36beSmrg      shrext_cmds=".dll"
4721ecce36beSmrg      # FIXME: Setting linknames here is a bad hack.
4722ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4723ecce36beSmrg      # The linker will automatically build a .lib file if we build a DLL.
4724ecce36beSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4725ecce36beSmrg      # FIXME: Should let the user specify the lib program.
4726ecce36beSmrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4727ecce36beSmrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4728ecce36beSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4729ecce36beSmrg      ;;
4730ecce36beSmrg
4731ecce36beSmrg    darwin* | rhapsody*)
4732ecce36beSmrg      _LT_DARWIN_LINKER_FEATURES($1)
4733ecce36beSmrg      ;;
4734ecce36beSmrg
4735ecce36beSmrg    dgux*)
4736ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4737ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4738ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4739ecce36beSmrg      ;;
4740ecce36beSmrg
4741ecce36beSmrg    freebsd1*)
4742ecce36beSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
4743ecce36beSmrg      ;;
4744ecce36beSmrg
4745ecce36beSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4746ecce36beSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4747ecce36beSmrg    # does not break anything, and helps significantly (at the cost of a little
4748ecce36beSmrg    # extra space).
4749ecce36beSmrg    freebsd2.2*)
4750ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4751ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4753ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754ecce36beSmrg      ;;
4755ecce36beSmrg
4756ecce36beSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4757ecce36beSmrg    freebsd2*)
4758ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4759ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4760ecce36beSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4761ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4762ecce36beSmrg      ;;
4763ecce36beSmrg
4764ecce36beSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4765ecce36beSmrg    freebsd* | dragonfly*)
4766ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4767ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4768ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4769ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4770ecce36beSmrg      ;;
4771ecce36beSmrg
4772ecce36beSmrg    hpux9*)
4773ecce36beSmrg      if test "$GCC" = yes; then
4774ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4775ecce36beSmrg      else
4776ecce36beSmrg	_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'
4777ecce36beSmrg      fi
4778ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4779ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4780ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4781ecce36beSmrg
4782ecce36beSmrg      # hardcode_minus_L: Not really in the search PATH,
4783ecce36beSmrg      # but as the default location of the library.
4784ecce36beSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4785ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4786ecce36beSmrg      ;;
4787ecce36beSmrg
4788ecce36beSmrg    hpux10*)
4789ecce36beSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4790ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4791ecce36beSmrg      else
4792ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4793ecce36beSmrg      fi
4794ecce36beSmrg      if test "$with_gnu_ld" = no; then
4795ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4796ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4797ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4798ecce36beSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4799ecce36beSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4800ecce36beSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4801ecce36beSmrg	# hardcode_minus_L: Not really in the search PATH,
4802ecce36beSmrg	# but as the default location of the library.
4803ecce36beSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4804ecce36beSmrg      fi
4805ecce36beSmrg      ;;
4806ecce36beSmrg
4807ecce36beSmrg    hpux11*)
4808ecce36beSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4809ecce36beSmrg	case $host_cpu in
4810ecce36beSmrg	hppa*64*)
4811ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4812ecce36beSmrg	  ;;
4813ecce36beSmrg	ia64*)
4814ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4815ecce36beSmrg	  ;;
4816ecce36beSmrg	*)
4817ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4818ecce36beSmrg	  ;;
4819ecce36beSmrg	esac
4820ecce36beSmrg      else
4821ecce36beSmrg	case $host_cpu in
4822ecce36beSmrg	hppa*64*)
4823ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4824ecce36beSmrg	  ;;
4825ecce36beSmrg	ia64*)
4826ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4827ecce36beSmrg	  ;;
4828ecce36beSmrg	*)
4829ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4830ecce36beSmrg	  ;;
4831ecce36beSmrg	esac
4832ecce36beSmrg      fi
4833ecce36beSmrg      if test "$with_gnu_ld" = no; then
4834ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4835ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4836ecce36beSmrg
4837ecce36beSmrg	case $host_cpu in
4838ecce36beSmrg	hppa*64*|ia64*)
4839ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4840ecce36beSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4841ecce36beSmrg	  ;;
4842ecce36beSmrg	*)
4843ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4844ecce36beSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4845ecce36beSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4846ecce36beSmrg
4847ecce36beSmrg	  # hardcode_minus_L: Not really in the search PATH,
4848ecce36beSmrg	  # but as the default location of the library.
4849ecce36beSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4850ecce36beSmrg	  ;;
4851ecce36beSmrg	esac
4852ecce36beSmrg      fi
4853ecce36beSmrg      ;;
4854ecce36beSmrg
4855ecce36beSmrg    irix5* | irix6* | nonstopux*)
4856ecce36beSmrg      if test "$GCC" = yes; then
4857ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4858ecce36beSmrg	# Try to use the -exported_symbol ld option, if it does not
4859ecce36beSmrg	# work, assume that -exports_file does not work either and
4860ecce36beSmrg	# implicitly export all symbols.
4861ecce36beSmrg        save_LDFLAGS="$LDFLAGS"
4862ecce36beSmrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4863ecce36beSmrg        AC_LINK_IFELSE(int foo(void) {},
4864ecce36beSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4865ecce36beSmrg        )
4866ecce36beSmrg        LDFLAGS="$save_LDFLAGS"
4867ecce36beSmrg      else
4868ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4869ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4870ecce36beSmrg      fi
4871ecce36beSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4872ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4873ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4874ecce36beSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4875ecce36beSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4876ecce36beSmrg      ;;
4877ecce36beSmrg
4878ecce36beSmrg    netbsd* | netbsdelf*-gnu)
4879ecce36beSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4880ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4881ecce36beSmrg      else
4882ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4883ecce36beSmrg      fi
4884ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4885ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4886ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4887ecce36beSmrg      ;;
4888ecce36beSmrg
4889ecce36beSmrg    newsos6)
4890ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4891ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4892ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4893ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4894ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4895ecce36beSmrg      ;;
4896ecce36beSmrg
4897ecce36beSmrg    *nto* | *qnx*)
4898ecce36beSmrg      ;;
4899ecce36beSmrg
4900ecce36beSmrg    openbsd*)
4901ecce36beSmrg      if test -f /usr/libexec/ld.so; then
4902ecce36beSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4903ecce36beSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4904ecce36beSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4905ecce36beSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4906ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4907ecce36beSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4908ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4909ecce36beSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4910ecce36beSmrg	else
4911ecce36beSmrg	  case $host_os in
4912ecce36beSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4913ecce36beSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4914ecce36beSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4915ecce36beSmrg	     ;;
4916ecce36beSmrg	   *)
4917ecce36beSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4918ecce36beSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4919ecce36beSmrg	     ;;
4920ecce36beSmrg	  esac
4921ecce36beSmrg	fi
4922ecce36beSmrg      else
4923ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4924ecce36beSmrg      fi
4925ecce36beSmrg      ;;
4926ecce36beSmrg
4927ecce36beSmrg    os2*)
4928ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4929ecce36beSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4930ecce36beSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4931ecce36beSmrg      _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'
4932ecce36beSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4933ecce36beSmrg      ;;
4934ecce36beSmrg
4935ecce36beSmrg    osf3*)
4936ecce36beSmrg      if test "$GCC" = yes; then
4937ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4938ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4939ecce36beSmrg      else
4940ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4942ecce36beSmrg      fi
4943ecce36beSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4944ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4945ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4946ecce36beSmrg      ;;
4947ecce36beSmrg
4948ecce36beSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4949ecce36beSmrg      if test "$GCC" = yes; then
4950ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4951ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4952ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4953ecce36beSmrg      else
4954ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4955ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4956ecce36beSmrg	_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~
4957ecce36beSmrg	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4958ecce36beSmrg
4959ecce36beSmrg	# Both c and cxx compiler support -rpath directly
4960ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4961ecce36beSmrg      fi
4962ecce36beSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4963ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4964ecce36beSmrg      ;;
4965ecce36beSmrg
4966ecce36beSmrg    solaris*)
4967ecce36beSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4968ecce36beSmrg      if test "$GCC" = yes; then
4969ecce36beSmrg	wlarc='${wl}'
4970ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4971ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4972ecce36beSmrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4973ecce36beSmrg      else
4974ecce36beSmrg	case `$CC -V 2>&1` in
4975ecce36beSmrg	*"Compilers 5.0"*)
4976ecce36beSmrg	  wlarc=''
4977ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4978ecce36beSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4979ecce36beSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4980ecce36beSmrg	  ;;
4981ecce36beSmrg	*)
4982ecce36beSmrg	  wlarc='${wl}'
4983ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4984ecce36beSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4985ecce36beSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4986ecce36beSmrg	  ;;
4987ecce36beSmrg	esac
4988ecce36beSmrg      fi
4989ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4990ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4991ecce36beSmrg      case $host_os in
4992ecce36beSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4993ecce36beSmrg      *)
4994ecce36beSmrg	# The compiler driver will combine and reorder linker options,
4995ecce36beSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4996ecce36beSmrg	# but is careful enough not to reorder.
4997ecce36beSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4998ecce36beSmrg	if test "$GCC" = yes; then
4999ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5000ecce36beSmrg	else
5001ecce36beSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5002ecce36beSmrg	fi
5003ecce36beSmrg	;;
5004ecce36beSmrg      esac
5005ecce36beSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5006ecce36beSmrg      ;;
5007ecce36beSmrg
5008ecce36beSmrg    sunos4*)
5009ecce36beSmrg      if test "x$host_vendor" = xsequent; then
5010ecce36beSmrg	# Use $CC to link under sequent, because it throws in some extra .o
5011ecce36beSmrg	# files that make .init and .fini sections work.
5012ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5013ecce36beSmrg      else
5014ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5015ecce36beSmrg      fi
5016ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5017ecce36beSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5018ecce36beSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5019ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5020ecce36beSmrg      ;;
5021ecce36beSmrg
5022ecce36beSmrg    sysv4)
5023ecce36beSmrg      case $host_vendor in
5024ecce36beSmrg	sni)
5025ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5026ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5027ecce36beSmrg	;;
5028ecce36beSmrg	siemens)
5029ecce36beSmrg	  ## LD is ld it makes a PLAMLIB
5030ecce36beSmrg	  ## CC just makes a GrossModule.
5031ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5032ecce36beSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5033ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5034ecce36beSmrg        ;;
5035ecce36beSmrg	motorola)
5036ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5038ecce36beSmrg	;;
5039ecce36beSmrg      esac
5040ecce36beSmrg      runpath_var='LD_RUN_PATH'
5041ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5042ecce36beSmrg      ;;
5043ecce36beSmrg
5044ecce36beSmrg    sysv4.3*)
5045ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5046ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5047ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5048ecce36beSmrg      ;;
5049ecce36beSmrg
5050ecce36beSmrg    sysv4*MP*)
5051ecce36beSmrg      if test -d /usr/nec; then
5052ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5053ecce36beSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5054ecce36beSmrg	runpath_var=LD_RUN_PATH
5055ecce36beSmrg	hardcode_runpath_var=yes
5056ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5057ecce36beSmrg      fi
5058ecce36beSmrg      ;;
5059ecce36beSmrg
5060ecce36beSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5061ecce36beSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5062ecce36beSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5063ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5064ecce36beSmrg      runpath_var='LD_RUN_PATH'
5065ecce36beSmrg
5066ecce36beSmrg      if test "$GCC" = yes; then
5067ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5068ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5069ecce36beSmrg      else
5070ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5071ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5072ecce36beSmrg      fi
5073ecce36beSmrg      ;;
5074ecce36beSmrg
5075ecce36beSmrg    sysv5* | sco3.2v5* | sco5v6*)
5076ecce36beSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
5077ecce36beSmrg      # link with -lc, and that would cause any symbols used from libc to
5078ecce36beSmrg      # always be unresolved, which means just about no library would
5079ecce36beSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
5080ecce36beSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
5081ecce36beSmrg      # as -z defs.
5082ecce36beSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5083ecce36beSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5084ecce36beSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5085ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5086ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5087ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5088ecce36beSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5089ecce36beSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5090ecce36beSmrg      runpath_var='LD_RUN_PATH'
5091ecce36beSmrg
5092ecce36beSmrg      if test "$GCC" = yes; then
5093ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5094ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5095ecce36beSmrg      else
5096ecce36beSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5097ecce36beSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5098ecce36beSmrg      fi
5099ecce36beSmrg      ;;
5100ecce36beSmrg
5101ecce36beSmrg    uts4*)
5102ecce36beSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5103ecce36beSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5104ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5105ecce36beSmrg      ;;
5106ecce36beSmrg
5107ecce36beSmrg    *)
5108ecce36beSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
5109ecce36beSmrg      ;;
5110ecce36beSmrg    esac
5111ecce36beSmrg
5112ecce36beSmrg    if test x$host_vendor = xsni; then
5113ecce36beSmrg      case $host in
5114ecce36beSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5115ecce36beSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5116ecce36beSmrg	;;
5117ecce36beSmrg      esac
5118ecce36beSmrg    fi
5119ecce36beSmrg  fi
5120ecce36beSmrg])
5121ecce36beSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5122ecce36beSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5123ecce36beSmrg
5124ecce36beSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5125ecce36beSmrg
5126ecce36beSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5127ecce36beSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5128ecce36beSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
5129ecce36beSmrg    [The commands to extract the exported symbol list from a shared archive])
5130ecce36beSmrg
5131ecce36beSmrg#
5132ecce36beSmrg# Do we need to explicitly link libc?
5133ecce36beSmrg#
5134ecce36beSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5135ecce36beSmrgx|xyes)
5136ecce36beSmrg  # Assume -lc should be added
5137ecce36beSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5138ecce36beSmrg
5139ecce36beSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5140ecce36beSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
5141ecce36beSmrg    *'~'*)
5142ecce36beSmrg      # FIXME: we may have to deal with multi-command sequences.
5143ecce36beSmrg      ;;
5144ecce36beSmrg    '$CC '*)
5145ecce36beSmrg      # Test whether the compiler implicitly links with -lc since on some
5146ecce36beSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5147ecce36beSmrg      # to ld, don't add -lc before -lgcc.
5148ecce36beSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5149ecce36beSmrg      $RM conftest*
5150ecce36beSmrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5151ecce36beSmrg
5152ecce36beSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5153ecce36beSmrg        soname=conftest
5154ecce36beSmrg        lib=conftest
5155ecce36beSmrg        libobjs=conftest.$ac_objext
5156ecce36beSmrg        deplibs=
5157ecce36beSmrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5158ecce36beSmrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5159ecce36beSmrg        compiler_flags=-v
5160ecce36beSmrg        linker_flags=-v
5161ecce36beSmrg        verstring=
5162ecce36beSmrg        output_objdir=.
5163ecce36beSmrg        libname=conftest
5164ecce36beSmrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5165ecce36beSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5166ecce36beSmrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5167ecce36beSmrg        then
5168ecce36beSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5169ecce36beSmrg        else
5170ecce36beSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5171ecce36beSmrg        fi
5172ecce36beSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5173ecce36beSmrg      else
5174ecce36beSmrg        cat conftest.err 1>&5
5175ecce36beSmrg      fi
5176ecce36beSmrg      $RM conftest*
5177ecce36beSmrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5178ecce36beSmrg      ;;
5179ecce36beSmrg    esac
5180ecce36beSmrg  fi
5181ecce36beSmrg  ;;
5182ecce36beSmrgesac
5183ecce36beSmrg
5184ecce36beSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5185ecce36beSmrg    [Whether or not to add -lc for building shared libraries])
5186ecce36beSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5187ecce36beSmrg    [enable_shared_with_static_runtimes], [0],
5188ecce36beSmrg    [Whether or not to disallow shared libs when runtime libs are static])
5189ecce36beSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5190ecce36beSmrg    [Compiler flag to allow reflexive dlopens])
5191ecce36beSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5192ecce36beSmrg    [Compiler flag to generate shared objects directly from archives])
5193ecce36beSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
5194ecce36beSmrg    [Whether the compiler copes with passing no objects directly])
5195ecce36beSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5196ecce36beSmrg    [Create an old-style archive from a shared archive])
5197ecce36beSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5198ecce36beSmrg    [Create a temporary old-style archive to link instead of a shared archive])
5199ecce36beSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5200ecce36beSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5201ecce36beSmrg_LT_TAGDECL([], [module_cmds], [2],
5202ecce36beSmrg    [Commands used to build a loadable module if different from building
5203ecce36beSmrg    a shared archive.])
5204ecce36beSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5205ecce36beSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
5206ecce36beSmrg    [Whether we are building with GNU ld or not])
5207ecce36beSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5208ecce36beSmrg    [Flag that allows shared libraries with undefined symbols to be built])
5209ecce36beSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
5210ecce36beSmrg    [Flag that enforces no undefined symbols])
5211ecce36beSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5212ecce36beSmrg    [Flag to hardcode $libdir into a binary during linking.
5213ecce36beSmrg    This must work even if $libdir does not exist])
5214ecce36beSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5215ecce36beSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5216ecce36beSmrg    during linking.  This must work even if $libdir does not exist]])
5217ecce36beSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5218ecce36beSmrg    [Whether we need a single "-rpath" flag with a separated argument])
5219ecce36beSmrg_LT_TAGDECL([], [hardcode_direct], [0],
5220ecce36beSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5221ecce36beSmrg    DIR into the resulting binary])
5222ecce36beSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5223ecce36beSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5224ecce36beSmrg    DIR into the resulting binary and the resulting library dependency is
5225ecce36beSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5226ecce36beSmrg    library is relocated])
5227ecce36beSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5228ecce36beSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5229ecce36beSmrg    into the resulting binary])
5230ecce36beSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5231ecce36beSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5232ecce36beSmrg    into the resulting binary])
5233ecce36beSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
5234ecce36beSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5235ecce36beSmrg    into the library and all subsequent libraries and executables linked
5236ecce36beSmrg    against it])
5237ecce36beSmrg_LT_TAGDECL([], [inherit_rpath], [0],
5238ecce36beSmrg    [Set to yes if linker adds runtime paths of dependent libraries
5239ecce36beSmrg    to runtime path list])
5240ecce36beSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
5241ecce36beSmrg    [Whether libtool must link a program against all its dependency libraries])
5242ecce36beSmrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5243ecce36beSmrg    [Fix the shell variable $srcfile for the compiler])
5244ecce36beSmrg_LT_TAGDECL([], [always_export_symbols], [0],
5245ecce36beSmrg    [Set to "yes" if exported symbols are required])
5246ecce36beSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5247ecce36beSmrg    [The commands to list exported symbols])
5248ecce36beSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
5249ecce36beSmrg    [Symbols that should not be listed in the preloaded symbols])
5250ecce36beSmrg_LT_TAGDECL([], [include_expsyms], [1],
5251ecce36beSmrg    [Symbols that must always be exported])
5252ecce36beSmrg_LT_TAGDECL([], [prelink_cmds], [2],
5253ecce36beSmrg    [Commands necessary for linking programs (against libraries) with templates])
5254ecce36beSmrg_LT_TAGDECL([], [file_list_spec], [1],
5255ecce36beSmrg    [Specify filename containing input files])
5256ecce36beSmrgdnl FIXME: Not yet implemented
5257ecce36beSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5258ecce36beSmrgdnl    [Compiler flag to generate thread safe objects])
5259ecce36beSmrg])# _LT_LINKER_SHLIBS
5260ecce36beSmrg
5261ecce36beSmrg
5262ecce36beSmrg# _LT_LANG_C_CONFIG([TAG])
5263ecce36beSmrg# ------------------------
5264ecce36beSmrg# Ensure that the configuration variables for a C compiler are suitably
5265ecce36beSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5266ecce36beSmrg# the compiler configuration to `libtool'.
5267ecce36beSmrgm4_defun([_LT_LANG_C_CONFIG],
5268ecce36beSmrg[m4_require([_LT_DECL_EGREP])dnl
5269ecce36beSmrglt_save_CC="$CC"
5270ecce36beSmrgAC_LANG_PUSH(C)
5271ecce36beSmrg
5272ecce36beSmrg# Source file extension for C test sources.
5273ecce36beSmrgac_ext=c
5274ecce36beSmrg
5275ecce36beSmrg# Object file extension for compiled C test sources.
5276ecce36beSmrgobjext=o
5277ecce36beSmrg_LT_TAGVAR(objext, $1)=$objext
5278ecce36beSmrg
5279ecce36beSmrg# Code to be used in simple compile tests
5280ecce36beSmrglt_simple_compile_test_code="int some_variable = 0;"
5281ecce36beSmrg
5282ecce36beSmrg# Code to be used in simple link tests
5283ecce36beSmrglt_simple_link_test_code='int main(){return(0);}'
5284ecce36beSmrg
5285ecce36beSmrg_LT_TAG_COMPILER
5286ecce36beSmrg# Save the default compiler, since it gets overwritten when the other
5287ecce36beSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5288ecce36beSmrgcompiler_DEFAULT=$CC
5289ecce36beSmrg
5290ecce36beSmrg# save warnings/boilerplate of simple test code
5291ecce36beSmrg_LT_COMPILER_BOILERPLATE
5292ecce36beSmrg_LT_LINKER_BOILERPLATE
5293ecce36beSmrg
5294ecce36beSmrgif test -n "$compiler"; then
5295ecce36beSmrg  _LT_COMPILER_NO_RTTI($1)
5296ecce36beSmrg  _LT_COMPILER_PIC($1)
5297ecce36beSmrg  _LT_COMPILER_C_O($1)
5298ecce36beSmrg  _LT_COMPILER_FILE_LOCKS($1)
5299ecce36beSmrg  _LT_LINKER_SHLIBS($1)
5300ecce36beSmrg  _LT_SYS_DYNAMIC_LINKER($1)
5301ecce36beSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5302ecce36beSmrg  LT_SYS_DLOPEN_SELF
5303ecce36beSmrg  _LT_CMD_STRIPLIB
5304ecce36beSmrg
5305ecce36beSmrg  # Report which library types will actually be built
5306ecce36beSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5307ecce36beSmrg  AC_MSG_RESULT([$can_build_shared])
5308ecce36beSmrg
5309ecce36beSmrg  AC_MSG_CHECKING([whether to build shared libraries])
5310ecce36beSmrg  test "$can_build_shared" = "no" && enable_shared=no
5311ecce36beSmrg
5312ecce36beSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
5313ecce36beSmrg  # are all built from PIC.
5314ecce36beSmrg  case $host_os in
5315ecce36beSmrg  aix3*)
5316ecce36beSmrg    test "$enable_shared" = yes && enable_static=no
5317ecce36beSmrg    if test -n "$RANLIB"; then
5318ecce36beSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5319ecce36beSmrg      postinstall_cmds='$RANLIB $lib'
5320ecce36beSmrg    fi
5321ecce36beSmrg    ;;
5322ecce36beSmrg
5323ecce36beSmrg  aix[[4-9]]*)
5324ecce36beSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5325ecce36beSmrg      test "$enable_shared" = yes && enable_static=no
5326ecce36beSmrg    fi
5327ecce36beSmrg    ;;
5328ecce36beSmrg  esac
5329ecce36beSmrg  AC_MSG_RESULT([$enable_shared])
5330ecce36beSmrg
5331ecce36beSmrg  AC_MSG_CHECKING([whether to build static libraries])
5332ecce36beSmrg  # Make sure either enable_shared or enable_static is yes.
5333ecce36beSmrg  test "$enable_shared" = yes || enable_static=yes
5334ecce36beSmrg  AC_MSG_RESULT([$enable_static])
5335ecce36beSmrg
5336ecce36beSmrg  _LT_CONFIG($1)
5337ecce36beSmrgfi
5338ecce36beSmrgAC_LANG_POP
5339ecce36beSmrgCC="$lt_save_CC"
5340ecce36beSmrg])# _LT_LANG_C_CONFIG
5341ecce36beSmrg
5342ecce36beSmrg
5343ecce36beSmrg# _LT_PROG_CXX
5344ecce36beSmrg# ------------
5345ecce36beSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5346ecce36beSmrg# compiler, we have our own version here.
5347ecce36beSmrgm4_defun([_LT_PROG_CXX],
5348ecce36beSmrg[
5349ecce36beSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5350ecce36beSmrgAC_PROG_CXX
5351ecce36beSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5352ecce36beSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5353ecce36beSmrg    (test "X$CXX" != "Xg++"))) ; then
5354ecce36beSmrg  AC_PROG_CXXCPP
5355ecce36beSmrgelse
5356ecce36beSmrg  _lt_caught_CXX_error=yes
5357ecce36beSmrgfi
5358ecce36beSmrgpopdef([AC_MSG_ERROR])
5359ecce36beSmrg])# _LT_PROG_CXX
5360ecce36beSmrg
5361ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
5362ecce36beSmrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5363ecce36beSmrg
5364ecce36beSmrg
5365ecce36beSmrg# _LT_LANG_CXX_CONFIG([TAG])
5366ecce36beSmrg# --------------------------
5367ecce36beSmrg# Ensure that the configuration variables for a C++ compiler are suitably
5368ecce36beSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5369ecce36beSmrg# the compiler configuration to `libtool'.
5370ecce36beSmrgm4_defun([_LT_LANG_CXX_CONFIG],
5371ecce36beSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5372ecce36beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5373ecce36beSmrgm4_require([_LT_DECL_EGREP])dnl
5374ecce36beSmrg
5375ecce36beSmrgAC_LANG_PUSH(C++)
5376ecce36beSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5377ecce36beSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
5378ecce36beSmrg_LT_TAGVAR(always_export_symbols, $1)=no
5379ecce36beSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5380ecce36beSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
5381ecce36beSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5382ecce36beSmrg_LT_TAGVAR(hardcode_direct, $1)=no
5383ecce36beSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5384ecce36beSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5385ecce36beSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5386ecce36beSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5387ecce36beSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5388ecce36beSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5389ecce36beSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
5390ecce36beSmrg_LT_TAGVAR(inherit_rpath, $1)=no
5391ecce36beSmrg_LT_TAGVAR(module_cmds, $1)=
5392ecce36beSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
5393ecce36beSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5394ecce36beSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5395ecce36beSmrg_LT_TAGVAR(no_undefined_flag, $1)=
5396ecce36beSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5397ecce36beSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5398ecce36beSmrg
5399ecce36beSmrg# Source file extension for C++ test sources.
5400ecce36beSmrgac_ext=cpp
5401ecce36beSmrg
5402ecce36beSmrg# Object file extension for compiled C++ test sources.
5403ecce36beSmrgobjext=o
5404ecce36beSmrg_LT_TAGVAR(objext, $1)=$objext
5405ecce36beSmrg
5406ecce36beSmrg# No sense in running all these tests if we already determined that
5407ecce36beSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5408ecce36beSmrg# are currently assumed to apply to all compilers on this platform,
5409ecce36beSmrg# and will be corrupted by setting them based on a non-working compiler.
5410ecce36beSmrgif test "$_lt_caught_CXX_error" != yes; then
5411ecce36beSmrg  # Code to be used in simple compile tests
5412ecce36beSmrg  lt_simple_compile_test_code="int some_variable = 0;"
5413ecce36beSmrg
5414ecce36beSmrg  # Code to be used in simple link tests
5415ecce36beSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5416ecce36beSmrg
5417ecce36beSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5418ecce36beSmrg  _LT_TAG_COMPILER
5419ecce36beSmrg
5420ecce36beSmrg  # save warnings/boilerplate of simple test code
5421ecce36beSmrg  _LT_COMPILER_BOILERPLATE
5422ecce36beSmrg  _LT_LINKER_BOILERPLATE
5423ecce36beSmrg
5424ecce36beSmrg  # Allow CC to be a program name with arguments.
5425ecce36beSmrg  lt_save_CC=$CC
5426ecce36beSmrg  lt_save_LD=$LD
5427ecce36beSmrg  lt_save_GCC=$GCC
5428ecce36beSmrg  GCC=$GXX
5429ecce36beSmrg  lt_save_with_gnu_ld=$with_gnu_ld
5430ecce36beSmrg  lt_save_path_LD=$lt_cv_path_LD
5431ecce36beSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5432ecce36beSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5433ecce36beSmrg  else
5434ecce36beSmrg    $as_unset lt_cv_prog_gnu_ld
5435ecce36beSmrg  fi
5436ecce36beSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5437ecce36beSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5438ecce36beSmrg  else
5439ecce36beSmrg    $as_unset lt_cv_path_LD
5440ecce36beSmrg  fi
5441ecce36beSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
5442ecce36beSmrg  CC=${CXX-"c++"}
5443ecce36beSmrg  compiler=$CC
5444ecce36beSmrg  _LT_TAGVAR(compiler, $1)=$CC
5445ecce36beSmrg  _LT_CC_BASENAME([$compiler])
5446ecce36beSmrg
5447ecce36beSmrg  if test -n "$compiler"; then
5448ecce36beSmrg    # We don't want -fno-exception when compiling C++ code, so set the
5449ecce36beSmrg    # no_builtin_flag separately
5450ecce36beSmrg    if test "$GXX" = yes; then
5451ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5452ecce36beSmrg    else
5453ecce36beSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5454ecce36beSmrg    fi
5455ecce36beSmrg
5456ecce36beSmrg    if test "$GXX" = yes; then
5457ecce36beSmrg      # Set up default GNU C++ configuration
5458ecce36beSmrg
5459ecce36beSmrg      LT_PATH_LD
5460ecce36beSmrg
5461ecce36beSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5462ecce36beSmrg      # archiving commands below assume that GNU ld is being used.
5463ecce36beSmrg      if test "$with_gnu_ld" = yes; then
5464ecce36beSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5465ecce36beSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5466ecce36beSmrg
5467ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5468ecce36beSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5469ecce36beSmrg
5470ecce36beSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5471ecce36beSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5472ecce36beSmrg        #     investigate it a little bit more. (MM)
5473ecce36beSmrg        wlarc='${wl}'
5474ecce36beSmrg
5475ecce36beSmrg        # ancient GNU ld didn't support --whole-archive et. al.
5476ecce36beSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5477ecce36beSmrg	  $GREP 'no-whole-archive' > /dev/null; then
5478ecce36beSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5479ecce36beSmrg        else
5480ecce36beSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5481ecce36beSmrg        fi
5482ecce36beSmrg      else
5483ecce36beSmrg        with_gnu_ld=no
5484ecce36beSmrg        wlarc=
5485ecce36beSmrg
5486ecce36beSmrg        # A generic and very simple default shared library creation
5487ecce36beSmrg        # command for GNU C++ for the case where it uses the native
5488ecce36beSmrg        # linker, instead of GNU ld.  If possible, this setting should
5489ecce36beSmrg        # overridden to take advantage of the native linker features on
5490ecce36beSmrg        # the platform it is being used on.
5491ecce36beSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5492ecce36beSmrg      fi
5493ecce36beSmrg
5494ecce36beSmrg      # Commands to make compiler produce verbose output that lists
5495ecce36beSmrg      # what "hidden" libraries, object files and flags are used when
5496ecce36beSmrg      # linking a shared library.
5497ecce36beSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5498ecce36beSmrg
5499ecce36beSmrg    else
5500ecce36beSmrg      GXX=no
5501ecce36beSmrg      with_gnu_ld=no
5502ecce36beSmrg      wlarc=
5503ecce36beSmrg    fi
5504ecce36beSmrg
5505ecce36beSmrg    # PORTME: fill in a description of your system's C++ link characteristics
5506ecce36beSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5507ecce36beSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5508ecce36beSmrg    case $host_os in
5509ecce36beSmrg      aix3*)
5510ecce36beSmrg        # FIXME: insert proper C++ library support
5511ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5512ecce36beSmrg        ;;
5513ecce36beSmrg      aix[[4-9]]*)
5514ecce36beSmrg        if test "$host_cpu" = ia64; then
5515ecce36beSmrg          # On IA64, the linker does run time linking by default, so we don't
5516ecce36beSmrg          # have to do anything special.
5517ecce36beSmrg          aix_use_runtimelinking=no
5518ecce36beSmrg          exp_sym_flag='-Bexport'
5519ecce36beSmrg          no_entry_flag=""
5520ecce36beSmrg        else
5521ecce36beSmrg          aix_use_runtimelinking=no
5522ecce36beSmrg
5523ecce36beSmrg          # Test if we are trying to use run time linking or normal
5524ecce36beSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5525ecce36beSmrg          # need to do runtime linking.
5526ecce36beSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5527ecce36beSmrg	    for ld_flag in $LDFLAGS; do
5528ecce36beSmrg	      case $ld_flag in
5529ecce36beSmrg	      *-brtl*)
5530ecce36beSmrg	        aix_use_runtimelinking=yes
5531ecce36beSmrg	        break
5532ecce36beSmrg	        ;;
5533ecce36beSmrg	      esac
5534ecce36beSmrg	    done
5535ecce36beSmrg	    ;;
5536ecce36beSmrg          esac
5537ecce36beSmrg
5538ecce36beSmrg          exp_sym_flag='-bexport'
5539ecce36beSmrg          no_entry_flag='-bnoentry'
5540ecce36beSmrg        fi
5541ecce36beSmrg
5542ecce36beSmrg        # When large executables or shared objects are built, AIX ld can
5543ecce36beSmrg        # have problems creating the table of contents.  If linking a library
5544ecce36beSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
5545ecce36beSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5546ecce36beSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5547ecce36beSmrg
5548ecce36beSmrg        _LT_TAGVAR(archive_cmds, $1)=''
5549ecce36beSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5550ecce36beSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5551ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5552ecce36beSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5553ecce36beSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5554ecce36beSmrg
5555ecce36beSmrg        if test "$GXX" = yes; then
5556ecce36beSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5557ecce36beSmrg          # We only want to do this on AIX 4.2 and lower, the check
5558ecce36beSmrg          # below for broken collect2 doesn't work under 4.3+
5559ecce36beSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5560ecce36beSmrg	  if test -f "$collect2name" &&
5561ecce36beSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5562ecce36beSmrg	  then
5563ecce36beSmrg	    # We have reworked collect2
5564ecce36beSmrg	    :
5565ecce36beSmrg	  else
5566ecce36beSmrg	    # We have old collect2
5567ecce36beSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5568ecce36beSmrg	    # It fails to find uninstalled libraries when the uninstalled
5569ecce36beSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5570ecce36beSmrg	    # to unsupported forces relinking
5571ecce36beSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5572ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5573ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5574ecce36beSmrg	  fi
5575ecce36beSmrg          esac
5576ecce36beSmrg          shared_flag='-shared'
5577ecce36beSmrg	  if test "$aix_use_runtimelinking" = yes; then
5578ecce36beSmrg	    shared_flag="$shared_flag "'${wl}-G'
5579ecce36beSmrg	  fi
5580ecce36beSmrg        else
5581ecce36beSmrg          # not using gcc
5582ecce36beSmrg          if test "$host_cpu" = ia64; then
5583ecce36beSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5584ecce36beSmrg	  # chokes on -Wl,-G. The following line is correct:
5585ecce36beSmrg	  shared_flag='-G'
5586ecce36beSmrg          else
5587ecce36beSmrg	    if test "$aix_use_runtimelinking" = yes; then
5588ecce36beSmrg	      shared_flag='${wl}-G'
5589ecce36beSmrg	    else
5590ecce36beSmrg	      shared_flag='${wl}-bM:SRE'
5591ecce36beSmrg	    fi
5592ecce36beSmrg          fi
5593ecce36beSmrg        fi
5594ecce36beSmrg
5595ecce36beSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5596ecce36beSmrg        # It seems that -bexpall does not export symbols beginning with
5597ecce36beSmrg        # underscore (_), so it is better to generate a list of symbols to
5598ecce36beSmrg	# export.
5599ecce36beSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5600ecce36beSmrg        if test "$aix_use_runtimelinking" = yes; then
5601ecce36beSmrg          # Warning - without using the other runtime loading flags (-brtl),
5602ecce36beSmrg          # -berok will link without error, but may produce a broken library.
5603ecce36beSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5604ecce36beSmrg          # Determine the default libpath from the value encoded in an empty
5605ecce36beSmrg          # executable.
5606ecce36beSmrg          _LT_SYS_MODULE_PATH_AIX
5607ecce36beSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5608ecce36beSmrg
5609ecce36beSmrg          _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5610ecce36beSmrg        else
5611ecce36beSmrg          if test "$host_cpu" = ia64; then
5612ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5613ecce36beSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5614ecce36beSmrg	    _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"
5615ecce36beSmrg          else
5616ecce36beSmrg	    # Determine the default libpath from the value encoded in an
5617ecce36beSmrg	    # empty executable.
5618ecce36beSmrg	    _LT_SYS_MODULE_PATH_AIX
5619ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5620ecce36beSmrg	    # Warning - without using the other run time loading flags,
5621ecce36beSmrg	    # -berok will link without error, but may produce a broken library.
5622ecce36beSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5623ecce36beSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5624ecce36beSmrg	    # Exported symbols can be pulled into shared objects from archives
5625ecce36beSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5626ecce36beSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5627ecce36beSmrg	    # This is similar to how AIX traditionally builds its shared
5628ecce36beSmrg	    # libraries.
5629ecce36beSmrg	    _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'
5630ecce36beSmrg          fi
5631ecce36beSmrg        fi
5632ecce36beSmrg        ;;
5633ecce36beSmrg
5634ecce36beSmrg      beos*)
5635ecce36beSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5636ecce36beSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5637ecce36beSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5638ecce36beSmrg	  # support --undefined.  This deserves some investigation.  FIXME
5639ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640ecce36beSmrg	else
5641ecce36beSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5642ecce36beSmrg	fi
5643ecce36beSmrg	;;
5644ecce36beSmrg
5645ecce36beSmrg      chorus*)
5646ecce36beSmrg        case $cc_basename in
5647ecce36beSmrg          *)
5648ecce36beSmrg	  # FIXME: insert proper C++ library support
5649ecce36beSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5650ecce36beSmrg	  ;;
5651ecce36beSmrg        esac
5652ecce36beSmrg        ;;
5653ecce36beSmrg
5654ecce36beSmrg      cygwin* | mingw* | pw32* | cegcc*)
5655ecce36beSmrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5656ecce36beSmrg        # as there is no search path for DLLs.
5657ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5658ecce36beSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5659ecce36beSmrg        _LT_TAGVAR(always_export_symbols, $1)=no
5660ecce36beSmrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5661ecce36beSmrg
5662ecce36beSmrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5663ecce36beSmrg          _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'
5664ecce36beSmrg          # If the export-symbols file already is a .def file (1st line
5665ecce36beSmrg          # is EXPORTS), use it as is; otherwise, prepend...
5666ecce36beSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5667ecce36beSmrg	    cp $export_symbols $output_objdir/$soname.def;
5668ecce36beSmrg          else
5669ecce36beSmrg	    echo EXPORTS > $output_objdir/$soname.def;
5670ecce36beSmrg	    cat $export_symbols >> $output_objdir/$soname.def;
5671ecce36beSmrg          fi~
5672ecce36beSmrg          $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'
5673ecce36beSmrg        else
5674ecce36beSmrg          _LT_TAGVAR(ld_shlibs, $1)=no
5675ecce36beSmrg        fi
5676ecce36beSmrg        ;;
5677ecce36beSmrg      darwin* | rhapsody*)
5678ecce36beSmrg        _LT_DARWIN_LINKER_FEATURES($1)
5679ecce36beSmrg	;;
5680ecce36beSmrg
5681ecce36beSmrg      dgux*)
5682ecce36beSmrg        case $cc_basename in
5683ecce36beSmrg          ec++*)
5684ecce36beSmrg	    # FIXME: insert proper C++ library support
5685ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5686ecce36beSmrg	    ;;
5687ecce36beSmrg          ghcx*)
5688ecce36beSmrg	    # Green Hills C++ Compiler
5689ecce36beSmrg	    # FIXME: insert proper C++ library support
5690ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5691ecce36beSmrg	    ;;
5692ecce36beSmrg          *)
5693ecce36beSmrg	    # FIXME: insert proper C++ library support
5694ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5695ecce36beSmrg	    ;;
5696ecce36beSmrg        esac
5697ecce36beSmrg        ;;
5698ecce36beSmrg
5699ecce36beSmrg      freebsd[[12]]*)
5700ecce36beSmrg        # C++ shared libraries reported to be fairly broken before
5701ecce36beSmrg	# switch to ELF
5702ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5703ecce36beSmrg        ;;
5704ecce36beSmrg
5705ecce36beSmrg      freebsd-elf*)
5706ecce36beSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5707ecce36beSmrg        ;;
5708ecce36beSmrg
5709ecce36beSmrg      freebsd* | dragonfly*)
5710ecce36beSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5711ecce36beSmrg        # conventions
5712ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5713ecce36beSmrg        ;;
5714ecce36beSmrg
5715ecce36beSmrg      gnu*)
5716ecce36beSmrg        ;;
5717ecce36beSmrg
5718ecce36beSmrg      hpux9*)
5719ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5720ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5721ecce36beSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722ecce36beSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5723ecce36beSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5724ecce36beSmrg				             # but as the default
5725ecce36beSmrg				             # location of the library.
5726ecce36beSmrg
5727ecce36beSmrg        case $cc_basename in
5728ecce36beSmrg          CC*)
5729ecce36beSmrg            # FIXME: insert proper C++ library support
5730ecce36beSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
5731ecce36beSmrg            ;;
5732ecce36beSmrg          aCC*)
5733ecce36beSmrg            _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'
5734ecce36beSmrg            # Commands to make compiler produce verbose output that lists
5735ecce36beSmrg            # what "hidden" libraries, object files and flags are used when
5736ecce36beSmrg            # linking a shared library.
5737ecce36beSmrg            #
5738ecce36beSmrg            # There doesn't appear to be a way to prevent this compiler from
5739ecce36beSmrg            # explicitly linking system object files so we need to strip them
5740ecce36beSmrg            # from the output so that they don't get included in the library
5741ecce36beSmrg            # dependencies.
5742ecce36beSmrg            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; $ECHO "X$list" | $Xsed'
5743ecce36beSmrg            ;;
5744ecce36beSmrg          *)
5745ecce36beSmrg            if test "$GXX" = yes; then
5746ecce36beSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5747ecce36beSmrg            else
5748ecce36beSmrg              # FIXME: insert proper C++ library support
5749ecce36beSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
5750ecce36beSmrg            fi
5751ecce36beSmrg            ;;
5752ecce36beSmrg        esac
5753ecce36beSmrg        ;;
5754ecce36beSmrg
5755ecce36beSmrg      hpux10*|hpux11*)
5756ecce36beSmrg        if test $with_gnu_ld = no; then
5757ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5758ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5759ecce36beSmrg
5760ecce36beSmrg          case $host_cpu in
5761ecce36beSmrg            hppa*64*|ia64*)
5762ecce36beSmrg              ;;
5763ecce36beSmrg            *)
5764ecce36beSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5765ecce36beSmrg              ;;
5766ecce36beSmrg          esac
5767ecce36beSmrg        fi
5768ecce36beSmrg        case $host_cpu in
5769ecce36beSmrg          hppa*64*|ia64*)
5770ecce36beSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
5771ecce36beSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5772ecce36beSmrg            ;;
5773ecce36beSmrg          *)
5774ecce36beSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5775ecce36beSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5776ecce36beSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5777ecce36beSmrg					         # but as the default
5778ecce36beSmrg					         # location of the library.
5779ecce36beSmrg            ;;
5780ecce36beSmrg        esac
5781ecce36beSmrg
5782ecce36beSmrg        case $cc_basename in
5783ecce36beSmrg          CC*)
5784ecce36beSmrg	    # FIXME: insert proper C++ library support
5785ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5786ecce36beSmrg	    ;;
5787ecce36beSmrg          aCC*)
5788ecce36beSmrg	    case $host_cpu in
5789ecce36beSmrg	      hppa*64*)
5790ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5791ecce36beSmrg	        ;;
5792ecce36beSmrg	      ia64*)
5793ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5794ecce36beSmrg	        ;;
5795ecce36beSmrg	      *)
5796ecce36beSmrg	        _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'
5797ecce36beSmrg	        ;;
5798ecce36beSmrg	    esac
5799ecce36beSmrg	    # Commands to make compiler produce verbose output that lists
5800ecce36beSmrg	    # what "hidden" libraries, object files and flags are used when
5801ecce36beSmrg	    # linking a shared library.
5802ecce36beSmrg	    #
5803ecce36beSmrg	    # There doesn't appear to be a way to prevent this compiler from
5804ecce36beSmrg	    # explicitly linking system object files so we need to strip them
5805ecce36beSmrg	    # from the output so that they don't get included in the library
5806ecce36beSmrg	    # dependencies.
5807ecce36beSmrg	    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; $ECHO "X$list" | $Xsed'
5808ecce36beSmrg	    ;;
5809ecce36beSmrg          *)
5810ecce36beSmrg	    if test "$GXX" = yes; then
5811ecce36beSmrg	      if test $with_gnu_ld = no; then
5812ecce36beSmrg	        case $host_cpu in
5813ecce36beSmrg	          hppa*64*)
5814ecce36beSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5815ecce36beSmrg	            ;;
5816ecce36beSmrg	          ia64*)
5817ecce36beSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5818ecce36beSmrg	            ;;
5819ecce36beSmrg	          *)
5820ecce36beSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5821ecce36beSmrg	            ;;
5822ecce36beSmrg	        esac
5823ecce36beSmrg	      fi
5824ecce36beSmrg	    else
5825ecce36beSmrg	      # FIXME: insert proper C++ library support
5826ecce36beSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5827ecce36beSmrg	    fi
5828ecce36beSmrg	    ;;
5829ecce36beSmrg        esac
5830ecce36beSmrg        ;;
5831ecce36beSmrg
5832ecce36beSmrg      interix[[3-9]]*)
5833ecce36beSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
5834ecce36beSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5835ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5836ecce36beSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5837ecce36beSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5838ecce36beSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5839ecce36beSmrg	# default) and relocated if they conflict, which is a slow very memory
5840ecce36beSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5841ecce36beSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5842ecce36beSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5843ecce36beSmrg	_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'
5844ecce36beSmrg	_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'
5845ecce36beSmrg	;;
5846ecce36beSmrg      irix5* | irix6*)
5847ecce36beSmrg        case $cc_basename in
5848ecce36beSmrg          CC*)
5849ecce36beSmrg	    # SGI C++
5850ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5851ecce36beSmrg
5852ecce36beSmrg	    # Archives containing C++ object files must be created using
5853ecce36beSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5854ecce36beSmrg	    # necessary to make sure instantiated templates are included
5855ecce36beSmrg	    # in the archive.
5856ecce36beSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5857ecce36beSmrg	    ;;
5858ecce36beSmrg          *)
5859ecce36beSmrg	    if test "$GXX" = yes; then
5860ecce36beSmrg	      if test "$with_gnu_ld" = no; then
5861ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5862ecce36beSmrg	      else
5863ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5864ecce36beSmrg	      fi
5865ecce36beSmrg	    fi
5866ecce36beSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5867ecce36beSmrg	    ;;
5868ecce36beSmrg        esac
5869ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5870ecce36beSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5871ecce36beSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5872ecce36beSmrg        ;;
5873ecce36beSmrg
5874ecce36beSmrg      linux* | k*bsd*-gnu)
5875ecce36beSmrg        case $cc_basename in
5876ecce36beSmrg          KCC*)
5877ecce36beSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5878ecce36beSmrg
5879ecce36beSmrg	    # KCC will only create a shared library if the output file
5880ecce36beSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5881ecce36beSmrg	    # to its proper name (with version) after linking.
5882ecce36beSmrg	    _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'
5883ecce36beSmrg	    _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'
5884ecce36beSmrg	    # Commands to make compiler produce verbose output that lists
5885ecce36beSmrg	    # what "hidden" libraries, object files and flags are used when
5886ecce36beSmrg	    # linking a shared library.
5887ecce36beSmrg	    #
5888ecce36beSmrg	    # There doesn't appear to be a way to prevent this compiler from
5889ecce36beSmrg	    # explicitly linking system object files so we need to strip them
5890ecce36beSmrg	    # from the output so that they don't get included in the library
5891ecce36beSmrg	    # dependencies.
5892ecce36beSmrg	    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; $ECHO "X$list" | $Xsed'
5893ecce36beSmrg
5894ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5895ecce36beSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5896ecce36beSmrg
5897ecce36beSmrg	    # Archives containing C++ object files must be created using
5898ecce36beSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5899ecce36beSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5900ecce36beSmrg	    ;;
5901ecce36beSmrg	  icpc* | ecpc* )
5902ecce36beSmrg	    # Intel C++
5903ecce36beSmrg	    with_gnu_ld=yes
5904ecce36beSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5905ecce36beSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5906ecce36beSmrg	    # earlier do not add the objects themselves.
5907ecce36beSmrg	    case `$CC -V 2>&1` in
5908ecce36beSmrg	      *"Version 7."*)
5909ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5910ecce36beSmrg		_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'
5911ecce36beSmrg		;;
5912ecce36beSmrg	      *)  # Version 8.0 or newer
5913ecce36beSmrg	        tmp_idyn=
5914ecce36beSmrg	        case $host_cpu in
5915ecce36beSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
5916ecce36beSmrg		esac
5917ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5918ecce36beSmrg		_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'
5919ecce36beSmrg		;;
5920ecce36beSmrg	    esac
5921ecce36beSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5922ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5923ecce36beSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5924ecce36beSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5925ecce36beSmrg	    ;;
5926ecce36beSmrg          pgCC* | pgcpp*)
5927ecce36beSmrg            # Portland Group C++ compiler
5928ecce36beSmrg	    case `$CC -V` in
5929ecce36beSmrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5930ecce36beSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5931ecce36beSmrg		rm -rf $tpldir~
5932ecce36beSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5933ecce36beSmrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5934ecce36beSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5935ecce36beSmrg		rm -rf $tpldir~
5936ecce36beSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5937ecce36beSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5938ecce36beSmrg		$RANLIB $oldlib'
5939ecce36beSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5940ecce36beSmrg		rm -rf $tpldir~
5941ecce36beSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5942ecce36beSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5943ecce36beSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5944ecce36beSmrg		rm -rf $tpldir~
5945ecce36beSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5946ecce36beSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5947ecce36beSmrg	      ;;
5948ecce36beSmrg	    *) # Version 6 will use weak symbols
5949ecce36beSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5950ecce36beSmrg	      _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'
5951ecce36beSmrg	      ;;
5952ecce36beSmrg	    esac
5953ecce36beSmrg
5954ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5955ecce36beSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5956ecce36beSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5957ecce36beSmrg            ;;
5958ecce36beSmrg	  cxx*)
5959ecce36beSmrg	    # Compaq C++
5960ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5961ecce36beSmrg	    _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'
5962ecce36beSmrg
5963ecce36beSmrg	    runpath_var=LD_RUN_PATH
5964ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5965ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5966ecce36beSmrg
5967ecce36beSmrg	    # Commands to make compiler produce verbose output that lists
5968ecce36beSmrg	    # what "hidden" libraries, object files and flags are used when
5969ecce36beSmrg	    # linking a shared library.
5970ecce36beSmrg	    #
5971ecce36beSmrg	    # There doesn't appear to be a way to prevent this compiler from
5972ecce36beSmrg	    # explicitly linking system object files so we need to strip them
5973ecce36beSmrg	    # from the output so that they don't get included in the library
5974ecce36beSmrg	    # dependencies.
5975ecce36beSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5976ecce36beSmrg	    ;;
5977ecce36beSmrg	  xl*)
5978ecce36beSmrg	    # IBM XL 8.0 on PPC, with GNU ld
5979ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5980ecce36beSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5981ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5982ecce36beSmrg	    if test "x$supports_anon_versioning" = xyes; then
5983ecce36beSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5984ecce36beSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5985ecce36beSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5986ecce36beSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5987ecce36beSmrg	    fi
5988ecce36beSmrg	    ;;
5989ecce36beSmrg	  *)
5990ecce36beSmrg	    case `$CC -V 2>&1 | sed 5q` in
5991ecce36beSmrg	    *Sun\ C*)
5992ecce36beSmrg	      # Sun C++ 5.9
5993ecce36beSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5994ecce36beSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5995ecce36beSmrg	      _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'
5996ecce36beSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5997ecce36beSmrg	      _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5998ecce36beSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5999ecce36beSmrg
6000ecce36beSmrg	      # Not sure whether something based on
6001ecce36beSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6002ecce36beSmrg	      # would be better.
6003ecce36beSmrg	      output_verbose_link_cmd='echo'
6004ecce36beSmrg
6005ecce36beSmrg	      # Archives containing C++ object files must be created using
6006ecce36beSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6007ecce36beSmrg	      # necessary to make sure instantiated templates are included
6008ecce36beSmrg	      # in the archive.
6009ecce36beSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6010ecce36beSmrg	      ;;
6011ecce36beSmrg	    esac
6012ecce36beSmrg	    ;;
6013ecce36beSmrg	esac
6014ecce36beSmrg	;;
6015ecce36beSmrg
6016ecce36beSmrg      lynxos*)
6017ecce36beSmrg        # FIXME: insert proper C++ library support
6018ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6019ecce36beSmrg	;;
6020ecce36beSmrg
6021ecce36beSmrg      m88k*)
6022ecce36beSmrg        # FIXME: insert proper C++ library support
6023ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6024ecce36beSmrg	;;
6025ecce36beSmrg
6026ecce36beSmrg      mvs*)
6027ecce36beSmrg        case $cc_basename in
6028ecce36beSmrg          cxx*)
6029ecce36beSmrg	    # FIXME: insert proper C++ library support
6030ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6031ecce36beSmrg	    ;;
6032ecce36beSmrg	  *)
6033ecce36beSmrg	    # FIXME: insert proper C++ library support
6034ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6035ecce36beSmrg	    ;;
6036ecce36beSmrg	esac
6037ecce36beSmrg	;;
6038ecce36beSmrg
6039ecce36beSmrg      netbsd*)
6040ecce36beSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6041ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6042ecce36beSmrg	  wlarc=
6043ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6044ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6045ecce36beSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6046ecce36beSmrg	fi
6047ecce36beSmrg	# Workaround some broken pre-1.5 toolchains
6048ecce36beSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6049ecce36beSmrg	;;
6050ecce36beSmrg
6051ecce36beSmrg      *nto* | *qnx*)
6052ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6053ecce36beSmrg	;;
6054ecce36beSmrg
6055ecce36beSmrg      openbsd2*)
6056ecce36beSmrg        # C++ shared libraries are fairly broken
6057ecce36beSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6058ecce36beSmrg	;;
6059ecce36beSmrg
6060ecce36beSmrg      openbsd*)
6061ecce36beSmrg	if test -f /usr/libexec/ld.so; then
6062ecce36beSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6063ecce36beSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6064ecce36beSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6065ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6066ecce36beSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6067ecce36beSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6068ecce36beSmrg	    _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'
6069ecce36beSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6070ecce36beSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6071ecce36beSmrg	  fi
6072ecce36beSmrg	  output_verbose_link_cmd=echo
6073ecce36beSmrg	else
6074ecce36beSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6075ecce36beSmrg	fi
6076ecce36beSmrg	;;
6077ecce36beSmrg
6078ecce36beSmrg      osf3* | osf4* | osf5*)
6079ecce36beSmrg        case $cc_basename in
6080ecce36beSmrg          KCC*)
6081ecce36beSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6082ecce36beSmrg
6083ecce36beSmrg	    # KCC will only create a shared library if the output file
6084ecce36beSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6085ecce36beSmrg	    # to its proper name (with version) after linking.
6086ecce36beSmrg	    _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'
6087ecce36beSmrg
6088ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6089ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6090ecce36beSmrg
6091ecce36beSmrg	    # Archives containing C++ object files must be created using
6092ecce36beSmrg	    # the KAI C++ compiler.
6093ecce36beSmrg	    case $host in
6094ecce36beSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6095ecce36beSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6096ecce36beSmrg	    esac
6097ecce36beSmrg	    ;;
6098ecce36beSmrg          RCC*)
6099ecce36beSmrg	    # Rational C++ 2.4.1
6100ecce36beSmrg	    # FIXME: insert proper C++ library support
6101ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6102ecce36beSmrg	    ;;
6103ecce36beSmrg          cxx*)
6104ecce36beSmrg	    case $host in
6105ecce36beSmrg	      osf3*)
6106ecce36beSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6107ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6108ecce36beSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6109ecce36beSmrg		;;
6110ecce36beSmrg	      *)
6111ecce36beSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6112ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6113ecce36beSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6114ecce36beSmrg	          echo "-hidden">> $lib.exp~
6115ecce36beSmrg	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6116ecce36beSmrg	          $RM $lib.exp'
6117ecce36beSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6118ecce36beSmrg		;;
6119ecce36beSmrg	    esac
6120ecce36beSmrg
6121ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6122ecce36beSmrg
6123ecce36beSmrg	    # Commands to make compiler produce verbose output that lists
6124ecce36beSmrg	    # what "hidden" libraries, object files and flags are used when
6125ecce36beSmrg	    # linking a shared library.
6126ecce36beSmrg	    #
6127ecce36beSmrg	    # There doesn't appear to be a way to prevent this compiler from
6128ecce36beSmrg	    # explicitly linking system object files so we need to strip them
6129ecce36beSmrg	    # from the output so that they don't get included in the library
6130ecce36beSmrg	    # dependencies.
6131ecce36beSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6132ecce36beSmrg	    ;;
6133ecce36beSmrg	  *)
6134ecce36beSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6135ecce36beSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6136ecce36beSmrg	      case $host in
6137ecce36beSmrg	        osf3*)
6138ecce36beSmrg	          _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6139ecce36beSmrg		  ;;
6140ecce36beSmrg	        *)
6141ecce36beSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6142ecce36beSmrg		  ;;
6143ecce36beSmrg	      esac
6144ecce36beSmrg
6145ecce36beSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6146ecce36beSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6147ecce36beSmrg
6148ecce36beSmrg	      # Commands to make compiler produce verbose output that lists
6149ecce36beSmrg	      # what "hidden" libraries, object files and flags are used when
6150ecce36beSmrg	      # linking a shared library.
6151ecce36beSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6152ecce36beSmrg
6153ecce36beSmrg	    else
6154ecce36beSmrg	      # FIXME: insert proper C++ library support
6155ecce36beSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6156ecce36beSmrg	    fi
6157ecce36beSmrg	    ;;
6158ecce36beSmrg        esac
6159ecce36beSmrg        ;;
6160ecce36beSmrg
6161ecce36beSmrg      psos*)
6162ecce36beSmrg        # FIXME: insert proper C++ library support
6163ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6164ecce36beSmrg        ;;
6165ecce36beSmrg
6166ecce36beSmrg      sunos4*)
6167ecce36beSmrg        case $cc_basename in
6168ecce36beSmrg          CC*)
6169ecce36beSmrg	    # Sun C++ 4.x
6170ecce36beSmrg	    # FIXME: insert proper C++ library support
6171ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6172ecce36beSmrg	    ;;
6173ecce36beSmrg          lcc*)
6174ecce36beSmrg	    # Lucid
6175ecce36beSmrg	    # FIXME: insert proper C++ library support
6176ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6177ecce36beSmrg	    ;;
6178ecce36beSmrg          *)
6179ecce36beSmrg	    # FIXME: insert proper C++ library support
6180ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6181ecce36beSmrg	    ;;
6182ecce36beSmrg        esac
6183ecce36beSmrg        ;;
6184ecce36beSmrg
6185ecce36beSmrg      solaris*)
6186ecce36beSmrg        case $cc_basename in
6187ecce36beSmrg          CC*)
6188ecce36beSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6189ecce36beSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6190ecce36beSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6191ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6192ecce36beSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6193ecce36beSmrg	      $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'
6194ecce36beSmrg
6195ecce36beSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6196ecce36beSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6197ecce36beSmrg	    case $host_os in
6198ecce36beSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6199ecce36beSmrg	      *)
6200ecce36beSmrg		# The compiler driver will combine and reorder linker options,
6201ecce36beSmrg		# but understands `-z linker_flag'.
6202ecce36beSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6203ecce36beSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6204ecce36beSmrg	        ;;
6205ecce36beSmrg	    esac
6206ecce36beSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6207ecce36beSmrg
6208ecce36beSmrg	    output_verbose_link_cmd='echo'
6209ecce36beSmrg
6210ecce36beSmrg	    # Archives containing C++ object files must be created using
6211ecce36beSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6212ecce36beSmrg	    # necessary to make sure instantiated templates are included
6213ecce36beSmrg	    # in the archive.
6214ecce36beSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6215ecce36beSmrg	    ;;
6216ecce36beSmrg          gcx*)
6217ecce36beSmrg	    # Green Hills C++ Compiler
6218ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6219ecce36beSmrg
6220ecce36beSmrg	    # The C++ compiler must be used to create the archive.
6221ecce36beSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6222ecce36beSmrg	    ;;
6223ecce36beSmrg          *)
6224ecce36beSmrg	    # GNU C++ compiler with Solaris linker
6225ecce36beSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6226ecce36beSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6227ecce36beSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6228ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6229ecce36beSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6230ecce36beSmrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6231ecce36beSmrg
6232ecce36beSmrg	        # Commands to make compiler produce verbose output that lists
6233ecce36beSmrg	        # what "hidden" libraries, object files and flags are used when
6234ecce36beSmrg	        # linking a shared library.
6235ecce36beSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6236ecce36beSmrg	      else
6237ecce36beSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6238ecce36beSmrg	        # platform.
6239ecce36beSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6240ecce36beSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6241ecce36beSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6242ecce36beSmrg
6243ecce36beSmrg	        # Commands to make compiler produce verbose output that lists
6244ecce36beSmrg	        # what "hidden" libraries, object files and flags are used when
6245ecce36beSmrg	        # linking a shared library.
6246ecce36beSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6247ecce36beSmrg	      fi
6248ecce36beSmrg
6249ecce36beSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6250ecce36beSmrg	      case $host_os in
6251ecce36beSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6252ecce36beSmrg		*)
6253ecce36beSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6254ecce36beSmrg		  ;;
6255ecce36beSmrg	      esac
6256ecce36beSmrg	    fi
6257ecce36beSmrg	    ;;
6258ecce36beSmrg        esac
6259ecce36beSmrg        ;;
6260ecce36beSmrg
6261ecce36beSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6262ecce36beSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6263ecce36beSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6264ecce36beSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6265ecce36beSmrg      runpath_var='LD_RUN_PATH'
6266ecce36beSmrg
6267ecce36beSmrg      case $cc_basename in
6268ecce36beSmrg        CC*)
6269ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6270ecce36beSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6271ecce36beSmrg	  ;;
6272ecce36beSmrg	*)
6273ecce36beSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6274ecce36beSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6275ecce36beSmrg	  ;;
6276ecce36beSmrg      esac
6277ecce36beSmrg      ;;
6278ecce36beSmrg
6279ecce36beSmrg      sysv5* | sco3.2v5* | sco5v6*)
6280ecce36beSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
6281ecce36beSmrg	# link with -lc, and that would cause any symbols used from libc to
6282ecce36beSmrg	# always be unresolved, which means just about no library would
6283ecce36beSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
6284ecce36beSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
6285ecce36beSmrg	# as -z defs.
6286ecce36beSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6287ecce36beSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6288ecce36beSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6289ecce36beSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6291ecce36beSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6292ecce36beSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6293ecce36beSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6294ecce36beSmrg	runpath_var='LD_RUN_PATH'
6295ecce36beSmrg
6296ecce36beSmrg	case $cc_basename in
6297ecce36beSmrg          CC*)
6298ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6299ecce36beSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6300ecce36beSmrg	    ;;
6301ecce36beSmrg	  *)
6302ecce36beSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6303ecce36beSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6304ecce36beSmrg	    ;;
6305ecce36beSmrg	esac
6306ecce36beSmrg      ;;
6307ecce36beSmrg
6308ecce36beSmrg      tandem*)
6309ecce36beSmrg        case $cc_basename in
6310ecce36beSmrg          NCC*)
6311ecce36beSmrg	    # NonStop-UX NCC 3.20
6312ecce36beSmrg	    # FIXME: insert proper C++ library support
6313ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6314ecce36beSmrg	    ;;
6315ecce36beSmrg          *)
6316ecce36beSmrg	    # FIXME: insert proper C++ library support
6317ecce36beSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6318ecce36beSmrg	    ;;
6319ecce36beSmrg        esac
6320ecce36beSmrg        ;;
6321ecce36beSmrg
6322ecce36beSmrg      vxworks*)
6323ecce36beSmrg        # FIXME: insert proper C++ library support
6324ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6325ecce36beSmrg        ;;
6326ecce36beSmrg
6327ecce36beSmrg      *)
6328ecce36beSmrg        # FIXME: insert proper C++ library support
6329ecce36beSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6330ecce36beSmrg        ;;
6331ecce36beSmrg    esac
6332ecce36beSmrg
6333ecce36beSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6334ecce36beSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6335ecce36beSmrg
6336ecce36beSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
6337ecce36beSmrg    _LT_TAGVAR(LD, $1)="$LD"
6338ecce36beSmrg
6339ecce36beSmrg    ## CAVEAT EMPTOR:
6340ecce36beSmrg    ## There is no encapsulation within the following macros, do not change
6341ecce36beSmrg    ## the running order or otherwise move them around unless you know exactly
6342ecce36beSmrg    ## what you are doing...
6343ecce36beSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6344ecce36beSmrg    _LT_COMPILER_PIC($1)
6345ecce36beSmrg    _LT_COMPILER_C_O($1)
6346ecce36beSmrg    _LT_COMPILER_FILE_LOCKS($1)
6347ecce36beSmrg    _LT_LINKER_SHLIBS($1)
6348ecce36beSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6349ecce36beSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6350ecce36beSmrg
6351ecce36beSmrg    _LT_CONFIG($1)
6352ecce36beSmrg  fi # test -n "$compiler"
6353ecce36beSmrg
6354ecce36beSmrg  CC=$lt_save_CC
6355ecce36beSmrg  LDCXX=$LD
6356ecce36beSmrg  LD=$lt_save_LD
6357ecce36beSmrg  GCC=$lt_save_GCC
6358ecce36beSmrg  with_gnu_ld=$lt_save_with_gnu_ld
6359ecce36beSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6360ecce36beSmrg  lt_cv_path_LD=$lt_save_path_LD
6361ecce36beSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6362ecce36beSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6363ecce36beSmrgfi # test "$_lt_caught_CXX_error" != yes
6364ecce36beSmrg
6365ecce36beSmrgAC_LANG_POP
6366ecce36beSmrg])# _LT_LANG_CXX_CONFIG
6367ecce36beSmrg
6368ecce36beSmrg
6369ecce36beSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6370ecce36beSmrg# ---------------------------------
6371ecce36beSmrg# Figure out "hidden" library dependencies from verbose
6372ecce36beSmrg# compiler output when linking a shared library.
6373ecce36beSmrg# Parse the compiler output and extract the necessary
6374ecce36beSmrg# objects, libraries and library flags.
6375ecce36beSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6376ecce36beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6377ecce36beSmrg# Dependencies to place before and after the object being linked:
6378ecce36beSmrg_LT_TAGVAR(predep_objects, $1)=
6379ecce36beSmrg_LT_TAGVAR(postdep_objects, $1)=
6380ecce36beSmrg_LT_TAGVAR(predeps, $1)=
6381ecce36beSmrg_LT_TAGVAR(postdeps, $1)=
6382ecce36beSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6383ecce36beSmrg
6384ecce36beSmrgdnl we can't use the lt_simple_compile_test_code here,
6385ecce36beSmrgdnl because it contains code intended for an executable,
6386ecce36beSmrgdnl not a library.  It's possible we should let each
6387ecce36beSmrgdnl tag define a new lt_????_link_test_code variable,
6388ecce36beSmrgdnl but it's only used here...
6389ecce36beSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6390ecce36beSmrgint a;
6391ecce36beSmrgvoid foo (void) { a = 0; }
6392ecce36beSmrg_LT_EOF
6393ecce36beSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6394ecce36beSmrgclass Foo
6395ecce36beSmrg{
6396ecce36beSmrgpublic:
6397ecce36beSmrg  Foo (void) { a = 0; }
6398ecce36beSmrgprivate:
6399ecce36beSmrg  int a;
6400ecce36beSmrg};
6401ecce36beSmrg_LT_EOF
6402ecce36beSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6403ecce36beSmrg      subroutine foo
6404ecce36beSmrg      implicit none
6405ecce36beSmrg      integer*4 a
6406ecce36beSmrg      a=0
6407ecce36beSmrg      return
6408ecce36beSmrg      end
6409ecce36beSmrg_LT_EOF
6410ecce36beSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6411ecce36beSmrg      subroutine foo
6412ecce36beSmrg      implicit none
6413ecce36beSmrg      integer a
6414ecce36beSmrg      a=0
6415ecce36beSmrg      return
6416ecce36beSmrg      end
6417ecce36beSmrg_LT_EOF
6418ecce36beSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6419ecce36beSmrgpublic class foo {
6420ecce36beSmrg  private int a;
6421ecce36beSmrg  public void bar (void) {
6422ecce36beSmrg    a = 0;
6423ecce36beSmrg  }
6424ecce36beSmrg};
6425ecce36beSmrg_LT_EOF
6426ecce36beSmrg])
6427ecce36beSmrgdnl Parse the compiler output and extract the necessary
6428ecce36beSmrgdnl objects, libraries and library flags.
6429ecce36beSmrgif AC_TRY_EVAL(ac_compile); then
6430ecce36beSmrg  # Parse the compiler output and extract the necessary
6431ecce36beSmrg  # objects, libraries and library flags.
6432ecce36beSmrg
6433ecce36beSmrg  # Sentinel used to keep track of whether or not we are before
6434ecce36beSmrg  # the conftest object file.
6435ecce36beSmrg  pre_test_object_deps_done=no
6436ecce36beSmrg
6437ecce36beSmrg  for p in `eval "$output_verbose_link_cmd"`; do
6438ecce36beSmrg    case $p in
6439ecce36beSmrg
6440ecce36beSmrg    -L* | -R* | -l*)
6441ecce36beSmrg       # Some compilers place space between "-{L,R}" and the path.
6442ecce36beSmrg       # Remove the space.
6443ecce36beSmrg       if test $p = "-L" ||
6444ecce36beSmrg          test $p = "-R"; then
6445ecce36beSmrg	 prev=$p
6446ecce36beSmrg	 continue
6447ecce36beSmrg       else
6448ecce36beSmrg	 prev=
6449ecce36beSmrg       fi
6450ecce36beSmrg
6451ecce36beSmrg       if test "$pre_test_object_deps_done" = no; then
6452ecce36beSmrg	 case $p in
6453ecce36beSmrg	 -L* | -R*)
6454ecce36beSmrg	   # Internal compiler library paths should come after those
6455ecce36beSmrg	   # provided the user.  The postdeps already come after the
6456ecce36beSmrg	   # user supplied libs so there is no need to process them.
6457ecce36beSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6458ecce36beSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6459ecce36beSmrg	   else
6460ecce36beSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6461ecce36beSmrg	   fi
6462ecce36beSmrg	   ;;
6463ecce36beSmrg	 # The "-l" case would never come before the object being
6464ecce36beSmrg	 # linked, so don't bother handling this case.
6465ecce36beSmrg	 esac
6466ecce36beSmrg       else
6467ecce36beSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6468ecce36beSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6469ecce36beSmrg	 else
6470ecce36beSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6471ecce36beSmrg	 fi
6472ecce36beSmrg       fi
6473ecce36beSmrg       ;;
6474ecce36beSmrg
6475ecce36beSmrg    *.$objext)
6476ecce36beSmrg       # This assumes that the test object file only shows up
6477ecce36beSmrg       # once in the compiler output.
6478ecce36beSmrg       if test "$p" = "conftest.$objext"; then
6479ecce36beSmrg	 pre_test_object_deps_done=yes
6480ecce36beSmrg	 continue
6481ecce36beSmrg       fi
6482ecce36beSmrg
6483ecce36beSmrg       if test "$pre_test_object_deps_done" = no; then
6484ecce36beSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6485ecce36beSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6486ecce36beSmrg	 else
6487ecce36beSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6488ecce36beSmrg	 fi
6489ecce36beSmrg       else
6490ecce36beSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6491ecce36beSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6492ecce36beSmrg	 else
6493ecce36beSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6494ecce36beSmrg	 fi
6495ecce36beSmrg       fi
6496ecce36beSmrg       ;;
6497ecce36beSmrg
6498ecce36beSmrg    *) ;; # Ignore the rest.
6499ecce36beSmrg
6500ecce36beSmrg    esac
6501ecce36beSmrg  done
6502ecce36beSmrg
6503ecce36beSmrg  # Clean up.
6504ecce36beSmrg  rm -f a.out a.exe
6505ecce36beSmrgelse
6506ecce36beSmrg  echo "libtool.m4: error: problem compiling $1 test program"
6507ecce36beSmrgfi
6508ecce36beSmrg
6509ecce36beSmrg$RM -f confest.$objext
6510ecce36beSmrg
6511ecce36beSmrg# PORTME: override above test on systems where it is broken
6512ecce36beSmrgm4_if([$1], [CXX],
6513ecce36beSmrg[case $host_os in
6514ecce36beSmrginterix[[3-9]]*)
6515ecce36beSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6516ecce36beSmrg  # hack all around it, let's just trust "g++" to DTRT.
6517ecce36beSmrg  _LT_TAGVAR(predep_objects,$1)=
6518ecce36beSmrg  _LT_TAGVAR(postdep_objects,$1)=
6519ecce36beSmrg  _LT_TAGVAR(postdeps,$1)=
6520ecce36beSmrg  ;;
6521ecce36beSmrg
6522ecce36beSmrglinux*)
6523ecce36beSmrg  case `$CC -V 2>&1 | sed 5q` in
6524ecce36beSmrg  *Sun\ C*)
6525ecce36beSmrg    # Sun C++ 5.9
6526ecce36beSmrg
6527ecce36beSmrg    # The more standards-conforming stlport4 library is
6528ecce36beSmrg    # incompatible with the Cstd library. Avoid specifying
6529ecce36beSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6530ecce36beSmrg    # -library=stlport4 depends on it.
6531ecce36beSmrg    case " $CXX $CXXFLAGS " in
6532ecce36beSmrg    *" -library=stlport4 "*)
6533ecce36beSmrg      solaris_use_stlport4=yes
6534ecce36beSmrg      ;;
6535ecce36beSmrg    esac
6536ecce36beSmrg
6537ecce36beSmrg    if test "$solaris_use_stlport4" != yes; then
6538ecce36beSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6539ecce36beSmrg    fi
6540ecce36beSmrg    ;;
6541ecce36beSmrg  esac
6542ecce36beSmrg  ;;
6543ecce36beSmrg
6544ecce36beSmrgsolaris*)
6545ecce36beSmrg  case $cc_basename in
6546ecce36beSmrg  CC*)
6547ecce36beSmrg    # The more standards-conforming stlport4 library is
6548ecce36beSmrg    # incompatible with the Cstd library. Avoid specifying
6549ecce36beSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6550ecce36beSmrg    # -library=stlport4 depends on it.
6551ecce36beSmrg    case " $CXX $CXXFLAGS " in
6552ecce36beSmrg    *" -library=stlport4 "*)
6553ecce36beSmrg      solaris_use_stlport4=yes
6554ecce36beSmrg      ;;
6555ecce36beSmrg    esac
6556ecce36beSmrg
6557ecce36beSmrg    # Adding this requires a known-good setup of shared libraries for
6558ecce36beSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
6559ecce36beSmrg    # archive will be linked into the output, leading to subtle bugs.
6560ecce36beSmrg    if test "$solaris_use_stlport4" != yes; then
6561ecce36beSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6562ecce36beSmrg    fi
6563ecce36beSmrg    ;;
6564ecce36beSmrg  esac
6565ecce36beSmrg  ;;
6566ecce36beSmrgesac
6567ecce36beSmrg])
6568ecce36beSmrg
6569ecce36beSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
6570ecce36beSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6571ecce36beSmrgesac
6572ecce36beSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6573ecce36beSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6574ecce36beSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6575ecce36beSmrgfi
6576ecce36beSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6577ecce36beSmrg    [The directories searched by this compiler when creating a shared library])
6578ecce36beSmrg_LT_TAGDECL([], [predep_objects], [1],
6579ecce36beSmrg    [Dependencies to place before and after the objects being linked to
6580ecce36beSmrg    create a shared library])
6581ecce36beSmrg_LT_TAGDECL([], [postdep_objects], [1])
6582ecce36beSmrg_LT_TAGDECL([], [predeps], [1])
6583ecce36beSmrg_LT_TAGDECL([], [postdeps], [1])
6584ecce36beSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6585ecce36beSmrg    [The library search path used internally by the compiler when linking
6586ecce36beSmrg    a shared library])
6587ecce36beSmrg])# _LT_SYS_HIDDEN_LIBDEPS
6588ecce36beSmrg
6589ecce36beSmrg
6590ecce36beSmrg# _LT_PROG_F77
6591ecce36beSmrg# ------------
6592ecce36beSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6593ecce36beSmrg# if there is no fortran compiler, we have our own version here.
6594ecce36beSmrgm4_defun([_LT_PROG_F77],
6595ecce36beSmrg[
6596ecce36beSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6597ecce36beSmrgAC_PROG_F77
6598ecce36beSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
6599ecce36beSmrg  _lt_disable_F77=yes
6600ecce36beSmrgfi
6601ecce36beSmrgpopdef([AC_MSG_ERROR])
6602ecce36beSmrg])# _LT_PROG_F77
6603ecce36beSmrg
6604ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
6605ecce36beSmrgdnl AC_DEFUN([_LT_PROG_F77], [])
6606ecce36beSmrg
6607ecce36beSmrg
6608ecce36beSmrg# _LT_LANG_F77_CONFIG([TAG])
6609ecce36beSmrg# --------------------------
6610ecce36beSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
6611ecce36beSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6612ecce36beSmrg# to write the compiler configuration to `libtool'.
6613ecce36beSmrgm4_defun([_LT_LANG_F77_CONFIG],
6614ecce36beSmrg[AC_REQUIRE([_LT_PROG_F77])dnl
6615ecce36beSmrgAC_LANG_PUSH(Fortran 77)
6616ecce36beSmrg
6617ecce36beSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6618ecce36beSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6619ecce36beSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6620ecce36beSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6621ecce36beSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6622ecce36beSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6623ecce36beSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6624ecce36beSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6625ecce36beSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6626ecce36beSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6627ecce36beSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6628ecce36beSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6629ecce36beSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6630ecce36beSmrg_LT_TAGVAR(module_cmds, $1)=
6631ecce36beSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6632ecce36beSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6633ecce36beSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6634ecce36beSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6635ecce36beSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6636ecce36beSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6637ecce36beSmrg
6638ecce36beSmrg# Source file extension for f77 test sources.
6639ecce36beSmrgac_ext=f
6640ecce36beSmrg
6641ecce36beSmrg# Object file extension for compiled f77 test sources.
6642ecce36beSmrgobjext=o
6643ecce36beSmrg_LT_TAGVAR(objext, $1)=$objext
6644ecce36beSmrg
6645ecce36beSmrg# No sense in running all these tests if we already determined that
6646ecce36beSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6647ecce36beSmrg# are currently assumed to apply to all compilers on this platform,
6648ecce36beSmrg# and will be corrupted by setting them based on a non-working compiler.
6649ecce36beSmrgif test "$_lt_disable_F77" != yes; then
6650ecce36beSmrg  # Code to be used in simple compile tests
6651ecce36beSmrg  lt_simple_compile_test_code="\
6652ecce36beSmrg      subroutine t
6653ecce36beSmrg      return
6654ecce36beSmrg      end
6655ecce36beSmrg"
6656ecce36beSmrg
6657ecce36beSmrg  # Code to be used in simple link tests
6658ecce36beSmrg  lt_simple_link_test_code="\
6659ecce36beSmrg      program t
6660ecce36beSmrg      end
6661ecce36beSmrg"
6662ecce36beSmrg
6663ecce36beSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6664ecce36beSmrg  _LT_TAG_COMPILER
6665ecce36beSmrg
6666ecce36beSmrg  # save warnings/boilerplate of simple test code
6667ecce36beSmrg  _LT_COMPILER_BOILERPLATE
6668ecce36beSmrg  _LT_LINKER_BOILERPLATE
6669ecce36beSmrg
6670ecce36beSmrg  # Allow CC to be a program name with arguments.
6671ecce36beSmrg  lt_save_CC="$CC"
6672ecce36beSmrg  lt_save_GCC=$GCC
6673ecce36beSmrg  CC=${F77-"f77"}
6674ecce36beSmrg  compiler=$CC
6675ecce36beSmrg  _LT_TAGVAR(compiler, $1)=$CC
6676ecce36beSmrg  _LT_CC_BASENAME([$compiler])
6677ecce36beSmrg  GCC=$G77
6678ecce36beSmrg  if test -n "$compiler"; then
6679ecce36beSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6680ecce36beSmrg    AC_MSG_RESULT([$can_build_shared])
6681ecce36beSmrg
6682ecce36beSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6683ecce36beSmrg    test "$can_build_shared" = "no" && enable_shared=no
6684ecce36beSmrg
6685ecce36beSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6686ecce36beSmrg    # are all built from PIC.
6687ecce36beSmrg    case $host_os in
6688ecce36beSmrg      aix3*)
6689ecce36beSmrg        test "$enable_shared" = yes && enable_static=no
6690ecce36beSmrg        if test -n "$RANLIB"; then
6691ecce36beSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6692ecce36beSmrg          postinstall_cmds='$RANLIB $lib'
6693ecce36beSmrg        fi
6694ecce36beSmrg        ;;
6695ecce36beSmrg      aix[[4-9]]*)
6696ecce36beSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6697ecce36beSmrg	  test "$enable_shared" = yes && enable_static=no
6698ecce36beSmrg	fi
6699ecce36beSmrg        ;;
6700ecce36beSmrg    esac
6701ecce36beSmrg    AC_MSG_RESULT([$enable_shared])
6702ecce36beSmrg
6703ecce36beSmrg    AC_MSG_CHECKING([whether to build static libraries])
6704ecce36beSmrg    # Make sure either enable_shared or enable_static is yes.
6705ecce36beSmrg    test "$enable_shared" = yes || enable_static=yes
6706ecce36beSmrg    AC_MSG_RESULT([$enable_static])
6707ecce36beSmrg
6708ecce36beSmrg    _LT_TAGVAR(GCC, $1)="$G77"
6709ecce36beSmrg    _LT_TAGVAR(LD, $1)="$LD"
6710ecce36beSmrg
6711ecce36beSmrg    ## CAVEAT EMPTOR:
6712ecce36beSmrg    ## There is no encapsulation within the following macros, do not change
6713ecce36beSmrg    ## the running order or otherwise move them around unless you know exactly
6714ecce36beSmrg    ## what you are doing...
6715ecce36beSmrg    _LT_COMPILER_PIC($1)
6716ecce36beSmrg    _LT_COMPILER_C_O($1)
6717ecce36beSmrg    _LT_COMPILER_FILE_LOCKS($1)
6718ecce36beSmrg    _LT_LINKER_SHLIBS($1)
6719ecce36beSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6720ecce36beSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6721ecce36beSmrg
6722ecce36beSmrg    _LT_CONFIG($1)
6723ecce36beSmrg  fi # test -n "$compiler"
6724ecce36beSmrg
6725ecce36beSmrg  GCC=$lt_save_GCC
6726ecce36beSmrg  CC="$lt_save_CC"
6727ecce36beSmrgfi # test "$_lt_disable_F77" != yes
6728ecce36beSmrg
6729ecce36beSmrgAC_LANG_POP
6730ecce36beSmrg])# _LT_LANG_F77_CONFIG
6731ecce36beSmrg
6732ecce36beSmrg
6733ecce36beSmrg# _LT_PROG_FC
6734ecce36beSmrg# -----------
6735ecce36beSmrg# Since AC_PROG_FC is broken, in that it returns the empty string
6736ecce36beSmrg# if there is no fortran compiler, we have our own version here.
6737ecce36beSmrgm4_defun([_LT_PROG_FC],
6738ecce36beSmrg[
6739ecce36beSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6740ecce36beSmrgAC_PROG_FC
6741ecce36beSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
6742ecce36beSmrg  _lt_disable_FC=yes
6743ecce36beSmrgfi
6744ecce36beSmrgpopdef([AC_MSG_ERROR])
6745ecce36beSmrg])# _LT_PROG_FC
6746ecce36beSmrg
6747ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
6748ecce36beSmrgdnl AC_DEFUN([_LT_PROG_FC], [])
6749ecce36beSmrg
6750ecce36beSmrg
6751ecce36beSmrg# _LT_LANG_FC_CONFIG([TAG])
6752ecce36beSmrg# -------------------------
6753ecce36beSmrg# Ensure that the configuration variables for a Fortran compiler are
6754ecce36beSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6755ecce36beSmrg# to write the compiler configuration to `libtool'.
6756ecce36beSmrgm4_defun([_LT_LANG_FC_CONFIG],
6757ecce36beSmrg[AC_REQUIRE([_LT_PROG_FC])dnl
6758ecce36beSmrgAC_LANG_PUSH(Fortran)
6759ecce36beSmrg
6760ecce36beSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6761ecce36beSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6762ecce36beSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6763ecce36beSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6764ecce36beSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6765ecce36beSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6766ecce36beSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6767ecce36beSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6768ecce36beSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6769ecce36beSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6770ecce36beSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6771ecce36beSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6772ecce36beSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6773ecce36beSmrg_LT_TAGVAR(module_cmds, $1)=
6774ecce36beSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6775ecce36beSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6776ecce36beSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6777ecce36beSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6778ecce36beSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6779ecce36beSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6780ecce36beSmrg
6781ecce36beSmrg# Source file extension for fc test sources.
6782ecce36beSmrgac_ext=${ac_fc_srcext-f}
6783ecce36beSmrg
6784ecce36beSmrg# Object file extension for compiled fc test sources.
6785ecce36beSmrgobjext=o
6786ecce36beSmrg_LT_TAGVAR(objext, $1)=$objext
6787ecce36beSmrg
6788ecce36beSmrg# No sense in running all these tests if we already determined that
6789ecce36beSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
6790ecce36beSmrg# are currently assumed to apply to all compilers on this platform,
6791ecce36beSmrg# and will be corrupted by setting them based on a non-working compiler.
6792ecce36beSmrgif test "$_lt_disable_FC" != yes; then
6793ecce36beSmrg  # Code to be used in simple compile tests
6794ecce36beSmrg  lt_simple_compile_test_code="\
6795ecce36beSmrg      subroutine t
6796ecce36beSmrg      return
6797ecce36beSmrg      end
6798ecce36beSmrg"
6799ecce36beSmrg
6800ecce36beSmrg  # Code to be used in simple link tests
6801ecce36beSmrg  lt_simple_link_test_code="\
6802ecce36beSmrg      program t
6803ecce36beSmrg      end
6804ecce36beSmrg"
6805ecce36beSmrg
6806ecce36beSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6807ecce36beSmrg  _LT_TAG_COMPILER
6808ecce36beSmrg
6809ecce36beSmrg  # save warnings/boilerplate of simple test code
6810ecce36beSmrg  _LT_COMPILER_BOILERPLATE
6811ecce36beSmrg  _LT_LINKER_BOILERPLATE
6812ecce36beSmrg
6813ecce36beSmrg  # Allow CC to be a program name with arguments.
6814ecce36beSmrg  lt_save_CC="$CC"
6815ecce36beSmrg  lt_save_GCC=$GCC
6816ecce36beSmrg  CC=${FC-"f95"}
6817ecce36beSmrg  compiler=$CC
6818ecce36beSmrg  GCC=$ac_cv_fc_compiler_gnu
6819ecce36beSmrg
6820ecce36beSmrg  _LT_TAGVAR(compiler, $1)=$CC
6821ecce36beSmrg  _LT_CC_BASENAME([$compiler])
6822ecce36beSmrg
6823ecce36beSmrg  if test -n "$compiler"; then
6824ecce36beSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6825ecce36beSmrg    AC_MSG_RESULT([$can_build_shared])
6826ecce36beSmrg
6827ecce36beSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6828ecce36beSmrg    test "$can_build_shared" = "no" && enable_shared=no
6829ecce36beSmrg
6830ecce36beSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6831ecce36beSmrg    # are all built from PIC.
6832ecce36beSmrg    case $host_os in
6833ecce36beSmrg      aix3*)
6834ecce36beSmrg        test "$enable_shared" = yes && enable_static=no
6835ecce36beSmrg        if test -n "$RANLIB"; then
6836ecce36beSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6837ecce36beSmrg          postinstall_cmds='$RANLIB $lib'
6838ecce36beSmrg        fi
6839ecce36beSmrg        ;;
6840ecce36beSmrg      aix[[4-9]]*)
6841ecce36beSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6842ecce36beSmrg	  test "$enable_shared" = yes && enable_static=no
6843ecce36beSmrg	fi
6844ecce36beSmrg        ;;
6845ecce36beSmrg    esac
6846ecce36beSmrg    AC_MSG_RESULT([$enable_shared])
6847ecce36beSmrg
6848ecce36beSmrg    AC_MSG_CHECKING([whether to build static libraries])
6849ecce36beSmrg    # Make sure either enable_shared or enable_static is yes.
6850ecce36beSmrg    test "$enable_shared" = yes || enable_static=yes
6851ecce36beSmrg    AC_MSG_RESULT([$enable_static])
6852ecce36beSmrg
6853ecce36beSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6854ecce36beSmrg    _LT_TAGVAR(LD, $1)="$LD"
6855ecce36beSmrg
6856ecce36beSmrg    ## CAVEAT EMPTOR:
6857ecce36beSmrg    ## There is no encapsulation within the following macros, do not change
6858ecce36beSmrg    ## the running order or otherwise move them around unless you know exactly
6859ecce36beSmrg    ## what you are doing...
6860ecce36beSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6861ecce36beSmrg    _LT_COMPILER_PIC($1)
6862ecce36beSmrg    _LT_COMPILER_C_O($1)
6863ecce36beSmrg    _LT_COMPILER_FILE_LOCKS($1)
6864ecce36beSmrg    _LT_LINKER_SHLIBS($1)
6865ecce36beSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6866ecce36beSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6867ecce36beSmrg
6868ecce36beSmrg    _LT_CONFIG($1)
6869ecce36beSmrg  fi # test -n "$compiler"
6870ecce36beSmrg
6871ecce36beSmrg  GCC=$lt_save_GCC
6872ecce36beSmrg  CC="$lt_save_CC"
6873ecce36beSmrgfi # test "$_lt_disable_FC" != yes
6874ecce36beSmrg
6875ecce36beSmrgAC_LANG_POP
6876ecce36beSmrg])# _LT_LANG_FC_CONFIG
6877ecce36beSmrg
6878ecce36beSmrg
6879ecce36beSmrg# _LT_LANG_GCJ_CONFIG([TAG])
6880ecce36beSmrg# --------------------------
6881ecce36beSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6882ecce36beSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6883ecce36beSmrg# to write the compiler configuration to `libtool'.
6884ecce36beSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
6885ecce36beSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6886ecce36beSmrgAC_LANG_SAVE
6887ecce36beSmrg
6888ecce36beSmrg# Source file extension for Java test sources.
6889ecce36beSmrgac_ext=java
6890ecce36beSmrg
6891ecce36beSmrg# Object file extension for compiled Java test sources.
6892ecce36beSmrgobjext=o
6893ecce36beSmrg_LT_TAGVAR(objext, $1)=$objext
6894ecce36beSmrg
6895ecce36beSmrg# Code to be used in simple compile tests
6896ecce36beSmrglt_simple_compile_test_code="class foo {}"
6897ecce36beSmrg
6898ecce36beSmrg# Code to be used in simple link tests
6899ecce36beSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6900ecce36beSmrg
6901ecce36beSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6902ecce36beSmrg_LT_TAG_COMPILER
6903ecce36beSmrg
6904ecce36beSmrg# save warnings/boilerplate of simple test code
6905ecce36beSmrg_LT_COMPILER_BOILERPLATE
6906ecce36beSmrg_LT_LINKER_BOILERPLATE
6907ecce36beSmrg
6908ecce36beSmrg# Allow CC to be a program name with arguments.
6909ecce36beSmrglt_save_CC="$CC"
6910ecce36beSmrglt_save_GCC=$GCC
6911ecce36beSmrgGCC=yes
6912ecce36beSmrgCC=${GCJ-"gcj"}
6913ecce36beSmrgcompiler=$CC
6914ecce36beSmrg_LT_TAGVAR(compiler, $1)=$CC
6915ecce36beSmrg_LT_TAGVAR(LD, $1)="$LD"
6916ecce36beSmrg_LT_CC_BASENAME([$compiler])
6917ecce36beSmrg
6918ecce36beSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6919ecce36beSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6920ecce36beSmrg
6921ecce36beSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6922ecce36beSmrg
6923ecce36beSmrgif test -n "$compiler"; then
6924ecce36beSmrg  _LT_COMPILER_NO_RTTI($1)
6925ecce36beSmrg  _LT_COMPILER_PIC($1)
6926ecce36beSmrg  _LT_COMPILER_C_O($1)
6927ecce36beSmrg  _LT_COMPILER_FILE_LOCKS($1)
6928ecce36beSmrg  _LT_LINKER_SHLIBS($1)
6929ecce36beSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6930ecce36beSmrg
6931ecce36beSmrg  _LT_CONFIG($1)
6932ecce36beSmrgfi
6933ecce36beSmrg
6934ecce36beSmrgAC_LANG_RESTORE
6935ecce36beSmrg
6936ecce36beSmrgGCC=$lt_save_GCC
6937ecce36beSmrgCC="$lt_save_CC"
6938ecce36beSmrg])# _LT_LANG_GCJ_CONFIG
6939ecce36beSmrg
6940ecce36beSmrg
6941ecce36beSmrg# _LT_LANG_RC_CONFIG([TAG])
6942ecce36beSmrg# -------------------------
6943ecce36beSmrg# Ensure that the configuration variables for the Windows resource compiler
6944ecce36beSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6945ecce36beSmrg# to write the compiler configuration to `libtool'.
6946ecce36beSmrgm4_defun([_LT_LANG_RC_CONFIG],
6947ecce36beSmrg[AC_REQUIRE([LT_PROG_RC])dnl
6948ecce36beSmrgAC_LANG_SAVE
6949ecce36beSmrg
6950ecce36beSmrg# Source file extension for RC test sources.
6951ecce36beSmrgac_ext=rc
6952ecce36beSmrg
6953ecce36beSmrg# Object file extension for compiled RC test sources.
6954ecce36beSmrgobjext=o
6955ecce36beSmrg_LT_TAGVAR(objext, $1)=$objext
6956ecce36beSmrg
6957ecce36beSmrg# Code to be used in simple compile tests
6958ecce36beSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6959ecce36beSmrg
6960ecce36beSmrg# Code to be used in simple link tests
6961ecce36beSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
6962ecce36beSmrg
6963ecce36beSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6964ecce36beSmrg_LT_TAG_COMPILER
6965ecce36beSmrg
6966ecce36beSmrg# save warnings/boilerplate of simple test code
6967ecce36beSmrg_LT_COMPILER_BOILERPLATE
6968ecce36beSmrg_LT_LINKER_BOILERPLATE
6969ecce36beSmrg
6970ecce36beSmrg# Allow CC to be a program name with arguments.
6971ecce36beSmrglt_save_CC="$CC"
6972ecce36beSmrglt_save_GCC=$GCC
6973ecce36beSmrgGCC=
6974ecce36beSmrgCC=${RC-"windres"}
6975ecce36beSmrgcompiler=$CC
6976ecce36beSmrg_LT_TAGVAR(compiler, $1)=$CC
6977ecce36beSmrg_LT_CC_BASENAME([$compiler])
6978ecce36beSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6979ecce36beSmrg
6980ecce36beSmrgif test -n "$compiler"; then
6981ecce36beSmrg  :
6982ecce36beSmrg  _LT_CONFIG($1)
6983ecce36beSmrgfi
6984ecce36beSmrg
6985ecce36beSmrgGCC=$lt_save_GCC
6986ecce36beSmrgAC_LANG_RESTORE
6987ecce36beSmrgCC="$lt_save_CC"
6988ecce36beSmrg])# _LT_LANG_RC_CONFIG
6989ecce36beSmrg
6990ecce36beSmrg
6991ecce36beSmrg# LT_PROG_GCJ
6992ecce36beSmrg# -----------
6993ecce36beSmrgAC_DEFUN([LT_PROG_GCJ],
6994ecce36beSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6995ecce36beSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6996ecce36beSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
6997ecce36beSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6998ecce36beSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
6999ecce36beSmrg])
7000ecce36beSmrg
7001ecce36beSmrg# Old name:
7002ecce36beSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7003ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7004ecce36beSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7005ecce36beSmrg
7006ecce36beSmrg
7007ecce36beSmrg# LT_PROG_RC
7008ecce36beSmrg# ----------
7009ecce36beSmrgAC_DEFUN([LT_PROG_RC],
7010ecce36beSmrg[AC_CHECK_TOOL(RC, windres,)
7011ecce36beSmrg])
7012ecce36beSmrg
7013ecce36beSmrg# Old name:
7014ecce36beSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7015ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7016ecce36beSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7017ecce36beSmrg
7018ecce36beSmrg
7019ecce36beSmrg# _LT_DECL_EGREP
7020ecce36beSmrg# --------------
7021ecce36beSmrg# If we don't have a new enough Autoconf to choose the best grep
7022ecce36beSmrg# available, choose the one first in the user's PATH.
7023ecce36beSmrgm4_defun([_LT_DECL_EGREP],
7024ecce36beSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7025ecce36beSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7026ecce36beSmrgtest -z "$GREP" && GREP=grep
7027ecce36beSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7028ecce36beSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7029ecce36beSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7030ecce36beSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7031ecce36beSmrgAC_SUBST([GREP])
7032ecce36beSmrg])
7033ecce36beSmrg
7034ecce36beSmrg
7035ecce36beSmrg# _LT_DECL_OBJDUMP
7036ecce36beSmrg# --------------
7037ecce36beSmrg# If we don't have a new enough Autoconf to choose the best objdump
7038ecce36beSmrg# available, choose the one first in the user's PATH.
7039ecce36beSmrgm4_defun([_LT_DECL_OBJDUMP],
7040ecce36beSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7041ecce36beSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7042ecce36beSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7043ecce36beSmrgAC_SUBST([OBJDUMP])
7044ecce36beSmrg])
7045ecce36beSmrg
7046ecce36beSmrg
7047ecce36beSmrg# _LT_DECL_SED
7048ecce36beSmrg# ------------
7049ecce36beSmrg# Check for a fully-functional sed program, that truncates
7050ecce36beSmrg# as few characters as possible.  Prefer GNU sed if found.
7051ecce36beSmrgm4_defun([_LT_DECL_SED],
7052ecce36beSmrg[AC_PROG_SED
7053ecce36beSmrgtest -z "$SED" && SED=sed
7054ecce36beSmrgXsed="$SED -e 1s/^X//"
7055ecce36beSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7056ecce36beSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7057ecce36beSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7058ecce36beSmrg])# _LT_DECL_SED
7059ecce36beSmrg
7060ecce36beSmrgm4_ifndef([AC_PROG_SED], [
7061ecce36beSmrg# NOTE: This macro has been submitted for inclusion into   #
7062ecce36beSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7063ecce36beSmrg#  a released version of Autoconf we should remove this    #
7064ecce36beSmrg#  macro and use it instead.                               #
7065ecce36beSmrg
7066ecce36beSmrgm4_defun([AC_PROG_SED],
7067ecce36beSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7068ecce36beSmrgAC_CACHE_VAL(lt_cv_path_SED,
7069ecce36beSmrg[# Loop through the user's path and test for sed and gsed.
7070ecce36beSmrg# Then use that list of sed's as ones to test for truncation.
7071ecce36beSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072ecce36beSmrgfor as_dir in $PATH
7073ecce36beSmrgdo
7074ecce36beSmrg  IFS=$as_save_IFS
7075ecce36beSmrg  test -z "$as_dir" && as_dir=.
7076ecce36beSmrg  for lt_ac_prog in sed gsed; do
7077ecce36beSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7078ecce36beSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7079ecce36beSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7080ecce36beSmrg      fi
7081ecce36beSmrg    done
7082ecce36beSmrg  done
7083ecce36beSmrgdone
7084ecce36beSmrgIFS=$as_save_IFS
7085ecce36beSmrglt_ac_max=0
7086ecce36beSmrglt_ac_count=0
7087ecce36beSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7088ecce36beSmrg# along with /bin/sed that truncates output.
7089ecce36beSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7090ecce36beSmrg  test ! -f $lt_ac_sed && continue
7091ecce36beSmrg  cat /dev/null > conftest.in
7092ecce36beSmrg  lt_ac_count=0
7093ecce36beSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7094ecce36beSmrg  # Check for GNU sed and select it if it is found.
7095ecce36beSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7096ecce36beSmrg    lt_cv_path_SED=$lt_ac_sed
7097ecce36beSmrg    break
7098ecce36beSmrg  fi
7099ecce36beSmrg  while true; do
7100ecce36beSmrg    cat conftest.in conftest.in >conftest.tmp
7101ecce36beSmrg    mv conftest.tmp conftest.in
7102ecce36beSmrg    cp conftest.in conftest.nl
7103ecce36beSmrg    echo >>conftest.nl
7104ecce36beSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7105ecce36beSmrg    cmp -s conftest.out conftest.nl || break
7106ecce36beSmrg    # 10000 chars as input seems more than enough
7107ecce36beSmrg    test $lt_ac_count -gt 10 && break
7108ecce36beSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7109ecce36beSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7110ecce36beSmrg      lt_ac_max=$lt_ac_count
7111ecce36beSmrg      lt_cv_path_SED=$lt_ac_sed
7112ecce36beSmrg    fi
7113ecce36beSmrg  done
7114ecce36beSmrgdone
7115ecce36beSmrg])
7116ecce36beSmrgSED=$lt_cv_path_SED
7117ecce36beSmrgAC_SUBST([SED])
7118ecce36beSmrgAC_MSG_RESULT([$SED])
7119ecce36beSmrg])#AC_PROG_SED
7120ecce36beSmrg])#m4_ifndef
7121ecce36beSmrg
7122ecce36beSmrg# Old name:
7123ecce36beSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7124ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7125ecce36beSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7126ecce36beSmrg
7127ecce36beSmrg
7128ecce36beSmrg# _LT_CHECK_SHELL_FEATURES
7129ecce36beSmrg# ------------------------
7130ecce36beSmrg# Find out whether the shell is Bourne or XSI compatible,
7131ecce36beSmrg# or has some other useful features.
7132ecce36beSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7133ecce36beSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7134ecce36beSmrg# Try some XSI features
7135ecce36beSmrgxsi_shell=no
7136ecce36beSmrg( _lt_dummy="a/b/c"
7137ecce36beSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7138ecce36beSmrg      = c,a/b,, \
7139ecce36beSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7140ecce36beSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7141ecce36beSmrg  && xsi_shell=yes
7142ecce36beSmrgAC_MSG_RESULT([$xsi_shell])
7143ecce36beSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7144ecce36beSmrg
7145ecce36beSmrgAC_MSG_CHECKING([whether the shell understands "+="])
7146ecce36beSmrglt_shell_append=no
7147ecce36beSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7148ecce36beSmrg    >/dev/null 2>&1 \
7149ecce36beSmrg  && lt_shell_append=yes
7150ecce36beSmrgAC_MSG_RESULT([$lt_shell_append])
7151ecce36beSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7152ecce36beSmrg
7153ecce36beSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7154ecce36beSmrg  lt_unset=unset
7155ecce36beSmrgelse
7156ecce36beSmrg  lt_unset=false
7157ecce36beSmrgfi
7158ecce36beSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7159ecce36beSmrg
7160ecce36beSmrg# test EBCDIC or ASCII
7161ecce36beSmrgcase `echo X|tr X '\101'` in
7162ecce36beSmrg A) # ASCII based system
7163ecce36beSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7164ecce36beSmrg  lt_SP2NL='tr \040 \012'
7165ecce36beSmrg  lt_NL2SP='tr \015\012 \040\040'
7166ecce36beSmrg  ;;
7167ecce36beSmrg *) # EBCDIC based system
7168ecce36beSmrg  lt_SP2NL='tr \100 \n'
7169ecce36beSmrg  lt_NL2SP='tr \r\n \100\100'
7170ecce36beSmrg  ;;
7171ecce36beSmrgesac
7172ecce36beSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7173ecce36beSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7174ecce36beSmrg])# _LT_CHECK_SHELL_FEATURES
7175ecce36beSmrg
7176ecce36beSmrg
7177ecce36beSmrg# _LT_PROG_XSI_SHELLFNS
7178ecce36beSmrg# ---------------------
7179ecce36beSmrg# Bourne and XSI compatible variants of some useful shell functions.
7180ecce36beSmrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7181ecce36beSmrg[case $xsi_shell in
7182ecce36beSmrg  yes)
7183ecce36beSmrg    cat << \_LT_EOF >> "$cfgfile"
7184ecce36beSmrg
7185ecce36beSmrg# func_dirname file append nondir_replacement
7186ecce36beSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7187ecce36beSmrg# otherwise set result to NONDIR_REPLACEMENT.
7188ecce36beSmrgfunc_dirname ()
7189ecce36beSmrg{
7190ecce36beSmrg  case ${1} in
7191ecce36beSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7192ecce36beSmrg    *  ) func_dirname_result="${3}" ;;
7193ecce36beSmrg  esac
7194ecce36beSmrg}
7195ecce36beSmrg
7196ecce36beSmrg# func_basename file
7197ecce36beSmrgfunc_basename ()
7198ecce36beSmrg{
7199ecce36beSmrg  func_basename_result="${1##*/}"
7200ecce36beSmrg}
7201ecce36beSmrg
7202ecce36beSmrg# func_dirname_and_basename file append nondir_replacement
7203ecce36beSmrg# perform func_basename and func_dirname in a single function
7204ecce36beSmrg# call:
7205ecce36beSmrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7206ecce36beSmrg#             add APPEND to the result, otherwise set result
7207ecce36beSmrg#             to NONDIR_REPLACEMENT.
7208ecce36beSmrg#             value returned in "$func_dirname_result"
7209ecce36beSmrg#   basename: Compute filename of FILE.
7210ecce36beSmrg#             value retuned in "$func_basename_result"
7211ecce36beSmrg# Implementation must be kept synchronized with func_dirname
7212ecce36beSmrg# and func_basename. For efficiency, we do not delegate to
7213ecce36beSmrg# those functions but instead duplicate the functionality here.
7214ecce36beSmrgfunc_dirname_and_basename ()
7215ecce36beSmrg{
7216ecce36beSmrg  case ${1} in
7217ecce36beSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7218ecce36beSmrg    *  ) func_dirname_result="${3}" ;;
7219ecce36beSmrg  esac
7220ecce36beSmrg  func_basename_result="${1##*/}"
7221ecce36beSmrg}
7222ecce36beSmrg
7223ecce36beSmrg# func_stripname prefix suffix name
7224ecce36beSmrg# strip PREFIX and SUFFIX off of NAME.
7225ecce36beSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7226ecce36beSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7227ecce36beSmrg# dot (in which case that matches only a dot).
7228ecce36beSmrgfunc_stripname ()
7229ecce36beSmrg{
7230ecce36beSmrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7231ecce36beSmrg  # positional parameters, so assign one to ordinary parameter first.
7232ecce36beSmrg  func_stripname_result=${3}
7233ecce36beSmrg  func_stripname_result=${func_stripname_result#"${1}"}
7234ecce36beSmrg  func_stripname_result=${func_stripname_result%"${2}"}
7235ecce36beSmrg}
7236ecce36beSmrg
7237ecce36beSmrg# func_opt_split
7238ecce36beSmrgfunc_opt_split ()
7239ecce36beSmrg{
7240ecce36beSmrg  func_opt_split_opt=${1%%=*}
7241ecce36beSmrg  func_opt_split_arg=${1#*=}
7242ecce36beSmrg}
7243ecce36beSmrg
7244ecce36beSmrg# func_lo2o object
7245ecce36beSmrgfunc_lo2o ()
7246ecce36beSmrg{
7247ecce36beSmrg  case ${1} in
7248ecce36beSmrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7249ecce36beSmrg    *)    func_lo2o_result=${1} ;;
7250ecce36beSmrg  esac
7251ecce36beSmrg}
7252ecce36beSmrg
7253ecce36beSmrg# func_xform libobj-or-source
7254ecce36beSmrgfunc_xform ()
7255ecce36beSmrg{
7256ecce36beSmrg  func_xform_result=${1%.*}.lo
7257ecce36beSmrg}
7258ecce36beSmrg
7259ecce36beSmrg# func_arith arithmetic-term...
7260ecce36beSmrgfunc_arith ()
7261ecce36beSmrg{
7262ecce36beSmrg  func_arith_result=$(( $[*] ))
7263ecce36beSmrg}
7264ecce36beSmrg
7265ecce36beSmrg# func_len string
7266ecce36beSmrg# STRING may not start with a hyphen.
7267ecce36beSmrgfunc_len ()
7268ecce36beSmrg{
7269ecce36beSmrg  func_len_result=${#1}
7270ecce36beSmrg}
7271ecce36beSmrg
7272ecce36beSmrg_LT_EOF
7273ecce36beSmrg    ;;
7274ecce36beSmrg  *) # Bourne compatible functions.
7275ecce36beSmrg    cat << \_LT_EOF >> "$cfgfile"
7276ecce36beSmrg
7277ecce36beSmrg# func_dirname file append nondir_replacement
7278ecce36beSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7279ecce36beSmrg# otherwise set result to NONDIR_REPLACEMENT.
7280ecce36beSmrgfunc_dirname ()
7281ecce36beSmrg{
7282ecce36beSmrg  # Extract subdirectory from the argument.
7283ecce36beSmrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7284ecce36beSmrg  if test "X$func_dirname_result" = "X${1}"; then
7285ecce36beSmrg    func_dirname_result="${3}"
7286ecce36beSmrg  else
7287ecce36beSmrg    func_dirname_result="$func_dirname_result${2}"
7288ecce36beSmrg  fi
7289ecce36beSmrg}
7290ecce36beSmrg
7291ecce36beSmrg# func_basename file
7292ecce36beSmrgfunc_basename ()
7293ecce36beSmrg{
7294ecce36beSmrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7295ecce36beSmrg}
7296ecce36beSmrg
7297ecce36beSmrgdnl func_dirname_and_basename
7298ecce36beSmrgdnl A portable version of this function is already defined in general.m4sh
7299ecce36beSmrgdnl so there is no need for it here.
7300ecce36beSmrg
7301ecce36beSmrg# func_stripname prefix suffix name
7302ecce36beSmrg# strip PREFIX and SUFFIX off of NAME.
7303ecce36beSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7304ecce36beSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7305ecce36beSmrg# dot (in which case that matches only a dot).
7306ecce36beSmrg# func_strip_suffix prefix name
7307ecce36beSmrgfunc_stripname ()
7308ecce36beSmrg{
7309ecce36beSmrg  case ${2} in
7310ecce36beSmrg    .*) func_stripname_result=`$ECHO "X${3}" \
7311ecce36beSmrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7312ecce36beSmrg    *)  func_stripname_result=`$ECHO "X${3}" \
7313ecce36beSmrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7314ecce36beSmrg  esac
7315ecce36beSmrg}
7316ecce36beSmrg
7317ecce36beSmrg# sed scripts:
7318ecce36beSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7319ecce36beSmrgmy_sed_long_arg='1s/^-[[^=]]*=//'
7320ecce36beSmrg
7321ecce36beSmrg# func_opt_split
7322ecce36beSmrgfunc_opt_split ()
7323ecce36beSmrg{
7324ecce36beSmrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7325ecce36beSmrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7326ecce36beSmrg}
7327ecce36beSmrg
7328ecce36beSmrg# func_lo2o object
7329ecce36beSmrgfunc_lo2o ()
7330ecce36beSmrg{
7331ecce36beSmrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7332ecce36beSmrg}
7333ecce36beSmrg
7334ecce36beSmrg# func_xform libobj-or-source
7335ecce36beSmrgfunc_xform ()
7336ecce36beSmrg{
7337ecce36beSmrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7338ecce36beSmrg}
7339ecce36beSmrg
7340ecce36beSmrg# func_arith arithmetic-term...
7341ecce36beSmrgfunc_arith ()
7342ecce36beSmrg{
7343ecce36beSmrg  func_arith_result=`expr "$[@]"`
7344ecce36beSmrg}
7345ecce36beSmrg
7346ecce36beSmrg# func_len string
7347ecce36beSmrg# STRING may not start with a hyphen.
7348ecce36beSmrgfunc_len ()
7349ecce36beSmrg{
7350ecce36beSmrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7351ecce36beSmrg}
7352ecce36beSmrg
7353ecce36beSmrg_LT_EOF
7354ecce36beSmrgesac
7355ecce36beSmrg
7356ecce36beSmrgcase $lt_shell_append in
7357ecce36beSmrg  yes)
7358ecce36beSmrg    cat << \_LT_EOF >> "$cfgfile"
7359ecce36beSmrg
7360ecce36beSmrg# func_append var value
7361ecce36beSmrg# Append VALUE to the end of shell variable VAR.
7362ecce36beSmrgfunc_append ()
7363ecce36beSmrg{
7364ecce36beSmrg  eval "$[1]+=\$[2]"
7365ecce36beSmrg}
7366ecce36beSmrg_LT_EOF
7367ecce36beSmrg    ;;
7368ecce36beSmrg  *)
7369ecce36beSmrg    cat << \_LT_EOF >> "$cfgfile"
7370ecce36beSmrg
7371ecce36beSmrg# func_append var value
7372ecce36beSmrg# Append VALUE to the end of shell variable VAR.
7373ecce36beSmrgfunc_append ()
7374ecce36beSmrg{
7375ecce36beSmrg  eval "$[1]=\$$[1]\$[2]"
7376ecce36beSmrg}
7377ecce36beSmrg
7378ecce36beSmrg_LT_EOF
7379ecce36beSmrg    ;;
7380ecce36beSmrg  esac
7381ecce36beSmrg])
7382ecce36beSmrg
7383ecce36beSmrg# Helper functions for option handling.                    -*- Autoconf -*-
7384ecce36beSmrg#
7385ecce36beSmrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7386ecce36beSmrg#   Written by Gary V. Vaughan, 2004
7387ecce36beSmrg#
7388ecce36beSmrg# This file is free software; the Free Software Foundation gives
7389ecce36beSmrg# unlimited permission to copy and/or distribute it, with or without
7390ecce36beSmrg# modifications, as long as this notice is preserved.
7391ecce36beSmrg
7392ecce36beSmrg# serial 6 ltoptions.m4
7393ecce36beSmrg
7394ecce36beSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7395ecce36beSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7396ecce36beSmrg
7397ecce36beSmrg
7398ecce36beSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7399ecce36beSmrg# ------------------------------------------
7400ecce36beSmrgm4_define([_LT_MANGLE_OPTION],
7401ecce36beSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7402ecce36beSmrg
7403ecce36beSmrg
7404ecce36beSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7405ecce36beSmrg# ---------------------------------------
7406ecce36beSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7407ecce36beSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7408ecce36beSmrg# saved as a flag.
7409ecce36beSmrgm4_define([_LT_SET_OPTION],
7410ecce36beSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7411ecce36beSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7412ecce36beSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
7413ecce36beSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7414ecce36beSmrg])
7415ecce36beSmrg
7416ecce36beSmrg
7417ecce36beSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7418ecce36beSmrg# ------------------------------------------------------------
7419ecce36beSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7420ecce36beSmrgm4_define([_LT_IF_OPTION],
7421ecce36beSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7422ecce36beSmrg
7423ecce36beSmrg
7424ecce36beSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7425ecce36beSmrg# -------------------------------------------------------
7426ecce36beSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7427ecce36beSmrg# are set.
7428ecce36beSmrgm4_define([_LT_UNLESS_OPTIONS],
7429ecce36beSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430ecce36beSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7431ecce36beSmrg		      [m4_define([$0_found])])])[]dnl
7432ecce36beSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7433ecce36beSmrg])[]dnl
7434ecce36beSmrg])
7435ecce36beSmrg
7436ecce36beSmrg
7437ecce36beSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7438ecce36beSmrg# ----------------------------------------
7439ecce36beSmrg# OPTION-LIST is a space-separated list of Libtool options associated
7440ecce36beSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7441ecce36beSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7442ecce36beSmrg# the unknown option and exit.
7443ecce36beSmrgm4_defun([_LT_SET_OPTIONS],
7444ecce36beSmrg[# Set options
7445ecce36beSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7446ecce36beSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
7447ecce36beSmrg
7448ecce36beSmrgm4_if([$1],[LT_INIT],[
7449ecce36beSmrg  dnl
7450ecce36beSmrg  dnl Simply set some default values (i.e off) if boolean options were not
7451ecce36beSmrg  dnl specified:
7452ecce36beSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7453ecce36beSmrg  ])
7454ecce36beSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7455ecce36beSmrg  ])
7456ecce36beSmrg  dnl
7457ecce36beSmrg  dnl If no reference was made to various pairs of opposing options, then
7458ecce36beSmrg  dnl we run the default mode handler for the pair.  For example, if neither
7459ecce36beSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7460ecce36beSmrg  dnl archives by default:
7461ecce36beSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7462ecce36beSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7463ecce36beSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7464ecce36beSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7465ecce36beSmrg  		   [_LT_ENABLE_FAST_INSTALL])
7466ecce36beSmrg  ])
7467ecce36beSmrg])# _LT_SET_OPTIONS
7468ecce36beSmrg
7469ecce36beSmrg
7470ecce36beSmrg
7471ecce36beSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7472ecce36beSmrg# -----------------------------------------
7473ecce36beSmrgm4_define([_LT_MANGLE_DEFUN],
7474ecce36beSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7475ecce36beSmrg
7476ecce36beSmrg
7477ecce36beSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7478ecce36beSmrg# -----------------------------------------------
7479ecce36beSmrgm4_define([LT_OPTION_DEFINE],
7480ecce36beSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7481ecce36beSmrg])# LT_OPTION_DEFINE
7482ecce36beSmrg
7483ecce36beSmrg
7484ecce36beSmrg# dlopen
7485ecce36beSmrg# ------
7486ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7487ecce36beSmrg])
7488ecce36beSmrg
7489ecce36beSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7490ecce36beSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7491ecce36beSmrgAC_DIAGNOSE([obsolete],
7492ecce36beSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7493ecce36beSmrgput the `dlopen' option into LT_INIT's first parameter.])
7494ecce36beSmrg])
7495ecce36beSmrg
7496ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7497ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7498ecce36beSmrg
7499ecce36beSmrg
7500ecce36beSmrg# win32-dll
7501ecce36beSmrg# ---------
7502ecce36beSmrg# Declare package support for building win32 dll's.
7503ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7504ecce36beSmrg[enable_win32_dll=yes
7505ecce36beSmrg
7506ecce36beSmrgcase $host in
7507ecce36beSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7508ecce36beSmrg  AC_CHECK_TOOL(AS, as, false)
7509ecce36beSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7510ecce36beSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7511ecce36beSmrg  ;;
7512ecce36beSmrgesac
7513ecce36beSmrg
7514ecce36beSmrgtest -z "$AS" && AS=as
7515ecce36beSmrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
7516ecce36beSmrg
7517ecce36beSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7518ecce36beSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7519ecce36beSmrg
7520ecce36beSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7521ecce36beSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7522ecce36beSmrg])# win32-dll
7523ecce36beSmrg
7524ecce36beSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7525ecce36beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7526ecce36beSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7527ecce36beSmrgAC_DIAGNOSE([obsolete],
7528ecce36beSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7529ecce36beSmrgput the `win32-dll' option into LT_INIT's first parameter.])
7530ecce36beSmrg])
7531ecce36beSmrg
7532ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7533ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7534ecce36beSmrg
7535ecce36beSmrg
7536ecce36beSmrg# _LT_ENABLE_SHARED([DEFAULT])
7537ecce36beSmrg# ----------------------------
7538ecce36beSmrg# implement the --enable-shared flag, and supports the `shared' and
7539ecce36beSmrg# `disable-shared' LT_INIT options.
7540ecce36beSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7541ecce36beSmrgm4_define([_LT_ENABLE_SHARED],
7542ecce36beSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7543ecce36beSmrgAC_ARG_ENABLE([shared],
7544ecce36beSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7545ecce36beSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7546ecce36beSmrg    [p=${PACKAGE-default}
7547ecce36beSmrg    case $enableval in
7548ecce36beSmrg    yes) enable_shared=yes ;;
7549ecce36beSmrg    no) enable_shared=no ;;
7550ecce36beSmrg    *)
7551ecce36beSmrg      enable_shared=no
7552ecce36beSmrg      # Look at the argument we got.  We use all the common list separators.
7553ecce36beSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7554ecce36beSmrg      for pkg in $enableval; do
7555ecce36beSmrg	IFS="$lt_save_ifs"
7556ecce36beSmrg	if test "X$pkg" = "X$p"; then
7557ecce36beSmrg	  enable_shared=yes
7558ecce36beSmrg	fi
7559ecce36beSmrg      done
7560ecce36beSmrg      IFS="$lt_save_ifs"
7561ecce36beSmrg      ;;
7562ecce36beSmrg    esac],
7563ecce36beSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7564ecce36beSmrg
7565ecce36beSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7566ecce36beSmrg	[Whether or not to build shared libraries])
7567ecce36beSmrg])# _LT_ENABLE_SHARED
7568ecce36beSmrg
7569ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7570ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7571ecce36beSmrg
7572ecce36beSmrg# Old names:
7573ecce36beSmrgAC_DEFUN([AC_ENABLE_SHARED],
7574ecce36beSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7575ecce36beSmrg])
7576ecce36beSmrg
7577ecce36beSmrgAC_DEFUN([AC_DISABLE_SHARED],
7578ecce36beSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7579ecce36beSmrg])
7580ecce36beSmrg
7581ecce36beSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7582ecce36beSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7583ecce36beSmrg
7584ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7585ecce36beSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7586ecce36beSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
7587ecce36beSmrg
7588ecce36beSmrg
7589ecce36beSmrg
7590ecce36beSmrg# _LT_ENABLE_STATIC([DEFAULT])
7591ecce36beSmrg# ----------------------------
7592ecce36beSmrg# implement the --enable-static flag, and support the `static' and
7593ecce36beSmrg# `disable-static' LT_INIT options.
7594ecce36beSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7595ecce36beSmrgm4_define([_LT_ENABLE_STATIC],
7596ecce36beSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7597ecce36beSmrgAC_ARG_ENABLE([static],
7598ecce36beSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7599ecce36beSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7600ecce36beSmrg    [p=${PACKAGE-default}
7601ecce36beSmrg    case $enableval in
7602ecce36beSmrg    yes) enable_static=yes ;;
7603ecce36beSmrg    no) enable_static=no ;;
7604ecce36beSmrg    *)
7605ecce36beSmrg     enable_static=no
7606ecce36beSmrg      # Look at the argument we got.  We use all the common list separators.
7607ecce36beSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7608ecce36beSmrg      for pkg in $enableval; do
7609ecce36beSmrg	IFS="$lt_save_ifs"
7610ecce36beSmrg	if test "X$pkg" = "X$p"; then
7611ecce36beSmrg	  enable_static=yes
7612ecce36beSmrg	fi
7613ecce36beSmrg      done
7614ecce36beSmrg      IFS="$lt_save_ifs"
7615ecce36beSmrg      ;;
7616ecce36beSmrg    esac],
7617ecce36beSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7618ecce36beSmrg
7619ecce36beSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
7620ecce36beSmrg	[Whether or not to build static libraries])
7621ecce36beSmrg])# _LT_ENABLE_STATIC
7622ecce36beSmrg
7623ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7624ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7625ecce36beSmrg
7626ecce36beSmrg# Old names:
7627ecce36beSmrgAC_DEFUN([AC_ENABLE_STATIC],
7628ecce36beSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7629ecce36beSmrg])
7630ecce36beSmrg
7631ecce36beSmrgAC_DEFUN([AC_DISABLE_STATIC],
7632ecce36beSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7633ecce36beSmrg])
7634ecce36beSmrg
7635ecce36beSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7636ecce36beSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7637ecce36beSmrg
7638ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7639ecce36beSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7640ecce36beSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7641ecce36beSmrg
7642ecce36beSmrg
7643ecce36beSmrg
7644ecce36beSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7645ecce36beSmrg# ----------------------------------
7646ecce36beSmrg# implement the --enable-fast-install flag, and support the `fast-install'
7647ecce36beSmrg# and `disable-fast-install' LT_INIT options.
7648ecce36beSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7649ecce36beSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
7650ecce36beSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7651ecce36beSmrgAC_ARG_ENABLE([fast-install],
7652ecce36beSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7653ecce36beSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7654ecce36beSmrg    [p=${PACKAGE-default}
7655ecce36beSmrg    case $enableval in
7656ecce36beSmrg    yes) enable_fast_install=yes ;;
7657ecce36beSmrg    no) enable_fast_install=no ;;
7658ecce36beSmrg    *)
7659ecce36beSmrg      enable_fast_install=no
7660ecce36beSmrg      # Look at the argument we got.  We use all the common list separators.
7661ecce36beSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7662ecce36beSmrg      for pkg in $enableval; do
7663ecce36beSmrg	IFS="$lt_save_ifs"
7664ecce36beSmrg	if test "X$pkg" = "X$p"; then
7665ecce36beSmrg	  enable_fast_install=yes
7666ecce36beSmrg	fi
7667ecce36beSmrg      done
7668ecce36beSmrg      IFS="$lt_save_ifs"
7669ecce36beSmrg      ;;
7670ecce36beSmrg    esac],
7671ecce36beSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7672ecce36beSmrg
7673ecce36beSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
7674ecce36beSmrg	 [Whether or not to optimize for fast installation])dnl
7675ecce36beSmrg])# _LT_ENABLE_FAST_INSTALL
7676ecce36beSmrg
7677ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7678ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7679ecce36beSmrg
7680ecce36beSmrg# Old names:
7681ecce36beSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7682ecce36beSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7683ecce36beSmrgAC_DIAGNOSE([obsolete],
7684ecce36beSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7685ecce36beSmrgthe `fast-install' option into LT_INIT's first parameter.])
7686ecce36beSmrg])
7687ecce36beSmrg
7688ecce36beSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7689ecce36beSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7690ecce36beSmrgAC_DIAGNOSE([obsolete],
7691ecce36beSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7692ecce36beSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7693ecce36beSmrg])
7694ecce36beSmrg
7695ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7696ecce36beSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7697ecce36beSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7698ecce36beSmrg
7699ecce36beSmrg
7700ecce36beSmrg# _LT_WITH_PIC([MODE])
7701ecce36beSmrg# --------------------
7702ecce36beSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7703ecce36beSmrg# LT_INIT options.
7704ecce36beSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7705ecce36beSmrgm4_define([_LT_WITH_PIC],
7706ecce36beSmrg[AC_ARG_WITH([pic],
7707ecce36beSmrg    [AS_HELP_STRING([--with-pic],
7708ecce36beSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7709ecce36beSmrg    [pic_mode="$withval"],
7710ecce36beSmrg    [pic_mode=default])
7711ecce36beSmrg
7712ecce36beSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7713ecce36beSmrg
7714ecce36beSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7715ecce36beSmrg])# _LT_WITH_PIC
7716ecce36beSmrg
7717ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7718ecce36beSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7719ecce36beSmrg
7720ecce36beSmrg# Old name:
7721ecce36beSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7722ecce36beSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7723ecce36beSmrgAC_DIAGNOSE([obsolete],
7724ecce36beSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7725ecce36beSmrgput the `pic-only' option into LT_INIT's first parameter.])
7726ecce36beSmrg])
7727ecce36beSmrg
7728ecce36beSmrgdnl aclocal-1.4 backwards compatibility:
7729ecce36beSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7730ecce36beSmrg
7731ecce36beSmrg
7732ecce36beSmrgm4_define([_LTDL_MODE], [])
7733ecce36beSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7734ecce36beSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7735ecce36beSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7736ecce36beSmrg		 [m4_define([_LTDL_MODE], [recursive])])
7737ecce36beSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7738ecce36beSmrg		 [m4_define([_LTDL_MODE], [subproject])])
7739ecce36beSmrg
7740ecce36beSmrgm4_define([_LTDL_TYPE], [])
7741ecce36beSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7742ecce36beSmrg		 [m4_define([_LTDL_TYPE], [installable])])
7743ecce36beSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7744ecce36beSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
7745ecce36beSmrg
7746ecce36beSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7747ecce36beSmrg#
7748ecce36beSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7749ecce36beSmrg# Written by Gary V. Vaughan, 2004
7750ecce36beSmrg#
7751ecce36beSmrg# This file is free software; the Free Software Foundation gives
7752ecce36beSmrg# unlimited permission to copy and/or distribute it, with or without
7753ecce36beSmrg# modifications, as long as this notice is preserved.
7754ecce36beSmrg
7755ecce36beSmrg# serial 6 ltsugar.m4
7756ecce36beSmrg
7757ecce36beSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7758ecce36beSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7759ecce36beSmrg
7760ecce36beSmrg
7761ecce36beSmrg# lt_join(SEP, ARG1, [ARG2...])
7762ecce36beSmrg# -----------------------------
7763ecce36beSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7764ecce36beSmrg# associated separator.
7765ecce36beSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7766ecce36beSmrg# versions in m4sugar had bugs.
7767ecce36beSmrgm4_define([lt_join],
7768ecce36beSmrg[m4_if([$#], [1], [],
7769ecce36beSmrg       [$#], [2], [[$2]],
7770ecce36beSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7771ecce36beSmrgm4_define([_lt_join],
7772ecce36beSmrg[m4_if([$#$2], [2], [],
7773ecce36beSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7774ecce36beSmrg
7775ecce36beSmrg
7776ecce36beSmrg# lt_car(LIST)
7777ecce36beSmrg# lt_cdr(LIST)
7778ecce36beSmrg# ------------
7779ecce36beSmrg# Manipulate m4 lists.
7780ecce36beSmrg# These macros are necessary as long as will still need to support
7781ecce36beSmrg# Autoconf-2.59 which quotes differently.
7782ecce36beSmrgm4_define([lt_car], [[$1]])
7783ecce36beSmrgm4_define([lt_cdr],
7784ecce36beSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7785ecce36beSmrg       [$#], 1, [],
7786ecce36beSmrg       [m4_dquote(m4_shift($@))])])
7787ecce36beSmrgm4_define([lt_unquote], $1)
7788ecce36beSmrg
7789ecce36beSmrg
7790ecce36beSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7791ecce36beSmrg# ------------------------------------------
7792ecce36beSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7793ecce36beSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7794ecce36beSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7795ecce36beSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7796ecce36beSmrg# than defined and empty).
7797ecce36beSmrg#
7798ecce36beSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7799ecce36beSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7800ecce36beSmrgm4_define([lt_append],
7801ecce36beSmrg[m4_define([$1],
7802ecce36beSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7803ecce36beSmrg
7804ecce36beSmrg
7805ecce36beSmrg
7806ecce36beSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7807ecce36beSmrg# ----------------------------------------------------------
7808ecce36beSmrg# Produce a SEP delimited list of all paired combinations of elements of
7809ecce36beSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7810ecce36beSmrg# has the form PREFIXmINFIXSUFFIXn.
7811ecce36beSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7812ecce36beSmrgm4_define([lt_combine],
7813ecce36beSmrg[m4_if(m4_eval([$# > 3]), [1],
7814ecce36beSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7815ecce36beSmrg[[m4_foreach([_Lt_prefix], [$2],
7816ecce36beSmrg	     [m4_foreach([_Lt_suffix],
7817ecce36beSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7818ecce36beSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7819ecce36beSmrg
7820ecce36beSmrg
7821ecce36beSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7822ecce36beSmrg# -----------------------------------------------------------------------
7823ecce36beSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7824ecce36beSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7825ecce36beSmrgm4_define([lt_if_append_uniq],
7826ecce36beSmrg[m4_ifdef([$1],
7827ecce36beSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7828ecce36beSmrg		 [lt_append([$1], [$2], [$3])$4],
7829ecce36beSmrg		 [$5])],
7830ecce36beSmrg	  [lt_append([$1], [$2], [$3])$4])])
7831ecce36beSmrg
7832ecce36beSmrg
7833ecce36beSmrg# lt_dict_add(DICT, KEY, VALUE)
7834ecce36beSmrg# -----------------------------
7835ecce36beSmrgm4_define([lt_dict_add],
7836ecce36beSmrg[m4_define([$1($2)], [$3])])
7837ecce36beSmrg
7838ecce36beSmrg
7839ecce36beSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7840ecce36beSmrg# --------------------------------------------
7841ecce36beSmrgm4_define([lt_dict_add_subkey],
7842ecce36beSmrg[m4_define([$1($2:$3)], [$4])])
7843ecce36beSmrg
7844ecce36beSmrg
7845ecce36beSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7846ecce36beSmrg# ----------------------------------
7847ecce36beSmrgm4_define([lt_dict_fetch],
7848ecce36beSmrg[m4_ifval([$3],
7849ecce36beSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7850ecce36beSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7851ecce36beSmrg
7852ecce36beSmrg
7853ecce36beSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7854ecce36beSmrg# -----------------------------------------------------------------
7855ecce36beSmrgm4_define([lt_if_dict_fetch],
7856ecce36beSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7857ecce36beSmrg	[$5],
7858ecce36beSmrg    [$6])])
7859ecce36beSmrg
7860ecce36beSmrg
7861ecce36beSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7862ecce36beSmrg# --------------------------------------------------------------
7863ecce36beSmrgm4_define([lt_dict_filter],
7864ecce36beSmrg[m4_if([$5], [], [],
7865ecce36beSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7866ecce36beSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7867ecce36beSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7868ecce36beSmrg])
7869ecce36beSmrg
7870ecce36beSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7871ecce36beSmrg#
7872ecce36beSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7873ecce36beSmrg#   Written by Scott James Remnant, 2004
7874ecce36beSmrg#
7875ecce36beSmrg# This file is free software; the Free Software Foundation gives
7876ecce36beSmrg# unlimited permission to copy and/or distribute it, with or without
7877ecce36beSmrg# modifications, as long as this notice is preserved.
7878ecce36beSmrg
7879ecce36beSmrg# Generated from ltversion.in.
7880ecce36beSmrg
7881ecce36beSmrg# serial 3012 ltversion.m4
7882ecce36beSmrg# This file is part of GNU Libtool
7883ecce36beSmrg
7884ecce36beSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
7885ecce36beSmrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7886ecce36beSmrg
7887ecce36beSmrgAC_DEFUN([LTVERSION_VERSION],
7888ecce36beSmrg[macro_version='2.2.6'
7889ecce36beSmrgmacro_revision='1.3012'
7890ecce36beSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7891ecce36beSmrg_LT_DECL(, macro_revision, 0)
7892ecce36beSmrg])
7893ecce36beSmrg
7894ecce36beSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7895ecce36beSmrg#
7896ecce36beSmrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7897ecce36beSmrg#   Written by Scott James Remnant, 2004.
7898ecce36beSmrg#
7899ecce36beSmrg# This file is free software; the Free Software Foundation gives
7900ecce36beSmrg# unlimited permission to copy and/or distribute it, with or without
7901ecce36beSmrg# modifications, as long as this notice is preserved.
7902ecce36beSmrg
7903ecce36beSmrg# serial 4 lt~obsolete.m4
7904ecce36beSmrg
7905ecce36beSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
7906ecce36beSmrg#
7907ecce36beSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7908ecce36beSmrg# which have later been changed to m4_define as they aren't part of the
7909ecce36beSmrg# exported API, or moved to Autoconf or Automake where they belong.
7910ecce36beSmrg#
7911ecce36beSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7912ecce36beSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7913ecce36beSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
7914ecce36beSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7915ecce36beSmrg# and doesn't know about Autoconf macros at all.)
7916ecce36beSmrg#
7917ecce36beSmrg# So we provide this file, which has a silly filename so it's always
7918ecce36beSmrg# included after everything else.  This provides aclocal with the
7919ecce36beSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7920ecce36beSmrg# because those macros already exist, or will be overwritten later.
7921ecce36beSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7922ecce36beSmrg#
7923ecce36beSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7924ecce36beSmrg# Yes, that means every name once taken will need to remain here until
7925ecce36beSmrg# we give up compatibility with versions before 1.7, at which point
7926ecce36beSmrg# we need to keep only those names which we still refer to.
7927ecce36beSmrg
7928ecce36beSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7929ecce36beSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7930ecce36beSmrg
7931ecce36beSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7932ecce36beSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7933ecce36beSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7934ecce36beSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7935ecce36beSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7936ecce36beSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7937ecce36beSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7938ecce36beSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7939ecce36beSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7940ecce36beSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7941ecce36beSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7942ecce36beSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7943ecce36beSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7944ecce36beSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7945ecce36beSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7946ecce36beSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7947ecce36beSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7948ecce36beSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7949ecce36beSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7950ecce36beSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7951ecce36beSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7952ecce36beSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7953ecce36beSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7954ecce36beSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7955ecce36beSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7956ecce36beSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7957ecce36beSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7958ecce36beSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7959ecce36beSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7960ecce36beSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7961ecce36beSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7962ecce36beSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7963ecce36beSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7964ecce36beSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7965ecce36beSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7966ecce36beSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7967ecce36beSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7968ecce36beSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7969ecce36beSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7970ecce36beSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7971ecce36beSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7972ecce36beSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7973ecce36beSmrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7974ecce36beSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7975ecce36beSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7976ecce36beSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7977ecce36beSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7978ecce36beSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7979ecce36beSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7980ecce36beSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7981ecce36beSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7982ecce36beSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7983ecce36beSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7984ecce36beSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7985ecce36beSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7986ecce36beSmrg
7987ecce36beSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7988ecce36beSmrg# 
7989ecce36beSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7990ecce36beSmrg#
7991ecce36beSmrg# This program is free software; you can redistribute it and/or modify
7992ecce36beSmrg# it under the terms of the GNU General Public License as published by
7993ecce36beSmrg# the Free Software Foundation; either version 2 of the License, or
7994ecce36beSmrg# (at your option) any later version.
7995ecce36beSmrg#
7996ecce36beSmrg# This program is distributed in the hope that it will be useful, but
7997ecce36beSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7998ecce36beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7999ecce36beSmrg# General Public License for more details.
8000ecce36beSmrg#
8001ecce36beSmrg# You should have received a copy of the GNU General Public License
8002ecce36beSmrg# along with this program; if not, write to the Free Software
8003ecce36beSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8004ecce36beSmrg#
8005ecce36beSmrg# As a special exception to the GNU General Public License, if you
8006ecce36beSmrg# distribute this file as part of a program that contains a
8007ecce36beSmrg# configuration script generated by Autoconf, you may include it under
8008ecce36beSmrg# the same distribution terms that you use for the rest of that program.
8009ecce36beSmrg
8010ecce36beSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8011ecce36beSmrg# ----------------------------------
8012ecce36beSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
8013ecce36beSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8014ecce36beSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8015ecce36beSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8016ecce36beSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8017ecce36beSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8018ecce36beSmrgfi
8019ecce36beSmrgif test -n "$PKG_CONFIG"; then
8020ecce36beSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
8021ecce36beSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8022ecce36beSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8023ecce36beSmrg		AC_MSG_RESULT([yes])
8024ecce36beSmrg	else
8025ecce36beSmrg		AC_MSG_RESULT([no])
8026ecce36beSmrg		PKG_CONFIG=""
8027ecce36beSmrg	fi
8028ecce36beSmrg		
8029ecce36beSmrgfi[]dnl
8030ecce36beSmrg])# PKG_PROG_PKG_CONFIG
8031ecce36beSmrg
8032ecce36beSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8033ecce36beSmrg#
8034ecce36beSmrg# Check to see whether a particular set of modules exists.  Similar
8035ecce36beSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8036ecce36beSmrg#
8037ecce36beSmrg#
8038ecce36beSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8039ecce36beSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
8040ecce36beSmrg# PKG_CHECK_EXISTS manually
8041ecce36beSmrg# --------------------------------------------------------------
8042ecce36beSmrgAC_DEFUN([PKG_CHECK_EXISTS],
8043ecce36beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8044ecce36beSmrgif test -n "$PKG_CONFIG" && \
8045ecce36beSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8046ecce36beSmrg  m4_ifval([$2], [$2], [:])
8047ecce36beSmrgm4_ifvaln([$3], [else
8048ecce36beSmrg  $3])dnl
8049ecce36beSmrgfi])
8050ecce36beSmrg
8051ecce36beSmrg
8052ecce36beSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8053ecce36beSmrg# ---------------------------------------------
8054ecce36beSmrgm4_define([_PKG_CONFIG],
8055ecce36beSmrg[if test -n "$PKG_CONFIG"; then
8056ecce36beSmrg    if test -n "$$1"; then
8057ecce36beSmrg        pkg_cv_[]$1="$$1"
8058ecce36beSmrg    else
8059ecce36beSmrg        PKG_CHECK_EXISTS([$3],
8060ecce36beSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8061ecce36beSmrg			 [pkg_failed=yes])
8062ecce36beSmrg    fi
8063ecce36beSmrgelse
8064ecce36beSmrg	pkg_failed=untried
8065ecce36beSmrgfi[]dnl
8066ecce36beSmrg])# _PKG_CONFIG
8067ecce36beSmrg
8068ecce36beSmrg# _PKG_SHORT_ERRORS_SUPPORTED
8069ecce36beSmrg# -----------------------------
8070ecce36beSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8071ecce36beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8072ecce36beSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8073ecce36beSmrg        _pkg_short_errors_supported=yes
8074ecce36beSmrgelse
8075ecce36beSmrg        _pkg_short_errors_supported=no
8076ecce36beSmrgfi[]dnl
8077ecce36beSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
8078ecce36beSmrg
8079ecce36beSmrg
8080ecce36beSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8081ecce36beSmrg# [ACTION-IF-NOT-FOUND])
8082ecce36beSmrg#
8083ecce36beSmrg#
8084ecce36beSmrg# Note that if there is a possibility the first call to
8085ecce36beSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8086ecce36beSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8087ecce36beSmrg#
8088ecce36beSmrg#
8089ecce36beSmrg# --------------------------------------------------------------
8090ecce36beSmrgAC_DEFUN([PKG_CHECK_MODULES],
8091ecce36beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8092ecce36beSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8093ecce36beSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8094ecce36beSmrg
8095ecce36beSmrgpkg_failed=no
8096ecce36beSmrgAC_MSG_CHECKING([for $1])
8097ecce36beSmrg
8098ecce36beSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8099ecce36beSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8100ecce36beSmrg
8101ecce36beSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8102ecce36beSmrgand $1[]_LIBS to avoid the need to call pkg-config.
8103ecce36beSmrgSee the pkg-config man page for more details.])
8104ecce36beSmrg
8105ecce36beSmrgif test $pkg_failed = yes; then
8106ecce36beSmrg        _PKG_SHORT_ERRORS_SUPPORTED
8107ecce36beSmrg        if test $_pkg_short_errors_supported = yes; then
8108ecce36beSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8109ecce36beSmrg        else 
8110ecce36beSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8111ecce36beSmrg        fi
8112ecce36beSmrg	# Put the nasty error message in config.log where it belongs
8113ecce36beSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8114ecce36beSmrg
8115ecce36beSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8116ecce36beSmrg[Package requirements ($2) were not met:
8117ecce36beSmrg
8118ecce36beSmrg$$1_PKG_ERRORS
8119ecce36beSmrg
8120ecce36beSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8121ecce36beSmrginstalled software in a non-standard prefix.
8122ecce36beSmrg
8123ecce36beSmrg_PKG_TEXT
8124ecce36beSmrg])],
8125ecce36beSmrg		[AC_MSG_RESULT([no])
8126ecce36beSmrg                $4])
8127ecce36beSmrgelif test $pkg_failed = untried; then
8128ecce36beSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8129ecce36beSmrg[The pkg-config script could not be found or is too old.  Make sure it
8130ecce36beSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
8131ecce36beSmrgpath to pkg-config.
8132ecce36beSmrg
8133ecce36beSmrg_PKG_TEXT
8134ecce36beSmrg
8135ecce36beSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8136ecce36beSmrg		[$4])
8137ecce36beSmrgelse
8138ecce36beSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8139ecce36beSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8140ecce36beSmrg        AC_MSG_RESULT([yes])
8141ecce36beSmrg	ifelse([$3], , :, [$3])
8142ecce36beSmrgfi[]dnl
8143ecce36beSmrg])# PKG_CHECK_MODULES
8144ecce36beSmrg
8145ecce36beSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8146ecce36beSmrg#
8147ecce36beSmrg# This file is free software; the Free Software Foundation
8148ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8149ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8150ecce36beSmrg
8151ecce36beSmrg# AM_AUTOMAKE_VERSION(VERSION)
8152ecce36beSmrg# ----------------------------
8153ecce36beSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
8154ecce36beSmrg# generated from the m4 files accompanying Automake X.Y.
8155ecce36beSmrg# (This private macro should not be called outside this file.)
8156ecce36beSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8157ecce36beSmrg[am__api_version='1.11'
8158ecce36beSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8159ecce36beSmrgdnl require some minimum version.  Point them to the right macro.
8160ecce36beSmrgm4_if([$1], [1.11], [],
8161ecce36beSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8162ecce36beSmrg])
8163ecce36beSmrg
8164ecce36beSmrg# _AM_AUTOCONF_VERSION(VERSION)
8165ecce36beSmrg# -----------------------------
8166ecce36beSmrg# aclocal traces this macro to find the Autoconf version.
8167ecce36beSmrg# This is a private macro too.  Using m4_define simplifies
8168ecce36beSmrg# the logic in aclocal, which can simply ignore this definition.
8169ecce36beSmrgm4_define([_AM_AUTOCONF_VERSION], [])
8170ecce36beSmrg
8171ecce36beSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
8172ecce36beSmrg# -------------------------------
8173ecce36beSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8174ecce36beSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8175ecce36beSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8176ecce36beSmrg[AM_AUTOMAKE_VERSION([1.11])dnl
8177ecce36beSmrgm4_ifndef([AC_AUTOCONF_VERSION],
8178ecce36beSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8179ecce36beSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8180ecce36beSmrg
8181ecce36beSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8182ecce36beSmrg
8183ecce36beSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8184ecce36beSmrg#
8185ecce36beSmrg# This file is free software; the Free Software Foundation
8186ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8187ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8188ecce36beSmrg
8189ecce36beSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8190ecce36beSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8191ecce36beSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8192ecce36beSmrg#
8193ecce36beSmrg# Of course, Automake must honor this variable whenever it calls a
8194ecce36beSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
8195ecce36beSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
8196ecce36beSmrg# depending on how configure is run.  This is pretty annoying, since
8197ecce36beSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8198ecce36beSmrg# source directory, any form will work fine, but in subdirectories a
8199ecce36beSmrg# relative path needs to be adjusted first.
8200ecce36beSmrg#
8201ecce36beSmrg# $ac_aux_dir/missing
8202ecce36beSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8203ecce36beSmrg# $top_srcdir/$ac_aux_dir/missing
8204ecce36beSmrg#    fails if $ac_aux_dir is absolute,
8205ecce36beSmrg#    fails when called from a subdirectory in a VPATH build with
8206ecce36beSmrg#          a relative $ac_aux_dir
8207ecce36beSmrg#
8208ecce36beSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8209ecce36beSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
8210ecce36beSmrg# harmless because $srcdir is `.', but things will broke when you
8211ecce36beSmrg# start a VPATH build or use an absolute $srcdir.
8212ecce36beSmrg#
8213ecce36beSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8214ecce36beSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8215ecce36beSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8216ecce36beSmrg# and then we would define $MISSING as
8217ecce36beSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
8218ecce36beSmrg# This will work as long as MISSING is not called from configure, because
8219ecce36beSmrg# unfortunately $(top_srcdir) has no meaning in configure.
8220ecce36beSmrg# However there are other variables, like CC, which are often used in
8221ecce36beSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
8222ecce36beSmrg#
8223ecce36beSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
8224ecce36beSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
8225ecce36beSmrg# configured tree to be moved without reconfiguration.
8226ecce36beSmrg
8227ecce36beSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
8228ecce36beSmrg[dnl Rely on autoconf to set up CDPATH properly.
8229ecce36beSmrgAC_PREREQ([2.50])dnl
8230ecce36beSmrg# expand $ac_aux_dir to an absolute path
8231ecce36beSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
8232ecce36beSmrg])
8233ecce36beSmrg
8234ecce36beSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
8235ecce36beSmrg
8236ecce36beSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8237ecce36beSmrg# Free Software Foundation, Inc.
8238ecce36beSmrg#
8239ecce36beSmrg# This file is free software; the Free Software Foundation
8240ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8241ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8242ecce36beSmrg
8243ecce36beSmrg# serial 9
8244ecce36beSmrg
8245ecce36beSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8246ecce36beSmrg# -------------------------------------
8247ecce36beSmrg# Define a conditional.
8248ecce36beSmrgAC_DEFUN([AM_CONDITIONAL],
8249ecce36beSmrg[AC_PREREQ(2.52)dnl
8250ecce36beSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8251ecce36beSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8252ecce36beSmrgAC_SUBST([$1_TRUE])dnl
8253ecce36beSmrgAC_SUBST([$1_FALSE])dnl
8254ecce36beSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8255ecce36beSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8256ecce36beSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
8257ecce36beSmrgif $2; then
8258ecce36beSmrg  $1_TRUE=
8259ecce36beSmrg  $1_FALSE='#'
8260ecce36beSmrgelse
8261ecce36beSmrg  $1_TRUE='#'
8262ecce36beSmrg  $1_FALSE=
8263ecce36beSmrgfi
8264ecce36beSmrgAC_CONFIG_COMMANDS_PRE(
8265ecce36beSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8266ecce36beSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
8267ecce36beSmrgUsually this means the macro was only invoked conditionally.]])
8268ecce36beSmrgfi])])
8269ecce36beSmrg
8270ecce36beSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8271ecce36beSmrg# Free Software Foundation, Inc.
8272ecce36beSmrg#
8273ecce36beSmrg# This file is free software; the Free Software Foundation
8274ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8275ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8276ecce36beSmrg
8277ecce36beSmrg# serial 10
8278ecce36beSmrg
8279ecce36beSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8280ecce36beSmrg# written in clear, in which case automake, when reading aclocal.m4,
8281ecce36beSmrg# will think it sees a *use*, and therefore will trigger all it's
8282ecce36beSmrg# C support machinery.  Also note that it means that autoscan, seeing
8283ecce36beSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8284ecce36beSmrg
8285ecce36beSmrg
8286ecce36beSmrg# _AM_DEPENDENCIES(NAME)
8287ecce36beSmrg# ----------------------
8288ecce36beSmrg# See how the compiler implements dependency checking.
8289ecce36beSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
8290ecce36beSmrg# We try a few techniques and use that to set a single cache variable.
8291ecce36beSmrg#
8292ecce36beSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8293ecce36beSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8294ecce36beSmrg# dependency, and given that the user is not expected to run this macro,
8295ecce36beSmrg# just rely on AC_PROG_CC.
8296ecce36beSmrgAC_DEFUN([_AM_DEPENDENCIES],
8297ecce36beSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
8298ecce36beSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8299ecce36beSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
8300ecce36beSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
8301ecce36beSmrg
8302ecce36beSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8303ecce36beSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8304ecce36beSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8305ecce36beSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8306ecce36beSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8307ecce36beSmrg                   [depcc="$$1"   am_compiler_list=])
8308ecce36beSmrg
8309ecce36beSmrgAC_CACHE_CHECK([dependency style of $depcc],
8310ecce36beSmrg               [am_cv_$1_dependencies_compiler_type],
8311ecce36beSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8312ecce36beSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
8313ecce36beSmrg  # making bogus files that we don't know about and never remove.  For
8314ecce36beSmrg  # instance it was reported that on HP-UX the gcc test will end up
8315ecce36beSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
8316ecce36beSmrg  # in D'.
8317ecce36beSmrg  mkdir conftest.dir
8318ecce36beSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
8319ecce36beSmrg  # using a relative directory.
8320ecce36beSmrg  cp "$am_depcomp" conftest.dir
8321ecce36beSmrg  cd conftest.dir
8322ecce36beSmrg  # We will build objects and dependencies in a subdirectory because
8323ecce36beSmrg  # it helps to detect inapplicable dependency modes.  For instance
8324ecce36beSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
8325ecce36beSmrg  # side effect of compilation, but ICC will put the dependencies in
8326ecce36beSmrg  # the current directory while Tru64 will put them in the object
8327ecce36beSmrg  # directory.
8328ecce36beSmrg  mkdir sub
8329ecce36beSmrg
8330ecce36beSmrg  am_cv_$1_dependencies_compiler_type=none
8331ecce36beSmrg  if test "$am_compiler_list" = ""; then
8332ecce36beSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8333ecce36beSmrg  fi
8334ecce36beSmrg  am__universal=false
8335ecce36beSmrg  m4_case([$1], [CC],
8336ecce36beSmrg    [case " $depcc " in #(
8337ecce36beSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8338ecce36beSmrg     esac],
8339ecce36beSmrg    [CXX],
8340ecce36beSmrg    [case " $depcc " in #(
8341ecce36beSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8342ecce36beSmrg     esac])
8343ecce36beSmrg
8344ecce36beSmrg  for depmode in $am_compiler_list; do
8345ecce36beSmrg    # Setup a source with many dependencies, because some compilers
8346ecce36beSmrg    # like to wrap large dependency lists on column 80 (with \), and
8347ecce36beSmrg    # we should not choose a depcomp mode which is confused by this.
8348ecce36beSmrg    #
8349ecce36beSmrg    # We need to recreate these files for each test, as the compiler may
8350ecce36beSmrg    # overwrite some of them when testing with obscure command lines.
8351ecce36beSmrg    # This happens at least with the AIX C compiler.
8352ecce36beSmrg    : > sub/conftest.c
8353ecce36beSmrg    for i in 1 2 3 4 5 6; do
8354ecce36beSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8355ecce36beSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8356ecce36beSmrg      # Solaris 8's {/usr,}/bin/sh.
8357ecce36beSmrg      touch sub/conftst$i.h
8358ecce36beSmrg    done
8359ecce36beSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8360ecce36beSmrg
8361ecce36beSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8362ecce36beSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
8363ecce36beSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
8364ecce36beSmrg    # versions had trouble with output in subdirs
8365ecce36beSmrg    am__obj=sub/conftest.${OBJEXT-o}
8366ecce36beSmrg    am__minus_obj="-o $am__obj"
8367ecce36beSmrg    case $depmode in
8368ecce36beSmrg    gcc)
8369ecce36beSmrg      # This depmode causes a compiler race in universal mode.
8370ecce36beSmrg      test "$am__universal" = false || continue
8371ecce36beSmrg      ;;
8372ecce36beSmrg    nosideeffect)
8373ecce36beSmrg      # after this tag, mechanisms are not by side-effect, so they'll
8374ecce36beSmrg      # only be used when explicitly requested
8375ecce36beSmrg      if test "x$enable_dependency_tracking" = xyes; then
8376ecce36beSmrg	continue
8377ecce36beSmrg      else
8378ecce36beSmrg	break
8379ecce36beSmrg      fi
8380ecce36beSmrg      ;;
8381ecce36beSmrg    msvisualcpp | msvcmsys)
8382ecce36beSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
8383ecce36beSmrg      # not run yet.  These depmodes are late enough in the game, and
8384ecce36beSmrg      # so weak that their functioning should not be impacted.
8385ecce36beSmrg      am__obj=conftest.${OBJEXT-o}
8386ecce36beSmrg      am__minus_obj=
8387ecce36beSmrg      ;;
8388ecce36beSmrg    none) break ;;
8389ecce36beSmrg    esac
8390ecce36beSmrg    if depmode=$depmode \
8391ecce36beSmrg       source=sub/conftest.c object=$am__obj \
8392ecce36beSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8393ecce36beSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8394ecce36beSmrg         >/dev/null 2>conftest.err &&
8395ecce36beSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8396ecce36beSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8397ecce36beSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8398ecce36beSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8399ecce36beSmrg      # icc doesn't choke on unknown options, it will just issue warnings
8400ecce36beSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
8401ecce36beSmrg      # that says an option was ignored or not supported.
8402ecce36beSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
8403ecce36beSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
8404ecce36beSmrg      # The diagnosis changed in icc 8.0:
8405ecce36beSmrg      #   icc: Command line remark: option '-MP' not supported
8406ecce36beSmrg      if (grep 'ignoring option' conftest.err ||
8407ecce36beSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8408ecce36beSmrg        am_cv_$1_dependencies_compiler_type=$depmode
8409ecce36beSmrg        break
8410ecce36beSmrg      fi
8411ecce36beSmrg    fi
8412ecce36beSmrg  done
8413ecce36beSmrg
8414ecce36beSmrg  cd ..
8415ecce36beSmrg  rm -rf conftest.dir
8416ecce36beSmrgelse
8417ecce36beSmrg  am_cv_$1_dependencies_compiler_type=none
8418ecce36beSmrgfi
8419ecce36beSmrg])
8420ecce36beSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8421ecce36beSmrgAM_CONDITIONAL([am__fastdep$1], [
8422ecce36beSmrg  test "x$enable_dependency_tracking" != xno \
8423ecce36beSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8424ecce36beSmrg])
8425ecce36beSmrg
8426ecce36beSmrg
8427ecce36beSmrg# AM_SET_DEPDIR
8428ecce36beSmrg# -------------
8429ecce36beSmrg# Choose a directory name for dependency files.
8430ecce36beSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
8431ecce36beSmrgAC_DEFUN([AM_SET_DEPDIR],
8432ecce36beSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8433ecce36beSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8434ecce36beSmrg])
8435ecce36beSmrg
8436ecce36beSmrg
8437ecce36beSmrg# AM_DEP_TRACK
8438ecce36beSmrg# ------------
8439ecce36beSmrgAC_DEFUN([AM_DEP_TRACK],
8440ecce36beSmrg[AC_ARG_ENABLE(dependency-tracking,
8441ecce36beSmrg[  --disable-dependency-tracking  speeds up one-time build
8442ecce36beSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
8443ecce36beSmrgif test "x$enable_dependency_tracking" != xno; then
8444ecce36beSmrg  am_depcomp="$ac_aux_dir/depcomp"
8445ecce36beSmrg  AMDEPBACKSLASH='\'
8446ecce36beSmrgfi
8447ecce36beSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8448ecce36beSmrgAC_SUBST([AMDEPBACKSLASH])dnl
8449ecce36beSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8450ecce36beSmrg])
8451ecce36beSmrg
8452ecce36beSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
8453ecce36beSmrg
8454ecce36beSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8455ecce36beSmrg# Free Software Foundation, Inc.
8456ecce36beSmrg#
8457ecce36beSmrg# This file is free software; the Free Software Foundation
8458ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8459ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8460ecce36beSmrg
8461ecce36beSmrg#serial 5
8462ecce36beSmrg
8463ecce36beSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
8464ecce36beSmrg# ------------------------------
8465ecce36beSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8466ecce36beSmrg[{
8467ecce36beSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
8468ecce36beSmrg  # are listed without --file.  Let's play safe and only enable the eval
8469ecce36beSmrg  # if we detect the quoting.
8470ecce36beSmrg  case $CONFIG_FILES in
8471ecce36beSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
8472ecce36beSmrg  *)   set x $CONFIG_FILES ;;
8473ecce36beSmrg  esac
8474ecce36beSmrg  shift
8475ecce36beSmrg  for mf
8476ecce36beSmrg  do
8477ecce36beSmrg    # Strip MF so we end up with the name of the file.
8478ecce36beSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
8479ecce36beSmrg    # Check whether this is an Automake generated Makefile or not.
8480ecce36beSmrg    # We used to match only the files named `Makefile.in', but
8481ecce36beSmrg    # some people rename them; so instead we look at the file content.
8482ecce36beSmrg    # Grep'ing the first line is not enough: some people post-process
8483ecce36beSmrg    # each Makefile.in and add a new line on top of each file to say so.
8484ecce36beSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
8485ecce36beSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
8486ecce36beSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8487ecce36beSmrg      dirpart=`AS_DIRNAME("$mf")`
8488ecce36beSmrg    else
8489ecce36beSmrg      continue
8490ecce36beSmrg    fi
8491ecce36beSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
8492ecce36beSmrg    # from the Makefile without running `make'.
8493ecce36beSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8494ecce36beSmrg    test -z "$DEPDIR" && continue
8495ecce36beSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
8496ecce36beSmrg    test -z "am__include" && continue
8497ecce36beSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8498ecce36beSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
8499ecce36beSmrg    U=`sed -n 's/^U = //p' < "$mf"`
8500ecce36beSmrg    # Find all dependency output files, they are included files with
8501ecce36beSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
8502ecce36beSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
8503ecce36beSmrg    # expansion.
8504ecce36beSmrg    for file in `sed -n "
8505ecce36beSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8506ecce36beSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8507ecce36beSmrg      # Make sure the directory exists.
8508ecce36beSmrg      test -f "$dirpart/$file" && continue
8509ecce36beSmrg      fdir=`AS_DIRNAME(["$file"])`
8510ecce36beSmrg      AS_MKDIR_P([$dirpart/$fdir])
8511ecce36beSmrg      # echo "creating $dirpart/$file"
8512ecce36beSmrg      echo '# dummy' > "$dirpart/$file"
8513ecce36beSmrg    done
8514ecce36beSmrg  done
8515ecce36beSmrg}
8516ecce36beSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8517ecce36beSmrg
8518ecce36beSmrg
8519ecce36beSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
8520ecce36beSmrg# -----------------------------
8521ecce36beSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
8522ecce36beSmrg#
8523ecce36beSmrg# This code is only required when automatic dependency tracking
8524ecce36beSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
8525ecce36beSmrg# need in order to bootstrap the dependency handling code.
8526ecce36beSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8527ecce36beSmrg[AC_CONFIG_COMMANDS([depfiles],
8528ecce36beSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8529ecce36beSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8530ecce36beSmrg])
8531ecce36beSmrg
8532ecce36beSmrg# Do all the work for Automake.                             -*- Autoconf -*-
8533ecce36beSmrg
8534ecce36beSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8535ecce36beSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
8536ecce36beSmrg#
8537ecce36beSmrg# This file is free software; the Free Software Foundation
8538ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8539ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8540ecce36beSmrg
8541ecce36beSmrg# serial 16
8542ecce36beSmrg
8543ecce36beSmrg# This macro actually does too much.  Some checks are only needed if
8544ecce36beSmrg# your package does certain things.  But this isn't really a big deal.
8545ecce36beSmrg
8546ecce36beSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8547ecce36beSmrg# AM_INIT_AUTOMAKE([OPTIONS])
8548ecce36beSmrg# -----------------------------------------------
8549ecce36beSmrg# The call with PACKAGE and VERSION arguments is the old style
8550ecce36beSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
8551ecce36beSmrg# and VERSION should now be passed to AC_INIT and removed from
8552ecce36beSmrg# the call to AM_INIT_AUTOMAKE.
8553ecce36beSmrg# We support both call styles for the transition.  After
8554ecce36beSmrg# the next Automake release, Autoconf can make the AC_INIT
8555ecce36beSmrg# arguments mandatory, and then we can depend on a new Autoconf
8556ecce36beSmrg# release and drop the old call support.
8557ecce36beSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
8558ecce36beSmrg[AC_PREREQ([2.62])dnl
8559ecce36beSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
8560ecce36beSmrgdnl the ones we care about.
8561ecce36beSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8562ecce36beSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8563ecce36beSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
8564ecce36beSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
8565ecce36beSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8566ecce36beSmrg  # is not polluted with repeated "-I."
8567ecce36beSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8568ecce36beSmrg  # test to see if srcdir already configured
8569ecce36beSmrg  if test -f $srcdir/config.status; then
8570ecce36beSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8571ecce36beSmrg  fi
8572ecce36beSmrgfi
8573ecce36beSmrg
8574ecce36beSmrg# test whether we have cygpath
8575ecce36beSmrgif test -z "$CYGPATH_W"; then
8576ecce36beSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
8577ecce36beSmrg    CYGPATH_W='cygpath -w'
8578ecce36beSmrg  else
8579ecce36beSmrg    CYGPATH_W=echo
8580ecce36beSmrg  fi
8581ecce36beSmrgfi
8582ecce36beSmrgAC_SUBST([CYGPATH_W])
8583ecce36beSmrg
8584ecce36beSmrg# Define the identity of the package.
8585ecce36beSmrgdnl Distinguish between old-style and new-style calls.
8586ecce36beSmrgm4_ifval([$2],
8587ecce36beSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8588ecce36beSmrg AC_SUBST([PACKAGE], [$1])dnl
8589ecce36beSmrg AC_SUBST([VERSION], [$2])],
8590ecce36beSmrg[_AM_SET_OPTIONS([$1])dnl
8591ecce36beSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8592ecce36beSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8593ecce36beSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8594ecce36beSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8595ecce36beSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8596ecce36beSmrg
8597ecce36beSmrg_AM_IF_OPTION([no-define],,
8598ecce36beSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8599ecce36beSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8600ecce36beSmrg
8601ecce36beSmrg# Some tools Automake needs.
8602ecce36beSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
8603ecce36beSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
8604ecce36beSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8605ecce36beSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
8606ecce36beSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8607ecce36beSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
8608ecce36beSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
8609ecce36beSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8610ecce36beSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
8611ecce36beSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
8612ecce36beSmrg# We need awk for the "check" target.  The system "awk" is bad on
8613ecce36beSmrg# some platforms.
8614ecce36beSmrgAC_REQUIRE([AC_PROG_AWK])dnl
8615ecce36beSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
8616ecce36beSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
8617ecce36beSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8618ecce36beSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8619ecce36beSmrg			     [_AM_PROG_TAR([v7])])])
8620ecce36beSmrg_AM_IF_OPTION([no-dependencies],,
8621ecce36beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
8622ecce36beSmrg		  [_AM_DEPENDENCIES(CC)],
8623ecce36beSmrg		  [define([AC_PROG_CC],
8624ecce36beSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8625ecce36beSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
8626ecce36beSmrg		  [_AM_DEPENDENCIES(CXX)],
8627ecce36beSmrg		  [define([AC_PROG_CXX],
8628ecce36beSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8629ecce36beSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
8630ecce36beSmrg		  [_AM_DEPENDENCIES(OBJC)],
8631ecce36beSmrg		  [define([AC_PROG_OBJC],
8632ecce36beSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8633ecce36beSmrg])
8634ecce36beSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
8635ecce36beSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
8636ecce36beSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
8637ecce36beSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
8638ecce36beSmrgAC_CONFIG_COMMANDS_PRE(dnl
8639ecce36beSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
8640ecce36beSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
8641ecce36beSmrg])
8642ecce36beSmrg
8643ecce36beSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
8644ecce36beSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
8645ecce36beSmrgdnl mangled by Autoconf and run in a shell conditional statement.
8646ecce36beSmrgm4_define([_AC_COMPILER_EXEEXT],
8647ecce36beSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
8648ecce36beSmrg
8649ecce36beSmrg
8650ecce36beSmrg# When config.status generates a header, we must update the stamp-h file.
8651ecce36beSmrg# This file resides in the same directory as the config header
8652ecce36beSmrg# that is generated.  The stamp files are numbered to have different names.
8653ecce36beSmrg
8654ecce36beSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8655ecce36beSmrg# loop where config.status creates the headers, so we can generate
8656ecce36beSmrg# our stamp files there.
8657ecce36beSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8658ecce36beSmrg[# Compute $1's index in $config_headers.
8659ecce36beSmrg_am_arg=$1
8660ecce36beSmrg_am_stamp_count=1
8661ecce36beSmrgfor _am_header in $config_headers :; do
8662ecce36beSmrg  case $_am_header in
8663ecce36beSmrg    $_am_arg | $_am_arg:* )
8664ecce36beSmrg      break ;;
8665ecce36beSmrg    * )
8666ecce36beSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8667ecce36beSmrg  esac
8668ecce36beSmrgdone
8669ecce36beSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8670ecce36beSmrg
8671ecce36beSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
8672ecce36beSmrg#
8673ecce36beSmrg# This file is free software; the Free Software Foundation
8674ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8675ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8676ecce36beSmrg
8677ecce36beSmrg# AM_PROG_INSTALL_SH
8678ecce36beSmrg# ------------------
8679ecce36beSmrg# Define $install_sh.
8680ecce36beSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
8681ecce36beSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8682ecce36beSmrgif test x"${install_sh}" != xset; then
8683ecce36beSmrg  case $am_aux_dir in
8684ecce36beSmrg  *\ * | *\	*)
8685ecce36beSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8686ecce36beSmrg  *)
8687ecce36beSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
8688ecce36beSmrg  esac
8689ecce36beSmrgfi
8690ecce36beSmrgAC_SUBST(install_sh)])
8691ecce36beSmrg
8692ecce36beSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
8693ecce36beSmrg#
8694ecce36beSmrg# This file is free software; the Free Software Foundation
8695ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8696ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8697ecce36beSmrg
8698ecce36beSmrg# serial 2
8699ecce36beSmrg
8700ecce36beSmrg# Check whether the underlying file-system supports filenames
8701ecce36beSmrg# with a leading dot.  For instance MS-DOS doesn't.
8702ecce36beSmrgAC_DEFUN([AM_SET_LEADING_DOT],
8703ecce36beSmrg[rm -rf .tst 2>/dev/null
8704ecce36beSmrgmkdir .tst 2>/dev/null
8705ecce36beSmrgif test -d .tst; then
8706ecce36beSmrg  am__leading_dot=.
8707ecce36beSmrgelse
8708ecce36beSmrg  am__leading_dot=_
8709ecce36beSmrgfi
8710ecce36beSmrgrmdir .tst 2>/dev/null
8711ecce36beSmrgAC_SUBST([am__leading_dot])])
8712ecce36beSmrg
8713ecce36beSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
8714ecce36beSmrg
8715ecce36beSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
8716ecce36beSmrg#
8717ecce36beSmrg# This file is free software; the Free Software Foundation
8718ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8719ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8720ecce36beSmrg
8721ecce36beSmrg# serial 4
8722ecce36beSmrg
8723ecce36beSmrg# AM_MAKE_INCLUDE()
8724ecce36beSmrg# -----------------
8725ecce36beSmrg# Check to see how make treats includes.
8726ecce36beSmrgAC_DEFUN([AM_MAKE_INCLUDE],
8727ecce36beSmrg[am_make=${MAKE-make}
8728ecce36beSmrgcat > confinc << 'END'
8729ecce36beSmrgam__doit:
8730ecce36beSmrg	@echo this is the am__doit target
8731ecce36beSmrg.PHONY: am__doit
8732ecce36beSmrgEND
8733ecce36beSmrg# If we don't find an include directive, just comment out the code.
8734ecce36beSmrgAC_MSG_CHECKING([for style of include used by $am_make])
8735ecce36beSmrgam__include="#"
8736ecce36beSmrgam__quote=
8737ecce36beSmrg_am_result=none
8738ecce36beSmrg# First try GNU make style include.
8739ecce36beSmrgecho "include confinc" > confmf
8740ecce36beSmrg# Ignore all kinds of additional output from `make'.
8741ecce36beSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
8742ecce36beSmrg*the\ am__doit\ target*)
8743ecce36beSmrg  am__include=include
8744ecce36beSmrg  am__quote=
8745ecce36beSmrg  _am_result=GNU
8746ecce36beSmrg  ;;
8747ecce36beSmrgesac
8748ecce36beSmrg# Now try BSD make style include.
8749ecce36beSmrgif test "$am__include" = "#"; then
8750ecce36beSmrg   echo '.include "confinc"' > confmf
8751ecce36beSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
8752ecce36beSmrg   *the\ am__doit\ target*)
8753ecce36beSmrg     am__include=.include
8754ecce36beSmrg     am__quote="\""
8755ecce36beSmrg     _am_result=BSD
8756ecce36beSmrg     ;;
8757ecce36beSmrg   esac
8758ecce36beSmrgfi
8759ecce36beSmrgAC_SUBST([am__include])
8760ecce36beSmrgAC_SUBST([am__quote])
8761ecce36beSmrgAC_MSG_RESULT([$_am_result])
8762ecce36beSmrgrm -f confinc confmf
8763ecce36beSmrg])
8764ecce36beSmrg
8765ecce36beSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8766ecce36beSmrg
8767ecce36beSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8768ecce36beSmrg# Free Software Foundation, Inc.
8769ecce36beSmrg#
8770ecce36beSmrg# This file is free software; the Free Software Foundation
8771ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8772ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8773ecce36beSmrg
8774ecce36beSmrg# serial 6
8775ecce36beSmrg
8776ecce36beSmrg# AM_MISSING_PROG(NAME, PROGRAM)
8777ecce36beSmrg# ------------------------------
8778ecce36beSmrgAC_DEFUN([AM_MISSING_PROG],
8779ecce36beSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
8780ecce36beSmrg$1=${$1-"${am_missing_run}$2"}
8781ecce36beSmrgAC_SUBST($1)])
8782ecce36beSmrg
8783ecce36beSmrg
8784ecce36beSmrg# AM_MISSING_HAS_RUN
8785ecce36beSmrg# ------------------
8786ecce36beSmrg# Define MISSING if not defined so far and test if it supports --run.
8787ecce36beSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
8788ecce36beSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
8789ecce36beSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8790ecce36beSmrgAC_REQUIRE_AUX_FILE([missing])dnl
8791ecce36beSmrgif test x"${MISSING+set}" != xset; then
8792ecce36beSmrg  case $am_aux_dir in
8793ecce36beSmrg  *\ * | *\	*)
8794ecce36beSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8795ecce36beSmrg  *)
8796ecce36beSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8797ecce36beSmrg  esac
8798ecce36beSmrgfi
8799ecce36beSmrg# Use eval to expand $SHELL
8800ecce36beSmrgif eval "$MISSING --run true"; then
8801ecce36beSmrg  am_missing_run="$MISSING --run "
8802ecce36beSmrgelse
8803ecce36beSmrg  am_missing_run=
8804ecce36beSmrg  AC_MSG_WARN([`missing' script is too old or missing])
8805ecce36beSmrgfi
8806ecce36beSmrg])
8807ecce36beSmrg
8808ecce36beSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8809ecce36beSmrg#
8810ecce36beSmrg# This file is free software; the Free Software Foundation
8811ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8812ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8813ecce36beSmrg
8814ecce36beSmrg# AM_PROG_MKDIR_P
8815ecce36beSmrg# ---------------
8816ecce36beSmrg# Check for `mkdir -p'.
8817ecce36beSmrgAC_DEFUN([AM_PROG_MKDIR_P],
8818ecce36beSmrg[AC_PREREQ([2.60])dnl
8819ecce36beSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8820ecce36beSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8821ecce36beSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
8822ecce36beSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8823ecce36beSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8824ecce36beSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
8825ecce36beSmrgdnl adjustment using top_builddir (which is defined more often than
8826ecce36beSmrgdnl MKDIR_P).
8827ecce36beSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8828ecce36beSmrgcase $mkdir_p in
8829ecce36beSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
8830ecce36beSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8831ecce36beSmrgesac
8832ecce36beSmrg])
8833ecce36beSmrg
8834ecce36beSmrg# Helper functions for option handling.                     -*- Autoconf -*-
8835ecce36beSmrg
8836ecce36beSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8837ecce36beSmrg#
8838ecce36beSmrg# This file is free software; the Free Software Foundation
8839ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8840ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8841ecce36beSmrg
8842ecce36beSmrg# serial 4
8843ecce36beSmrg
8844ecce36beSmrg# _AM_MANGLE_OPTION(NAME)
8845ecce36beSmrg# -----------------------
8846ecce36beSmrgAC_DEFUN([_AM_MANGLE_OPTION],
8847ecce36beSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8848ecce36beSmrg
8849ecce36beSmrg# _AM_SET_OPTION(NAME)
8850ecce36beSmrg# ------------------------------
8851ecce36beSmrg# Set option NAME.  Presently that only means defining a flag for this option.
8852ecce36beSmrgAC_DEFUN([_AM_SET_OPTION],
8853ecce36beSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8854ecce36beSmrg
8855ecce36beSmrg# _AM_SET_OPTIONS(OPTIONS)
8856ecce36beSmrg# ----------------------------------
8857ecce36beSmrg# OPTIONS is a space-separated list of Automake options.
8858ecce36beSmrgAC_DEFUN([_AM_SET_OPTIONS],
8859ecce36beSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8860ecce36beSmrg
8861ecce36beSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8862ecce36beSmrg# -------------------------------------------
8863ecce36beSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8864ecce36beSmrgAC_DEFUN([_AM_IF_OPTION],
8865ecce36beSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8866ecce36beSmrg
8867ecce36beSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8868ecce36beSmrg
8869ecce36beSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8870ecce36beSmrg# Free Software Foundation, Inc.
8871ecce36beSmrg#
8872ecce36beSmrg# This file is free software; the Free Software Foundation
8873ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8874ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8875ecce36beSmrg
8876ecce36beSmrg# serial 5
8877ecce36beSmrg
8878ecce36beSmrg# AM_SANITY_CHECK
8879ecce36beSmrg# ---------------
8880ecce36beSmrgAC_DEFUN([AM_SANITY_CHECK],
8881ecce36beSmrg[AC_MSG_CHECKING([whether build environment is sane])
8882ecce36beSmrg# Just in case
8883ecce36beSmrgsleep 1
8884ecce36beSmrgecho timestamp > conftest.file
8885ecce36beSmrg# Reject unsafe characters in $srcdir or the absolute working directory
8886ecce36beSmrg# name.  Accept space and tab only in the latter.
8887ecce36beSmrgam_lf='
8888ecce36beSmrg'
8889ecce36beSmrgcase `pwd` in
8890ecce36beSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8891ecce36beSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8892ecce36beSmrgesac
8893ecce36beSmrgcase $srcdir in
8894ecce36beSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8895ecce36beSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8896ecce36beSmrgesac
8897ecce36beSmrg
8898ecce36beSmrg# Do `set' in a subshell so we don't clobber the current shell's
8899ecce36beSmrg# arguments.  Must try -L first in case configure is actually a
8900ecce36beSmrg# symlink; some systems play weird games with the mod time of symlinks
8901ecce36beSmrg# (eg FreeBSD returns the mod time of the symlink's containing
8902ecce36beSmrg# directory).
8903ecce36beSmrgif (
8904ecce36beSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8905ecce36beSmrg   if test "$[*]" = "X"; then
8906ecce36beSmrg      # -L didn't work.
8907ecce36beSmrg      set X `ls -t "$srcdir/configure" conftest.file`
8908ecce36beSmrg   fi
8909ecce36beSmrg   rm -f conftest.file
8910ecce36beSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8911ecce36beSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8912ecce36beSmrg
8913ecce36beSmrg      # If neither matched, then we have a broken ls.  This can happen
8914ecce36beSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8915ecce36beSmrg      # broken ls alias from the environment.  This has actually
8916ecce36beSmrg      # happened.  Such a system could not be considered "sane".
8917ecce36beSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8918ecce36beSmrgalias in your environment])
8919ecce36beSmrg   fi
8920ecce36beSmrg
8921ecce36beSmrg   test "$[2]" = conftest.file
8922ecce36beSmrg   )
8923ecce36beSmrgthen
8924ecce36beSmrg   # Ok.
8925ecce36beSmrg   :
8926ecce36beSmrgelse
8927ecce36beSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
8928ecce36beSmrgCheck your system clock])
8929ecce36beSmrgfi
8930ecce36beSmrgAC_MSG_RESULT(yes)])
8931ecce36beSmrg
8932ecce36beSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8933ecce36beSmrg#
8934ecce36beSmrg# This file is free software; the Free Software Foundation
8935ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8936ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8937ecce36beSmrg
8938ecce36beSmrg# AM_PROG_INSTALL_STRIP
8939ecce36beSmrg# ---------------------
8940ecce36beSmrg# One issue with vendor `install' (even GNU) is that you can't
8941ecce36beSmrg# specify the program used to strip binaries.  This is especially
8942ecce36beSmrg# annoying in cross-compiling environments, where the build's strip
8943ecce36beSmrg# is unlikely to handle the host's binaries.
8944ecce36beSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
8945ecce36beSmrg# always use install-sh in `make install-strip', and initialize
8946ecce36beSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
8947ecce36beSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
8948ecce36beSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8949ecce36beSmrg# Installed binaries are usually stripped using `strip' when the user
8950ecce36beSmrg# run `make install-strip'.  However `strip' might not be the right
8951ecce36beSmrg# tool to use in cross-compilation environments, therefore Automake
8952ecce36beSmrg# will honor the `STRIP' environment variable to overrule this program.
8953ecce36beSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8954ecce36beSmrgif test "$cross_compiling" != no; then
8955ecce36beSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
8956ecce36beSmrgfi
8957ecce36beSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8958ecce36beSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
8959ecce36beSmrg
8960ecce36beSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
8961ecce36beSmrg#
8962ecce36beSmrg# This file is free software; the Free Software Foundation
8963ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8964ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8965ecce36beSmrg
8966ecce36beSmrg# serial 2
8967ecce36beSmrg
8968ecce36beSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
8969ecce36beSmrg# ---------------------------
8970ecce36beSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
8971ecce36beSmrg# This macro is traced by Automake.
8972ecce36beSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
8973ecce36beSmrg
8974ecce36beSmrg# AM_SUBST_NOTMAKE(VARIABLE)
8975ecce36beSmrg# ---------------------------
8976ecce36beSmrg# Public sister of _AM_SUBST_NOTMAKE.
8977ecce36beSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
8978ecce36beSmrg
8979ecce36beSmrg# Check how to create a tarball.                            -*- Autoconf -*-
8980ecce36beSmrg
8981ecce36beSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
8982ecce36beSmrg#
8983ecce36beSmrg# This file is free software; the Free Software Foundation
8984ecce36beSmrg# gives unlimited permission to copy and/or distribute it,
8985ecce36beSmrg# with or without modifications, as long as this notice is preserved.
8986ecce36beSmrg
8987ecce36beSmrg# serial 2
8988ecce36beSmrg
8989ecce36beSmrg# _AM_PROG_TAR(FORMAT)
8990ecce36beSmrg# --------------------
8991ecce36beSmrg# Check how to create a tarball in format FORMAT.
8992ecce36beSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
8993ecce36beSmrg#
8994ecce36beSmrg# Substitute a variable $(am__tar) that is a command
8995ecce36beSmrg# writing to stdout a FORMAT-tarball containing the directory
8996ecce36beSmrg# $tardir.
8997ecce36beSmrg#     tardir=directory && $(am__tar) > result.tar
8998ecce36beSmrg#
8999ecce36beSmrg# Substitute a variable $(am__untar) that extract such
9000ecce36beSmrg# a tarball read from stdin.
9001ecce36beSmrg#     $(am__untar) < result.tar
9002ecce36beSmrgAC_DEFUN([_AM_PROG_TAR],
9003ecce36beSmrg[# Always define AMTAR for backward compatibility.
9004ecce36beSmrgAM_MISSING_PROG([AMTAR], [tar])
9005ecce36beSmrgm4_if([$1], [v7],
9006ecce36beSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9007ecce36beSmrg     [m4_case([$1], [ustar],, [pax],,
9008ecce36beSmrg              [m4_fatal([Unknown tar format])])
9009ecce36beSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9010ecce36beSmrg# Loop over all known methods to create a tar archive until one works.
9011ecce36beSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9012ecce36beSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9013ecce36beSmrg# Do not fold the above two line into one, because Tru64 sh and
9014ecce36beSmrg# Solaris sh will not grok spaces in the rhs of `-'.
9015ecce36beSmrgfor _am_tool in $_am_tools
9016ecce36beSmrgdo
9017ecce36beSmrg  case $_am_tool in
9018ecce36beSmrg  gnutar)
9019ecce36beSmrg    for _am_tar in tar gnutar gtar;
9020ecce36beSmrg    do
9021ecce36beSmrg      AM_RUN_LOG([$_am_tar --version]) && break
9022ecce36beSmrg    done
9023ecce36beSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9024ecce36beSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9025ecce36beSmrg    am__untar="$_am_tar -xf -"
9026ecce36beSmrg    ;;
9027ecce36beSmrg  plaintar)
9028ecce36beSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9029ecce36beSmrg    # ustar tarball either.
9030ecce36beSmrg    (tar --version) >/dev/null 2>&1 && continue
9031ecce36beSmrg    am__tar='tar chf - "$$tardir"'
9032ecce36beSmrg    am__tar_='tar chf - "$tardir"'
9033ecce36beSmrg    am__untar='tar xf -'
9034ecce36beSmrg    ;;
9035ecce36beSmrg  pax)
9036ecce36beSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
9037ecce36beSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
9038ecce36beSmrg    am__untar='pax -r'
9039ecce36beSmrg    ;;
9040ecce36beSmrg  cpio)
9041ecce36beSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9042ecce36beSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9043ecce36beSmrg    am__untar='cpio -i -H $1 -d'
9044ecce36beSmrg    ;;
9045ecce36beSmrg  none)
9046ecce36beSmrg    am__tar=false
9047ecce36beSmrg    am__tar_=false
9048ecce36beSmrg    am__untar=false
9049ecce36beSmrg    ;;
9050ecce36beSmrg  esac
9051ecce36beSmrg
9052ecce36beSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
9053ecce36beSmrg  # and am__untar set.
9054ecce36beSmrg  test -n "${am_cv_prog_tar_$1}" && break
9055ecce36beSmrg
9056ecce36beSmrg  # tar/untar a dummy directory, and stop if the command works
9057ecce36beSmrg  rm -rf conftest.dir
9058ecce36beSmrg  mkdir conftest.dir
9059ecce36beSmrg  echo GrepMe > conftest.dir/file
9060ecce36beSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9061ecce36beSmrg  rm -rf conftest.dir
9062ecce36beSmrg  if test -s conftest.tar; then
9063ecce36beSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
9064ecce36beSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9065ecce36beSmrg  fi
9066ecce36beSmrgdone
9067ecce36beSmrgrm -rf conftest.dir
9068ecce36beSmrg
9069ecce36beSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9070ecce36beSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
9071ecce36beSmrgAC_SUBST([am__tar])
9072ecce36beSmrgAC_SUBST([am__untar])
9073ecce36beSmrg]) # _AM_PROG_TAR
9074ecce36beSmrg
9075ecce36beSmrgm4_include([acinclude.m4])
9076