aclocal.m4 revision d656433a
1d656433aSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2126a8a12Smrg
3126a8a12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4d656433aSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5126a8a12Smrg# This file is free software; the Free Software Foundation
6126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
7126a8a12Smrg# with or without modifications, as long as this notice is preserved.
8126a8a12Smrg
9126a8a12Smrg# This program is distributed in the hope that it will be useful,
10126a8a12Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11126a8a12Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12126a8a12Smrg# PARTICULAR PURPOSE.
13126a8a12Smrg
14d656433aSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15d656433aSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16d656433aSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17d656433aSmrg[m4_warning([this file was generated for autoconf 2.63.
18d656433aSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19d656433aSmrgIf you have problems, you may need to regenerate the build system entirely.
20d656433aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21126a8a12Smrg
22126a8a12Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23d656433aSmrg#
24d656433aSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25d656433aSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26d656433aSmrg#   Written by Gordon Matzigkeit, 1996
27d656433aSmrg#
28d656433aSmrg# This file is free software; the Free Software Foundation gives
29d656433aSmrg# unlimited permission to copy and/or distribute it, with or without
30d656433aSmrg# modifications, as long as this notice is preserved.
31d656433aSmrg
32d656433aSmrgm4_define([_LT_COPYING], [dnl
33d656433aSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34d656433aSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35d656433aSmrg#   Written by Gordon Matzigkeit, 1996
36d656433aSmrg#
37d656433aSmrg#   This file is part of GNU Libtool.
38d656433aSmrg#
39d656433aSmrg# GNU Libtool is free software; you can redistribute it and/or
40d656433aSmrg# modify it under the terms of the GNU General Public License as
41d656433aSmrg# published by the Free Software Foundation; either version 2 of
42d656433aSmrg# the License, or (at your option) any later version.
43d656433aSmrg#
44d656433aSmrg# As a special exception to the GNU General Public License,
45d656433aSmrg# if you distribute this file as part of a program or library that
46d656433aSmrg# is built using GNU Libtool, you may include this file under the
47d656433aSmrg# same distribution terms that you use for the rest of that program.
48d656433aSmrg#
49d656433aSmrg# GNU Libtool is distributed in the hope that it will be useful,
50d656433aSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51d656433aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52d656433aSmrg# GNU General Public License for more details.
53d656433aSmrg#
54d656433aSmrg# You should have received a copy of the GNU General Public License
55d656433aSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56d656433aSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57d656433aSmrg# obtained by writing to the Free Software Foundation, Inc.,
58d656433aSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59d656433aSmrg])
60126a8a12Smrg
61d656433aSmrg# serial 56 LT_INIT
62126a8a12Smrg
63126a8a12Smrg
64d656433aSmrg# LT_PREREQ(VERSION)
65d656433aSmrg# ------------------
66d656433aSmrg# Complain and exit if this libtool version is less that VERSION.
67d656433aSmrgm4_defun([LT_PREREQ],
68d656433aSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69d656433aSmrg       [m4_default([$3],
70d656433aSmrg		   [m4_fatal([Libtool version $1 or higher is required],
71d656433aSmrg		             63)])],
72d656433aSmrg       [$2])])
73126a8a12Smrg
74126a8a12Smrg
75d656433aSmrg# _LT_CHECK_BUILDDIR
76d656433aSmrg# ------------------
77d656433aSmrg# Complain if the absolute build directory name contains unusual characters
78d656433aSmrgm4_defun([_LT_CHECK_BUILDDIR],
79d656433aSmrg[case `pwd` in
80d656433aSmrg  *\ * | *\	*)
81d656433aSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82d656433aSmrgesac
83d656433aSmrg])
84d656433aSmrg
85d656433aSmrg
86d656433aSmrg# LT_INIT([OPTIONS])
87d656433aSmrg# ------------------
88d656433aSmrgAC_DEFUN([LT_INIT],
89d656433aSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90d656433aSmrgAC_BEFORE([$0], [LT_LANG])dnl
91d656433aSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92d656433aSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93d656433aSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
94d656433aSmrg
95d656433aSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96d656433aSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97d656433aSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98d656433aSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99d656433aSmrgdnl unless we require an AC_DEFUNed macro:
100d656433aSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101d656433aSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102d656433aSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103d656433aSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104d656433aSmrgm4_require([_LT_PROG_LTMAIN])dnl
105d656433aSmrg
106d656433aSmrgdnl Parse OPTIONS
107d656433aSmrg_LT_SET_OPTIONS([$0], [$1])
108126a8a12Smrg
109126a8a12Smrg# This can be used to rebuild libtool when needed
110d656433aSmrgLIBTOOL_DEPS="$ltmain"
111126a8a12Smrg
112126a8a12Smrg# Always use our own libtool.
113126a8a12SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
114126a8a12SmrgAC_SUBST(LIBTOOL)dnl
115126a8a12Smrg
116d656433aSmrg_LT_SETUP
117126a8a12Smrg
118d656433aSmrg# Only expand once:
119d656433aSmrgm4_define([LT_INIT])
120d656433aSmrg])# LT_INIT
121126a8a12Smrg
122d656433aSmrg# Old names:
123d656433aSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124d656433aSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125d656433aSmrgdnl aclocal-1.4 backwards compatibility:
126d656433aSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127d656433aSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128d656433aSmrg
129d656433aSmrg
130d656433aSmrg# _LT_CC_BASENAME(CC)
131d656433aSmrg# -------------------
132d656433aSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133d656433aSmrgm4_defun([_LT_CC_BASENAME],
134d656433aSmrg[for cc_temp in $1""; do
135d656433aSmrg  case $cc_temp in
136d656433aSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137d656433aSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138d656433aSmrg    \-*) ;;
139d656433aSmrg    *) break;;
140d656433aSmrg  esac
141d656433aSmrgdone
142d656433aSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143d656433aSmrg])
144d656433aSmrg
145d656433aSmrg
146d656433aSmrg# _LT_FILEUTILS_DEFAULTS
147d656433aSmrg# ----------------------
148d656433aSmrg# It is okay to use these file commands and assume they have been set
149d656433aSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150d656433aSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151d656433aSmrg[: ${CP="cp -f"}
152d656433aSmrg: ${MV="mv -f"}
153d656433aSmrg: ${RM="rm -f"}
154d656433aSmrg])# _LT_FILEUTILS_DEFAULTS
155d656433aSmrg
156d656433aSmrg
157d656433aSmrg# _LT_SETUP
158d656433aSmrg# ---------
159d656433aSmrgm4_defun([_LT_SETUP],
160d656433aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161126a8a12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162d656433aSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163d656433aSmrg_LT_DECL([], [host], [0])dnl
164d656433aSmrg_LT_DECL([], [host_os], [0])dnl
165d656433aSmrgdnl
166d656433aSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167d656433aSmrg_LT_DECL([], [build], [0])dnl
168d656433aSmrg_LT_DECL([], [build_os], [0])dnl
169d656433aSmrgdnl
170126a8a12SmrgAC_REQUIRE([AC_PROG_CC])dnl
171d656433aSmrgAC_REQUIRE([LT_PATH_LD])dnl
172d656433aSmrgAC_REQUIRE([LT_PATH_NM])dnl
173d656433aSmrgdnl
174126a8a12SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175d656433aSmrgtest -z "$LN_S" && LN_S="ln -s"
176d656433aSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177d656433aSmrgdnl
178d656433aSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179d656433aSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180d656433aSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181126a8a12Smrgdnl
182d656433aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183d656433aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184d656433aSmrgm4_require([_LT_CMD_RELOAD])dnl
185d656433aSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186d656433aSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187d656433aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188d656433aSmrg
189d656433aSmrg_LT_CONFIG_LIBTOOL_INIT([
190d656433aSmrg# See if we are running on zsh, and set the options which allow our
191d656433aSmrg# commands through without removal of \ escapes INIT.
192d656433aSmrgif test -n "\${ZSH_VERSION+set}" ; then
193d656433aSmrg   setopt NO_GLOB_SUBST
194d656433aSmrgfi
195d656433aSmrg])
196d656433aSmrgif test -n "${ZSH_VERSION+set}" ; then
197d656433aSmrg   setopt NO_GLOB_SUBST
198d656433aSmrgfi
199126a8a12Smrg
200d656433aSmrg_LT_CHECK_OBJDIR
201126a8a12Smrg
202d656433aSmrgm4_require([_LT_TAG_COMPILER])dnl
203d656433aSmrg_LT_PROG_ECHO_BACKSLASH
204126a8a12Smrg
205126a8a12Smrgcase $host_os in
206126a8a12Smrgaix3*)
207126a8a12Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
208126a8a12Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
209126a8a12Smrg  # vanish in a puff of smoke.
210126a8a12Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
211126a8a12Smrg    COLLECT_NAMES=
212126a8a12Smrg    export COLLECT_NAMES
213126a8a12Smrg  fi
214126a8a12Smrg  ;;
215126a8a12Smrgesac
216126a8a12Smrg
217126a8a12Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
218126a8a12Smrg# metacharacters that are still active within double-quoted strings.
219d656433aSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220126a8a12Smrg
221126a8a12Smrg# Same as above, but do not quote variable references.
222d656433aSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
223126a8a12Smrg
224126a8a12Smrg# Sed substitution to delay expansion of an escaped shell variable in a
225126a8a12Smrg# double_quote_subst'ed string.
226126a8a12Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227126a8a12Smrg
228d656433aSmrg# Sed substitution to delay expansion of an escaped single quote.
229d656433aSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230d656433aSmrg
231126a8a12Smrg# Sed substitution to avoid accidental globbing in evaled expressions
232126a8a12Smrgno_glob_subst='s/\*/\\\*/g'
233126a8a12Smrg
234126a8a12Smrg# Global variables:
235d656433aSmrgofile=libtool
236126a8a12Smrgcan_build_shared=yes
237126a8a12Smrg
238126a8a12Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
239126a8a12Smrg# which needs '.lib').
240126a8a12Smrglibext=a
241126a8a12Smrg
242d656433aSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
243126a8a12Smrg
244126a8a12Smrgold_CC="$CC"
245126a8a12Smrgold_CFLAGS="$CFLAGS"
246126a8a12Smrg
247126a8a12Smrg# Set sane defaults for various variables
248126a8a12Smrgtest -z "$CC" && CC=cc
249126a8a12Smrgtest -z "$LTCC" && LTCC=$CC
250126a8a12Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
251126a8a12Smrgtest -z "$LD" && LD=ld
252126a8a12Smrgtest -z "$ac_objext" && ac_objext=o
253126a8a12Smrg
254126a8a12Smrg_LT_CC_BASENAME([$compiler])
255126a8a12Smrg
256126a8a12Smrg# Only perform the check for file, if the check method requires it
257d656433aSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
258126a8a12Smrgcase $deplibs_check_method in
259126a8a12Smrgfile_magic*)
260126a8a12Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261d656433aSmrg    _LT_PATH_MAGIC
262126a8a12Smrg  fi
263126a8a12Smrg  ;;
264126a8a12Smrgesac
265126a8a12Smrg
266d656433aSmrg# Use C for the default configuration in the libtool script
267d656433aSmrgLT_SUPPORTED_TAG([CC])
268d656433aSmrg_LT_LANG_C_CONFIG
269d656433aSmrg_LT_LANG_DEFAULT_CONFIG
270d656433aSmrg_LT_CONFIG_COMMANDS
271d656433aSmrg])# _LT_SETUP
272126a8a12Smrg
273126a8a12Smrg
274d656433aSmrg# _LT_PROG_LTMAIN
275d656433aSmrg# ---------------
276d656433aSmrg# Note that this code is called both from `configure', and `config.status'
277d656433aSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278d656433aSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279d656433aSmrg# so we pass a copy along to make sure it has a sensible value anyway.
280d656433aSmrgm4_defun([_LT_PROG_LTMAIN],
281d656433aSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282d656433aSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283d656433aSmrgltmain="$ac_aux_dir/ltmain.sh"
284d656433aSmrg])# _LT_PROG_LTMAIN
285126a8a12Smrg
286126a8a12Smrg
287126a8a12Smrg
288d656433aSmrg# So that we can recreate a full libtool script including additional
289d656433aSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290d656433aSmrg# in macros and then make a single call at the end using the `libtool'
291d656433aSmrg# label.
292126a8a12Smrg
293126a8a12Smrg
294d656433aSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295d656433aSmrg# ----------------------------------------
296d656433aSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297d656433aSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298d656433aSmrg[m4_ifval([$1],
299d656433aSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300d656433aSmrg                     [$1
301d656433aSmrg])])])
302126a8a12Smrg
303d656433aSmrg# Initialize.
304d656433aSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305126a8a12Smrg
306126a8a12Smrg
307d656433aSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308d656433aSmrg# ------------------------------
309d656433aSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310d656433aSmrgm4_define([_LT_CONFIG_LIBTOOL],
311d656433aSmrg[m4_ifval([$1],
312d656433aSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313d656433aSmrg                     [$1
314d656433aSmrg])])])
315d656433aSmrg
316d656433aSmrg# Initialize.
317d656433aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318d656433aSmrg
319d656433aSmrg
320d656433aSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321d656433aSmrg# -----------------------------------------------------
322d656433aSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323d656433aSmrg[_LT_CONFIG_LIBTOOL([$1])
324d656433aSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
325126a8a12Smrg])
326126a8a12Smrg
327126a8a12Smrg
328d656433aSmrg# _LT_FORMAT_COMMENT([COMMENT])
329d656433aSmrg# -----------------------------
330d656433aSmrg# Add leading comment marks to the start of each line, and a trailing
331d656433aSmrg# full-stop to the whole comment if one is not present already.
332d656433aSmrgm4_define([_LT_FORMAT_COMMENT],
333d656433aSmrg[m4_ifval([$1], [
334d656433aSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335d656433aSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336d656433aSmrg)])
337d656433aSmrg
338d656433aSmrg
339d656433aSmrg
340d656433aSmrg
341d656433aSmrg
342d656433aSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343d656433aSmrg# -------------------------------------------------------------------
344d656433aSmrg# CONFIGNAME is the name given to the value in the libtool script.
345d656433aSmrg# VARNAME is the (base) name used in the configure script.
346d656433aSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347d656433aSmrg# VARNAME.  Any other value will be used directly.
348d656433aSmrgm4_define([_LT_DECL],
349d656433aSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350d656433aSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351d656433aSmrg	[m4_ifval([$1], [$1], [$2])])
352d656433aSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353d656433aSmrg    m4_ifval([$4],
354d656433aSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355d656433aSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356d656433aSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357d656433aSmrg])
358126a8a12Smrg
359126a8a12Smrg
360d656433aSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361d656433aSmrg# --------------------------------------------------------
362d656433aSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363126a8a12Smrg
364126a8a12Smrg
365d656433aSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366d656433aSmrg# ------------------------------------------------
367d656433aSmrgm4_define([lt_decl_tag_varnames],
368d656433aSmrg[_lt_decl_filter([tagged?], [yes], $@)])
369126a8a12Smrg
370126a8a12Smrg
371d656433aSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372d656433aSmrg# ---------------------------------------------------------
373d656433aSmrgm4_define([_lt_decl_filter],
374d656433aSmrg[m4_case([$#],
375d656433aSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
376d656433aSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377d656433aSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378d656433aSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379d656433aSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380d656433aSmrg])
381126a8a12Smrg
382126a8a12Smrg
383d656433aSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384d656433aSmrg# --------------------------------------------------
385d656433aSmrgm4_define([lt_decl_quote_varnames],
386d656433aSmrg[_lt_decl_filter([value], [1], $@)])
387126a8a12Smrg
388126a8a12Smrg
389d656433aSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390d656433aSmrg# ---------------------------------------------------
391d656433aSmrgm4_define([lt_decl_dquote_varnames],
392d656433aSmrg[_lt_decl_filter([value], [2], $@)])
393126a8a12Smrg
394126a8a12Smrg
395d656433aSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396d656433aSmrg# ---------------------------------------------------
397d656433aSmrgm4_define([lt_decl_varnames_tagged],
398d656433aSmrg[m4_assert([$# <= 2])dnl
399d656433aSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
400d656433aSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401d656433aSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402d656433aSmrgm4_define([_lt_decl_varnames_tagged],
403d656433aSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404126a8a12Smrg
405126a8a12Smrg
406d656433aSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407d656433aSmrg# ------------------------------------------------
408d656433aSmrgm4_define([lt_decl_all_varnames],
409d656433aSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410d656433aSmrg     m4_if([$2], [],
411d656433aSmrg	   m4_quote(lt_decl_varnames),
412d656433aSmrg	m4_quote(m4_shift($@))))[]dnl
413d656433aSmrg])
414d656433aSmrgm4_define([_lt_decl_all_varnames],
415d656433aSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
416d656433aSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417d656433aSmrg])
418126a8a12Smrg
419126a8a12Smrg
420d656433aSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421d656433aSmrg# ------------------------------------
422d656433aSmrg# Quote a variable value, and forward it to `config.status' so that its
423d656433aSmrg# declaration there will have the same value as in `configure'.  VARNAME
424d656433aSmrg# must have a single quote delimited value for this to work.
425d656433aSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426d656433aSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427126a8a12Smrg
428126a8a12Smrg
429d656433aSmrg# _LT_CONFIG_STATUS_DECLARATIONS
430d656433aSmrg# ------------------------------
431d656433aSmrg# We delimit libtool config variables with single quotes, so when
432d656433aSmrg# we write them to config.status, we have to be sure to quote all
433d656433aSmrg# embedded single quotes properly.  In configure, this macro expands
434d656433aSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435d656433aSmrg#
436d656433aSmrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437d656433aSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438d656433aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439d656433aSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440126a8a12Smrg
441126a8a12Smrg
442d656433aSmrg# _LT_LIBTOOL_TAGS
443d656433aSmrg# ----------------
444d656433aSmrg# Output comment and list of tags supported by the script
445d656433aSmrgm4_defun([_LT_LIBTOOL_TAGS],
446d656433aSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447d656433aSmrgavailable_tags="_LT_TAGS"dnl
448d656433aSmrg])
449d656433aSmrg
450126a8a12Smrg
451d656433aSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452d656433aSmrg# -----------------------------------
453d656433aSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454d656433aSmrg# expand to a commented shell variable setting:
455d656433aSmrg#
456d656433aSmrg#    # Some comment about what VAR is for.
457d656433aSmrg#    visible_name=$lt_internal_name
458d656433aSmrgm4_define([_LT_LIBTOOL_DECLARE],
459d656433aSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460d656433aSmrg					   [description])))[]dnl
461d656433aSmrgm4_pushdef([_libtool_name],
462d656433aSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463d656433aSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464d656433aSmrg    [0], [_libtool_name=[$]$1],
465d656433aSmrg    [1], [_libtool_name=$lt_[]$1],
466d656433aSmrg    [2], [_libtool_name=$lt_[]$1],
467d656433aSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468d656433aSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469d656433aSmrg])
470126a8a12Smrg
471126a8a12Smrg
472d656433aSmrg# _LT_LIBTOOL_CONFIG_VARS
473d656433aSmrg# -----------------------
474d656433aSmrg# Produce commented declarations of non-tagged libtool config variables
475d656433aSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476d656433aSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477d656433aSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478d656433aSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479d656433aSmrg[m4_foreach([_lt_var],
480d656433aSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481d656433aSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482d656433aSmrg
483d656433aSmrg
484d656433aSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
485d656433aSmrg# -------------------------
486d656433aSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
487d656433aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488d656433aSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489d656433aSmrg
490d656433aSmrg
491d656433aSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492d656433aSmrg# ------------------------------
493d656433aSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494d656433aSmrg
495d656433aSmrg
496d656433aSmrg# _LT_CONFIG_COMMANDS
497d656433aSmrg# -------------------
498d656433aSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499d656433aSmrg# variables for single and double quote escaping we saved from calls
500d656433aSmrg# to _LT_DECL, we can put quote escaped variables declarations
501d656433aSmrg# into `config.status', and then the shell code to quote escape them in
502d656433aSmrg# for loops in `config.status'.  Finally, any additional code accumulated
503d656433aSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504d656433aSmrgm4_defun([_LT_CONFIG_COMMANDS],
505d656433aSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506d656433aSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507d656433aSmrg	dnl instead of duplicating it all over again into config.status,
508d656433aSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
509d656433aSmrg	dnl needs to know what name is stored there:
510d656433aSmrg        [AC_CONFIG_COMMANDS([libtool],
511d656433aSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512d656433aSmrg    dnl If the libtool generation code is destined for config.status,
513d656433aSmrg    dnl expand the accumulated commands and init code now:
514d656433aSmrg    [AC_CONFIG_COMMANDS([libtool],
515d656433aSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516d656433aSmrg])#_LT_CONFIG_COMMANDS
517d656433aSmrg
518d656433aSmrg
519d656433aSmrg# Initialize.
520d656433aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521d656433aSmrg[
522d656433aSmrg
523d656433aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524d656433aSmrg# if CDPATH is set.
525d656433aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526d656433aSmrg
527d656433aSmrgsed_quote_subst='$sed_quote_subst'
528d656433aSmrgdouble_quote_subst='$double_quote_subst'
529d656433aSmrgdelay_variable_subst='$delay_variable_subst'
530d656433aSmrg_LT_CONFIG_STATUS_DECLARATIONS
531d656433aSmrgLTCC='$LTCC'
532d656433aSmrgLTCFLAGS='$LTCFLAGS'
533d656433aSmrgcompiler='$compiler_DEFAULT'
534d656433aSmrg
535d656433aSmrg# Quote evaled strings.
536d656433aSmrgfor var in lt_decl_all_varnames([[ \
537d656433aSmrg]], lt_decl_quote_varnames); do
538d656433aSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539d656433aSmrg    *[[\\\\\\\`\\"\\\$]]*)
540d656433aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541126a8a12Smrg      ;;
542d656433aSmrg    *)
543d656433aSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544126a8a12Smrg      ;;
545126a8a12Smrg    esac
546d656433aSmrgdone
547d656433aSmrg
548d656433aSmrg# Double-quote double-evaled strings.
549d656433aSmrgfor var in lt_decl_all_varnames([[ \
550d656433aSmrg]], lt_decl_dquote_varnames); do
551d656433aSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552d656433aSmrg    *[[\\\\\\\`\\"\\\$]]*)
553d656433aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554126a8a12Smrg      ;;
555d656433aSmrg    *)
556d656433aSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557126a8a12Smrg      ;;
558126a8a12Smrg    esac
559d656433aSmrgdone
560126a8a12Smrg
561d656433aSmrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562d656433aSmrgcase \$lt_ECHO in
563d656433aSmrg*'\\\[$]0 --fallback-echo"')dnl "
564d656433aSmrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565126a8a12Smrg  ;;
566d656433aSmrgesac
567126a8a12Smrg
568d656433aSmrg_LT_OUTPUT_LIBTOOL_INIT
569d656433aSmrg])
570126a8a12Smrg
571126a8a12Smrg
572d656433aSmrg# LT_OUTPUT
573d656433aSmrg# ---------
574d656433aSmrg# This macro allows early generation of the libtool script (before
575d656433aSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
576d656433aSmrg# tests.
577d656433aSmrgAC_DEFUN([LT_OUTPUT],
578d656433aSmrg[: ${CONFIG_LT=./config.lt}
579d656433aSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580d656433aSmrgcat >"$CONFIG_LT" <<_LTEOF
581d656433aSmrg#! $SHELL
582d656433aSmrg# Generated by $as_me.
583d656433aSmrg# Run this file to recreate a libtool stub with the current configuration.
584d656433aSmrg
585d656433aSmrglt_cl_silent=false
586d656433aSmrgSHELL=\${CONFIG_SHELL-$SHELL}
587d656433aSmrg_LTEOF
588d656433aSmrg
589d656433aSmrgcat >>"$CONFIG_LT" <<\_LTEOF
590d656433aSmrgAS_SHELL_SANITIZE
591d656433aSmrg_AS_PREPARE
592d656433aSmrg
593d656433aSmrgexec AS_MESSAGE_FD>&1
594d656433aSmrgexec AS_MESSAGE_LOG_FD>>config.log
595d656433aSmrg{
596d656433aSmrg  echo
597d656433aSmrg  AS_BOX([Running $as_me.])
598d656433aSmrg} >&AS_MESSAGE_LOG_FD
599126a8a12Smrg
600d656433aSmrglt_cl_help="\
601d656433aSmrg\`$as_me' creates a local libtool stub from the current configuration,
602d656433aSmrgfor use in further configure time tests before the real libtool is
603d656433aSmrggenerated.
604126a8a12Smrg
605d656433aSmrgUsage: $[0] [[OPTIONS]]
606126a8a12Smrg
607d656433aSmrg  -h, --help      print this help, then exit
608d656433aSmrg  -V, --version   print version number, then exit
609d656433aSmrg  -q, --quiet     do not print progress messages
610d656433aSmrg  -d, --debug     don't remove temporary files
611126a8a12Smrg
612d656433aSmrgReport bugs to <bug-libtool@gnu.org>."
613126a8a12Smrg
614d656433aSmrglt_cl_version="\
615d656433aSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616d656433aSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617d656433aSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618126a8a12Smrg
619d656433aSmrgCopyright (C) 2008 Free Software Foundation, Inc.
620d656433aSmrgThis config.lt script is free software; the Free Software Foundation
621d656433aSmrggives unlimited permision to copy, distribute and modify it."
622126a8a12Smrg
623d656433aSmrgwhile test $[#] != 0
624d656433aSmrgdo
625d656433aSmrg  case $[1] in
626d656433aSmrg    --version | --v* | -V )
627d656433aSmrg      echo "$lt_cl_version"; exit 0 ;;
628d656433aSmrg    --help | --h* | -h )
629d656433aSmrg      echo "$lt_cl_help"; exit 0 ;;
630d656433aSmrg    --debug | --d* | -d )
631d656433aSmrg      debug=: ;;
632d656433aSmrg    --quiet | --q* | --silent | --s* | -q )
633d656433aSmrg      lt_cl_silent=: ;;
634d656433aSmrg
635d656433aSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636d656433aSmrgTry \`$[0] --help' for more information.]) ;;
637d656433aSmrg
638d656433aSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639d656433aSmrgTry \`$[0] --help' for more information.]) ;;
640d656433aSmrg  esac
641d656433aSmrg  shift
642d656433aSmrgdone
643126a8a12Smrg
644d656433aSmrgif $lt_cl_silent; then
645d656433aSmrg  exec AS_MESSAGE_FD>/dev/null
646d656433aSmrgfi
647d656433aSmrg_LTEOF
648d656433aSmrg
649d656433aSmrgcat >>"$CONFIG_LT" <<_LTEOF
650d656433aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651d656433aSmrg_LTEOF
652d656433aSmrg
653d656433aSmrgcat >>"$CONFIG_LT" <<\_LTEOF
654d656433aSmrgAC_MSG_NOTICE([creating $ofile])
655d656433aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
656d656433aSmrgAS_EXIT(0)
657d656433aSmrg_LTEOF
658d656433aSmrgchmod +x "$CONFIG_LT"
659d656433aSmrg
660d656433aSmrg# configure is writing to config.log, but config.lt does its own redirection,
661d656433aSmrg# appending to config.log, which fails on DOS, as config.log is still kept
662d656433aSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663d656433aSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664d656433aSmrgif test "$no_create" != yes; then
665d656433aSmrg  lt_cl_success=:
666d656433aSmrg  test "$silent" = yes &&
667d656433aSmrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668d656433aSmrg  exec AS_MESSAGE_LOG_FD>/dev/null
669d656433aSmrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670d656433aSmrg  exec AS_MESSAGE_LOG_FD>>config.log
671d656433aSmrg  $lt_cl_success || AS_EXIT(1)
672d656433aSmrgfi
673d656433aSmrg])# LT_OUTPUT
674126a8a12Smrg
675126a8a12Smrg
676d656433aSmrg# _LT_CONFIG(TAG)
677d656433aSmrg# ---------------
678d656433aSmrg# If TAG is the built-in tag, create an initial libtool script with a
679d656433aSmrg# default configuration from the untagged config vars.  Otherwise add code
680d656433aSmrg# to config.status for appending the configuration named by TAG from the
681d656433aSmrg# matching tagged config vars.
682d656433aSmrgm4_defun([_LT_CONFIG],
683d656433aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684d656433aSmrg_LT_CONFIG_SAVE_COMMANDS([
685d656433aSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686d656433aSmrg  m4_if(_LT_TAG, [C], [
687d656433aSmrg    # See if we are running on zsh, and set the options which allow our
688d656433aSmrg    # commands through without removal of \ escapes.
689d656433aSmrg    if test -n "${ZSH_VERSION+set}" ; then
690d656433aSmrg      setopt NO_GLOB_SUBST
691d656433aSmrg    fi
692126a8a12Smrg
693d656433aSmrg    cfgfile="${ofile}T"
694d656433aSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695d656433aSmrg    $RM "$cfgfile"
696126a8a12Smrg
697d656433aSmrg    cat <<_LT_EOF >> "$cfgfile"
698d656433aSmrg#! $SHELL
699126a8a12Smrg
700d656433aSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701d656433aSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702d656433aSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703d656433aSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704d656433aSmrg#
705d656433aSmrg_LT_COPYING
706d656433aSmrg_LT_LIBTOOL_TAGS
707126a8a12Smrg
708d656433aSmrg# ### BEGIN LIBTOOL CONFIG
709d656433aSmrg_LT_LIBTOOL_CONFIG_VARS
710d656433aSmrg_LT_LIBTOOL_TAG_VARS
711d656433aSmrg# ### END LIBTOOL CONFIG
712126a8a12Smrg
713d656433aSmrg_LT_EOF
714126a8a12Smrg
715d656433aSmrg  case $host_os in
716d656433aSmrg  aix3*)
717d656433aSmrg    cat <<\_LT_EOF >> "$cfgfile"
718d656433aSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
719d656433aSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720d656433aSmrg# vanish in a puff of smoke.
721d656433aSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
722d656433aSmrg  COLLECT_NAMES=
723d656433aSmrg  export COLLECT_NAMES
724d656433aSmrgfi
725d656433aSmrg_LT_EOF
726126a8a12Smrg    ;;
727126a8a12Smrg  esac
728126a8a12Smrg
729d656433aSmrg  _LT_PROG_LTMAIN
730126a8a12Smrg
731d656433aSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
732d656433aSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733d656433aSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734d656433aSmrg  # is reportedly fixed, but why not run on old versions too?
735d656433aSmrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736d656433aSmrg    || (rm -f "$cfgfile"; exit 1)
737126a8a12Smrg
738d656433aSmrg  _LT_PROG_XSI_SHELLFNS
739126a8a12Smrg
740d656433aSmrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741d656433aSmrg    || (rm -f "$cfgfile"; exit 1)
742126a8a12Smrg
743d656433aSmrg  mv -f "$cfgfile" "$ofile" ||
744d656433aSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745d656433aSmrg  chmod +x "$ofile"
746d656433aSmrg],
747d656433aSmrg[cat <<_LT_EOF >> "$ofile"
748126a8a12Smrg
749d656433aSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750d656433aSmrgdnl in a comment (ie after a #).
751d656433aSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752d656433aSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753d656433aSmrg# ### END LIBTOOL TAG CONFIG: $1
754d656433aSmrg_LT_EOF
755d656433aSmrg])dnl /m4_if
756d656433aSmrg],
757d656433aSmrg[m4_if([$1], [], [
758d656433aSmrg    PACKAGE='$PACKAGE'
759d656433aSmrg    VERSION='$VERSION'
760d656433aSmrg    TIMESTAMP='$TIMESTAMP'
761d656433aSmrg    RM='$RM'
762d656433aSmrg    ofile='$ofile'], [])
763d656433aSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764d656433aSmrg])# _LT_CONFIG
765126a8a12Smrg
766126a8a12Smrg
767d656433aSmrg# LT_SUPPORTED_TAG(TAG)
768d656433aSmrg# ---------------------
769d656433aSmrg# Trace this macro to discover what tags are supported by the libtool
770d656433aSmrg# --tag option, using:
771d656433aSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772d656433aSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773126a8a12Smrg
774126a8a12Smrg
775d656433aSmrg# C support is built-in for now
776d656433aSmrgm4_define([_LT_LANG_C_enabled], [])
777d656433aSmrgm4_define([_LT_TAGS], [])
778126a8a12Smrg
779126a8a12Smrg
780d656433aSmrg# LT_LANG(LANG)
781d656433aSmrg# -------------
782d656433aSmrg# Enable libtool support for the given language if not already enabled.
783d656433aSmrgAC_DEFUN([LT_LANG],
784d656433aSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785d656433aSmrgm4_case([$1],
786d656433aSmrg  [C],			[_LT_LANG(C)],
787d656433aSmrg  [C++],		[_LT_LANG(CXX)],
788d656433aSmrg  [Java],		[_LT_LANG(GCJ)],
789d656433aSmrg  [Fortran 77],		[_LT_LANG(F77)],
790d656433aSmrg  [Fortran],		[_LT_LANG(FC)],
791d656433aSmrg  [Windows Resource],	[_LT_LANG(RC)],
792d656433aSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793d656433aSmrg    [_LT_LANG($1)],
794d656433aSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795d656433aSmrg])# LT_LANG
796d656433aSmrg
797d656433aSmrg
798d656433aSmrg# _LT_LANG(LANGNAME)
799d656433aSmrg# ------------------
800d656433aSmrgm4_defun([_LT_LANG],
801d656433aSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802d656433aSmrg  [LT_SUPPORTED_TAG([$1])dnl
803d656433aSmrg  m4_append([_LT_TAGS], [$1 ])dnl
804d656433aSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805d656433aSmrg  _LT_LANG_$1_CONFIG($1)])dnl
806d656433aSmrg])# _LT_LANG
807126a8a12Smrg
808126a8a12Smrg
809d656433aSmrg# _LT_LANG_DEFAULT_CONFIG
810d656433aSmrg# -----------------------
811d656433aSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812d656433aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813d656433aSmrg  [LT_LANG(CXX)],
814d656433aSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815d656433aSmrg
816d656433aSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817d656433aSmrg  [LT_LANG(F77)],
818d656433aSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819d656433aSmrg
820d656433aSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821d656433aSmrg  [LT_LANG(FC)],
822d656433aSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823d656433aSmrg
824d656433aSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825d656433aSmrgdnl pulling things in needlessly.
826d656433aSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827d656433aSmrg  [LT_LANG(GCJ)],
828d656433aSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829d656433aSmrg    [LT_LANG(GCJ)],
830d656433aSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831d656433aSmrg      [LT_LANG(GCJ)],
832d656433aSmrg      [m4_ifdef([AC_PROG_GCJ],
833d656433aSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834d656433aSmrg       m4_ifdef([A][M_PROG_GCJ],
835d656433aSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836d656433aSmrg       m4_ifdef([LT_PROG_GCJ],
837d656433aSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838d656433aSmrg
839d656433aSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840d656433aSmrg  [LT_LANG(RC)],
841d656433aSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842d656433aSmrg])# _LT_LANG_DEFAULT_CONFIG
843d656433aSmrg
844d656433aSmrg# Obsolete macros:
845d656433aSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846d656433aSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847d656433aSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848d656433aSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849d656433aSmrgdnl aclocal-1.4 backwards compatibility:
850d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854d656433aSmrg
855d656433aSmrg
856d656433aSmrg# _LT_TAG_COMPILER
857d656433aSmrg# ----------------
858d656433aSmrgm4_defun([_LT_TAG_COMPILER],
859d656433aSmrg[AC_REQUIRE([AC_PROG_CC])dnl
860126a8a12Smrg
861d656433aSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862d656433aSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863d656433aSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864d656433aSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865126a8a12Smrg
866d656433aSmrg# If no C compiler was specified, use CC.
867d656433aSmrgLTCC=${LTCC-"$CC"}
868126a8a12Smrg
869d656433aSmrg# If no C compiler flags were specified, use CFLAGS.
870d656433aSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871126a8a12Smrg
872d656433aSmrg# Allow CC to be a program name with arguments.
873d656433aSmrgcompiler=$CC
874d656433aSmrg])# _LT_TAG_COMPILER
875126a8a12Smrg
876126a8a12Smrg
877d656433aSmrg# _LT_COMPILER_BOILERPLATE
878d656433aSmrg# ------------------------
879d656433aSmrg# Check for compiler boilerplate output or warnings with
880d656433aSmrg# the simple compiler test code.
881d656433aSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
882d656433aSmrg[m4_require([_LT_DECL_SED])dnl
883d656433aSmrgac_outfile=conftest.$ac_objext
884d656433aSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
885d656433aSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886d656433aSmrg_lt_compiler_boilerplate=`cat conftest.err`
887d656433aSmrg$RM conftest*
888d656433aSmrg])# _LT_COMPILER_BOILERPLATE
889126a8a12Smrg
890126a8a12Smrg
891d656433aSmrg# _LT_LINKER_BOILERPLATE
892d656433aSmrg# ----------------------
893d656433aSmrg# Check for linker boilerplate output or warnings with
894d656433aSmrg# the simple link test code.
895d656433aSmrgm4_defun([_LT_LINKER_BOILERPLATE],
896d656433aSmrg[m4_require([_LT_DECL_SED])dnl
897d656433aSmrgac_outfile=conftest.$ac_objext
898d656433aSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
899d656433aSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900d656433aSmrg_lt_linker_boilerplate=`cat conftest.err`
901d656433aSmrg$RM -r conftest*
902d656433aSmrg])# _LT_LINKER_BOILERPLATE
903126a8a12Smrg
904d656433aSmrg# _LT_REQUIRED_DARWIN_CHECKS
905d656433aSmrg# -------------------------
906d656433aSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907d656433aSmrg  case $host_os in
908d656433aSmrg    rhapsody* | darwin*)
909d656433aSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910d656433aSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911d656433aSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912d656433aSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913d656433aSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914d656433aSmrg    _LT_DECL([], [DSYMUTIL], [1],
915d656433aSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916d656433aSmrg    _LT_DECL([], [NMEDIT], [1],
917d656433aSmrg      [Tool to change global to local symbols on Mac OS X])
918d656433aSmrg    _LT_DECL([], [LIPO], [1],
919d656433aSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
920d656433aSmrg    _LT_DECL([], [OTOOL], [1],
921d656433aSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922d656433aSmrg    _LT_DECL([], [OTOOL64], [1],
923d656433aSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924d656433aSmrg
925d656433aSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926d656433aSmrg      [lt_cv_apple_cc_single_mod=no
927d656433aSmrg      if test -z "${LT_MULTI_MODULE}"; then
928d656433aSmrg	# By default we will add the -single_module flag. You can override
929d656433aSmrg	# by either setting the environment variable LT_MULTI_MODULE
930d656433aSmrg	# non-empty at configure time, or by adding -multi_module to the
931d656433aSmrg	# link flags.
932d656433aSmrg	rm -rf libconftest.dylib*
933d656433aSmrg	echo "int foo(void){return 1;}" > conftest.c
934d656433aSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935d656433aSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936d656433aSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937d656433aSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938d656433aSmrg        _lt_result=$?
939d656433aSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940d656433aSmrg	  lt_cv_apple_cc_single_mod=yes
941d656433aSmrg	else
942d656433aSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943d656433aSmrg	fi
944d656433aSmrg	rm -rf libconftest.dylib*
945d656433aSmrg	rm -f conftest.*
946d656433aSmrg      fi])
947d656433aSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948d656433aSmrg      [lt_cv_ld_exported_symbols_list],
949d656433aSmrg      [lt_cv_ld_exported_symbols_list=no
950d656433aSmrg      save_LDFLAGS=$LDFLAGS
951d656433aSmrg      echo "_main" > conftest.sym
952d656433aSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953d656433aSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954d656433aSmrg	[lt_cv_ld_exported_symbols_list=yes],
955d656433aSmrg	[lt_cv_ld_exported_symbols_list=no])
956d656433aSmrg	LDFLAGS="$save_LDFLAGS"
957126a8a12Smrg    ])
958d656433aSmrg    case $host_os in
959d656433aSmrg    rhapsody* | darwin1.[[012]])
960d656433aSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961d656433aSmrg    darwin1.*)
962d656433aSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963d656433aSmrg    darwin*) # darwin 5.x on
964d656433aSmrg      # if running on 10.5 or later, the deployment target defaults
965d656433aSmrg      # to the OS version, if on x86, and 10.4, the deployment
966d656433aSmrg      # target defaults to 10.4. Don't you love it?
967d656433aSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968d656433aSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969d656433aSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970d656433aSmrg	10.[[012]]*)
971d656433aSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972d656433aSmrg	10.*)
973d656433aSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974d656433aSmrg      esac
975d656433aSmrg    ;;
976d656433aSmrg  esac
977d656433aSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978d656433aSmrg      _lt_dar_single_mod='$single_module'
979d656433aSmrg    fi
980d656433aSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981d656433aSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982d656433aSmrg    else
983d656433aSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984d656433aSmrg    fi
985d656433aSmrg    if test "$DSYMUTIL" != ":"; then
986d656433aSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987d656433aSmrg    else
988d656433aSmrg      _lt_dsymutil=
989126a8a12Smrg    fi
990126a8a12Smrg    ;;
991126a8a12Smrg  esac
992d656433aSmrg])
993126a8a12Smrg
994126a8a12Smrg
995d656433aSmrg# _LT_DARWIN_LINKER_FEATURES
996d656433aSmrg# --------------------------
997d656433aSmrg# Checks for linker and compiler features on darwin
998d656433aSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999d656433aSmrg[
1000d656433aSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001d656433aSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002d656433aSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003d656433aSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004d656433aSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005d656433aSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006d656433aSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007d656433aSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008d656433aSmrg  case $cc_basename in
1009d656433aSmrg     ifort*) _lt_dar_can_shared=yes ;;
1010d656433aSmrg     *) _lt_dar_can_shared=$GCC ;;
1011126a8a12Smrg  esac
1012d656433aSmrg  if test "$_lt_dar_can_shared" = "yes"; then
1013d656433aSmrg    output_verbose_link_cmd=echo
1014d656433aSmrg    _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}"
1015d656433aSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016d656433aSmrg    _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}"
1017d656433aSmrg    _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}"
1018d656433aSmrg    m4_if([$1], [CXX],
1019d656433aSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020d656433aSmrg      _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}"
1021d656433aSmrg      _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}"
1022d656433aSmrg    fi
1023d656433aSmrg],[])
1024d656433aSmrg  else
1025d656433aSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026d656433aSmrg  fi
1027d656433aSmrg])
1028126a8a12Smrg
1029d656433aSmrg# _LT_SYS_MODULE_PATH_AIX
1030d656433aSmrg# -----------------------
1031d656433aSmrg# Links a minimal program and checks the executable
1032d656433aSmrg# for the system default hardcoded library path. In most cases,
1033d656433aSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1034d656433aSmrg# the location of the communication and MPI libs are included too.
1035d656433aSmrg# If we don't find anything, use the default library path according
1036d656433aSmrg# to the aix ld manual.
1037d656433aSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038d656433aSmrg[m4_require([_LT_DECL_SED])dnl
1039d656433aSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040d656433aSmrglt_aix_libpath_sed='
1041d656433aSmrg    /Import File Strings/,/^$/ {
1042d656433aSmrg	/^0/ {
1043d656433aSmrg	    s/^0  *\(.*\)$/\1/
1044d656433aSmrg	    p
1045d656433aSmrg	}
1046d656433aSmrg    }'
1047d656433aSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048d656433aSmrg# Check for a 64-bit object if we didn't find anything.
1049d656433aSmrgif test -z "$aix_libpath"; then
1050d656433aSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051d656433aSmrgfi],[])
1052d656433aSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053d656433aSmrg])# _LT_SYS_MODULE_PATH_AIX
1054126a8a12Smrg
1055126a8a12Smrg
1056d656433aSmrg# _LT_SHELL_INIT(ARG)
1057d656433aSmrg# -------------------
1058d656433aSmrgm4_define([_LT_SHELL_INIT],
1059d656433aSmrg[ifdef([AC_DIVERSION_NOTICE],
1060d656433aSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061d656433aSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1062d656433aSmrg$1
1063d656433aSmrgAC_DIVERT_POP
1064d656433aSmrg])# _LT_SHELL_INIT
1065126a8a12Smrg
1066126a8a12Smrg
1067d656433aSmrg# _LT_PROG_ECHO_BACKSLASH
1068d656433aSmrg# -----------------------
1069d656433aSmrg# Add some code to the start of the generated configure script which
1070d656433aSmrg# will find an echo command which doesn't interpret backslashes.
1071d656433aSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072d656433aSmrg[_LT_SHELL_INIT([
1073d656433aSmrg# Check that we are running under the correct shell.
1074d656433aSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1075126a8a12Smrg
1076d656433aSmrgcase X$lt_ECHO in
1077d656433aSmrgX*--fallback-echo)
1078d656433aSmrg  # Remove one level of quotation (which was required for Make).
1079d656433aSmrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080d656433aSmrg  ;;
1081d656433aSmrgesac
1082d656433aSmrg
1083d656433aSmrgECHO=${lt_ECHO-echo}
1084d656433aSmrgif test "X[$]1" = X--no-reexec; then
1085d656433aSmrg  # Discard the --no-reexec flag, and continue.
1086d656433aSmrg  shift
1087d656433aSmrgelif test "X[$]1" = X--fallback-echo; then
1088d656433aSmrg  # Avoid inline document here, it may be left over
1089d656433aSmrg  :
1090d656433aSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091d656433aSmrg  # Yippee, $ECHO works!
1092d656433aSmrg  :
1093126a8a12Smrgelse
1094d656433aSmrg  # Restart under the correct shell.
1095d656433aSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096126a8a12Smrgfi
1097126a8a12Smrg
1098d656433aSmrgif test "X[$]1" = X--fallback-echo; then
1099d656433aSmrg  # used as fallback echo
1100d656433aSmrg  shift
1101d656433aSmrg  cat <<_LT_EOF
1102d656433aSmrg[$]*
1103d656433aSmrg_LT_EOF
1104d656433aSmrg  exit 0
1105126a8a12Smrgfi
1106126a8a12Smrg
1107d656433aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1108d656433aSmrg# if CDPATH is set.
1109d656433aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110126a8a12Smrg
1111d656433aSmrgif test -z "$lt_ECHO"; then
1112d656433aSmrg  if test "X${echo_test_string+set}" != Xset; then
1113d656433aSmrg    # find a string as large as possible, as long as the shell can cope with it
1114d656433aSmrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115d656433aSmrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116d656433aSmrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117d656433aSmrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118d656433aSmrg      then
1119d656433aSmrg        break
1120d656433aSmrg      fi
1121d656433aSmrg    done
1122126a8a12Smrg  fi
1123126a8a12Smrg
1124d656433aSmrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125d656433aSmrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126d656433aSmrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127d656433aSmrg    :
1128d656433aSmrg  else
1129d656433aSmrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130d656433aSmrg    # backslashes.  This makes it impossible to quote backslashes using
1131d656433aSmrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132d656433aSmrg    #
1133d656433aSmrg    # So, first we look for a working echo in the user's PATH.
1134126a8a12Smrg
1135d656433aSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136d656433aSmrg    for dir in $PATH /usr/ucb; do
1137d656433aSmrg      IFS="$lt_save_ifs"
1138d656433aSmrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139d656433aSmrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140d656433aSmrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141d656433aSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142d656433aSmrg        ECHO="$dir/echo"
1143d656433aSmrg        break
1144d656433aSmrg      fi
1145d656433aSmrg    done
1146d656433aSmrg    IFS="$lt_save_ifs"
1147126a8a12Smrg
1148d656433aSmrg    if test "X$ECHO" = Xecho; then
1149d656433aSmrg      # We didn't find a better echo, so look for alternatives.
1150d656433aSmrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151d656433aSmrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152d656433aSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153d656433aSmrg        # This shell has a builtin print -r that does the trick.
1154d656433aSmrg        ECHO='print -r'
1155d656433aSmrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156d656433aSmrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157d656433aSmrg        # If we have ksh, try running configure again with it.
1158d656433aSmrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159d656433aSmrg        export ORIGINAL_CONFIG_SHELL
1160d656433aSmrg        CONFIG_SHELL=/bin/ksh
1161d656433aSmrg        export CONFIG_SHELL
1162d656433aSmrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163d656433aSmrg      else
1164d656433aSmrg        # Try using printf.
1165d656433aSmrg        ECHO='printf %s\n'
1166d656433aSmrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167d656433aSmrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168d656433aSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169d656433aSmrg	  # Cool, printf works
1170d656433aSmrg	  :
1171d656433aSmrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172d656433aSmrg	     test "X$echo_testing_string" = 'X\t' &&
1173d656433aSmrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174d656433aSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175d656433aSmrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176d656433aSmrg	  export CONFIG_SHELL
1177d656433aSmrg	  SHELL="$CONFIG_SHELL"
1178d656433aSmrg	  export SHELL
1179d656433aSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180d656433aSmrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181d656433aSmrg	     test "X$echo_testing_string" = 'X\t' &&
1182d656433aSmrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183d656433aSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184d656433aSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185d656433aSmrg        else
1186d656433aSmrg	  # maybe with a smaller string...
1187d656433aSmrg	  prev=:
1188126a8a12Smrg
1189d656433aSmrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190d656433aSmrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191d656433aSmrg	    then
1192d656433aSmrg	      break
1193d656433aSmrg	    fi
1194d656433aSmrg	    prev="$cmd"
1195d656433aSmrg	  done
1196126a8a12Smrg
1197d656433aSmrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198d656433aSmrg	    echo_test_string=`eval $prev`
1199d656433aSmrg	    export echo_test_string
1200d656433aSmrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201d656433aSmrg	  else
1202d656433aSmrg	    # Oops.  We lost completely, so just stick with echo.
1203d656433aSmrg	    ECHO=echo
1204d656433aSmrg	  fi
1205d656433aSmrg        fi
1206d656433aSmrg      fi
1207d656433aSmrg    fi
1208126a8a12Smrg  fi
1209126a8a12Smrgfi
1210126a8a12Smrg
1211d656433aSmrg# Copy echo and quote the copy suitably for passing to libtool from
1212d656433aSmrg# the Makefile, instead of quoting the original, which is used later.
1213d656433aSmrglt_ECHO=$ECHO
1214d656433aSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215d656433aSmrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216d656433aSmrgfi
1217126a8a12Smrg
1218d656433aSmrgAC_SUBST(lt_ECHO)
1219d656433aSmrg])
1220d656433aSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221d656433aSmrg_LT_DECL([], [ECHO], [1],
1222d656433aSmrg    [An echo program that does not interpret backslashes])
1223d656433aSmrg])# _LT_PROG_ECHO_BACKSLASH
1224126a8a12Smrg
1225126a8a12Smrg
1226d656433aSmrg# _LT_ENABLE_LOCK
1227d656433aSmrg# ---------------
1228d656433aSmrgm4_defun([_LT_ENABLE_LOCK],
1229d656433aSmrg[AC_ARG_ENABLE([libtool-lock],
1230d656433aSmrg  [AS_HELP_STRING([--disable-libtool-lock],
1231d656433aSmrg    [avoid locking (might break parallel builds)])])
1232d656433aSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233d656433aSmrg
1234d656433aSmrg# Some flags need to be propagated to the compiler or linker for good
1235d656433aSmrg# libtool support.
1236d656433aSmrgcase $host in
1237d656433aSmrgia64-*-hpux*)
1238d656433aSmrg  # Find out which ABI we are using.
1239d656433aSmrg  echo 'int i;' > conftest.$ac_ext
1240d656433aSmrg  if AC_TRY_EVAL(ac_compile); then
1241d656433aSmrg    case `/usr/bin/file conftest.$ac_objext` in
1242d656433aSmrg      *ELF-32*)
1243d656433aSmrg	HPUX_IA64_MODE="32"
1244d656433aSmrg	;;
1245d656433aSmrg      *ELF-64*)
1246d656433aSmrg	HPUX_IA64_MODE="64"
1247d656433aSmrg	;;
1248126a8a12Smrg    esac
1249d656433aSmrg  fi
1250d656433aSmrg  rm -rf conftest*
1251d656433aSmrg  ;;
1252d656433aSmrg*-*-irix6*)
1253d656433aSmrg  # Find out which ABI we are using.
1254d656433aSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255d656433aSmrg  if AC_TRY_EVAL(ac_compile); then
1256d656433aSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257d656433aSmrg      case `/usr/bin/file conftest.$ac_objext` in
1258d656433aSmrg	*32-bit*)
1259d656433aSmrg	  LD="${LD-ld} -melf32bsmip"
1260d656433aSmrg	  ;;
1261d656433aSmrg	*N32*)
1262d656433aSmrg	  LD="${LD-ld} -melf32bmipn32"
1263d656433aSmrg	  ;;
1264d656433aSmrg	*64-bit*)
1265d656433aSmrg	  LD="${LD-ld} -melf64bmip"
1266d656433aSmrg	;;
1267d656433aSmrg      esac
1268126a8a12Smrg    else
1269d656433aSmrg      case `/usr/bin/file conftest.$ac_objext` in
1270d656433aSmrg	*32-bit*)
1271d656433aSmrg	  LD="${LD-ld} -32"
1272d656433aSmrg	  ;;
1273d656433aSmrg	*N32*)
1274d656433aSmrg	  LD="${LD-ld} -n32"
1275d656433aSmrg	  ;;
1276d656433aSmrg	*64-bit*)
1277d656433aSmrg	  LD="${LD-ld} -64"
1278d656433aSmrg	  ;;
1279d656433aSmrg      esac
1280126a8a12Smrg    fi
1281126a8a12Smrg  fi
1282d656433aSmrg  rm -rf conftest*
1283126a8a12Smrg  ;;
1284126a8a12Smrg
1285d656433aSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286d656433aSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287d656433aSmrg  # Find out which ABI we are using.
1288d656433aSmrg  echo 'int i;' > conftest.$ac_ext
1289d656433aSmrg  if AC_TRY_EVAL(ac_compile); then
1290d656433aSmrg    case `/usr/bin/file conftest.o` in
1291d656433aSmrg      *32-bit*)
1292d656433aSmrg	case $host in
1293d656433aSmrg	  x86_64-*kfreebsd*-gnu)
1294d656433aSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295d656433aSmrg	    ;;
1296d656433aSmrg	  x86_64-*linux*)
1297d656433aSmrg	    LD="${LD-ld} -m elf_i386"
1298d656433aSmrg	    ;;
1299d656433aSmrg	  ppc64-*linux*|powerpc64-*linux*)
1300d656433aSmrg	    LD="${LD-ld} -m elf32ppclinux"
1301d656433aSmrg	    ;;
1302d656433aSmrg	  s390x-*linux*)
1303d656433aSmrg	    LD="${LD-ld} -m elf_s390"
1304d656433aSmrg	    ;;
1305d656433aSmrg	  sparc64-*linux*)
1306d656433aSmrg	    LD="${LD-ld} -m elf32_sparc"
1307d656433aSmrg	    ;;
1308d656433aSmrg	esac
1309d656433aSmrg	;;
1310d656433aSmrg      *64-bit*)
1311d656433aSmrg	case $host in
1312d656433aSmrg	  x86_64-*kfreebsd*-gnu)
1313d656433aSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314d656433aSmrg	    ;;
1315d656433aSmrg	  x86_64-*linux*)
1316d656433aSmrg	    LD="${LD-ld} -m elf_x86_64"
1317d656433aSmrg	    ;;
1318d656433aSmrg	  ppc*-*linux*|powerpc*-*linux*)
1319d656433aSmrg	    LD="${LD-ld} -m elf64ppc"
1320d656433aSmrg	    ;;
1321d656433aSmrg	  s390*-*linux*|s390*-*tpf*)
1322d656433aSmrg	    LD="${LD-ld} -m elf64_s390"
1323d656433aSmrg	    ;;
1324d656433aSmrg	  sparc*-*linux*)
1325d656433aSmrg	    LD="${LD-ld} -m elf64_sparc"
1326d656433aSmrg	    ;;
1327d656433aSmrg	esac
1328d656433aSmrg	;;
1329d656433aSmrg    esac
1330d656433aSmrg  fi
1331d656433aSmrg  rm -rf conftest*
1332126a8a12Smrg  ;;
1333126a8a12Smrg
1334d656433aSmrg*-*-sco3.2v5*)
1335d656433aSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336d656433aSmrg  SAVE_CFLAGS="$CFLAGS"
1337d656433aSmrg  CFLAGS="$CFLAGS -belf"
1338d656433aSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339d656433aSmrg    [AC_LANG_PUSH(C)
1340d656433aSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341d656433aSmrg     AC_LANG_POP])
1342d656433aSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343d656433aSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344d656433aSmrg    CFLAGS="$SAVE_CFLAGS"
1345d656433aSmrg  fi
1346126a8a12Smrg  ;;
1347d656433aSmrgsparc*-*solaris*)
1348d656433aSmrg  # Find out which ABI we are using.
1349d656433aSmrg  echo 'int i;' > conftest.$ac_ext
1350d656433aSmrg  if AC_TRY_EVAL(ac_compile); then
1351d656433aSmrg    case `/usr/bin/file conftest.o` in
1352d656433aSmrg    *64-bit*)
1353d656433aSmrg      case $lt_cv_prog_gnu_ld in
1354d656433aSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355d656433aSmrg      *)
1356d656433aSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357d656433aSmrg	  LD="${LD-ld} -64"
1358d656433aSmrg	fi
1359d656433aSmrg	;;
1360d656433aSmrg      esac
1361d656433aSmrg      ;;
1362d656433aSmrg    esac
1363d656433aSmrg  fi
1364d656433aSmrg  rm -rf conftest*
1365126a8a12Smrg  ;;
1366d656433aSmrgesac
1367126a8a12Smrg
1368d656433aSmrgneed_locks="$enable_libtool_lock"
1369d656433aSmrg])# _LT_ENABLE_LOCK
1370126a8a12Smrg
1371126a8a12Smrg
1372d656433aSmrg# _LT_CMD_OLD_ARCHIVE
1373d656433aSmrg# -------------------
1374d656433aSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375d656433aSmrg[AC_CHECK_TOOL(AR, ar, false)
1376d656433aSmrgtest -z "$AR" && AR=ar
1377d656433aSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378d656433aSmrg_LT_DECL([], [AR], [1], [The archiver])
1379d656433aSmrg_LT_DECL([], [AR_FLAGS], [1])
1380126a8a12Smrg
1381d656433aSmrgAC_CHECK_TOOL(STRIP, strip, :)
1382d656433aSmrgtest -z "$STRIP" && STRIP=:
1383d656433aSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384d656433aSmrg
1385d656433aSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386d656433aSmrgtest -z "$RANLIB" && RANLIB=:
1387d656433aSmrg_LT_DECL([], [RANLIB], [1],
1388d656433aSmrg    [Commands used to install an old-style archive])
1389d656433aSmrg
1390d656433aSmrg# Determine commands to create old-style static archives.
1391d656433aSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392d656433aSmrgold_postinstall_cmds='chmod 644 $oldlib'
1393d656433aSmrgold_postuninstall_cmds=
1394d656433aSmrg
1395d656433aSmrgif test -n "$RANLIB"; then
1396d656433aSmrg  case $host_os in
1397d656433aSmrg  openbsd*)
1398d656433aSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399d656433aSmrg    ;;
1400126a8a12Smrg  *)
1401d656433aSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402126a8a12Smrg    ;;
1403126a8a12Smrg  esac
1404d656433aSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405d656433aSmrgfi
1406d656433aSmrg_LT_DECL([], [old_postinstall_cmds], [2])
1407d656433aSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408d656433aSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409d656433aSmrg    [Commands used to build an old-style archive])
1410d656433aSmrg])# _LT_CMD_OLD_ARCHIVE
1411126a8a12Smrg
1412126a8a12Smrg
1413d656433aSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1414d656433aSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1415d656433aSmrg# ----------------------------------------------------------------
1416d656433aSmrg# Check whether the given compiler option works
1417d656433aSmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418d656433aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419d656433aSmrgm4_require([_LT_DECL_SED])dnl
1420d656433aSmrgAC_CACHE_CHECK([$1], [$2],
1421d656433aSmrg  [$2=no
1422d656433aSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423d656433aSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1424d656433aSmrg   lt_compiler_flag="$3"
1425d656433aSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1426d656433aSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1427d656433aSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1428d656433aSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1429d656433aSmrg   # The option is referenced via a variable to avoid confusing sed.
1430d656433aSmrg   lt_compile=`echo "$ac_compile" | $SED \
1431d656433aSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432d656433aSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433d656433aSmrg   -e 's:$: $lt_compiler_flag:'`
1434d656433aSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435d656433aSmrg   (eval "$lt_compile" 2>conftest.err)
1436d656433aSmrg   ac_status=$?
1437d656433aSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1438d656433aSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439d656433aSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1440d656433aSmrg     # The compiler can only warn and ignore the option if not recognized
1441d656433aSmrg     # So say no if there are warnings other than the usual output.
1442d656433aSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1443d656433aSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444d656433aSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445d656433aSmrg       $2=yes
1446d656433aSmrg     fi
1447d656433aSmrg   fi
1448d656433aSmrg   $RM conftest*
1449d656433aSmrg])
1450126a8a12Smrg
1451d656433aSmrgif test x"[$]$2" = xyes; then
1452d656433aSmrg    m4_if([$5], , :, [$5])
1453d656433aSmrgelse
1454d656433aSmrg    m4_if([$6], , :, [$6])
1455d656433aSmrgfi
1456d656433aSmrg])# _LT_COMPILER_OPTION
1457126a8a12Smrg
1458d656433aSmrg# Old name:
1459d656433aSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460d656433aSmrgdnl aclocal-1.4 backwards compatibility:
1461d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1462126a8a12Smrg
1463d656433aSmrg
1464d656433aSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465d656433aSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466d656433aSmrg# ----------------------------------------------------
1467d656433aSmrg# Check whether the given linker option works
1468d656433aSmrgAC_DEFUN([_LT_LINKER_OPTION],
1469d656433aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470d656433aSmrgm4_require([_LT_DECL_SED])dnl
1471d656433aSmrgAC_CACHE_CHECK([$1], [$2],
1472d656433aSmrg  [$2=no
1473d656433aSmrg   save_LDFLAGS="$LDFLAGS"
1474d656433aSmrg   LDFLAGS="$LDFLAGS $3"
1475d656433aSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1476d656433aSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1477d656433aSmrg     # The linker can only warn and ignore the option if not recognized
1478d656433aSmrg     # So say no if there are warnings
1479d656433aSmrg     if test -s conftest.err; then
1480d656433aSmrg       # Append any errors to the config.log.
1481d656433aSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482d656433aSmrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1483d656433aSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484d656433aSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1485d656433aSmrg         $2=yes
1486d656433aSmrg       fi
1487d656433aSmrg     else
1488d656433aSmrg       $2=yes
1489d656433aSmrg     fi
1490d656433aSmrg   fi
1491d656433aSmrg   $RM -r conftest*
1492d656433aSmrg   LDFLAGS="$save_LDFLAGS"
1493d656433aSmrg])
1494d656433aSmrg
1495d656433aSmrgif test x"[$]$2" = xyes; then
1496d656433aSmrg    m4_if([$4], , :, [$4])
1497d656433aSmrgelse
1498d656433aSmrg    m4_if([$5], , :, [$5])
1499d656433aSmrgfi
1500d656433aSmrg])# _LT_LINKER_OPTION
1501d656433aSmrg
1502d656433aSmrg# Old name:
1503d656433aSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504d656433aSmrgdnl aclocal-1.4 backwards compatibility:
1505d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1506d656433aSmrg
1507d656433aSmrg
1508d656433aSmrg# LT_CMD_MAX_LEN
1509d656433aSmrg#---------------
1510d656433aSmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511d656433aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512d656433aSmrg# find the maximum length of command line arguments
1513d656433aSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1514d656433aSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1515d656433aSmrg  i=0
1516d656433aSmrg  teststring="ABCD"
1517d656433aSmrg
1518d656433aSmrg  case $build_os in
1519d656433aSmrg  msdosdjgpp*)
1520d656433aSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1521d656433aSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1522d656433aSmrg    # during glob expansion).  Even if it were fixed, the result of this
1523d656433aSmrg    # check would be larger than it should be.
1524d656433aSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1525126a8a12Smrg    ;;
1526d656433aSmrg
1527d656433aSmrg  gnu*)
1528d656433aSmrg    # Under GNU Hurd, this test is not required because there is
1529d656433aSmrg    # no limit to the length of command line arguments.
1530d656433aSmrg    # Libtool will interpret -1 as no limit whatsoever
1531d656433aSmrg    lt_cv_sys_max_cmd_len=-1;
1532126a8a12Smrg    ;;
1533d656433aSmrg
1534d656433aSmrg  cygwin* | mingw* | cegcc*)
1535d656433aSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1536d656433aSmrg    # about 5 minutes as the teststring grows exponentially.
1537d656433aSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1538d656433aSmrg    # you end up with a "frozen" computer, even though with patience
1539d656433aSmrg    # the test eventually succeeds (with a max line length of 256k).
1540d656433aSmrg    # Instead, let's just punt: use the minimum linelength reported by
1541d656433aSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1542d656433aSmrg    lt_cv_sys_max_cmd_len=8192;
1543126a8a12Smrg    ;;
1544126a8a12Smrg
1545d656433aSmrg  amigaos*)
1546d656433aSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
1547d656433aSmrg    # So we just punt and use a minimum line length of 8192.
1548d656433aSmrg    lt_cv_sys_max_cmd_len=8192;
1549d656433aSmrg    ;;
1550126a8a12Smrg
1551d656433aSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1552d656433aSmrg    # This has been around since 386BSD, at least.  Likely further.
1553d656433aSmrg    if test -x /sbin/sysctl; then
1554d656433aSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1555d656433aSmrg    elif test -x /usr/sbin/sysctl; then
1556d656433aSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1557126a8a12Smrg    else
1558d656433aSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1559126a8a12Smrg    fi
1560d656433aSmrg    # And add a safety zone
1561d656433aSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1562d656433aSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1563126a8a12Smrg    ;;
1564126a8a12Smrg
1565d656433aSmrg  interix*)
1566d656433aSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1567d656433aSmrg    lt_cv_sys_max_cmd_len=196608
1568d656433aSmrg    ;;
1569126a8a12Smrg
1570d656433aSmrg  osf*)
1571d656433aSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1572d656433aSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1573d656433aSmrg    # nice to cause kernel panics so lets avoid the loop below.
1574d656433aSmrg    # First set a reasonable default.
1575d656433aSmrg    lt_cv_sys_max_cmd_len=16384
1576d656433aSmrg    #
1577d656433aSmrg    if test -x /sbin/sysconfig; then
1578d656433aSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1579d656433aSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1580d656433aSmrg      esac
1581d656433aSmrg    fi
1582d656433aSmrg    ;;
1583d656433aSmrg  sco3.2v5*)
1584d656433aSmrg    lt_cv_sys_max_cmd_len=102400
1585d656433aSmrg    ;;
1586d656433aSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
1587d656433aSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1588d656433aSmrg    if test -n "$kargmax"; then
1589d656433aSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1590d656433aSmrg    else
1591d656433aSmrg      lt_cv_sys_max_cmd_len=32768
1592d656433aSmrg    fi
1593126a8a12Smrg    ;;
1594126a8a12Smrg  *)
1595d656433aSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596d656433aSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597d656433aSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598d656433aSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599d656433aSmrg    else
1600d656433aSmrg      # Make teststring a little bigger before we do anything with it.
1601d656433aSmrg      # a 1K string should be a reasonable start.
1602d656433aSmrg      for i in 1 2 3 4 5 6 7 8 ; do
1603d656433aSmrg        teststring=$teststring$teststring
1604d656433aSmrg      done
1605d656433aSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606d656433aSmrg      # If test is not a shell built-in, we'll probably end up computing a
1607d656433aSmrg      # maximum length that is only half of the actual maximum length, but
1608d656433aSmrg      # we can't tell.
1609d656433aSmrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610d656433aSmrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611d656433aSmrg	      test $i != 17 # 1/2 MB should be enough
1612d656433aSmrg      do
1613d656433aSmrg        i=`expr $i + 1`
1614d656433aSmrg        teststring=$teststring$teststring
1615d656433aSmrg      done
1616d656433aSmrg      # Only check the string length outside the loop.
1617d656433aSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618d656433aSmrg      teststring=
1619d656433aSmrg      # Add a significant safety factor because C++ compilers can tack on
1620d656433aSmrg      # massive amounts of additional arguments before passing them to the
1621d656433aSmrg      # linker.  It appears as though 1/2 is a usable value.
1622d656433aSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623d656433aSmrg    fi
1624126a8a12Smrg    ;;
1625126a8a12Smrg  esac
1626d656433aSmrg])
1627d656433aSmrgif test -n $lt_cv_sys_max_cmd_len ; then
1628d656433aSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1629d656433aSmrgelse
1630d656433aSmrg  AC_MSG_RESULT(none)
1631d656433aSmrgfi
1632d656433aSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633d656433aSmrg_LT_DECL([], [max_cmd_len], [0],
1634d656433aSmrg    [What is the maximum length of a command?])
1635d656433aSmrg])# LT_CMD_MAX_LEN
1636126a8a12Smrg
1637d656433aSmrg# Old name:
1638d656433aSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639d656433aSmrgdnl aclocal-1.4 backwards compatibility:
1640d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1641126a8a12Smrg
1642126a8a12Smrg
1643d656433aSmrg# _LT_HEADER_DLFCN
1644d656433aSmrg# ----------------
1645d656433aSmrgm4_defun([_LT_HEADER_DLFCN],
1646d656433aSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647d656433aSmrg])# _LT_HEADER_DLFCN
1648126a8a12Smrg
1649126a8a12Smrg
1650d656433aSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651d656433aSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652d656433aSmrg# ----------------------------------------------------------------
1653d656433aSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654d656433aSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1655d656433aSmrgif test "$cross_compiling" = yes; then :
1656d656433aSmrg  [$4]
1657d656433aSmrgelse
1658d656433aSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659d656433aSmrg  lt_status=$lt_dlunknown
1660d656433aSmrg  cat > conftest.$ac_ext <<_LT_EOF
1661d656433aSmrg[#line __oline__ "configure"
1662d656433aSmrg#include "confdefs.h"
1663126a8a12Smrg
1664d656433aSmrg#if HAVE_DLFCN_H
1665d656433aSmrg#include <dlfcn.h>
1666d656433aSmrg#endif
1667126a8a12Smrg
1668d656433aSmrg#include <stdio.h>
1669126a8a12Smrg
1670d656433aSmrg#ifdef RTLD_GLOBAL
1671d656433aSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1672d656433aSmrg#else
1673d656433aSmrg#  ifdef DL_GLOBAL
1674d656433aSmrg#    define LT_DLGLOBAL		DL_GLOBAL
1675d656433aSmrg#  else
1676d656433aSmrg#    define LT_DLGLOBAL		0
1677d656433aSmrg#  endif
1678d656433aSmrg#endif
1679126a8a12Smrg
1680d656433aSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1681d656433aSmrg   find out it does not work in some platform. */
1682d656433aSmrg#ifndef LT_DLLAZY_OR_NOW
1683d656433aSmrg#  ifdef RTLD_LAZY
1684d656433aSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1685d656433aSmrg#  else
1686d656433aSmrg#    ifdef DL_LAZY
1687d656433aSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1688d656433aSmrg#    else
1689d656433aSmrg#      ifdef RTLD_NOW
1690d656433aSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1691d656433aSmrg#      else
1692d656433aSmrg#        ifdef DL_NOW
1693d656433aSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1694d656433aSmrg#        else
1695d656433aSmrg#          define LT_DLLAZY_OR_NOW	0
1696d656433aSmrg#        endif
1697d656433aSmrg#      endif
1698d656433aSmrg#    endif
1699d656433aSmrg#  endif
1700d656433aSmrg#endif
1701d656433aSmrg
1702d656433aSmrgvoid fnord() { int i=42;}
1703d656433aSmrgint main ()
1704d656433aSmrg{
1705d656433aSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1706d656433aSmrg  int status = $lt_dlunknown;
1707d656433aSmrg
1708d656433aSmrg  if (self)
1709d656433aSmrg    {
1710d656433aSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711d656433aSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1712d656433aSmrg      /* dlclose (self); */
1713d656433aSmrg    }
1714126a8a12Smrg  else
1715d656433aSmrg    puts (dlerror ());
1716d656433aSmrg
1717d656433aSmrg  return status;
1718d656433aSmrg}]
1719d656433aSmrg_LT_EOF
1720d656433aSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1721d656433aSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1722d656433aSmrg    lt_status=$?
1723d656433aSmrg    case x$lt_status in
1724d656433aSmrg      x$lt_dlno_uscore) $1 ;;
1725d656433aSmrg      x$lt_dlneed_uscore) $2 ;;
1726d656433aSmrg      x$lt_dlunknown|x*) $3 ;;
1727d656433aSmrg    esac
1728d656433aSmrg  else :
1729d656433aSmrg    # compilation failed
1730d656433aSmrg    $3
1731126a8a12Smrg  fi
1732d656433aSmrgfi
1733d656433aSmrgrm -fr conftest*
1734d656433aSmrg])# _LT_TRY_DLOPEN_SELF
1735126a8a12Smrg
1736126a8a12Smrg
1737d656433aSmrg# LT_SYS_DLOPEN_SELF
1738d656433aSmrg# ------------------
1739d656433aSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740d656433aSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1741d656433aSmrgif test "x$enable_dlopen" != xyes; then
1742d656433aSmrg  enable_dlopen=unknown
1743d656433aSmrg  enable_dlopen_self=unknown
1744d656433aSmrg  enable_dlopen_self_static=unknown
1745d656433aSmrgelse
1746d656433aSmrg  lt_cv_dlopen=no
1747d656433aSmrg  lt_cv_dlopen_libs=
1748126a8a12Smrg
1749d656433aSmrg  case $host_os in
1750d656433aSmrg  beos*)
1751d656433aSmrg    lt_cv_dlopen="load_add_on"
1752d656433aSmrg    lt_cv_dlopen_libs=
1753d656433aSmrg    lt_cv_dlopen_self=yes
1754d656433aSmrg    ;;
1755126a8a12Smrg
1756d656433aSmrg  mingw* | pw32* | cegcc*)
1757d656433aSmrg    lt_cv_dlopen="LoadLibrary"
1758d656433aSmrg    lt_cv_dlopen_libs=
1759d656433aSmrg    ;;
1760126a8a12Smrg
1761d656433aSmrg  cygwin*)
1762d656433aSmrg    lt_cv_dlopen="dlopen"
1763d656433aSmrg    lt_cv_dlopen_libs=
1764d656433aSmrg    ;;
1765126a8a12Smrg
1766d656433aSmrg  darwin*)
1767d656433aSmrg  # if libdl is installed we need to link against it
1768d656433aSmrg    AC_CHECK_LIB([dl], [dlopen],
1769d656433aSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1770d656433aSmrg    lt_cv_dlopen="dyld"
1771d656433aSmrg    lt_cv_dlopen_libs=
1772d656433aSmrg    lt_cv_dlopen_self=yes
1773d656433aSmrg    ])
1774d656433aSmrg    ;;
1775126a8a12Smrg
1776d656433aSmrg  *)
1777d656433aSmrg    AC_CHECK_FUNC([shl_load],
1778d656433aSmrg	  [lt_cv_dlopen="shl_load"],
1779d656433aSmrg      [AC_CHECK_LIB([dld], [shl_load],
1780d656433aSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1781d656433aSmrg	[AC_CHECK_FUNC([dlopen],
1782d656433aSmrg	      [lt_cv_dlopen="dlopen"],
1783d656433aSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1784d656433aSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1785d656433aSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1786d656433aSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1787d656433aSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1788d656433aSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1789d656433aSmrg	      ])
1790d656433aSmrg	    ])
1791d656433aSmrg	  ])
1792d656433aSmrg	])
1793d656433aSmrg      ])
1794d656433aSmrg    ;;
1795d656433aSmrg  esac
1796d656433aSmrg
1797d656433aSmrg  if test "x$lt_cv_dlopen" != xno; then
1798d656433aSmrg    enable_dlopen=yes
1799126a8a12Smrg  else
1800d656433aSmrg    enable_dlopen=no
1801126a8a12Smrg  fi
1802126a8a12Smrg
1803d656433aSmrg  case $lt_cv_dlopen in
1804d656433aSmrg  dlopen)
1805d656433aSmrg    save_CPPFLAGS="$CPPFLAGS"
1806d656433aSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1807126a8a12Smrg
1808d656433aSmrg    save_LDFLAGS="$LDFLAGS"
1809d656433aSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1810126a8a12Smrg
1811d656433aSmrg    save_LIBS="$LIBS"
1812d656433aSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1813126a8a12Smrg
1814d656433aSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1815d656433aSmrg	  lt_cv_dlopen_self, [dnl
1816d656433aSmrg	  _LT_TRY_DLOPEN_SELF(
1817d656433aSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1818d656433aSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1819d656433aSmrg    ])
1820126a8a12Smrg
1821d656433aSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1822d656433aSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1823d656433aSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824d656433aSmrg	  lt_cv_dlopen_self_static, [dnl
1825d656433aSmrg	  _LT_TRY_DLOPEN_SELF(
1826d656433aSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1827d656433aSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1828d656433aSmrg      ])
1829126a8a12Smrg    fi
1830126a8a12Smrg
1831d656433aSmrg    CPPFLAGS="$save_CPPFLAGS"
1832d656433aSmrg    LDFLAGS="$save_LDFLAGS"
1833d656433aSmrg    LIBS="$save_LIBS"
1834d656433aSmrg    ;;
1835d656433aSmrg  esac
1836126a8a12Smrg
1837d656433aSmrg  case $lt_cv_dlopen_self in
1838d656433aSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1839d656433aSmrg  *) enable_dlopen_self=unknown ;;
1840d656433aSmrg  esac
1841126a8a12Smrg
1842d656433aSmrg  case $lt_cv_dlopen_self_static in
1843d656433aSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1844d656433aSmrg  *) enable_dlopen_self_static=unknown ;;
1845d656433aSmrg  esac
1846d656433aSmrgfi
1847d656433aSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848d656433aSmrg	 [Whether dlopen is supported])
1849d656433aSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850d656433aSmrg	 [Whether dlopen of programs is supported])
1851d656433aSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852d656433aSmrg	 [Whether dlopen of statically linked programs is supported])
1853d656433aSmrg])# LT_SYS_DLOPEN_SELF
1854126a8a12Smrg
1855d656433aSmrg# Old name:
1856d656433aSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857d656433aSmrgdnl aclocal-1.4 backwards compatibility:
1858d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1859126a8a12Smrg
1860126a8a12Smrg
1861d656433aSmrg# _LT_COMPILER_C_O([TAGNAME])
1862d656433aSmrg# ---------------------------
1863d656433aSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864d656433aSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865d656433aSmrgm4_defun([_LT_COMPILER_C_O],
1866d656433aSmrg[m4_require([_LT_DECL_SED])dnl
1867d656433aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868d656433aSmrgm4_require([_LT_TAG_COMPILER])dnl
1869d656433aSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870d656433aSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871d656433aSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872d656433aSmrg   $RM -r conftest 2>/dev/null
1873d656433aSmrg   mkdir conftest
1874d656433aSmrg   cd conftest
1875d656433aSmrg   mkdir out
1876d656433aSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1877126a8a12Smrg
1878d656433aSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1879d656433aSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1880d656433aSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1881d656433aSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1882d656433aSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1883d656433aSmrg   lt_compile=`echo "$ac_compile" | $SED \
1884d656433aSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885d656433aSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886d656433aSmrg   -e 's:$: $lt_compiler_flag:'`
1887d656433aSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888d656433aSmrg   (eval "$lt_compile" 2>out/conftest.err)
1889d656433aSmrg   ac_status=$?
1890d656433aSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891d656433aSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892d656433aSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893d656433aSmrg   then
1894d656433aSmrg     # The compiler can only warn and ignore the option if not recognized
1895d656433aSmrg     # So say no if there are warnings
1896d656433aSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1897d656433aSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898d656433aSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899d656433aSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1900d656433aSmrg     fi
1901d656433aSmrg   fi
1902d656433aSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903d656433aSmrg   $RM conftest*
1904d656433aSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1905d656433aSmrg   # template instantiation
1906d656433aSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907d656433aSmrg   $RM out/* && rmdir out
1908d656433aSmrg   cd ..
1909d656433aSmrg   $RM -r conftest
1910d656433aSmrg   $RM conftest*
1911d656433aSmrg])
1912d656433aSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913d656433aSmrg	[Does compiler simultaneously support -c and -o options?])
1914d656433aSmrg])# _LT_COMPILER_C_O
1915126a8a12Smrg
1916126a8a12Smrg
1917d656433aSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918d656433aSmrg# ----------------------------------
1919d656433aSmrg# Check to see if we can do hard links to lock some files if needed
1920d656433aSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921d656433aSmrg[m4_require([_LT_ENABLE_LOCK])dnl
1922d656433aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923d656433aSmrg_LT_COMPILER_C_O([$1])
1924126a8a12Smrg
1925d656433aSmrghard_links="nottested"
1926d656433aSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1927d656433aSmrg  # do not overwrite the value of need_locks provided by the user
1928d656433aSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1929d656433aSmrg  hard_links=yes
1930d656433aSmrg  $RM conftest*
1931d656433aSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1932d656433aSmrg  touch conftest.a
1933d656433aSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1934d656433aSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935d656433aSmrg  AC_MSG_RESULT([$hard_links])
1936d656433aSmrg  if test "$hard_links" = no; then
1937d656433aSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1938d656433aSmrg    need_locks=warn
1939d656433aSmrg  fi
1940d656433aSmrgelse
1941d656433aSmrg  need_locks=no
1942d656433aSmrgfi
1943d656433aSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944d656433aSmrg])# _LT_COMPILER_FILE_LOCKS
1945126a8a12Smrg
1946126a8a12Smrg
1947d656433aSmrg# _LT_CHECK_OBJDIR
1948d656433aSmrg# ----------------
1949d656433aSmrgm4_defun([_LT_CHECK_OBJDIR],
1950d656433aSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1951d656433aSmrg[rm -f .libs 2>/dev/null
1952d656433aSmrgmkdir .libs 2>/dev/null
1953d656433aSmrgif test -d .libs; then
1954d656433aSmrg  lt_cv_objdir=.libs
1955d656433aSmrgelse
1956d656433aSmrg  # MS-DOS does not allow filenames that begin with a dot.
1957d656433aSmrg  lt_cv_objdir=_libs
1958d656433aSmrgfi
1959d656433aSmrgrmdir .libs 2>/dev/null])
1960d656433aSmrgobjdir=$lt_cv_objdir
1961d656433aSmrg_LT_DECL([], [objdir], [0],
1962d656433aSmrg         [The name of the directory that contains temporary libtool files])dnl
1963d656433aSmrgm4_pattern_allow([LT_OBJDIR])dnl
1964d656433aSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965d656433aSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966d656433aSmrg])# _LT_CHECK_OBJDIR
1967126a8a12Smrg
1968126a8a12Smrg
1969d656433aSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970d656433aSmrg# --------------------------------------
1971d656433aSmrg# Check hardcoding attributes.
1972d656433aSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1973d656433aSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974d656433aSmrg_LT_TAGVAR(hardcode_action, $1)=
1975d656433aSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976d656433aSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977d656433aSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978126a8a12Smrg
1979d656433aSmrg  # We can hardcode non-existent directories.
1980d656433aSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1981d656433aSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1982d656433aSmrg     # have to relink, otherwise we might link with an installed library
1983d656433aSmrg     # when we should be linking with a yet-to-be-installed one
1984d656433aSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985d656433aSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1986d656433aSmrg    # Linking always hardcodes the temporary library directory.
1987d656433aSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
1988d656433aSmrg  else
1989d656433aSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990d656433aSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
1991d656433aSmrg  fi
1992d656433aSmrgelse
1993d656433aSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1994d656433aSmrg  # directories.
1995d656433aSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
1996d656433aSmrgfi
1997d656433aSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1998126a8a12Smrg
1999d656433aSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000d656433aSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2001d656433aSmrg  # Fast installation is not supported
2002d656433aSmrg  enable_fast_install=no
2003d656433aSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2004d656433aSmrg     test "$enable_shared" = no; then
2005d656433aSmrg  # Fast installation is not necessary
2006d656433aSmrg  enable_fast_install=needless
2007d656433aSmrgfi
2008d656433aSmrg_LT_TAGDECL([], [hardcode_action], [0],
2009d656433aSmrg    [How to hardcode a shared library path into an executable])
2010d656433aSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2011126a8a12Smrg
2012126a8a12Smrg
2013d656433aSmrg# _LT_CMD_STRIPLIB
2014d656433aSmrg# ----------------
2015d656433aSmrgm4_defun([_LT_CMD_STRIPLIB],
2016d656433aSmrg[m4_require([_LT_DECL_EGREP])
2017d656433aSmrgstriplib=
2018d656433aSmrgold_striplib=
2019d656433aSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020d656433aSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2021d656433aSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2022d656433aSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2023d656433aSmrg  AC_MSG_RESULT([yes])
2024d656433aSmrgelse
2025d656433aSmrg# FIXME - insert some real tests, host_os isn't really good enough
2026d656433aSmrg  case $host_os in
2027d656433aSmrg  darwin*)
2028d656433aSmrg    if test -n "$STRIP" ; then
2029d656433aSmrg      striplib="$STRIP -x"
2030d656433aSmrg      old_striplib="$STRIP -S"
2031d656433aSmrg      AC_MSG_RESULT([yes])
2032d656433aSmrg    else
2033d656433aSmrg      AC_MSG_RESULT([no])
2034d656433aSmrg    fi
2035d656433aSmrg    ;;
2036d656433aSmrg  *)
2037d656433aSmrg    AC_MSG_RESULT([no])
2038d656433aSmrg    ;;
2039d656433aSmrg  esac
2040d656433aSmrgfi
2041d656433aSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042d656433aSmrg_LT_DECL([], [striplib], [1])
2043d656433aSmrg])# _LT_CMD_STRIPLIB
2044126a8a12Smrg
2045126a8a12Smrg
2046d656433aSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2047d656433aSmrg# -----------------------------
2048d656433aSmrg# PORTME Fill in your ld.so characteristics
2049d656433aSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050d656433aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051d656433aSmrgm4_require([_LT_DECL_EGREP])dnl
2052d656433aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053d656433aSmrgm4_require([_LT_DECL_OBJDUMP])dnl
2054d656433aSmrgm4_require([_LT_DECL_SED])dnl
2055d656433aSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056d656433aSmrgm4_if([$1],
2057d656433aSmrg	[], [
2058d656433aSmrgif test "$GCC" = yes; then
2059d656433aSmrg  case $host_os in
2060d656433aSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061d656433aSmrg    *) lt_awk_arg="/^libraries:/" ;;
2062d656433aSmrg  esac
2063d656433aSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064d656433aSmrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065d656433aSmrg    # if the path contains ";" then we assume it to be the separator
2066d656433aSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2067d656433aSmrg    # assumed that no part of a normal pathname contains ";" but that should
2068d656433aSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069d656433aSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070d656433aSmrg  else
2071d656433aSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072d656433aSmrg  fi
2073d656433aSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2074d656433aSmrg  # and add multilib dir if necessary.
2075d656433aSmrg  lt_tmp_lt_search_path_spec=
2076d656433aSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077d656433aSmrg  for lt_sys_path in $lt_search_path_spec; do
2078d656433aSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079d656433aSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080d656433aSmrg    else
2081d656433aSmrg      test -d "$lt_sys_path" && \
2082d656433aSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083d656433aSmrg    fi
2084d656433aSmrg  done
2085d656433aSmrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086d656433aSmrgBEGIN {RS=" "; FS="/|\n";} {
2087d656433aSmrg  lt_foo="";
2088d656433aSmrg  lt_count=0;
2089d656433aSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090d656433aSmrg    if ($lt_i != "" && $lt_i != ".") {
2091d656433aSmrg      if ($lt_i == "..") {
2092d656433aSmrg        lt_count++;
2093d656433aSmrg      } else {
2094d656433aSmrg        if (lt_count == 0) {
2095d656433aSmrg          lt_foo="/" $lt_i lt_foo;
2096d656433aSmrg        } else {
2097d656433aSmrg          lt_count--;
2098d656433aSmrg        }
2099d656433aSmrg      }
2100d656433aSmrg    }
2101d656433aSmrg  }
2102d656433aSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103d656433aSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104d656433aSmrg}'`
2105d656433aSmrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106d656433aSmrgelse
2107d656433aSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108d656433aSmrgfi])
2109d656433aSmrglibrary_names_spec=
2110d656433aSmrglibname_spec='lib$name'
2111d656433aSmrgsoname_spec=
2112d656433aSmrgshrext_cmds=".so"
2113d656433aSmrgpostinstall_cmds=
2114d656433aSmrgpostuninstall_cmds=
2115d656433aSmrgfinish_cmds=
2116d656433aSmrgfinish_eval=
2117d656433aSmrgshlibpath_var=
2118d656433aSmrgshlibpath_overrides_runpath=unknown
2119d656433aSmrgversion_type=none
2120d656433aSmrgdynamic_linker="$host_os ld.so"
2121d656433aSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2122d656433aSmrgneed_lib_prefix=unknown
2123d656433aSmrghardcode_into_libs=no
2124126a8a12Smrg
2125d656433aSmrg# when you set need_version to no, make sure it does not cause -set_version
2126d656433aSmrg# flags to be left without arguments
2127d656433aSmrgneed_version=unknown
2128126a8a12Smrg
2129d656433aSmrgcase $host_os in
2130d656433aSmrgaix3*)
2131d656433aSmrg  version_type=linux
2132d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2133d656433aSmrg  shlibpath_var=LIBPATH
2134126a8a12Smrg
2135d656433aSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2136d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2137d656433aSmrg  ;;
2138126a8a12Smrg
2139d656433aSmrgaix[[4-9]]*)
2140d656433aSmrg  version_type=linux
2141d656433aSmrg  need_lib_prefix=no
2142d656433aSmrg  need_version=no
2143d656433aSmrg  hardcode_into_libs=yes
2144d656433aSmrg  if test "$host_cpu" = ia64; then
2145d656433aSmrg    # AIX 5 supports IA64
2146d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2147d656433aSmrg    shlibpath_var=LD_LIBRARY_PATH
2148d656433aSmrg  else
2149d656433aSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2150d656433aSmrg    # for dependence libraries.  The import file would start with
2151d656433aSmrg    # the line `#! .'.  This would cause the generated library to
2152d656433aSmrg    # depend on `.', always an invalid library.  This was fixed in
2153d656433aSmrg    # development snapshots of GCC prior to 3.0.
2154d656433aSmrg    case $host_os in
2155d656433aSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2156d656433aSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2157d656433aSmrg	   echo ' yes '
2158d656433aSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2159d656433aSmrg	:
2160d656433aSmrg      else
2161d656433aSmrg	can_build_shared=no
2162d656433aSmrg      fi
2163126a8a12Smrg      ;;
2164d656433aSmrg    esac
2165d656433aSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2166d656433aSmrg    # soname into executable. Probably we can add versioning support to
2167d656433aSmrg    # collect2, so additional links can be useful in future.
2168d656433aSmrg    if test "$aix_use_runtimelinking" = yes; then
2169d656433aSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2170d656433aSmrg      # instead of lib<name>.a to let people know that these are not
2171d656433aSmrg      # typical AIX shared libraries.
2172d656433aSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173d656433aSmrg    else
2174d656433aSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2175d656433aSmrg      # and later when we are not doing run time linking.
2176d656433aSmrg      library_names_spec='${libname}${release}.a $libname.a'
2177d656433aSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2178d656433aSmrg    fi
2179d656433aSmrg    shlibpath_var=LIBPATH
2180d656433aSmrg  fi
2181d656433aSmrg  ;;
2182126a8a12Smrg
2183d656433aSmrgamigaos*)
2184d656433aSmrg  case $host_cpu in
2185d656433aSmrg  powerpc)
2186d656433aSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187d656433aSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189d656433aSmrg    ;;
2190d656433aSmrg  m68k)
2191d656433aSmrg    library_names_spec='$libname.ixlibrary $libname.a'
2192d656433aSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193d656433aSmrg    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'
2194d656433aSmrg    ;;
2195d656433aSmrg  esac
2196d656433aSmrg  ;;
2197126a8a12Smrg
2198d656433aSmrgbeos*)
2199d656433aSmrg  library_names_spec='${libname}${shared_ext}'
2200d656433aSmrg  dynamic_linker="$host_os ld.so"
2201d656433aSmrg  shlibpath_var=LIBRARY_PATH
2202d656433aSmrg  ;;
2203126a8a12Smrg
2204d656433aSmrgbsdi[[45]]*)
2205d656433aSmrg  version_type=linux
2206d656433aSmrg  need_version=no
2207d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2208d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2209d656433aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2210d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2211d656433aSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2212d656433aSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2213d656433aSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2214d656433aSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2215d656433aSmrg  # libtool to hard-code these into programs
2216d656433aSmrg  ;;
2217126a8a12Smrg
2218d656433aSmrgcygwin* | mingw* | pw32* | cegcc*)
2219d656433aSmrg  version_type=windows
2220d656433aSmrg  shrext_cmds=".dll"
2221d656433aSmrg  need_version=no
2222d656433aSmrg  need_lib_prefix=no
2223126a8a12Smrg
2224d656433aSmrg  case $GCC,$host_os in
2225d656433aSmrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2226d656433aSmrg    library_names_spec='$libname.dll.a'
2227d656433aSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228d656433aSmrg    postinstall_cmds='base_file=`basename \${file}`~
2229d656433aSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2230d656433aSmrg      dldir=$destdir/`dirname \$dlpath`~
2231d656433aSmrg      test -d \$dldir || mkdir -p \$dldir~
2232d656433aSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233d656433aSmrg      chmod a+x \$dldir/$dlname~
2234d656433aSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235d656433aSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236d656433aSmrg      fi'
2237d656433aSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2238d656433aSmrg      dlpath=$dir/\$dldll~
2239d656433aSmrg       $RM \$dlpath'
2240d656433aSmrg    shlibpath_overrides_runpath=yes
2241d656433aSmrg
2242d656433aSmrg    case $host_os in
2243d656433aSmrg    cygwin*)
2244d656433aSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245d656433aSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246d656433aSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2247d656433aSmrg      ;;
2248d656433aSmrg    mingw* | cegcc*)
2249d656433aSmrg      # MinGW DLLs use traditional 'lib' prefix
2250d656433aSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251d656433aSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252d656433aSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253d656433aSmrg        # It is most probably a Windows format PATH printed by
2254d656433aSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255d656433aSmrg        # path with ; separators, and with drive letters. We can handle the
2256d656433aSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2257d656433aSmrg        # especially as we might pass files found there to a mingw objdump,
2258d656433aSmrg        # which wouldn't understand a cygwinified path. Ahh.
2259d656433aSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260d656433aSmrg      else
2261d656433aSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262d656433aSmrg      fi
2263d656433aSmrg      ;;
2264d656433aSmrg    pw32*)
2265d656433aSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266d656433aSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267d656433aSmrg      ;;
2268d656433aSmrg    esac
2269d656433aSmrg    ;;
2270d656433aSmrg
2271d656433aSmrg  *)
2272d656433aSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2273d656433aSmrg    ;;
2274d656433aSmrg  esac
2275d656433aSmrg  dynamic_linker='Win32 ld.exe'
2276d656433aSmrg  # FIXME: first we should search . and the directory the executable is in
2277d656433aSmrg  shlibpath_var=PATH
2278126a8a12Smrg  ;;
2279126a8a12Smrg
2280d656433aSmrgdarwin* | rhapsody*)
2281d656433aSmrg  dynamic_linker="$host_os dyld"
2282d656433aSmrg  version_type=darwin
2283d656433aSmrg  need_lib_prefix=no
2284d656433aSmrg  need_version=no
2285d656433aSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2286d656433aSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2287d656433aSmrg  shlibpath_overrides_runpath=yes
2288d656433aSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2289d656433aSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290d656433aSmrgm4_if([$1], [],[
2291d656433aSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2292d656433aSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2293d656433aSmrg  ;;
2294126a8a12Smrg
2295d656433aSmrgdgux*)
2296d656433aSmrg  version_type=linux
2297d656433aSmrg  need_lib_prefix=no
2298d656433aSmrg  need_version=no
2299d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2300d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2301d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2302126a8a12Smrg  ;;
2303126a8a12Smrg
2304d656433aSmrgfreebsd1*)
2305d656433aSmrg  dynamic_linker=no
2306d656433aSmrg  ;;
2307126a8a12Smrg
2308d656433aSmrgfreebsd* | dragonfly*)
2309d656433aSmrg  # DragonFly does not have aout.  When/if they implement a new
2310d656433aSmrg  # versioning mechanism, adjust this.
2311d656433aSmrg  if test -x /usr/bin/objformat; then
2312d656433aSmrg    objformat=`/usr/bin/objformat`
2313126a8a12Smrg  else
2314d656433aSmrg    case $host_os in
2315d656433aSmrg    freebsd[[123]]*) objformat=aout ;;
2316d656433aSmrg    *) objformat=elf ;;
2317d656433aSmrg    esac
2318126a8a12Smrg  fi
2319d656433aSmrg  # Handle Gentoo/FreeBSD as it was Linux
2320d656433aSmrg  case $host_vendor in
2321d656433aSmrg    gentoo)
2322d656433aSmrg      version_type=linux ;;
2323d656433aSmrg    *)
2324d656433aSmrg      version_type=freebsd-$objformat ;;
2325126a8a12Smrg  esac
2326d656433aSmrg
2327d656433aSmrg  case $version_type in
2328d656433aSmrg    freebsd-elf*)
2329d656433aSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2330d656433aSmrg      need_version=no
2331d656433aSmrg      need_lib_prefix=no
2332126a8a12Smrg      ;;
2333d656433aSmrg    freebsd-*)
2334d656433aSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2335d656433aSmrg      need_version=yes
2336d656433aSmrg      ;;
2337d656433aSmrg    linux)
2338d656433aSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2339d656433aSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2340d656433aSmrg      need_lib_prefix=no
2341d656433aSmrg      need_version=no
2342d656433aSmrg      ;;
2343d656433aSmrg  esac
2344d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2345d656433aSmrg  case $host_os in
2346d656433aSmrg  freebsd2*)
2347d656433aSmrg    shlibpath_overrides_runpath=yes
2348126a8a12Smrg    ;;
2349d656433aSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2350d656433aSmrg    shlibpath_overrides_runpath=yes
2351d656433aSmrg    hardcode_into_libs=yes
2352d656433aSmrg    ;;
2353d656433aSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2354d656433aSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2355d656433aSmrg    shlibpath_overrides_runpath=no
2356d656433aSmrg    hardcode_into_libs=yes
2357d656433aSmrg    ;;
2358d656433aSmrg  *) # from 4.6 on, and DragonFly
2359d656433aSmrg    shlibpath_overrides_runpath=yes
2360d656433aSmrg    hardcode_into_libs=yes
2361126a8a12Smrg    ;;
2362126a8a12Smrg  esac
2363126a8a12Smrg  ;;
2364126a8a12Smrg
2365d656433aSmrggnu*)
2366d656433aSmrg  version_type=linux
2367d656433aSmrg  need_lib_prefix=no
2368d656433aSmrg  need_version=no
2369d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2370d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2371d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2372d656433aSmrg  hardcode_into_libs=yes
2373d656433aSmrg  ;;
2374126a8a12Smrg
2375d656433aSmrghpux9* | hpux10* | hpux11*)
2376d656433aSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2377d656433aSmrg  # link against other versions.
2378d656433aSmrg  version_type=sunos
2379d656433aSmrg  need_lib_prefix=no
2380d656433aSmrg  need_version=no
2381126a8a12Smrg  case $host_cpu in
2382126a8a12Smrg  ia64*)
2383d656433aSmrg    shrext_cmds='.so'
2384d656433aSmrg    hardcode_into_libs=yes
2385d656433aSmrg    dynamic_linker="$host_os dld.so"
2386d656433aSmrg    shlibpath_var=LD_LIBRARY_PATH
2387d656433aSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2388d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2389d656433aSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2390d656433aSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2391d656433aSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2392d656433aSmrg    else
2393d656433aSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2394d656433aSmrg    fi
2395d656433aSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2396126a8a12Smrg    ;;
2397126a8a12Smrg  hppa*64*)
2398d656433aSmrg    shrext_cmds='.sl'
2399d656433aSmrg    hardcode_into_libs=yes
2400d656433aSmrg    dynamic_linker="$host_os dld.sl"
2401d656433aSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2402d656433aSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2403d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2404d656433aSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2405d656433aSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2406d656433aSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2407126a8a12Smrg    ;;
2408126a8a12Smrg  *)
2409d656433aSmrg    shrext_cmds='.sl'
2410d656433aSmrg    dynamic_linker="$host_os dld.sl"
2411d656433aSmrg    shlibpath_var=SHLIB_PATH
2412d656433aSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2413d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2414d656433aSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2415126a8a12Smrg    ;;
2416126a8a12Smrg  esac
2417d656433aSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2418d656433aSmrg  postinstall_cmds='chmod 555 $lib'
2419126a8a12Smrg  ;;
2420126a8a12Smrg
2421d656433aSmrginterix[[3-9]]*)
2422d656433aSmrg  version_type=linux
2423d656433aSmrg  need_lib_prefix=no
2424d656433aSmrg  need_version=no
2425d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2426d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2427d656433aSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2428d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2429d656433aSmrg  shlibpath_overrides_runpath=no
2430d656433aSmrg  hardcode_into_libs=yes
2431126a8a12Smrg  ;;
2432126a8a12Smrg
2433126a8a12Smrgirix5* | irix6* | nonstopux*)
2434d656433aSmrg  case $host_os in
2435d656433aSmrg    nonstopux*) version_type=nonstopux ;;
2436d656433aSmrg    *)
2437d656433aSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2438d656433aSmrg		version_type=linux
2439d656433aSmrg	else
2440d656433aSmrg		version_type=irix
2441d656433aSmrg	fi ;;
2442126a8a12Smrg  esac
2443d656433aSmrg  need_lib_prefix=no
2444d656433aSmrg  need_version=no
2445d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2446d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2447d656433aSmrg  case $host_os in
2448d656433aSmrg  irix5* | nonstopux*)
2449d656433aSmrg    libsuff= shlibsuff=
2450d656433aSmrg    ;;
2451d656433aSmrg  *)
2452d656433aSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2453d656433aSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2454d656433aSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2455d656433aSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2456d656433aSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2457d656433aSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2458d656433aSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2459d656433aSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2460d656433aSmrg    esac
2461d656433aSmrg    ;;
2462d656433aSmrg  esac
2463d656433aSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2464d656433aSmrg  shlibpath_overrides_runpath=no
2465d656433aSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2466d656433aSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2467d656433aSmrg  hardcode_into_libs=yes
2468d656433aSmrg  ;;
2469d656433aSmrg
2470d656433aSmrg# No shared lib support for Linux oldld, aout, or coff.
2471d656433aSmrglinux*oldld* | linux*aout* | linux*coff*)
2472d656433aSmrg  dynamic_linker=no
2473126a8a12Smrg  ;;
2474126a8a12Smrg
2475126a8a12Smrg# This must be Linux ELF.
2476d656433aSmrglinux* | k*bsd*-gnu)
2477d656433aSmrg  version_type=linux
2478d656433aSmrg  need_lib_prefix=no
2479d656433aSmrg  need_version=no
2480d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2481d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2482d656433aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2483d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2484d656433aSmrg  shlibpath_overrides_runpath=no
2485d656433aSmrg  # Some binutils ld are patched to set DT_RUNPATH
2486d656433aSmrg  save_LDFLAGS=$LDFLAGS
2487d656433aSmrg  save_libdir=$libdir
2488d656433aSmrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2489d656433aSmrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2490d656433aSmrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2491d656433aSmrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2492d656433aSmrg       [shlibpath_overrides_runpath=yes])])
2493d656433aSmrg  LDFLAGS=$save_LDFLAGS
2494d656433aSmrg  libdir=$save_libdir
2495d656433aSmrg
2496d656433aSmrg  # This implies no fast_install, which is unacceptable.
2497d656433aSmrg  # Some rework will be needed to allow for fast_install
2498d656433aSmrg  # before this can be enabled.
2499d656433aSmrg  hardcode_into_libs=yes
2500d656433aSmrg
2501d656433aSmrg  # Append ld.so.conf contents to the search path
2502d656433aSmrg  if test -f /etc/ld.so.conf; then
2503d656433aSmrg    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' ' '`
2504d656433aSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2505d656433aSmrg  fi
2506d656433aSmrg
2507d656433aSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2508d656433aSmrg  # powerpc, because MkLinux only supported shared libraries with the
2509d656433aSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2510d656433aSmrg  # most powerpc-linux boxes support dynamic linking these days and
2511d656433aSmrg  # people can always --disable-shared, the test was removed, and we
2512d656433aSmrg  # assume the GNU/Linux dynamic linker is in use.
2513d656433aSmrg  dynamic_linker='GNU/Linux ld.so'
2514126a8a12Smrg  ;;
2515126a8a12Smrg
2516126a8a12Smrgnetbsd*)
2517d656433aSmrg  version_type=sunos
2518d656433aSmrg  need_lib_prefix=no
2519d656433aSmrg  need_version=no
2520d656433aSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2521d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2522d656433aSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2523d656433aSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2524126a8a12Smrg  else
2525d656433aSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2526d656433aSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2527d656433aSmrg    dynamic_linker='NetBSD ld.elf_so'
2528126a8a12Smrg  fi
2529d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2530d656433aSmrg  shlibpath_overrides_runpath=yes
2531d656433aSmrg  hardcode_into_libs=yes
2532126a8a12Smrg  ;;
2533126a8a12Smrg
2534d656433aSmrgnewsos6)
2535d656433aSmrg  version_type=linux
2536d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2537d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2538d656433aSmrg  shlibpath_overrides_runpath=yes
2539126a8a12Smrg  ;;
2540126a8a12Smrg
2541d656433aSmrg*nto* | *qnx*)
2542d656433aSmrg  version_type=qnx
2543d656433aSmrg  need_lib_prefix=no
2544d656433aSmrg  need_version=no
2545d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2546d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2547d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2548d656433aSmrg  shlibpath_overrides_runpath=no
2549d656433aSmrg  hardcode_into_libs=yes
2550d656433aSmrg  dynamic_linker='ldqnx.so'
2551126a8a12Smrg  ;;
2552126a8a12Smrg
2553126a8a12Smrgopenbsd*)
2554d656433aSmrg  version_type=sunos
2555d656433aSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
2556d656433aSmrg  need_lib_prefix=no
2557d656433aSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2558d656433aSmrg  case $host_os in
2559d656433aSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2560d656433aSmrg    *)				need_version=no  ;;
2561d656433aSmrg  esac
2562d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2563d656433aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2564d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2565d656433aSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2566d656433aSmrg    case $host_os in
2567d656433aSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2568d656433aSmrg	shlibpath_overrides_runpath=no
2569d656433aSmrg	;;
2570d656433aSmrg      *)
2571d656433aSmrg	shlibpath_overrides_runpath=yes
2572d656433aSmrg	;;
2573d656433aSmrg      esac
2574126a8a12Smrg  else
2575d656433aSmrg    shlibpath_overrides_runpath=yes
2576126a8a12Smrg  fi
2577126a8a12Smrg  ;;
2578126a8a12Smrg
2579d656433aSmrgos2*)
2580d656433aSmrg  libname_spec='$name'
2581d656433aSmrg  shrext_cmds=".dll"
2582d656433aSmrg  need_lib_prefix=no
2583d656433aSmrg  library_names_spec='$libname${shared_ext} $libname.a'
2584d656433aSmrg  dynamic_linker='OS/2 ld.exe'
2585d656433aSmrg  shlibpath_var=LIBPATH
2586d656433aSmrg  ;;
2587d656433aSmrg
2588d656433aSmrgosf3* | osf4* | osf5*)
2589d656433aSmrg  version_type=osf
2590d656433aSmrg  need_lib_prefix=no
2591d656433aSmrg  need_version=no
2592d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2593d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2594d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2595d656433aSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2596d656433aSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2597d656433aSmrg  ;;
2598d656433aSmrg
2599d656433aSmrgrdos*)
2600d656433aSmrg  dynamic_linker=no
2601126a8a12Smrg  ;;
2602126a8a12Smrg
2603126a8a12Smrgsolaris*)
2604d656433aSmrg  version_type=linux
2605d656433aSmrg  need_lib_prefix=no
2606d656433aSmrg  need_version=no
2607d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2608d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2609d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2610d656433aSmrg  shlibpath_overrides_runpath=yes
2611d656433aSmrg  hardcode_into_libs=yes
2612d656433aSmrg  # ldd complains unless libraries are executable
2613d656433aSmrg  postinstall_cmds='chmod +x $lib'
2614d656433aSmrg  ;;
2615d656433aSmrg
2616d656433aSmrgsunos4*)
2617d656433aSmrg  version_type=sunos
2618d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2619d656433aSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2620d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2621d656433aSmrg  shlibpath_overrides_runpath=yes
2622d656433aSmrg  if test "$with_gnu_ld" = yes; then
2623d656433aSmrg    need_lib_prefix=no
2624d656433aSmrg  fi
2625d656433aSmrg  need_version=yes
2626126a8a12Smrg  ;;
2627126a8a12Smrg
2628126a8a12Smrgsysv4 | sysv4.3*)
2629d656433aSmrg  version_type=linux
2630d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2631d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2632d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2633126a8a12Smrg  case $host_vendor in
2634d656433aSmrg    sni)
2635d656433aSmrg      shlibpath_overrides_runpath=no
2636d656433aSmrg      need_lib_prefix=no
2637d656433aSmrg      runpath_var=LD_RUN_PATH
2638d656433aSmrg      ;;
2639d656433aSmrg    siemens)
2640d656433aSmrg      need_lib_prefix=no
2641d656433aSmrg      ;;
2642d656433aSmrg    motorola)
2643d656433aSmrg      need_lib_prefix=no
2644d656433aSmrg      need_version=no
2645d656433aSmrg      shlibpath_overrides_runpath=no
2646d656433aSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2647d656433aSmrg      ;;
2648126a8a12Smrg  esac
2649126a8a12Smrg  ;;
2650126a8a12Smrg
2651d656433aSmrgsysv4*MP*)
2652d656433aSmrg  if test -d /usr/nec ;then
2653d656433aSmrg    version_type=linux
2654d656433aSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2655d656433aSmrg    soname_spec='$libname${shared_ext}.$major'
2656d656433aSmrg    shlibpath_var=LD_LIBRARY_PATH
2657d656433aSmrg  fi
2658126a8a12Smrg  ;;
2659126a8a12Smrg
2660d656433aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2661d656433aSmrg  version_type=freebsd-elf
2662d656433aSmrg  need_lib_prefix=no
2663d656433aSmrg  need_version=no
2664d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2665d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2666d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2667d656433aSmrg  shlibpath_overrides_runpath=yes
2668d656433aSmrg  hardcode_into_libs=yes
2669d656433aSmrg  if test "$with_gnu_ld" = yes; then
2670d656433aSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2671d656433aSmrg  else
2672d656433aSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2673d656433aSmrg    case $host_os in
2674d656433aSmrg      sco3.2v5*)
2675d656433aSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2676d656433aSmrg	;;
2677d656433aSmrg    esac
2678126a8a12Smrg  fi
2679d656433aSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
2680d656433aSmrg  ;;
2681126a8a12Smrg
2682d656433aSmrgtpf*)
2683d656433aSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2684d656433aSmrg  version_type=linux
2685d656433aSmrg  need_lib_prefix=no
2686d656433aSmrg  need_version=no
2687d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2688d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2689d656433aSmrg  shlibpath_overrides_runpath=no
2690d656433aSmrg  hardcode_into_libs=yes
2691126a8a12Smrg  ;;
2692d656433aSmrg
2693d656433aSmrguts4*)
2694d656433aSmrg  version_type=linux
2695d656433aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2696d656433aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2697d656433aSmrg  shlibpath_var=LD_LIBRARY_PATH
2698126a8a12Smrg  ;;
2699d656433aSmrg
2700126a8a12Smrg*)
2701d656433aSmrg  dynamic_linker=no
2702126a8a12Smrg  ;;
2703126a8a12Smrgesac
2704d656433aSmrgAC_MSG_RESULT([$dynamic_linker])
2705d656433aSmrgtest "$dynamic_linker" = no && can_build_shared=no
2706126a8a12Smrg
2707d656433aSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2708d656433aSmrgif test "$GCC" = yes; then
2709d656433aSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2710d656433aSmrgfi
2711126a8a12Smrg
2712d656433aSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2713d656433aSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2714d656433aSmrgfi
2715d656433aSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2716d656433aSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2717d656433aSmrgfi
2718126a8a12Smrg
2719d656433aSmrg_LT_DECL([], [variables_saved_for_relink], [1],
2720d656433aSmrg    [Variables whose values should be saved in libtool wrapper scripts and
2721d656433aSmrg    restored at link time])
2722d656433aSmrg_LT_DECL([], [need_lib_prefix], [0],
2723d656433aSmrg    [Do we need the "lib" prefix for modules?])
2724d656433aSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2725d656433aSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
2726d656433aSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2727d656433aSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2728d656433aSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2729d656433aSmrg    [Is shlibpath searched before the hard-coded library search path?])
2730d656433aSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2731d656433aSmrg_LT_DECL([], [library_names_spec], [1],
2732d656433aSmrg    [[List of archive names.  First name is the real one, the rest are links.
2733d656433aSmrg    The last name is the one that the linker finds with -lNAME]])
2734d656433aSmrg_LT_DECL([], [soname_spec], [1],
2735d656433aSmrg    [[The coded name of the library, if different from the real name]])
2736d656433aSmrg_LT_DECL([], [postinstall_cmds], [2],
2737d656433aSmrg    [Command to use after installation of a shared archive])
2738d656433aSmrg_LT_DECL([], [postuninstall_cmds], [2],
2739d656433aSmrg    [Command to use after uninstallation of a shared archive])
2740d656433aSmrg_LT_DECL([], [finish_cmds], [2],
2741d656433aSmrg    [Commands used to finish a libtool library installation in a directory])
2742d656433aSmrg_LT_DECL([], [finish_eval], [1],
2743d656433aSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
2744d656433aSmrg    not shown]])
2745d656433aSmrg_LT_DECL([], [hardcode_into_libs], [0],
2746d656433aSmrg    [Whether we should hardcode library paths into libraries])
2747d656433aSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2748d656433aSmrg    [Compile-time system search path for libraries])
2749d656433aSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2750d656433aSmrg    [Run-time system search path for libraries])
2751d656433aSmrg])# _LT_SYS_DYNAMIC_LINKER
2752d656433aSmrg
2753d656433aSmrg
2754d656433aSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
2755d656433aSmrg# --------------------------
2756d656433aSmrg# find a file program which can recognize shared library
2757d656433aSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2758d656433aSmrg[m4_require([_LT_DECL_EGREP])dnl
2759d656433aSmrgAC_MSG_CHECKING([for $1])
2760d656433aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2761d656433aSmrg[case $MAGIC_CMD in
2762d656433aSmrg[[\\/*] |  ?:[\\/]*])
2763d656433aSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2764d656433aSmrg  ;;
2765d656433aSmrg*)
2766d656433aSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2767d656433aSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2768d656433aSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2769d656433aSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2770d656433aSmrgdnl not every word.  This closes a longstanding sh security hole.
2771d656433aSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2772d656433aSmrg  for ac_dir in $ac_dummy; do
2773d656433aSmrg    IFS="$lt_save_ifs"
2774d656433aSmrg    test -z "$ac_dir" && ac_dir=.
2775d656433aSmrg    if test -f $ac_dir/$1; then
2776d656433aSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2777d656433aSmrg      if test -n "$file_magic_test_file"; then
2778d656433aSmrg	case $deplibs_check_method in
2779d656433aSmrg	"file_magic "*)
2780d656433aSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2781d656433aSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2782d656433aSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2783d656433aSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2784d656433aSmrg	    :
2785d656433aSmrg	  else
2786d656433aSmrg	    cat <<_LT_EOF 1>&2
2787126a8a12Smrg
2788d656433aSmrg*** Warning: the command libtool uses to detect shared libraries,
2789d656433aSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2790d656433aSmrg*** The result is that libtool may fail to recognize shared libraries
2791d656433aSmrg*** as such.  This will affect the creation of libtool libraries that
2792d656433aSmrg*** depend on shared libraries, but programs linked with such libtool
2793d656433aSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2794d656433aSmrg*** may want to report the problem to your system manager and/or to
2795d656433aSmrg*** bug-libtool@gnu.org
2796126a8a12Smrg
2797d656433aSmrg_LT_EOF
2798d656433aSmrg	  fi ;;
2799d656433aSmrg	esac
2800d656433aSmrg      fi
2801d656433aSmrg      break
2802d656433aSmrg    fi
2803d656433aSmrg  done
2804d656433aSmrg  IFS="$lt_save_ifs"
2805d656433aSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2806d656433aSmrg  ;;
2807d656433aSmrgesac])
2808d656433aSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2809d656433aSmrgif test -n "$MAGIC_CMD"; then
2810d656433aSmrg  AC_MSG_RESULT($MAGIC_CMD)
2811d656433aSmrgelse
2812d656433aSmrg  AC_MSG_RESULT(no)
2813d656433aSmrgfi
2814d656433aSmrg_LT_DECL([], [MAGIC_CMD], [0],
2815d656433aSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2816d656433aSmrg])# _LT_PATH_TOOL_PREFIX
2817126a8a12Smrg
2818d656433aSmrg# Old name:
2819d656433aSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2820d656433aSmrgdnl aclocal-1.4 backwards compatibility:
2821d656433aSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2822126a8a12Smrg
2823126a8a12Smrg
2824d656433aSmrg# _LT_PATH_MAGIC
2825d656433aSmrg# --------------
2826d656433aSmrg# find a file program which can recognize a shared library
2827d656433aSmrgm4_defun([_LT_PATH_MAGIC],
2828d656433aSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2829d656433aSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2830d656433aSmrg  if test -n "$ac_tool_prefix"; then
2831d656433aSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2832d656433aSmrg  else
2833d656433aSmrg    MAGIC_CMD=:
2834d656433aSmrg  fi
2835126a8a12Smrgfi
2836d656433aSmrg])# _LT_PATH_MAGIC
2837126a8a12Smrg
2838126a8a12Smrg
2839d656433aSmrg# LT_PATH_LD
2840d656433aSmrg# ----------
2841d656433aSmrg# find the pathname to the GNU or non-GNU linker
2842d656433aSmrgAC_DEFUN([LT_PATH_LD],
2843d656433aSmrg[AC_REQUIRE([AC_PROG_CC])dnl
2844d656433aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2845d656433aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2846d656433aSmrgm4_require([_LT_DECL_SED])dnl
2847d656433aSmrgm4_require([_LT_DECL_EGREP])dnl
2848126a8a12Smrg
2849d656433aSmrgAC_ARG_WITH([gnu-ld],
2850d656433aSmrg    [AS_HELP_STRING([--with-gnu-ld],
2851d656433aSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2852d656433aSmrg    [test "$withval" = no || with_gnu_ld=yes],
2853d656433aSmrg    [with_gnu_ld=no])dnl
2854126a8a12Smrg
2855d656433aSmrgac_prog=ld
2856d656433aSmrgif test "$GCC" = yes; then
2857d656433aSmrg  # Check if gcc -print-prog-name=ld gives a path.
2858d656433aSmrg  AC_MSG_CHECKING([for ld used by $CC])
2859d656433aSmrg  case $host in
2860d656433aSmrg  *-*-mingw*)
2861d656433aSmrg    # gcc leaves a trailing carriage return which upsets mingw
2862d656433aSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2863d656433aSmrg  *)
2864d656433aSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2865d656433aSmrg  esac
2866d656433aSmrg  case $ac_prog in
2867d656433aSmrg    # Accept absolute paths.
2868d656433aSmrg    [[\\/]]* | ?:[[\\/]]*)
2869d656433aSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2870d656433aSmrg      # Canonicalize the pathname of ld
2871d656433aSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2872d656433aSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2873d656433aSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2874d656433aSmrg      done
2875d656433aSmrg      test -z "$LD" && LD="$ac_prog"
2876d656433aSmrg      ;;
2877d656433aSmrg  "")
2878d656433aSmrg    # If it fails, then pretend we aren't using GCC.
2879d656433aSmrg    ac_prog=ld
2880d656433aSmrg    ;;
2881d656433aSmrg  *)
2882d656433aSmrg    # If it is relative, then search for the first ld in PATH.
2883d656433aSmrg    with_gnu_ld=unknown
2884d656433aSmrg    ;;
2885d656433aSmrg  esac
2886d656433aSmrgelif test "$with_gnu_ld" = yes; then
2887d656433aSmrg  AC_MSG_CHECKING([for GNU ld])
2888d656433aSmrgelse
2889d656433aSmrg  AC_MSG_CHECKING([for non-GNU ld])
2890d656433aSmrgfi
2891d656433aSmrgAC_CACHE_VAL(lt_cv_path_LD,
2892d656433aSmrg[if test -z "$LD"; then
2893d656433aSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2894d656433aSmrg  for ac_dir in $PATH; do
2895d656433aSmrg    IFS="$lt_save_ifs"
2896d656433aSmrg    test -z "$ac_dir" && ac_dir=.
2897d656433aSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2898d656433aSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2899d656433aSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2900d656433aSmrg      # but apparently some variants of GNU ld only accept -v.
2901d656433aSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2902d656433aSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2903d656433aSmrg      *GNU* | *'with BFD'*)
2904d656433aSmrg	test "$with_gnu_ld" != no && break
2905d656433aSmrg	;;
2906d656433aSmrg      *)
2907d656433aSmrg	test "$with_gnu_ld" != yes && break
2908d656433aSmrg	;;
2909d656433aSmrg      esac
2910d656433aSmrg    fi
2911d656433aSmrg  done
2912d656433aSmrg  IFS="$lt_save_ifs"
2913d656433aSmrgelse
2914d656433aSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2915d656433aSmrgfi])
2916d656433aSmrgLD="$lt_cv_path_LD"
2917d656433aSmrgif test -n "$LD"; then
2918d656433aSmrg  AC_MSG_RESULT($LD)
2919d656433aSmrgelse
2920d656433aSmrg  AC_MSG_RESULT(no)
2921d656433aSmrgfi
2922d656433aSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2923d656433aSmrg_LT_PATH_LD_GNU
2924d656433aSmrgAC_SUBST([LD])
2925126a8a12Smrg
2926d656433aSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2927d656433aSmrg])# LT_PATH_LD
2928126a8a12Smrg
2929d656433aSmrg# Old names:
2930d656433aSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2931d656433aSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2932d656433aSmrgdnl aclocal-1.4 backwards compatibility:
2933d656433aSmrgdnl AC_DEFUN([AM_PROG_LD], [])
2934d656433aSmrgdnl AC_DEFUN([AC_PROG_LD], [])
2935126a8a12Smrg
2936126a8a12Smrg
2937d656433aSmrg# _LT_PATH_LD_GNU
2938d656433aSmrg#- --------------
2939d656433aSmrgm4_defun([_LT_PATH_LD_GNU],
2940d656433aSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2941d656433aSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2942d656433aSmrgcase `$LD -v 2>&1 </dev/null` in
2943d656433aSmrg*GNU* | *'with BFD'*)
2944d656433aSmrg  lt_cv_prog_gnu_ld=yes
2945d656433aSmrg  ;;
2946d656433aSmrg*)
2947d656433aSmrg  lt_cv_prog_gnu_ld=no
2948d656433aSmrg  ;;
2949d656433aSmrgesac])
2950d656433aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2951d656433aSmrg])# _LT_PATH_LD_GNU
2952126a8a12Smrg
2953126a8a12Smrg
2954d656433aSmrg# _LT_CMD_RELOAD
2955d656433aSmrg# --------------
2956d656433aSmrg# find reload flag for linker
2957d656433aSmrg#   -- PORTME Some linkers may need a different reload flag.
2958d656433aSmrgm4_defun([_LT_CMD_RELOAD],
2959d656433aSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2960d656433aSmrg  lt_cv_ld_reload_flag,
2961d656433aSmrg  [lt_cv_ld_reload_flag='-r'])
2962d656433aSmrgreload_flag=$lt_cv_ld_reload_flag
2963d656433aSmrgcase $reload_flag in
2964d656433aSmrg"" | " "*) ;;
2965d656433aSmrg*) reload_flag=" $reload_flag" ;;
2966d656433aSmrgesac
2967d656433aSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2968d656433aSmrgcase $host_os in
2969d656433aSmrg  darwin*)
2970d656433aSmrg    if test "$GCC" = yes; then
2971d656433aSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2972d656433aSmrg    else
2973d656433aSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2974d656433aSmrg    fi
2975d656433aSmrg    ;;
2976d656433aSmrgesac
2977d656433aSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2978d656433aSmrg_LT_DECL([], [reload_cmds], [2])dnl
2979d656433aSmrg])# _LT_CMD_RELOAD
2980126a8a12Smrg
2981126a8a12Smrg
2982d656433aSmrg# _LT_CHECK_MAGIC_METHOD
2983d656433aSmrg# ----------------------
2984d656433aSmrg# how to check for library dependencies
2985d656433aSmrg#  -- PORTME fill in with the dynamic library characteristics
2986d656433aSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2987d656433aSmrg[m4_require([_LT_DECL_EGREP])
2988d656433aSmrgm4_require([_LT_DECL_OBJDUMP])
2989d656433aSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
2990d656433aSmrglt_cv_deplibs_check_method,
2991d656433aSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2992d656433aSmrglt_cv_file_magic_test_file=
2993d656433aSmrglt_cv_deplibs_check_method='unknown'
2994d656433aSmrg# Need to set the preceding variable on all platforms that support
2995d656433aSmrg# interlibrary dependencies.
2996d656433aSmrg# 'none' -- dependencies not supported.
2997d656433aSmrg# `unknown' -- same as none, but documents that we really don't know.
2998d656433aSmrg# 'pass_all' -- all dependencies passed with no checks.
2999d656433aSmrg# 'test_compile' -- check by making test program.
3000d656433aSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3001d656433aSmrg# which responds to the $file_magic_cmd with a given extended regex.
3002d656433aSmrg# If you have `file' or equivalent on your system and you're not sure
3003d656433aSmrg# whether `pass_all' will *always* work, you probably want this one.
3004126a8a12Smrg
3005d656433aSmrgcase $host_os in
3006d656433aSmrgaix[[4-9]]*)
3007d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3008d656433aSmrg  ;;
3009126a8a12Smrg
3010d656433aSmrgbeos*)
3011d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3012d656433aSmrg  ;;
3013126a8a12Smrg
3014d656433aSmrgbsdi[[45]]*)
3015d656433aSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3016d656433aSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3017d656433aSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3018d656433aSmrg  ;;
3019126a8a12Smrg
3020d656433aSmrgcygwin*)
3021d656433aSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3022d656433aSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3023d656433aSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3024126a8a12Smrg  ;;
3025126a8a12Smrg
3026d656433aSmrgmingw* | pw32*)
3027d656433aSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3028d656433aSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3029d656433aSmrg  # unless we find 'file', for example because we are cross-compiling.
3030d656433aSmrg  if ( file / ) >/dev/null 2>&1; then
3031d656433aSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3032d656433aSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3033d656433aSmrg  else
3034d656433aSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3035d656433aSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3036126a8a12Smrg  fi
3037d656433aSmrg  ;;
3038126a8a12Smrg
3039d656433aSmrgcegcc)
3040d656433aSmrg  # use the weaker test based on 'objdump'. See mingw*.
3041d656433aSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3042d656433aSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3043d656433aSmrg  ;;
3044126a8a12Smrg
3045d656433aSmrgdarwin* | rhapsody*)
3046d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3047d656433aSmrg  ;;
3048126a8a12Smrg
3049d656433aSmrgfreebsd* | dragonfly*)
3050d656433aSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3051d656433aSmrg    case $host_cpu in
3052d656433aSmrg    i*86 )
3053d656433aSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3054d656433aSmrg      # Let's accept both of them until this is cleared up.
3055d656433aSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3056d656433aSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3057d656433aSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3058d656433aSmrg      ;;
3059d656433aSmrg    esac
3060d656433aSmrg  else
3061d656433aSmrg    lt_cv_deplibs_check_method=pass_all
3062d656433aSmrg  fi
3063d656433aSmrg  ;;
3064126a8a12Smrg
3065d656433aSmrggnu*)
3066d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3067d656433aSmrg  ;;
3068126a8a12Smrg
3069d656433aSmrghpux10.20* | hpux11*)
3070d656433aSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3071d656433aSmrg  case $host_cpu in
3072d656433aSmrg  ia64*)
3073d656433aSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3074d656433aSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3075d656433aSmrg    ;;
3076d656433aSmrg  hppa*64*)
3077d656433aSmrg    [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]']
3078d656433aSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3079d656433aSmrg    ;;
3080d656433aSmrg  *)
3081d656433aSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3082d656433aSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3083d656433aSmrg    ;;
3084d656433aSmrg  esac
3085d656433aSmrg  ;;
3086126a8a12Smrg
3087d656433aSmrginterix[[3-9]]*)
3088d656433aSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3089d656433aSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3090d656433aSmrg  ;;
3091126a8a12Smrg
3092d656433aSmrgirix5* | irix6* | nonstopux*)
3093d656433aSmrg  case $LD in
3094d656433aSmrg  *-32|*"-32 ") libmagic=32-bit;;
3095d656433aSmrg  *-n32|*"-n32 ") libmagic=N32;;
3096d656433aSmrg  *-64|*"-64 ") libmagic=64-bit;;
3097d656433aSmrg  *) libmagic=never-match;;
3098d656433aSmrg  esac
3099d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3100d656433aSmrg  ;;
3101126a8a12Smrg
3102d656433aSmrg# This must be Linux ELF.
3103d656433aSmrglinux* | k*bsd*-gnu)
3104d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3105d656433aSmrg  ;;
3106126a8a12Smrg
3107d656433aSmrgnetbsd*)
3108d656433aSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3109d656433aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3110d656433aSmrg  else
3111d656433aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3112d656433aSmrg  fi
3113d656433aSmrg  ;;
3114126a8a12Smrg
3115d656433aSmrgnewos6*)
3116d656433aSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3117d656433aSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3118d656433aSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3119d656433aSmrg  ;;
3120126a8a12Smrg
3121d656433aSmrg*nto* | *qnx*)
3122d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3123d656433aSmrg  ;;
3124126a8a12Smrg
3125d656433aSmrgopenbsd*)
3126d656433aSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3127d656433aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3128d656433aSmrg  else
3129d656433aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3130d656433aSmrg  fi
3131d656433aSmrg  ;;
3132126a8a12Smrg
3133d656433aSmrgosf3* | osf4* | osf5*)
3134d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3135d656433aSmrg  ;;
3136126a8a12Smrg
3137d656433aSmrgrdos*)
3138d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3139d656433aSmrg  ;;
3140126a8a12Smrg
3141d656433aSmrgsolaris*)
3142d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3143d656433aSmrg  ;;
3144126a8a12Smrg
3145d656433aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3146d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3147d656433aSmrg  ;;
3148126a8a12Smrg
3149d656433aSmrgsysv4 | sysv4.3*)
3150d656433aSmrg  case $host_vendor in
3151d656433aSmrg  motorola)
3152d656433aSmrg    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]]'
3153d656433aSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3154d656433aSmrg    ;;
3155d656433aSmrg  ncr)
3156d656433aSmrg    lt_cv_deplibs_check_method=pass_all
3157d656433aSmrg    ;;
3158d656433aSmrg  sequent)
3159d656433aSmrg    lt_cv_file_magic_cmd='/bin/file'
3160d656433aSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3161d656433aSmrg    ;;
3162d656433aSmrg  sni)
3163d656433aSmrg    lt_cv_file_magic_cmd='/bin/file'
3164d656433aSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3165d656433aSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3166d656433aSmrg    ;;
3167d656433aSmrg  siemens)
3168d656433aSmrg    lt_cv_deplibs_check_method=pass_all
3169d656433aSmrg    ;;
3170d656433aSmrg  pc)
3171d656433aSmrg    lt_cv_deplibs_check_method=pass_all
3172d656433aSmrg    ;;
3173d656433aSmrg  esac
3174d656433aSmrg  ;;
3175126a8a12Smrg
3176d656433aSmrgtpf*)
3177d656433aSmrg  lt_cv_deplibs_check_method=pass_all
3178d656433aSmrg  ;;
3179d656433aSmrgesac
3180d656433aSmrg])
3181d656433aSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3182d656433aSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3183d656433aSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3184126a8a12Smrg
3185d656433aSmrg_LT_DECL([], [deplibs_check_method], [1],
3186d656433aSmrg    [Method to check whether dependent libraries are shared objects])
3187d656433aSmrg_LT_DECL([], [file_magic_cmd], [1],
3188d656433aSmrg    [Command to use when deplibs_check_method == "file_magic"])
3189d656433aSmrg])# _LT_CHECK_MAGIC_METHOD
3190126a8a12Smrg
3191126a8a12Smrg
3192d656433aSmrg# LT_PATH_NM
3193d656433aSmrg# ----------
3194d656433aSmrg# find the pathname to a BSD- or MS-compatible name lister
3195d656433aSmrgAC_DEFUN([LT_PATH_NM],
3196d656433aSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3197d656433aSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3198d656433aSmrg[if test -n "$NM"; then
3199d656433aSmrg  # Let the user override the test.
3200d656433aSmrg  lt_cv_path_NM="$NM"
3201126a8a12Smrgelse
3202d656433aSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3203d656433aSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3204d656433aSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3205d656433aSmrg  fi
3206d656433aSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3207d656433aSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3208d656433aSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3209d656433aSmrg      IFS="$lt_save_ifs"
3210d656433aSmrg      test -z "$ac_dir" && ac_dir=.
3211d656433aSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3212d656433aSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3213d656433aSmrg	# Check to see if the nm accepts a BSD-compat flag.
3214d656433aSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3215d656433aSmrg	#   nm: unknown option "B" ignored
3216d656433aSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3217d656433aSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3218d656433aSmrg	*/dev/null* | *'Invalid file or object type'*)
3219d656433aSmrg	  lt_cv_path_NM="$tmp_nm -B"
3220d656433aSmrg	  break
3221d656433aSmrg	  ;;
3222d656433aSmrg	*)
3223d656433aSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3224d656433aSmrg	  */dev/null*)
3225d656433aSmrg	    lt_cv_path_NM="$tmp_nm -p"
3226126a8a12Smrg	    break
3227126a8a12Smrg	    ;;
3228d656433aSmrg	  *)
3229d656433aSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3230d656433aSmrg	    continue # so that we can try to find one that supports BSD flags
3231d656433aSmrg	    ;;
3232126a8a12Smrg	  esac
3233d656433aSmrg	  ;;
3234d656433aSmrg	esac
3235d656433aSmrg      fi
3236d656433aSmrg    done
3237d656433aSmrg    IFS="$lt_save_ifs"
3238d656433aSmrg  done
3239d656433aSmrg  : ${lt_cv_path_NM=no}
3240d656433aSmrgfi])
3241d656433aSmrgif test "$lt_cv_path_NM" != "no"; then
3242d656433aSmrg  NM="$lt_cv_path_NM"
3243d656433aSmrgelse
3244d656433aSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3245d656433aSmrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3246d656433aSmrg  AC_SUBST([DUMPBIN])
3247d656433aSmrg  if test "$DUMPBIN" != ":"; then
3248d656433aSmrg    NM="$DUMPBIN"
3249d656433aSmrg  fi
3250d656433aSmrgfi
3251d656433aSmrgtest -z "$NM" && NM=nm
3252d656433aSmrgAC_SUBST([NM])
3253d656433aSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3254d656433aSmrg
3255d656433aSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3256d656433aSmrg  [lt_cv_nm_interface="BSD nm"
3257d656433aSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
3258d656433aSmrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3259d656433aSmrg  (eval "$ac_compile" 2>conftest.err)
3260d656433aSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3261d656433aSmrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3262d656433aSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3263d656433aSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3264d656433aSmrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3265d656433aSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3266d656433aSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3267d656433aSmrg    lt_cv_nm_interface="MS dumpbin"
3268d656433aSmrg  fi
3269d656433aSmrg  rm -f conftest*])
3270d656433aSmrg])# LT_PATH_NM
3271126a8a12Smrg
3272d656433aSmrg# Old names:
3273d656433aSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3274d656433aSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3275d656433aSmrgdnl aclocal-1.4 backwards compatibility:
3276d656433aSmrgdnl AC_DEFUN([AM_PROG_NM], [])
3277d656433aSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3278126a8a12Smrg
3279126a8a12Smrg
3280d656433aSmrg# LT_LIB_M
3281d656433aSmrg# --------
3282d656433aSmrg# check for math library
3283d656433aSmrgAC_DEFUN([LT_LIB_M],
3284d656433aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3285d656433aSmrgLIBM=
3286d656433aSmrgcase $host in
3287d656433aSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3288d656433aSmrg  # These system don't have libm, or don't need it
3289d656433aSmrg  ;;
3290d656433aSmrg*-ncr-sysv4.3*)
3291d656433aSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3292d656433aSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3293d656433aSmrg  ;;
3294d656433aSmrg*)
3295d656433aSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3296d656433aSmrg  ;;
3297d656433aSmrgesac
3298d656433aSmrgAC_SUBST([LIBM])
3299d656433aSmrg])# LT_LIB_M
3300126a8a12Smrg
3301d656433aSmrg# Old name:
3302d656433aSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3303d656433aSmrgdnl aclocal-1.4 backwards compatibility:
3304d656433aSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3305126a8a12Smrg
3306126a8a12Smrg
3307d656433aSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3308d656433aSmrg# -------------------------------
3309d656433aSmrgm4_defun([_LT_COMPILER_NO_RTTI],
3310d656433aSmrg[m4_require([_LT_TAG_COMPILER])dnl
3311126a8a12Smrg
3312d656433aSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3313126a8a12Smrg
3314d656433aSmrgif test "$GCC" = yes; then
3315d656433aSmrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3316126a8a12Smrg
3317d656433aSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3318d656433aSmrg    lt_cv_prog_compiler_rtti_exceptions,
3319d656433aSmrg    [-fno-rtti -fno-exceptions], [],
3320d656433aSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3321d656433aSmrgfi
3322d656433aSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3323d656433aSmrg	[Compiler flag to turn off builtin functions])
3324d656433aSmrg])# _LT_COMPILER_NO_RTTI
3325126a8a12Smrg
3326126a8a12Smrg
3327d656433aSmrg# _LT_CMD_GLOBAL_SYMBOLS
3328d656433aSmrg# ----------------------
3329d656433aSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3330d656433aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3331d656433aSmrgAC_REQUIRE([AC_PROG_CC])dnl
3332d656433aSmrgAC_REQUIRE([LT_PATH_NM])dnl
3333d656433aSmrgAC_REQUIRE([LT_PATH_LD])dnl
3334d656433aSmrgm4_require([_LT_DECL_SED])dnl
3335d656433aSmrgm4_require([_LT_DECL_EGREP])dnl
3336d656433aSmrgm4_require([_LT_TAG_COMPILER])dnl
3337126a8a12Smrg
3338d656433aSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3339d656433aSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3340d656433aSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3341d656433aSmrg[
3342d656433aSmrg# These are sane defaults that work on at least a few old systems.
3343d656433aSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3344126a8a12Smrg
3345d656433aSmrg# Character class describing NM global symbol codes.
3346d656433aSmrgsymcode='[[BCDEGRST]]'
3347126a8a12Smrg
3348d656433aSmrg# Regexp to match symbols that can be accessed directly from C.
3349d656433aSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3350126a8a12Smrg
3351d656433aSmrg# Define system-specific variables.
3352d656433aSmrgcase $host_os in
3353d656433aSmrgaix*)
3354d656433aSmrg  symcode='[[BCDT]]'
3355d656433aSmrg  ;;
3356d656433aSmrgcygwin* | mingw* | pw32* | cegcc*)
3357d656433aSmrg  symcode='[[ABCDGISTW]]'
3358d656433aSmrg  ;;
3359d656433aSmrghpux*)
3360d656433aSmrg  if test "$host_cpu" = ia64; then
3361d656433aSmrg    symcode='[[ABCDEGRST]]'
3362d656433aSmrg  fi
3363d656433aSmrg  ;;
3364d656433aSmrgirix* | nonstopux*)
3365d656433aSmrg  symcode='[[BCDEGRST]]'
3366d656433aSmrg  ;;
3367d656433aSmrgosf*)
3368d656433aSmrg  symcode='[[BCDEGQRST]]'
3369d656433aSmrg  ;;
3370d656433aSmrgsolaris*)
3371d656433aSmrg  symcode='[[BDRT]]'
3372d656433aSmrg  ;;
3373d656433aSmrgsco3.2v5*)
3374d656433aSmrg  symcode='[[DT]]'
3375d656433aSmrg  ;;
3376d656433aSmrgsysv4.2uw2*)
3377d656433aSmrg  symcode='[[DT]]'
3378d656433aSmrg  ;;
3379d656433aSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3380d656433aSmrg  symcode='[[ABDT]]'
3381d656433aSmrg  ;;
3382d656433aSmrgsysv4)
3383d656433aSmrg  symcode='[[DFNSTU]]'
3384d656433aSmrg  ;;
3385d656433aSmrgesac
3386126a8a12Smrg
3387d656433aSmrg# If we're using GNU nm, then use its standard symbol codes.
3388d656433aSmrgcase `$NM -V 2>&1` in
3389d656433aSmrg*GNU* | *'with BFD'*)
3390d656433aSmrg  symcode='[[ABCDGIRSTW]]' ;;
3391d656433aSmrgesac
3392126a8a12Smrg
3393d656433aSmrg# Transform an extracted symbol line into a proper C declaration.
3394d656433aSmrg# Some systems (esp. on ia64) link data and code symbols differently,
3395d656433aSmrg# so use this general approach.
3396d656433aSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3397126a8a12Smrg
3398d656433aSmrg# Transform an extracted symbol line into symbol name and symbol address
3399d656433aSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3400d656433aSmrglt_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'"
3401126a8a12Smrg
3402d656433aSmrg# Handle CRLF in mingw tool chain
3403d656433aSmrgopt_cr=
3404d656433aSmrgcase $build_os in
3405d656433aSmrgmingw*)
3406d656433aSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3407d656433aSmrg  ;;
3408d656433aSmrgesac
3409126a8a12Smrg
3410d656433aSmrg# Try without a prefix underscore, then with it.
3411d656433aSmrgfor ac_symprfx in "" "_"; do
3412126a8a12Smrg
3413d656433aSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3414d656433aSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3415126a8a12Smrg
3416d656433aSmrg  # Write the raw and C identifiers.
3417d656433aSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3418d656433aSmrg    # Fake it for dumpbin and say T for any non-static function
3419d656433aSmrg    # and D for any global variable.
3420d656433aSmrg    # Also find C++ and __fastcall symbols from MSVC++,
3421d656433aSmrg    # which start with @ or ?.
3422d656433aSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3423d656433aSmrg"     {last_section=section; section=\$ 3};"\
3424d656433aSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3425d656433aSmrg"     \$ 0!~/External *\|/{next};"\
3426d656433aSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3427d656433aSmrg"     {if(hide[section]) next};"\
3428d656433aSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3429d656433aSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3430d656433aSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3431d656433aSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3432d656433aSmrg"     ' prfx=^$ac_symprfx]"
3433d656433aSmrg  else
3434d656433aSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3435d656433aSmrg  fi
3436126a8a12Smrg
3437d656433aSmrg  # Check to see that the pipe works correctly.
3438d656433aSmrg  pipe_works=no
3439126a8a12Smrg
3440d656433aSmrg  rm -f conftest*
3441d656433aSmrg  cat > conftest.$ac_ext <<_LT_EOF
3442d656433aSmrg#ifdef __cplusplus
3443d656433aSmrgextern "C" {
3444d656433aSmrg#endif
3445d656433aSmrgchar nm_test_var;
3446d656433aSmrgvoid nm_test_func(void);
3447d656433aSmrgvoid nm_test_func(void){}
3448d656433aSmrg#ifdef __cplusplus
3449d656433aSmrg}
3450d656433aSmrg#endif
3451d656433aSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
3452d656433aSmrg_LT_EOF
3453126a8a12Smrg
3454d656433aSmrg  if AC_TRY_EVAL(ac_compile); then
3455d656433aSmrg    # Now try to grab the symbols.
3456d656433aSmrg    nlist=conftest.nm
3457d656433aSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3458d656433aSmrg      # Try sorting and uniquifying the output.
3459d656433aSmrg      if sort "$nlist" | uniq > "$nlist"T; then
3460d656433aSmrg	mv -f "$nlist"T "$nlist"
3461d656433aSmrg      else
3462d656433aSmrg	rm -f "$nlist"T
3463d656433aSmrg      fi
3464126a8a12Smrg
3465d656433aSmrg      # Make sure that we snagged all the symbols we need.
3466d656433aSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3467d656433aSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3468d656433aSmrg	  cat <<_LT_EOF > conftest.$ac_ext
3469d656433aSmrg#ifdef __cplusplus
3470d656433aSmrgextern "C" {
3471d656433aSmrg#endif
3472126a8a12Smrg
3473d656433aSmrg_LT_EOF
3474d656433aSmrg	  # Now generate the symbol file.
3475d656433aSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3476126a8a12Smrg
3477d656433aSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
3478126a8a12Smrg
3479d656433aSmrg/* The mapping between symbol names and symbols.  */
3480d656433aSmrgconst struct {
3481d656433aSmrg  const char *name;
3482d656433aSmrg  void       *address;
3483d656433aSmrg}
3484d656433aSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3485126a8a12Smrg{
3486d656433aSmrg  { "@PROGRAM@", (void *) 0 },
3487d656433aSmrg_LT_EOF
3488d656433aSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3489d656433aSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3490d656433aSmrg  {0, (void *) 0}
3491126a8a12Smrg};
3492126a8a12Smrg
3493d656433aSmrg/* This works around a problem in FreeBSD linker */
3494d656433aSmrg#ifdef FREEBSD_WORKAROUND
3495d656433aSmrgstatic const void *lt_preloaded_setup() {
3496d656433aSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
3497d656433aSmrg}
3498d656433aSmrg#endif
3499126a8a12Smrg
3500d656433aSmrg#ifdef __cplusplus
3501d656433aSmrg}
3502d656433aSmrg#endif
3503d656433aSmrg_LT_EOF
3504d656433aSmrg	  # Now try linking the two files.
3505d656433aSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
3506d656433aSmrg	  lt_save_LIBS="$LIBS"
3507d656433aSmrg	  lt_save_CFLAGS="$CFLAGS"
3508d656433aSmrg	  LIBS="conftstm.$ac_objext"
3509d656433aSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3510d656433aSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3511d656433aSmrg	    pipe_works=yes
3512d656433aSmrg	  fi
3513d656433aSmrg	  LIBS="$lt_save_LIBS"
3514d656433aSmrg	  CFLAGS="$lt_save_CFLAGS"
3515d656433aSmrg	else
3516d656433aSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3517d656433aSmrg	fi
3518d656433aSmrg      else
3519d656433aSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3520d656433aSmrg      fi
3521d656433aSmrg    else
3522d656433aSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3523d656433aSmrg    fi
3524d656433aSmrg  else
3525d656433aSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3526d656433aSmrg    cat conftest.$ac_ext >&5
3527d656433aSmrg  fi
3528d656433aSmrg  rm -rf conftest* conftst*
3529126a8a12Smrg
3530d656433aSmrg  # Do not use the global_symbol_pipe unless it works.
3531d656433aSmrg  if test "$pipe_works" = yes; then
3532d656433aSmrg    break
3533d656433aSmrg  else
3534d656433aSmrg    lt_cv_sys_global_symbol_pipe=
3535d656433aSmrg  fi
3536d656433aSmrgdone
3537d656433aSmrg])
3538d656433aSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3539d656433aSmrg  lt_cv_sys_global_symbol_to_cdecl=
3540d656433aSmrgfi
3541d656433aSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3542d656433aSmrg  AC_MSG_RESULT(failed)
3543126a8a12Smrgelse
3544d656433aSmrg  AC_MSG_RESULT(ok)
3545126a8a12Smrgfi
3546126a8a12Smrg
3547d656433aSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3548d656433aSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
3549d656433aSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3550d656433aSmrg    [Transform the output of nm in a proper C declaration])
3551d656433aSmrg_LT_DECL([global_symbol_to_c_name_address],
3552d656433aSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3553d656433aSmrg    [Transform the output of nm in a C name address pair])
3554d656433aSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3555d656433aSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3556d656433aSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3557d656433aSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
3558126a8a12Smrg
3559126a8a12Smrg
3560d656433aSmrg# _LT_COMPILER_PIC([TAGNAME])
3561d656433aSmrg# ---------------------------
3562d656433aSmrgm4_defun([_LT_COMPILER_PIC],
3563d656433aSmrg[m4_require([_LT_TAG_COMPILER])dnl
3564d656433aSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3565d656433aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3566d656433aSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3567126a8a12Smrg
3568d656433aSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3569d656433aSmrgm4_if([$1], [CXX], [
3570d656433aSmrg  # C++ specific cases for pic, static, wl, etc.
3571d656433aSmrg  if test "$GXX" = yes; then
3572d656433aSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3573d656433aSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3574126a8a12Smrg
3575d656433aSmrg    case $host_os in
3576d656433aSmrg    aix*)
3577d656433aSmrg      # All AIX code is PIC.
3578d656433aSmrg      if test "$host_cpu" = ia64; then
3579d656433aSmrg	# AIX 5 now supports IA64 processor
3580d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3581d656433aSmrg      fi
3582d656433aSmrg      ;;
3583126a8a12Smrg
3584d656433aSmrg    amigaos*)
3585d656433aSmrg      case $host_cpu in
3586d656433aSmrg      powerpc)
3587d656433aSmrg            # see comment about AmigaOS4 .so support
3588d656433aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3589d656433aSmrg        ;;
3590d656433aSmrg      m68k)
3591d656433aSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3592d656433aSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3593d656433aSmrg            # like `-m68040'.
3594d656433aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3595d656433aSmrg        ;;
3596d656433aSmrg      esac
3597d656433aSmrg      ;;
3598126a8a12Smrg
3599d656433aSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3600d656433aSmrg      # PIC is the default for these OSes.
3601d656433aSmrg      ;;
3602d656433aSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3603d656433aSmrg      # This hack is so that the source file can tell whether it is being
3604d656433aSmrg      # built for inclusion in a dll (and should export symbols for example).
3605d656433aSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3606d656433aSmrg      # (--disable-auto-import) libraries
3607d656433aSmrg      m4_if([$1], [GCJ], [],
3608d656433aSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3609d656433aSmrg      ;;
3610d656433aSmrg    darwin* | rhapsody*)
3611d656433aSmrg      # PIC is the default on this platform
3612d656433aSmrg      # Common symbols not allowed in MH_DYLIB files
3613d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3614d656433aSmrg      ;;
3615d656433aSmrg    *djgpp*)
3616d656433aSmrg      # DJGPP does not support shared libraries at all
3617d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3618d656433aSmrg      ;;
3619d656433aSmrg    interix[[3-9]]*)
3620d656433aSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3621d656433aSmrg      # Instead, we relocate shared libraries at runtime.
3622d656433aSmrg      ;;
3623d656433aSmrg    sysv4*MP*)
3624d656433aSmrg      if test -d /usr/nec; then
3625d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3626d656433aSmrg      fi
3627d656433aSmrg      ;;
3628d656433aSmrg    hpux*)
3629d656433aSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3630d656433aSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3631d656433aSmrg      # sets the default TLS model and affects inlining.
3632d656433aSmrg      case $host_cpu in
3633d656433aSmrg      hppa*64*)
3634d656433aSmrg	;;
3635d656433aSmrg      *)
3636d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3637d656433aSmrg	;;
3638d656433aSmrg      esac
3639d656433aSmrg      ;;
3640d656433aSmrg    *qnx* | *nto*)
3641d656433aSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3642d656433aSmrg      # it will coredump.
3643d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3644d656433aSmrg      ;;
3645d656433aSmrg    *)
3646d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3647d656433aSmrg      ;;
3648d656433aSmrg    esac
3649d656433aSmrg  else
3650d656433aSmrg    case $host_os in
3651d656433aSmrg      aix[[4-9]]*)
3652d656433aSmrg	# All AIX code is PIC.
3653d656433aSmrg	if test "$host_cpu" = ia64; then
3654d656433aSmrg	  # AIX 5 now supports IA64 processor
3655d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3656d656433aSmrg	else
3657d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3658d656433aSmrg	fi
3659d656433aSmrg	;;
3660d656433aSmrg      chorus*)
3661d656433aSmrg	case $cc_basename in
3662d656433aSmrg	cxch68*)
3663d656433aSmrg	  # Green Hills C++ Compiler
3664d656433aSmrg	  # _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"
3665d656433aSmrg	  ;;
3666d656433aSmrg	esac
3667d656433aSmrg	;;
3668d656433aSmrg      dgux*)
3669d656433aSmrg	case $cc_basename in
3670d656433aSmrg	  ec++*)
3671d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3672d656433aSmrg	    ;;
3673d656433aSmrg	  ghcx*)
3674d656433aSmrg	    # Green Hills C++ Compiler
3675d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3676d656433aSmrg	    ;;
3677d656433aSmrg	  *)
3678d656433aSmrg	    ;;
3679d656433aSmrg	esac
3680d656433aSmrg	;;
3681d656433aSmrg      freebsd* | dragonfly*)
3682d656433aSmrg	# FreeBSD uses GNU C++
3683d656433aSmrg	;;
3684d656433aSmrg      hpux9* | hpux10* | hpux11*)
3685d656433aSmrg	case $cc_basename in
3686d656433aSmrg	  CC*)
3687d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3688d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3689d656433aSmrg	    if test "$host_cpu" != ia64; then
3690d656433aSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3691d656433aSmrg	    fi
3692d656433aSmrg	    ;;
3693d656433aSmrg	  aCC*)
3694d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3695d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3696d656433aSmrg	    case $host_cpu in
3697d656433aSmrg	    hppa*64*|ia64*)
3698d656433aSmrg	      # +Z the default
3699d656433aSmrg	      ;;
3700d656433aSmrg	    *)
3701d656433aSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3702d656433aSmrg	      ;;
3703d656433aSmrg	    esac
3704d656433aSmrg	    ;;
3705d656433aSmrg	  *)
3706d656433aSmrg	    ;;
3707d656433aSmrg	esac
3708d656433aSmrg	;;
3709d656433aSmrg      interix*)
3710d656433aSmrg	# This is c89, which is MS Visual C++ (no shared libs)
3711d656433aSmrg	# Anyone wants to do a port?
3712d656433aSmrg	;;
3713d656433aSmrg      irix5* | irix6* | nonstopux*)
3714d656433aSmrg	case $cc_basename in
3715d656433aSmrg	  CC*)
3716d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3717d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3718d656433aSmrg	    # CC pic flag -KPIC is the default.
3719d656433aSmrg	    ;;
3720d656433aSmrg	  *)
3721d656433aSmrg	    ;;
3722d656433aSmrg	esac
3723d656433aSmrg	;;
3724d656433aSmrg      linux* | k*bsd*-gnu)
3725d656433aSmrg	case $cc_basename in
3726d656433aSmrg	  KCC*)
3727d656433aSmrg	    # KAI C++ Compiler
3728d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3729d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3730d656433aSmrg	    ;;
3731d656433aSmrg	  ecpc* )
3732d656433aSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3733d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3734d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3735d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3736d656433aSmrg	    ;;
3737d656433aSmrg	  icpc* )
3738d656433aSmrg	    # Intel C++, used to be incompatible with GCC.
3739d656433aSmrg	    # ICC 10 doesn't accept -KPIC any more.
3740d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3741d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3742d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3743d656433aSmrg	    ;;
3744d656433aSmrg	  pgCC* | pgcpp*)
3745d656433aSmrg	    # Portland Group C++ compiler
3746d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3747d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3748d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3749d656433aSmrg	    ;;
3750d656433aSmrg	  cxx*)
3751d656433aSmrg	    # Compaq C++
3752d656433aSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3753d656433aSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3754d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3755d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3756d656433aSmrg	    ;;
3757d656433aSmrg	  xlc* | xlC*)
3758d656433aSmrg	    # IBM XL 8.0 on PPC
3759d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3760d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3761d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3762d656433aSmrg	    ;;
3763d656433aSmrg	  *)
3764d656433aSmrg	    case `$CC -V 2>&1 | sed 5q` in
3765d656433aSmrg	    *Sun\ C*)
3766d656433aSmrg	      # Sun C++ 5.9
3767d656433aSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3768d656433aSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3769d656433aSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3770d656433aSmrg	      ;;
3771d656433aSmrg	    esac
3772d656433aSmrg	    ;;
3773d656433aSmrg	esac
3774d656433aSmrg	;;
3775d656433aSmrg      lynxos*)
3776d656433aSmrg	;;
3777d656433aSmrg      m88k*)
3778d656433aSmrg	;;
3779d656433aSmrg      mvs*)
3780d656433aSmrg	case $cc_basename in
3781d656433aSmrg	  cxx*)
3782d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3783d656433aSmrg	    ;;
3784d656433aSmrg	  *)
3785d656433aSmrg	    ;;
3786d656433aSmrg	esac
3787d656433aSmrg	;;
3788d656433aSmrg      netbsd*)
3789d656433aSmrg	;;
3790d656433aSmrg      *qnx* | *nto*)
3791d656433aSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3792d656433aSmrg        # it will coredump.
3793d656433aSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3794d656433aSmrg        ;;
3795d656433aSmrg      osf3* | osf4* | osf5*)
3796d656433aSmrg	case $cc_basename in
3797d656433aSmrg	  KCC*)
3798d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3799d656433aSmrg	    ;;
3800d656433aSmrg	  RCC*)
3801d656433aSmrg	    # Rational C++ 2.4.1
3802d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3803d656433aSmrg	    ;;
3804d656433aSmrg	  cxx*)
3805d656433aSmrg	    # Digital/Compaq C++
3806d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3807d656433aSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3808d656433aSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3809d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3810d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3811d656433aSmrg	    ;;
3812d656433aSmrg	  *)
3813d656433aSmrg	    ;;
3814d656433aSmrg	esac
3815d656433aSmrg	;;
3816d656433aSmrg      psos*)
3817d656433aSmrg	;;
3818d656433aSmrg      solaris*)
3819d656433aSmrg	case $cc_basename in
3820d656433aSmrg	  CC*)
3821d656433aSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
3822d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3823d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3824d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3825d656433aSmrg	    ;;
3826d656433aSmrg	  gcx*)
3827d656433aSmrg	    # Green Hills C++ Compiler
3828d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3829d656433aSmrg	    ;;
3830d656433aSmrg	  *)
3831d656433aSmrg	    ;;
3832d656433aSmrg	esac
3833d656433aSmrg	;;
3834d656433aSmrg      sunos4*)
3835d656433aSmrg	case $cc_basename in
3836d656433aSmrg	  CC*)
3837d656433aSmrg	    # Sun C++ 4.x
3838d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3839d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3840d656433aSmrg	    ;;
3841d656433aSmrg	  lcc*)
3842d656433aSmrg	    # Lucid
3843d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3844d656433aSmrg	    ;;
3845d656433aSmrg	  *)
3846d656433aSmrg	    ;;
3847d656433aSmrg	esac
3848d656433aSmrg	;;
3849d656433aSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3850d656433aSmrg	case $cc_basename in
3851d656433aSmrg	  CC*)
3852d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3853d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3854d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3855d656433aSmrg	    ;;
3856d656433aSmrg	esac
3857d656433aSmrg	;;
3858d656433aSmrg      tandem*)
3859d656433aSmrg	case $cc_basename in
3860d656433aSmrg	  NCC*)
3861d656433aSmrg	    # NonStop-UX NCC 3.20
3862d656433aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3863d656433aSmrg	    ;;
3864d656433aSmrg	  *)
3865d656433aSmrg	    ;;
3866d656433aSmrg	esac
3867d656433aSmrg	;;
3868d656433aSmrg      vxworks*)
3869d656433aSmrg	;;
3870d656433aSmrg      *)
3871d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3872d656433aSmrg	;;
3873d656433aSmrg    esac
3874126a8a12Smrg  fi
3875d656433aSmrg],
3876d656433aSmrg[
3877d656433aSmrg  if test "$GCC" = yes; then
3878d656433aSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3879d656433aSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3880126a8a12Smrg
3881d656433aSmrg    case $host_os in
3882d656433aSmrg      aix*)
3883d656433aSmrg      # All AIX code is PIC.
3884d656433aSmrg      if test "$host_cpu" = ia64; then
3885d656433aSmrg	# AIX 5 now supports IA64 processor
3886d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3887d656433aSmrg      fi
3888d656433aSmrg      ;;
3889126a8a12Smrg
3890d656433aSmrg    amigaos*)
3891d656433aSmrg      case $host_cpu in
3892d656433aSmrg      powerpc)
3893d656433aSmrg            # see comment about AmigaOS4 .so support
3894d656433aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3895d656433aSmrg        ;;
3896d656433aSmrg      m68k)
3897d656433aSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3898d656433aSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3899d656433aSmrg            # like `-m68040'.
3900d656433aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3901d656433aSmrg        ;;
3902d656433aSmrg      esac
3903d656433aSmrg      ;;
3904126a8a12Smrg
3905d656433aSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3906d656433aSmrg      # PIC is the default for these OSes.
3907d656433aSmrg      ;;
3908126a8a12Smrg
3909d656433aSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3910d656433aSmrg      # This hack is so that the source file can tell whether it is being
3911d656433aSmrg      # built for inclusion in a dll (and should export symbols for example).
3912d656433aSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3913d656433aSmrg      # (--disable-auto-import) libraries
3914d656433aSmrg      m4_if([$1], [GCJ], [],
3915d656433aSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3916d656433aSmrg      ;;
3917126a8a12Smrg
3918d656433aSmrg    darwin* | rhapsody*)
3919d656433aSmrg      # PIC is the default on this platform
3920d656433aSmrg      # Common symbols not allowed in MH_DYLIB files
3921d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3922d656433aSmrg      ;;
3923126a8a12Smrg
3924d656433aSmrg    hpux*)
3925d656433aSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3926d656433aSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3927d656433aSmrg      # sets the default TLS model and affects inlining.
3928d656433aSmrg      case $host_cpu in
3929d656433aSmrg      hppa*64*)
3930d656433aSmrg	# +Z the default
3931d656433aSmrg	;;
3932d656433aSmrg      *)
3933d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3934d656433aSmrg	;;
3935d656433aSmrg      esac
3936d656433aSmrg      ;;
3937126a8a12Smrg
3938d656433aSmrg    interix[[3-9]]*)
3939d656433aSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3940d656433aSmrg      # Instead, we relocate shared libraries at runtime.
3941d656433aSmrg      ;;
3942126a8a12Smrg
3943d656433aSmrg    msdosdjgpp*)
3944d656433aSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3945d656433aSmrg      # on systems that don't support them.
3946d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3947d656433aSmrg      enable_shared=no
3948d656433aSmrg      ;;
3949126a8a12Smrg
3950d656433aSmrg    *nto* | *qnx*)
3951d656433aSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3952d656433aSmrg      # it will coredump.
3953d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3954d656433aSmrg      ;;
3955126a8a12Smrg
3956d656433aSmrg    sysv4*MP*)
3957d656433aSmrg      if test -d /usr/nec; then
3958d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3959d656433aSmrg      fi
3960d656433aSmrg      ;;
3961126a8a12Smrg
3962d656433aSmrg    *)
3963d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3964d656433aSmrg      ;;
3965d656433aSmrg    esac
3966d656433aSmrg  else
3967d656433aSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
3968d656433aSmrg    case $host_os in
3969d656433aSmrg    aix*)
3970d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3971d656433aSmrg      if test "$host_cpu" = ia64; then
3972d656433aSmrg	# AIX 5 now supports IA64 processor
3973d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3974d656433aSmrg      else
3975d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3976d656433aSmrg      fi
3977d656433aSmrg      ;;
3978126a8a12Smrg
3979d656433aSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3980d656433aSmrg      # This hack is so that the source file can tell whether it is being
3981d656433aSmrg      # built for inclusion in a dll (and should export symbols for example).
3982d656433aSmrg      m4_if([$1], [GCJ], [],
3983d656433aSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3984d656433aSmrg      ;;
3985126a8a12Smrg
3986d656433aSmrg    hpux9* | hpux10* | hpux11*)
3987d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3988d656433aSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3989d656433aSmrg      # not for PA HP-UX.
3990d656433aSmrg      case $host_cpu in
3991d656433aSmrg      hppa*64*|ia64*)
3992d656433aSmrg	# +Z the default
3993d656433aSmrg	;;
3994d656433aSmrg      *)
3995d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3996d656433aSmrg	;;
3997d656433aSmrg      esac
3998d656433aSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3999d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4000d656433aSmrg      ;;
4001126a8a12Smrg
4002d656433aSmrg    irix5* | irix6* | nonstopux*)
4003d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4004d656433aSmrg      # PIC (with -KPIC) is the default.
4005d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4006d656433aSmrg      ;;
4007126a8a12Smrg
4008d656433aSmrg    linux* | k*bsd*-gnu)
4009d656433aSmrg      case $cc_basename in
4010d656433aSmrg      # old Intel for x86_64 which still supported -KPIC.
4011d656433aSmrg      ecc*)
4012d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4013d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4014d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4015d656433aSmrg        ;;
4016d656433aSmrg      # icc used to be incompatible with GCC.
4017d656433aSmrg      # ICC 10 doesn't accept -KPIC any more.
4018d656433aSmrg      icc* | ifort*)
4019d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4020d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4021d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4022d656433aSmrg        ;;
4023d656433aSmrg      # Lahey Fortran 8.1.
4024d656433aSmrg      lf95*)
4025d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4026d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4027d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4028d656433aSmrg	;;
4029d656433aSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
4030d656433aSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4031d656433aSmrg	# which looks to be a dead project)
4032d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4033d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4034d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4035d656433aSmrg        ;;
4036d656433aSmrg      ccc*)
4037d656433aSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4038d656433aSmrg        # All Alpha code is PIC.
4039d656433aSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4040d656433aSmrg        ;;
4041d656433aSmrg      xl*)
4042d656433aSmrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4043d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4045d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4046d656433aSmrg	;;
4047d656433aSmrg      *)
4048d656433aSmrg	case `$CC -V 2>&1 | sed 5q` in
4049d656433aSmrg	*Sun\ C*)
4050d656433aSmrg	  # Sun C 5.9
4051d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4052d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4053d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4054d656433aSmrg	  ;;
4055d656433aSmrg	*Sun\ F*)
4056d656433aSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4057d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4058d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059d656433aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4060d656433aSmrg	  ;;
4061d656433aSmrg	esac
4062d656433aSmrg	;;
4063d656433aSmrg      esac
4064d656433aSmrg      ;;
4065126a8a12Smrg
4066d656433aSmrg    newsos6)
4067d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4068d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4069d656433aSmrg      ;;
4070126a8a12Smrg
4071d656433aSmrg    *nto* | *qnx*)
4072d656433aSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4073d656433aSmrg      # it will coredump.
4074d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4075d656433aSmrg      ;;
4076126a8a12Smrg
4077d656433aSmrg    osf3* | osf4* | osf5*)
4078d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4079d656433aSmrg      # All OSF/1 code is PIC.
4080d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4081d656433aSmrg      ;;
4082126a8a12Smrg
4083d656433aSmrg    rdos*)
4084d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4085d656433aSmrg      ;;
4086126a8a12Smrg
4087d656433aSmrg    solaris*)
4088d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4089d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4090d656433aSmrg      case $cc_basename in
4091d656433aSmrg      f77* | f90* | f95*)
4092d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4093d656433aSmrg      *)
4094d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4095d656433aSmrg      esac
4096d656433aSmrg      ;;
4097126a8a12Smrg
4098d656433aSmrg    sunos4*)
4099d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4100d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4101d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4102d656433aSmrg      ;;
4103126a8a12Smrg
4104d656433aSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4105d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4106d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4107d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4108d656433aSmrg      ;;
4109126a8a12Smrg
4110d656433aSmrg    sysv4*MP*)
4111d656433aSmrg      if test -d /usr/nec ;then
4112d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4113d656433aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4114d656433aSmrg      fi
4115d656433aSmrg      ;;
4116126a8a12Smrg
4117d656433aSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4118d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4119d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4120d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4121d656433aSmrg      ;;
4122126a8a12Smrg
4123d656433aSmrg    unicos*)
4124d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4125d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4126d656433aSmrg      ;;
4127126a8a12Smrg
4128d656433aSmrg    uts4*)
4129d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4130d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4131126a8a12Smrg      ;;
4132d656433aSmrg
4133126a8a12Smrg    *)
4134d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4135126a8a12Smrg      ;;
4136126a8a12Smrg    esac
4137d656433aSmrg  fi
4138d656433aSmrg])
4139d656433aSmrgcase $host_os in
4140d656433aSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
4141d656433aSmrg  *djgpp*)
4142d656433aSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4143126a8a12Smrg    ;;
4144d656433aSmrg  *)
4145d656433aSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4146d656433aSmrg    ;;
4147d656433aSmrgesac
4148d656433aSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4149d656433aSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4150d656433aSmrg	[How to pass a linker flag through the compiler])
4151126a8a12Smrg
4152126a8a12Smrg#
4153d656433aSmrg# Check to make sure the PIC flag actually works.
4154126a8a12Smrg#
4155d656433aSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4156d656433aSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4157d656433aSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4158d656433aSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4159d656433aSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4160d656433aSmrg     "" | " "*) ;;
4161d656433aSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4162d656433aSmrg     esac],
4163d656433aSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4164d656433aSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4165d656433aSmrgfi
4166d656433aSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4167d656433aSmrg	[Additional compiler flags for building library objects])
4168d656433aSmrg
4169126a8a12Smrg#
4170d656433aSmrg# Check to make sure the static flag actually works.
4171126a8a12Smrg#
4172d656433aSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4173d656433aSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4174d656433aSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4175d656433aSmrg  $lt_tmp_static_flag,
4176d656433aSmrg  [],
4177d656433aSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4178d656433aSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4179d656433aSmrg	[Compiler flag to prevent dynamic linking])
4180d656433aSmrg])# _LT_COMPILER_PIC
4181126a8a12Smrg
4182126a8a12Smrg
4183d656433aSmrg# _LT_LINKER_SHLIBS([TAGNAME])
4184d656433aSmrg# ----------------------------
4185d656433aSmrg# See if the linker supports building shared libraries.
4186d656433aSmrgm4_defun([_LT_LINKER_SHLIBS],
4187d656433aSmrg[AC_REQUIRE([LT_PATH_LD])dnl
4188d656433aSmrgAC_REQUIRE([LT_PATH_NM])dnl
4189d656433aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4190d656433aSmrgm4_require([_LT_DECL_EGREP])dnl
4191d656433aSmrgm4_require([_LT_DECL_SED])dnl
4192d656433aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4193d656433aSmrgm4_require([_LT_TAG_COMPILER])dnl
4194d656433aSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4195d656433aSmrgm4_if([$1], [CXX], [
4196d656433aSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4197d656433aSmrg  case $host_os in
4198d656433aSmrg  aix[[4-9]]*)
4199d656433aSmrg    # If we're using GNU nm, then we don't want the "-C" option.
4200d656433aSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4201d656433aSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4202d656433aSmrg      _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'
4203d656433aSmrg    else
4204d656433aSmrg      _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'
4205d656433aSmrg    fi
4206d656433aSmrg    ;;
4207d656433aSmrg  pw32*)
4208d656433aSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4209d656433aSmrg  ;;
4210d656433aSmrg  cygwin* | mingw* | cegcc*)
4211d656433aSmrg    _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'
4212d656433aSmrg  ;;
4213d656433aSmrg  *)
4214d656433aSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4215d656433aSmrg  ;;
4216d656433aSmrg  esac
4217d656433aSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4218d656433aSmrg], [
4219d656433aSmrg  runpath_var=
4220d656433aSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4221d656433aSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
4222d656433aSmrg  _LT_TAGVAR(archive_cmds, $1)=
4223d656433aSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4224d656433aSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4225d656433aSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4226d656433aSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4227d656433aSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4228d656433aSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4229d656433aSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
4230d656433aSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4231d656433aSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4232d656433aSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4233d656433aSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4234d656433aSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4235d656433aSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4236d656433aSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
4237d656433aSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4238d656433aSmrg  _LT_TAGVAR(module_cmds, $1)=
4239d656433aSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4240d656433aSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4241d656433aSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4242d656433aSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4243d656433aSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4244d656433aSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
4245d656433aSmrg  # included in the symbol list
4246d656433aSmrg  _LT_TAGVAR(include_expsyms, $1)=
4247d656433aSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4248d656433aSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4249d656433aSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4250d656433aSmrg  # as well as any symbol that contains `d'.
4251d656433aSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4252d656433aSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4253d656433aSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4254d656433aSmrg  # the symbol is explicitly referenced.  Since portable code cannot
4255d656433aSmrg  # rely on this symbol name, it's probably fine to never include it in
4256d656433aSmrg  # preloaded symbol tables.
4257d656433aSmrg  # Exclude shared library initialization/finalization symbols.
4258d656433aSmrgdnl Note also adjust exclude_expsyms for C++ above.
4259d656433aSmrg  extract_expsyms_cmds=
4260126a8a12Smrg
4261d656433aSmrg  case $host_os in
4262d656433aSmrg  cygwin* | mingw* | pw32* | cegcc*)
4263d656433aSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4264d656433aSmrg    # When not using gcc, we currently assume that we are using
4265d656433aSmrg    # Microsoft Visual C++.
4266d656433aSmrg    if test "$GCC" != yes; then
4267d656433aSmrg      with_gnu_ld=no
4268d656433aSmrg    fi
4269d656433aSmrg    ;;
4270d656433aSmrg  interix*)
4271d656433aSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4272d656433aSmrg    with_gnu_ld=yes
4273d656433aSmrg    ;;
4274d656433aSmrg  openbsd*)
4275d656433aSmrg    with_gnu_ld=no
4276d656433aSmrg    ;;
4277d656433aSmrg  esac
4278126a8a12Smrg
4279d656433aSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4280d656433aSmrg  if test "$with_gnu_ld" = yes; then
4281d656433aSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4282d656433aSmrg    wlarc='${wl}'
4283126a8a12Smrg
4284d656433aSmrg    # Set some defaults for GNU ld with shared library support. These
4285d656433aSmrg    # are reset later if shared libraries are not supported. Putting them
4286d656433aSmrg    # here allows them to be overridden if necessary.
4287d656433aSmrg    runpath_var=LD_RUN_PATH
4288d656433aSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4289d656433aSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4290d656433aSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4291d656433aSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4292d656433aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4293d656433aSmrg    else
4294d656433aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4295d656433aSmrg    fi
4296d656433aSmrg    supports_anon_versioning=no
4297d656433aSmrg    case `$LD -v 2>&1` in
4298d656433aSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4299d656433aSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4300d656433aSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4301d656433aSmrg      *\ 2.11.*) ;; # other 2.11 versions
4302d656433aSmrg      *) supports_anon_versioning=yes ;;
4303d656433aSmrg    esac
4304126a8a12Smrg
4305d656433aSmrg    # See if GNU ld supports shared libraries.
4306d656433aSmrg    case $host_os in
4307d656433aSmrg    aix[[3-9]]*)
4308d656433aSmrg      # On AIX/PPC, the GNU linker is very broken
4309d656433aSmrg      if test "$host_cpu" != ia64; then
4310d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4311d656433aSmrg	cat <<_LT_EOF 1>&2
4312126a8a12Smrg
4313d656433aSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4314d656433aSmrg*** to be unable to reliably create shared libraries on AIX.
4315d656433aSmrg*** Therefore, libtool is disabling shared libraries support.  If you
4316d656433aSmrg*** really care for shared libraries, you may want to modify your PATH
4317d656433aSmrg*** so that a non-GNU linker is found, and then restart.
4318126a8a12Smrg
4319d656433aSmrg_LT_EOF
4320d656433aSmrg      fi
4321d656433aSmrg      ;;
4322126a8a12Smrg
4323d656433aSmrg    amigaos*)
4324d656433aSmrg      case $host_cpu in
4325d656433aSmrg      powerpc)
4326d656433aSmrg            # see comment about AmigaOS4 .so support
4327d656433aSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4328d656433aSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4329d656433aSmrg        ;;
4330d656433aSmrg      m68k)
4331d656433aSmrg            _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)'
4332d656433aSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4333d656433aSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4334d656433aSmrg        ;;
4335d656433aSmrg      esac
4336d656433aSmrg      ;;
4337126a8a12Smrg
4338d656433aSmrg    beos*)
4339d656433aSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4340d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4341d656433aSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4342d656433aSmrg	# support --undefined.  This deserves some investigation.  FIXME
4343d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4344d656433aSmrg      else
4345d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4346d656433aSmrg      fi
4347d656433aSmrg      ;;
4348126a8a12Smrg
4349d656433aSmrg    cygwin* | mingw* | pw32* | cegcc*)
4350d656433aSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4351d656433aSmrg      # as there is no search path for DLLs.
4352d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4353d656433aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4354d656433aSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
4355d656433aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4356d656433aSmrg      _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'
4357d656433aSmrg
4358d656433aSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4359d656433aSmrg        _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'
4360d656433aSmrg	# If the export-symbols file already is a .def file (1st line
4361d656433aSmrg	# is EXPORTS), use it as is; otherwise, prepend...
4362d656433aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4363d656433aSmrg	  cp $export_symbols $output_objdir/$soname.def;
4364d656433aSmrg	else
4365d656433aSmrg	  echo EXPORTS > $output_objdir/$soname.def;
4366d656433aSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
4367d656433aSmrg	fi~
4368d656433aSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4369d656433aSmrg      else
4370d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4371d656433aSmrg      fi
4372d656433aSmrg      ;;
4373126a8a12Smrg
4374d656433aSmrg    interix[[3-9]]*)
4375d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
4376d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4377d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4378d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4379d656433aSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4380d656433aSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4381d656433aSmrg      # default) and relocated if they conflict, which is a slow very memory
4382d656433aSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4383d656433aSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4384d656433aSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4385d656433aSmrg      _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'
4386d656433aSmrg      _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'
4387d656433aSmrg      ;;
4388126a8a12Smrg
4389d656433aSmrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4390d656433aSmrg      tmp_diet=no
4391d656433aSmrg      if test "$host_os" = linux-dietlibc; then
4392d656433aSmrg	case $cc_basename in
4393d656433aSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4394d656433aSmrg	esac
4395d656433aSmrg      fi
4396d656433aSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4397d656433aSmrg	 && test "$tmp_diet" = no
4398d656433aSmrg      then
4399d656433aSmrg	tmp_addflag=
4400d656433aSmrg	tmp_sharedflag='-shared'
4401d656433aSmrg	case $cc_basename,$host_cpu in
4402d656433aSmrg        pgcc*)				# Portland Group C compiler
4403d656433aSmrg	  _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'
4404d656433aSmrg	  tmp_addflag=' $pic_flag'
4405d656433aSmrg	  ;;
4406d656433aSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4407d656433aSmrg	  _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'
4408d656433aSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4409d656433aSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4410d656433aSmrg	  tmp_addflag=' -i_dynamic' ;;
4411d656433aSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4412d656433aSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4413d656433aSmrg	ifc* | ifort*)			# Intel Fortran compiler
4414d656433aSmrg	  tmp_addflag=' -nofor_main' ;;
4415d656433aSmrg	lf95*)				# Lahey Fortran 8.1
4416d656433aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4417d656433aSmrg	  tmp_sharedflag='--shared' ;;
4418d656433aSmrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4419d656433aSmrg	  tmp_sharedflag='-qmkshrobj'
4420d656433aSmrg	  tmp_addflag= ;;
4421d656433aSmrg	esac
4422d656433aSmrg	case `$CC -V 2>&1 | sed 5q` in
4423d656433aSmrg	*Sun\ C*)			# Sun C 5.9
4424d656433aSmrg	  _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'
4425d656433aSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4426d656433aSmrg	  tmp_sharedflag='-G' ;;
4427d656433aSmrg	*Sun\ F*)			# Sun Fortran 8.3
4428d656433aSmrg	  tmp_sharedflag='-G' ;;
4429d656433aSmrg	esac
4430d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4431126a8a12Smrg
4432d656433aSmrg        if test "x$supports_anon_versioning" = xyes; then
4433d656433aSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4434d656433aSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4435d656433aSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4436d656433aSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4437d656433aSmrg        fi
4438126a8a12Smrg
4439d656433aSmrg	case $cc_basename in
4440d656433aSmrg	xlf*)
4441d656433aSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4442d656433aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4443d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4444d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4445d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4446d656433aSmrg	  if test "x$supports_anon_versioning" = xyes; then
4447d656433aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4448d656433aSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4449d656433aSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4450d656433aSmrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4451d656433aSmrg	  fi
4452d656433aSmrg	  ;;
4453d656433aSmrg	esac
4454d656433aSmrg      else
4455d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
4456d656433aSmrg      fi
4457d656433aSmrg      ;;
4458126a8a12Smrg
4459d656433aSmrg    netbsd*)
4460d656433aSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4461d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4462d656433aSmrg	wlarc=
4463d656433aSmrg      else
4464d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4465d656433aSmrg	_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'
4466d656433aSmrg      fi
4467d656433aSmrg      ;;
4468126a8a12Smrg
4469d656433aSmrg    solaris*)
4470d656433aSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4471d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4472d656433aSmrg	cat <<_LT_EOF 1>&2
4473126a8a12Smrg
4474d656433aSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4475d656433aSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
4476d656433aSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4477d656433aSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4478d656433aSmrg*** your PATH or compiler configuration so that the native linker is
4479d656433aSmrg*** used, and then restart.
4480126a8a12Smrg
4481d656433aSmrg_LT_EOF
4482d656433aSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4483d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4484d656433aSmrg	_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'
4485d656433aSmrg      else
4486d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4487d656433aSmrg      fi
4488d656433aSmrg      ;;
4489126a8a12Smrg
4490d656433aSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4491d656433aSmrg      case `$LD -v 2>&1` in
4492d656433aSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4493d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4494d656433aSmrg	cat <<_LT_EOF 1>&2
4495126a8a12Smrg
4496d656433aSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4497d656433aSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4498d656433aSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4499d656433aSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4500d656433aSmrg*** your PATH or compiler configuration so that the native linker is
4501d656433aSmrg*** used, and then restart.
4502126a8a12Smrg
4503d656433aSmrg_LT_EOF
4504d656433aSmrg	;;
4505d656433aSmrg	*)
4506d656433aSmrg	  # For security reasons, it is highly recommended that you always
4507d656433aSmrg	  # use absolute paths for naming shared libraries, and exclude the
4508d656433aSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4509d656433aSmrg	  # requires that you compile everything twice, which is a pain.
4510d656433aSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4511d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4512d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4513d656433aSmrg	    _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'
4514d656433aSmrg	  else
4515d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4516d656433aSmrg	  fi
4517d656433aSmrg	;;
4518d656433aSmrg      esac
4519d656433aSmrg      ;;
4520126a8a12Smrg
4521d656433aSmrg    sunos4*)
4522d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4523d656433aSmrg      wlarc=
4524d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4525d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4526d656433aSmrg      ;;
4527126a8a12Smrg
4528d656433aSmrg    *)
4529d656433aSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4530d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4531d656433aSmrg	_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'
4532d656433aSmrg      else
4533d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4534d656433aSmrg      fi
4535d656433aSmrg      ;;
4536d656433aSmrg    esac
4537126a8a12Smrg
4538d656433aSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4539d656433aSmrg      runpath_var=
4540d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4541d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4542d656433aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4543d656433aSmrg    fi
4544d656433aSmrg  else
4545d656433aSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
4546d656433aSmrg    case $host_os in
4547d656433aSmrg    aix3*)
4548d656433aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4549d656433aSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4550d656433aSmrg      _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'
4551d656433aSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
4552d656433aSmrg      # are no directories specified by -L.
4553d656433aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4554d656433aSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4555d656433aSmrg	# Neither direct hardcoding nor static linking is supported with a
4556d656433aSmrg	# broken collect2.
4557d656433aSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4558d656433aSmrg      fi
4559d656433aSmrg      ;;
4560126a8a12Smrg
4561d656433aSmrg    aix[[4-9]]*)
4562d656433aSmrg      if test "$host_cpu" = ia64; then
4563d656433aSmrg	# On IA64, the linker does run time linking by default, so we don't
4564d656433aSmrg	# have to do anything special.
4565d656433aSmrg	aix_use_runtimelinking=no
4566d656433aSmrg	exp_sym_flag='-Bexport'
4567d656433aSmrg	no_entry_flag=""
4568d656433aSmrg      else
4569d656433aSmrg	# If we're using GNU nm, then we don't want the "-C" option.
4570d656433aSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4571d656433aSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4572d656433aSmrg	  _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'
4573d656433aSmrg	else
4574d656433aSmrg	  _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'
4575d656433aSmrg	fi
4576d656433aSmrg	aix_use_runtimelinking=no
4577126a8a12Smrg
4578d656433aSmrg	# Test if we are trying to use run time linking or normal
4579d656433aSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4580d656433aSmrg	# need to do runtime linking.
4581d656433aSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4582d656433aSmrg	  for ld_flag in $LDFLAGS; do
4583d656433aSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4584d656433aSmrg	    aix_use_runtimelinking=yes
4585d656433aSmrg	    break
4586d656433aSmrg	  fi
4587d656433aSmrg	  done
4588d656433aSmrg	  ;;
4589d656433aSmrg	esac
4590126a8a12Smrg
4591d656433aSmrg	exp_sym_flag='-bexport'
4592d656433aSmrg	no_entry_flag='-bnoentry'
4593d656433aSmrg      fi
4594126a8a12Smrg
4595d656433aSmrg      # When large executables or shared objects are built, AIX ld can
4596d656433aSmrg      # have problems creating the table of contents.  If linking a library
4597d656433aSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
4598d656433aSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4599d656433aSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4600126a8a12Smrg
4601d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)=''
4602d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4603d656433aSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4604d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4605d656433aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4606d656433aSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4607126a8a12Smrg
4608d656433aSmrg      if test "$GCC" = yes; then
4609d656433aSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4610d656433aSmrg	# We only want to do this on AIX 4.2 and lower, the check
4611d656433aSmrg	# below for broken collect2 doesn't work under 4.3+
4612d656433aSmrg	  collect2name=`${CC} -print-prog-name=collect2`
4613d656433aSmrg	  if test -f "$collect2name" &&
4614d656433aSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4615d656433aSmrg	  then
4616d656433aSmrg	  # We have reworked collect2
4617d656433aSmrg	  :
4618d656433aSmrg	  else
4619d656433aSmrg	  # We have old collect2
4620d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4621d656433aSmrg	  # It fails to find uninstalled libraries when the uninstalled
4622d656433aSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4623d656433aSmrg	  # to unsupported forces relinking
4624d656433aSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4625d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4626d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4627d656433aSmrg	  fi
4628d656433aSmrg	  ;;
4629d656433aSmrg	esac
4630d656433aSmrg	shared_flag='-shared'
4631d656433aSmrg	if test "$aix_use_runtimelinking" = yes; then
4632d656433aSmrg	  shared_flag="$shared_flag "'${wl}-G'
4633d656433aSmrg	fi
4634d656433aSmrg      else
4635d656433aSmrg	# not using gcc
4636d656433aSmrg	if test "$host_cpu" = ia64; then
4637d656433aSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4638d656433aSmrg	# chokes on -Wl,-G. The following line is correct:
4639d656433aSmrg	  shared_flag='-G'
4640d656433aSmrg	else
4641d656433aSmrg	  if test "$aix_use_runtimelinking" = yes; then
4642d656433aSmrg	    shared_flag='${wl}-G'
4643d656433aSmrg	  else
4644d656433aSmrg	    shared_flag='${wl}-bM:SRE'
4645d656433aSmrg	  fi
4646d656433aSmrg	fi
4647d656433aSmrg      fi
4648126a8a12Smrg
4649d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4650d656433aSmrg      # It seems that -bexpall does not export symbols beginning with
4651d656433aSmrg      # underscore (_), so it is better to generate a list of symbols to export.
4652d656433aSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4653d656433aSmrg      if test "$aix_use_runtimelinking" = yes; then
4654d656433aSmrg	# Warning - without using the other runtime loading flags (-brtl),
4655d656433aSmrg	# -berok will link without error, but may produce a broken library.
4656d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4657d656433aSmrg        # Determine the default libpath from the value encoded in an
4658d656433aSmrg        # empty executable.
4659d656433aSmrg        _LT_SYS_MODULE_PATH_AIX
4660d656433aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4661d656433aSmrg        _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"
4662d656433aSmrg      else
4663d656433aSmrg	if test "$host_cpu" = ia64; then
4664d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4665d656433aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4666d656433aSmrg	  _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"
4667d656433aSmrg	else
4668d656433aSmrg	 # Determine the default libpath from the value encoded in an
4669d656433aSmrg	 # empty executable.
4670d656433aSmrg	 _LT_SYS_MODULE_PATH_AIX
4671d656433aSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4672d656433aSmrg	  # Warning - without using the other run time loading flags,
4673d656433aSmrg	  # -berok will link without error, but may produce a broken library.
4674d656433aSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4675d656433aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4676d656433aSmrg	  # Exported symbols can be pulled into shared objects from archives
4677d656433aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4678d656433aSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4679d656433aSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
4680d656433aSmrg	  _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'
4681d656433aSmrg	fi
4682d656433aSmrg      fi
4683d656433aSmrg      ;;
4684126a8a12Smrg
4685d656433aSmrg    amigaos*)
4686d656433aSmrg      case $host_cpu in
4687d656433aSmrg      powerpc)
4688d656433aSmrg            # see comment about AmigaOS4 .so support
4689d656433aSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4690d656433aSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4691d656433aSmrg        ;;
4692d656433aSmrg      m68k)
4693d656433aSmrg            _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)'
4694d656433aSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4695d656433aSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4696d656433aSmrg        ;;
4697d656433aSmrg      esac
4698d656433aSmrg      ;;
4699126a8a12Smrg
4700d656433aSmrg    bsdi[[45]]*)
4701d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4702d656433aSmrg      ;;
4703126a8a12Smrg
4704d656433aSmrg    cygwin* | mingw* | pw32* | cegcc*)
4705d656433aSmrg      # When not using gcc, we currently assume that we are using
4706d656433aSmrg      # Microsoft Visual C++.
4707d656433aSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4708d656433aSmrg      # no search path for DLLs.
4709d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4710d656433aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4711d656433aSmrg      # Tell ltmain to make .lib files, not .a files.
4712d656433aSmrg      libext=lib
4713d656433aSmrg      # Tell ltmain to make .dll files, not .so files.
4714d656433aSmrg      shrext_cmds=".dll"
4715d656433aSmrg      # FIXME: Setting linknames here is a bad hack.
4716d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4717d656433aSmrg      # The linker will automatically build a .lib file if we build a DLL.
4718d656433aSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4719d656433aSmrg      # FIXME: Should let the user specify the lib program.
4720d656433aSmrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4721d656433aSmrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4722d656433aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4723d656433aSmrg      ;;
4724126a8a12Smrg
4725d656433aSmrg    darwin* | rhapsody*)
4726d656433aSmrg      _LT_DARWIN_LINKER_FEATURES($1)
4727d656433aSmrg      ;;
4728126a8a12Smrg
4729d656433aSmrg    dgux*)
4730d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4731d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4732d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4733d656433aSmrg      ;;
4734126a8a12Smrg
4735d656433aSmrg    freebsd1*)
4736d656433aSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
4737d656433aSmrg      ;;
4738126a8a12Smrg
4739d656433aSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4740d656433aSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4741d656433aSmrg    # does not break anything, and helps significantly (at the cost of a little
4742d656433aSmrg    # extra space).
4743d656433aSmrg    freebsd2.2*)
4744d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4745d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4746d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4747d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4748d656433aSmrg      ;;
4749126a8a12Smrg
4750d656433aSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4751d656433aSmrg    freebsd2*)
4752d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4753d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4754d656433aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4755d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4756d656433aSmrg      ;;
4757126a8a12Smrg
4758d656433aSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4759d656433aSmrg    freebsd* | dragonfly*)
4760d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4761d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4762d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4763d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4764d656433aSmrg      ;;
4765126a8a12Smrg
4766d656433aSmrg    hpux9*)
4767d656433aSmrg      if test "$GCC" = yes; then
4768d656433aSmrg	_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'
4769d656433aSmrg      else
4770d656433aSmrg	_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'
4771d656433aSmrg      fi
4772d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4773d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4774d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4775126a8a12Smrg
4776d656433aSmrg      # hardcode_minus_L: Not really in the search PATH,
4777d656433aSmrg      # but as the default location of the library.
4778d656433aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4779d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4780d656433aSmrg      ;;
4781126a8a12Smrg
4782d656433aSmrg    hpux10*)
4783d656433aSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4784d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4785d656433aSmrg      else
4786d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4787d656433aSmrg      fi
4788d656433aSmrg      if test "$with_gnu_ld" = no; then
4789d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4790d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4791d656433aSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4792d656433aSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4793d656433aSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4794d656433aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4795d656433aSmrg	# hardcode_minus_L: Not really in the search PATH,
4796d656433aSmrg	# but as the default location of the library.
4797d656433aSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4798d656433aSmrg      fi
4799d656433aSmrg      ;;
4800126a8a12Smrg
4801d656433aSmrg    hpux11*)
4802d656433aSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4803d656433aSmrg	case $host_cpu in
4804d656433aSmrg	hppa*64*)
4805d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4806d656433aSmrg	  ;;
4807d656433aSmrg	ia64*)
4808d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4809d656433aSmrg	  ;;
4810d656433aSmrg	*)
4811d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4812d656433aSmrg	  ;;
4813d656433aSmrg	esac
4814d656433aSmrg      else
4815d656433aSmrg	case $host_cpu in
4816d656433aSmrg	hppa*64*)
4817d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4818d656433aSmrg	  ;;
4819d656433aSmrg	ia64*)
4820d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4821d656433aSmrg	  ;;
4822d656433aSmrg	*)
4823d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4824d656433aSmrg	  ;;
4825d656433aSmrg	esac
4826d656433aSmrg      fi
4827d656433aSmrg      if test "$with_gnu_ld" = no; then
4828d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4829d656433aSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4830126a8a12Smrg
4831d656433aSmrg	case $host_cpu in
4832d656433aSmrg	hppa*64*|ia64*)
4833d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4834d656433aSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4835d656433aSmrg	  ;;
4836d656433aSmrg	*)
4837d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4838d656433aSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4839d656433aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4840126a8a12Smrg
4841d656433aSmrg	  # hardcode_minus_L: Not really in the search PATH,
4842d656433aSmrg	  # but as the default location of the library.
4843d656433aSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4844d656433aSmrg	  ;;
4845d656433aSmrg	esac
4846d656433aSmrg      fi
4847d656433aSmrg      ;;
4848126a8a12Smrg
4849d656433aSmrg    irix5* | irix6* | nonstopux*)
4850d656433aSmrg      if test "$GCC" = yes; then
4851d656433aSmrg	_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'
4852d656433aSmrg	# Try to use the -exported_symbol ld option, if it does not
4853d656433aSmrg	# work, assume that -exports_file does not work either and
4854d656433aSmrg	# implicitly export all symbols.
4855d656433aSmrg        save_LDFLAGS="$LDFLAGS"
4856d656433aSmrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4857d656433aSmrg        AC_LINK_IFELSE(int foo(void) {},
4858d656433aSmrg          _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'
4859d656433aSmrg        )
4860d656433aSmrg        LDFLAGS="$save_LDFLAGS"
4861d656433aSmrg      else
4862d656433aSmrg	_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'
4863d656433aSmrg	_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'
4864d656433aSmrg      fi
4865d656433aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4866d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4867d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4868d656433aSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4869d656433aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4870d656433aSmrg      ;;
4871126a8a12Smrg
4872d656433aSmrg    netbsd*)
4873d656433aSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4874d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4875d656433aSmrg      else
4876d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4877d656433aSmrg      fi
4878d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4879d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4880d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4881d656433aSmrg      ;;
4882126a8a12Smrg
4883d656433aSmrg    newsos6)
4884d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4885d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4886d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4887d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4888d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4889d656433aSmrg      ;;
4890126a8a12Smrg
4891d656433aSmrg    *nto* | *qnx*)
4892d656433aSmrg      ;;
4893126a8a12Smrg
4894d656433aSmrg    openbsd*)
4895d656433aSmrg      if test -f /usr/libexec/ld.so; then
4896d656433aSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4897d656433aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4898d656433aSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4899d656433aSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4900d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4901d656433aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4902d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4903d656433aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4904d656433aSmrg	else
4905d656433aSmrg	  case $host_os in
4906d656433aSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4907d656433aSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4908d656433aSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4909d656433aSmrg	     ;;
4910d656433aSmrg	   *)
4911d656433aSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4912d656433aSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4913d656433aSmrg	     ;;
4914d656433aSmrg	  esac
4915d656433aSmrg	fi
4916d656433aSmrg      else
4917d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4918d656433aSmrg      fi
4919d656433aSmrg      ;;
4920126a8a12Smrg
4921d656433aSmrg    os2*)
4922d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4923d656433aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4924d656433aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4925d656433aSmrg      _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'
4926d656433aSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4927d656433aSmrg      ;;
4928126a8a12Smrg
4929d656433aSmrg    osf3*)
4930d656433aSmrg      if test "$GCC" = yes; then
4931d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4932d656433aSmrg	_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'
4933d656433aSmrg      else
4934d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4935d656433aSmrg	_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'
4936d656433aSmrg      fi
4937d656433aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4938d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4939d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4940d656433aSmrg      ;;
4941126a8a12Smrg
4942d656433aSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4943d656433aSmrg      if test "$GCC" = yes; then
4944d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4945d656433aSmrg	_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'
4946d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4947d656433aSmrg      else
4948d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4949d656433aSmrg	_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'
4950d656433aSmrg	_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~
4951d656433aSmrg	$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'
4952126a8a12Smrg
4953d656433aSmrg	# Both c and cxx compiler support -rpath directly
4954d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4955d656433aSmrg      fi
4956d656433aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4957d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4958d656433aSmrg      ;;
4959126a8a12Smrg
4960d656433aSmrg    solaris*)
4961d656433aSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4962d656433aSmrg      if test "$GCC" = yes; then
4963d656433aSmrg	wlarc='${wl}'
4964d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4965d656433aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4966d656433aSmrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4967d656433aSmrg      else
4968d656433aSmrg	case `$CC -V 2>&1` in
4969d656433aSmrg	*"Compilers 5.0"*)
4970d656433aSmrg	  wlarc=''
4971d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4972d656433aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4973d656433aSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4974d656433aSmrg	  ;;
4975d656433aSmrg	*)
4976d656433aSmrg	  wlarc='${wl}'
4977d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4978d656433aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4979d656433aSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4980d656433aSmrg	  ;;
4981d656433aSmrg	esac
4982d656433aSmrg      fi
4983d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4984d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4985d656433aSmrg      case $host_os in
4986d656433aSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4987d656433aSmrg      *)
4988d656433aSmrg	# The compiler driver will combine and reorder linker options,
4989d656433aSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4990d656433aSmrg	# but is careful enough not to reorder.
4991d656433aSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4992d656433aSmrg	if test "$GCC" = yes; then
4993d656433aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4994d656433aSmrg	else
4995d656433aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4996d656433aSmrg	fi
4997d656433aSmrg	;;
4998d656433aSmrg      esac
4999d656433aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5000d656433aSmrg      ;;
5001126a8a12Smrg
5002d656433aSmrg    sunos4*)
5003d656433aSmrg      if test "x$host_vendor" = xsequent; then
5004d656433aSmrg	# Use $CC to link under sequent, because it throws in some extra .o
5005d656433aSmrg	# files that make .init and .fini sections work.
5006d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5007d656433aSmrg      else
5008d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5009d656433aSmrg      fi
5010d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5011d656433aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5012d656433aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5013d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5014d656433aSmrg      ;;
5015126a8a12Smrg
5016d656433aSmrg    sysv4)
5017d656433aSmrg      case $host_vendor in
5018d656433aSmrg	sni)
5019d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5020d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5021d656433aSmrg	;;
5022d656433aSmrg	siemens)
5023d656433aSmrg	  ## LD is ld it makes a PLAMLIB
5024d656433aSmrg	  ## CC just makes a GrossModule.
5025d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5026d656433aSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5027d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5028d656433aSmrg        ;;
5029d656433aSmrg	motorola)
5030d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5031d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5032d656433aSmrg	;;
5033d656433aSmrg      esac
5034d656433aSmrg      runpath_var='LD_RUN_PATH'
5035d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5036d656433aSmrg      ;;
5037126a8a12Smrg
5038d656433aSmrg    sysv4.3*)
5039d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5040d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5041d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5042d656433aSmrg      ;;
5043126a8a12Smrg
5044d656433aSmrg    sysv4*MP*)
5045d656433aSmrg      if test -d /usr/nec; then
5046d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5047d656433aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5048d656433aSmrg	runpath_var=LD_RUN_PATH
5049d656433aSmrg	hardcode_runpath_var=yes
5050d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5051d656433aSmrg      fi
5052d656433aSmrg      ;;
5053126a8a12Smrg
5054d656433aSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5055d656433aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5056d656433aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5057d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5058d656433aSmrg      runpath_var='LD_RUN_PATH'
5059126a8a12Smrg
5060d656433aSmrg      if test "$GCC" = yes; then
5061d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5062d656433aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5063d656433aSmrg      else
5064d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5065d656433aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5066d656433aSmrg      fi
5067d656433aSmrg      ;;
5068126a8a12Smrg
5069d656433aSmrg    sysv5* | sco3.2v5* | sco5v6*)
5070d656433aSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
5071d656433aSmrg      # link with -lc, and that would cause any symbols used from libc to
5072d656433aSmrg      # always be unresolved, which means just about no library would
5073d656433aSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
5074d656433aSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
5075d656433aSmrg      # as -z defs.
5076d656433aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5077d656433aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5078d656433aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5079d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5080d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5081d656433aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5082d656433aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5083d656433aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5084d656433aSmrg      runpath_var='LD_RUN_PATH'
5085126a8a12Smrg
5086d656433aSmrg      if test "$GCC" = yes; then
5087d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5088d656433aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5089d656433aSmrg      else
5090d656433aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5091d656433aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5092d656433aSmrg      fi
5093d656433aSmrg      ;;
5094126a8a12Smrg
5095d656433aSmrg    uts4*)
5096d656433aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5097d656433aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5098d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5099d656433aSmrg      ;;
5100126a8a12Smrg
5101d656433aSmrg    *)
5102d656433aSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
5103d656433aSmrg      ;;
5104d656433aSmrg    esac
5105126a8a12Smrg
5106d656433aSmrg    if test x$host_vendor = xsni; then
5107d656433aSmrg      case $host in
5108d656433aSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5109d656433aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5110d656433aSmrg	;;
5111d656433aSmrg      esac
5112d656433aSmrg    fi
5113d656433aSmrg  fi
5114d656433aSmrg])
5115d656433aSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5116d656433aSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5117126a8a12Smrg
5118d656433aSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5119126a8a12Smrg
5120d656433aSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5121d656433aSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5122d656433aSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
5123d656433aSmrg    [The commands to extract the exported symbol list from a shared archive])
5124126a8a12Smrg
5125d656433aSmrg#
5126d656433aSmrg# Do we need to explicitly link libc?
5127d656433aSmrg#
5128d656433aSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5129d656433aSmrgx|xyes)
5130d656433aSmrg  # Assume -lc should be added
5131d656433aSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5132126a8a12Smrg
5133d656433aSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5134d656433aSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
5135d656433aSmrg    *'~'*)
5136d656433aSmrg      # FIXME: we may have to deal with multi-command sequences.
5137d656433aSmrg      ;;
5138d656433aSmrg    '$CC '*)
5139d656433aSmrg      # Test whether the compiler implicitly links with -lc since on some
5140d656433aSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5141d656433aSmrg      # to ld, don't add -lc before -lgcc.
5142d656433aSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5143d656433aSmrg      $RM conftest*
5144d656433aSmrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5145126a8a12Smrg
5146d656433aSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5147d656433aSmrg        soname=conftest
5148d656433aSmrg        lib=conftest
5149d656433aSmrg        libobjs=conftest.$ac_objext
5150d656433aSmrg        deplibs=
5151d656433aSmrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5152d656433aSmrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5153d656433aSmrg        compiler_flags=-v
5154d656433aSmrg        linker_flags=-v
5155d656433aSmrg        verstring=
5156d656433aSmrg        output_objdir=.
5157d656433aSmrg        libname=conftest
5158d656433aSmrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5159d656433aSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5160d656433aSmrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5161d656433aSmrg        then
5162d656433aSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5163d656433aSmrg        else
5164d656433aSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5165d656433aSmrg        fi
5166d656433aSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5167d656433aSmrg      else
5168d656433aSmrg        cat conftest.err 1>&5
5169d656433aSmrg      fi
5170d656433aSmrg      $RM conftest*
5171d656433aSmrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5172d656433aSmrg      ;;
5173d656433aSmrg    esac
5174d656433aSmrg  fi
5175d656433aSmrg  ;;
5176d656433aSmrgesac
5177126a8a12Smrg
5178d656433aSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5179d656433aSmrg    [Whether or not to add -lc for building shared libraries])
5180d656433aSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5181d656433aSmrg    [enable_shared_with_static_runtimes], [0],
5182d656433aSmrg    [Whether or not to disallow shared libs when runtime libs are static])
5183d656433aSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5184d656433aSmrg    [Compiler flag to allow reflexive dlopens])
5185d656433aSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5186d656433aSmrg    [Compiler flag to generate shared objects directly from archives])
5187d656433aSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
5188d656433aSmrg    [Whether the compiler copes with passing no objects directly])
5189d656433aSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5190d656433aSmrg    [Create an old-style archive from a shared archive])
5191d656433aSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5192d656433aSmrg    [Create a temporary old-style archive to link instead of a shared archive])
5193d656433aSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5194d656433aSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5195d656433aSmrg_LT_TAGDECL([], [module_cmds], [2],
5196d656433aSmrg    [Commands used to build a loadable module if different from building
5197d656433aSmrg    a shared archive.])
5198d656433aSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5199d656433aSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
5200d656433aSmrg    [Whether we are building with GNU ld or not])
5201d656433aSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5202d656433aSmrg    [Flag that allows shared libraries with undefined symbols to be built])
5203d656433aSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
5204d656433aSmrg    [Flag that enforces no undefined symbols])
5205d656433aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5206d656433aSmrg    [Flag to hardcode $libdir into a binary during linking.
5207d656433aSmrg    This must work even if $libdir does not exist])
5208d656433aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5209d656433aSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5210d656433aSmrg    during linking.  This must work even if $libdir does not exist]])
5211d656433aSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5212d656433aSmrg    [Whether we need a single "-rpath" flag with a separated argument])
5213d656433aSmrg_LT_TAGDECL([], [hardcode_direct], [0],
5214d656433aSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5215d656433aSmrg    DIR into the resulting binary])
5216d656433aSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5217d656433aSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5218d656433aSmrg    DIR into the resulting binary and the resulting library dependency is
5219d656433aSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5220d656433aSmrg    library is relocated])
5221d656433aSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5222d656433aSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5223d656433aSmrg    into the resulting binary])
5224d656433aSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5225d656433aSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5226d656433aSmrg    into the resulting binary])
5227d656433aSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
5228d656433aSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5229d656433aSmrg    into the library and all subsequent libraries and executables linked
5230d656433aSmrg    against it])
5231d656433aSmrg_LT_TAGDECL([], [inherit_rpath], [0],
5232d656433aSmrg    [Set to yes if linker adds runtime paths of dependent libraries
5233d656433aSmrg    to runtime path list])
5234d656433aSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
5235d656433aSmrg    [Whether libtool must link a program against all its dependency libraries])
5236d656433aSmrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5237d656433aSmrg    [Fix the shell variable $srcfile for the compiler])
5238d656433aSmrg_LT_TAGDECL([], [always_export_symbols], [0],
5239d656433aSmrg    [Set to "yes" if exported symbols are required])
5240d656433aSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5241d656433aSmrg    [The commands to list exported symbols])
5242d656433aSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
5243d656433aSmrg    [Symbols that should not be listed in the preloaded symbols])
5244d656433aSmrg_LT_TAGDECL([], [include_expsyms], [1],
5245d656433aSmrg    [Symbols that must always be exported])
5246d656433aSmrg_LT_TAGDECL([], [prelink_cmds], [2],
5247d656433aSmrg    [Commands necessary for linking programs (against libraries) with templates])
5248d656433aSmrg_LT_TAGDECL([], [file_list_spec], [1],
5249d656433aSmrg    [Specify filename containing input files])
5250d656433aSmrgdnl FIXME: Not yet implemented
5251d656433aSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5252d656433aSmrgdnl    [Compiler flag to generate thread safe objects])
5253d656433aSmrg])# _LT_LINKER_SHLIBS
5254d656433aSmrg
5255d656433aSmrg
5256d656433aSmrg# _LT_LANG_C_CONFIG([TAG])
5257d656433aSmrg# ------------------------
5258d656433aSmrg# Ensure that the configuration variables for a C compiler are suitably
5259d656433aSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5260d656433aSmrg# the compiler configuration to `libtool'.
5261d656433aSmrgm4_defun([_LT_LANG_C_CONFIG],
5262d656433aSmrg[m4_require([_LT_DECL_EGREP])dnl
5263d656433aSmrglt_save_CC="$CC"
5264d656433aSmrgAC_LANG_PUSH(C)
5265126a8a12Smrg
5266d656433aSmrg# Source file extension for C test sources.
5267d656433aSmrgac_ext=c
5268126a8a12Smrg
5269d656433aSmrg# Object file extension for compiled C test sources.
5270d656433aSmrgobjext=o
5271d656433aSmrg_LT_TAGVAR(objext, $1)=$objext
5272126a8a12Smrg
5273d656433aSmrg# Code to be used in simple compile tests
5274d656433aSmrglt_simple_compile_test_code="int some_variable = 0;"
5275126a8a12Smrg
5276d656433aSmrg# Code to be used in simple link tests
5277d656433aSmrglt_simple_link_test_code='int main(){return(0);}'
5278126a8a12Smrg
5279d656433aSmrg_LT_TAG_COMPILER
5280d656433aSmrg# Save the default compiler, since it gets overwritten when the other
5281d656433aSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5282d656433aSmrgcompiler_DEFAULT=$CC
5283126a8a12Smrg
5284d656433aSmrg# save warnings/boilerplate of simple test code
5285d656433aSmrg_LT_COMPILER_BOILERPLATE
5286d656433aSmrg_LT_LINKER_BOILERPLATE
5287126a8a12Smrg
5288d656433aSmrgif test -n "$compiler"; then
5289d656433aSmrg  _LT_COMPILER_NO_RTTI($1)
5290d656433aSmrg  _LT_COMPILER_PIC($1)
5291d656433aSmrg  _LT_COMPILER_C_O($1)
5292d656433aSmrg  _LT_COMPILER_FILE_LOCKS($1)
5293d656433aSmrg  _LT_LINKER_SHLIBS($1)
5294d656433aSmrg  _LT_SYS_DYNAMIC_LINKER($1)
5295d656433aSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5296d656433aSmrg  LT_SYS_DLOPEN_SELF
5297d656433aSmrg  _LT_CMD_STRIPLIB
5298d656433aSmrg
5299d656433aSmrg  # Report which library types will actually be built
5300d656433aSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5301d656433aSmrg  AC_MSG_RESULT([$can_build_shared])
5302d656433aSmrg
5303d656433aSmrg  AC_MSG_CHECKING([whether to build shared libraries])
5304d656433aSmrg  test "$can_build_shared" = "no" && enable_shared=no
5305d656433aSmrg
5306d656433aSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
5307d656433aSmrg  # are all built from PIC.
5308d656433aSmrg  case $host_os in
5309d656433aSmrg  aix3*)
5310d656433aSmrg    test "$enable_shared" = yes && enable_static=no
5311d656433aSmrg    if test -n "$RANLIB"; then
5312d656433aSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5313d656433aSmrg      postinstall_cmds='$RANLIB $lib'
5314d656433aSmrg    fi
5315d656433aSmrg    ;;
5316126a8a12Smrg
5317d656433aSmrg  aix[[4-9]]*)
5318d656433aSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5319d656433aSmrg      test "$enable_shared" = yes && enable_static=no
5320d656433aSmrg    fi
5321d656433aSmrg    ;;
5322d656433aSmrg  esac
5323d656433aSmrg  AC_MSG_RESULT([$enable_shared])
5324d656433aSmrg
5325d656433aSmrg  AC_MSG_CHECKING([whether to build static libraries])
5326d656433aSmrg  # Make sure either enable_shared or enable_static is yes.
5327d656433aSmrg  test "$enable_shared" = yes || enable_static=yes
5328d656433aSmrg  AC_MSG_RESULT([$enable_static])
5329d656433aSmrg
5330d656433aSmrg  _LT_CONFIG($1)
5331126a8a12Smrgfi
5332d656433aSmrgAC_LANG_POP
5333d656433aSmrgCC="$lt_save_CC"
5334d656433aSmrg])# _LT_LANG_C_CONFIG
5335126a8a12Smrg
5336126a8a12Smrg
5337d656433aSmrg# _LT_PROG_CXX
5338d656433aSmrg# ------------
5339d656433aSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5340d656433aSmrg# compiler, we have our own version here.
5341d656433aSmrgm4_defun([_LT_PROG_CXX],
5342126a8a12Smrg[
5343d656433aSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5344d656433aSmrgAC_PROG_CXX
5345d656433aSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5346d656433aSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5347d656433aSmrg    (test "X$CXX" != "Xg++"))) ; then
5348d656433aSmrg  AC_PROG_CXXCPP
5349d656433aSmrgelse
5350d656433aSmrg  _lt_caught_CXX_error=yes
5351d656433aSmrgfi
5352d656433aSmrgpopdef([AC_MSG_ERROR])
5353d656433aSmrg])# _LT_PROG_CXX
5354126a8a12Smrg
5355d656433aSmrgdnl aclocal-1.4 backwards compatibility:
5356d656433aSmrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5357126a8a12Smrg
5358126a8a12Smrg
5359d656433aSmrg# _LT_LANG_CXX_CONFIG([TAG])
5360d656433aSmrg# --------------------------
5361d656433aSmrg# Ensure that the configuration variables for a C++ compiler are suitably
5362d656433aSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5363d656433aSmrg# the compiler configuration to `libtool'.
5364d656433aSmrgm4_defun([_LT_LANG_CXX_CONFIG],
5365d656433aSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5366d656433aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5367d656433aSmrgm4_require([_LT_DECL_EGREP])dnl
5368d656433aSmrg
5369d656433aSmrgAC_LANG_PUSH(C++)
5370d656433aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5371d656433aSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
5372d656433aSmrg_LT_TAGVAR(always_export_symbols, $1)=no
5373d656433aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5374d656433aSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
5375d656433aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5376d656433aSmrg_LT_TAGVAR(hardcode_direct, $1)=no
5377d656433aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5378d656433aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5379d656433aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5380d656433aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5381d656433aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5382d656433aSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5383d656433aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
5384d656433aSmrg_LT_TAGVAR(inherit_rpath, $1)=no
5385d656433aSmrg_LT_TAGVAR(module_cmds, $1)=
5386d656433aSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
5387d656433aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5388d656433aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5389d656433aSmrg_LT_TAGVAR(no_undefined_flag, $1)=
5390d656433aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5391d656433aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5392126a8a12Smrg
5393d656433aSmrg# Source file extension for C++ test sources.
5394d656433aSmrgac_ext=cpp
5395126a8a12Smrg
5396d656433aSmrg# Object file extension for compiled C++ test sources.
5397d656433aSmrgobjext=o
5398d656433aSmrg_LT_TAGVAR(objext, $1)=$objext
5399d656433aSmrg
5400d656433aSmrg# No sense in running all these tests if we already determined that
5401d656433aSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5402d656433aSmrg# are currently assumed to apply to all compilers on this platform,
5403d656433aSmrg# and will be corrupted by setting them based on a non-working compiler.
5404d656433aSmrgif test "$_lt_caught_CXX_error" != yes; then
5405d656433aSmrg  # Code to be used in simple compile tests
5406d656433aSmrg  lt_simple_compile_test_code="int some_variable = 0;"
5407d656433aSmrg
5408d656433aSmrg  # Code to be used in simple link tests
5409d656433aSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5410d656433aSmrg
5411d656433aSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5412d656433aSmrg  _LT_TAG_COMPILER
5413d656433aSmrg
5414d656433aSmrg  # save warnings/boilerplate of simple test code
5415d656433aSmrg  _LT_COMPILER_BOILERPLATE
5416d656433aSmrg  _LT_LINKER_BOILERPLATE
5417d656433aSmrg
5418d656433aSmrg  # Allow CC to be a program name with arguments.
5419d656433aSmrg  lt_save_CC=$CC
5420d656433aSmrg  lt_save_LD=$LD
5421d656433aSmrg  lt_save_GCC=$GCC
5422d656433aSmrg  GCC=$GXX
5423d656433aSmrg  lt_save_with_gnu_ld=$with_gnu_ld
5424d656433aSmrg  lt_save_path_LD=$lt_cv_path_LD
5425d656433aSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5426d656433aSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5427d656433aSmrg  else
5428d656433aSmrg    $as_unset lt_cv_prog_gnu_ld
5429126a8a12Smrg  fi
5430d656433aSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5431d656433aSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5432d656433aSmrg  else
5433d656433aSmrg    $as_unset lt_cv_path_LD
5434126a8a12Smrg  fi
5435d656433aSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
5436d656433aSmrg  CC=${CXX-"c++"}
5437d656433aSmrg  compiler=$CC
5438d656433aSmrg  _LT_TAGVAR(compiler, $1)=$CC
5439d656433aSmrg  _LT_CC_BASENAME([$compiler])
5440126a8a12Smrg
5441d656433aSmrg  if test -n "$compiler"; then
5442d656433aSmrg    # We don't want -fno-exception when compiling C++ code, so set the
5443d656433aSmrg    # no_builtin_flag separately
5444d656433aSmrg    if test "$GXX" = yes; then
5445d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5446d656433aSmrg    else
5447d656433aSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5448d656433aSmrg    fi
5449126a8a12Smrg
5450d656433aSmrg    if test "$GXX" = yes; then
5451d656433aSmrg      # Set up default GNU C++ configuration
5452126a8a12Smrg
5453d656433aSmrg      LT_PATH_LD
5454126a8a12Smrg
5455d656433aSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5456d656433aSmrg      # archiving commands below assume that GNU ld is being used.
5457d656433aSmrg      if test "$with_gnu_ld" = yes; then
5458d656433aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5459d656433aSmrg        _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'
5460126a8a12Smrg
5461d656433aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5462d656433aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5463126a8a12Smrg
5464d656433aSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5465d656433aSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5466d656433aSmrg        #     investigate it a little bit more. (MM)
5467d656433aSmrg        wlarc='${wl}'
5468126a8a12Smrg
5469d656433aSmrg        # ancient GNU ld didn't support --whole-archive et. al.
5470d656433aSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5471d656433aSmrg	  $GREP 'no-whole-archive' > /dev/null; then
5472d656433aSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5473d656433aSmrg        else
5474d656433aSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5475d656433aSmrg        fi
5476126a8a12Smrg      else
5477d656433aSmrg        with_gnu_ld=no
5478d656433aSmrg        wlarc=
5479d656433aSmrg
5480d656433aSmrg        # A generic and very simple default shared library creation
5481d656433aSmrg        # command for GNU C++ for the case where it uses the native
5482d656433aSmrg        # linker, instead of GNU ld.  If possible, this setting should
5483d656433aSmrg        # overridden to take advantage of the native linker features on
5484d656433aSmrg        # the platform it is being used on.
5485d656433aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5486126a8a12Smrg      fi
5487126a8a12Smrg
5488d656433aSmrg      # Commands to make compiler produce verbose output that lists
5489d656433aSmrg      # what "hidden" libraries, object files and flags are used when
5490d656433aSmrg      # linking a shared library.
5491d656433aSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5492126a8a12Smrg
5493126a8a12Smrg    else
5494d656433aSmrg      GXX=no
5495d656433aSmrg      with_gnu_ld=no
5496d656433aSmrg      wlarc=
5497126a8a12Smrg    fi
5498126a8a12Smrg
5499d656433aSmrg    # PORTME: fill in a description of your system's C++ link characteristics
5500d656433aSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5501d656433aSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5502d656433aSmrg    case $host_os in
5503d656433aSmrg      aix3*)
5504d656433aSmrg        # FIXME: insert proper C++ library support
5505d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5506d656433aSmrg        ;;
5507d656433aSmrg      aix[[4-9]]*)
5508d656433aSmrg        if test "$host_cpu" = ia64; then
5509d656433aSmrg          # On IA64, the linker does run time linking by default, so we don't
5510d656433aSmrg          # have to do anything special.
5511d656433aSmrg          aix_use_runtimelinking=no
5512d656433aSmrg          exp_sym_flag='-Bexport'
5513d656433aSmrg          no_entry_flag=""
5514d656433aSmrg        else
5515d656433aSmrg          aix_use_runtimelinking=no
5516d656433aSmrg
5517d656433aSmrg          # Test if we are trying to use run time linking or normal
5518d656433aSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5519d656433aSmrg          # need to do runtime linking.
5520d656433aSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5521d656433aSmrg	    for ld_flag in $LDFLAGS; do
5522d656433aSmrg	      case $ld_flag in
5523d656433aSmrg	      *-brtl*)
5524d656433aSmrg	        aix_use_runtimelinking=yes
5525d656433aSmrg	        break
5526d656433aSmrg	        ;;
5527d656433aSmrg	      esac
5528d656433aSmrg	    done
5529d656433aSmrg	    ;;
5530d656433aSmrg          esac
5531126a8a12Smrg
5532d656433aSmrg          exp_sym_flag='-bexport'
5533d656433aSmrg          no_entry_flag='-bnoentry'
5534d656433aSmrg        fi
5535126a8a12Smrg
5536d656433aSmrg        # When large executables or shared objects are built, AIX ld can
5537d656433aSmrg        # have problems creating the table of contents.  If linking a library
5538d656433aSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
5539d656433aSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5540d656433aSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5541d656433aSmrg
5542d656433aSmrg        _LT_TAGVAR(archive_cmds, $1)=''
5543d656433aSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5544d656433aSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5545d656433aSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5546d656433aSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5547d656433aSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5548d656433aSmrg
5549d656433aSmrg        if test "$GXX" = yes; then
5550d656433aSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5551d656433aSmrg          # We only want to do this on AIX 4.2 and lower, the check
5552d656433aSmrg          # below for broken collect2 doesn't work under 4.3+
5553d656433aSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5554d656433aSmrg	  if test -f "$collect2name" &&
5555d656433aSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5556d656433aSmrg	  then
5557d656433aSmrg	    # We have reworked collect2
5558d656433aSmrg	    :
5559d656433aSmrg	  else
5560d656433aSmrg	    # We have old collect2
5561d656433aSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5562d656433aSmrg	    # It fails to find uninstalled libraries when the uninstalled
5563d656433aSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5564d656433aSmrg	    # to unsupported forces relinking
5565d656433aSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5566d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5567d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5568d656433aSmrg	  fi
5569d656433aSmrg          esac
5570d656433aSmrg          shared_flag='-shared'
5571d656433aSmrg	  if test "$aix_use_runtimelinking" = yes; then
5572d656433aSmrg	    shared_flag="$shared_flag "'${wl}-G'
5573d656433aSmrg	  fi
5574d656433aSmrg        else
5575d656433aSmrg          # not using gcc
5576d656433aSmrg          if test "$host_cpu" = ia64; then
5577d656433aSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5578d656433aSmrg	  # chokes on -Wl,-G. The following line is correct:
5579d656433aSmrg	  shared_flag='-G'
5580d656433aSmrg          else
5581d656433aSmrg	    if test "$aix_use_runtimelinking" = yes; then
5582d656433aSmrg	      shared_flag='${wl}-G'
5583d656433aSmrg	    else
5584d656433aSmrg	      shared_flag='${wl}-bM:SRE'
5585d656433aSmrg	    fi
5586d656433aSmrg          fi
5587d656433aSmrg        fi
5588126a8a12Smrg
5589d656433aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5590d656433aSmrg        # It seems that -bexpall does not export symbols beginning with
5591d656433aSmrg        # underscore (_), so it is better to generate a list of symbols to
5592d656433aSmrg	# export.
5593d656433aSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5594d656433aSmrg        if test "$aix_use_runtimelinking" = yes; then
5595d656433aSmrg          # Warning - without using the other runtime loading flags (-brtl),
5596d656433aSmrg          # -berok will link without error, but may produce a broken library.
5597d656433aSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5598d656433aSmrg          # Determine the default libpath from the value encoded in an empty
5599d656433aSmrg          # executable.
5600d656433aSmrg          _LT_SYS_MODULE_PATH_AIX
5601d656433aSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5602d656433aSmrg
5603d656433aSmrg          _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"
5604d656433aSmrg        else
5605d656433aSmrg          if test "$host_cpu" = ia64; then
5606d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5607d656433aSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5608d656433aSmrg	    _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"
5609d656433aSmrg          else
5610d656433aSmrg	    # Determine the default libpath from the value encoded in an
5611d656433aSmrg	    # empty executable.
5612d656433aSmrg	    _LT_SYS_MODULE_PATH_AIX
5613d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5614d656433aSmrg	    # Warning - without using the other run time loading flags,
5615d656433aSmrg	    # -berok will link without error, but may produce a broken library.
5616d656433aSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5617d656433aSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5618d656433aSmrg	    # Exported symbols can be pulled into shared objects from archives
5619d656433aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5620d656433aSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5621d656433aSmrg	    # This is similar to how AIX traditionally builds its shared
5622d656433aSmrg	    # libraries.
5623d656433aSmrg	    _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'
5624d656433aSmrg          fi
5625d656433aSmrg        fi
5626d656433aSmrg        ;;
5627d656433aSmrg
5628d656433aSmrg      beos*)
5629d656433aSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5630d656433aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5631d656433aSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5632d656433aSmrg	  # support --undefined.  This deserves some investigation.  FIXME
5633d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5634126a8a12Smrg	else
5635d656433aSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5636126a8a12Smrg	fi
5637126a8a12Smrg	;;
5638d656433aSmrg
5639126a8a12Smrg      chorus*)
5640d656433aSmrg        case $cc_basename in
5641d656433aSmrg          *)
5642d656433aSmrg	  # FIXME: insert proper C++ library support
5643d656433aSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5644126a8a12Smrg	  ;;
5645d656433aSmrg        esac
5646d656433aSmrg        ;;
5647d656433aSmrg
5648d656433aSmrg      cygwin* | mingw* | pw32* | cegcc*)
5649d656433aSmrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5650d656433aSmrg        # as there is no search path for DLLs.
5651d656433aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5652d656433aSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5653d656433aSmrg        _LT_TAGVAR(always_export_symbols, $1)=no
5654d656433aSmrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5655d656433aSmrg
5656d656433aSmrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5657d656433aSmrg          _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'
5658d656433aSmrg          # If the export-symbols file already is a .def file (1st line
5659d656433aSmrg          # is EXPORTS), use it as is; otherwise, prepend...
5660d656433aSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5661d656433aSmrg	    cp $export_symbols $output_objdir/$soname.def;
5662d656433aSmrg          else
5663d656433aSmrg	    echo EXPORTS > $output_objdir/$soname.def;
5664d656433aSmrg	    cat $export_symbols >> $output_objdir/$soname.def;
5665d656433aSmrg          fi~
5666d656433aSmrg          $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'
5667d656433aSmrg        else
5668d656433aSmrg          _LT_TAGVAR(ld_shlibs, $1)=no
5669d656433aSmrg        fi
5670d656433aSmrg        ;;
5671d656433aSmrg      darwin* | rhapsody*)
5672d656433aSmrg        _LT_DARWIN_LINKER_FEATURES($1)
5673126a8a12Smrg	;;
5674d656433aSmrg
5675126a8a12Smrg      dgux*)
5676d656433aSmrg        case $cc_basename in
5677d656433aSmrg          ec++*)
5678d656433aSmrg	    # FIXME: insert proper C++ library support
5679d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5680126a8a12Smrg	    ;;
5681d656433aSmrg          ghcx*)
5682126a8a12Smrg	    # Green Hills C++ Compiler
5683d656433aSmrg	    # FIXME: insert proper C++ library support
5684d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5685126a8a12Smrg	    ;;
5686d656433aSmrg          *)
5687d656433aSmrg	    # FIXME: insert proper C++ library support
5688d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5689126a8a12Smrg	    ;;
5690d656433aSmrg        esac
5691d656433aSmrg        ;;
5692d656433aSmrg
5693d656433aSmrg      freebsd[[12]]*)
5694d656433aSmrg        # C++ shared libraries reported to be fairly broken before
5695d656433aSmrg	# switch to ELF
5696d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5697d656433aSmrg        ;;
5698d656433aSmrg
5699d656433aSmrg      freebsd-elf*)
5700d656433aSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5701d656433aSmrg        ;;
5702d656433aSmrg
5703d656433aSmrg      freebsd* | dragonfly*)
5704d656433aSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5705d656433aSmrg        # conventions
5706d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5707d656433aSmrg        ;;
5708d656433aSmrg
5709d656433aSmrg      gnu*)
5710d656433aSmrg        ;;
5711d656433aSmrg
5712d656433aSmrg      hpux9*)
5713d656433aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5714d656433aSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5715d656433aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5716d656433aSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5717d656433aSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5718d656433aSmrg				             # but as the default
5719d656433aSmrg				             # location of the library.
5720d656433aSmrg
5721d656433aSmrg        case $cc_basename in
5722d656433aSmrg          CC*)
5723d656433aSmrg            # FIXME: insert proper C++ library support
5724d656433aSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
5725d656433aSmrg            ;;
5726d656433aSmrg          aCC*)
5727d656433aSmrg            _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'
5728d656433aSmrg            # Commands to make compiler produce verbose output that lists
5729d656433aSmrg            # what "hidden" libraries, object files and flags are used when
5730d656433aSmrg            # linking a shared library.
5731d656433aSmrg            #
5732d656433aSmrg            # There doesn't appear to be a way to prevent this compiler from
5733d656433aSmrg            # explicitly linking system object files so we need to strip them
5734d656433aSmrg            # from the output so that they don't get included in the library
5735d656433aSmrg            # dependencies.
5736d656433aSmrg            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'
5737d656433aSmrg            ;;
5738d656433aSmrg          *)
5739d656433aSmrg            if test "$GXX" = yes; then
5740d656433aSmrg              _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'
5741d656433aSmrg            else
5742d656433aSmrg              # FIXME: insert proper C++ library support
5743d656433aSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
5744d656433aSmrg            fi
5745d656433aSmrg            ;;
5746d656433aSmrg        esac
5747d656433aSmrg        ;;
5748d656433aSmrg
5749d656433aSmrg      hpux10*|hpux11*)
5750d656433aSmrg        if test $with_gnu_ld = no; then
5751d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5752d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5753d656433aSmrg
5754d656433aSmrg          case $host_cpu in
5755d656433aSmrg            hppa*64*|ia64*)
5756d656433aSmrg              ;;
5757d656433aSmrg            *)
5758d656433aSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5759d656433aSmrg              ;;
5760d656433aSmrg          esac
5761d656433aSmrg        fi
5762d656433aSmrg        case $host_cpu in
5763d656433aSmrg          hppa*64*|ia64*)
5764d656433aSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
5765d656433aSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5766d656433aSmrg            ;;
5767d656433aSmrg          *)
5768d656433aSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5769d656433aSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5770d656433aSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5771d656433aSmrg					         # but as the default
5772d656433aSmrg					         # location of the library.
5773d656433aSmrg            ;;
5774d656433aSmrg        esac
5775d656433aSmrg
5776d656433aSmrg        case $cc_basename in
5777d656433aSmrg          CC*)
5778d656433aSmrg	    # FIXME: insert proper C++ library support
5779d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5780126a8a12Smrg	    ;;
5781d656433aSmrg          aCC*)
5782126a8a12Smrg	    case $host_cpu in
5783d656433aSmrg	      hppa*64*)
5784d656433aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5785d656433aSmrg	        ;;
5786d656433aSmrg	      ia64*)
5787d656433aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5788d656433aSmrg	        ;;
5789d656433aSmrg	      *)
5790d656433aSmrg	        _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'
5791d656433aSmrg	        ;;
5792126a8a12Smrg	    esac
5793d656433aSmrg	    # Commands to make compiler produce verbose output that lists
5794d656433aSmrg	    # what "hidden" libraries, object files and flags are used when
5795d656433aSmrg	    # linking a shared library.
5796d656433aSmrg	    #
5797d656433aSmrg	    # There doesn't appear to be a way to prevent this compiler from
5798d656433aSmrg	    # explicitly linking system object files so we need to strip them
5799d656433aSmrg	    # from the output so that they don't get included in the library
5800d656433aSmrg	    # dependencies.
5801d656433aSmrg	    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'
5802126a8a12Smrg	    ;;
5803d656433aSmrg          *)
5804d656433aSmrg	    if test "$GXX" = yes; then
5805d656433aSmrg	      if test $with_gnu_ld = no; then
5806d656433aSmrg	        case $host_cpu in
5807d656433aSmrg	          hppa*64*)
5808d656433aSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5809d656433aSmrg	            ;;
5810d656433aSmrg	          ia64*)
5811d656433aSmrg	            _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'
5812d656433aSmrg	            ;;
5813d656433aSmrg	          *)
5814d656433aSmrg	            _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'
5815d656433aSmrg	            ;;
5816d656433aSmrg	        esac
5817d656433aSmrg	      fi
5818d656433aSmrg	    else
5819d656433aSmrg	      # FIXME: insert proper C++ library support
5820d656433aSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5821d656433aSmrg	    fi
5822126a8a12Smrg	    ;;
5823d656433aSmrg        esac
5824d656433aSmrg        ;;
5825d656433aSmrg
5826d656433aSmrg      interix[[3-9]]*)
5827d656433aSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
5828d656433aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5829d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5830d656433aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5831d656433aSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5832d656433aSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5833d656433aSmrg	# default) and relocated if they conflict, which is a slow very memory
5834d656433aSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5835d656433aSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5836d656433aSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5837d656433aSmrg	_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'
5838d656433aSmrg	_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'
5839126a8a12Smrg	;;
5840d656433aSmrg      irix5* | irix6*)
5841d656433aSmrg        case $cc_basename in
5842d656433aSmrg          CC*)
5843d656433aSmrg	    # SGI C++
5844d656433aSmrg	    _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'
5845d656433aSmrg
5846d656433aSmrg	    # Archives containing C++ object files must be created using
5847d656433aSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5848d656433aSmrg	    # necessary to make sure instantiated templates are included
5849d656433aSmrg	    # in the archive.
5850d656433aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5851126a8a12Smrg	    ;;
5852d656433aSmrg          *)
5853d656433aSmrg	    if test "$GXX" = yes; then
5854d656433aSmrg	      if test "$with_gnu_ld" = no; then
5855d656433aSmrg	        _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'
5856d656433aSmrg	      else
5857d656433aSmrg	        _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'
5858d656433aSmrg	      fi
5859d656433aSmrg	    fi
5860d656433aSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5861126a8a12Smrg	    ;;
5862d656433aSmrg        esac
5863d656433aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5864d656433aSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5865d656433aSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5866d656433aSmrg        ;;
5867d656433aSmrg
5868d656433aSmrg      linux* | k*bsd*-gnu)
5869d656433aSmrg        case $cc_basename in
5870d656433aSmrg          KCC*)
5871d656433aSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5872d656433aSmrg
5873d656433aSmrg	    # KCC will only create a shared library if the output file
5874d656433aSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5875d656433aSmrg	    # to its proper name (with version) after linking.
5876d656433aSmrg	    _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'
5877d656433aSmrg	    _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'
5878d656433aSmrg	    # Commands to make compiler produce verbose output that lists
5879d656433aSmrg	    # what "hidden" libraries, object files and flags are used when
5880d656433aSmrg	    # linking a shared library.
5881d656433aSmrg	    #
5882d656433aSmrg	    # There doesn't appear to be a way to prevent this compiler from
5883d656433aSmrg	    # explicitly linking system object files so we need to strip them
5884d656433aSmrg	    # from the output so that they don't get included in the library
5885d656433aSmrg	    # dependencies.
5886d656433aSmrg	    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'
5887d656433aSmrg
5888d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5889d656433aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5890d656433aSmrg
5891d656433aSmrg	    # Archives containing C++ object files must be created using
5892d656433aSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5893d656433aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5894126a8a12Smrg	    ;;
5895d656433aSmrg	  icpc* | ecpc* )
5896126a8a12Smrg	    # Intel C++
5897d656433aSmrg	    with_gnu_ld=yes
5898d656433aSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5899d656433aSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5900d656433aSmrg	    # earlier do not add the objects themselves.
5901d656433aSmrg	    case `$CC -V 2>&1` in
5902d656433aSmrg	      *"Version 7."*)
5903d656433aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5904d656433aSmrg		_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'
5905d656433aSmrg		;;
5906d656433aSmrg	      *)  # Version 8.0 or newer
5907d656433aSmrg	        tmp_idyn=
5908d656433aSmrg	        case $host_cpu in
5909d656433aSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
5910d656433aSmrg		esac
5911d656433aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5912d656433aSmrg		_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'
5913d656433aSmrg		;;
5914d656433aSmrg	    esac
5915d656433aSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5916d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5917d656433aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5918d656433aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5919126a8a12Smrg	    ;;
5920d656433aSmrg          pgCC* | pgcpp*)
5921d656433aSmrg            # Portland Group C++ compiler
5922d656433aSmrg	    case `$CC -V` in
5923d656433aSmrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5924d656433aSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5925d656433aSmrg		rm -rf $tpldir~
5926d656433aSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5927d656433aSmrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5928d656433aSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5929d656433aSmrg		rm -rf $tpldir~
5930d656433aSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5931d656433aSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5932d656433aSmrg		$RANLIB $oldlib'
5933d656433aSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5934d656433aSmrg		rm -rf $tpldir~
5935d656433aSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5936d656433aSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5937d656433aSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5938d656433aSmrg		rm -rf $tpldir~
5939d656433aSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5940d656433aSmrg		$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'
5941d656433aSmrg	      ;;
5942d656433aSmrg	    *) # Version 6 will use weak symbols
5943d656433aSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5944d656433aSmrg	      _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'
5945d656433aSmrg	      ;;
5946d656433aSmrg	    esac
5947d656433aSmrg
5948d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5949d656433aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5950d656433aSmrg	    _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'
5951d656433aSmrg            ;;
5952126a8a12Smrg	  cxx*)
5953126a8a12Smrg	    # Compaq C++
5954d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5955d656433aSmrg	    _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'
5956d656433aSmrg
5957d656433aSmrg	    runpath_var=LD_RUN_PATH
5958d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5959d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5960d656433aSmrg
5961d656433aSmrg	    # Commands to make compiler produce verbose output that lists
5962d656433aSmrg	    # what "hidden" libraries, object files and flags are used when
5963d656433aSmrg	    # linking a shared library.
5964d656433aSmrg	    #
5965d656433aSmrg	    # There doesn't appear to be a way to prevent this compiler from
5966d656433aSmrg	    # explicitly linking system object files so we need to strip them
5967d656433aSmrg	    # from the output so that they don't get included in the library
5968d656433aSmrg	    # dependencies.
5969d656433aSmrg	    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'
5970d656433aSmrg	    ;;
5971d656433aSmrg	  xl*)
5972d656433aSmrg	    # IBM XL 8.0 on PPC, with GNU ld
5973d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5974d656433aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5975d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5976d656433aSmrg	    if test "x$supports_anon_versioning" = xyes; then
5977d656433aSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5978d656433aSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5979d656433aSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5980d656433aSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5981d656433aSmrg	    fi
5982126a8a12Smrg	    ;;
5983126a8a12Smrg	  *)
5984d656433aSmrg	    case `$CC -V 2>&1 | sed 5q` in
5985d656433aSmrg	    *Sun\ C*)
5986d656433aSmrg	      # Sun C++ 5.9
5987d656433aSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5988d656433aSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5989d656433aSmrg	      _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'
5990d656433aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5991d656433aSmrg	      _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'
5992d656433aSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5993d656433aSmrg
5994d656433aSmrg	      # Not sure whether something based on
5995d656433aSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5996d656433aSmrg	      # would be better.
5997d656433aSmrg	      output_verbose_link_cmd='echo'
5998d656433aSmrg
5999d656433aSmrg	      # Archives containing C++ object files must be created using
6000d656433aSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6001d656433aSmrg	      # necessary to make sure instantiated templates are included
6002d656433aSmrg	      # in the archive.
6003d656433aSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6004d656433aSmrg	      ;;
6005d656433aSmrg	    esac
6006126a8a12Smrg	    ;;
6007126a8a12Smrg	esac
6008126a8a12Smrg	;;
6009d656433aSmrg
6010126a8a12Smrg      lynxos*)
6011d656433aSmrg        # FIXME: insert proper C++ library support
6012d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6013126a8a12Smrg	;;
6014d656433aSmrg
6015126a8a12Smrg      m88k*)
6016d656433aSmrg        # FIXME: insert proper C++ library support
6017d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6018126a8a12Smrg	;;
6019d656433aSmrg
6020126a8a12Smrg      mvs*)
6021d656433aSmrg        case $cc_basename in
6022d656433aSmrg          cxx*)
6023d656433aSmrg	    # FIXME: insert proper C++ library support
6024d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6025126a8a12Smrg	    ;;
6026126a8a12Smrg	  *)
6027d656433aSmrg	    # FIXME: insert proper C++ library support
6028d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6029126a8a12Smrg	    ;;
6030126a8a12Smrg	esac
6031126a8a12Smrg	;;
6032d656433aSmrg
6033126a8a12Smrg      netbsd*)
6034d656433aSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6035d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6036d656433aSmrg	  wlarc=
6037d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6038d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6039d656433aSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6040d656433aSmrg	fi
6041d656433aSmrg	# Workaround some broken pre-1.5 toolchains
6042d656433aSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6043d656433aSmrg	;;
6044d656433aSmrg
6045d656433aSmrg      *nto* | *qnx*)
6046d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6047d656433aSmrg	;;
6048d656433aSmrg
6049d656433aSmrg      openbsd2*)
6050d656433aSmrg        # C++ shared libraries are fairly broken
6051d656433aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6052d656433aSmrg	;;
6053d656433aSmrg
6054d656433aSmrg      openbsd*)
6055d656433aSmrg	if test -f /usr/libexec/ld.so; then
6056d656433aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6057d656433aSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6058d656433aSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6059d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6060d656433aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6061d656433aSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6062d656433aSmrg	    _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'
6063d656433aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6064d656433aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6065d656433aSmrg	  fi
6066d656433aSmrg	  output_verbose_link_cmd=echo
6067d656433aSmrg	else
6068d656433aSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6069d656433aSmrg	fi
6070126a8a12Smrg	;;
6071d656433aSmrg
6072126a8a12Smrg      osf3* | osf4* | osf5*)
6073d656433aSmrg        case $cc_basename in
6074d656433aSmrg          KCC*)
6075d656433aSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6076d656433aSmrg
6077d656433aSmrg	    # KCC will only create a shared library if the output file
6078d656433aSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6079d656433aSmrg	    # to its proper name (with version) after linking.
6080d656433aSmrg	    _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'
6081d656433aSmrg
6082d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6083d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6084d656433aSmrg
6085d656433aSmrg	    # Archives containing C++ object files must be created using
6086d656433aSmrg	    # the KAI C++ compiler.
6087d656433aSmrg	    case $host in
6088d656433aSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6089d656433aSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6090d656433aSmrg	    esac
6091126a8a12Smrg	    ;;
6092d656433aSmrg          RCC*)
6093126a8a12Smrg	    # Rational C++ 2.4.1
6094d656433aSmrg	    # FIXME: insert proper C++ library support
6095d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6096126a8a12Smrg	    ;;
6097d656433aSmrg          cxx*)
6098d656433aSmrg	    case $host in
6099d656433aSmrg	      osf3*)
6100d656433aSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6101d656433aSmrg	        _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'
6102d656433aSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6103d656433aSmrg		;;
6104d656433aSmrg	      *)
6105d656433aSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6106d656433aSmrg	        _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'
6107d656433aSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6108d656433aSmrg	          echo "-hidden">> $lib.exp~
6109d656433aSmrg	          $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~
6110d656433aSmrg	          $RM $lib.exp'
6111d656433aSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6112d656433aSmrg		;;
6113d656433aSmrg	    esac
6114d656433aSmrg
6115d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6116d656433aSmrg
6117d656433aSmrg	    # Commands to make compiler produce verbose output that lists
6118d656433aSmrg	    # what "hidden" libraries, object files and flags are used when
6119d656433aSmrg	    # linking a shared library.
6120d656433aSmrg	    #
6121d656433aSmrg	    # There doesn't appear to be a way to prevent this compiler from
6122d656433aSmrg	    # explicitly linking system object files so we need to strip them
6123d656433aSmrg	    # from the output so that they don't get included in the library
6124d656433aSmrg	    # dependencies.
6125d656433aSmrg	    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'
6126126a8a12Smrg	    ;;
6127126a8a12Smrg	  *)
6128d656433aSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6129d656433aSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6130d656433aSmrg	      case $host in
6131d656433aSmrg	        osf3*)
6132d656433aSmrg	          _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'
6133d656433aSmrg		  ;;
6134d656433aSmrg	        *)
6135d656433aSmrg	          _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'
6136d656433aSmrg		  ;;
6137d656433aSmrg	      esac
6138d656433aSmrg
6139d656433aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6140d656433aSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6141d656433aSmrg
6142d656433aSmrg	      # Commands to make compiler produce verbose output that lists
6143d656433aSmrg	      # what "hidden" libraries, object files and flags are used when
6144d656433aSmrg	      # linking a shared library.
6145d656433aSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6146d656433aSmrg
6147d656433aSmrg	    else
6148d656433aSmrg	      # FIXME: insert proper C++ library support
6149d656433aSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6150d656433aSmrg	    fi
6151126a8a12Smrg	    ;;
6152d656433aSmrg        esac
6153d656433aSmrg        ;;
6154d656433aSmrg
6155126a8a12Smrg      psos*)
6156d656433aSmrg        # FIXME: insert proper C++ library support
6157d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6158d656433aSmrg        ;;
6159d656433aSmrg
6160126a8a12Smrg      sunos4*)
6161d656433aSmrg        case $cc_basename in
6162d656433aSmrg          CC*)
6163126a8a12Smrg	    # Sun C++ 4.x
6164d656433aSmrg	    # FIXME: insert proper C++ library support
6165d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6166126a8a12Smrg	    ;;
6167d656433aSmrg          lcc*)
6168126a8a12Smrg	    # Lucid
6169d656433aSmrg	    # FIXME: insert proper C++ library support
6170d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6171126a8a12Smrg	    ;;
6172d656433aSmrg          *)
6173d656433aSmrg	    # FIXME: insert proper C++ library support
6174d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6175d656433aSmrg	    ;;
6176d656433aSmrg        esac
6177d656433aSmrg        ;;
6178126a8a12Smrg
6179d656433aSmrg      solaris*)
6180d656433aSmrg        case $cc_basename in
6181d656433aSmrg          CC*)
6182d656433aSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6183d656433aSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6184d656433aSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6185d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6186d656433aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6187d656433aSmrg	      $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'
6188d656433aSmrg
6189d656433aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6190d656433aSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6191d656433aSmrg	    case $host_os in
6192d656433aSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6193d656433aSmrg	      *)
6194d656433aSmrg		# The compiler driver will combine and reorder linker options,
6195d656433aSmrg		# but understands `-z linker_flag'.
6196d656433aSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6197d656433aSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6198d656433aSmrg	        ;;
6199d656433aSmrg	    esac
6200d656433aSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6201126a8a12Smrg
6202d656433aSmrg	    output_verbose_link_cmd='echo'
6203126a8a12Smrg
6204d656433aSmrg	    # Archives containing C++ object files must be created using
6205d656433aSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6206d656433aSmrg	    # necessary to make sure instantiated templates are included
6207d656433aSmrg	    # in the archive.
6208d656433aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6209d656433aSmrg	    ;;
6210d656433aSmrg          gcx*)
6211d656433aSmrg	    # Green Hills C++ Compiler
6212d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6213126a8a12Smrg
6214d656433aSmrg	    # The C++ compiler must be used to create the archive.
6215d656433aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6216d656433aSmrg	    ;;
6217d656433aSmrg          *)
6218d656433aSmrg	    # GNU C++ compiler with Solaris linker
6219d656433aSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6220d656433aSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6221d656433aSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6222d656433aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6223d656433aSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6224d656433aSmrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6225d656433aSmrg
6226d656433aSmrg	        # Commands to make compiler produce verbose output that lists
6227d656433aSmrg	        # what "hidden" libraries, object files and flags are used when
6228d656433aSmrg	        # linking a shared library.
6229d656433aSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6230d656433aSmrg	      else
6231d656433aSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6232d656433aSmrg	        # platform.
6233d656433aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6234d656433aSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6235d656433aSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6236d656433aSmrg
6237d656433aSmrg	        # Commands to make compiler produce verbose output that lists
6238d656433aSmrg	        # what "hidden" libraries, object files and flags are used when
6239d656433aSmrg	        # linking a shared library.
6240d656433aSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6241d656433aSmrg	      fi
6242d656433aSmrg
6243d656433aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6244d656433aSmrg	      case $host_os in
6245d656433aSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6246d656433aSmrg		*)
6247d656433aSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6248d656433aSmrg		  ;;
6249d656433aSmrg	      esac
6250d656433aSmrg	    fi
6251d656433aSmrg	    ;;
6252d656433aSmrg        esac
6253126a8a12Smrg        ;;
6254126a8a12Smrg
6255d656433aSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6256d656433aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6257d656433aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6258d656433aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6259d656433aSmrg      runpath_var='LD_RUN_PATH'
6260126a8a12Smrg
6261126a8a12Smrg      case $cc_basename in
6262d656433aSmrg        CC*)
6263d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6264d656433aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6265d656433aSmrg	  ;;
6266d656433aSmrg	*)
6267d656433aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6268d656433aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6269d656433aSmrg	  ;;
6270126a8a12Smrg      esac
6271126a8a12Smrg      ;;
6272126a8a12Smrg
6273d656433aSmrg      sysv5* | sco3.2v5* | sco5v6*)
6274d656433aSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
6275d656433aSmrg	# link with -lc, and that would cause any symbols used from libc to
6276d656433aSmrg	# always be unresolved, which means just about no library would
6277d656433aSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
6278d656433aSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
6279d656433aSmrg	# as -z defs.
6280d656433aSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6281d656433aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6282d656433aSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6283d656433aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6284d656433aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6285d656433aSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6286d656433aSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6287d656433aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6288d656433aSmrg	runpath_var='LD_RUN_PATH'
6289126a8a12Smrg
6290d656433aSmrg	case $cc_basename in
6291d656433aSmrg          CC*)
6292d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6293d656433aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6294d656433aSmrg	    ;;
6295d656433aSmrg	  *)
6296d656433aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6297d656433aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6298d656433aSmrg	    ;;
6299d656433aSmrg	esac
6300126a8a12Smrg      ;;
6301126a8a12Smrg
6302d656433aSmrg      tandem*)
6303d656433aSmrg        case $cc_basename in
6304d656433aSmrg          NCC*)
6305d656433aSmrg	    # NonStop-UX NCC 3.20
6306d656433aSmrg	    # FIXME: insert proper C++ library support
6307d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6308d656433aSmrg	    ;;
6309d656433aSmrg          *)
6310d656433aSmrg	    # FIXME: insert proper C++ library support
6311d656433aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6312d656433aSmrg	    ;;
6313d656433aSmrg        esac
6314d656433aSmrg        ;;
6315126a8a12Smrg
6316d656433aSmrg      vxworks*)
6317d656433aSmrg        # FIXME: insert proper C++ library support
6318d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6319d656433aSmrg        ;;
6320126a8a12Smrg
6321d656433aSmrg      *)
6322d656433aSmrg        # FIXME: insert proper C++ library support
6323d656433aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6324d656433aSmrg        ;;
6325d656433aSmrg    esac
6326126a8a12Smrg
6327d656433aSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6328d656433aSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6329d656433aSmrg
6330d656433aSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
6331d656433aSmrg    _LT_TAGVAR(LD, $1)="$LD"
6332d656433aSmrg
6333d656433aSmrg    ## CAVEAT EMPTOR:
6334d656433aSmrg    ## There is no encapsulation within the following macros, do not change
6335d656433aSmrg    ## the running order or otherwise move them around unless you know exactly
6336d656433aSmrg    ## what you are doing...
6337d656433aSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6338d656433aSmrg    _LT_COMPILER_PIC($1)
6339d656433aSmrg    _LT_COMPILER_C_O($1)
6340d656433aSmrg    _LT_COMPILER_FILE_LOCKS($1)
6341d656433aSmrg    _LT_LINKER_SHLIBS($1)
6342d656433aSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6343d656433aSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6344d656433aSmrg
6345d656433aSmrg    _LT_CONFIG($1)
6346d656433aSmrg  fi # test -n "$compiler"
6347d656433aSmrg
6348d656433aSmrg  CC=$lt_save_CC
6349d656433aSmrg  LDCXX=$LD
6350d656433aSmrg  LD=$lt_save_LD
6351d656433aSmrg  GCC=$lt_save_GCC
6352d656433aSmrg  with_gnu_ld=$lt_save_with_gnu_ld
6353d656433aSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6354d656433aSmrg  lt_cv_path_LD=$lt_save_path_LD
6355d656433aSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6356d656433aSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6357d656433aSmrgfi # test "$_lt_caught_CXX_error" != yes
6358126a8a12Smrg
6359d656433aSmrgAC_LANG_POP
6360d656433aSmrg])# _LT_LANG_CXX_CONFIG
6361126a8a12Smrg
6362126a8a12Smrg
6363d656433aSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6364d656433aSmrg# ---------------------------------
6365d656433aSmrg# Figure out "hidden" library dependencies from verbose
6366d656433aSmrg# compiler output when linking a shared library.
6367d656433aSmrg# Parse the compiler output and extract the necessary
6368d656433aSmrg# objects, libraries and library flags.
6369d656433aSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6370d656433aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6371d656433aSmrg# Dependencies to place before and after the object being linked:
6372d656433aSmrg_LT_TAGVAR(predep_objects, $1)=
6373d656433aSmrg_LT_TAGVAR(postdep_objects, $1)=
6374d656433aSmrg_LT_TAGVAR(predeps, $1)=
6375d656433aSmrg_LT_TAGVAR(postdeps, $1)=
6376d656433aSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6377126a8a12Smrg
6378d656433aSmrgdnl we can't use the lt_simple_compile_test_code here,
6379d656433aSmrgdnl because it contains code intended for an executable,
6380d656433aSmrgdnl not a library.  It's possible we should let each
6381d656433aSmrgdnl tag define a new lt_????_link_test_code variable,
6382d656433aSmrgdnl but it's only used here...
6383d656433aSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6384d656433aSmrgint a;
6385d656433aSmrgvoid foo (void) { a = 0; }
6386d656433aSmrg_LT_EOF
6387d656433aSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6388d656433aSmrgclass Foo
6389d656433aSmrg{
6390d656433aSmrgpublic:
6391d656433aSmrg  Foo (void) { a = 0; }
6392d656433aSmrgprivate:
6393d656433aSmrg  int a;
6394d656433aSmrg};
6395d656433aSmrg_LT_EOF
6396d656433aSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6397d656433aSmrg      subroutine foo
6398d656433aSmrg      implicit none
6399d656433aSmrg      integer*4 a
6400d656433aSmrg      a=0
6401d656433aSmrg      return
6402d656433aSmrg      end
6403d656433aSmrg_LT_EOF
6404d656433aSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6405d656433aSmrg      subroutine foo
6406d656433aSmrg      implicit none
6407d656433aSmrg      integer a
6408d656433aSmrg      a=0
6409d656433aSmrg      return
6410d656433aSmrg      end
6411d656433aSmrg_LT_EOF
6412d656433aSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6413d656433aSmrgpublic class foo {
6414d656433aSmrg  private int a;
6415d656433aSmrg  public void bar (void) {
6416d656433aSmrg    a = 0;
6417d656433aSmrg  }
6418d656433aSmrg};
6419d656433aSmrg_LT_EOF
6420d656433aSmrg])
6421d656433aSmrgdnl Parse the compiler output and extract the necessary
6422d656433aSmrgdnl objects, libraries and library flags.
6423d656433aSmrgif AC_TRY_EVAL(ac_compile); then
6424d656433aSmrg  # Parse the compiler output and extract the necessary
6425d656433aSmrg  # objects, libraries and library flags.
6426126a8a12Smrg
6427d656433aSmrg  # Sentinel used to keep track of whether or not we are before
6428d656433aSmrg  # the conftest object file.
6429d656433aSmrg  pre_test_object_deps_done=no
6430126a8a12Smrg
6431d656433aSmrg  for p in `eval "$output_verbose_link_cmd"`; do
6432d656433aSmrg    case $p in
6433126a8a12Smrg
6434d656433aSmrg    -L* | -R* | -l*)
6435d656433aSmrg       # Some compilers place space between "-{L,R}" and the path.
6436d656433aSmrg       # Remove the space.
6437d656433aSmrg       if test $p = "-L" ||
6438d656433aSmrg          test $p = "-R"; then
6439d656433aSmrg	 prev=$p
6440d656433aSmrg	 continue
6441d656433aSmrg       else
6442d656433aSmrg	 prev=
6443d656433aSmrg       fi
6444126a8a12Smrg
6445d656433aSmrg       if test "$pre_test_object_deps_done" = no; then
6446d656433aSmrg	 case $p in
6447d656433aSmrg	 -L* | -R*)
6448d656433aSmrg	   # Internal compiler library paths should come after those
6449d656433aSmrg	   # provided the user.  The postdeps already come after the
6450d656433aSmrg	   # user supplied libs so there is no need to process them.
6451d656433aSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6452d656433aSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6453d656433aSmrg	   else
6454d656433aSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6455d656433aSmrg	   fi
6456d656433aSmrg	   ;;
6457d656433aSmrg	 # The "-l" case would never come before the object being
6458d656433aSmrg	 # linked, so don't bother handling this case.
6459d656433aSmrg	 esac
6460d656433aSmrg       else
6461d656433aSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6462d656433aSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6463d656433aSmrg	 else
6464d656433aSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6465d656433aSmrg	 fi
6466d656433aSmrg       fi
6467d656433aSmrg       ;;
6468126a8a12Smrg
6469d656433aSmrg    *.$objext)
6470d656433aSmrg       # This assumes that the test object file only shows up
6471d656433aSmrg       # once in the compiler output.
6472d656433aSmrg       if test "$p" = "conftest.$objext"; then
6473d656433aSmrg	 pre_test_object_deps_done=yes
6474d656433aSmrg	 continue
6475d656433aSmrg       fi
6476126a8a12Smrg
6477d656433aSmrg       if test "$pre_test_object_deps_done" = no; then
6478d656433aSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6479d656433aSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6480d656433aSmrg	 else
6481d656433aSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6482d656433aSmrg	 fi
6483d656433aSmrg       else
6484d656433aSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6485d656433aSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6486d656433aSmrg	 else
6487d656433aSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6488d656433aSmrg	 fi
6489d656433aSmrg       fi
6490d656433aSmrg       ;;
6491126a8a12Smrg
6492d656433aSmrg    *) ;; # Ignore the rest.
6493126a8a12Smrg
6494d656433aSmrg    esac
6495d656433aSmrg  done
6496126a8a12Smrg
6497d656433aSmrg  # Clean up.
6498d656433aSmrg  rm -f a.out a.exe
6499d656433aSmrgelse
6500d656433aSmrg  echo "libtool.m4: error: problem compiling $1 test program"
6501d656433aSmrgfi
6502126a8a12Smrg
6503d656433aSmrg$RM -f confest.$objext
6504126a8a12Smrg
6505d656433aSmrg# PORTME: override above test on systems where it is broken
6506d656433aSmrgm4_if([$1], [CXX],
6507d656433aSmrg[case $host_os in
6508d656433aSmrginterix[[3-9]]*)
6509d656433aSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6510d656433aSmrg  # hack all around it, let's just trust "g++" to DTRT.
6511d656433aSmrg  _LT_TAGVAR(predep_objects,$1)=
6512d656433aSmrg  _LT_TAGVAR(postdep_objects,$1)=
6513d656433aSmrg  _LT_TAGVAR(postdeps,$1)=
6514d656433aSmrg  ;;
6515126a8a12Smrg
6516d656433aSmrglinux*)
6517d656433aSmrg  case `$CC -V 2>&1 | sed 5q` in
6518d656433aSmrg  *Sun\ C*)
6519d656433aSmrg    # Sun C++ 5.9
6520d656433aSmrg
6521d656433aSmrg    # The more standards-conforming stlport4 library is
6522d656433aSmrg    # incompatible with the Cstd library. Avoid specifying
6523d656433aSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6524d656433aSmrg    # -library=stlport4 depends on it.
6525d656433aSmrg    case " $CXX $CXXFLAGS " in
6526d656433aSmrg    *" -library=stlport4 "*)
6527d656433aSmrg      solaris_use_stlport4=yes
6528126a8a12Smrg      ;;
6529d656433aSmrg    esac
6530126a8a12Smrg
6531d656433aSmrg    if test "$solaris_use_stlport4" != yes; then
6532d656433aSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6533d656433aSmrg    fi
6534d656433aSmrg    ;;
6535d656433aSmrg  esac
6536d656433aSmrg  ;;
6537126a8a12Smrg
6538d656433aSmrgsolaris*)
6539d656433aSmrg  case $cc_basename in
6540d656433aSmrg  CC*)
6541d656433aSmrg    # The more standards-conforming stlport4 library is
6542d656433aSmrg    # incompatible with the Cstd library. Avoid specifying
6543d656433aSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6544d656433aSmrg    # -library=stlport4 depends on it.
6545d656433aSmrg    case " $CXX $CXXFLAGS " in
6546d656433aSmrg    *" -library=stlport4 "*)
6547d656433aSmrg      solaris_use_stlport4=yes
6548d656433aSmrg      ;;
6549d656433aSmrg    esac
6550126a8a12Smrg
6551d656433aSmrg    # Adding this requires a known-good setup of shared libraries for
6552d656433aSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
6553d656433aSmrg    # archive will be linked into the output, leading to subtle bugs.
6554d656433aSmrg    if test "$solaris_use_stlport4" != yes; then
6555d656433aSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6556d656433aSmrg    fi
6557d656433aSmrg    ;;
6558d656433aSmrg  esac
6559d656433aSmrg  ;;
6560d656433aSmrgesac
6561d656433aSmrg])
6562126a8a12Smrg
6563d656433aSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
6564d656433aSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6565d656433aSmrgesac
6566d656433aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6567d656433aSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6568d656433aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6569d656433aSmrgfi
6570d656433aSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6571d656433aSmrg    [The directories searched by this compiler when creating a shared library])
6572d656433aSmrg_LT_TAGDECL([], [predep_objects], [1],
6573d656433aSmrg    [Dependencies to place before and after the objects being linked to
6574d656433aSmrg    create a shared library])
6575d656433aSmrg_LT_TAGDECL([], [postdep_objects], [1])
6576d656433aSmrg_LT_TAGDECL([], [predeps], [1])
6577d656433aSmrg_LT_TAGDECL([], [postdeps], [1])
6578d656433aSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6579d656433aSmrg    [The library search path used internally by the compiler when linking
6580d656433aSmrg    a shared library])
6581d656433aSmrg])# _LT_SYS_HIDDEN_LIBDEPS
6582d656433aSmrg
6583d656433aSmrg
6584d656433aSmrg# _LT_PROG_F77
6585d656433aSmrg# ------------
6586d656433aSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6587d656433aSmrg# if there is no fortran compiler, we have our own version here.
6588d656433aSmrgm4_defun([_LT_PROG_F77],
6589d656433aSmrg[
6590d656433aSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6591d656433aSmrgAC_PROG_F77
6592d656433aSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
6593d656433aSmrg  _lt_disable_F77=yes
6594d656433aSmrgfi
6595d656433aSmrgpopdef([AC_MSG_ERROR])
6596d656433aSmrg])# _LT_PROG_F77
6597126a8a12Smrg
6598d656433aSmrgdnl aclocal-1.4 backwards compatibility:
6599d656433aSmrgdnl AC_DEFUN([_LT_PROG_F77], [])
6600126a8a12Smrg
6601126a8a12Smrg
6602d656433aSmrg# _LT_LANG_F77_CONFIG([TAG])
6603d656433aSmrg# --------------------------
6604d656433aSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
6605d656433aSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6606d656433aSmrg# to write the compiler configuration to `libtool'.
6607d656433aSmrgm4_defun([_LT_LANG_F77_CONFIG],
6608d656433aSmrg[AC_REQUIRE([_LT_PROG_F77])dnl
6609d656433aSmrgAC_LANG_PUSH(Fortran 77)
6610126a8a12Smrg
6611d656433aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6612d656433aSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6613d656433aSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6614d656433aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6615d656433aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6616d656433aSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6617d656433aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6618d656433aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6619d656433aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6620d656433aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6621d656433aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6622d656433aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6623d656433aSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6624d656433aSmrg_LT_TAGVAR(module_cmds, $1)=
6625d656433aSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6626d656433aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6627d656433aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6628d656433aSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6629d656433aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6630d656433aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6631126a8a12Smrg
6632d656433aSmrg# Source file extension for f77 test sources.
6633d656433aSmrgac_ext=f
6634126a8a12Smrg
6635d656433aSmrg# Object file extension for compiled f77 test sources.
6636d656433aSmrgobjext=o
6637d656433aSmrg_LT_TAGVAR(objext, $1)=$objext
6638d656433aSmrg
6639d656433aSmrg# No sense in running all these tests if we already determined that
6640d656433aSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6641d656433aSmrg# are currently assumed to apply to all compilers on this platform,
6642d656433aSmrg# and will be corrupted by setting them based on a non-working compiler.
6643d656433aSmrgif test "$_lt_disable_F77" != yes; then
6644d656433aSmrg  # Code to be used in simple compile tests
6645d656433aSmrg  lt_simple_compile_test_code="\
6646d656433aSmrg      subroutine t
6647d656433aSmrg      return
6648d656433aSmrg      end
6649d656433aSmrg"
6650126a8a12Smrg
6651d656433aSmrg  # Code to be used in simple link tests
6652d656433aSmrg  lt_simple_link_test_code="\
6653d656433aSmrg      program t
6654d656433aSmrg      end
6655d656433aSmrg"
6656126a8a12Smrg
6657d656433aSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6658d656433aSmrg  _LT_TAG_COMPILER
6659126a8a12Smrg
6660d656433aSmrg  # save warnings/boilerplate of simple test code
6661d656433aSmrg  _LT_COMPILER_BOILERPLATE
6662d656433aSmrg  _LT_LINKER_BOILERPLATE
6663126a8a12Smrg
6664d656433aSmrg  # Allow CC to be a program name with arguments.
6665d656433aSmrg  lt_save_CC="$CC"
6666d656433aSmrg  lt_save_GCC=$GCC
6667d656433aSmrg  CC=${F77-"f77"}
6668d656433aSmrg  compiler=$CC
6669d656433aSmrg  _LT_TAGVAR(compiler, $1)=$CC
6670d656433aSmrg  _LT_CC_BASENAME([$compiler])
6671d656433aSmrg  GCC=$G77
6672d656433aSmrg  if test -n "$compiler"; then
6673d656433aSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6674d656433aSmrg    AC_MSG_RESULT([$can_build_shared])
6675126a8a12Smrg
6676d656433aSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6677d656433aSmrg    test "$can_build_shared" = "no" && enable_shared=no
6678126a8a12Smrg
6679d656433aSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6680d656433aSmrg    # are all built from PIC.
6681d656433aSmrg    case $host_os in
6682d656433aSmrg      aix3*)
6683d656433aSmrg        test "$enable_shared" = yes && enable_static=no
6684d656433aSmrg        if test -n "$RANLIB"; then
6685d656433aSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6686d656433aSmrg          postinstall_cmds='$RANLIB $lib'
6687d656433aSmrg        fi
6688d656433aSmrg        ;;
6689d656433aSmrg      aix[[4-9]]*)
6690d656433aSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6691d656433aSmrg	  test "$enable_shared" = yes && enable_static=no
6692126a8a12Smrg	fi
6693d656433aSmrg        ;;
6694d656433aSmrg    esac
6695d656433aSmrg    AC_MSG_RESULT([$enable_shared])
6696d656433aSmrg
6697d656433aSmrg    AC_MSG_CHECKING([whether to build static libraries])
6698d656433aSmrg    # Make sure either enable_shared or enable_static is yes.
6699d656433aSmrg    test "$enable_shared" = yes || enable_static=yes
6700d656433aSmrg    AC_MSG_RESULT([$enable_static])
6701d656433aSmrg
6702d656433aSmrg    _LT_TAGVAR(GCC, $1)="$G77"
6703d656433aSmrg    _LT_TAGVAR(LD, $1)="$LD"
6704d656433aSmrg
6705d656433aSmrg    ## CAVEAT EMPTOR:
6706d656433aSmrg    ## There is no encapsulation within the following macros, do not change
6707d656433aSmrg    ## the running order or otherwise move them around unless you know exactly
6708d656433aSmrg    ## what you are doing...
6709d656433aSmrg    _LT_COMPILER_PIC($1)
6710d656433aSmrg    _LT_COMPILER_C_O($1)
6711d656433aSmrg    _LT_COMPILER_FILE_LOCKS($1)
6712d656433aSmrg    _LT_LINKER_SHLIBS($1)
6713d656433aSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6714d656433aSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6715d656433aSmrg
6716d656433aSmrg    _LT_CONFIG($1)
6717d656433aSmrg  fi # test -n "$compiler"
6718d656433aSmrg
6719d656433aSmrg  GCC=$lt_save_GCC
6720d656433aSmrg  CC="$lt_save_CC"
6721d656433aSmrgfi # test "$_lt_disable_F77" != yes
6722126a8a12Smrg
6723d656433aSmrgAC_LANG_POP
6724d656433aSmrg])# _LT_LANG_F77_CONFIG
6725126a8a12Smrg
6726126a8a12Smrg
6727d656433aSmrg# _LT_PROG_FC
6728d656433aSmrg# -----------
6729d656433aSmrg# Since AC_PROG_FC is broken, in that it returns the empty string
6730d656433aSmrg# if there is no fortran compiler, we have our own version here.
6731d656433aSmrgm4_defun([_LT_PROG_FC],
6732d656433aSmrg[
6733d656433aSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6734d656433aSmrgAC_PROG_FC
6735d656433aSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
6736d656433aSmrg  _lt_disable_FC=yes
6737d656433aSmrgfi
6738d656433aSmrgpopdef([AC_MSG_ERROR])
6739d656433aSmrg])# _LT_PROG_FC
6740126a8a12Smrg
6741d656433aSmrgdnl aclocal-1.4 backwards compatibility:
6742d656433aSmrgdnl AC_DEFUN([_LT_PROG_FC], [])
6743126a8a12Smrg
6744126a8a12Smrg
6745d656433aSmrg# _LT_LANG_FC_CONFIG([TAG])
6746d656433aSmrg# -------------------------
6747d656433aSmrg# Ensure that the configuration variables for a Fortran compiler are
6748d656433aSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6749d656433aSmrg# to write the compiler configuration to `libtool'.
6750d656433aSmrgm4_defun([_LT_LANG_FC_CONFIG],
6751d656433aSmrg[AC_REQUIRE([_LT_PROG_FC])dnl
6752d656433aSmrgAC_LANG_PUSH(Fortran)
6753d656433aSmrg
6754d656433aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6755d656433aSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6756d656433aSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6757d656433aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6758d656433aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6759d656433aSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6760d656433aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6761d656433aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6762d656433aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6763d656433aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6764d656433aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6765d656433aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6766d656433aSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6767d656433aSmrg_LT_TAGVAR(module_cmds, $1)=
6768d656433aSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6769d656433aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6770d656433aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6771d656433aSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6772d656433aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6773d656433aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6774d656433aSmrg
6775d656433aSmrg# Source file extension for fc test sources.
6776d656433aSmrgac_ext=${ac_fc_srcext-f}
6777d656433aSmrg
6778d656433aSmrg# Object file extension for compiled fc test sources.
6779d656433aSmrgobjext=o
6780d656433aSmrg_LT_TAGVAR(objext, $1)=$objext
6781d656433aSmrg
6782d656433aSmrg# No sense in running all these tests if we already determined that
6783d656433aSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
6784d656433aSmrg# are currently assumed to apply to all compilers on this platform,
6785d656433aSmrg# and will be corrupted by setting them based on a non-working compiler.
6786d656433aSmrgif test "$_lt_disable_FC" != yes; then
6787d656433aSmrg  # Code to be used in simple compile tests
6788d656433aSmrg  lt_simple_compile_test_code="\
6789d656433aSmrg      subroutine t
6790d656433aSmrg      return
6791d656433aSmrg      end
6792d656433aSmrg"
6793126a8a12Smrg
6794d656433aSmrg  # Code to be used in simple link tests
6795d656433aSmrg  lt_simple_link_test_code="\
6796d656433aSmrg      program t
6797d656433aSmrg      end
6798d656433aSmrg"
6799126a8a12Smrg
6800d656433aSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6801d656433aSmrg  _LT_TAG_COMPILER
6802126a8a12Smrg
6803d656433aSmrg  # save warnings/boilerplate of simple test code
6804d656433aSmrg  _LT_COMPILER_BOILERPLATE
6805d656433aSmrg  _LT_LINKER_BOILERPLATE
6806126a8a12Smrg
6807d656433aSmrg  # Allow CC to be a program name with arguments.
6808d656433aSmrg  lt_save_CC="$CC"
6809d656433aSmrg  lt_save_GCC=$GCC
6810d656433aSmrg  CC=${FC-"f95"}
6811d656433aSmrg  compiler=$CC
6812d656433aSmrg  GCC=$ac_cv_fc_compiler_gnu
6813126a8a12Smrg
6814d656433aSmrg  _LT_TAGVAR(compiler, $1)=$CC
6815d656433aSmrg  _LT_CC_BASENAME([$compiler])
6816126a8a12Smrg
6817d656433aSmrg  if test -n "$compiler"; then
6818d656433aSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6819d656433aSmrg    AC_MSG_RESULT([$can_build_shared])
6820126a8a12Smrg
6821d656433aSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6822d656433aSmrg    test "$can_build_shared" = "no" && enable_shared=no
6823126a8a12Smrg
6824d656433aSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6825d656433aSmrg    # are all built from PIC.
6826d656433aSmrg    case $host_os in
6827d656433aSmrg      aix3*)
6828d656433aSmrg        test "$enable_shared" = yes && enable_static=no
6829d656433aSmrg        if test -n "$RANLIB"; then
6830d656433aSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6831d656433aSmrg          postinstall_cmds='$RANLIB $lib'
6832d656433aSmrg        fi
6833d656433aSmrg        ;;
6834d656433aSmrg      aix[[4-9]]*)
6835d656433aSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6836d656433aSmrg	  test "$enable_shared" = yes && enable_static=no
6837d656433aSmrg	fi
6838d656433aSmrg        ;;
6839d656433aSmrg    esac
6840d656433aSmrg    AC_MSG_RESULT([$enable_shared])
6841d656433aSmrg
6842d656433aSmrg    AC_MSG_CHECKING([whether to build static libraries])
6843d656433aSmrg    # Make sure either enable_shared or enable_static is yes.
6844d656433aSmrg    test "$enable_shared" = yes || enable_static=yes
6845d656433aSmrg    AC_MSG_RESULT([$enable_static])
6846d656433aSmrg
6847d656433aSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6848d656433aSmrg    _LT_TAGVAR(LD, $1)="$LD"
6849d656433aSmrg
6850d656433aSmrg    ## CAVEAT EMPTOR:
6851d656433aSmrg    ## There is no encapsulation within the following macros, do not change
6852d656433aSmrg    ## the running order or otherwise move them around unless you know exactly
6853d656433aSmrg    ## what you are doing...
6854d656433aSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6855d656433aSmrg    _LT_COMPILER_PIC($1)
6856d656433aSmrg    _LT_COMPILER_C_O($1)
6857d656433aSmrg    _LT_COMPILER_FILE_LOCKS($1)
6858d656433aSmrg    _LT_LINKER_SHLIBS($1)
6859d656433aSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6860d656433aSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6861d656433aSmrg
6862d656433aSmrg    _LT_CONFIG($1)
6863d656433aSmrg  fi # test -n "$compiler"
6864d656433aSmrg
6865d656433aSmrg  GCC=$lt_save_GCC
6866d656433aSmrg  CC="$lt_save_CC"
6867d656433aSmrgfi # test "$_lt_disable_FC" != yes
6868126a8a12Smrg
6869d656433aSmrgAC_LANG_POP
6870d656433aSmrg])# _LT_LANG_FC_CONFIG
6871126a8a12Smrg
6872126a8a12Smrg
6873d656433aSmrg# _LT_LANG_GCJ_CONFIG([TAG])
6874d656433aSmrg# --------------------------
6875d656433aSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6876d656433aSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6877d656433aSmrg# to write the compiler configuration to `libtool'.
6878d656433aSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
6879d656433aSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6880d656433aSmrgAC_LANG_SAVE
6881126a8a12Smrg
6882d656433aSmrg# Source file extension for Java test sources.
6883d656433aSmrgac_ext=java
6884126a8a12Smrg
6885d656433aSmrg# Object file extension for compiled Java test sources.
6886d656433aSmrgobjext=o
6887d656433aSmrg_LT_TAGVAR(objext, $1)=$objext
6888126a8a12Smrg
6889d656433aSmrg# Code to be used in simple compile tests
6890d656433aSmrglt_simple_compile_test_code="class foo {}"
6891126a8a12Smrg
6892d656433aSmrg# Code to be used in simple link tests
6893d656433aSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6894126a8a12Smrg
6895d656433aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6896d656433aSmrg_LT_TAG_COMPILER
6897126a8a12Smrg
6898d656433aSmrg# save warnings/boilerplate of simple test code
6899d656433aSmrg_LT_COMPILER_BOILERPLATE
6900d656433aSmrg_LT_LINKER_BOILERPLATE
6901126a8a12Smrg
6902d656433aSmrg# Allow CC to be a program name with arguments.
6903d656433aSmrglt_save_CC="$CC"
6904d656433aSmrglt_save_GCC=$GCC
6905d656433aSmrgGCC=yes
6906d656433aSmrgCC=${GCJ-"gcj"}
6907d656433aSmrgcompiler=$CC
6908d656433aSmrg_LT_TAGVAR(compiler, $1)=$CC
6909d656433aSmrg_LT_TAGVAR(LD, $1)="$LD"
6910d656433aSmrg_LT_CC_BASENAME([$compiler])
6911126a8a12Smrg
6912d656433aSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6913d656433aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6914126a8a12Smrg
6915d656433aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6916126a8a12Smrg
6917d656433aSmrgif test -n "$compiler"; then
6918d656433aSmrg  _LT_COMPILER_NO_RTTI($1)
6919d656433aSmrg  _LT_COMPILER_PIC($1)
6920d656433aSmrg  _LT_COMPILER_C_O($1)
6921d656433aSmrg  _LT_COMPILER_FILE_LOCKS($1)
6922d656433aSmrg  _LT_LINKER_SHLIBS($1)
6923d656433aSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6924126a8a12Smrg
6925d656433aSmrg  _LT_CONFIG($1)
6926d656433aSmrgfi
6927126a8a12Smrg
6928d656433aSmrgAC_LANG_RESTORE
6929126a8a12Smrg
6930d656433aSmrgGCC=$lt_save_GCC
6931d656433aSmrgCC="$lt_save_CC"
6932d656433aSmrg])# _LT_LANG_GCJ_CONFIG
6933126a8a12Smrg
6934126a8a12Smrg
6935d656433aSmrg# _LT_LANG_RC_CONFIG([TAG])
6936d656433aSmrg# -------------------------
6937d656433aSmrg# Ensure that the configuration variables for the Windows resource compiler
6938d656433aSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6939d656433aSmrg# to write the compiler configuration to `libtool'.
6940d656433aSmrgm4_defun([_LT_LANG_RC_CONFIG],
6941d656433aSmrg[AC_REQUIRE([LT_PROG_RC])dnl
6942d656433aSmrgAC_LANG_SAVE
6943126a8a12Smrg
6944d656433aSmrg# Source file extension for RC test sources.
6945d656433aSmrgac_ext=rc
6946126a8a12Smrg
6947d656433aSmrg# Object file extension for compiled RC test sources.
6948d656433aSmrgobjext=o
6949d656433aSmrg_LT_TAGVAR(objext, $1)=$objext
6950126a8a12Smrg
6951d656433aSmrg# Code to be used in simple compile tests
6952d656433aSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6953126a8a12Smrg
6954d656433aSmrg# Code to be used in simple link tests
6955d656433aSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
6956126a8a12Smrg
6957d656433aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6958d656433aSmrg_LT_TAG_COMPILER
6959126a8a12Smrg
6960d656433aSmrg# save warnings/boilerplate of simple test code
6961d656433aSmrg_LT_COMPILER_BOILERPLATE
6962d656433aSmrg_LT_LINKER_BOILERPLATE
6963126a8a12Smrg
6964d656433aSmrg# Allow CC to be a program name with arguments.
6965d656433aSmrglt_save_CC="$CC"
6966d656433aSmrglt_save_GCC=$GCC
6967d656433aSmrgGCC=
6968d656433aSmrgCC=${RC-"windres"}
6969d656433aSmrgcompiler=$CC
6970d656433aSmrg_LT_TAGVAR(compiler, $1)=$CC
6971d656433aSmrg_LT_CC_BASENAME([$compiler])
6972d656433aSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6973126a8a12Smrg
6974d656433aSmrgif test -n "$compiler"; then
6975d656433aSmrg  :
6976d656433aSmrg  _LT_CONFIG($1)
6977d656433aSmrgfi
6978126a8a12Smrg
6979d656433aSmrgGCC=$lt_save_GCC
6980d656433aSmrgAC_LANG_RESTORE
6981d656433aSmrgCC="$lt_save_CC"
6982d656433aSmrg])# _LT_LANG_RC_CONFIG
6983126a8a12Smrg
6984126a8a12Smrg
6985d656433aSmrg# LT_PROG_GCJ
6986d656433aSmrg# -----------
6987d656433aSmrgAC_DEFUN([LT_PROG_GCJ],
6988d656433aSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6989d656433aSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6990d656433aSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
6991d656433aSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6992d656433aSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
6993d656433aSmrg])
6994d656433aSmrg
6995d656433aSmrg# Old name:
6996d656433aSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6997d656433aSmrgdnl aclocal-1.4 backwards compatibility:
6998d656433aSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6999126a8a12Smrg
7000126a8a12Smrg
7001d656433aSmrg# LT_PROG_RC
7002d656433aSmrg# ----------
7003d656433aSmrgAC_DEFUN([LT_PROG_RC],
7004d656433aSmrg[AC_CHECK_TOOL(RC, windres,)
7005d656433aSmrg])
7006126a8a12Smrg
7007d656433aSmrg# Old name:
7008d656433aSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7009d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7010d656433aSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7011126a8a12Smrg
7012126a8a12Smrg
7013d656433aSmrg# _LT_DECL_EGREP
7014d656433aSmrg# --------------
7015d656433aSmrg# If we don't have a new enough Autoconf to choose the best grep
7016d656433aSmrg# available, choose the one first in the user's PATH.
7017d656433aSmrgm4_defun([_LT_DECL_EGREP],
7018d656433aSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7019d656433aSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7020d656433aSmrgtest -z "$GREP" && GREP=grep
7021d656433aSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7022d656433aSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7023d656433aSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7024d656433aSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7025d656433aSmrgAC_SUBST([GREP])
7026126a8a12Smrg])
7027126a8a12Smrg
7028d656433aSmrg
7029d656433aSmrg# _LT_DECL_OBJDUMP
7030d656433aSmrg# --------------
7031d656433aSmrg# If we don't have a new enough Autoconf to choose the best objdump
7032d656433aSmrg# available, choose the one first in the user's PATH.
7033d656433aSmrgm4_defun([_LT_DECL_OBJDUMP],
7034d656433aSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7035d656433aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7036d656433aSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7037d656433aSmrgAC_SUBST([OBJDUMP])
7038126a8a12Smrg])
7039126a8a12Smrg
7040d656433aSmrg
7041d656433aSmrg# _LT_DECL_SED
7042d656433aSmrg# ------------
7043d656433aSmrg# Check for a fully-functional sed program, that truncates
7044d656433aSmrg# as few characters as possible.  Prefer GNU sed if found.
7045d656433aSmrgm4_defun([_LT_DECL_SED],
7046d656433aSmrg[AC_PROG_SED
7047d656433aSmrgtest -z "$SED" && SED=sed
7048d656433aSmrgXsed="$SED -e 1s/^X//"
7049d656433aSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7050d656433aSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7051d656433aSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7052d656433aSmrg])# _LT_DECL_SED
7053d656433aSmrg
7054d656433aSmrgm4_ifndef([AC_PROG_SED], [
7055126a8a12Smrg# NOTE: This macro has been submitted for inclusion into   #
7056126a8a12Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7057126a8a12Smrg#  a released version of Autoconf we should remove this    #
7058126a8a12Smrg#  macro and use it instead.                               #
7059d656433aSmrg
7060d656433aSmrgm4_defun([AC_PROG_SED],
7061126a8a12Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7062126a8a12SmrgAC_CACHE_VAL(lt_cv_path_SED,
7063126a8a12Smrg[# Loop through the user's path and test for sed and gsed.
7064126a8a12Smrg# Then use that list of sed's as ones to test for truncation.
7065126a8a12Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7066126a8a12Smrgfor as_dir in $PATH
7067126a8a12Smrgdo
7068126a8a12Smrg  IFS=$as_save_IFS
7069126a8a12Smrg  test -z "$as_dir" && as_dir=.
7070126a8a12Smrg  for lt_ac_prog in sed gsed; do
7071126a8a12Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
7072126a8a12Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7073126a8a12Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7074126a8a12Smrg      fi
7075126a8a12Smrg    done
7076126a8a12Smrg  done
7077126a8a12Smrgdone
7078d656433aSmrgIFS=$as_save_IFS
7079126a8a12Smrglt_ac_max=0
7080126a8a12Smrglt_ac_count=0
7081126a8a12Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7082126a8a12Smrg# along with /bin/sed that truncates output.
7083126a8a12Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7084126a8a12Smrg  test ! -f $lt_ac_sed && continue
7085126a8a12Smrg  cat /dev/null > conftest.in
7086126a8a12Smrg  lt_ac_count=0
7087126a8a12Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7088126a8a12Smrg  # Check for GNU sed and select it if it is found.
7089126a8a12Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7090126a8a12Smrg    lt_cv_path_SED=$lt_ac_sed
7091126a8a12Smrg    break
7092126a8a12Smrg  fi
7093126a8a12Smrg  while true; do
7094126a8a12Smrg    cat conftest.in conftest.in >conftest.tmp
7095126a8a12Smrg    mv conftest.tmp conftest.in
7096126a8a12Smrg    cp conftest.in conftest.nl
7097126a8a12Smrg    echo >>conftest.nl
7098126a8a12Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7099126a8a12Smrg    cmp -s conftest.out conftest.nl || break
7100126a8a12Smrg    # 10000 chars as input seems more than enough
7101126a8a12Smrg    test $lt_ac_count -gt 10 && break
7102126a8a12Smrg    lt_ac_count=`expr $lt_ac_count + 1`
7103126a8a12Smrg    if test $lt_ac_count -gt $lt_ac_max; then
7104126a8a12Smrg      lt_ac_max=$lt_ac_count
7105126a8a12Smrg      lt_cv_path_SED=$lt_ac_sed
7106126a8a12Smrg    fi
7107126a8a12Smrg  done
7108126a8a12Smrgdone
7109126a8a12Smrg])
7110d656433aSmrgSED=$lt_cv_path_SED
7111d656433aSmrgAC_SUBST([SED])
7112d656433aSmrgAC_MSG_RESULT([$SED])
7113d656433aSmrg])#AC_PROG_SED
7114d656433aSmrg])#m4_ifndef
7115d656433aSmrg
7116d656433aSmrg# Old name:
7117d656433aSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7118d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7119d656433aSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7120d656433aSmrg
7121d656433aSmrg
7122d656433aSmrg# _LT_CHECK_SHELL_FEATURES
7123d656433aSmrg# ------------------------
7124d656433aSmrg# Find out whether the shell is Bourne or XSI compatible,
7125d656433aSmrg# or has some other useful features.
7126d656433aSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7127d656433aSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7128d656433aSmrg# Try some XSI features
7129d656433aSmrgxsi_shell=no
7130d656433aSmrg( _lt_dummy="a/b/c"
7131d656433aSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7132d656433aSmrg      = c,a/b,, \
7133d656433aSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7134d656433aSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7135d656433aSmrg  && xsi_shell=yes
7136d656433aSmrgAC_MSG_RESULT([$xsi_shell])
7137d656433aSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7138d656433aSmrg
7139d656433aSmrgAC_MSG_CHECKING([whether the shell understands "+="])
7140d656433aSmrglt_shell_append=no
7141d656433aSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7142d656433aSmrg    >/dev/null 2>&1 \
7143d656433aSmrg  && lt_shell_append=yes
7144d656433aSmrgAC_MSG_RESULT([$lt_shell_append])
7145d656433aSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7146d656433aSmrg
7147d656433aSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7148d656433aSmrg  lt_unset=unset
7149d656433aSmrgelse
7150d656433aSmrg  lt_unset=false
7151d656433aSmrgfi
7152d656433aSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7153d656433aSmrg
7154d656433aSmrg# test EBCDIC or ASCII
7155d656433aSmrgcase `echo X|tr X '\101'` in
7156d656433aSmrg A) # ASCII based system
7157d656433aSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7158d656433aSmrg  lt_SP2NL='tr \040 \012'
7159d656433aSmrg  lt_NL2SP='tr \015\012 \040\040'
7160d656433aSmrg  ;;
7161d656433aSmrg *) # EBCDIC based system
7162d656433aSmrg  lt_SP2NL='tr \100 \n'
7163d656433aSmrg  lt_NL2SP='tr \r\n \100\100'
7164d656433aSmrg  ;;
7165d656433aSmrgesac
7166d656433aSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7167d656433aSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7168d656433aSmrg])# _LT_CHECK_SHELL_FEATURES
7169d656433aSmrg
7170d656433aSmrg
7171d656433aSmrg# _LT_PROG_XSI_SHELLFNS
7172d656433aSmrg# ---------------------
7173d656433aSmrg# Bourne and XSI compatible variants of some useful shell functions.
7174d656433aSmrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7175d656433aSmrg[case $xsi_shell in
7176d656433aSmrg  yes)
7177d656433aSmrg    cat << \_LT_EOF >> "$cfgfile"
7178d656433aSmrg
7179d656433aSmrg# func_dirname file append nondir_replacement
7180d656433aSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7181d656433aSmrg# otherwise set result to NONDIR_REPLACEMENT.
7182d656433aSmrgfunc_dirname ()
7183d656433aSmrg{
7184d656433aSmrg  case ${1} in
7185d656433aSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7186d656433aSmrg    *  ) func_dirname_result="${3}" ;;
7187d656433aSmrg  esac
7188d656433aSmrg}
7189d656433aSmrg
7190d656433aSmrg# func_basename file
7191d656433aSmrgfunc_basename ()
7192d656433aSmrg{
7193d656433aSmrg  func_basename_result="${1##*/}"
7194d656433aSmrg}
7195d656433aSmrg
7196d656433aSmrg# func_dirname_and_basename file append nondir_replacement
7197d656433aSmrg# perform func_basename and func_dirname in a single function
7198d656433aSmrg# call:
7199d656433aSmrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7200d656433aSmrg#             add APPEND to the result, otherwise set result
7201d656433aSmrg#             to NONDIR_REPLACEMENT.
7202d656433aSmrg#             value returned in "$func_dirname_result"
7203d656433aSmrg#   basename: Compute filename of FILE.
7204d656433aSmrg#             value retuned in "$func_basename_result"
7205d656433aSmrg# Implementation must be kept synchronized with func_dirname
7206d656433aSmrg# and func_basename. For efficiency, we do not delegate to
7207d656433aSmrg# those functions but instead duplicate the functionality here.
7208d656433aSmrgfunc_dirname_and_basename ()
7209d656433aSmrg{
7210d656433aSmrg  case ${1} in
7211d656433aSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7212d656433aSmrg    *  ) func_dirname_result="${3}" ;;
7213d656433aSmrg  esac
7214d656433aSmrg  func_basename_result="${1##*/}"
7215d656433aSmrg}
7216d656433aSmrg
7217d656433aSmrg# func_stripname prefix suffix name
7218d656433aSmrg# strip PREFIX and SUFFIX off of NAME.
7219d656433aSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7220d656433aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7221d656433aSmrg# dot (in which case that matches only a dot).
7222d656433aSmrgfunc_stripname ()
7223d656433aSmrg{
7224d656433aSmrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7225d656433aSmrg  # positional parameters, so assign one to ordinary parameter first.
7226d656433aSmrg  func_stripname_result=${3}
7227d656433aSmrg  func_stripname_result=${func_stripname_result#"${1}"}
7228d656433aSmrg  func_stripname_result=${func_stripname_result%"${2}"}
7229d656433aSmrg}
7230d656433aSmrg
7231d656433aSmrg# func_opt_split
7232d656433aSmrgfunc_opt_split ()
7233d656433aSmrg{
7234d656433aSmrg  func_opt_split_opt=${1%%=*}
7235d656433aSmrg  func_opt_split_arg=${1#*=}
7236d656433aSmrg}
7237d656433aSmrg
7238d656433aSmrg# func_lo2o object
7239d656433aSmrgfunc_lo2o ()
7240d656433aSmrg{
7241d656433aSmrg  case ${1} in
7242d656433aSmrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7243d656433aSmrg    *)    func_lo2o_result=${1} ;;
7244d656433aSmrg  esac
7245d656433aSmrg}
7246d656433aSmrg
7247d656433aSmrg# func_xform libobj-or-source
7248d656433aSmrgfunc_xform ()
7249d656433aSmrg{
7250d656433aSmrg  func_xform_result=${1%.*}.lo
7251d656433aSmrg}
7252d656433aSmrg
7253d656433aSmrg# func_arith arithmetic-term...
7254d656433aSmrgfunc_arith ()
7255d656433aSmrg{
7256d656433aSmrg  func_arith_result=$(( $[*] ))
7257d656433aSmrg}
7258d656433aSmrg
7259d656433aSmrg# func_len string
7260d656433aSmrg# STRING may not start with a hyphen.
7261d656433aSmrgfunc_len ()
7262d656433aSmrg{
7263d656433aSmrg  func_len_result=${#1}
7264d656433aSmrg}
7265d656433aSmrg
7266d656433aSmrg_LT_EOF
7267d656433aSmrg    ;;
7268d656433aSmrg  *) # Bourne compatible functions.
7269d656433aSmrg    cat << \_LT_EOF >> "$cfgfile"
7270d656433aSmrg
7271d656433aSmrg# func_dirname file append nondir_replacement
7272d656433aSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7273d656433aSmrg# otherwise set result to NONDIR_REPLACEMENT.
7274d656433aSmrgfunc_dirname ()
7275d656433aSmrg{
7276d656433aSmrg  # Extract subdirectory from the argument.
7277d656433aSmrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7278d656433aSmrg  if test "X$func_dirname_result" = "X${1}"; then
7279d656433aSmrg    func_dirname_result="${3}"
7280d656433aSmrg  else
7281d656433aSmrg    func_dirname_result="$func_dirname_result${2}"
7282d656433aSmrg  fi
7283d656433aSmrg}
7284d656433aSmrg
7285d656433aSmrg# func_basename file
7286d656433aSmrgfunc_basename ()
7287d656433aSmrg{
7288d656433aSmrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7289d656433aSmrg}
7290d656433aSmrg
7291d656433aSmrgdnl func_dirname_and_basename
7292d656433aSmrgdnl A portable version of this function is already defined in general.m4sh
7293d656433aSmrgdnl so there is no need for it here.
7294d656433aSmrg
7295d656433aSmrg# func_stripname prefix suffix name
7296d656433aSmrg# strip PREFIX and SUFFIX off of NAME.
7297d656433aSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7298d656433aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7299d656433aSmrg# dot (in which case that matches only a dot).
7300d656433aSmrg# func_strip_suffix prefix name
7301d656433aSmrgfunc_stripname ()
7302d656433aSmrg{
7303d656433aSmrg  case ${2} in
7304d656433aSmrg    .*) func_stripname_result=`$ECHO "X${3}" \
7305d656433aSmrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7306d656433aSmrg    *)  func_stripname_result=`$ECHO "X${3}" \
7307d656433aSmrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7308d656433aSmrg  esac
7309d656433aSmrg}
7310d656433aSmrg
7311d656433aSmrg# sed scripts:
7312d656433aSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7313d656433aSmrgmy_sed_long_arg='1s/^-[[^=]]*=//'
7314d656433aSmrg
7315d656433aSmrg# func_opt_split
7316d656433aSmrgfunc_opt_split ()
7317d656433aSmrg{
7318d656433aSmrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7319d656433aSmrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7320d656433aSmrg}
7321d656433aSmrg
7322d656433aSmrg# func_lo2o object
7323d656433aSmrgfunc_lo2o ()
7324d656433aSmrg{
7325d656433aSmrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7326d656433aSmrg}
7327d656433aSmrg
7328d656433aSmrg# func_xform libobj-or-source
7329d656433aSmrgfunc_xform ()
7330d656433aSmrg{
7331d656433aSmrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7332d656433aSmrg}
7333d656433aSmrg
7334d656433aSmrg# func_arith arithmetic-term...
7335d656433aSmrgfunc_arith ()
7336d656433aSmrg{
7337d656433aSmrg  func_arith_result=`expr "$[@]"`
7338d656433aSmrg}
7339d656433aSmrg
7340d656433aSmrg# func_len string
7341d656433aSmrg# STRING may not start with a hyphen.
7342d656433aSmrgfunc_len ()
7343d656433aSmrg{
7344d656433aSmrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7345d656433aSmrg}
7346d656433aSmrg
7347d656433aSmrg_LT_EOF
7348d656433aSmrgesac
7349d656433aSmrg
7350d656433aSmrgcase $lt_shell_append in
7351d656433aSmrg  yes)
7352d656433aSmrg    cat << \_LT_EOF >> "$cfgfile"
7353d656433aSmrg
7354d656433aSmrg# func_append var value
7355d656433aSmrg# Append VALUE to the end of shell variable VAR.
7356d656433aSmrgfunc_append ()
7357d656433aSmrg{
7358d656433aSmrg  eval "$[1]+=\$[2]"
7359d656433aSmrg}
7360d656433aSmrg_LT_EOF
7361d656433aSmrg    ;;
7362d656433aSmrg  *)
7363d656433aSmrg    cat << \_LT_EOF >> "$cfgfile"
7364d656433aSmrg
7365d656433aSmrg# func_append var value
7366d656433aSmrg# Append VALUE to the end of shell variable VAR.
7367d656433aSmrgfunc_append ()
7368d656433aSmrg{
7369d656433aSmrg  eval "$[1]=\$$[1]\$[2]"
7370d656433aSmrg}
7371d656433aSmrg
7372d656433aSmrg_LT_EOF
7373d656433aSmrg    ;;
7374d656433aSmrg  esac
7375d656433aSmrg])
7376d656433aSmrg
7377d656433aSmrg# Helper functions for option handling.                    -*- Autoconf -*-
7378d656433aSmrg#
7379d656433aSmrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7380d656433aSmrg#   Written by Gary V. Vaughan, 2004
7381d656433aSmrg#
7382d656433aSmrg# This file is free software; the Free Software Foundation gives
7383d656433aSmrg# unlimited permission to copy and/or distribute it, with or without
7384d656433aSmrg# modifications, as long as this notice is preserved.
7385d656433aSmrg
7386d656433aSmrg# serial 6 ltoptions.m4
7387d656433aSmrg
7388d656433aSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7389d656433aSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7390d656433aSmrg
7391d656433aSmrg
7392d656433aSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7393d656433aSmrg# ------------------------------------------
7394d656433aSmrgm4_define([_LT_MANGLE_OPTION],
7395d656433aSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7396d656433aSmrg
7397d656433aSmrg
7398d656433aSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7399d656433aSmrg# ---------------------------------------
7400d656433aSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7401d656433aSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7402d656433aSmrg# saved as a flag.
7403d656433aSmrgm4_define([_LT_SET_OPTION],
7404d656433aSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7405d656433aSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7406d656433aSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
7407d656433aSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7408d656433aSmrg])
7409d656433aSmrg
7410d656433aSmrg
7411d656433aSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7412d656433aSmrg# ------------------------------------------------------------
7413d656433aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7414d656433aSmrgm4_define([_LT_IF_OPTION],
7415d656433aSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7416d656433aSmrg
7417d656433aSmrg
7418d656433aSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7419d656433aSmrg# -------------------------------------------------------
7420d656433aSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7421d656433aSmrg# are set.
7422d656433aSmrgm4_define([_LT_UNLESS_OPTIONS],
7423d656433aSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7424d656433aSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7425d656433aSmrg		      [m4_define([$0_found])])])[]dnl
7426d656433aSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7427d656433aSmrg])[]dnl
7428d656433aSmrg])
7429d656433aSmrg
7430d656433aSmrg
7431d656433aSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7432d656433aSmrg# ----------------------------------------
7433d656433aSmrg# OPTION-LIST is a space-separated list of Libtool options associated
7434d656433aSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7435d656433aSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7436d656433aSmrg# the unknown option and exit.
7437d656433aSmrgm4_defun([_LT_SET_OPTIONS],
7438d656433aSmrg[# Set options
7439d656433aSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7440d656433aSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
7441d656433aSmrg
7442d656433aSmrgm4_if([$1],[LT_INIT],[
7443d656433aSmrg  dnl
7444d656433aSmrg  dnl Simply set some default values (i.e off) if boolean options were not
7445d656433aSmrg  dnl specified:
7446d656433aSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7447d656433aSmrg  ])
7448d656433aSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7449d656433aSmrg  ])
7450d656433aSmrg  dnl
7451d656433aSmrg  dnl If no reference was made to various pairs of opposing options, then
7452d656433aSmrg  dnl we run the default mode handler for the pair.  For example, if neither
7453d656433aSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7454d656433aSmrg  dnl archives by default:
7455d656433aSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7456d656433aSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7457d656433aSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7458d656433aSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7459d656433aSmrg  		   [_LT_ENABLE_FAST_INSTALL])
7460d656433aSmrg  ])
7461d656433aSmrg])# _LT_SET_OPTIONS
7462d656433aSmrg
7463d656433aSmrg
7464d656433aSmrg
7465d656433aSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7466d656433aSmrg# -----------------------------------------
7467d656433aSmrgm4_define([_LT_MANGLE_DEFUN],
7468d656433aSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7469d656433aSmrg
7470d656433aSmrg
7471d656433aSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7472d656433aSmrg# -----------------------------------------------
7473d656433aSmrgm4_define([LT_OPTION_DEFINE],
7474d656433aSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7475d656433aSmrg])# LT_OPTION_DEFINE
7476d656433aSmrg
7477d656433aSmrg
7478d656433aSmrg# dlopen
7479d656433aSmrg# ------
7480d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7481d656433aSmrg])
7482d656433aSmrg
7483d656433aSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7484d656433aSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7485d656433aSmrgAC_DIAGNOSE([obsolete],
7486d656433aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7487d656433aSmrgput the `dlopen' option into LT_INIT's first parameter.])
7488d656433aSmrg])
7489d656433aSmrg
7490d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7491d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7492d656433aSmrg
7493d656433aSmrg
7494d656433aSmrg# win32-dll
7495d656433aSmrg# ---------
7496d656433aSmrg# Declare package support for building win32 dll's.
7497d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7498d656433aSmrg[enable_win32_dll=yes
7499d656433aSmrg
7500d656433aSmrgcase $host in
7501d656433aSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7502d656433aSmrg  AC_CHECK_TOOL(AS, as, false)
7503d656433aSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7504d656433aSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7505d656433aSmrg  ;;
7506d656433aSmrgesac
7507d656433aSmrg
7508d656433aSmrgtest -z "$AS" && AS=as
7509d656433aSmrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
7510d656433aSmrg
7511d656433aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7512d656433aSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7513d656433aSmrg
7514d656433aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7515d656433aSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7516d656433aSmrg])# win32-dll
7517d656433aSmrg
7518d656433aSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7519d656433aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7520d656433aSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7521d656433aSmrgAC_DIAGNOSE([obsolete],
7522d656433aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7523d656433aSmrgput the `win32-dll' option into LT_INIT's first parameter.])
7524d656433aSmrg])
7525d656433aSmrg
7526d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7527d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7528d656433aSmrg
7529d656433aSmrg
7530d656433aSmrg# _LT_ENABLE_SHARED([DEFAULT])
7531d656433aSmrg# ----------------------------
7532d656433aSmrg# implement the --enable-shared flag, and supports the `shared' and
7533d656433aSmrg# `disable-shared' LT_INIT options.
7534d656433aSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7535d656433aSmrgm4_define([_LT_ENABLE_SHARED],
7536d656433aSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7537d656433aSmrgAC_ARG_ENABLE([shared],
7538d656433aSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7539d656433aSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7540d656433aSmrg    [p=${PACKAGE-default}
7541d656433aSmrg    case $enableval in
7542d656433aSmrg    yes) enable_shared=yes ;;
7543d656433aSmrg    no) enable_shared=no ;;
7544d656433aSmrg    *)
7545d656433aSmrg      enable_shared=no
7546d656433aSmrg      # Look at the argument we got.  We use all the common list separators.
7547d656433aSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7548d656433aSmrg      for pkg in $enableval; do
7549d656433aSmrg	IFS="$lt_save_ifs"
7550d656433aSmrg	if test "X$pkg" = "X$p"; then
7551d656433aSmrg	  enable_shared=yes
7552d656433aSmrg	fi
7553d656433aSmrg      done
7554d656433aSmrg      IFS="$lt_save_ifs"
7555d656433aSmrg      ;;
7556d656433aSmrg    esac],
7557d656433aSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7558d656433aSmrg
7559d656433aSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7560d656433aSmrg	[Whether or not to build shared libraries])
7561d656433aSmrg])# _LT_ENABLE_SHARED
7562d656433aSmrg
7563d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7564d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7565d656433aSmrg
7566d656433aSmrg# Old names:
7567d656433aSmrgAC_DEFUN([AC_ENABLE_SHARED],
7568d656433aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7569d656433aSmrg])
7570d656433aSmrg
7571d656433aSmrgAC_DEFUN([AC_DISABLE_SHARED],
7572d656433aSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7573d656433aSmrg])
7574d656433aSmrg
7575d656433aSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7576d656433aSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7577d656433aSmrg
7578d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7579d656433aSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7580d656433aSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
7581d656433aSmrg
7582d656433aSmrg
7583d656433aSmrg
7584d656433aSmrg# _LT_ENABLE_STATIC([DEFAULT])
7585d656433aSmrg# ----------------------------
7586d656433aSmrg# implement the --enable-static flag, and support the `static' and
7587d656433aSmrg# `disable-static' LT_INIT options.
7588d656433aSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7589d656433aSmrgm4_define([_LT_ENABLE_STATIC],
7590d656433aSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7591d656433aSmrgAC_ARG_ENABLE([static],
7592d656433aSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7593d656433aSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7594d656433aSmrg    [p=${PACKAGE-default}
7595d656433aSmrg    case $enableval in
7596d656433aSmrg    yes) enable_static=yes ;;
7597d656433aSmrg    no) enable_static=no ;;
7598d656433aSmrg    *)
7599d656433aSmrg     enable_static=no
7600d656433aSmrg      # Look at the argument we got.  We use all the common list separators.
7601d656433aSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7602d656433aSmrg      for pkg in $enableval; do
7603d656433aSmrg	IFS="$lt_save_ifs"
7604d656433aSmrg	if test "X$pkg" = "X$p"; then
7605d656433aSmrg	  enable_static=yes
7606d656433aSmrg	fi
7607d656433aSmrg      done
7608d656433aSmrg      IFS="$lt_save_ifs"
7609d656433aSmrg      ;;
7610d656433aSmrg    esac],
7611d656433aSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7612d656433aSmrg
7613d656433aSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
7614d656433aSmrg	[Whether or not to build static libraries])
7615d656433aSmrg])# _LT_ENABLE_STATIC
7616d656433aSmrg
7617d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7618d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7619d656433aSmrg
7620d656433aSmrg# Old names:
7621d656433aSmrgAC_DEFUN([AC_ENABLE_STATIC],
7622d656433aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7623d656433aSmrg])
7624d656433aSmrg
7625d656433aSmrgAC_DEFUN([AC_DISABLE_STATIC],
7626d656433aSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7627d656433aSmrg])
7628d656433aSmrg
7629d656433aSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7630d656433aSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7631d656433aSmrg
7632d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7633d656433aSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7634d656433aSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7635d656433aSmrg
7636d656433aSmrg
7637d656433aSmrg
7638d656433aSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7639d656433aSmrg# ----------------------------------
7640d656433aSmrg# implement the --enable-fast-install flag, and support the `fast-install'
7641d656433aSmrg# and `disable-fast-install' LT_INIT options.
7642d656433aSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7643d656433aSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
7644d656433aSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7645d656433aSmrgAC_ARG_ENABLE([fast-install],
7646d656433aSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7647d656433aSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7648d656433aSmrg    [p=${PACKAGE-default}
7649d656433aSmrg    case $enableval in
7650d656433aSmrg    yes) enable_fast_install=yes ;;
7651d656433aSmrg    no) enable_fast_install=no ;;
7652d656433aSmrg    *)
7653d656433aSmrg      enable_fast_install=no
7654d656433aSmrg      # Look at the argument we got.  We use all the common list separators.
7655d656433aSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7656d656433aSmrg      for pkg in $enableval; do
7657d656433aSmrg	IFS="$lt_save_ifs"
7658d656433aSmrg	if test "X$pkg" = "X$p"; then
7659d656433aSmrg	  enable_fast_install=yes
7660d656433aSmrg	fi
7661d656433aSmrg      done
7662d656433aSmrg      IFS="$lt_save_ifs"
7663d656433aSmrg      ;;
7664d656433aSmrg    esac],
7665d656433aSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7666d656433aSmrg
7667d656433aSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
7668d656433aSmrg	 [Whether or not to optimize for fast installation])dnl
7669d656433aSmrg])# _LT_ENABLE_FAST_INSTALL
7670d656433aSmrg
7671d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7672d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7673d656433aSmrg
7674d656433aSmrg# Old names:
7675d656433aSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7676d656433aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7677d656433aSmrgAC_DIAGNOSE([obsolete],
7678d656433aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7679d656433aSmrgthe `fast-install' option into LT_INIT's first parameter.])
7680d656433aSmrg])
7681d656433aSmrg
7682d656433aSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7683d656433aSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7684d656433aSmrgAC_DIAGNOSE([obsolete],
7685d656433aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7686d656433aSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7687d656433aSmrg])
7688d656433aSmrg
7689d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7690d656433aSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7691d656433aSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7692d656433aSmrg
7693d656433aSmrg
7694d656433aSmrg# _LT_WITH_PIC([MODE])
7695d656433aSmrg# --------------------
7696d656433aSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7697d656433aSmrg# LT_INIT options.
7698d656433aSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7699d656433aSmrgm4_define([_LT_WITH_PIC],
7700d656433aSmrg[AC_ARG_WITH([pic],
7701d656433aSmrg    [AS_HELP_STRING([--with-pic],
7702d656433aSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7703d656433aSmrg    [pic_mode="$withval"],
7704d656433aSmrg    [pic_mode=default])
7705d656433aSmrg
7706d656433aSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7707d656433aSmrg
7708d656433aSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7709d656433aSmrg])# _LT_WITH_PIC
7710d656433aSmrg
7711d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7712d656433aSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7713d656433aSmrg
7714d656433aSmrg# Old name:
7715d656433aSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7716d656433aSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7717d656433aSmrgAC_DIAGNOSE([obsolete],
7718d656433aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7719d656433aSmrgput the `pic-only' option into LT_INIT's first parameter.])
7720d656433aSmrg])
7721d656433aSmrg
7722d656433aSmrgdnl aclocal-1.4 backwards compatibility:
7723d656433aSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7724d656433aSmrg
7725d656433aSmrg
7726d656433aSmrgm4_define([_LTDL_MODE], [])
7727d656433aSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7728d656433aSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7729d656433aSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7730d656433aSmrg		 [m4_define([_LTDL_MODE], [recursive])])
7731d656433aSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7732d656433aSmrg		 [m4_define([_LTDL_MODE], [subproject])])
7733d656433aSmrg
7734d656433aSmrgm4_define([_LTDL_TYPE], [])
7735d656433aSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7736d656433aSmrg		 [m4_define([_LTDL_TYPE], [installable])])
7737d656433aSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7738d656433aSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
7739d656433aSmrg
7740d656433aSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7741d656433aSmrg#
7742d656433aSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7743d656433aSmrg# Written by Gary V. Vaughan, 2004
7744d656433aSmrg#
7745d656433aSmrg# This file is free software; the Free Software Foundation gives
7746d656433aSmrg# unlimited permission to copy and/or distribute it, with or without
7747d656433aSmrg# modifications, as long as this notice is preserved.
7748d656433aSmrg
7749d656433aSmrg# serial 6 ltsugar.m4
7750d656433aSmrg
7751d656433aSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7752d656433aSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7753d656433aSmrg
7754d656433aSmrg
7755d656433aSmrg# lt_join(SEP, ARG1, [ARG2...])
7756d656433aSmrg# -----------------------------
7757d656433aSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7758d656433aSmrg# associated separator.
7759d656433aSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7760d656433aSmrg# versions in m4sugar had bugs.
7761d656433aSmrgm4_define([lt_join],
7762d656433aSmrg[m4_if([$#], [1], [],
7763d656433aSmrg       [$#], [2], [[$2]],
7764d656433aSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7765d656433aSmrgm4_define([_lt_join],
7766d656433aSmrg[m4_if([$#$2], [2], [],
7767d656433aSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7768d656433aSmrg
7769d656433aSmrg
7770d656433aSmrg# lt_car(LIST)
7771d656433aSmrg# lt_cdr(LIST)
7772d656433aSmrg# ------------
7773d656433aSmrg# Manipulate m4 lists.
7774d656433aSmrg# These macros are necessary as long as will still need to support
7775d656433aSmrg# Autoconf-2.59 which quotes differently.
7776d656433aSmrgm4_define([lt_car], [[$1]])
7777d656433aSmrgm4_define([lt_cdr],
7778d656433aSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7779d656433aSmrg       [$#], 1, [],
7780d656433aSmrg       [m4_dquote(m4_shift($@))])])
7781d656433aSmrgm4_define([lt_unquote], $1)
7782d656433aSmrg
7783d656433aSmrg
7784d656433aSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7785d656433aSmrg# ------------------------------------------
7786d656433aSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7787d656433aSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7788d656433aSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7789d656433aSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7790d656433aSmrg# than defined and empty).
7791d656433aSmrg#
7792d656433aSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7793d656433aSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7794d656433aSmrgm4_define([lt_append],
7795d656433aSmrg[m4_define([$1],
7796d656433aSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7797d656433aSmrg
7798d656433aSmrg
7799d656433aSmrg
7800d656433aSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7801d656433aSmrg# ----------------------------------------------------------
7802d656433aSmrg# Produce a SEP delimited list of all paired combinations of elements of
7803d656433aSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7804d656433aSmrg# has the form PREFIXmINFIXSUFFIXn.
7805d656433aSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7806d656433aSmrgm4_define([lt_combine],
7807d656433aSmrg[m4_if(m4_eval([$# > 3]), [1],
7808d656433aSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7809d656433aSmrg[[m4_foreach([_Lt_prefix], [$2],
7810d656433aSmrg	     [m4_foreach([_Lt_suffix],
7811d656433aSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7812d656433aSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7813d656433aSmrg
7814d656433aSmrg
7815d656433aSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7816d656433aSmrg# -----------------------------------------------------------------------
7817d656433aSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7818d656433aSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7819d656433aSmrgm4_define([lt_if_append_uniq],
7820d656433aSmrg[m4_ifdef([$1],
7821d656433aSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7822d656433aSmrg		 [lt_append([$1], [$2], [$3])$4],
7823d656433aSmrg		 [$5])],
7824d656433aSmrg	  [lt_append([$1], [$2], [$3])$4])])
7825d656433aSmrg
7826d656433aSmrg
7827d656433aSmrg# lt_dict_add(DICT, KEY, VALUE)
7828d656433aSmrg# -----------------------------
7829d656433aSmrgm4_define([lt_dict_add],
7830d656433aSmrg[m4_define([$1($2)], [$3])])
7831d656433aSmrg
7832d656433aSmrg
7833d656433aSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7834d656433aSmrg# --------------------------------------------
7835d656433aSmrgm4_define([lt_dict_add_subkey],
7836d656433aSmrg[m4_define([$1($2:$3)], [$4])])
7837d656433aSmrg
7838d656433aSmrg
7839d656433aSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7840d656433aSmrg# ----------------------------------
7841d656433aSmrgm4_define([lt_dict_fetch],
7842d656433aSmrg[m4_ifval([$3],
7843d656433aSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7844d656433aSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7845d656433aSmrg
7846d656433aSmrg
7847d656433aSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7848d656433aSmrg# -----------------------------------------------------------------
7849d656433aSmrgm4_define([lt_if_dict_fetch],
7850d656433aSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7851d656433aSmrg	[$5],
7852d656433aSmrg    [$6])])
7853d656433aSmrg
7854d656433aSmrg
7855d656433aSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7856d656433aSmrg# --------------------------------------------------------------
7857d656433aSmrgm4_define([lt_dict_filter],
7858d656433aSmrg[m4_if([$5], [], [],
7859d656433aSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7860d656433aSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7861d656433aSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7862d656433aSmrg])
7863d656433aSmrg
7864d656433aSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7865d656433aSmrg#
7866d656433aSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7867d656433aSmrg#   Written by Scott James Remnant, 2004
7868d656433aSmrg#
7869d656433aSmrg# This file is free software; the Free Software Foundation gives
7870d656433aSmrg# unlimited permission to copy and/or distribute it, with or without
7871d656433aSmrg# modifications, as long as this notice is preserved.
7872d656433aSmrg
7873d656433aSmrg# Generated from ltversion.in.
7874d656433aSmrg
7875d656433aSmrg# serial 3012 ltversion.m4
7876d656433aSmrg# This file is part of GNU Libtool
7877d656433aSmrg
7878d656433aSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
7879d656433aSmrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7880d656433aSmrg
7881d656433aSmrgAC_DEFUN([LTVERSION_VERSION],
7882d656433aSmrg[macro_version='2.2.6'
7883d656433aSmrgmacro_revision='1.3012'
7884d656433aSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7885d656433aSmrg_LT_DECL(, macro_revision, 0)
7886126a8a12Smrg])
7887126a8a12Smrg
7888d656433aSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7889d656433aSmrg#
7890d656433aSmrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7891d656433aSmrg#   Written by Scott James Remnant, 2004.
7892d656433aSmrg#
7893d656433aSmrg# This file is free software; the Free Software Foundation gives
7894d656433aSmrg# unlimited permission to copy and/or distribute it, with or without
7895d656433aSmrg# modifications, as long as this notice is preserved.
7896d656433aSmrg
7897d656433aSmrg# serial 4 lt~obsolete.m4
7898d656433aSmrg
7899d656433aSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
7900d656433aSmrg#
7901d656433aSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7902d656433aSmrg# which have later been changed to m4_define as they aren't part of the
7903d656433aSmrg# exported API, or moved to Autoconf or Automake where they belong.
7904d656433aSmrg#
7905d656433aSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7906d656433aSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7907d656433aSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
7908d656433aSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7909d656433aSmrg# and doesn't know about Autoconf macros at all.)
7910d656433aSmrg#
7911d656433aSmrg# So we provide this file, which has a silly filename so it's always
7912d656433aSmrg# included after everything else.  This provides aclocal with the
7913d656433aSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7914d656433aSmrg# because those macros already exist, or will be overwritten later.
7915d656433aSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7916d656433aSmrg#
7917d656433aSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7918d656433aSmrg# Yes, that means every name once taken will need to remain here until
7919d656433aSmrg# we give up compatibility with versions before 1.7, at which point
7920d656433aSmrg# we need to keep only those names which we still refer to.
7921d656433aSmrg
7922d656433aSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7923d656433aSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7924d656433aSmrg
7925d656433aSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7926d656433aSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7927d656433aSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7928d656433aSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7929d656433aSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7930d656433aSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7931d656433aSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7932d656433aSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7933d656433aSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7934d656433aSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7935d656433aSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7936d656433aSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7937d656433aSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7938d656433aSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7939d656433aSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7940d656433aSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7941d656433aSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7942d656433aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7943d656433aSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7944d656433aSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7945d656433aSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7946d656433aSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7947d656433aSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7948d656433aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7949d656433aSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7950d656433aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7951d656433aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7952d656433aSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7953d656433aSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7954d656433aSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7955d656433aSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7956d656433aSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7957d656433aSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7958d656433aSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7959d656433aSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7960d656433aSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7961d656433aSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7962d656433aSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7963d656433aSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7964d656433aSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7965d656433aSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7966d656433aSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7967d656433aSmrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7968d656433aSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7969d656433aSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7970d656433aSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7971d656433aSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7972d656433aSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7973d656433aSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7974d656433aSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7975d656433aSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7976d656433aSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7977d656433aSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7978d656433aSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7979d656433aSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7980d656433aSmrg
7981126a8a12Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7982126a8a12Smrg# 
7983126a8a12Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7984126a8a12Smrg#
7985126a8a12Smrg# This program is free software; you can redistribute it and/or modify
7986126a8a12Smrg# it under the terms of the GNU General Public License as published by
7987126a8a12Smrg# the Free Software Foundation; either version 2 of the License, or
7988126a8a12Smrg# (at your option) any later version.
7989126a8a12Smrg#
7990126a8a12Smrg# This program is distributed in the hope that it will be useful, but
7991126a8a12Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7992126a8a12Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7993126a8a12Smrg# General Public License for more details.
7994126a8a12Smrg#
7995126a8a12Smrg# You should have received a copy of the GNU General Public License
7996126a8a12Smrg# along with this program; if not, write to the Free Software
7997126a8a12Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7998126a8a12Smrg#
7999126a8a12Smrg# As a special exception to the GNU General Public License, if you
8000126a8a12Smrg# distribute this file as part of a program that contains a
8001126a8a12Smrg# configuration script generated by Autoconf, you may include it under
8002126a8a12Smrg# the same distribution terms that you use for the rest of that program.
8003126a8a12Smrg
8004126a8a12Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8005126a8a12Smrg# ----------------------------------
8006126a8a12SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
8007126a8a12Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8008126a8a12Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8009126a8a12SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8010126a8a12Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8011126a8a12Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8012126a8a12Smrgfi
8013126a8a12Smrgif test -n "$PKG_CONFIG"; then
8014126a8a12Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
8015126a8a12Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8016126a8a12Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8017126a8a12Smrg		AC_MSG_RESULT([yes])
8018126a8a12Smrg	else
8019126a8a12Smrg		AC_MSG_RESULT([no])
8020126a8a12Smrg		PKG_CONFIG=""
8021126a8a12Smrg	fi
8022126a8a12Smrg		
8023126a8a12Smrgfi[]dnl
8024126a8a12Smrg])# PKG_PROG_PKG_CONFIG
8025126a8a12Smrg
8026126a8a12Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8027126a8a12Smrg#
8028126a8a12Smrg# Check to see whether a particular set of modules exists.  Similar
8029126a8a12Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8030126a8a12Smrg#
8031126a8a12Smrg#
8032126a8a12Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8033126a8a12Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
8034126a8a12Smrg# PKG_CHECK_EXISTS manually
8035126a8a12Smrg# --------------------------------------------------------------
8036126a8a12SmrgAC_DEFUN([PKG_CHECK_EXISTS],
8037126a8a12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8038126a8a12Smrgif test -n "$PKG_CONFIG" && \
8039126a8a12Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8040126a8a12Smrg  m4_ifval([$2], [$2], [:])
8041126a8a12Smrgm4_ifvaln([$3], [else
8042126a8a12Smrg  $3])dnl
8043126a8a12Smrgfi])
8044126a8a12Smrg
8045126a8a12Smrg
8046126a8a12Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8047126a8a12Smrg# ---------------------------------------------
8048126a8a12Smrgm4_define([_PKG_CONFIG],
8049d656433aSmrg[if test -n "$$1"; then
8050d656433aSmrg    pkg_cv_[]$1="$$1"
8051d656433aSmrg elif test -n "$PKG_CONFIG"; then
8052d656433aSmrg    PKG_CHECK_EXISTS([$3],
8053d656433aSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8054d656433aSmrg		     [pkg_failed=yes])
8055d656433aSmrg else
8056d656433aSmrg    pkg_failed=untried
8057126a8a12Smrgfi[]dnl
8058126a8a12Smrg])# _PKG_CONFIG
8059126a8a12Smrg
8060126a8a12Smrg# _PKG_SHORT_ERRORS_SUPPORTED
8061126a8a12Smrg# -----------------------------
8062126a8a12SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8063126a8a12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8064126a8a12Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8065126a8a12Smrg        _pkg_short_errors_supported=yes
8066126a8a12Smrgelse
8067126a8a12Smrg        _pkg_short_errors_supported=no
8068126a8a12Smrgfi[]dnl
8069126a8a12Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
8070126a8a12Smrg
8071126a8a12Smrg
8072126a8a12Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8073126a8a12Smrg# [ACTION-IF-NOT-FOUND])
8074126a8a12Smrg#
8075126a8a12Smrg#
8076126a8a12Smrg# Note that if there is a possibility the first call to
8077126a8a12Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8078126a8a12Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8079126a8a12Smrg#
8080126a8a12Smrg#
8081126a8a12Smrg# --------------------------------------------------------------
8082126a8a12SmrgAC_DEFUN([PKG_CHECK_MODULES],
8083126a8a12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8084126a8a12SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8085126a8a12SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8086126a8a12Smrg
8087126a8a12Smrgpkg_failed=no
8088126a8a12SmrgAC_MSG_CHECKING([for $1])
8089126a8a12Smrg
8090126a8a12Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8091126a8a12Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8092126a8a12Smrg
8093126a8a12Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8094126a8a12Smrgand $1[]_LIBS to avoid the need to call pkg-config.
8095126a8a12SmrgSee the pkg-config man page for more details.])
8096126a8a12Smrg
8097126a8a12Smrgif test $pkg_failed = yes; then
8098126a8a12Smrg        _PKG_SHORT_ERRORS_SUPPORTED
8099126a8a12Smrg        if test $_pkg_short_errors_supported = yes; then
8100d656433aSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8101126a8a12Smrg        else 
8102d656433aSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8103126a8a12Smrg        fi
8104126a8a12Smrg	# Put the nasty error message in config.log where it belongs
8105126a8a12Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8106126a8a12Smrg
8107126a8a12Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8108126a8a12Smrg[Package requirements ($2) were not met:
8109126a8a12Smrg
8110126a8a12Smrg$$1_PKG_ERRORS
8111126a8a12Smrg
8112126a8a12SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8113126a8a12Smrginstalled software in a non-standard prefix.
8114126a8a12Smrg
8115126a8a12Smrg_PKG_TEXT
8116126a8a12Smrg])],
8117126a8a12Smrg		[AC_MSG_RESULT([no])
8118126a8a12Smrg                $4])
8119126a8a12Smrgelif test $pkg_failed = untried; then
8120126a8a12Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8121126a8a12Smrg[The pkg-config script could not be found or is too old.  Make sure it
8122126a8a12Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
8123126a8a12Smrgpath to pkg-config.
8124126a8a12Smrg
8125126a8a12Smrg_PKG_TEXT
8126126a8a12Smrg
8127d656433aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8128126a8a12Smrg		[$4])
8129126a8a12Smrgelse
8130126a8a12Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8131126a8a12Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8132126a8a12Smrg        AC_MSG_RESULT([yes])
8133126a8a12Smrg	ifelse([$3], , :, [$3])
8134126a8a12Smrgfi[]dnl
8135126a8a12Smrg])# PKG_CHECK_MODULES
8136126a8a12Smrg
8137d656433aSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
8138d656433aSmrgdnl
8139d656433aSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
8140d656433aSmrgdnl 
8141d656433aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
8142d656433aSmrgdnl copy of this software and associated documentation files (the
8143d656433aSmrgdnl "Software"), to deal in the Software without restriction, including
8144d656433aSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
8145d656433aSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
8146d656433aSmrgdnl to whom the Software is furnished to do so, provided that the above
8147d656433aSmrgdnl copyright notice(s) and this permission notice appear in all copies of
8148d656433aSmrgdnl the Software and that both the above copyright notice(s) and this
8149d656433aSmrgdnl permission notice appear in supporting documentation.
8150d656433aSmrgdnl
8151d656433aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8152d656433aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8153d656433aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
8154d656433aSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
8155d656433aSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
8156d656433aSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
8157d656433aSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
8158d656433aSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
8159d656433aSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
8160d656433aSmrgdnl
8161d656433aSmrgdnl Except as contained in this notice, the name of a copyright holder
8162d656433aSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
8163d656433aSmrgdnl or other dealings in this Software without prior written authorization
8164d656433aSmrgdnl of the copyright holder.
8165d656433aSmrg
8166d656433aSmrg# XORG_MACROS_VERSION(required-version)
8167d656433aSmrg# -------------------------------------
8168d656433aSmrg# Minimum version: 1.1.0
8169d656433aSmrg#
8170d656433aSmrg# If you're using a macro added in Version 1.1 or newer, include this in
8171d656433aSmrg# your configure.ac with the minimum required version, such as:
8172d656433aSmrg# XORG_MACROS_VERSION(1.1)
8173d656433aSmrg#
8174d656433aSmrg# To ensure that this macro is defined, also add:
8175d656433aSmrg# m4_ifndef([XORG_MACROS_VERSION],
8176d656433aSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
8177d656433aSmrg#
8178d656433aSmrg#
8179d656433aSmrg# See the "minimum version" comment for each macro you use to see what 
8180d656433aSmrg# version you require.
8181d656433aSmrgm4_defun([XORG_MACROS_VERSION],[
8182d656433aSmrgm4_define([vers_have], [1.2.2])
8183d656433aSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
8184d656433aSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
8185d656433aSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
8186d656433aSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
8187d656433aSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
8188d656433aSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
8189d656433aSmrgm4_undefine([vers_have])
8190d656433aSmrgm4_undefine([maj_have])
8191d656433aSmrgm4_undefine([maj_needed])
8192d656433aSmrg]) # XORG_MACROS_VERSION
8193d656433aSmrg
8194d656433aSmrg# XORG_PROG_RAWCPP()
8195d656433aSmrg# ------------------
8196d656433aSmrg# Minimum version: 1.0.0
8197d656433aSmrg#
8198d656433aSmrg# Find cpp program and necessary flags for use in pre-processing text files
8199d656433aSmrg# such as man pages and config files
8200d656433aSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
8201d656433aSmrgAC_REQUIRE([AC_PROG_CPP])
8202d656433aSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
8203d656433aSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
8204d656433aSmrg
8205d656433aSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
8206d656433aSmrg# which is not the best choice for supporting other OS'es, but covers most
8207d656433aSmrg# of the ones we need for now.
8208d656433aSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
8209d656433aSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
8210d656433aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8211d656433aSmrg	AC_MSG_RESULT([no])
8212d656433aSmrgelse
8213d656433aSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8214d656433aSmrg		RAWCPPFLAGS=-undef
8215d656433aSmrg		AC_MSG_RESULT([yes])
8216d656433aSmrg	# under Cygwin unix is still defined even with -undef
8217d656433aSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8218d656433aSmrg		RAWCPPFLAGS="-undef -ansi"
8219d656433aSmrg		AC_MSG_RESULT([yes, with -ansi])
8220d656433aSmrg	else
8221d656433aSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
8222d656433aSmrg	fi
8223d656433aSmrgfi
8224d656433aSmrgrm -f conftest.$ac_ext
8225d656433aSmrg
8226d656433aSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
8227d656433aSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
8228d656433aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8229d656433aSmrg	AC_MSG_RESULT([no])
8230d656433aSmrgelse
8231d656433aSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8232d656433aSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
8233d656433aSmrg		AC_MSG_RESULT([yes])
8234d656433aSmrg	else
8235d656433aSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
8236d656433aSmrg	fi
8237d656433aSmrgfi
8238d656433aSmrgrm -f conftest.$ac_ext
8239d656433aSmrgAC_SUBST(RAWCPPFLAGS)
8240d656433aSmrg]) # XORG_PROG_RAWCPP
8241d656433aSmrg
8242d656433aSmrg# XORG_MANPAGE_SECTIONS()
8243d656433aSmrg# -----------------------
8244d656433aSmrg# Minimum version: 1.0.0
8245d656433aSmrg#
8246d656433aSmrg# Determine which sections man pages go in for the different man page types
8247d656433aSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
8248d656433aSmrg# Not sure if there's any better way than just hardcoding by OS name.
8249d656433aSmrg# Override default settings by setting environment variables
8250d656433aSmrg
8251d656433aSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
8252d656433aSmrgAC_REQUIRE([AC_CANONICAL_HOST])
8253d656433aSmrg
8254d656433aSmrgif test x$APP_MAN_SUFFIX = x    ; then
8255d656433aSmrg    APP_MAN_SUFFIX=1
8256d656433aSmrgfi
8257d656433aSmrgif test x$APP_MAN_DIR = x    ; then
8258d656433aSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
8259d656433aSmrgfi
8260d656433aSmrg
8261d656433aSmrgif test x$LIB_MAN_SUFFIX = x    ; then
8262d656433aSmrg    LIB_MAN_SUFFIX=3
8263d656433aSmrgfi
8264d656433aSmrgif test x$LIB_MAN_DIR = x    ; then
8265d656433aSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
8266d656433aSmrgfi
8267d656433aSmrg
8268d656433aSmrgif test x$FILE_MAN_SUFFIX = x    ; then
8269d656433aSmrg    case $host_os in
8270d656433aSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
8271d656433aSmrg	*)		FILE_MAN_SUFFIX=5  ;;
8272d656433aSmrg    esac
8273d656433aSmrgfi
8274d656433aSmrgif test x$FILE_MAN_DIR = x    ; then
8275d656433aSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
8276d656433aSmrgfi
8277d656433aSmrg
8278d656433aSmrgif test x$MISC_MAN_SUFFIX = x    ; then
8279d656433aSmrg    case $host_os in
8280d656433aSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
8281d656433aSmrg	*)		MISC_MAN_SUFFIX=7  ;;
8282d656433aSmrg    esac
8283d656433aSmrgfi
8284d656433aSmrgif test x$MISC_MAN_DIR = x    ; then
8285d656433aSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
8286d656433aSmrgfi
8287d656433aSmrg
8288d656433aSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
8289d656433aSmrg    case $host_os in
8290d656433aSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
8291d656433aSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
8292d656433aSmrg    esac
8293d656433aSmrgfi
8294d656433aSmrgif test x$DRIVER_MAN_DIR = x    ; then
8295d656433aSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
8296d656433aSmrgfi
8297d656433aSmrg
8298d656433aSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
8299d656433aSmrg    case $host_os in
8300d656433aSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
8301d656433aSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
8302d656433aSmrg    esac
8303d656433aSmrgfi
8304d656433aSmrgif test x$ADMIN_MAN_DIR = x    ; then
8305d656433aSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
8306d656433aSmrgfi
8307d656433aSmrg
8308d656433aSmrg
8309d656433aSmrgAC_SUBST([APP_MAN_SUFFIX])
8310d656433aSmrgAC_SUBST([LIB_MAN_SUFFIX])
8311d656433aSmrgAC_SUBST([FILE_MAN_SUFFIX])
8312d656433aSmrgAC_SUBST([MISC_MAN_SUFFIX])
8313d656433aSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
8314d656433aSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
8315d656433aSmrgAC_SUBST([APP_MAN_DIR])
8316d656433aSmrgAC_SUBST([LIB_MAN_DIR])
8317d656433aSmrgAC_SUBST([FILE_MAN_DIR])
8318d656433aSmrgAC_SUBST([MISC_MAN_DIR])
8319d656433aSmrgAC_SUBST([DRIVER_MAN_DIR])
8320d656433aSmrgAC_SUBST([ADMIN_MAN_DIR])
8321d656433aSmrg]) # XORG_MANPAGE_SECTIONS
8322d656433aSmrg
8323d656433aSmrg# XORG_CHECK_LINUXDOC
8324d656433aSmrg# -------------------
8325d656433aSmrg# Minimum version: 1.0.0
8326d656433aSmrg#
8327d656433aSmrg# Defines the variable MAKE_TEXT if the necessary tools and
8328d656433aSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
8329d656433aSmrg# Whether or not the necessary tools and files are found can be checked
8330d656433aSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
8331d656433aSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
8332d656433aSmrgif test x$XORG_SGML_PATH = x ; then
8333d656433aSmrg    XORG_SGML_PATH=$prefix/share/sgml
8334d656433aSmrgfi
8335d656433aSmrgHAVE_DEFS_ENT=
8336d656433aSmrg
8337d656433aSmrgif test x"$cross_compiling" = x"yes" ; then
8338d656433aSmrg  HAVE_DEFS_ENT=no
8339d656433aSmrgelse
8340d656433aSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8341d656433aSmrgfi
8342d656433aSmrg
8343d656433aSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
8344d656433aSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
8345d656433aSmrg
8346d656433aSmrgAC_MSG_CHECKING([Whether to build documentation])
8347d656433aSmrg
8348d656433aSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
8349d656433aSmrg   BUILDDOC=yes
8350d656433aSmrgelse
8351d656433aSmrg   BUILDDOC=no
8352d656433aSmrgfi
8353d656433aSmrg
8354d656433aSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
8355d656433aSmrg
8356d656433aSmrgAC_MSG_RESULT([$BUILDDOC])
8357d656433aSmrg
8358d656433aSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
8359d656433aSmrg
8360d656433aSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
8361d656433aSmrg   BUILDPDFDOC=yes
8362d656433aSmrgelse
8363d656433aSmrg   BUILDPDFDOC=no
8364d656433aSmrgfi
8365d656433aSmrg
8366d656433aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8367d656433aSmrg
8368d656433aSmrgAC_MSG_RESULT([$BUILDPDFDOC])
8369d656433aSmrg
8370d656433aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
8371d656433aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
8372d656433aSmrgMAKE_PDF="$PS2PDF"
8373d656433aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
8374d656433aSmrg
8375d656433aSmrgAC_SUBST(MAKE_TEXT)
8376d656433aSmrgAC_SUBST(MAKE_PS)
8377d656433aSmrgAC_SUBST(MAKE_PDF)
8378d656433aSmrgAC_SUBST(MAKE_HTML)
8379d656433aSmrg]) # XORG_CHECK_LINUXDOC
8380d656433aSmrg
8381d656433aSmrg# XORG_CHECK_DOCBOOK
8382d656433aSmrg# -------------------
8383d656433aSmrg# Minimum version: 1.0.0
8384d656433aSmrg#
8385d656433aSmrg# Checks for the ability to build output formats from SGML DocBook source.
8386d656433aSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
8387d656433aSmrg# indicates whether the necessary tools and files are found and, if set,
8388d656433aSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
8389d656433aSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
8390d656433aSmrgif test x$XORG_SGML_PATH = x ; then
8391d656433aSmrg    XORG_SGML_PATH=$prefix/share/sgml
8392d656433aSmrgfi
8393d656433aSmrgHAVE_DEFS_ENT=
8394d656433aSmrgBUILDTXTDOC=no
8395d656433aSmrgBUILDPDFDOC=no
8396d656433aSmrgBUILDPSDOC=no
8397d656433aSmrgBUILDHTMLDOC=no
8398d656433aSmrg
8399d656433aSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8400d656433aSmrg
8401d656433aSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
8402d656433aSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
8403d656433aSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
8404d656433aSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
8405d656433aSmrg
8406d656433aSmrgAC_MSG_CHECKING([Whether to build text documentation])
8407d656433aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
8408d656433aSmrg   test x$BUILD_TXTDOC != xno; then
8409d656433aSmrg	BUILDTXTDOC=yes
8410d656433aSmrgfi
8411d656433aSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
8412d656433aSmrgAC_MSG_RESULT([$BUILDTXTDOC])
8413d656433aSmrg
8414d656433aSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
8415d656433aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
8416d656433aSmrg   test x$BUILD_PDFDOC != xno; then
8417d656433aSmrg	BUILDPDFDOC=yes
8418d656433aSmrgfi
8419d656433aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8420d656433aSmrgAC_MSG_RESULT([$BUILDPDFDOC])
8421d656433aSmrg
8422d656433aSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
8423d656433aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
8424d656433aSmrg   test x$BUILD_PSDOC != xno; then
8425d656433aSmrg	BUILDPSDOC=yes
8426d656433aSmrgfi
8427d656433aSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
8428d656433aSmrgAC_MSG_RESULT([$BUILDPSDOC])
8429d656433aSmrg
8430d656433aSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
8431d656433aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
8432d656433aSmrg   test x$BUILD_HTMLDOC != xno; then
8433d656433aSmrg	BUILDHTMLDOC=yes
8434d656433aSmrgfi
8435d656433aSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
8436d656433aSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
8437d656433aSmrg
8438d656433aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
8439d656433aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
8440d656433aSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
8441d656433aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
8442d656433aSmrg
8443d656433aSmrgAC_SUBST(MAKE_TEXT)
8444d656433aSmrgAC_SUBST(MAKE_PS)
8445d656433aSmrgAC_SUBST(MAKE_PDF)
8446d656433aSmrgAC_SUBST(MAKE_HTML)
8447d656433aSmrg]) # XORG_CHECK_DOCBOOK
8448d656433aSmrg
8449d656433aSmrg# XORG_CHECK_MALLOC_ZERO
8450d656433aSmrg# ----------------------
8451d656433aSmrg# Minimum version: 1.0.0
8452d656433aSmrg#
8453d656433aSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
8454d656433aSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
8455d656433aSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
8456d656433aSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
8457d656433aSmrgAC_ARG_ENABLE(malloc0returnsnull,
8458d656433aSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
8459d656433aSmrg		       [malloc(0) returns NULL (default: auto)]),
8460d656433aSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
8461d656433aSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
8462d656433aSmrg
8463d656433aSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
8464d656433aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
8465d656433aSmrg	AC_RUN_IFELSE([
8466d656433aSmrgchar *malloc();
8467d656433aSmrgchar *realloc();
8468d656433aSmrgchar *calloc();
8469d656433aSmrgmain() {
8470d656433aSmrg    char *m0, *r0, *c0, *p;
8471d656433aSmrg    m0 = malloc(0);
8472d656433aSmrg    p = malloc(10);
8473d656433aSmrg    r0 = realloc(p,0);
8474d656433aSmrg    c0 = calloc(0);
8475d656433aSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
8476d656433aSmrg}],
8477d656433aSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
8478d656433aSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
8479d656433aSmrgfi
8480d656433aSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
8481d656433aSmrg
8482d656433aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
8483d656433aSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
8484d656433aSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
8485d656433aSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
8486d656433aSmrgelse
8487d656433aSmrg	MALLOC_ZERO_CFLAGS=""
8488d656433aSmrg	XMALLOC_ZERO_CFLAGS=""
8489d656433aSmrg	XTMALLOC_ZERO_CFLAGS=""
8490d656433aSmrgfi
8491d656433aSmrg
8492d656433aSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
8493d656433aSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
8494d656433aSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
8495d656433aSmrg]) # XORG_CHECK_MALLOC_ZERO
8496d656433aSmrg
8497d656433aSmrg# XORG_WITH_LINT()
8498d656433aSmrg# ----------------
8499d656433aSmrg# Minimum version: 1.1.0
8500d656433aSmrg#
8501d656433aSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
8502d656433aSmrg# is specified.   (Use --with-lint=sparse for sparse.)
8503d656433aSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
8504d656433aSmrg# Sets $LINT_FLAGS to flags to pass to source checker
8505d656433aSmrg# Sets LINT automake conditional if enabled (default: disabled)
8506d656433aSmrg#
8507d656433aSmrgAC_DEFUN([XORG_WITH_LINT],[
8508d656433aSmrg
8509d656433aSmrg# Allow checking code with lint, sparse, etc.
8510d656433aSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
8511d656433aSmrg		[Use a lint-style source code checker (default: disabled)])],
8512d656433aSmrg		[use_lint=$withval], [use_lint=no])
8513d656433aSmrgif test "x$use_lint" = "xyes" ; then
8514d656433aSmrg	LINT="lint"
8515d656433aSmrgelse
8516d656433aSmrg	LINT="$use_lint"
8517d656433aSmrgfi
8518d656433aSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
8519d656433aSmrg    case $LINT in
8520d656433aSmrg	lint|*/lint)
8521d656433aSmrg	    case $host_os in
8522d656433aSmrg		solaris*)
8523d656433aSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
8524d656433aSmrg			;;
8525d656433aSmrg	    esac
8526d656433aSmrg	    ;;
8527d656433aSmrg    esac
8528d656433aSmrgfi
8529d656433aSmrg
8530d656433aSmrgAC_SUBST(LINT)
8531d656433aSmrgAC_SUBST(LINT_FLAGS)
8532d656433aSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
8533d656433aSmrg
8534d656433aSmrg]) # XORG_WITH_LINT
8535d656433aSmrg
8536d656433aSmrg# XORG_LINT_LIBRARY(LIBNAME)
8537d656433aSmrg# --------------------------
8538d656433aSmrg# Minimum version: 1.1.0
8539d656433aSmrg#
8540d656433aSmrg# Sets up flags for building lint libraries for checking programs that call
8541d656433aSmrg# functions in the library.
8542d656433aSmrg# Disabled by default, enable with --enable-lint-library
8543d656433aSmrg# Sets: 
8544d656433aSmrg#	@LINTLIB@		- name of lint library file to make
8545d656433aSmrg#	MAKE_LINT_LIB		- automake conditional
8546d656433aSmrg#
8547d656433aSmrg
8548d656433aSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
8549d656433aSmrgAC_REQUIRE([XORG_WITH_LINT])
8550d656433aSmrg# Build lint "library" for more indepth checks of programs calling this library
8551d656433aSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
8552d656433aSmrg	[Create lint library (default: disabled)])],
8553d656433aSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
8554d656433aSmrgif test "x$make_lint_lib" != "xno" ; then
8555d656433aSmrg	if test "x$LINT" = "xno" ; then
8556d656433aSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
8557d656433aSmrg	fi
8558d656433aSmrg	if test "x$make_lint_lib" = "xyes" ; then
8559d656433aSmrg		LINTLIB=llib-l$1.ln
8560d656433aSmrg	else
8561d656433aSmrg		LINTLIB=$make_lint_lib
8562d656433aSmrg	fi
8563d656433aSmrgfi
8564d656433aSmrgAC_SUBST(LINTLIB)
8565d656433aSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
8566d656433aSmrg
8567d656433aSmrg]) # XORG_LINT_LIBRARY
8568d656433aSmrg
8569d656433aSmrg# XORG_CWARNFLAGS
8570d656433aSmrg# ---------------
8571d656433aSmrg# Minimum version: 1.2.0
8572d656433aSmrg#
8573d656433aSmrg# Defines CWARNFLAGS to enable C compiler warnings.
8574d656433aSmrg#
8575d656433aSmrgAC_DEFUN([XORG_CWARNFLAGS], [
8576d656433aSmrgAC_REQUIRE([AC_PROG_CC])
8577d656433aSmrgif  test "x$GCC" = xyes ; then
8578d656433aSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
8579d656433aSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
8580d656433aSmrg-Wbad-function-cast"
8581d656433aSmrg    case `$CC -dumpversion` in
8582d656433aSmrg    3.4.* | 4.*)
8583d656433aSmrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
8584d656433aSmrg	;;
8585d656433aSmrg    esac
8586d656433aSmrgelse
8587d656433aSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
8588d656433aSmrg    if test "x$SUNCC" = "xyes"; then
8589d656433aSmrg	CWARNFLAGS="-v"
8590d656433aSmrg    fi
8591d656433aSmrgfi
8592d656433aSmrgAC_SUBST(CWARNFLAGS)
8593d656433aSmrg]) # XORG_CWARNFLAGS
8594126a8a12Smrgdnl Copyright 2005 Red Hat, Inc
8595126a8a12Smrgdnl
8596126a8a12Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
8597126a8a12Smrgdnl documentation for any purpose is hereby granted without fee, provided that
8598126a8a12Smrgdnl the above copyright notice appear in all copies and that both that
8599126a8a12Smrgdnl copyright notice and this permission notice appear in supporting
8600126a8a12Smrgdnl documentation.
8601126a8a12Smrgdnl
8602126a8a12Smrgdnl The above copyright notice and this permission notice shall be included
8603126a8a12Smrgdnl in all copies or substantial portions of the Software.
8604126a8a12Smrgdnl
8605126a8a12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8606126a8a12Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8607126a8a12Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8608126a8a12Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
8609126a8a12Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8610126a8a12Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8611126a8a12Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
8612126a8a12Smrgdnl
8613126a8a12Smrgdnl Except as contained in this notice, the name of the copyright holders shall
8614126a8a12Smrgdnl not be used in advertising or otherwise to promote the sale, use or
8615126a8a12Smrgdnl other dealings in this Software without prior written authorization
8616126a8a12Smrgdnl from the copyright holders.
8617126a8a12Smrgdnl
8618126a8a12Smrg
8619126a8a12Smrg# XORG_RELEASE_VERSION
8620126a8a12Smrg# --------------------
8621126a8a12Smrg# Adds --with/without-release-string and changes the PACKAGE and
8622126a8a12Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
8623126a8a12Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
8624126a8a12Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
8625126a8a12Smrg 
8626126a8a12SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
8627126a8a12Smrg	AC_ARG_WITH(release-version,
8628126a8a12Smrg			AC_HELP_STRING([--with-release-version=STRING],
8629126a8a12Smrg				[Use release version string in package name]),
8630126a8a12Smrg			[RELEASE_VERSION="$withval"],
8631126a8a12Smrg			[RELEASE_VERSION=""])
8632126a8a12Smrg	if test "x$RELEASE_VERSION" != "x"; then
8633126a8a12Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
8634126a8a12Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
8635126a8a12Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
8636126a8a12Smrg	fi
8637126a8a12Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
8638126a8a12Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
8639126a8a12Smrg		[Major version of this package])
8640d656433aSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
8641126a8a12Smrg	if test "x$PVM" = "x"; then
8642126a8a12Smrg		PVM="0"
8643126a8a12Smrg	fi
8644126a8a12Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
8645126a8a12Smrg		[$PVM],
8646126a8a12Smrg		[Minor version of this package])
8647d656433aSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
8648126a8a12Smrg	if test "x$PVP" = "x"; then
8649126a8a12Smrg		PVP="0"
8650126a8a12Smrg	fi
8651126a8a12Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
8652126a8a12Smrg		[$PVP],
8653126a8a12Smrg		[Patch version of this package])
8654126a8a12Smrg])
8655126a8a12Smrg
8656d656433aSmrg# XORG_CHANGELOG()
8657d656433aSmrg# ----------------
8658d656433aSmrg# Minimum version: 1.2.0
8659d656433aSmrg#
8660d656433aSmrg# Defines the variable CHANGELOG_CMD as the command to generate
8661d656433aSmrg# ChangeLog from git.
8662d656433aSmrg#
8663d656433aSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
8664d656433aSmrg#
8665d656433aSmrgAC_DEFUN([XORG_CHANGELOG], [
8666d656433aSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
8667d656433aSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
8668d656433aSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
8669d656433aSmrgAC_SUBST([CHANGELOG_CMD])
8670d656433aSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
8671d656433aSmrg]) # XORG_CHANGELOG
8672d656433aSmrg
8673126a8a12Smrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
8674126a8a12Smrgdnl
8675126a8a12Smrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
8676126a8a12Smrgdnl 
8677126a8a12Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
8678126a8a12Smrgdnl documentation for any purpose is hereby granted without fee, provided that
8679126a8a12Smrgdnl the above copyright notice appear in all copies and that both that
8680126a8a12Smrgdnl copyright notice and this permission notice appear in supporting
8681126a8a12Smrgdnl documentation.
8682126a8a12Smrgdnl 
8683126a8a12Smrgdnl The above copyright notice and this permission notice shall be included
8684126a8a12Smrgdnl in all copies or substantial portions of the Software.
8685126a8a12Smrgdnl 
8686126a8a12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8687126a8a12Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8688126a8a12Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8689126a8a12Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
8690126a8a12Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8691126a8a12Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8692126a8a12Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
8693126a8a12Smrgdnl 
8694126a8a12Smrgdnl Except as contained in this notice, the name of the copyright holders shall
8695126a8a12Smrgdnl not be used in advertising or otherwise to promote the sale, use or
8696126a8a12Smrgdnl other dealings in this Software without prior written authorization
8697126a8a12Smrgdnl from the copyright holders.
8698126a8a12Smrgdnl 
8699126a8a12Smrg
8700126a8a12Smrg# XTRANS_TCP_FLAGS()
8701126a8a12Smrg# ------------------
8702126a8a12Smrg# Find needed libraries for TCP sockets, and check for IPv6 support
8703126a8a12SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
8704126a8a12Smrg # SVR4 hides these in libraries other than libc
8705126a8a12Smrg AC_SEARCH_LIBS(socket, [socket])
8706126a8a12Smrg AC_SEARCH_LIBS(gethostbyname, [nsl])
8707d656433aSmrg AC_HAVE_LIBRARY([ws2_32])
8708126a8a12Smrg
8709126a8a12Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
8710126a8a12Smrg AC_ARG_ENABLE(ipv6, 
8711d656433aSmrg	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
8712126a8a12Smrg	[IPV6CONN=$enableval], 
8713126a8a12Smrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
8714126a8a12Smrg AC_MSG_CHECKING([if IPv6 support should be built])
8715126a8a12Smrg if test "$IPV6CONN" = "yes"; then
8716126a8a12Smrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
8717126a8a12Smrg fi
8718126a8a12Smrg AC_MSG_RESULT($IPV6CONN)
8719126a8a12Smrg
8720126a8a12Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in
8721126a8a12Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
8722126a8a12Smrg	AC_DEFINE([BSD44SOCKETS],1,
8723126a8a12Smrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
8724126a8a12Smrg#include <sys/types.h>
8725126a8a12Smrg#include <sys/socket.h>
8726126a8a12Smrg#include <netinet/in.h>
8727126a8a12Smrg ])
8728d656433aSmrg
8729d656433aSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
8730d656433aSmrg AC_CHECK_TYPES([socklen_t], [], [], [
8731d656433aSmrgAC_INCLUDES_DEFAULT
8732d656433aSmrg#include <sys/socket.h>])
8733d656433aSmrg 
8734126a8a12Smrg]) # XTRANS_TCP_FLAGS
8735126a8a12Smrg
8736126a8a12Smrg# XTRANS_CONNECTION_FLAGS()
8737126a8a12Smrg# -------------------------
8738126a8a12Smrg# Standard checks for which Xtrans transports to use by the Xorg packages
8739126a8a12Smrg# that use Xtrans functions
8740126a8a12SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[
8741126a8a12Smrg AC_REQUIRE([AC_CANONICAL_HOST])
8742126a8a12Smrg AC_REQUIRE([AC_TYPE_SIGNAL])
8743d656433aSmrg [case $host_os in
8744d656433aSmrg	mingw*)	unixdef="no"   ;;
8745d656433aSmrg	*)	unixdef="yes"  ;;
8746d656433aSmrg esac]
8747126a8a12Smrg AC_ARG_ENABLE(unix-transport,
8748126a8a12Smrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
8749d656433aSmrg	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
8750126a8a12Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
8751126a8a12Smrg if test "$UNIXCONN" = "yes"; then
8752126a8a12Smrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
8753126a8a12Smrg fi
8754126a8a12Smrg AC_MSG_RESULT($UNIXCONN)
8755d656433aSmrg AC_ARG_ENABLE(tcp-transport, 
8756d656433aSmrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
8757d656433aSmrg	[TCPCONN=$enableval], [TCPCONN=yes])
8758126a8a12Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
8759126a8a12Smrg AC_MSG_RESULT($TCPCONN)
8760126a8a12Smrg if test "$TCPCONN" = "yes"; then
8761126a8a12Smrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
8762126a8a12Smrg	XTRANS_TCP_FLAGS
8763126a8a12Smrg fi
8764126a8a12Smrg [case $host_os in
8765126a8a12Smrg	solaris*|sco*|sysv4*)	localdef="yes" ;;
8766126a8a12Smrg	*)			localdef="no"  ;;
8767126a8a12Smrg esac]
8768126a8a12Smrg AC_ARG_ENABLE(local-transport,
8769126a8a12Smrg	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
8770126a8a12Smrg	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
8771126a8a12Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
8772126a8a12Smrg AC_MSG_RESULT($LOCALCONN)
8773126a8a12Smrg if test "$LOCALCONN" = "yes"; then
8774126a8a12Smrg	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
8775126a8a12Smrg fi
8776126a8a12Smrg 
8777126a8a12Smrg]) # XTRANS_CONNECTION_FLAGS
8778126a8a12Smrg
8779126a8a12Smrg
8780126a8a12Smrg# XTRANS_SECURE_RPC_FLAGS()
8781126a8a12Smrg# -------------------------
8782126a8a12Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
8783126a8a12Smrg# so that any necessary networking libraries are already found
8784126a8a12SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
8785126a8a12Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
8786126a8a12Smrg AC_ARG_ENABLE(secure-rpc, 
8787126a8a12Smrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
8788126a8a12Smrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
8789126a8a12Smrg
8790126a8a12Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
8791126a8a12Smrg	FOUND_SECURE_RPC="no"
8792126a8a12Smrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
8793126a8a12Smrg			[FOUND_SECURE_RPC="yes"])
8794126a8a12Smrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
8795126a8a12Smrg		if test "x$SECURE_RPC" = "xyes" ; then
8796126a8a12Smrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
8797126a8a12Smrg		fi	
8798126a8a12Smrg		SECURE_RPC="no"
8799126a8a12Smrg	else
8800126a8a12Smrg		dnl FreeBSD keeps getsecretkey in librpcsvc
8801126a8a12Smrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
8802126a8a12Smrg		SECURE_RPC="yes"
8803126a8a12Smrg	fi
8804126a8a12Smrg fi
8805126a8a12Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
8806126a8a12Smrg if test "x$SECURE_RPC" = "xyes" ; then
8807126a8a12Smrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
8808126a8a12Smrg fi
8809126a8a12Smrg AC_MSG_RESULT($SECURE_RPC)
8810126a8a12Smrg]) # XTRANS_SECURE_RPC_FLAGS
8811126a8a12Smrg
8812126a8a12Smrg
8813d656433aSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8814126a8a12Smrg#
8815126a8a12Smrg# This file is free software; the Free Software Foundation
8816126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
8817126a8a12Smrg# with or without modifications, as long as this notice is preserved.
8818126a8a12Smrg
8819126a8a12Smrg# AM_AUTOMAKE_VERSION(VERSION)
8820126a8a12Smrg# ----------------------------
8821126a8a12Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
8822126a8a12Smrg# generated from the m4 files accompanying Automake X.Y.
8823126a8a12Smrg# (This private macro should not be called outside this file.)
8824126a8a12SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8825d656433aSmrg[am__api_version='1.11'
8826126a8a12Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8827126a8a12Smrgdnl require some minimum version.  Point them to the right macro.
8828d656433aSmrgm4_if([$1], [1.11], [],
8829126a8a12Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8830126a8a12Smrg])
8831126a8a12Smrg
8832126a8a12Smrg# _AM_AUTOCONF_VERSION(VERSION)
8833126a8a12Smrg# -----------------------------
8834126a8a12Smrg# aclocal traces this macro to find the Autoconf version.
8835126a8a12Smrg# This is a private macro too.  Using m4_define simplifies
8836126a8a12Smrg# the logic in aclocal, which can simply ignore this definition.
8837126a8a12Smrgm4_define([_AM_AUTOCONF_VERSION], [])
8838126a8a12Smrg
8839126a8a12Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
8840126a8a12Smrg# -------------------------------
8841126a8a12Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8842d656433aSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8843126a8a12SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8844d656433aSmrg[AM_AUTOMAKE_VERSION([1.11])dnl
8845d656433aSmrgm4_ifndef([AC_AUTOCONF_VERSION],
8846d656433aSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8847d656433aSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8848126a8a12Smrg
8849126a8a12Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8850126a8a12Smrg
8851126a8a12Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8852126a8a12Smrg#
8853126a8a12Smrg# This file is free software; the Free Software Foundation
8854126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
8855126a8a12Smrg# with or without modifications, as long as this notice is preserved.
8856126a8a12Smrg
8857126a8a12Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8858126a8a12Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8859126a8a12Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8860126a8a12Smrg#
8861126a8a12Smrg# Of course, Automake must honor this variable whenever it calls a
8862126a8a12Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
8863126a8a12Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
8864126a8a12Smrg# depending on how configure is run.  This is pretty annoying, since
8865126a8a12Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8866126a8a12Smrg# source directory, any form will work fine, but in subdirectories a
8867126a8a12Smrg# relative path needs to be adjusted first.
8868126a8a12Smrg#
8869126a8a12Smrg# $ac_aux_dir/missing
8870126a8a12Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8871126a8a12Smrg# $top_srcdir/$ac_aux_dir/missing
8872126a8a12Smrg#    fails if $ac_aux_dir is absolute,
8873126a8a12Smrg#    fails when called from a subdirectory in a VPATH build with
8874126a8a12Smrg#          a relative $ac_aux_dir
8875126a8a12Smrg#
8876126a8a12Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8877126a8a12Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8878126a8a12Smrg# harmless because $srcdir is `.', but things will broke when you
8879126a8a12Smrg# start a VPATH build or use an absolute $srcdir.
8880126a8a12Smrg#
8881126a8a12Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8882126a8a12Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8883126a8a12Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8884126a8a12Smrg# and then we would define $MISSING as
8885126a8a12Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
8886126a8a12Smrg# This will work as long as MISSING is not called from configure, because
8887126a8a12Smrg# unfortunately $(top_srcdir) has no meaning in configure.
8888126a8a12Smrg# However there are other variables, like CC, which are often used in
8889126a8a12Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
8890126a8a12Smrg#
8891126a8a12Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
8892126a8a12Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
8893126a8a12Smrg# configured tree to be moved without reconfiguration.
8894126a8a12Smrg
8895126a8a12SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
8896126a8a12Smrg[dnl Rely on autoconf to set up CDPATH properly.
8897126a8a12SmrgAC_PREREQ([2.50])dnl
8898126a8a12Smrg# expand $ac_aux_dir to an absolute path
8899126a8a12Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
8900126a8a12Smrg])
8901126a8a12Smrg
8902126a8a12Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
8903126a8a12Smrg
8904d656433aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8905126a8a12Smrg# Free Software Foundation, Inc.
8906126a8a12Smrg#
8907126a8a12Smrg# This file is free software; the Free Software Foundation
8908126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
8909126a8a12Smrg# with or without modifications, as long as this notice is preserved.
8910126a8a12Smrg
8911d656433aSmrg# serial 9
8912126a8a12Smrg
8913126a8a12Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8914126a8a12Smrg# -------------------------------------
8915126a8a12Smrg# Define a conditional.
8916126a8a12SmrgAC_DEFUN([AM_CONDITIONAL],
8917126a8a12Smrg[AC_PREREQ(2.52)dnl
8918126a8a12Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8919126a8a12Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8920126a8a12SmrgAC_SUBST([$1_TRUE])dnl
8921126a8a12SmrgAC_SUBST([$1_FALSE])dnl
8922126a8a12Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8923126a8a12Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8924d656433aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
8925126a8a12Smrgif $2; then
8926126a8a12Smrg  $1_TRUE=
8927126a8a12Smrg  $1_FALSE='#'
8928126a8a12Smrgelse
8929126a8a12Smrg  $1_TRUE='#'
8930126a8a12Smrg  $1_FALSE=
8931126a8a12Smrgfi
8932126a8a12SmrgAC_CONFIG_COMMANDS_PRE(
8933126a8a12Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8934126a8a12Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
8935126a8a12SmrgUsually this means the macro was only invoked conditionally.]])
8936126a8a12Smrgfi])])
8937126a8a12Smrg
8938d656433aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8939126a8a12Smrg# Free Software Foundation, Inc.
8940126a8a12Smrg#
8941126a8a12Smrg# This file is free software; the Free Software Foundation
8942126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
8943126a8a12Smrg# with or without modifications, as long as this notice is preserved.
8944126a8a12Smrg
8945d656433aSmrg# serial 10
8946126a8a12Smrg
8947126a8a12Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8948126a8a12Smrg# written in clear, in which case automake, when reading aclocal.m4,
8949126a8a12Smrg# will think it sees a *use*, and therefore will trigger all it's
8950126a8a12Smrg# C support machinery.  Also note that it means that autoscan, seeing
8951126a8a12Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8952126a8a12Smrg
8953126a8a12Smrg
8954126a8a12Smrg# _AM_DEPENDENCIES(NAME)
8955126a8a12Smrg# ----------------------
8956126a8a12Smrg# See how the compiler implements dependency checking.
8957126a8a12Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
8958126a8a12Smrg# We try a few techniques and use that to set a single cache variable.
8959126a8a12Smrg#
8960126a8a12Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8961126a8a12Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8962126a8a12Smrg# dependency, and given that the user is not expected to run this macro,
8963126a8a12Smrg# just rely on AC_PROG_CC.
8964126a8a12SmrgAC_DEFUN([_AM_DEPENDENCIES],
8965126a8a12Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
8966126a8a12SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8967126a8a12SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
8968126a8a12SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
8969126a8a12Smrg
8970126a8a12Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8971126a8a12Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8972126a8a12Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8973126a8a12Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8974126a8a12Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8975126a8a12Smrg                   [depcc="$$1"   am_compiler_list=])
8976126a8a12Smrg
8977126a8a12SmrgAC_CACHE_CHECK([dependency style of $depcc],
8978126a8a12Smrg               [am_cv_$1_dependencies_compiler_type],
8979126a8a12Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8980126a8a12Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
8981126a8a12Smrg  # making bogus files that we don't know about and never remove.  For
8982126a8a12Smrg  # instance it was reported that on HP-UX the gcc test will end up
8983126a8a12Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
8984126a8a12Smrg  # in D'.
8985126a8a12Smrg  mkdir conftest.dir
8986126a8a12Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
8987126a8a12Smrg  # using a relative directory.
8988126a8a12Smrg  cp "$am_depcomp" conftest.dir
8989126a8a12Smrg  cd conftest.dir
8990126a8a12Smrg  # We will build objects and dependencies in a subdirectory because
8991126a8a12Smrg  # it helps to detect inapplicable dependency modes.  For instance
8992126a8a12Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
8993126a8a12Smrg  # side effect of compilation, but ICC will put the dependencies in
8994126a8a12Smrg  # the current directory while Tru64 will put them in the object
8995126a8a12Smrg  # directory.
8996126a8a12Smrg  mkdir sub
8997126a8a12Smrg
8998126a8a12Smrg  am_cv_$1_dependencies_compiler_type=none
8999126a8a12Smrg  if test "$am_compiler_list" = ""; then
9000126a8a12Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9001126a8a12Smrg  fi
9002d656433aSmrg  am__universal=false
9003d656433aSmrg  m4_case([$1], [CC],
9004d656433aSmrg    [case " $depcc " in #(
9005d656433aSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9006d656433aSmrg     esac],
9007d656433aSmrg    [CXX],
9008d656433aSmrg    [case " $depcc " in #(
9009d656433aSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9010d656433aSmrg     esac])
9011d656433aSmrg
9012126a8a12Smrg  for depmode in $am_compiler_list; do
9013126a8a12Smrg    # Setup a source with many dependencies, because some compilers
9014126a8a12Smrg    # like to wrap large dependency lists on column 80 (with \), and
9015126a8a12Smrg    # we should not choose a depcomp mode which is confused by this.
9016126a8a12Smrg    #
9017126a8a12Smrg    # We need to recreate these files for each test, as the compiler may
9018126a8a12Smrg    # overwrite some of them when testing with obscure command lines.
9019126a8a12Smrg    # This happens at least with the AIX C compiler.
9020126a8a12Smrg    : > sub/conftest.c
9021126a8a12Smrg    for i in 1 2 3 4 5 6; do
9022126a8a12Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9023126a8a12Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9024126a8a12Smrg      # Solaris 8's {/usr,}/bin/sh.
9025126a8a12Smrg      touch sub/conftst$i.h
9026126a8a12Smrg    done
9027126a8a12Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9028126a8a12Smrg
9029d656433aSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9030d656433aSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
9031d656433aSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
9032d656433aSmrg    # versions had trouble with output in subdirs
9033d656433aSmrg    am__obj=sub/conftest.${OBJEXT-o}
9034d656433aSmrg    am__minus_obj="-o $am__obj"
9035126a8a12Smrg    case $depmode in
9036d656433aSmrg    gcc)
9037d656433aSmrg      # This depmode causes a compiler race in universal mode.
9038d656433aSmrg      test "$am__universal" = false || continue
9039d656433aSmrg      ;;
9040126a8a12Smrg    nosideeffect)
9041126a8a12Smrg      # after this tag, mechanisms are not by side-effect, so they'll
9042126a8a12Smrg      # only be used when explicitly requested
9043126a8a12Smrg      if test "x$enable_dependency_tracking" = xyes; then
9044126a8a12Smrg	continue
9045126a8a12Smrg      else
9046126a8a12Smrg	break
9047126a8a12Smrg      fi
9048126a8a12Smrg      ;;
9049d656433aSmrg    msvisualcpp | msvcmsys)
9050d656433aSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
9051d656433aSmrg      # not run yet.  These depmodes are late enough in the game, and
9052d656433aSmrg      # so weak that their functioning should not be impacted.
9053d656433aSmrg      am__obj=conftest.${OBJEXT-o}
9054d656433aSmrg      am__minus_obj=
9055d656433aSmrg      ;;
9056126a8a12Smrg    none) break ;;
9057126a8a12Smrg    esac
9058126a8a12Smrg    if depmode=$depmode \
9059d656433aSmrg       source=sub/conftest.c object=$am__obj \
9060126a8a12Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9061d656433aSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9062126a8a12Smrg         >/dev/null 2>conftest.err &&
9063126a8a12Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9064126a8a12Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9065d656433aSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9066126a8a12Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9067126a8a12Smrg      # icc doesn't choke on unknown options, it will just issue warnings
9068126a8a12Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
9069126a8a12Smrg      # that says an option was ignored or not supported.
9070126a8a12Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
9071126a8a12Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
9072126a8a12Smrg      # The diagnosis changed in icc 8.0:
9073126a8a12Smrg      #   icc: Command line remark: option '-MP' not supported
9074126a8a12Smrg      if (grep 'ignoring option' conftest.err ||
9075126a8a12Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9076126a8a12Smrg        am_cv_$1_dependencies_compiler_type=$depmode
9077126a8a12Smrg        break
9078126a8a12Smrg      fi
9079126a8a12Smrg    fi
9080126a8a12Smrg  done
9081126a8a12Smrg
9082126a8a12Smrg  cd ..
9083126a8a12Smrg  rm -rf conftest.dir
9084126a8a12Smrgelse
9085126a8a12Smrg  am_cv_$1_dependencies_compiler_type=none
9086126a8a12Smrgfi
9087126a8a12Smrg])
9088126a8a12SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9089126a8a12SmrgAM_CONDITIONAL([am__fastdep$1], [
9090126a8a12Smrg  test "x$enable_dependency_tracking" != xno \
9091126a8a12Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9092126a8a12Smrg])
9093126a8a12Smrg
9094126a8a12Smrg
9095126a8a12Smrg# AM_SET_DEPDIR
9096126a8a12Smrg# -------------
9097126a8a12Smrg# Choose a directory name for dependency files.
9098126a8a12Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9099126a8a12SmrgAC_DEFUN([AM_SET_DEPDIR],
9100126a8a12Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9101126a8a12SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9102126a8a12Smrg])
9103126a8a12Smrg
9104126a8a12Smrg
9105126a8a12Smrg# AM_DEP_TRACK
9106126a8a12Smrg# ------------
9107126a8a12SmrgAC_DEFUN([AM_DEP_TRACK],
9108126a8a12Smrg[AC_ARG_ENABLE(dependency-tracking,
9109126a8a12Smrg[  --disable-dependency-tracking  speeds up one-time build
9110126a8a12Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
9111126a8a12Smrgif test "x$enable_dependency_tracking" != xno; then
9112126a8a12Smrg  am_depcomp="$ac_aux_dir/depcomp"
9113126a8a12Smrg  AMDEPBACKSLASH='\'
9114126a8a12Smrgfi
9115126a8a12SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9116126a8a12SmrgAC_SUBST([AMDEPBACKSLASH])dnl
9117126a8a12Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9118126a8a12Smrg])
9119126a8a12Smrg
9120126a8a12Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
9121126a8a12Smrg
9122d656433aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9123126a8a12Smrg# Free Software Foundation, Inc.
9124126a8a12Smrg#
9125126a8a12Smrg# This file is free software; the Free Software Foundation
9126126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9127126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9128126a8a12Smrg
9129d656433aSmrg#serial 5
9130126a8a12Smrg
9131126a8a12Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
9132126a8a12Smrg# ------------------------------
9133126a8a12SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9134d656433aSmrg[{
9135d656433aSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
9136d656433aSmrg  # are listed without --file.  Let's play safe and only enable the eval
9137d656433aSmrg  # if we detect the quoting.
9138d656433aSmrg  case $CONFIG_FILES in
9139d656433aSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
9140d656433aSmrg  *)   set x $CONFIG_FILES ;;
9141d656433aSmrg  esac
9142d656433aSmrg  shift
9143d656433aSmrg  for mf
9144d656433aSmrg  do
9145d656433aSmrg    # Strip MF so we end up with the name of the file.
9146d656433aSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
9147d656433aSmrg    # Check whether this is an Automake generated Makefile or not.
9148d656433aSmrg    # We used to match only the files named `Makefile.in', but
9149d656433aSmrg    # some people rename them; so instead we look at the file content.
9150d656433aSmrg    # Grep'ing the first line is not enough: some people post-process
9151d656433aSmrg    # each Makefile.in and add a new line on top of each file to say so.
9152d656433aSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
9153d656433aSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
9154d656433aSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9155d656433aSmrg      dirpart=`AS_DIRNAME("$mf")`
9156d656433aSmrg    else
9157d656433aSmrg      continue
9158d656433aSmrg    fi
9159d656433aSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
9160d656433aSmrg    # from the Makefile without running `make'.
9161d656433aSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9162d656433aSmrg    test -z "$DEPDIR" && continue
9163d656433aSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9164d656433aSmrg    test -z "am__include" && continue
9165d656433aSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9166d656433aSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
9167d656433aSmrg    U=`sed -n 's/^U = //p' < "$mf"`
9168d656433aSmrg    # Find all dependency output files, they are included files with
9169d656433aSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9170d656433aSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
9171d656433aSmrg    # expansion.
9172d656433aSmrg    for file in `sed -n "
9173d656433aSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9174d656433aSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9175d656433aSmrg      # Make sure the directory exists.
9176d656433aSmrg      test -f "$dirpart/$file" && continue
9177d656433aSmrg      fdir=`AS_DIRNAME(["$file"])`
9178d656433aSmrg      AS_MKDIR_P([$dirpart/$fdir])
9179d656433aSmrg      # echo "creating $dirpart/$file"
9180d656433aSmrg      echo '# dummy' > "$dirpart/$file"
9181d656433aSmrg    done
9182126a8a12Smrg  done
9183d656433aSmrg}
9184126a8a12Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9185126a8a12Smrg
9186126a8a12Smrg
9187126a8a12Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
9188126a8a12Smrg# -----------------------------
9189126a8a12Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
9190126a8a12Smrg#
9191126a8a12Smrg# This code is only required when automatic dependency tracking
9192126a8a12Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
9193126a8a12Smrg# need in order to bootstrap the dependency handling code.
9194126a8a12SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9195126a8a12Smrg[AC_CONFIG_COMMANDS([depfiles],
9196126a8a12Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9197126a8a12Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9198126a8a12Smrg])
9199126a8a12Smrg
9200126a8a12Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9201126a8a12Smrg# Free Software Foundation, Inc.
9202126a8a12Smrg#
9203126a8a12Smrg# This file is free software; the Free Software Foundation
9204126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9205126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9206126a8a12Smrg
9207126a8a12Smrg# serial 8
9208126a8a12Smrg
9209126a8a12Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9210126a8a12SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9211126a8a12Smrg
9212126a8a12Smrg# Do all the work for Automake.                             -*- Autoconf -*-
9213126a8a12Smrg
9214126a8a12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9215d656433aSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9216126a8a12Smrg#
9217126a8a12Smrg# This file is free software; the Free Software Foundation
9218126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9219126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9220126a8a12Smrg
9221d656433aSmrg# serial 16
9222126a8a12Smrg
9223126a8a12Smrg# This macro actually does too much.  Some checks are only needed if
9224126a8a12Smrg# your package does certain things.  But this isn't really a big deal.
9225126a8a12Smrg
9226126a8a12Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9227126a8a12Smrg# AM_INIT_AUTOMAKE([OPTIONS])
9228126a8a12Smrg# -----------------------------------------------
9229126a8a12Smrg# The call with PACKAGE and VERSION arguments is the old style
9230126a8a12Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9231126a8a12Smrg# and VERSION should now be passed to AC_INIT and removed from
9232126a8a12Smrg# the call to AM_INIT_AUTOMAKE.
9233126a8a12Smrg# We support both call styles for the transition.  After
9234126a8a12Smrg# the next Automake release, Autoconf can make the AC_INIT
9235126a8a12Smrg# arguments mandatory, and then we can depend on a new Autoconf
9236126a8a12Smrg# release and drop the old call support.
9237126a8a12SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
9238d656433aSmrg[AC_PREREQ([2.62])dnl
9239126a8a12Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
9240126a8a12Smrgdnl the ones we care about.
9241126a8a12Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9242126a8a12SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9243126a8a12SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
9244126a8a12Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
9245126a8a12Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9246126a8a12Smrg  # is not polluted with repeated "-I."
9247126a8a12Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9248126a8a12Smrg  # test to see if srcdir already configured
9249126a8a12Smrg  if test -f $srcdir/config.status; then
9250126a8a12Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9251126a8a12Smrg  fi
9252126a8a12Smrgfi
9253126a8a12Smrg
9254126a8a12Smrg# test whether we have cygpath
9255126a8a12Smrgif test -z "$CYGPATH_W"; then
9256126a8a12Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
9257126a8a12Smrg    CYGPATH_W='cygpath -w'
9258126a8a12Smrg  else
9259126a8a12Smrg    CYGPATH_W=echo
9260126a8a12Smrg  fi
9261126a8a12Smrgfi
9262126a8a12SmrgAC_SUBST([CYGPATH_W])
9263126a8a12Smrg
9264126a8a12Smrg# Define the identity of the package.
9265126a8a12Smrgdnl Distinguish between old-style and new-style calls.
9266126a8a12Smrgm4_ifval([$2],
9267126a8a12Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9268126a8a12Smrg AC_SUBST([PACKAGE], [$1])dnl
9269126a8a12Smrg AC_SUBST([VERSION], [$2])],
9270126a8a12Smrg[_AM_SET_OPTIONS([$1])dnl
9271126a8a12Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9272126a8a12Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9273126a8a12Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9274126a8a12Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9275126a8a12Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9276126a8a12Smrg
9277126a8a12Smrg_AM_IF_OPTION([no-define],,
9278126a8a12Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9279126a8a12Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9280126a8a12Smrg
9281126a8a12Smrg# Some tools Automake needs.
9282126a8a12SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
9283126a8a12SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
9284126a8a12SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9285126a8a12SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
9286126a8a12SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9287126a8a12SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
9288126a8a12SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
9289d656433aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9290d656433aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9291126a8a12SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
9292126a8a12Smrg# We need awk for the "check" target.  The system "awk" is bad on
9293126a8a12Smrg# some platforms.
9294126a8a12SmrgAC_REQUIRE([AC_PROG_AWK])dnl
9295126a8a12SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
9296126a8a12SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
9297126a8a12Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9298d656433aSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9299d656433aSmrg			     [_AM_PROG_TAR([v7])])])
9300126a8a12Smrg_AM_IF_OPTION([no-dependencies],,
9301126a8a12Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
9302d656433aSmrg		  [_AM_DEPENDENCIES(CC)],
9303d656433aSmrg		  [define([AC_PROG_CC],
9304d656433aSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9305126a8a12SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
9306d656433aSmrg		  [_AM_DEPENDENCIES(CXX)],
9307d656433aSmrg		  [define([AC_PROG_CXX],
9308d656433aSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9309126a8a12SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
9310d656433aSmrg		  [_AM_DEPENDENCIES(OBJC)],
9311d656433aSmrg		  [define([AC_PROG_OBJC],
9312d656433aSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9313126a8a12Smrg])
9314d656433aSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9315d656433aSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9316d656433aSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9317d656433aSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9318d656433aSmrgAC_CONFIG_COMMANDS_PRE(dnl
9319d656433aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
9320d656433aSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9321126a8a12Smrg])
9322126a8a12Smrg
9323d656433aSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9324d656433aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9325d656433aSmrgdnl mangled by Autoconf and run in a shell conditional statement.
9326d656433aSmrgm4_define([_AC_COMPILER_EXEEXT],
9327d656433aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9328d656433aSmrg
9329126a8a12Smrg
9330126a8a12Smrg# When config.status generates a header, we must update the stamp-h file.
9331126a8a12Smrg# This file resides in the same directory as the config header
9332126a8a12Smrg# that is generated.  The stamp files are numbered to have different names.
9333126a8a12Smrg
9334126a8a12Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9335126a8a12Smrg# loop where config.status creates the headers, so we can generate
9336126a8a12Smrg# our stamp files there.
9337126a8a12SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9338126a8a12Smrg[# Compute $1's index in $config_headers.
9339d656433aSmrg_am_arg=$1
9340126a8a12Smrg_am_stamp_count=1
9341126a8a12Smrgfor _am_header in $config_headers :; do
9342126a8a12Smrg  case $_am_header in
9343d656433aSmrg    $_am_arg | $_am_arg:* )
9344126a8a12Smrg      break ;;
9345126a8a12Smrg    * )
9346126a8a12Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9347126a8a12Smrg  esac
9348126a8a12Smrgdone
9349d656433aSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9350126a8a12Smrg
9351d656433aSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9352126a8a12Smrg#
9353126a8a12Smrg# This file is free software; the Free Software Foundation
9354126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9355126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9356126a8a12Smrg
9357126a8a12Smrg# AM_PROG_INSTALL_SH
9358126a8a12Smrg# ------------------
9359126a8a12Smrg# Define $install_sh.
9360126a8a12SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
9361126a8a12Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9362d656433aSmrgif test x"${install_sh}" != xset; then
9363d656433aSmrg  case $am_aux_dir in
9364d656433aSmrg  *\ * | *\	*)
9365d656433aSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9366d656433aSmrg  *)
9367d656433aSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
9368d656433aSmrg  esac
9369d656433aSmrgfi
9370126a8a12SmrgAC_SUBST(install_sh)])
9371126a8a12Smrg
9372126a8a12Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9373126a8a12Smrg#
9374126a8a12Smrg# This file is free software; the Free Software Foundation
9375126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9376126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9377126a8a12Smrg
9378126a8a12Smrg# serial 2
9379126a8a12Smrg
9380126a8a12Smrg# Check whether the underlying file-system supports filenames
9381126a8a12Smrg# with a leading dot.  For instance MS-DOS doesn't.
9382126a8a12SmrgAC_DEFUN([AM_SET_LEADING_DOT],
9383126a8a12Smrg[rm -rf .tst 2>/dev/null
9384126a8a12Smrgmkdir .tst 2>/dev/null
9385126a8a12Smrgif test -d .tst; then
9386126a8a12Smrg  am__leading_dot=.
9387126a8a12Smrgelse
9388126a8a12Smrg  am__leading_dot=_
9389126a8a12Smrgfi
9390126a8a12Smrgrmdir .tst 2>/dev/null
9391126a8a12SmrgAC_SUBST([am__leading_dot])])
9392126a8a12Smrg
9393126a8a12Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9394126a8a12Smrg# From Jim Meyering
9395126a8a12Smrg
9396d656433aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9397126a8a12Smrg# Free Software Foundation, Inc.
9398126a8a12Smrg#
9399126a8a12Smrg# This file is free software; the Free Software Foundation
9400126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9401126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9402126a8a12Smrg
9403d656433aSmrg# serial 5
9404126a8a12Smrg
9405d656433aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
9406d656433aSmrg# ----------------------------------
9407d656433aSmrg# Control maintainer-specific portions of Makefiles.
9408d656433aSmrg# Default is to disable them, unless `enable' is passed literally.
9409d656433aSmrg# For symmetry, `disable' may be passed as well.  Anyway, the user
9410d656433aSmrg# can override the default with the --enable/--disable switch.
9411126a8a12SmrgAC_DEFUN([AM_MAINTAINER_MODE],
9412d656433aSmrg[m4_case(m4_default([$1], [disable]),
9413d656433aSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
9414d656433aSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
9415d656433aSmrg       [m4_define([am_maintainer_other], [enable])
9416d656433aSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9417d656433aSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9418d656433aSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9419d656433aSmrg  AC_ARG_ENABLE([maintainer-mode],
9420d656433aSmrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
9421126a8a12Smrg			  (and sometimes confusing) to the casual installer],
9422d656433aSmrg      [USE_MAINTAINER_MODE=$enableval],
9423d656433aSmrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9424126a8a12Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9425d656433aSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9426126a8a12Smrg  MAINT=$MAINTAINER_MODE_TRUE
9427d656433aSmrg  AC_SUBST([MAINT])dnl
9428126a8a12Smrg]
9429126a8a12Smrg)
9430126a8a12Smrg
9431126a8a12SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9432126a8a12Smrg
9433126a8a12Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9434126a8a12Smrg
9435d656433aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9436126a8a12Smrg#
9437126a8a12Smrg# This file is free software; the Free Software Foundation
9438126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9439126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9440126a8a12Smrg
9441d656433aSmrg# serial 4
9442126a8a12Smrg
9443126a8a12Smrg# AM_MAKE_INCLUDE()
9444126a8a12Smrg# -----------------
9445126a8a12Smrg# Check to see how make treats includes.
9446126a8a12SmrgAC_DEFUN([AM_MAKE_INCLUDE],
9447126a8a12Smrg[am_make=${MAKE-make}
9448126a8a12Smrgcat > confinc << 'END'
9449126a8a12Smrgam__doit:
9450d656433aSmrg	@echo this is the am__doit target
9451126a8a12Smrg.PHONY: am__doit
9452126a8a12SmrgEND
9453126a8a12Smrg# If we don't find an include directive, just comment out the code.
9454126a8a12SmrgAC_MSG_CHECKING([for style of include used by $am_make])
9455126a8a12Smrgam__include="#"
9456126a8a12Smrgam__quote=
9457126a8a12Smrg_am_result=none
9458126a8a12Smrg# First try GNU make style include.
9459126a8a12Smrgecho "include confinc" > confmf
9460d656433aSmrg# Ignore all kinds of additional output from `make'.
9461d656433aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
9462d656433aSmrg*the\ am__doit\ target*)
9463d656433aSmrg  am__include=include
9464d656433aSmrg  am__quote=
9465d656433aSmrg  _am_result=GNU
9466d656433aSmrg  ;;
9467d656433aSmrgesac
9468126a8a12Smrg# Now try BSD make style include.
9469126a8a12Smrgif test "$am__include" = "#"; then
9470126a8a12Smrg   echo '.include "confinc"' > confmf
9471d656433aSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
9472d656433aSmrg   *the\ am__doit\ target*)
9473d656433aSmrg     am__include=.include
9474d656433aSmrg     am__quote="\""
9475d656433aSmrg     _am_result=BSD
9476d656433aSmrg     ;;
9477d656433aSmrg   esac
9478126a8a12Smrgfi
9479126a8a12SmrgAC_SUBST([am__include])
9480126a8a12SmrgAC_SUBST([am__quote])
9481126a8a12SmrgAC_MSG_RESULT([$_am_result])
9482126a8a12Smrgrm -f confinc confmf
9483126a8a12Smrg])
9484126a8a12Smrg
9485126a8a12Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9486126a8a12Smrg
9487d656433aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9488126a8a12Smrg# Free Software Foundation, Inc.
9489126a8a12Smrg#
9490126a8a12Smrg# This file is free software; the Free Software Foundation
9491126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9492126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9493126a8a12Smrg
9494d656433aSmrg# serial 6
9495126a8a12Smrg
9496126a8a12Smrg# AM_MISSING_PROG(NAME, PROGRAM)
9497126a8a12Smrg# ------------------------------
9498126a8a12SmrgAC_DEFUN([AM_MISSING_PROG],
9499126a8a12Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
9500126a8a12Smrg$1=${$1-"${am_missing_run}$2"}
9501126a8a12SmrgAC_SUBST($1)])
9502126a8a12Smrg
9503126a8a12Smrg
9504126a8a12Smrg# AM_MISSING_HAS_RUN
9505126a8a12Smrg# ------------------
9506126a8a12Smrg# Define MISSING if not defined so far and test if it supports --run.
9507126a8a12Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
9508126a8a12SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
9509126a8a12Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9510126a8a12SmrgAC_REQUIRE_AUX_FILE([missing])dnl
9511d656433aSmrgif test x"${MISSING+set}" != xset; then
9512d656433aSmrg  case $am_aux_dir in
9513d656433aSmrg  *\ * | *\	*)
9514d656433aSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9515d656433aSmrg  *)
9516d656433aSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
9517d656433aSmrg  esac
9518d656433aSmrgfi
9519126a8a12Smrg# Use eval to expand $SHELL
9520126a8a12Smrgif eval "$MISSING --run true"; then
9521126a8a12Smrg  am_missing_run="$MISSING --run "
9522126a8a12Smrgelse
9523126a8a12Smrg  am_missing_run=
9524126a8a12Smrg  AC_MSG_WARN([`missing' script is too old or missing])
9525126a8a12Smrgfi
9526126a8a12Smrg])
9527126a8a12Smrg
9528126a8a12Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9529126a8a12Smrg#
9530126a8a12Smrg# This file is free software; the Free Software Foundation
9531126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9532126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9533126a8a12Smrg
9534126a8a12Smrg# AM_PROG_MKDIR_P
9535126a8a12Smrg# ---------------
9536126a8a12Smrg# Check for `mkdir -p'.
9537126a8a12SmrgAC_DEFUN([AM_PROG_MKDIR_P],
9538126a8a12Smrg[AC_PREREQ([2.60])dnl
9539126a8a12SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
9540126a8a12Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9541126a8a12Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
9542126a8a12Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9543126a8a12Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9544126a8a12Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
9545126a8a12Smrgdnl adjustment using top_builddir (which is defined more often than
9546126a8a12Smrgdnl MKDIR_P).
9547126a8a12SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9548126a8a12Smrgcase $mkdir_p in
9549126a8a12Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
9550126a8a12Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9551126a8a12Smrgesac
9552126a8a12Smrg])
9553126a8a12Smrg
9554126a8a12Smrg# Helper functions for option handling.                     -*- Autoconf -*-
9555126a8a12Smrg
9556d656433aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9557126a8a12Smrg#
9558126a8a12Smrg# This file is free software; the Free Software Foundation
9559126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9560126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9561126a8a12Smrg
9562d656433aSmrg# serial 4
9563126a8a12Smrg
9564126a8a12Smrg# _AM_MANGLE_OPTION(NAME)
9565126a8a12Smrg# -----------------------
9566126a8a12SmrgAC_DEFUN([_AM_MANGLE_OPTION],
9567126a8a12Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9568126a8a12Smrg
9569126a8a12Smrg# _AM_SET_OPTION(NAME)
9570126a8a12Smrg# ------------------------------
9571126a8a12Smrg# Set option NAME.  Presently that only means defining a flag for this option.
9572126a8a12SmrgAC_DEFUN([_AM_SET_OPTION],
9573126a8a12Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9574126a8a12Smrg
9575126a8a12Smrg# _AM_SET_OPTIONS(OPTIONS)
9576126a8a12Smrg# ----------------------------------
9577126a8a12Smrg# OPTIONS is a space-separated list of Automake options.
9578126a8a12SmrgAC_DEFUN([_AM_SET_OPTIONS],
9579d656433aSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9580126a8a12Smrg
9581126a8a12Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9582126a8a12Smrg# -------------------------------------------
9583126a8a12Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9584126a8a12SmrgAC_DEFUN([_AM_IF_OPTION],
9585126a8a12Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9586126a8a12Smrg
9587126a8a12Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9588126a8a12Smrg
9589d656433aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9590126a8a12Smrg# Free Software Foundation, Inc.
9591126a8a12Smrg#
9592126a8a12Smrg# This file is free software; the Free Software Foundation
9593126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9594126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9595126a8a12Smrg
9596d656433aSmrg# serial 5
9597126a8a12Smrg
9598126a8a12Smrg# AM_SANITY_CHECK
9599126a8a12Smrg# ---------------
9600126a8a12SmrgAC_DEFUN([AM_SANITY_CHECK],
9601126a8a12Smrg[AC_MSG_CHECKING([whether build environment is sane])
9602126a8a12Smrg# Just in case
9603126a8a12Smrgsleep 1
9604126a8a12Smrgecho timestamp > conftest.file
9605d656433aSmrg# Reject unsafe characters in $srcdir or the absolute working directory
9606d656433aSmrg# name.  Accept space and tab only in the latter.
9607d656433aSmrgam_lf='
9608d656433aSmrg'
9609d656433aSmrgcase `pwd` in
9610d656433aSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
9611d656433aSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
9612d656433aSmrgesac
9613d656433aSmrgcase $srcdir in
9614d656433aSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9615d656433aSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9616d656433aSmrgesac
9617d656433aSmrg
9618126a8a12Smrg# Do `set' in a subshell so we don't clobber the current shell's
9619126a8a12Smrg# arguments.  Must try -L first in case configure is actually a
9620126a8a12Smrg# symlink; some systems play weird games with the mod time of symlinks
9621126a8a12Smrg# (eg FreeBSD returns the mod time of the symlink's containing
9622126a8a12Smrg# directory).
9623126a8a12Smrgif (
9624d656433aSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9625126a8a12Smrg   if test "$[*]" = "X"; then
9626126a8a12Smrg      # -L didn't work.
9627d656433aSmrg      set X `ls -t "$srcdir/configure" conftest.file`
9628126a8a12Smrg   fi
9629126a8a12Smrg   rm -f conftest.file
9630126a8a12Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
9631126a8a12Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9632126a8a12Smrg
9633126a8a12Smrg      # If neither matched, then we have a broken ls.  This can happen
9634126a8a12Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
9635126a8a12Smrg      # broken ls alias from the environment.  This has actually
9636126a8a12Smrg      # happened.  Such a system could not be considered "sane".
9637126a8a12Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9638126a8a12Smrgalias in your environment])
9639126a8a12Smrg   fi
9640126a8a12Smrg
9641126a8a12Smrg   test "$[2]" = conftest.file
9642126a8a12Smrg   )
9643126a8a12Smrgthen
9644126a8a12Smrg   # Ok.
9645126a8a12Smrg   :
9646126a8a12Smrgelse
9647126a8a12Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
9648126a8a12SmrgCheck your system clock])
9649126a8a12Smrgfi
9650126a8a12SmrgAC_MSG_RESULT(yes)])
9651126a8a12Smrg
9652126a8a12Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9653126a8a12Smrg#
9654126a8a12Smrg# This file is free software; the Free Software Foundation
9655126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9656126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9657126a8a12Smrg
9658126a8a12Smrg# AM_PROG_INSTALL_STRIP
9659126a8a12Smrg# ---------------------
9660126a8a12Smrg# One issue with vendor `install' (even GNU) is that you can't
9661126a8a12Smrg# specify the program used to strip binaries.  This is especially
9662126a8a12Smrg# annoying in cross-compiling environments, where the build's strip
9663126a8a12Smrg# is unlikely to handle the host's binaries.
9664126a8a12Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9665126a8a12Smrg# always use install-sh in `make install-strip', and initialize
9666126a8a12Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
9667126a8a12SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9668126a8a12Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9669126a8a12Smrg# Installed binaries are usually stripped using `strip' when the user
9670126a8a12Smrg# run `make install-strip'.  However `strip' might not be the right
9671126a8a12Smrg# tool to use in cross-compilation environments, therefore Automake
9672126a8a12Smrg# will honor the `STRIP' environment variable to overrule this program.
9673126a8a12Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9674126a8a12Smrgif test "$cross_compiling" != no; then
9675126a8a12Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9676126a8a12Smrgfi
9677126a8a12SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9678126a8a12SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9679126a8a12Smrg
9680d656433aSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9681126a8a12Smrg#
9682126a8a12Smrg# This file is free software; the Free Software Foundation
9683126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9684126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9685126a8a12Smrg
9686d656433aSmrg# serial 2
9687d656433aSmrg
9688126a8a12Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
9689126a8a12Smrg# ---------------------------
9690d656433aSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9691126a8a12Smrg# This macro is traced by Automake.
9692126a8a12SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9693126a8a12Smrg
9694d656433aSmrg# AM_SUBST_NOTMAKE(VARIABLE)
9695d656433aSmrg# ---------------------------
9696d656433aSmrg# Public sister of _AM_SUBST_NOTMAKE.
9697d656433aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9698d656433aSmrg
9699126a8a12Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9700126a8a12Smrg
9701126a8a12Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9702126a8a12Smrg#
9703126a8a12Smrg# This file is free software; the Free Software Foundation
9704126a8a12Smrg# gives unlimited permission to copy and/or distribute it,
9705126a8a12Smrg# with or without modifications, as long as this notice is preserved.
9706126a8a12Smrg
9707126a8a12Smrg# serial 2
9708126a8a12Smrg
9709126a8a12Smrg# _AM_PROG_TAR(FORMAT)
9710126a8a12Smrg# --------------------
9711126a8a12Smrg# Check how to create a tarball in format FORMAT.
9712126a8a12Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9713126a8a12Smrg#
9714126a8a12Smrg# Substitute a variable $(am__tar) that is a command
9715126a8a12Smrg# writing to stdout a FORMAT-tarball containing the directory
9716126a8a12Smrg# $tardir.
9717126a8a12Smrg#     tardir=directory && $(am__tar) > result.tar
9718126a8a12Smrg#
9719126a8a12Smrg# Substitute a variable $(am__untar) that extract such
9720126a8a12Smrg# a tarball read from stdin.
9721126a8a12Smrg#     $(am__untar) < result.tar
9722126a8a12SmrgAC_DEFUN([_AM_PROG_TAR],
9723126a8a12Smrg[# Always define AMTAR for backward compatibility.
9724126a8a12SmrgAM_MISSING_PROG([AMTAR], [tar])
9725126a8a12Smrgm4_if([$1], [v7],
9726126a8a12Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9727126a8a12Smrg     [m4_case([$1], [ustar],, [pax],,
9728126a8a12Smrg              [m4_fatal([Unknown tar format])])
9729126a8a12SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9730126a8a12Smrg# Loop over all known methods to create a tar archive until one works.
9731126a8a12Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9732126a8a12Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9733126a8a12Smrg# Do not fold the above two line into one, because Tru64 sh and
9734126a8a12Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9735126a8a12Smrgfor _am_tool in $_am_tools
9736126a8a12Smrgdo
9737126a8a12Smrg  case $_am_tool in
9738126a8a12Smrg  gnutar)
9739126a8a12Smrg    for _am_tar in tar gnutar gtar;
9740126a8a12Smrg    do
9741126a8a12Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9742126a8a12Smrg    done
9743126a8a12Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9744126a8a12Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9745126a8a12Smrg    am__untar="$_am_tar -xf -"
9746126a8a12Smrg    ;;
9747126a8a12Smrg  plaintar)
9748126a8a12Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9749126a8a12Smrg    # ustar tarball either.
9750126a8a12Smrg    (tar --version) >/dev/null 2>&1 && continue
9751126a8a12Smrg    am__tar='tar chf - "$$tardir"'
9752126a8a12Smrg    am__tar_='tar chf - "$tardir"'
9753126a8a12Smrg    am__untar='tar xf -'
9754126a8a12Smrg    ;;
9755126a8a12Smrg  pax)
9756126a8a12Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
9757126a8a12Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
9758126a8a12Smrg    am__untar='pax -r'
9759126a8a12Smrg    ;;
9760126a8a12Smrg  cpio)
9761126a8a12Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9762126a8a12Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9763126a8a12Smrg    am__untar='cpio -i -H $1 -d'
9764126a8a12Smrg    ;;
9765126a8a12Smrg  none)
9766126a8a12Smrg    am__tar=false
9767126a8a12Smrg    am__tar_=false
9768126a8a12Smrg    am__untar=false
9769126a8a12Smrg    ;;
9770126a8a12Smrg  esac
9771126a8a12Smrg
9772126a8a12Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
9773126a8a12Smrg  # and am__untar set.
9774126a8a12Smrg  test -n "${am_cv_prog_tar_$1}" && break
9775126a8a12Smrg
9776126a8a12Smrg  # tar/untar a dummy directory, and stop if the command works
9777126a8a12Smrg  rm -rf conftest.dir
9778126a8a12Smrg  mkdir conftest.dir
9779126a8a12Smrg  echo GrepMe > conftest.dir/file
9780126a8a12Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9781126a8a12Smrg  rm -rf conftest.dir
9782126a8a12Smrg  if test -s conftest.tar; then
9783126a8a12Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
9784126a8a12Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9785126a8a12Smrg  fi
9786126a8a12Smrgdone
9787126a8a12Smrgrm -rf conftest.dir
9788126a8a12Smrg
9789126a8a12SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9790126a8a12SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
9791126a8a12SmrgAC_SUBST([am__tar])
9792126a8a12SmrgAC_SUBST([am__untar])
9793126a8a12Smrg]) # _AM_PROG_TAR
9794126a8a12Smrg
9795