aclocal.m4 revision d63fdb69
1d63fdb69Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
23da084b3Smrg
33da084b3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4d63fdb69Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
53da084b3Smrg# This file is free software; the Free Software Foundation
63da084b3Smrg# gives unlimited permission to copy and/or distribute it,
73da084b3Smrg# with or without modifications, as long as this notice is preserved.
83da084b3Smrg
93da084b3Smrg# This program is distributed in the hope that it will be useful,
103da084b3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
113da084b3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
123da084b3Smrg# PARTICULAR PURPOSE.
133da084b3Smrg
14d63fdb69Smrgm4_ifndef([AC_AUTOCONF_VERSION],
15d63fdb69Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16d63fdb69Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17d63fdb69Smrg[m4_warning([this file was generated for autoconf 2.63.
18d63fdb69SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19d63fdb69SmrgIf you have problems, you may need to regenerate the build system entirely.
20d63fdb69SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21d63fdb69Smrg
223da084b3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23d63fdb69Smrg#
24d63fdb69Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25d63fdb69Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26d63fdb69Smrg#   Written by Gordon Matzigkeit, 1996
27d63fdb69Smrg#
28d63fdb69Smrg# This file is free software; the Free Software Foundation gives
29d63fdb69Smrg# unlimited permission to copy and/or distribute it, with or without
30d63fdb69Smrg# modifications, as long as this notice is preserved.
31d63fdb69Smrg
32d63fdb69Smrgm4_define([_LT_COPYING], [dnl
33d63fdb69Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34d63fdb69Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35d63fdb69Smrg#   Written by Gordon Matzigkeit, 1996
36d63fdb69Smrg#
37d63fdb69Smrg#   This file is part of GNU Libtool.
38d63fdb69Smrg#
39d63fdb69Smrg# GNU Libtool is free software; you can redistribute it and/or
40d63fdb69Smrg# modify it under the terms of the GNU General Public License as
41d63fdb69Smrg# published by the Free Software Foundation; either version 2 of
42d63fdb69Smrg# the License, or (at your option) any later version.
43d63fdb69Smrg#
44d63fdb69Smrg# As a special exception to the GNU General Public License,
45d63fdb69Smrg# if you distribute this file as part of a program or library that
46d63fdb69Smrg# is built using GNU Libtool, you may include this file under the
47d63fdb69Smrg# same distribution terms that you use for the rest of that program.
48d63fdb69Smrg#
49d63fdb69Smrg# GNU Libtool is distributed in the hope that it will be useful,
50d63fdb69Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51d63fdb69Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52d63fdb69Smrg# GNU General Public License for more details.
53d63fdb69Smrg#
54d63fdb69Smrg# You should have received a copy of the GNU General Public License
55d63fdb69Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56d63fdb69Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57d63fdb69Smrg# obtained by writing to the Free Software Foundation, Inc.,
58d63fdb69Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59d63fdb69Smrg])
603da084b3Smrg
61d63fdb69Smrg# serial 56 LT_INIT
623da084b3Smrg
633da084b3Smrg
64d63fdb69Smrg# LT_PREREQ(VERSION)
65d63fdb69Smrg# ------------------
66d63fdb69Smrg# Complain and exit if this libtool version is less that VERSION.
67d63fdb69Smrgm4_defun([LT_PREREQ],
68d63fdb69Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69d63fdb69Smrg       [m4_default([$3],
70d63fdb69Smrg		   [m4_fatal([Libtool version $1 or higher is required],
71d63fdb69Smrg		             63)])],
72d63fdb69Smrg       [$2])])
733da084b3Smrg
743da084b3Smrg
75d63fdb69Smrg# _LT_CHECK_BUILDDIR
76d63fdb69Smrg# ------------------
77d63fdb69Smrg# Complain if the absolute build directory name contains unusual characters
78d63fdb69Smrgm4_defun([_LT_CHECK_BUILDDIR],
79d63fdb69Smrg[case `pwd` in
80d63fdb69Smrg  *\ * | *\	*)
81d63fdb69Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82d63fdb69Smrgesac
83d63fdb69Smrg])
84d63fdb69Smrg
85d63fdb69Smrg
86d63fdb69Smrg# LT_INIT([OPTIONS])
87d63fdb69Smrg# ------------------
88d63fdb69SmrgAC_DEFUN([LT_INIT],
89d63fdb69Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90d63fdb69SmrgAC_BEFORE([$0], [LT_LANG])dnl
91d63fdb69SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92d63fdb69SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93d63fdb69Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
94d63fdb69Smrg
95d63fdb69Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96d63fdb69Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97d63fdb69Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98d63fdb69Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99d63fdb69Smrgdnl unless we require an AC_DEFUNed macro:
100d63fdb69SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101d63fdb69SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102d63fdb69SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103d63fdb69SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104d63fdb69Smrgm4_require([_LT_PROG_LTMAIN])dnl
105d63fdb69Smrg
106d63fdb69Smrgdnl Parse OPTIONS
107d63fdb69Smrg_LT_SET_OPTIONS([$0], [$1])
1083da084b3Smrg
1093da084b3Smrg# This can be used to rebuild libtool when needed
110d63fdb69SmrgLIBTOOL_DEPS="$ltmain"
1113da084b3Smrg
1123da084b3Smrg# Always use our own libtool.
1133da084b3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1143da084b3SmrgAC_SUBST(LIBTOOL)dnl
1153da084b3Smrg
116d63fdb69Smrg_LT_SETUP
1173da084b3Smrg
118d63fdb69Smrg# Only expand once:
119d63fdb69Smrgm4_define([LT_INIT])
120d63fdb69Smrg])# LT_INIT
1213da084b3Smrg
122d63fdb69Smrg# Old names:
123d63fdb69SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124d63fdb69SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
126d63fdb69Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127d63fdb69Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128d63fdb69Smrg
129d63fdb69Smrg
130d63fdb69Smrg# _LT_CC_BASENAME(CC)
131d63fdb69Smrg# -------------------
132d63fdb69Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133d63fdb69Smrgm4_defun([_LT_CC_BASENAME],
134d63fdb69Smrg[for cc_temp in $1""; do
135d63fdb69Smrg  case $cc_temp in
136d63fdb69Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137d63fdb69Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138d63fdb69Smrg    \-*) ;;
139d63fdb69Smrg    *) break;;
140d63fdb69Smrg  esac
141d63fdb69Smrgdone
142d63fdb69Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143d63fdb69Smrg])
144d63fdb69Smrg
145d63fdb69Smrg
146d63fdb69Smrg# _LT_FILEUTILS_DEFAULTS
147d63fdb69Smrg# ----------------------
148d63fdb69Smrg# It is okay to use these file commands and assume they have been set
149d63fdb69Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150d63fdb69Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151d63fdb69Smrg[: ${CP="cp -f"}
152d63fdb69Smrg: ${MV="mv -f"}
153d63fdb69Smrg: ${RM="rm -f"}
154d63fdb69Smrg])# _LT_FILEUTILS_DEFAULTS
155d63fdb69Smrg
156d63fdb69Smrg
157d63fdb69Smrg# _LT_SETUP
158d63fdb69Smrg# ---------
159d63fdb69Smrgm4_defun([_LT_SETUP],
160d63fdb69Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1613da084b3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162d63fdb69Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163d63fdb69Smrg_LT_DECL([], [host], [0])dnl
164d63fdb69Smrg_LT_DECL([], [host_os], [0])dnl
165d63fdb69Smrgdnl
166d63fdb69Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167d63fdb69Smrg_LT_DECL([], [build], [0])dnl
168d63fdb69Smrg_LT_DECL([], [build_os], [0])dnl
169d63fdb69Smrgdnl
1703da084b3SmrgAC_REQUIRE([AC_PROG_CC])dnl
171d63fdb69SmrgAC_REQUIRE([LT_PATH_LD])dnl
172d63fdb69SmrgAC_REQUIRE([LT_PATH_NM])dnl
173d63fdb69Smrgdnl
1743da084b3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175d63fdb69Smrgtest -z "$LN_S" && LN_S="ln -s"
176d63fdb69Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1773da084b3Smrgdnl
178d63fdb69SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179d63fdb69Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180d63fdb69Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181d63fdb69Smrgdnl
182d63fdb69Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183d63fdb69Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184d63fdb69Smrgm4_require([_LT_CMD_RELOAD])dnl
185d63fdb69Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186d63fdb69Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187d63fdb69Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188d63fdb69Smrg
189d63fdb69Smrg_LT_CONFIG_LIBTOOL_INIT([
190d63fdb69Smrg# See if we are running on zsh, and set the options which allow our
191d63fdb69Smrg# commands through without removal of \ escapes INIT.
192d63fdb69Smrgif test -n "\${ZSH_VERSION+set}" ; then
193d63fdb69Smrg   setopt NO_GLOB_SUBST
194d63fdb69Smrgfi
195d63fdb69Smrg])
196d63fdb69Smrgif test -n "${ZSH_VERSION+set}" ; then
197d63fdb69Smrg   setopt NO_GLOB_SUBST
198d63fdb69Smrgfi
1993da084b3Smrg
200d63fdb69Smrg_LT_CHECK_OBJDIR
2013da084b3Smrg
202d63fdb69Smrgm4_require([_LT_TAG_COMPILER])dnl
203d63fdb69Smrg_LT_PROG_ECHO_BACKSLASH
2043da084b3Smrg
2053da084b3Smrgcase $host_os in
2063da084b3Smrgaix3*)
2073da084b3Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2083da084b3Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2093da084b3Smrg  # vanish in a puff of smoke.
2103da084b3Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
2113da084b3Smrg    COLLECT_NAMES=
2123da084b3Smrg    export COLLECT_NAMES
2133da084b3Smrg  fi
2143da084b3Smrg  ;;
2153da084b3Smrgesac
2163da084b3Smrg
2173da084b3Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
2183da084b3Smrg# metacharacters that are still active within double-quoted strings.
219d63fdb69Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2203da084b3Smrg
2213da084b3Smrg# Same as above, but do not quote variable references.
222d63fdb69Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2233da084b3Smrg
2243da084b3Smrg# Sed substitution to delay expansion of an escaped shell variable in a
2253da084b3Smrg# double_quote_subst'ed string.
2263da084b3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2273da084b3Smrg
228d63fdb69Smrg# Sed substitution to delay expansion of an escaped single quote.
229d63fdb69Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230d63fdb69Smrg
2313da084b3Smrg# Sed substitution to avoid accidental globbing in evaled expressions
2323da084b3Smrgno_glob_subst='s/\*/\\\*/g'
2333da084b3Smrg
2343da084b3Smrg# Global variables:
235d63fdb69Smrgofile=libtool
2363da084b3Smrgcan_build_shared=yes
2373da084b3Smrg
2383da084b3Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
2393da084b3Smrg# which needs '.lib').
2403da084b3Smrglibext=a
2413da084b3Smrg
242d63fdb69Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
2433da084b3Smrg
2443da084b3Smrgold_CC="$CC"
2453da084b3Smrgold_CFLAGS="$CFLAGS"
2463da084b3Smrg
2473da084b3Smrg# Set sane defaults for various variables
2483da084b3Smrgtest -z "$CC" && CC=cc
2493da084b3Smrgtest -z "$LTCC" && LTCC=$CC
2503da084b3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2513da084b3Smrgtest -z "$LD" && LD=ld
2523da084b3Smrgtest -z "$ac_objext" && ac_objext=o
2533da084b3Smrg
2543da084b3Smrg_LT_CC_BASENAME([$compiler])
2553da084b3Smrg
2563da084b3Smrg# Only perform the check for file, if the check method requires it
257d63fdb69Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2583da084b3Smrgcase $deplibs_check_method in
2593da084b3Smrgfile_magic*)
2603da084b3Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261d63fdb69Smrg    _LT_PATH_MAGIC
2623da084b3Smrg  fi
2633da084b3Smrg  ;;
2643da084b3Smrgesac
2653da084b3Smrg
266d63fdb69Smrg# Use C for the default configuration in the libtool script
267d63fdb69SmrgLT_SUPPORTED_TAG([CC])
268d63fdb69Smrg_LT_LANG_C_CONFIG
269d63fdb69Smrg_LT_LANG_DEFAULT_CONFIG
270d63fdb69Smrg_LT_CONFIG_COMMANDS
271d63fdb69Smrg])# _LT_SETUP
2723da084b3Smrg
2733da084b3Smrg
274d63fdb69Smrg# _LT_PROG_LTMAIN
275d63fdb69Smrg# ---------------
276d63fdb69Smrg# Note that this code is called both from `configure', and `config.status'
277d63fdb69Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278d63fdb69Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279d63fdb69Smrg# so we pass a copy along to make sure it has a sensible value anyway.
280d63fdb69Smrgm4_defun([_LT_PROG_LTMAIN],
281d63fdb69Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282d63fdb69Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283d63fdb69Smrgltmain="$ac_aux_dir/ltmain.sh"
284d63fdb69Smrg])# _LT_PROG_LTMAIN
2853da084b3Smrg
2863da084b3Smrg
2873da084b3Smrg
288d63fdb69Smrg# So that we can recreate a full libtool script including additional
289d63fdb69Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290d63fdb69Smrg# in macros and then make a single call at the end using the `libtool'
291d63fdb69Smrg# label.
2923da084b3Smrg
2933da084b3Smrg
294d63fdb69Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295d63fdb69Smrg# ----------------------------------------
296d63fdb69Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297d63fdb69Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298d63fdb69Smrg[m4_ifval([$1],
299d63fdb69Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300d63fdb69Smrg                     [$1
301d63fdb69Smrg])])])
3023da084b3Smrg
303d63fdb69Smrg# Initialize.
304d63fdb69Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3053da084b3Smrg
3063da084b3Smrg
307d63fdb69Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308d63fdb69Smrg# ------------------------------
309d63fdb69Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310d63fdb69Smrgm4_define([_LT_CONFIG_LIBTOOL],
311d63fdb69Smrg[m4_ifval([$1],
312d63fdb69Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313d63fdb69Smrg                     [$1
314d63fdb69Smrg])])])
315d63fdb69Smrg
316d63fdb69Smrg# Initialize.
317d63fdb69Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318d63fdb69Smrg
319d63fdb69Smrg
320d63fdb69Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321d63fdb69Smrg# -----------------------------------------------------
322d63fdb69Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323d63fdb69Smrg[_LT_CONFIG_LIBTOOL([$1])
324d63fdb69Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
3253da084b3Smrg])
3263da084b3Smrg
3273da084b3Smrg
328d63fdb69Smrg# _LT_FORMAT_COMMENT([COMMENT])
329d63fdb69Smrg# -----------------------------
330d63fdb69Smrg# Add leading comment marks to the start of each line, and a trailing
331d63fdb69Smrg# full-stop to the whole comment if one is not present already.
332d63fdb69Smrgm4_define([_LT_FORMAT_COMMENT],
333d63fdb69Smrg[m4_ifval([$1], [
334d63fdb69Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335d63fdb69Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336d63fdb69Smrg)])
337d63fdb69Smrg
338d63fdb69Smrg
339d63fdb69Smrg
340d63fdb69Smrg
341d63fdb69Smrg
342d63fdb69Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343d63fdb69Smrg# -------------------------------------------------------------------
344d63fdb69Smrg# CONFIGNAME is the name given to the value in the libtool script.
345d63fdb69Smrg# VARNAME is the (base) name used in the configure script.
346d63fdb69Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347d63fdb69Smrg# VARNAME.  Any other value will be used directly.
348d63fdb69Smrgm4_define([_LT_DECL],
349d63fdb69Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350d63fdb69Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351d63fdb69Smrg	[m4_ifval([$1], [$1], [$2])])
352d63fdb69Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353d63fdb69Smrg    m4_ifval([$4],
354d63fdb69Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355d63fdb69Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356d63fdb69Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357d63fdb69Smrg])
3583da084b3Smrg
3593da084b3Smrg
360d63fdb69Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361d63fdb69Smrg# --------------------------------------------------------
362d63fdb69Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3633da084b3Smrg
3643da084b3Smrg
365d63fdb69Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366d63fdb69Smrg# ------------------------------------------------
367d63fdb69Smrgm4_define([lt_decl_tag_varnames],
368d63fdb69Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3693da084b3Smrg
3703da084b3Smrg
371d63fdb69Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372d63fdb69Smrg# ---------------------------------------------------------
373d63fdb69Smrgm4_define([_lt_decl_filter],
374d63fdb69Smrg[m4_case([$#],
375d63fdb69Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
376d63fdb69Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377d63fdb69Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378d63fdb69Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379d63fdb69Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380d63fdb69Smrg])
3813da084b3Smrg
3823da084b3Smrg
383d63fdb69Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384d63fdb69Smrg# --------------------------------------------------
385d63fdb69Smrgm4_define([lt_decl_quote_varnames],
386d63fdb69Smrg[_lt_decl_filter([value], [1], $@)])
3873da084b3Smrg
3883da084b3Smrg
389d63fdb69Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390d63fdb69Smrg# ---------------------------------------------------
391d63fdb69Smrgm4_define([lt_decl_dquote_varnames],
392d63fdb69Smrg[_lt_decl_filter([value], [2], $@)])
3933da084b3Smrg
3943da084b3Smrg
395d63fdb69Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396d63fdb69Smrg# ---------------------------------------------------
397d63fdb69Smrgm4_define([lt_decl_varnames_tagged],
398d63fdb69Smrg[m4_assert([$# <= 2])dnl
399d63fdb69Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
400d63fdb69Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401d63fdb69Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402d63fdb69Smrgm4_define([_lt_decl_varnames_tagged],
403d63fdb69Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4043da084b3Smrg
4053da084b3Smrg
406d63fdb69Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407d63fdb69Smrg# ------------------------------------------------
408d63fdb69Smrgm4_define([lt_decl_all_varnames],
409d63fdb69Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410d63fdb69Smrg     m4_if([$2], [],
411d63fdb69Smrg	   m4_quote(lt_decl_varnames),
412d63fdb69Smrg	m4_quote(m4_shift($@))))[]dnl
413d63fdb69Smrg])
414d63fdb69Smrgm4_define([_lt_decl_all_varnames],
415d63fdb69Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
416d63fdb69Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417d63fdb69Smrg])
4183da084b3Smrg
4193da084b3Smrg
420d63fdb69Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421d63fdb69Smrg# ------------------------------------
422d63fdb69Smrg# Quote a variable value, and forward it to `config.status' so that its
423d63fdb69Smrg# declaration there will have the same value as in `configure'.  VARNAME
424d63fdb69Smrg# must have a single quote delimited value for this to work.
425d63fdb69Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426d63fdb69Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
4273da084b3Smrg
4283da084b3Smrg
429d63fdb69Smrg# _LT_CONFIG_STATUS_DECLARATIONS
430d63fdb69Smrg# ------------------------------
431d63fdb69Smrg# We delimit libtool config variables with single quotes, so when
432d63fdb69Smrg# we write them to config.status, we have to be sure to quote all
433d63fdb69Smrg# embedded single quotes properly.  In configure, this macro expands
434d63fdb69Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435d63fdb69Smrg#
436d63fdb69Smrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437d63fdb69Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438d63fdb69Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439d63fdb69Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4403da084b3Smrg
4413da084b3Smrg
442d63fdb69Smrg# _LT_LIBTOOL_TAGS
443d63fdb69Smrg# ----------------
444d63fdb69Smrg# Output comment and list of tags supported by the script
445d63fdb69Smrgm4_defun([_LT_LIBTOOL_TAGS],
446d63fdb69Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447d63fdb69Smrgavailable_tags="_LT_TAGS"dnl
448d63fdb69Smrg])
4493da084b3Smrg
4503da084b3Smrg
451d63fdb69Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452d63fdb69Smrg# -----------------------------------
453d63fdb69Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454d63fdb69Smrg# expand to a commented shell variable setting:
455d63fdb69Smrg#
456d63fdb69Smrg#    # Some comment about what VAR is for.
457d63fdb69Smrg#    visible_name=$lt_internal_name
458d63fdb69Smrgm4_define([_LT_LIBTOOL_DECLARE],
459d63fdb69Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460d63fdb69Smrg					   [description])))[]dnl
461d63fdb69Smrgm4_pushdef([_libtool_name],
462d63fdb69Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463d63fdb69Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464d63fdb69Smrg    [0], [_libtool_name=[$]$1],
465d63fdb69Smrg    [1], [_libtool_name=$lt_[]$1],
466d63fdb69Smrg    [2], [_libtool_name=$lt_[]$1],
467d63fdb69Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468d63fdb69Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469d63fdb69Smrg])
4703da084b3Smrg
471d63fdb69Smrg
472d63fdb69Smrg# _LT_LIBTOOL_CONFIG_VARS
473d63fdb69Smrg# -----------------------
474d63fdb69Smrg# Produce commented declarations of non-tagged libtool config variables
475d63fdb69Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476d63fdb69Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477d63fdb69Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478d63fdb69Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479d63fdb69Smrg[m4_foreach([_lt_var],
480d63fdb69Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481d63fdb69Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482d63fdb69Smrg
483d63fdb69Smrg
484d63fdb69Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
485d63fdb69Smrg# -------------------------
486d63fdb69Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
487d63fdb69Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488d63fdb69Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489d63fdb69Smrg
490d63fdb69Smrg
491d63fdb69Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492d63fdb69Smrg# ------------------------------
493d63fdb69Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494d63fdb69Smrg
495d63fdb69Smrg
496d63fdb69Smrg# _LT_CONFIG_COMMANDS
497d63fdb69Smrg# -------------------
498d63fdb69Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499d63fdb69Smrg# variables for single and double quote escaping we saved from calls
500d63fdb69Smrg# to _LT_DECL, we can put quote escaped variables declarations
501d63fdb69Smrg# into `config.status', and then the shell code to quote escape them in
502d63fdb69Smrg# for loops in `config.status'.  Finally, any additional code accumulated
503d63fdb69Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504d63fdb69Smrgm4_defun([_LT_CONFIG_COMMANDS],
505d63fdb69Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506d63fdb69Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507d63fdb69Smrg	dnl instead of duplicating it all over again into config.status,
508d63fdb69Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
509d63fdb69Smrg	dnl needs to know what name is stored there:
510d63fdb69Smrg        [AC_CONFIG_COMMANDS([libtool],
511d63fdb69Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512d63fdb69Smrg    dnl If the libtool generation code is destined for config.status,
513d63fdb69Smrg    dnl expand the accumulated commands and init code now:
514d63fdb69Smrg    [AC_CONFIG_COMMANDS([libtool],
515d63fdb69Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516d63fdb69Smrg])#_LT_CONFIG_COMMANDS
517d63fdb69Smrg
518d63fdb69Smrg
519d63fdb69Smrg# Initialize.
520d63fdb69Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521d63fdb69Smrg[
522d63fdb69Smrg
523d63fdb69Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524d63fdb69Smrg# if CDPATH is set.
525d63fdb69Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526d63fdb69Smrg
527d63fdb69Smrgsed_quote_subst='$sed_quote_subst'
528d63fdb69Smrgdouble_quote_subst='$double_quote_subst'
529d63fdb69Smrgdelay_variable_subst='$delay_variable_subst'
530d63fdb69Smrg_LT_CONFIG_STATUS_DECLARATIONS
531d63fdb69SmrgLTCC='$LTCC'
532d63fdb69SmrgLTCFLAGS='$LTCFLAGS'
533d63fdb69Smrgcompiler='$compiler_DEFAULT'
534d63fdb69Smrg
535d63fdb69Smrg# Quote evaled strings.
536d63fdb69Smrgfor var in lt_decl_all_varnames([[ \
537d63fdb69Smrg]], lt_decl_quote_varnames); do
538d63fdb69Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539d63fdb69Smrg    *[[\\\\\\\`\\"\\\$]]*)
540d63fdb69Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
5413da084b3Smrg      ;;
542d63fdb69Smrg    *)
543d63fdb69Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5443da084b3Smrg      ;;
5453da084b3Smrg    esac
546d63fdb69Smrgdone
547d63fdb69Smrg
548d63fdb69Smrg# Double-quote double-evaled strings.
549d63fdb69Smrgfor var in lt_decl_all_varnames([[ \
550d63fdb69Smrg]], lt_decl_dquote_varnames); do
551d63fdb69Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552d63fdb69Smrg    *[[\\\\\\\`\\"\\\$]]*)
553d63fdb69Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
5543da084b3Smrg      ;;
555d63fdb69Smrg    *)
556d63fdb69Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5573da084b3Smrg      ;;
5583da084b3Smrg    esac
559d63fdb69Smrgdone
5603da084b3Smrg
561d63fdb69Smrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562d63fdb69Smrgcase \$lt_ECHO in
563d63fdb69Smrg*'\\\[$]0 --fallback-echo"')dnl "
564d63fdb69Smrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
5653da084b3Smrg  ;;
566d63fdb69Smrgesac
5673da084b3Smrg
568d63fdb69Smrg_LT_OUTPUT_LIBTOOL_INIT
569d63fdb69Smrg])
5703da084b3Smrg
5713da084b3Smrg
572d63fdb69Smrg# LT_OUTPUT
573d63fdb69Smrg# ---------
574d63fdb69Smrg# This macro allows early generation of the libtool script (before
575d63fdb69Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
576d63fdb69Smrg# tests.
577d63fdb69SmrgAC_DEFUN([LT_OUTPUT],
578d63fdb69Smrg[: ${CONFIG_LT=./config.lt}
579d63fdb69SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580d63fdb69Smrgcat >"$CONFIG_LT" <<_LTEOF
581d63fdb69Smrg#! $SHELL
582d63fdb69Smrg# Generated by $as_me.
583d63fdb69Smrg# Run this file to recreate a libtool stub with the current configuration.
584d63fdb69Smrg
585d63fdb69Smrglt_cl_silent=false
586d63fdb69SmrgSHELL=\${CONFIG_SHELL-$SHELL}
587d63fdb69Smrg_LTEOF
588d63fdb69Smrg
589d63fdb69Smrgcat >>"$CONFIG_LT" <<\_LTEOF
590d63fdb69SmrgAS_SHELL_SANITIZE
591d63fdb69Smrg_AS_PREPARE
592d63fdb69Smrg
593d63fdb69Smrgexec AS_MESSAGE_FD>&1
594d63fdb69Smrgexec AS_MESSAGE_LOG_FD>>config.log
595d63fdb69Smrg{
596d63fdb69Smrg  echo
597d63fdb69Smrg  AS_BOX([Running $as_me.])
598d63fdb69Smrg} >&AS_MESSAGE_LOG_FD
5993da084b3Smrg
600d63fdb69Smrglt_cl_help="\
601d63fdb69Smrg\`$as_me' creates a local libtool stub from the current configuration,
602d63fdb69Smrgfor use in further configure time tests before the real libtool is
603d63fdb69Smrggenerated.
6043da084b3Smrg
605d63fdb69SmrgUsage: $[0] [[OPTIONS]]
6063da084b3Smrg
607d63fdb69Smrg  -h, --help      print this help, then exit
608d63fdb69Smrg  -V, --version   print version number, then exit
609d63fdb69Smrg  -q, --quiet     do not print progress messages
610d63fdb69Smrg  -d, --debug     don't remove temporary files
6113da084b3Smrg
612d63fdb69SmrgReport bugs to <bug-libtool@gnu.org>."
6133da084b3Smrg
614d63fdb69Smrglt_cl_version="\
615d63fdb69Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616d63fdb69Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617d63fdb69Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6183da084b3Smrg
619d63fdb69SmrgCopyright (C) 2008 Free Software Foundation, Inc.
620d63fdb69SmrgThis config.lt script is free software; the Free Software Foundation
621d63fdb69Smrggives unlimited permision to copy, distribute and modify it."
6223da084b3Smrg
623d63fdb69Smrgwhile test $[#] != 0
624d63fdb69Smrgdo
625d63fdb69Smrg  case $[1] in
626d63fdb69Smrg    --version | --v* | -V )
627d63fdb69Smrg      echo "$lt_cl_version"; exit 0 ;;
628d63fdb69Smrg    --help | --h* | -h )
629d63fdb69Smrg      echo "$lt_cl_help"; exit 0 ;;
630d63fdb69Smrg    --debug | --d* | -d )
631d63fdb69Smrg      debug=: ;;
632d63fdb69Smrg    --quiet | --q* | --silent | --s* | -q )
633d63fdb69Smrg      lt_cl_silent=: ;;
634d63fdb69Smrg
635d63fdb69Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636d63fdb69SmrgTry \`$[0] --help' for more information.]) ;;
637d63fdb69Smrg
638d63fdb69Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639d63fdb69SmrgTry \`$[0] --help' for more information.]) ;;
640d63fdb69Smrg  esac
641d63fdb69Smrg  shift
642d63fdb69Smrgdone
6433da084b3Smrg
644d63fdb69Smrgif $lt_cl_silent; then
645d63fdb69Smrg  exec AS_MESSAGE_FD>/dev/null
646d63fdb69Smrgfi
647d63fdb69Smrg_LTEOF
648d63fdb69Smrg
649d63fdb69Smrgcat >>"$CONFIG_LT" <<_LTEOF
650d63fdb69Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651d63fdb69Smrg_LTEOF
652d63fdb69Smrg
653d63fdb69Smrgcat >>"$CONFIG_LT" <<\_LTEOF
654d63fdb69SmrgAC_MSG_NOTICE([creating $ofile])
655d63fdb69Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
656d63fdb69SmrgAS_EXIT(0)
657d63fdb69Smrg_LTEOF
658d63fdb69Smrgchmod +x "$CONFIG_LT"
659d63fdb69Smrg
660d63fdb69Smrg# configure is writing to config.log, but config.lt does its own redirection,
661d63fdb69Smrg# appending to config.log, which fails on DOS, as config.log is still kept
662d63fdb69Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663d63fdb69Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664d63fdb69Smrgif test "$no_create" != yes; then
665d63fdb69Smrg  lt_cl_success=:
666d63fdb69Smrg  test "$silent" = yes &&
667d63fdb69Smrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668d63fdb69Smrg  exec AS_MESSAGE_LOG_FD>/dev/null
669d63fdb69Smrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670d63fdb69Smrg  exec AS_MESSAGE_LOG_FD>>config.log
671d63fdb69Smrg  $lt_cl_success || AS_EXIT(1)
672d63fdb69Smrgfi
673d63fdb69Smrg])# LT_OUTPUT
6743da084b3Smrg
6753da084b3Smrg
676d63fdb69Smrg# _LT_CONFIG(TAG)
677d63fdb69Smrg# ---------------
678d63fdb69Smrg# If TAG is the built-in tag, create an initial libtool script with a
679d63fdb69Smrg# default configuration from the untagged config vars.  Otherwise add code
680d63fdb69Smrg# to config.status for appending the configuration named by TAG from the
681d63fdb69Smrg# matching tagged config vars.
682d63fdb69Smrgm4_defun([_LT_CONFIG],
683d63fdb69Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684d63fdb69Smrg_LT_CONFIG_SAVE_COMMANDS([
685d63fdb69Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686d63fdb69Smrg  m4_if(_LT_TAG, [C], [
687d63fdb69Smrg    # See if we are running on zsh, and set the options which allow our
688d63fdb69Smrg    # commands through without removal of \ escapes.
689d63fdb69Smrg    if test -n "${ZSH_VERSION+set}" ; then
690d63fdb69Smrg      setopt NO_GLOB_SUBST
691d63fdb69Smrg    fi
6923da084b3Smrg
693d63fdb69Smrg    cfgfile="${ofile}T"
694d63fdb69Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695d63fdb69Smrg    $RM "$cfgfile"
6963da084b3Smrg
697d63fdb69Smrg    cat <<_LT_EOF >> "$cfgfile"
698d63fdb69Smrg#! $SHELL
6993da084b3Smrg
700d63fdb69Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701d63fdb69Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702d63fdb69Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703d63fdb69Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704d63fdb69Smrg#
705d63fdb69Smrg_LT_COPYING
706d63fdb69Smrg_LT_LIBTOOL_TAGS
7073da084b3Smrg
708d63fdb69Smrg# ### BEGIN LIBTOOL CONFIG
709d63fdb69Smrg_LT_LIBTOOL_CONFIG_VARS
710d63fdb69Smrg_LT_LIBTOOL_TAG_VARS
711d63fdb69Smrg# ### END LIBTOOL CONFIG
7123da084b3Smrg
713d63fdb69Smrg_LT_EOF
7143da084b3Smrg
715d63fdb69Smrg  case $host_os in
716d63fdb69Smrg  aix3*)
717d63fdb69Smrg    cat <<\_LT_EOF >> "$cfgfile"
718d63fdb69Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
719d63fdb69Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720d63fdb69Smrg# vanish in a puff of smoke.
721d63fdb69Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
722d63fdb69Smrg  COLLECT_NAMES=
723d63fdb69Smrg  export COLLECT_NAMES
724d63fdb69Smrgfi
725d63fdb69Smrg_LT_EOF
7263da084b3Smrg    ;;
7273da084b3Smrg  esac
7283da084b3Smrg
729d63fdb69Smrg  _LT_PROG_LTMAIN
7303da084b3Smrg
731d63fdb69Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
732d63fdb69Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733d63fdb69Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734d63fdb69Smrg  # is reportedly fixed, but why not run on old versions too?
735d63fdb69Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736d63fdb69Smrg    || (rm -f "$cfgfile"; exit 1)
7373da084b3Smrg
738d63fdb69Smrg  _LT_PROG_XSI_SHELLFNS
7393da084b3Smrg
740d63fdb69Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741d63fdb69Smrg    || (rm -f "$cfgfile"; exit 1)
7423da084b3Smrg
743d63fdb69Smrg  mv -f "$cfgfile" "$ofile" ||
744d63fdb69Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745d63fdb69Smrg  chmod +x "$ofile"
746d63fdb69Smrg],
747d63fdb69Smrg[cat <<_LT_EOF >> "$ofile"
7483da084b3Smrg
749d63fdb69Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750d63fdb69Smrgdnl in a comment (ie after a #).
751d63fdb69Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752d63fdb69Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753d63fdb69Smrg# ### END LIBTOOL TAG CONFIG: $1
754d63fdb69Smrg_LT_EOF
755d63fdb69Smrg])dnl /m4_if
756d63fdb69Smrg],
757d63fdb69Smrg[m4_if([$1], [], [
758d63fdb69Smrg    PACKAGE='$PACKAGE'
759d63fdb69Smrg    VERSION='$VERSION'
760d63fdb69Smrg    TIMESTAMP='$TIMESTAMP'
761d63fdb69Smrg    RM='$RM'
762d63fdb69Smrg    ofile='$ofile'], [])
763d63fdb69Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764d63fdb69Smrg])# _LT_CONFIG
7653da084b3Smrg
7663da084b3Smrg
767d63fdb69Smrg# LT_SUPPORTED_TAG(TAG)
768d63fdb69Smrg# ---------------------
769d63fdb69Smrg# Trace this macro to discover what tags are supported by the libtool
770d63fdb69Smrg# --tag option, using:
771d63fdb69Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772d63fdb69SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
7733da084b3Smrg
7743da084b3Smrg
775d63fdb69Smrg# C support is built-in for now
776d63fdb69Smrgm4_define([_LT_LANG_C_enabled], [])
777d63fdb69Smrgm4_define([_LT_TAGS], [])
7783da084b3Smrg
7793da084b3Smrg
780d63fdb69Smrg# LT_LANG(LANG)
781d63fdb69Smrg# -------------
782d63fdb69Smrg# Enable libtool support for the given language if not already enabled.
783d63fdb69SmrgAC_DEFUN([LT_LANG],
784d63fdb69Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785d63fdb69Smrgm4_case([$1],
786d63fdb69Smrg  [C],			[_LT_LANG(C)],
787d63fdb69Smrg  [C++],		[_LT_LANG(CXX)],
788d63fdb69Smrg  [Java],		[_LT_LANG(GCJ)],
789d63fdb69Smrg  [Fortran 77],		[_LT_LANG(F77)],
790d63fdb69Smrg  [Fortran],		[_LT_LANG(FC)],
791d63fdb69Smrg  [Windows Resource],	[_LT_LANG(RC)],
792d63fdb69Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793d63fdb69Smrg    [_LT_LANG($1)],
794d63fdb69Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795d63fdb69Smrg])# LT_LANG
796d63fdb69Smrg
797d63fdb69Smrg
798d63fdb69Smrg# _LT_LANG(LANGNAME)
799d63fdb69Smrg# ------------------
800d63fdb69Smrgm4_defun([_LT_LANG],
801d63fdb69Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802d63fdb69Smrg  [LT_SUPPORTED_TAG([$1])dnl
803d63fdb69Smrg  m4_append([_LT_TAGS], [$1 ])dnl
804d63fdb69Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805d63fdb69Smrg  _LT_LANG_$1_CONFIG($1)])dnl
806d63fdb69Smrg])# _LT_LANG
8073da084b3Smrg
8083da084b3Smrg
809d63fdb69Smrg# _LT_LANG_DEFAULT_CONFIG
810d63fdb69Smrg# -----------------------
811d63fdb69Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812d63fdb69Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813d63fdb69Smrg  [LT_LANG(CXX)],
814d63fdb69Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815d63fdb69Smrg
816d63fdb69SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817d63fdb69Smrg  [LT_LANG(F77)],
818d63fdb69Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819d63fdb69Smrg
820d63fdb69SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821d63fdb69Smrg  [LT_LANG(FC)],
822d63fdb69Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823d63fdb69Smrg
824d63fdb69Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825d63fdb69Smrgdnl pulling things in needlessly.
826d63fdb69SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827d63fdb69Smrg  [LT_LANG(GCJ)],
828d63fdb69Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829d63fdb69Smrg    [LT_LANG(GCJ)],
830d63fdb69Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831d63fdb69Smrg      [LT_LANG(GCJ)],
832d63fdb69Smrg      [m4_ifdef([AC_PROG_GCJ],
833d63fdb69Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834d63fdb69Smrg       m4_ifdef([A][M_PROG_GCJ],
835d63fdb69Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836d63fdb69Smrg       m4_ifdef([LT_PROG_GCJ],
837d63fdb69Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838d63fdb69Smrg
839d63fdb69SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840d63fdb69Smrg  [LT_LANG(RC)],
841d63fdb69Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842d63fdb69Smrg])# _LT_LANG_DEFAULT_CONFIG
843d63fdb69Smrg
844d63fdb69Smrg# Obsolete macros:
845d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
850d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854d63fdb69Smrg
855d63fdb69Smrg
856d63fdb69Smrg# _LT_TAG_COMPILER
857d63fdb69Smrg# ----------------
858d63fdb69Smrgm4_defun([_LT_TAG_COMPILER],
859d63fdb69Smrg[AC_REQUIRE([AC_PROG_CC])dnl
8603da084b3Smrg
861d63fdb69Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862d63fdb69Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863d63fdb69Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864d63fdb69Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
8653da084b3Smrg
866d63fdb69Smrg# If no C compiler was specified, use CC.
867d63fdb69SmrgLTCC=${LTCC-"$CC"}
8683da084b3Smrg
869d63fdb69Smrg# If no C compiler flags were specified, use CFLAGS.
870d63fdb69SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8713da084b3Smrg
872d63fdb69Smrg# Allow CC to be a program name with arguments.
873d63fdb69Smrgcompiler=$CC
874d63fdb69Smrg])# _LT_TAG_COMPILER
8753da084b3Smrg
8763da084b3Smrg
877d63fdb69Smrg# _LT_COMPILER_BOILERPLATE
878d63fdb69Smrg# ------------------------
879d63fdb69Smrg# Check for compiler boilerplate output or warnings with
880d63fdb69Smrg# the simple compiler test code.
881d63fdb69Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
882d63fdb69Smrg[m4_require([_LT_DECL_SED])dnl
883d63fdb69Smrgac_outfile=conftest.$ac_objext
884d63fdb69Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
885d63fdb69Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886d63fdb69Smrg_lt_compiler_boilerplate=`cat conftest.err`
887d63fdb69Smrg$RM conftest*
888d63fdb69Smrg])# _LT_COMPILER_BOILERPLATE
8893da084b3Smrg
8903da084b3Smrg
891d63fdb69Smrg# _LT_LINKER_BOILERPLATE
892d63fdb69Smrg# ----------------------
893d63fdb69Smrg# Check for linker boilerplate output or warnings with
894d63fdb69Smrg# the simple link test code.
895d63fdb69Smrgm4_defun([_LT_LINKER_BOILERPLATE],
896d63fdb69Smrg[m4_require([_LT_DECL_SED])dnl
897d63fdb69Smrgac_outfile=conftest.$ac_objext
898d63fdb69Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
899d63fdb69Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900d63fdb69Smrg_lt_linker_boilerplate=`cat conftest.err`
901d63fdb69Smrg$RM -r conftest*
902d63fdb69Smrg])# _LT_LINKER_BOILERPLATE
9033da084b3Smrg
904d63fdb69Smrg# _LT_REQUIRED_DARWIN_CHECKS
905d63fdb69Smrg# -------------------------
906d63fdb69Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907d63fdb69Smrg  case $host_os in
908d63fdb69Smrg    rhapsody* | darwin*)
909d63fdb69Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910d63fdb69Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911d63fdb69Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912d63fdb69Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913d63fdb69Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914d63fdb69Smrg    _LT_DECL([], [DSYMUTIL], [1],
915d63fdb69Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916d63fdb69Smrg    _LT_DECL([], [NMEDIT], [1],
917d63fdb69Smrg      [Tool to change global to local symbols on Mac OS X])
918d63fdb69Smrg    _LT_DECL([], [LIPO], [1],
919d63fdb69Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
920d63fdb69Smrg    _LT_DECL([], [OTOOL], [1],
921d63fdb69Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922d63fdb69Smrg    _LT_DECL([], [OTOOL64], [1],
923d63fdb69Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924d63fdb69Smrg
925d63fdb69Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926d63fdb69Smrg      [lt_cv_apple_cc_single_mod=no
927d63fdb69Smrg      if test -z "${LT_MULTI_MODULE}"; then
928d63fdb69Smrg	# By default we will add the -single_module flag. You can override
929d63fdb69Smrg	# by either setting the environment variable LT_MULTI_MODULE
930d63fdb69Smrg	# non-empty at configure time, or by adding -multi_module to the
931d63fdb69Smrg	# link flags.
932d63fdb69Smrg	rm -rf libconftest.dylib*
933d63fdb69Smrg	echo "int foo(void){return 1;}" > conftest.c
934d63fdb69Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935d63fdb69Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936d63fdb69Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937d63fdb69Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938d63fdb69Smrg        _lt_result=$?
939d63fdb69Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940d63fdb69Smrg	  lt_cv_apple_cc_single_mod=yes
941d63fdb69Smrg	else
942d63fdb69Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943d63fdb69Smrg	fi
944d63fdb69Smrg	rm -rf libconftest.dylib*
945d63fdb69Smrg	rm -f conftest.*
946d63fdb69Smrg      fi])
947d63fdb69Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948d63fdb69Smrg      [lt_cv_ld_exported_symbols_list],
949d63fdb69Smrg      [lt_cv_ld_exported_symbols_list=no
950d63fdb69Smrg      save_LDFLAGS=$LDFLAGS
951d63fdb69Smrg      echo "_main" > conftest.sym
952d63fdb69Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953d63fdb69Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954d63fdb69Smrg	[lt_cv_ld_exported_symbols_list=yes],
955d63fdb69Smrg	[lt_cv_ld_exported_symbols_list=no])
956d63fdb69Smrg	LDFLAGS="$save_LDFLAGS"
9573da084b3Smrg    ])
958d63fdb69Smrg    case $host_os in
959d63fdb69Smrg    rhapsody* | darwin1.[[012]])
960d63fdb69Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961d63fdb69Smrg    darwin1.*)
962d63fdb69Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963d63fdb69Smrg    darwin*) # darwin 5.x on
964d63fdb69Smrg      # if running on 10.5 or later, the deployment target defaults
965d63fdb69Smrg      # to the OS version, if on x86, and 10.4, the deployment
966d63fdb69Smrg      # target defaults to 10.4. Don't you love it?
967d63fdb69Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968d63fdb69Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969d63fdb69Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970d63fdb69Smrg	10.[[012]]*)
971d63fdb69Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972d63fdb69Smrg	10.*)
973d63fdb69Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974d63fdb69Smrg      esac
975d63fdb69Smrg    ;;
976d63fdb69Smrg  esac
977d63fdb69Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978d63fdb69Smrg      _lt_dar_single_mod='$single_module'
979d63fdb69Smrg    fi
980d63fdb69Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981d63fdb69Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982d63fdb69Smrg    else
983d63fdb69Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984d63fdb69Smrg    fi
985d63fdb69Smrg    if test "$DSYMUTIL" != ":"; then
986d63fdb69Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987d63fdb69Smrg    else
988d63fdb69Smrg      _lt_dsymutil=
9893da084b3Smrg    fi
9903da084b3Smrg    ;;
9913da084b3Smrg  esac
992d63fdb69Smrg])
9933da084b3Smrg
9943da084b3Smrg
995d63fdb69Smrg# _LT_DARWIN_LINKER_FEATURES
996d63fdb69Smrg# --------------------------
997d63fdb69Smrg# Checks for linker and compiler features on darwin
998d63fdb69Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999d63fdb69Smrg[
1000d63fdb69Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001d63fdb69Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002d63fdb69Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003d63fdb69Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004d63fdb69Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005d63fdb69Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006d63fdb69Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007d63fdb69Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008d63fdb69Smrg  case $cc_basename in
1009d63fdb69Smrg     ifort*) _lt_dar_can_shared=yes ;;
1010d63fdb69Smrg     *) _lt_dar_can_shared=$GCC ;;
10113da084b3Smrg  esac
1012d63fdb69Smrg  if test "$_lt_dar_can_shared" = "yes"; then
1013d63fdb69Smrg    output_verbose_link_cmd=echo
1014d63fdb69Smrg    _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}"
1015d63fdb69Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016d63fdb69Smrg    _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}"
1017d63fdb69Smrg    _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}"
1018d63fdb69Smrg    m4_if([$1], [CXX],
1019d63fdb69Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020d63fdb69Smrg      _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}"
1021d63fdb69Smrg      _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}"
1022d63fdb69Smrg    fi
1023d63fdb69Smrg],[])
1024d63fdb69Smrg  else
1025d63fdb69Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026d63fdb69Smrg  fi
1027d63fdb69Smrg])
10283da084b3Smrg
1029d63fdb69Smrg# _LT_SYS_MODULE_PATH_AIX
1030d63fdb69Smrg# -----------------------
1031d63fdb69Smrg# Links a minimal program and checks the executable
1032d63fdb69Smrg# for the system default hardcoded library path. In most cases,
1033d63fdb69Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
1034d63fdb69Smrg# the location of the communication and MPI libs are included too.
1035d63fdb69Smrg# If we don't find anything, use the default library path according
1036d63fdb69Smrg# to the aix ld manual.
1037d63fdb69Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038d63fdb69Smrg[m4_require([_LT_DECL_SED])dnl
1039d63fdb69SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040d63fdb69Smrglt_aix_libpath_sed='
1041d63fdb69Smrg    /Import File Strings/,/^$/ {
1042d63fdb69Smrg	/^0/ {
1043d63fdb69Smrg	    s/^0  *\(.*\)$/\1/
1044d63fdb69Smrg	    p
1045d63fdb69Smrg	}
1046d63fdb69Smrg    }'
1047d63fdb69Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048d63fdb69Smrg# Check for a 64-bit object if we didn't find anything.
1049d63fdb69Smrgif test -z "$aix_libpath"; then
1050d63fdb69Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051d63fdb69Smrgfi],[])
1052d63fdb69Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053d63fdb69Smrg])# _LT_SYS_MODULE_PATH_AIX
10543da084b3Smrg
10553da084b3Smrg
1056d63fdb69Smrg# _LT_SHELL_INIT(ARG)
1057d63fdb69Smrg# -------------------
1058d63fdb69Smrgm4_define([_LT_SHELL_INIT],
1059d63fdb69Smrg[ifdef([AC_DIVERSION_NOTICE],
1060d63fdb69Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061d63fdb69Smrg	 [AC_DIVERT_PUSH(NOTICE)])
1062d63fdb69Smrg$1
1063d63fdb69SmrgAC_DIVERT_POP
1064d63fdb69Smrg])# _LT_SHELL_INIT
10653da084b3Smrg
10663da084b3Smrg
1067d63fdb69Smrg# _LT_PROG_ECHO_BACKSLASH
1068d63fdb69Smrg# -----------------------
1069d63fdb69Smrg# Add some code to the start of the generated configure script which
1070d63fdb69Smrg# will find an echo command which doesn't interpret backslashes.
1071d63fdb69Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072d63fdb69Smrg[_LT_SHELL_INIT([
1073d63fdb69Smrg# Check that we are running under the correct shell.
1074d63fdb69SmrgSHELL=${CONFIG_SHELL-/bin/sh}
10753da084b3Smrg
1076d63fdb69Smrgcase X$lt_ECHO in
1077d63fdb69SmrgX*--fallback-echo)
1078d63fdb69Smrg  # Remove one level of quotation (which was required for Make).
1079d63fdb69Smrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080d63fdb69Smrg  ;;
1081d63fdb69Smrgesac
1082d63fdb69Smrg
1083d63fdb69SmrgECHO=${lt_ECHO-echo}
1084d63fdb69Smrgif test "X[$]1" = X--no-reexec; then
1085d63fdb69Smrg  # Discard the --no-reexec flag, and continue.
1086d63fdb69Smrg  shift
1087d63fdb69Smrgelif test "X[$]1" = X--fallback-echo; then
1088d63fdb69Smrg  # Avoid inline document here, it may be left over
1089d63fdb69Smrg  :
1090d63fdb69Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091d63fdb69Smrg  # Yippee, $ECHO works!
1092d63fdb69Smrg  :
10933da084b3Smrgelse
1094d63fdb69Smrg  # Restart under the correct shell.
1095d63fdb69Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
10963da084b3Smrgfi
10973da084b3Smrg
1098d63fdb69Smrgif test "X[$]1" = X--fallback-echo; then
1099d63fdb69Smrg  # used as fallback echo
1100d63fdb69Smrg  shift
1101d63fdb69Smrg  cat <<_LT_EOF
1102d63fdb69Smrg[$]*
1103d63fdb69Smrg_LT_EOF
1104d63fdb69Smrg  exit 0
11053da084b3Smrgfi
11063da084b3Smrg
1107d63fdb69Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1108d63fdb69Smrg# if CDPATH is set.
1109d63fdb69Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11103da084b3Smrg
1111d63fdb69Smrgif test -z "$lt_ECHO"; then
1112d63fdb69Smrg  if test "X${echo_test_string+set}" != Xset; then
1113d63fdb69Smrg    # find a string as large as possible, as long as the shell can cope with it
1114d63fdb69Smrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115d63fdb69Smrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116d63fdb69Smrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117d63fdb69Smrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118d63fdb69Smrg      then
1119d63fdb69Smrg        break
1120d63fdb69Smrg      fi
1121d63fdb69Smrg    done
11223da084b3Smrg  fi
11233da084b3Smrg
1124d63fdb69Smrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125d63fdb69Smrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126d63fdb69Smrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127d63fdb69Smrg    :
1128d63fdb69Smrg  else
1129d63fdb69Smrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130d63fdb69Smrg    # backslashes.  This makes it impossible to quote backslashes using
1131d63fdb69Smrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132d63fdb69Smrg    #
1133d63fdb69Smrg    # So, first we look for a working echo in the user's PATH.
11343da084b3Smrg
1135d63fdb69Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136d63fdb69Smrg    for dir in $PATH /usr/ucb; do
1137d63fdb69Smrg      IFS="$lt_save_ifs"
1138d63fdb69Smrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139d63fdb69Smrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140d63fdb69Smrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141d63fdb69Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142d63fdb69Smrg        ECHO="$dir/echo"
1143d63fdb69Smrg        break
1144d63fdb69Smrg      fi
1145d63fdb69Smrg    done
1146d63fdb69Smrg    IFS="$lt_save_ifs"
11473da084b3Smrg
1148d63fdb69Smrg    if test "X$ECHO" = Xecho; then
1149d63fdb69Smrg      # We didn't find a better echo, so look for alternatives.
1150d63fdb69Smrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151d63fdb69Smrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152d63fdb69Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153d63fdb69Smrg        # This shell has a builtin print -r that does the trick.
1154d63fdb69Smrg        ECHO='print -r'
1155d63fdb69Smrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156d63fdb69Smrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157d63fdb69Smrg        # If we have ksh, try running configure again with it.
1158d63fdb69Smrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159d63fdb69Smrg        export ORIGINAL_CONFIG_SHELL
1160d63fdb69Smrg        CONFIG_SHELL=/bin/ksh
1161d63fdb69Smrg        export CONFIG_SHELL
1162d63fdb69Smrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163d63fdb69Smrg      else
1164d63fdb69Smrg        # Try using printf.
1165d63fdb69Smrg        ECHO='printf %s\n'
1166d63fdb69Smrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167d63fdb69Smrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168d63fdb69Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169d63fdb69Smrg	  # Cool, printf works
1170d63fdb69Smrg	  :
1171d63fdb69Smrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172d63fdb69Smrg	     test "X$echo_testing_string" = 'X\t' &&
1173d63fdb69Smrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174d63fdb69Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175d63fdb69Smrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176d63fdb69Smrg	  export CONFIG_SHELL
1177d63fdb69Smrg	  SHELL="$CONFIG_SHELL"
1178d63fdb69Smrg	  export SHELL
1179d63fdb69Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180d63fdb69Smrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181d63fdb69Smrg	     test "X$echo_testing_string" = 'X\t' &&
1182d63fdb69Smrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183d63fdb69Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184d63fdb69Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185d63fdb69Smrg        else
1186d63fdb69Smrg	  # maybe with a smaller string...
1187d63fdb69Smrg	  prev=:
11883da084b3Smrg
1189d63fdb69Smrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190d63fdb69Smrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191d63fdb69Smrg	    then
1192d63fdb69Smrg	      break
1193d63fdb69Smrg	    fi
1194d63fdb69Smrg	    prev="$cmd"
1195d63fdb69Smrg	  done
11963da084b3Smrg
1197d63fdb69Smrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198d63fdb69Smrg	    echo_test_string=`eval $prev`
1199d63fdb69Smrg	    export echo_test_string
1200d63fdb69Smrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201d63fdb69Smrg	  else
1202d63fdb69Smrg	    # Oops.  We lost completely, so just stick with echo.
1203d63fdb69Smrg	    ECHO=echo
1204d63fdb69Smrg	  fi
1205d63fdb69Smrg        fi
1206d63fdb69Smrg      fi
1207d63fdb69Smrg    fi
12083da084b3Smrg  fi
12093da084b3Smrgfi
12103da084b3Smrg
1211d63fdb69Smrg# Copy echo and quote the copy suitably for passing to libtool from
1212d63fdb69Smrg# the Makefile, instead of quoting the original, which is used later.
1213d63fdb69Smrglt_ECHO=$ECHO
1214d63fdb69Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215d63fdb69Smrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216d63fdb69Smrgfi
12173da084b3Smrg
1218d63fdb69SmrgAC_SUBST(lt_ECHO)
1219d63fdb69Smrg])
1220d63fdb69Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221d63fdb69Smrg_LT_DECL([], [ECHO], [1],
1222d63fdb69Smrg    [An echo program that does not interpret backslashes])
1223d63fdb69Smrg])# _LT_PROG_ECHO_BACKSLASH
12243da084b3Smrg
12253da084b3Smrg
1226d63fdb69Smrg# _LT_ENABLE_LOCK
1227d63fdb69Smrg# ---------------
1228d63fdb69Smrgm4_defun([_LT_ENABLE_LOCK],
1229d63fdb69Smrg[AC_ARG_ENABLE([libtool-lock],
1230d63fdb69Smrg  [AS_HELP_STRING([--disable-libtool-lock],
1231d63fdb69Smrg    [avoid locking (might break parallel builds)])])
1232d63fdb69Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233d63fdb69Smrg
1234d63fdb69Smrg# Some flags need to be propagated to the compiler or linker for good
1235d63fdb69Smrg# libtool support.
1236d63fdb69Smrgcase $host in
1237d63fdb69Smrgia64-*-hpux*)
1238d63fdb69Smrg  # Find out which ABI we are using.
1239d63fdb69Smrg  echo 'int i;' > conftest.$ac_ext
1240d63fdb69Smrg  if AC_TRY_EVAL(ac_compile); then
1241d63fdb69Smrg    case `/usr/bin/file conftest.$ac_objext` in
1242d63fdb69Smrg      *ELF-32*)
1243d63fdb69Smrg	HPUX_IA64_MODE="32"
1244d63fdb69Smrg	;;
1245d63fdb69Smrg      *ELF-64*)
1246d63fdb69Smrg	HPUX_IA64_MODE="64"
1247d63fdb69Smrg	;;
12483da084b3Smrg    esac
1249d63fdb69Smrg  fi
1250d63fdb69Smrg  rm -rf conftest*
1251d63fdb69Smrg  ;;
1252d63fdb69Smrg*-*-irix6*)
1253d63fdb69Smrg  # Find out which ABI we are using.
1254d63fdb69Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255d63fdb69Smrg  if AC_TRY_EVAL(ac_compile); then
1256d63fdb69Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257d63fdb69Smrg      case `/usr/bin/file conftest.$ac_objext` in
1258d63fdb69Smrg	*32-bit*)
1259d63fdb69Smrg	  LD="${LD-ld} -melf32bsmip"
1260d63fdb69Smrg	  ;;
1261d63fdb69Smrg	*N32*)
1262d63fdb69Smrg	  LD="${LD-ld} -melf32bmipn32"
1263d63fdb69Smrg	  ;;
1264d63fdb69Smrg	*64-bit*)
1265d63fdb69Smrg	  LD="${LD-ld} -melf64bmip"
1266d63fdb69Smrg	;;
1267d63fdb69Smrg      esac
12683da084b3Smrg    else
1269d63fdb69Smrg      case `/usr/bin/file conftest.$ac_objext` in
1270d63fdb69Smrg	*32-bit*)
1271d63fdb69Smrg	  LD="${LD-ld} -32"
1272d63fdb69Smrg	  ;;
1273d63fdb69Smrg	*N32*)
1274d63fdb69Smrg	  LD="${LD-ld} -n32"
1275d63fdb69Smrg	  ;;
1276d63fdb69Smrg	*64-bit*)
1277d63fdb69Smrg	  LD="${LD-ld} -64"
1278d63fdb69Smrg	  ;;
1279d63fdb69Smrg      esac
12803da084b3Smrg    fi
12813da084b3Smrg  fi
1282d63fdb69Smrg  rm -rf conftest*
12833da084b3Smrg  ;;
12843da084b3Smrg
1285d63fdb69Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286d63fdb69Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287d63fdb69Smrg  # Find out which ABI we are using.
1288d63fdb69Smrg  echo 'int i;' > conftest.$ac_ext
1289d63fdb69Smrg  if AC_TRY_EVAL(ac_compile); then
1290d63fdb69Smrg    case `/usr/bin/file conftest.o` in
1291d63fdb69Smrg      *32-bit*)
1292d63fdb69Smrg	case $host in
1293d63fdb69Smrg	  x86_64-*kfreebsd*-gnu)
1294d63fdb69Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295d63fdb69Smrg	    ;;
1296d63fdb69Smrg	  x86_64-*linux*)
1297d63fdb69Smrg	    LD="${LD-ld} -m elf_i386"
1298d63fdb69Smrg	    ;;
1299d63fdb69Smrg	  ppc64-*linux*|powerpc64-*linux*)
1300d63fdb69Smrg	    LD="${LD-ld} -m elf32ppclinux"
1301d63fdb69Smrg	    ;;
1302d63fdb69Smrg	  s390x-*linux*)
1303d63fdb69Smrg	    LD="${LD-ld} -m elf_s390"
1304d63fdb69Smrg	    ;;
1305d63fdb69Smrg	  sparc64-*linux*)
1306d63fdb69Smrg	    LD="${LD-ld} -m elf32_sparc"
1307d63fdb69Smrg	    ;;
1308d63fdb69Smrg	esac
1309d63fdb69Smrg	;;
1310d63fdb69Smrg      *64-bit*)
1311d63fdb69Smrg	case $host in
1312d63fdb69Smrg	  x86_64-*kfreebsd*-gnu)
1313d63fdb69Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314d63fdb69Smrg	    ;;
1315d63fdb69Smrg	  x86_64-*linux*)
1316d63fdb69Smrg	    LD="${LD-ld} -m elf_x86_64"
1317d63fdb69Smrg	    ;;
1318d63fdb69Smrg	  ppc*-*linux*|powerpc*-*linux*)
1319d63fdb69Smrg	    LD="${LD-ld} -m elf64ppc"
1320d63fdb69Smrg	    ;;
1321d63fdb69Smrg	  s390*-*linux*|s390*-*tpf*)
1322d63fdb69Smrg	    LD="${LD-ld} -m elf64_s390"
1323d63fdb69Smrg	    ;;
1324d63fdb69Smrg	  sparc*-*linux*)
1325d63fdb69Smrg	    LD="${LD-ld} -m elf64_sparc"
1326d63fdb69Smrg	    ;;
1327d63fdb69Smrg	esac
1328d63fdb69Smrg	;;
1329d63fdb69Smrg    esac
1330d63fdb69Smrg  fi
1331d63fdb69Smrg  rm -rf conftest*
13323da084b3Smrg  ;;
13333da084b3Smrg
1334d63fdb69Smrg*-*-sco3.2v5*)
1335d63fdb69Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336d63fdb69Smrg  SAVE_CFLAGS="$CFLAGS"
1337d63fdb69Smrg  CFLAGS="$CFLAGS -belf"
1338d63fdb69Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339d63fdb69Smrg    [AC_LANG_PUSH(C)
1340d63fdb69Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341d63fdb69Smrg     AC_LANG_POP])
1342d63fdb69Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343d63fdb69Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344d63fdb69Smrg    CFLAGS="$SAVE_CFLAGS"
1345d63fdb69Smrg  fi
13463da084b3Smrg  ;;
1347d63fdb69Smrgsparc*-*solaris*)
1348d63fdb69Smrg  # Find out which ABI we are using.
1349d63fdb69Smrg  echo 'int i;' > conftest.$ac_ext
1350d63fdb69Smrg  if AC_TRY_EVAL(ac_compile); then
1351d63fdb69Smrg    case `/usr/bin/file conftest.o` in
1352d63fdb69Smrg    *64-bit*)
1353d63fdb69Smrg      case $lt_cv_prog_gnu_ld in
1354d63fdb69Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355d63fdb69Smrg      *)
1356d63fdb69Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357d63fdb69Smrg	  LD="${LD-ld} -64"
1358d63fdb69Smrg	fi
1359d63fdb69Smrg	;;
1360d63fdb69Smrg      esac
1361d63fdb69Smrg      ;;
1362d63fdb69Smrg    esac
1363d63fdb69Smrg  fi
1364d63fdb69Smrg  rm -rf conftest*
13653da084b3Smrg  ;;
1366d63fdb69Smrgesac
13673da084b3Smrg
1368d63fdb69Smrgneed_locks="$enable_libtool_lock"
1369d63fdb69Smrg])# _LT_ENABLE_LOCK
13703da084b3Smrg
13713da084b3Smrg
1372d63fdb69Smrg# _LT_CMD_OLD_ARCHIVE
1373d63fdb69Smrg# -------------------
1374d63fdb69Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375d63fdb69Smrg[AC_CHECK_TOOL(AR, ar, false)
1376d63fdb69Smrgtest -z "$AR" && AR=ar
1377d63fdb69Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378d63fdb69Smrg_LT_DECL([], [AR], [1], [The archiver])
1379d63fdb69Smrg_LT_DECL([], [AR_FLAGS], [1])
1380d63fdb69Smrg
1381d63fdb69SmrgAC_CHECK_TOOL(STRIP, strip, :)
1382d63fdb69Smrgtest -z "$STRIP" && STRIP=:
1383d63fdb69Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384d63fdb69Smrg
1385d63fdb69SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386d63fdb69Smrgtest -z "$RANLIB" && RANLIB=:
1387d63fdb69Smrg_LT_DECL([], [RANLIB], [1],
1388d63fdb69Smrg    [Commands used to install an old-style archive])
13893da084b3Smrg
1390d63fdb69Smrg# Determine commands to create old-style static archives.
1391d63fdb69Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392d63fdb69Smrgold_postinstall_cmds='chmod 644 $oldlib'
1393d63fdb69Smrgold_postuninstall_cmds=
1394d63fdb69Smrg
1395d63fdb69Smrgif test -n "$RANLIB"; then
1396d63fdb69Smrg  case $host_os in
1397d63fdb69Smrg  openbsd*)
1398d63fdb69Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399d63fdb69Smrg    ;;
14003da084b3Smrg  *)
1401d63fdb69Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
14023da084b3Smrg    ;;
14033da084b3Smrg  esac
1404d63fdb69Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405d63fdb69Smrgfi
1406d63fdb69Smrg_LT_DECL([], [old_postinstall_cmds], [2])
1407d63fdb69Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408d63fdb69Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409d63fdb69Smrg    [Commands used to build an old-style archive])
1410d63fdb69Smrg])# _LT_CMD_OLD_ARCHIVE
14113da084b3Smrg
14123da084b3Smrg
1413d63fdb69Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1414d63fdb69Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1415d63fdb69Smrg# ----------------------------------------------------------------
1416d63fdb69Smrg# Check whether the given compiler option works
1417d63fdb69SmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418d63fdb69Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419d63fdb69Smrgm4_require([_LT_DECL_SED])dnl
1420d63fdb69SmrgAC_CACHE_CHECK([$1], [$2],
1421d63fdb69Smrg  [$2=no
1422d63fdb69Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423d63fdb69Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1424d63fdb69Smrg   lt_compiler_flag="$3"
1425d63fdb69Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1426d63fdb69Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1427d63fdb69Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1428d63fdb69Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1429d63fdb69Smrg   # The option is referenced via a variable to avoid confusing sed.
1430d63fdb69Smrg   lt_compile=`echo "$ac_compile" | $SED \
1431d63fdb69Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432d63fdb69Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433d63fdb69Smrg   -e 's:$: $lt_compiler_flag:'`
1434d63fdb69Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435d63fdb69Smrg   (eval "$lt_compile" 2>conftest.err)
1436d63fdb69Smrg   ac_status=$?
1437d63fdb69Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1438d63fdb69Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439d63fdb69Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1440d63fdb69Smrg     # The compiler can only warn and ignore the option if not recognized
1441d63fdb69Smrg     # So say no if there are warnings other than the usual output.
1442d63fdb69Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1443d63fdb69Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444d63fdb69Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445d63fdb69Smrg       $2=yes
1446d63fdb69Smrg     fi
1447d63fdb69Smrg   fi
1448d63fdb69Smrg   $RM conftest*
1449d63fdb69Smrg])
14503da084b3Smrg
1451d63fdb69Smrgif test x"[$]$2" = xyes; then
1452d63fdb69Smrg    m4_if([$5], , :, [$5])
1453d63fdb69Smrgelse
1454d63fdb69Smrg    m4_if([$6], , :, [$6])
1455d63fdb69Smrgfi
1456d63fdb69Smrg])# _LT_COMPILER_OPTION
14573da084b3Smrg
1458d63fdb69Smrg# Old name:
1459d63fdb69SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
1461d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1462d63fdb69Smrg
1463d63fdb69Smrg
1464d63fdb69Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465d63fdb69Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466d63fdb69Smrg# ----------------------------------------------------
1467d63fdb69Smrg# Check whether the given linker option works
1468d63fdb69SmrgAC_DEFUN([_LT_LINKER_OPTION],
1469d63fdb69Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470d63fdb69Smrgm4_require([_LT_DECL_SED])dnl
1471d63fdb69SmrgAC_CACHE_CHECK([$1], [$2],
1472d63fdb69Smrg  [$2=no
1473d63fdb69Smrg   save_LDFLAGS="$LDFLAGS"
1474d63fdb69Smrg   LDFLAGS="$LDFLAGS $3"
1475d63fdb69Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1476d63fdb69Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1477d63fdb69Smrg     # The linker can only warn and ignore the option if not recognized
1478d63fdb69Smrg     # So say no if there are warnings
1479d63fdb69Smrg     if test -s conftest.err; then
1480d63fdb69Smrg       # Append any errors to the config.log.
1481d63fdb69Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482d63fdb69Smrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1483d63fdb69Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484d63fdb69Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
1485d63fdb69Smrg         $2=yes
1486d63fdb69Smrg       fi
1487d63fdb69Smrg     else
1488d63fdb69Smrg       $2=yes
1489d63fdb69Smrg     fi
1490d63fdb69Smrg   fi
1491d63fdb69Smrg   $RM -r conftest*
1492d63fdb69Smrg   LDFLAGS="$save_LDFLAGS"
1493d63fdb69Smrg])
1494d63fdb69Smrg
1495d63fdb69Smrgif test x"[$]$2" = xyes; then
1496d63fdb69Smrg    m4_if([$4], , :, [$4])
1497d63fdb69Smrgelse
1498d63fdb69Smrg    m4_if([$5], , :, [$5])
1499d63fdb69Smrgfi
1500d63fdb69Smrg])# _LT_LINKER_OPTION
1501d63fdb69Smrg
1502d63fdb69Smrg# Old name:
1503d63fdb69SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
1505d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1506d63fdb69Smrg
1507d63fdb69Smrg
1508d63fdb69Smrg# LT_CMD_MAX_LEN
1509d63fdb69Smrg#---------------
1510d63fdb69SmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511d63fdb69Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512d63fdb69Smrg# find the maximum length of command line arguments
1513d63fdb69SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1514d63fdb69SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1515d63fdb69Smrg  i=0
1516d63fdb69Smrg  teststring="ABCD"
1517d63fdb69Smrg
1518d63fdb69Smrg  case $build_os in
1519d63fdb69Smrg  msdosdjgpp*)
1520d63fdb69Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1521d63fdb69Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1522d63fdb69Smrg    # during glob expansion).  Even if it were fixed, the result of this
1523d63fdb69Smrg    # check would be larger than it should be.
1524d63fdb69Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
15253da084b3Smrg    ;;
1526d63fdb69Smrg
1527d63fdb69Smrg  gnu*)
1528d63fdb69Smrg    # Under GNU Hurd, this test is not required because there is
1529d63fdb69Smrg    # no limit to the length of command line arguments.
1530d63fdb69Smrg    # Libtool will interpret -1 as no limit whatsoever
1531d63fdb69Smrg    lt_cv_sys_max_cmd_len=-1;
15323da084b3Smrg    ;;
1533d63fdb69Smrg
1534d63fdb69Smrg  cygwin* | mingw* | cegcc*)
1535d63fdb69Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1536d63fdb69Smrg    # about 5 minutes as the teststring grows exponentially.
1537d63fdb69Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1538d63fdb69Smrg    # you end up with a "frozen" computer, even though with patience
1539d63fdb69Smrg    # the test eventually succeeds (with a max line length of 256k).
1540d63fdb69Smrg    # Instead, let's just punt: use the minimum linelength reported by
1541d63fdb69Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1542d63fdb69Smrg    lt_cv_sys_max_cmd_len=8192;
15433da084b3Smrg    ;;
15443da084b3Smrg
1545d63fdb69Smrg  amigaos*)
1546d63fdb69Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
1547d63fdb69Smrg    # So we just punt and use a minimum line length of 8192.
1548d63fdb69Smrg    lt_cv_sys_max_cmd_len=8192;
1549d63fdb69Smrg    ;;
15503da084b3Smrg
1551d63fdb69Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1552d63fdb69Smrg    # This has been around since 386BSD, at least.  Likely further.
1553d63fdb69Smrg    if test -x /sbin/sysctl; then
1554d63fdb69Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1555d63fdb69Smrg    elif test -x /usr/sbin/sysctl; then
1556d63fdb69Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
15573da084b3Smrg    else
1558d63fdb69Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
15593da084b3Smrg    fi
1560d63fdb69Smrg    # And add a safety zone
1561d63fdb69Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1562d63fdb69Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15633da084b3Smrg    ;;
15643da084b3Smrg
1565d63fdb69Smrg  interix*)
1566d63fdb69Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1567d63fdb69Smrg    lt_cv_sys_max_cmd_len=196608
1568d63fdb69Smrg    ;;
15693da084b3Smrg
1570d63fdb69Smrg  osf*)
1571d63fdb69Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1572d63fdb69Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1573d63fdb69Smrg    # nice to cause kernel panics so lets avoid the loop below.
1574d63fdb69Smrg    # First set a reasonable default.
1575d63fdb69Smrg    lt_cv_sys_max_cmd_len=16384
1576d63fdb69Smrg    #
1577d63fdb69Smrg    if test -x /sbin/sysconfig; then
1578d63fdb69Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1579d63fdb69Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1580d63fdb69Smrg      esac
1581d63fdb69Smrg    fi
1582d63fdb69Smrg    ;;
1583d63fdb69Smrg  sco3.2v5*)
1584d63fdb69Smrg    lt_cv_sys_max_cmd_len=102400
1585d63fdb69Smrg    ;;
1586d63fdb69Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
1587d63fdb69Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1588d63fdb69Smrg    if test -n "$kargmax"; then
1589d63fdb69Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1590d63fdb69Smrg    else
1591d63fdb69Smrg      lt_cv_sys_max_cmd_len=32768
1592d63fdb69Smrg    fi
15933da084b3Smrg    ;;
15943da084b3Smrg  *)
1595d63fdb69Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596d63fdb69Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597d63fdb69Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598d63fdb69Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599d63fdb69Smrg    else
1600d63fdb69Smrg      # Make teststring a little bigger before we do anything with it.
1601d63fdb69Smrg      # a 1K string should be a reasonable start.
1602d63fdb69Smrg      for i in 1 2 3 4 5 6 7 8 ; do
1603d63fdb69Smrg        teststring=$teststring$teststring
1604d63fdb69Smrg      done
1605d63fdb69Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606d63fdb69Smrg      # If test is not a shell built-in, we'll probably end up computing a
1607d63fdb69Smrg      # maximum length that is only half of the actual maximum length, but
1608d63fdb69Smrg      # we can't tell.
1609d63fdb69Smrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610d63fdb69Smrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611d63fdb69Smrg	      test $i != 17 # 1/2 MB should be enough
1612d63fdb69Smrg      do
1613d63fdb69Smrg        i=`expr $i + 1`
1614d63fdb69Smrg        teststring=$teststring$teststring
1615d63fdb69Smrg      done
1616d63fdb69Smrg      # Only check the string length outside the loop.
1617d63fdb69Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618d63fdb69Smrg      teststring=
1619d63fdb69Smrg      # Add a significant safety factor because C++ compilers can tack on
1620d63fdb69Smrg      # massive amounts of additional arguments before passing them to the
1621d63fdb69Smrg      # linker.  It appears as though 1/2 is a usable value.
1622d63fdb69Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623d63fdb69Smrg    fi
16243da084b3Smrg    ;;
16253da084b3Smrg  esac
1626d63fdb69Smrg])
1627d63fdb69Smrgif test -n $lt_cv_sys_max_cmd_len ; then
1628d63fdb69Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1629d63fdb69Smrgelse
1630d63fdb69Smrg  AC_MSG_RESULT(none)
1631d63fdb69Smrgfi
1632d63fdb69Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633d63fdb69Smrg_LT_DECL([], [max_cmd_len], [0],
1634d63fdb69Smrg    [What is the maximum length of a command?])
1635d63fdb69Smrg])# LT_CMD_MAX_LEN
16363da084b3Smrg
1637d63fdb69Smrg# Old name:
1638d63fdb69SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
1640d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
16413da084b3Smrg
16423da084b3Smrg
1643d63fdb69Smrg# _LT_HEADER_DLFCN
1644d63fdb69Smrg# ----------------
1645d63fdb69Smrgm4_defun([_LT_HEADER_DLFCN],
1646d63fdb69Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647d63fdb69Smrg])# _LT_HEADER_DLFCN
16483da084b3Smrg
16493da084b3Smrg
1650d63fdb69Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651d63fdb69Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652d63fdb69Smrg# ----------------------------------------------------------------
1653d63fdb69Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654d63fdb69Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1655d63fdb69Smrgif test "$cross_compiling" = yes; then :
1656d63fdb69Smrg  [$4]
1657d63fdb69Smrgelse
1658d63fdb69Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659d63fdb69Smrg  lt_status=$lt_dlunknown
1660d63fdb69Smrg  cat > conftest.$ac_ext <<_LT_EOF
1661d63fdb69Smrg[#line __oline__ "configure"
1662d63fdb69Smrg#include "confdefs.h"
16633da084b3Smrg
1664d63fdb69Smrg#if HAVE_DLFCN_H
1665d63fdb69Smrg#include <dlfcn.h>
1666d63fdb69Smrg#endif
16673da084b3Smrg
1668d63fdb69Smrg#include <stdio.h>
16693da084b3Smrg
1670d63fdb69Smrg#ifdef RTLD_GLOBAL
1671d63fdb69Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1672d63fdb69Smrg#else
1673d63fdb69Smrg#  ifdef DL_GLOBAL
1674d63fdb69Smrg#    define LT_DLGLOBAL		DL_GLOBAL
1675d63fdb69Smrg#  else
1676d63fdb69Smrg#    define LT_DLGLOBAL		0
1677d63fdb69Smrg#  endif
1678d63fdb69Smrg#endif
16793da084b3Smrg
1680d63fdb69Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1681d63fdb69Smrg   find out it does not work in some platform. */
1682d63fdb69Smrg#ifndef LT_DLLAZY_OR_NOW
1683d63fdb69Smrg#  ifdef RTLD_LAZY
1684d63fdb69Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1685d63fdb69Smrg#  else
1686d63fdb69Smrg#    ifdef DL_LAZY
1687d63fdb69Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1688d63fdb69Smrg#    else
1689d63fdb69Smrg#      ifdef RTLD_NOW
1690d63fdb69Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1691d63fdb69Smrg#      else
1692d63fdb69Smrg#        ifdef DL_NOW
1693d63fdb69Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1694d63fdb69Smrg#        else
1695d63fdb69Smrg#          define LT_DLLAZY_OR_NOW	0
1696d63fdb69Smrg#        endif
1697d63fdb69Smrg#      endif
1698d63fdb69Smrg#    endif
1699d63fdb69Smrg#  endif
1700d63fdb69Smrg#endif
17013da084b3Smrg
1702d63fdb69Smrgvoid fnord() { int i=42;}
1703d63fdb69Smrgint main ()
1704d63fdb69Smrg{
1705d63fdb69Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1706d63fdb69Smrg  int status = $lt_dlunknown;
17073da084b3Smrg
1708d63fdb69Smrg  if (self)
1709d63fdb69Smrg    {
1710d63fdb69Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711d63fdb69Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1712d63fdb69Smrg      /* dlclose (self); */
1713d63fdb69Smrg    }
1714d63fdb69Smrg  else
1715d63fdb69Smrg    puts (dlerror ());
17163da084b3Smrg
1717d63fdb69Smrg  return status;
1718d63fdb69Smrg}]
1719d63fdb69Smrg_LT_EOF
1720d63fdb69Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1721d63fdb69Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1722d63fdb69Smrg    lt_status=$?
1723d63fdb69Smrg    case x$lt_status in
1724d63fdb69Smrg      x$lt_dlno_uscore) $1 ;;
1725d63fdb69Smrg      x$lt_dlneed_uscore) $2 ;;
1726d63fdb69Smrg      x$lt_dlunknown|x*) $3 ;;
17273da084b3Smrg    esac
1728d63fdb69Smrg  else :
1729d63fdb69Smrg    # compilation failed
1730d63fdb69Smrg    $3
17313da084b3Smrg  fi
17323da084b3Smrgfi
1733d63fdb69Smrgrm -fr conftest*
1734d63fdb69Smrg])# _LT_TRY_DLOPEN_SELF
17353da084b3Smrg
17363da084b3Smrg
1737d63fdb69Smrg# LT_SYS_DLOPEN_SELF
1738d63fdb69Smrg# ------------------
1739d63fdb69SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740d63fdb69Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1741d63fdb69Smrgif test "x$enable_dlopen" != xyes; then
1742d63fdb69Smrg  enable_dlopen=unknown
1743d63fdb69Smrg  enable_dlopen_self=unknown
1744d63fdb69Smrg  enable_dlopen_self_static=unknown
1745d63fdb69Smrgelse
1746d63fdb69Smrg  lt_cv_dlopen=no
1747d63fdb69Smrg  lt_cv_dlopen_libs=
17483da084b3Smrg
1749d63fdb69Smrg  case $host_os in
1750d63fdb69Smrg  beos*)
1751d63fdb69Smrg    lt_cv_dlopen="load_add_on"
1752d63fdb69Smrg    lt_cv_dlopen_libs=
1753d63fdb69Smrg    lt_cv_dlopen_self=yes
1754d63fdb69Smrg    ;;
17553da084b3Smrg
1756d63fdb69Smrg  mingw* | pw32* | cegcc*)
1757d63fdb69Smrg    lt_cv_dlopen="LoadLibrary"
1758d63fdb69Smrg    lt_cv_dlopen_libs=
1759d63fdb69Smrg    ;;
17603da084b3Smrg
1761d63fdb69Smrg  cygwin*)
1762d63fdb69Smrg    lt_cv_dlopen="dlopen"
1763d63fdb69Smrg    lt_cv_dlopen_libs=
1764d63fdb69Smrg    ;;
17653da084b3Smrg
1766d63fdb69Smrg  darwin*)
1767d63fdb69Smrg  # if libdl is installed we need to link against it
1768d63fdb69Smrg    AC_CHECK_LIB([dl], [dlopen],
1769d63fdb69Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1770d63fdb69Smrg    lt_cv_dlopen="dyld"
1771d63fdb69Smrg    lt_cv_dlopen_libs=
1772d63fdb69Smrg    lt_cv_dlopen_self=yes
1773d63fdb69Smrg    ])
1774d63fdb69Smrg    ;;
17753da084b3Smrg
1776d63fdb69Smrg  *)
1777d63fdb69Smrg    AC_CHECK_FUNC([shl_load],
1778d63fdb69Smrg	  [lt_cv_dlopen="shl_load"],
1779d63fdb69Smrg      [AC_CHECK_LIB([dld], [shl_load],
1780d63fdb69Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1781d63fdb69Smrg	[AC_CHECK_FUNC([dlopen],
1782d63fdb69Smrg	      [lt_cv_dlopen="dlopen"],
1783d63fdb69Smrg	  [AC_CHECK_LIB([dl], [dlopen],
1784d63fdb69Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1785d63fdb69Smrg	    [AC_CHECK_LIB([svld], [dlopen],
1786d63fdb69Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1787d63fdb69Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1788d63fdb69Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1789d63fdb69Smrg	      ])
1790d63fdb69Smrg	    ])
1791d63fdb69Smrg	  ])
1792d63fdb69Smrg	])
1793d63fdb69Smrg      ])
1794d63fdb69Smrg    ;;
1795d63fdb69Smrg  esac
17963da084b3Smrg
1797d63fdb69Smrg  if test "x$lt_cv_dlopen" != xno; then
1798d63fdb69Smrg    enable_dlopen=yes
1799d63fdb69Smrg  else
1800d63fdb69Smrg    enable_dlopen=no
1801d63fdb69Smrg  fi
18023da084b3Smrg
1803d63fdb69Smrg  case $lt_cv_dlopen in
1804d63fdb69Smrg  dlopen)
1805d63fdb69Smrg    save_CPPFLAGS="$CPPFLAGS"
1806d63fdb69Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
18073da084b3Smrg
1808d63fdb69Smrg    save_LDFLAGS="$LDFLAGS"
1809d63fdb69Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
18103da084b3Smrg
1811d63fdb69Smrg    save_LIBS="$LIBS"
1812d63fdb69Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
18133da084b3Smrg
1814d63fdb69Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1815d63fdb69Smrg	  lt_cv_dlopen_self, [dnl
1816d63fdb69Smrg	  _LT_TRY_DLOPEN_SELF(
1817d63fdb69Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1818d63fdb69Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1819d63fdb69Smrg    ])
18203da084b3Smrg
1821d63fdb69Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
1822d63fdb69Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1823d63fdb69Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824d63fdb69Smrg	  lt_cv_dlopen_self_static, [dnl
1825d63fdb69Smrg	  _LT_TRY_DLOPEN_SELF(
1826d63fdb69Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1827d63fdb69Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1828d63fdb69Smrg      ])
18293da084b3Smrg    fi
18303da084b3Smrg
1831d63fdb69Smrg    CPPFLAGS="$save_CPPFLAGS"
1832d63fdb69Smrg    LDFLAGS="$save_LDFLAGS"
1833d63fdb69Smrg    LIBS="$save_LIBS"
1834d63fdb69Smrg    ;;
1835d63fdb69Smrg  esac
18363da084b3Smrg
1837d63fdb69Smrg  case $lt_cv_dlopen_self in
1838d63fdb69Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1839d63fdb69Smrg  *) enable_dlopen_self=unknown ;;
1840d63fdb69Smrg  esac
18413da084b3Smrg
1842d63fdb69Smrg  case $lt_cv_dlopen_self_static in
1843d63fdb69Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1844d63fdb69Smrg  *) enable_dlopen_self_static=unknown ;;
1845d63fdb69Smrg  esac
1846d63fdb69Smrgfi
1847d63fdb69Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848d63fdb69Smrg	 [Whether dlopen is supported])
1849d63fdb69Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850d63fdb69Smrg	 [Whether dlopen of programs is supported])
1851d63fdb69Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852d63fdb69Smrg	 [Whether dlopen of statically linked programs is supported])
1853d63fdb69Smrg])# LT_SYS_DLOPEN_SELF
18543da084b3Smrg
1855d63fdb69Smrg# Old name:
1856d63fdb69SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
1858d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
18593da084b3Smrg
18603da084b3Smrg
1861d63fdb69Smrg# _LT_COMPILER_C_O([TAGNAME])
18623da084b3Smrg# ---------------------------
1863d63fdb69Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864d63fdb69Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865d63fdb69Smrgm4_defun([_LT_COMPILER_C_O],
1866d63fdb69Smrg[m4_require([_LT_DECL_SED])dnl
1867d63fdb69Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868d63fdb69Smrgm4_require([_LT_TAG_COMPILER])dnl
1869d63fdb69SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870d63fdb69Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871d63fdb69Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872d63fdb69Smrg   $RM -r conftest 2>/dev/null
1873d63fdb69Smrg   mkdir conftest
1874d63fdb69Smrg   cd conftest
1875d63fdb69Smrg   mkdir out
1876d63fdb69Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18773da084b3Smrg
1878d63fdb69Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1879d63fdb69Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1880d63fdb69Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1881d63fdb69Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1882d63fdb69Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1883d63fdb69Smrg   lt_compile=`echo "$ac_compile" | $SED \
1884d63fdb69Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885d63fdb69Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886d63fdb69Smrg   -e 's:$: $lt_compiler_flag:'`
1887d63fdb69Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888d63fdb69Smrg   (eval "$lt_compile" 2>out/conftest.err)
1889d63fdb69Smrg   ac_status=$?
1890d63fdb69Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891d63fdb69Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892d63fdb69Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893d63fdb69Smrg   then
1894d63fdb69Smrg     # The compiler can only warn and ignore the option if not recognized
1895d63fdb69Smrg     # So say no if there are warnings
1896d63fdb69Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1897d63fdb69Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898d63fdb69Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899d63fdb69Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1900d63fdb69Smrg     fi
1901d63fdb69Smrg   fi
1902d63fdb69Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903d63fdb69Smrg   $RM conftest*
1904d63fdb69Smrg   # SGI C++ compiler will create directory out/ii_files/ for
1905d63fdb69Smrg   # template instantiation
1906d63fdb69Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907d63fdb69Smrg   $RM out/* && rmdir out
1908d63fdb69Smrg   cd ..
1909d63fdb69Smrg   $RM -r conftest
1910d63fdb69Smrg   $RM conftest*
1911d63fdb69Smrg])
1912d63fdb69Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913d63fdb69Smrg	[Does compiler simultaneously support -c and -o options?])
1914d63fdb69Smrg])# _LT_COMPILER_C_O
19153da084b3Smrg
19163da084b3Smrg
1917d63fdb69Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918d63fdb69Smrg# ----------------------------------
1919d63fdb69Smrg# Check to see if we can do hard links to lock some files if needed
1920d63fdb69Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921d63fdb69Smrg[m4_require([_LT_ENABLE_LOCK])dnl
1922d63fdb69Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923d63fdb69Smrg_LT_COMPILER_C_O([$1])
19243da084b3Smrg
1925d63fdb69Smrghard_links="nottested"
1926d63fdb69Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1927d63fdb69Smrg  # do not overwrite the value of need_locks provided by the user
1928d63fdb69Smrg  AC_MSG_CHECKING([if we can lock with hard links])
1929d63fdb69Smrg  hard_links=yes
1930d63fdb69Smrg  $RM conftest*
1931d63fdb69Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1932d63fdb69Smrg  touch conftest.a
1933d63fdb69Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1934d63fdb69Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935d63fdb69Smrg  AC_MSG_RESULT([$hard_links])
1936d63fdb69Smrg  if test "$hard_links" = no; then
1937d63fdb69Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1938d63fdb69Smrg    need_locks=warn
1939d63fdb69Smrg  fi
1940d63fdb69Smrgelse
1941d63fdb69Smrg  need_locks=no
1942d63fdb69Smrgfi
1943d63fdb69Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944d63fdb69Smrg])# _LT_COMPILER_FILE_LOCKS
19453da084b3Smrg
19463da084b3Smrg
1947d63fdb69Smrg# _LT_CHECK_OBJDIR
1948d63fdb69Smrg# ----------------
1949d63fdb69Smrgm4_defun([_LT_CHECK_OBJDIR],
1950d63fdb69Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1951d63fdb69Smrg[rm -f .libs 2>/dev/null
1952d63fdb69Smrgmkdir .libs 2>/dev/null
1953d63fdb69Smrgif test -d .libs; then
1954d63fdb69Smrg  lt_cv_objdir=.libs
19553da084b3Smrgelse
1956d63fdb69Smrg  # MS-DOS does not allow filenames that begin with a dot.
1957d63fdb69Smrg  lt_cv_objdir=_libs
19583da084b3Smrgfi
1959d63fdb69Smrgrmdir .libs 2>/dev/null])
1960d63fdb69Smrgobjdir=$lt_cv_objdir
1961d63fdb69Smrg_LT_DECL([], [objdir], [0],
1962d63fdb69Smrg         [The name of the directory that contains temporary libtool files])dnl
1963d63fdb69Smrgm4_pattern_allow([LT_OBJDIR])dnl
1964d63fdb69SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965d63fdb69Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966d63fdb69Smrg])# _LT_CHECK_OBJDIR
19673da084b3Smrg
19683da084b3Smrg
1969d63fdb69Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970d63fdb69Smrg# --------------------------------------
1971d63fdb69Smrg# Check hardcoding attributes.
1972d63fdb69Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1973d63fdb69Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974d63fdb69Smrg_LT_TAGVAR(hardcode_action, $1)=
1975d63fdb69Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976d63fdb69Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977d63fdb69Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978d63fdb69Smrg
1979d63fdb69Smrg  # We can hardcode non-existent directories.
1980d63fdb69Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1981d63fdb69Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1982d63fdb69Smrg     # have to relink, otherwise we might link with an installed library
1983d63fdb69Smrg     # when we should be linking with a yet-to-be-installed one
1984d63fdb69Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985d63fdb69Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1986d63fdb69Smrg    # Linking always hardcodes the temporary library directory.
1987d63fdb69Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
19883da084b3Smrg  else
1989d63fdb69Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990d63fdb69Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
19913da084b3Smrg  fi
1992d63fdb69Smrgelse
1993d63fdb69Smrg  # We cannot hardcode anything, or else we can only hardcode existing
1994d63fdb69Smrg  # directories.
1995d63fdb69Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
19963da084b3Smrgfi
1997d63fdb69SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
19983da084b3Smrg
1999d63fdb69Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000d63fdb69Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2001d63fdb69Smrg  # Fast installation is not supported
2002d63fdb69Smrg  enable_fast_install=no
2003d63fdb69Smrgelif test "$shlibpath_overrides_runpath" = yes ||
2004d63fdb69Smrg     test "$enable_shared" = no; then
2005d63fdb69Smrg  # Fast installation is not necessary
2006d63fdb69Smrg  enable_fast_install=needless
2007d63fdb69Smrgfi
2008d63fdb69Smrg_LT_TAGDECL([], [hardcode_action], [0],
2009d63fdb69Smrg    [How to hardcode a shared library path into an executable])
2010d63fdb69Smrg])# _LT_LINKER_HARDCODE_LIBPATH
20113da084b3Smrg
2012d63fdb69Smrg
2013d63fdb69Smrg# _LT_CMD_STRIPLIB
2014d63fdb69Smrg# ----------------
2015d63fdb69Smrgm4_defun([_LT_CMD_STRIPLIB],
2016d63fdb69Smrg[m4_require([_LT_DECL_EGREP])
2017d63fdb69Smrgstriplib=
2018d63fdb69Smrgold_striplib=
2019d63fdb69SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020d63fdb69Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2021d63fdb69Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2022d63fdb69Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2023d63fdb69Smrg  AC_MSG_RESULT([yes])
2024d63fdb69Smrgelse
2025d63fdb69Smrg# FIXME - insert some real tests, host_os isn't really good enough
2026d63fdb69Smrg  case $host_os in
2027d63fdb69Smrg  darwin*)
2028d63fdb69Smrg    if test -n "$STRIP" ; then
2029d63fdb69Smrg      striplib="$STRIP -x"
2030d63fdb69Smrg      old_striplib="$STRIP -S"
2031d63fdb69Smrg      AC_MSG_RESULT([yes])
2032d63fdb69Smrg    else
2033d63fdb69Smrg      AC_MSG_RESULT([no])
2034d63fdb69Smrg    fi
20353da084b3Smrg    ;;
20363da084b3Smrg  *)
2037d63fdb69Smrg    AC_MSG_RESULT([no])
20383da084b3Smrg    ;;
20393da084b3Smrg  esac
20403da084b3Smrgfi
2041d63fdb69Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042d63fdb69Smrg_LT_DECL([], [striplib], [1])
2043d63fdb69Smrg])# _LT_CMD_STRIPLIB
20443da084b3Smrg
20453da084b3Smrg
2046d63fdb69Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2047d63fdb69Smrg# -----------------------------
2048d63fdb69Smrg# PORTME Fill in your ld.so characteristics
2049d63fdb69Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050d63fdb69Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051d63fdb69Smrgm4_require([_LT_DECL_EGREP])dnl
2052d63fdb69Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053d63fdb69Smrgm4_require([_LT_DECL_OBJDUMP])dnl
2054d63fdb69Smrgm4_require([_LT_DECL_SED])dnl
2055d63fdb69SmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056d63fdb69Smrgm4_if([$1],
2057d63fdb69Smrg	[], [
2058d63fdb69Smrgif test "$GCC" = yes; then
2059d63fdb69Smrg  case $host_os in
2060d63fdb69Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061d63fdb69Smrg    *) lt_awk_arg="/^libraries:/" ;;
2062d63fdb69Smrg  esac
2063d63fdb69Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064d63fdb69Smrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065d63fdb69Smrg    # if the path contains ";" then we assume it to be the separator
2066d63fdb69Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
2067d63fdb69Smrg    # assumed that no part of a normal pathname contains ";" but that should
2068d63fdb69Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069d63fdb69Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070d63fdb69Smrg  else
2071d63fdb69Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072d63fdb69Smrg  fi
2073d63fdb69Smrg  # Ok, now we have the path, separated by spaces, we can step through it
2074d63fdb69Smrg  # and add multilib dir if necessary.
2075d63fdb69Smrg  lt_tmp_lt_search_path_spec=
2076d63fdb69Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077d63fdb69Smrg  for lt_sys_path in $lt_search_path_spec; do
2078d63fdb69Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079d63fdb69Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
20803da084b3Smrg    else
2081d63fdb69Smrg      test -d "$lt_sys_path" && \
2082d63fdb69Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
20833da084b3Smrg    fi
2084d63fdb69Smrg  done
2085d63fdb69Smrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086d63fdb69SmrgBEGIN {RS=" "; FS="/|\n";} {
2087d63fdb69Smrg  lt_foo="";
2088d63fdb69Smrg  lt_count=0;
2089d63fdb69Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090d63fdb69Smrg    if ($lt_i != "" && $lt_i != ".") {
2091d63fdb69Smrg      if ($lt_i == "..") {
2092d63fdb69Smrg        lt_count++;
2093d63fdb69Smrg      } else {
2094d63fdb69Smrg        if (lt_count == 0) {
2095d63fdb69Smrg          lt_foo="/" $lt_i lt_foo;
2096d63fdb69Smrg        } else {
2097d63fdb69Smrg          lt_count--;
2098d63fdb69Smrg        }
2099d63fdb69Smrg      }
2100d63fdb69Smrg    }
2101d63fdb69Smrg  }
2102d63fdb69Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103d63fdb69Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104d63fdb69Smrg}'`
2105d63fdb69Smrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106d63fdb69Smrgelse
2107d63fdb69Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108d63fdb69Smrgfi])
2109d63fdb69Smrglibrary_names_spec=
2110d63fdb69Smrglibname_spec='lib$name'
2111d63fdb69Smrgsoname_spec=
2112d63fdb69Smrgshrext_cmds=".so"
2113d63fdb69Smrgpostinstall_cmds=
2114d63fdb69Smrgpostuninstall_cmds=
2115d63fdb69Smrgfinish_cmds=
2116d63fdb69Smrgfinish_eval=
2117d63fdb69Smrgshlibpath_var=
2118d63fdb69Smrgshlibpath_overrides_runpath=unknown
2119d63fdb69Smrgversion_type=none
2120d63fdb69Smrgdynamic_linker="$host_os ld.so"
2121d63fdb69Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2122d63fdb69Smrgneed_lib_prefix=unknown
2123d63fdb69Smrghardcode_into_libs=no
21243da084b3Smrg
2125d63fdb69Smrg# when you set need_version to no, make sure it does not cause -set_version
2126d63fdb69Smrg# flags to be left without arguments
2127d63fdb69Smrgneed_version=unknown
21283da084b3Smrg
21293da084b3Smrgcase $host_os in
2130d63fdb69Smrgaix3*)
2131d63fdb69Smrg  version_type=linux
2132d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2133d63fdb69Smrg  shlibpath_var=LIBPATH
21343da084b3Smrg
2135d63fdb69Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
2136d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
21373da084b3Smrg  ;;
21383da084b3Smrg
2139d63fdb69Smrgaix[[4-9]]*)
2140d63fdb69Smrg  version_type=linux
2141d63fdb69Smrg  need_lib_prefix=no
2142d63fdb69Smrg  need_version=no
2143d63fdb69Smrg  hardcode_into_libs=yes
2144d63fdb69Smrg  if test "$host_cpu" = ia64; then
2145d63fdb69Smrg    # AIX 5 supports IA64
2146d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2147d63fdb69Smrg    shlibpath_var=LD_LIBRARY_PATH
2148d63fdb69Smrg  else
2149d63fdb69Smrg    # With GCC up to 2.95.x, collect2 would create an import file
2150d63fdb69Smrg    # for dependence libraries.  The import file would start with
2151d63fdb69Smrg    # the line `#! .'.  This would cause the generated library to
2152d63fdb69Smrg    # depend on `.', always an invalid library.  This was fixed in
2153d63fdb69Smrg    # development snapshots of GCC prior to 3.0.
2154d63fdb69Smrg    case $host_os in
2155d63fdb69Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2156d63fdb69Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2157d63fdb69Smrg	   echo ' yes '
2158d63fdb69Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2159d63fdb69Smrg	:
2160d63fdb69Smrg      else
2161d63fdb69Smrg	can_build_shared=no
2162d63fdb69Smrg      fi
2163d63fdb69Smrg      ;;
2164d63fdb69Smrg    esac
2165d63fdb69Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2166d63fdb69Smrg    # soname into executable. Probably we can add versioning support to
2167d63fdb69Smrg    # collect2, so additional links can be useful in future.
2168d63fdb69Smrg    if test "$aix_use_runtimelinking" = yes; then
2169d63fdb69Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2170d63fdb69Smrg      # instead of lib<name>.a to let people know that these are not
2171d63fdb69Smrg      # typical AIX shared libraries.
2172d63fdb69Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173d63fdb69Smrg    else
2174d63fdb69Smrg      # We preserve .a as extension for shared libraries through AIX4.2
2175d63fdb69Smrg      # and later when we are not doing run time linking.
2176d63fdb69Smrg      library_names_spec='${libname}${release}.a $libname.a'
2177d63fdb69Smrg      soname_spec='${libname}${release}${shared_ext}$major'
2178d63fdb69Smrg    fi
2179d63fdb69Smrg    shlibpath_var=LIBPATH
2180d63fdb69Smrg  fi
21813da084b3Smrg  ;;
21823da084b3Smrg
2183d63fdb69Smrgamigaos*)
2184d63fdb69Smrg  case $host_cpu in
2185d63fdb69Smrg  powerpc)
2186d63fdb69Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187d63fdb69Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189d63fdb69Smrg    ;;
2190d63fdb69Smrg  m68k)
2191d63fdb69Smrg    library_names_spec='$libname.ixlibrary $libname.a'
2192d63fdb69Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193d63fdb69Smrg    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'
2194d63fdb69Smrg    ;;
2195d63fdb69Smrg  esac
21963da084b3Smrg  ;;
21973da084b3Smrg
2198d63fdb69Smrgbeos*)
2199d63fdb69Smrg  library_names_spec='${libname}${shared_ext}'
2200d63fdb69Smrg  dynamic_linker="$host_os ld.so"
2201d63fdb69Smrg  shlibpath_var=LIBRARY_PATH
22023da084b3Smrg  ;;
22033da084b3Smrg
2204d63fdb69Smrgbsdi[[45]]*)
2205d63fdb69Smrg  version_type=linux
2206d63fdb69Smrg  need_version=no
2207d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2208d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2209d63fdb69Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2210d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2211d63fdb69Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2212d63fdb69Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2213d63fdb69Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
2214d63fdb69Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2215d63fdb69Smrg  # libtool to hard-code these into programs
22163da084b3Smrg  ;;
22173da084b3Smrg
2218d63fdb69Smrgcygwin* | mingw* | pw32* | cegcc*)
2219d63fdb69Smrg  version_type=windows
2220d63fdb69Smrg  shrext_cmds=".dll"
2221d63fdb69Smrg  need_version=no
2222d63fdb69Smrg  need_lib_prefix=no
22233da084b3Smrg
2224d63fdb69Smrg  case $GCC,$host_os in
2225d63fdb69Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2226d63fdb69Smrg    library_names_spec='$libname.dll.a'
2227d63fdb69Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228d63fdb69Smrg    postinstall_cmds='base_file=`basename \${file}`~
2229d63fdb69Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2230d63fdb69Smrg      dldir=$destdir/`dirname \$dlpath`~
2231d63fdb69Smrg      test -d \$dldir || mkdir -p \$dldir~
2232d63fdb69Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233d63fdb69Smrg      chmod a+x \$dldir/$dlname~
2234d63fdb69Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235d63fdb69Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236d63fdb69Smrg      fi'
2237d63fdb69Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2238d63fdb69Smrg      dlpath=$dir/\$dldll~
2239d63fdb69Smrg       $RM \$dlpath'
2240d63fdb69Smrg    shlibpath_overrides_runpath=yes
22413da084b3Smrg
2242d63fdb69Smrg    case $host_os in
2243d63fdb69Smrg    cygwin*)
2244d63fdb69Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245d63fdb69Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246d63fdb69Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2247d63fdb69Smrg      ;;
2248d63fdb69Smrg    mingw* | cegcc*)
2249d63fdb69Smrg      # MinGW DLLs use traditional 'lib' prefix
2250d63fdb69Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251d63fdb69Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252d63fdb69Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253d63fdb69Smrg        # It is most probably a Windows format PATH printed by
2254d63fdb69Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255d63fdb69Smrg        # path with ; separators, and with drive letters. We can handle the
2256d63fdb69Smrg        # drive letters (cygwin fileutils understands them), so leave them,
2257d63fdb69Smrg        # especially as we might pass files found there to a mingw objdump,
2258d63fdb69Smrg        # which wouldn't understand a cygwinified path. Ahh.
2259d63fdb69Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260d63fdb69Smrg      else
2261d63fdb69Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262d63fdb69Smrg      fi
2263d63fdb69Smrg      ;;
2264d63fdb69Smrg    pw32*)
2265d63fdb69Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266d63fdb69Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267d63fdb69Smrg      ;;
2268d63fdb69Smrg    esac
22693da084b3Smrg    ;;
2270d63fdb69Smrg
22713da084b3Smrg  *)
2272d63fdb69Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
22733da084b3Smrg    ;;
22743da084b3Smrg  esac
2275d63fdb69Smrg  dynamic_linker='Win32 ld.exe'
2276d63fdb69Smrg  # FIXME: first we should search . and the directory the executable is in
2277d63fdb69Smrg  shlibpath_var=PATH
22783da084b3Smrg  ;;
22793da084b3Smrg
2280d63fdb69Smrgdarwin* | rhapsody*)
2281d63fdb69Smrg  dynamic_linker="$host_os dyld"
2282d63fdb69Smrg  version_type=darwin
2283d63fdb69Smrg  need_lib_prefix=no
2284d63fdb69Smrg  need_version=no
2285d63fdb69Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2286d63fdb69Smrg  soname_spec='${libname}${release}${major}$shared_ext'
2287d63fdb69Smrg  shlibpath_overrides_runpath=yes
2288d63fdb69Smrg  shlibpath_var=DYLD_LIBRARY_PATH
2289d63fdb69Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290d63fdb69Smrgm4_if([$1], [],[
2291d63fdb69Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2292d63fdb69Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22933da084b3Smrg  ;;
22943da084b3Smrg
2295d63fdb69Smrgdgux*)
2296d63fdb69Smrg  version_type=linux
2297d63fdb69Smrg  need_lib_prefix=no
2298d63fdb69Smrg  need_version=no
2299d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2300d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2301d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
23023da084b3Smrg  ;;
23033da084b3Smrg
2304d63fdb69Smrgfreebsd1*)
2305d63fdb69Smrg  dynamic_linker=no
23063da084b3Smrg  ;;
23073da084b3Smrg
2308d63fdb69Smrgfreebsd* | dragonfly*)
2309d63fdb69Smrg  # DragonFly does not have aout.  When/if they implement a new
2310d63fdb69Smrg  # versioning mechanism, adjust this.
2311d63fdb69Smrg  if test -x /usr/bin/objformat; then
2312d63fdb69Smrg    objformat=`/usr/bin/objformat`
23133da084b3Smrg  else
2314d63fdb69Smrg    case $host_os in
2315d63fdb69Smrg    freebsd[[123]]*) objformat=aout ;;
2316d63fdb69Smrg    *) objformat=elf ;;
2317d63fdb69Smrg    esac
23183da084b3Smrg  fi
2319d63fdb69Smrg  version_type=freebsd-$objformat
2320d63fdb69Smrg  case $version_type in
2321d63fdb69Smrg    freebsd-elf*)
2322d63fdb69Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2323d63fdb69Smrg      need_version=no
2324d63fdb69Smrg      need_lib_prefix=no
2325d63fdb69Smrg      ;;
2326d63fdb69Smrg    freebsd-*)
2327d63fdb69Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2328d63fdb69Smrg      need_version=yes
2329d63fdb69Smrg      ;;
2330d63fdb69Smrg  esac
2331d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2332d63fdb69Smrg  case $host_os in
2333d63fdb69Smrg  freebsd2*)
2334d63fdb69Smrg    shlibpath_overrides_runpath=yes
2335d63fdb69Smrg    ;;
2336d63fdb69Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2337d63fdb69Smrg    shlibpath_overrides_runpath=yes
2338d63fdb69Smrg    hardcode_into_libs=yes
2339d63fdb69Smrg    ;;
2340d63fdb69Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2341d63fdb69Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2342d63fdb69Smrg    shlibpath_overrides_runpath=no
2343d63fdb69Smrg    hardcode_into_libs=yes
2344d63fdb69Smrg    ;;
2345d63fdb69Smrg  *) # from 4.6 on, and DragonFly
2346d63fdb69Smrg    shlibpath_overrides_runpath=yes
2347d63fdb69Smrg    hardcode_into_libs=yes
2348d63fdb69Smrg    ;;
2349d63fdb69Smrg  esac
23503da084b3Smrg  ;;
23513da084b3Smrg
2352d63fdb69Smrggnu*)
2353d63fdb69Smrg  version_type=linux
2354d63fdb69Smrg  need_lib_prefix=no
2355d63fdb69Smrg  need_version=no
2356d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2357d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2358d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2359d63fdb69Smrg  hardcode_into_libs=yes
23603da084b3Smrg  ;;
23613da084b3Smrg
2362d63fdb69Smrghpux9* | hpux10* | hpux11*)
2363d63fdb69Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2364d63fdb69Smrg  # link against other versions.
2365d63fdb69Smrg  version_type=sunos
2366d63fdb69Smrg  need_lib_prefix=no
2367d63fdb69Smrg  need_version=no
2368d63fdb69Smrg  case $host_cpu in
2369d63fdb69Smrg  ia64*)
2370d63fdb69Smrg    shrext_cmds='.so'
2371d63fdb69Smrg    hardcode_into_libs=yes
2372d63fdb69Smrg    dynamic_linker="$host_os dld.so"
2373d63fdb69Smrg    shlibpath_var=LD_LIBRARY_PATH
2374d63fdb69Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376d63fdb69Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2377d63fdb69Smrg    if test "X$HPUX_IA64_MODE" = X32; then
2378d63fdb69Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2379d63fdb69Smrg    else
2380d63fdb69Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2381d63fdb69Smrg    fi
2382d63fdb69Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2383d63fdb69Smrg    ;;
2384d63fdb69Smrg  hppa*64*)
2385d63fdb69Smrg    shrext_cmds='.sl'
2386d63fdb69Smrg    hardcode_into_libs=yes
2387d63fdb69Smrg    dynamic_linker="$host_os dld.sl"
2388d63fdb69Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2389d63fdb69Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2390d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2391d63fdb69Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2392d63fdb69Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2393d63fdb69Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394d63fdb69Smrg    ;;
2395d63fdb69Smrg  *)
2396d63fdb69Smrg    shrext_cmds='.sl'
2397d63fdb69Smrg    dynamic_linker="$host_os dld.sl"
2398d63fdb69Smrg    shlibpath_var=SHLIB_PATH
2399d63fdb69Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2400d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2401d63fdb69Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2402d63fdb69Smrg    ;;
2403d63fdb69Smrg  esac
2404d63fdb69Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2405d63fdb69Smrg  postinstall_cmds='chmod 555 $lib'
24063da084b3Smrg  ;;
24073da084b3Smrg
2408d63fdb69Smrginterix[[3-9]]*)
2409d63fdb69Smrg  version_type=linux
2410d63fdb69Smrg  need_lib_prefix=no
2411d63fdb69Smrg  need_version=no
2412d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2413d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2414d63fdb69Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2415d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2416d63fdb69Smrg  shlibpath_overrides_runpath=no
2417d63fdb69Smrg  hardcode_into_libs=yes
24183da084b3Smrg  ;;
24193da084b3Smrg
2420d63fdb69Smrgirix5* | irix6* | nonstopux*)
2421d63fdb69Smrg  case $host_os in
2422d63fdb69Smrg    nonstopux*) version_type=nonstopux ;;
2423d63fdb69Smrg    *)
2424d63fdb69Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2425d63fdb69Smrg		version_type=linux
2426d63fdb69Smrg	else
2427d63fdb69Smrg		version_type=irix
2428d63fdb69Smrg	fi ;;
2429d63fdb69Smrg  esac
2430d63fdb69Smrg  need_lib_prefix=no
2431d63fdb69Smrg  need_version=no
2432d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2433d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2434d63fdb69Smrg  case $host_os in
2435d63fdb69Smrg  irix5* | nonstopux*)
2436d63fdb69Smrg    libsuff= shlibsuff=
24373da084b3Smrg    ;;
2438d63fdb69Smrg  *)
2439d63fdb69Smrg    case $LD in # libtool.m4 will add one of these switches to LD
2440d63fdb69Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2441d63fdb69Smrg      libsuff= shlibsuff= libmagic=32-bit;;
2442d63fdb69Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2443d63fdb69Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2444d63fdb69Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2445d63fdb69Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2446d63fdb69Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
2447d63fdb69Smrg    esac
24483da084b3Smrg    ;;
24493da084b3Smrg  esac
2450d63fdb69Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2451d63fdb69Smrg  shlibpath_overrides_runpath=no
2452d63fdb69Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2453d63fdb69Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2454d63fdb69Smrg  hardcode_into_libs=yes
24553da084b3Smrg  ;;
24563da084b3Smrg
2457d63fdb69Smrg# No shared lib support for Linux oldld, aout, or coff.
2458d63fdb69Smrglinux*oldld* | linux*aout* | linux*coff*)
2459d63fdb69Smrg  dynamic_linker=no
24603da084b3Smrg  ;;
24613da084b3Smrg
2462d63fdb69Smrg# This must be Linux ELF.
2463d63fdb69Smrglinux* | k*bsd*-gnu)
2464d63fdb69Smrg  version_type=linux
2465d63fdb69Smrg  need_lib_prefix=no
2466d63fdb69Smrg  need_version=no
2467d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2469d63fdb69Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2470d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2471d63fdb69Smrg  shlibpath_overrides_runpath=no
2472d63fdb69Smrg  # Some binutils ld are patched to set DT_RUNPATH
2473d63fdb69Smrg  save_LDFLAGS=$LDFLAGS
2474d63fdb69Smrg  save_libdir=$libdir
2475d63fdb69Smrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476d63fdb69Smrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477d63fdb69Smrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478d63fdb69Smrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479d63fdb69Smrg       [shlibpath_overrides_runpath=yes])])
2480d63fdb69Smrg  LDFLAGS=$save_LDFLAGS
2481d63fdb69Smrg  libdir=$save_libdir
24823da084b3Smrg
2483d63fdb69Smrg  # This implies no fast_install, which is unacceptable.
2484d63fdb69Smrg  # Some rework will be needed to allow for fast_install
2485d63fdb69Smrg  # before this can be enabled.
2486d63fdb69Smrg  hardcode_into_libs=yes
24873da084b3Smrg
2488d63fdb69Smrg  # Add ABI-specific directories to the system library path.
2489d63fdb69Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
24903da084b3Smrg
2491d63fdb69Smrg  # Append ld.so.conf contents to the search path
2492d63fdb69Smrg  if test -f /etc/ld.so.conf; then
2493d63fdb69Smrg    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' ' '`
2494d63fdb69Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2495d63fdb69Smrg  fi
2496d63fdb69Smrg
2497d63fdb69Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2498d63fdb69Smrg  # powerpc, because MkLinux only supported shared libraries with the
2499d63fdb69Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2500d63fdb69Smrg  # most powerpc-linux boxes support dynamic linking these days and
2501d63fdb69Smrg  # people can always --disable-shared, the test was removed, and we
2502d63fdb69Smrg  # assume the GNU/Linux dynamic linker is in use.
2503d63fdb69Smrg  dynamic_linker='GNU/Linux ld.so'
25043da084b3Smrg  ;;
2505d63fdb69Smrg
2506d63fdb69Smrgnetbsd*)
2507d63fdb69Smrg  version_type=sunos
2508d63fdb69Smrg  need_lib_prefix=no
2509d63fdb69Smrg  need_version=no
2510d63fdb69Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2511d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2512d63fdb69Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2513d63fdb69Smrg    dynamic_linker='NetBSD (a.out) ld.so'
2514d63fdb69Smrg  else
2515d63fdb69Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2516d63fdb69Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2517d63fdb69Smrg    dynamic_linker='NetBSD ld.elf_so'
2518d63fdb69Smrg  fi
2519d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2520d63fdb69Smrg  shlibpath_overrides_runpath=yes
2521d63fdb69Smrg  hardcode_into_libs=yes
25223da084b3Smrg  ;;
2523d63fdb69Smrg
2524d63fdb69Smrgnewsos6)
2525d63fdb69Smrg  version_type=linux
2526d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2528d63fdb69Smrg  shlibpath_overrides_runpath=yes
25293da084b3Smrg  ;;
25303da084b3Smrg
2531d63fdb69Smrg*nto* | *qnx*)
2532d63fdb69Smrg  version_type=qnx
2533d63fdb69Smrg  need_lib_prefix=no
2534d63fdb69Smrg  need_version=no
2535d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2536d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2537d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2538d63fdb69Smrg  shlibpath_overrides_runpath=no
2539d63fdb69Smrg  hardcode_into_libs=yes
2540d63fdb69Smrg  dynamic_linker='ldqnx.so'
2541d63fdb69Smrg  ;;
25423da084b3Smrg
2543d63fdb69Smrgopenbsd*)
2544d63fdb69Smrg  version_type=sunos
2545d63fdb69Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
2546d63fdb69Smrg  need_lib_prefix=no
2547d63fdb69Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2548d63fdb69Smrg  case $host_os in
2549d63fdb69Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2550d63fdb69Smrg    *)				need_version=no  ;;
25513da084b3Smrg  esac
2552d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2553d63fdb69Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2554d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2555d63fdb69Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2556d63fdb69Smrg    case $host_os in
2557d63fdb69Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2558d63fdb69Smrg	shlibpath_overrides_runpath=no
2559d63fdb69Smrg	;;
2560d63fdb69Smrg      *)
2561d63fdb69Smrg	shlibpath_overrides_runpath=yes
2562d63fdb69Smrg	;;
2563d63fdb69Smrg      esac
25643da084b3Smrg  else
2565d63fdb69Smrg    shlibpath_overrides_runpath=yes
25663da084b3Smrg  fi
2567d63fdb69Smrg  ;;
25683da084b3Smrg
2569d63fdb69Smrgos2*)
2570d63fdb69Smrg  libname_spec='$name'
2571d63fdb69Smrg  shrext_cmds=".dll"
2572d63fdb69Smrg  need_lib_prefix=no
2573d63fdb69Smrg  library_names_spec='$libname${shared_ext} $libname.a'
2574d63fdb69Smrg  dynamic_linker='OS/2 ld.exe'
2575d63fdb69Smrg  shlibpath_var=LIBPATH
2576d63fdb69Smrg  ;;
25773da084b3Smrg
2578d63fdb69Smrgosf3* | osf4* | osf5*)
2579d63fdb69Smrg  version_type=osf
2580d63fdb69Smrg  need_lib_prefix=no
2581d63fdb69Smrg  need_version=no
2582d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2583d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2585d63fdb69Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2586d63fdb69Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2587d63fdb69Smrg  ;;
25883da084b3Smrg
2589d63fdb69Smrgrdos*)
2590d63fdb69Smrg  dynamic_linker=no
2591d63fdb69Smrg  ;;
25923da084b3Smrg
2593d63fdb69Smrgsolaris*)
2594d63fdb69Smrg  version_type=linux
2595d63fdb69Smrg  need_lib_prefix=no
2596d63fdb69Smrg  need_version=no
2597d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2598d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2599d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2600d63fdb69Smrg  shlibpath_overrides_runpath=yes
2601d63fdb69Smrg  hardcode_into_libs=yes
2602d63fdb69Smrg  # ldd complains unless libraries are executable
2603d63fdb69Smrg  postinstall_cmds='chmod +x $lib'
2604d63fdb69Smrg  ;;
26053da084b3Smrg
2606d63fdb69Smrgsunos4*)
2607d63fdb69Smrg  version_type=sunos
2608d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2609d63fdb69Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2610d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2611d63fdb69Smrg  shlibpath_overrides_runpath=yes
2612d63fdb69Smrg  if test "$with_gnu_ld" = yes; then
2613d63fdb69Smrg    need_lib_prefix=no
2614d63fdb69Smrg  fi
2615d63fdb69Smrg  need_version=yes
2616d63fdb69Smrg  ;;
26173da084b3Smrg
2618d63fdb69Smrgsysv4 | sysv4.3*)
2619d63fdb69Smrg  version_type=linux
2620d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2621d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2622d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2623d63fdb69Smrg  case $host_vendor in
2624d63fdb69Smrg    sni)
2625d63fdb69Smrg      shlibpath_overrides_runpath=no
2626d63fdb69Smrg      need_lib_prefix=no
2627d63fdb69Smrg      runpath_var=LD_RUN_PATH
2628d63fdb69Smrg      ;;
2629d63fdb69Smrg    siemens)
2630d63fdb69Smrg      need_lib_prefix=no
2631d63fdb69Smrg      ;;
2632d63fdb69Smrg    motorola)
2633d63fdb69Smrg      need_lib_prefix=no
2634d63fdb69Smrg      need_version=no
2635d63fdb69Smrg      shlibpath_overrides_runpath=no
2636d63fdb69Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2637d63fdb69Smrg      ;;
2638d63fdb69Smrg  esac
2639d63fdb69Smrg  ;;
26403da084b3Smrg
2641d63fdb69Smrgsysv4*MP*)
2642d63fdb69Smrg  if test -d /usr/nec ;then
2643d63fdb69Smrg    version_type=linux
2644d63fdb69Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2645d63fdb69Smrg    soname_spec='$libname${shared_ext}.$major'
2646d63fdb69Smrg    shlibpath_var=LD_LIBRARY_PATH
26473da084b3Smrg  fi
26483da084b3Smrg  ;;
26493da084b3Smrg
2650d63fdb69Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2651d63fdb69Smrg  version_type=freebsd-elf
2652d63fdb69Smrg  need_lib_prefix=no
2653d63fdb69Smrg  need_version=no
2654d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2655d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2656d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2657d63fdb69Smrg  shlibpath_overrides_runpath=yes
2658d63fdb69Smrg  hardcode_into_libs=yes
2659d63fdb69Smrg  if test "$with_gnu_ld" = yes; then
2660d63fdb69Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2661d63fdb69Smrg  else
2662d63fdb69Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2663d63fdb69Smrg    case $host_os in
2664d63fdb69Smrg      sco3.2v5*)
2665d63fdb69Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2666d63fdb69Smrg	;;
2667d63fdb69Smrg    esac
26683da084b3Smrg  fi
2669d63fdb69Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
2670d63fdb69Smrg  ;;
26713da084b3Smrg
2672d63fdb69Smrgtpf*)
2673d63fdb69Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2674d63fdb69Smrg  version_type=linux
2675d63fdb69Smrg  need_lib_prefix=no
2676d63fdb69Smrg  need_version=no
2677d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2679d63fdb69Smrg  shlibpath_overrides_runpath=no
2680d63fdb69Smrg  hardcode_into_libs=yes
2681d63fdb69Smrg  ;;
26823da084b3Smrg
2683d63fdb69Smrguts4*)
2684d63fdb69Smrg  version_type=linux
2685d63fdb69Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686d63fdb69Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2687d63fdb69Smrg  shlibpath_var=LD_LIBRARY_PATH
2688d63fdb69Smrg  ;;
26893da084b3Smrg
2690d63fdb69Smrg*)
2691d63fdb69Smrg  dynamic_linker=no
2692d63fdb69Smrg  ;;
2693d63fdb69Smrgesac
2694d63fdb69SmrgAC_MSG_RESULT([$dynamic_linker])
2695d63fdb69Smrgtest "$dynamic_linker" = no && can_build_shared=no
26963da084b3Smrg
2697d63fdb69Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2698d63fdb69Smrgif test "$GCC" = yes; then
2699d63fdb69Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2700d63fdb69Smrgfi
27013da084b3Smrg
2702d63fdb69Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2703d63fdb69Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2704d63fdb69Smrgfi
2705d63fdb69Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2706d63fdb69Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2707d63fdb69Smrgfi
27083da084b3Smrg
2709d63fdb69Smrg_LT_DECL([], [variables_saved_for_relink], [1],
2710d63fdb69Smrg    [Variables whose values should be saved in libtool wrapper scripts and
2711d63fdb69Smrg    restored at link time])
2712d63fdb69Smrg_LT_DECL([], [need_lib_prefix], [0],
2713d63fdb69Smrg    [Do we need the "lib" prefix for modules?])
2714d63fdb69Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2715d63fdb69Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
2716d63fdb69Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2717d63fdb69Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2718d63fdb69Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2719d63fdb69Smrg    [Is shlibpath searched before the hard-coded library search path?])
2720d63fdb69Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2721d63fdb69Smrg_LT_DECL([], [library_names_spec], [1],
2722d63fdb69Smrg    [[List of archive names.  First name is the real one, the rest are links.
2723d63fdb69Smrg    The last name is the one that the linker finds with -lNAME]])
2724d63fdb69Smrg_LT_DECL([], [soname_spec], [1],
2725d63fdb69Smrg    [[The coded name of the library, if different from the real name]])
2726d63fdb69Smrg_LT_DECL([], [postinstall_cmds], [2],
2727d63fdb69Smrg    [Command to use after installation of a shared archive])
2728d63fdb69Smrg_LT_DECL([], [postuninstall_cmds], [2],
2729d63fdb69Smrg    [Command to use after uninstallation of a shared archive])
2730d63fdb69Smrg_LT_DECL([], [finish_cmds], [2],
2731d63fdb69Smrg    [Commands used to finish a libtool library installation in a directory])
2732d63fdb69Smrg_LT_DECL([], [finish_eval], [1],
2733d63fdb69Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
2734d63fdb69Smrg    not shown]])
2735d63fdb69Smrg_LT_DECL([], [hardcode_into_libs], [0],
2736d63fdb69Smrg    [Whether we should hardcode library paths into libraries])
2737d63fdb69Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2738d63fdb69Smrg    [Compile-time system search path for libraries])
2739d63fdb69Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2740d63fdb69Smrg    [Run-time system search path for libraries])
2741d63fdb69Smrg])# _LT_SYS_DYNAMIC_LINKER
2742d63fdb69Smrg
2743d63fdb69Smrg
2744d63fdb69Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
2745d63fdb69Smrg# --------------------------
2746d63fdb69Smrg# find a file program which can recognize shared library
2747d63fdb69SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2748d63fdb69Smrg[m4_require([_LT_DECL_EGREP])dnl
2749d63fdb69SmrgAC_MSG_CHECKING([for $1])
2750d63fdb69SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2751d63fdb69Smrg[case $MAGIC_CMD in
2752d63fdb69Smrg[[\\/*] |  ?:[\\/]*])
2753d63fdb69Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2754d63fdb69Smrg  ;;
2755d63fdb69Smrg*)
2756d63fdb69Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2757d63fdb69Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758d63fdb69Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2759d63fdb69Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2760d63fdb69Smrgdnl not every word.  This closes a longstanding sh security hole.
2761d63fdb69Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2762d63fdb69Smrg  for ac_dir in $ac_dummy; do
2763d63fdb69Smrg    IFS="$lt_save_ifs"
2764d63fdb69Smrg    test -z "$ac_dir" && ac_dir=.
2765d63fdb69Smrg    if test -f $ac_dir/$1; then
2766d63fdb69Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2767d63fdb69Smrg      if test -n "$file_magic_test_file"; then
2768d63fdb69Smrg	case $deplibs_check_method in
2769d63fdb69Smrg	"file_magic "*)
2770d63fdb69Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2771d63fdb69Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2772d63fdb69Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2773d63fdb69Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
2774d63fdb69Smrg	    :
2775d63fdb69Smrg	  else
2776d63fdb69Smrg	    cat <<_LT_EOF 1>&2
27773da084b3Smrg
2778d63fdb69Smrg*** Warning: the command libtool uses to detect shared libraries,
2779d63fdb69Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2780d63fdb69Smrg*** The result is that libtool may fail to recognize shared libraries
2781d63fdb69Smrg*** as such.  This will affect the creation of libtool libraries that
2782d63fdb69Smrg*** depend on shared libraries, but programs linked with such libtool
2783d63fdb69Smrg*** libraries will work regardless of this problem.  Nevertheless, you
2784d63fdb69Smrg*** may want to report the problem to your system manager and/or to
2785d63fdb69Smrg*** bug-libtool@gnu.org
27863da084b3Smrg
2787d63fdb69Smrg_LT_EOF
2788d63fdb69Smrg	  fi ;;
2789d63fdb69Smrg	esac
2790d63fdb69Smrg      fi
2791d63fdb69Smrg      break
2792d63fdb69Smrg    fi
2793d63fdb69Smrg  done
2794d63fdb69Smrg  IFS="$lt_save_ifs"
2795d63fdb69Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2796d63fdb69Smrg  ;;
2797d63fdb69Smrgesac])
2798d63fdb69SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2799d63fdb69Smrgif test -n "$MAGIC_CMD"; then
2800d63fdb69Smrg  AC_MSG_RESULT($MAGIC_CMD)
28013da084b3Smrgelse
2802d63fdb69Smrg  AC_MSG_RESULT(no)
28033da084b3Smrgfi
2804d63fdb69Smrg_LT_DECL([], [MAGIC_CMD], [0],
2805d63fdb69Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2806d63fdb69Smrg])# _LT_PATH_TOOL_PREFIX
28073da084b3Smrg
2808d63fdb69Smrg# Old name:
2809d63fdb69SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2810d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
2811d63fdb69Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
28123da084b3Smrg
28133da084b3Smrg
2814d63fdb69Smrg# _LT_PATH_MAGIC
2815d63fdb69Smrg# --------------
2816d63fdb69Smrg# find a file program which can recognize a shared library
2817d63fdb69Smrgm4_defun([_LT_PATH_MAGIC],
2818d63fdb69Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2819d63fdb69Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2820d63fdb69Smrg  if test -n "$ac_tool_prefix"; then
2821d63fdb69Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
28223da084b3Smrg  else
2823d63fdb69Smrg    MAGIC_CMD=:
28243da084b3Smrg  fi
2825d63fdb69Smrgfi
2826d63fdb69Smrg])# _LT_PATH_MAGIC
28273da084b3Smrg
28283da084b3Smrg
2829d63fdb69Smrg# LT_PATH_LD
2830d63fdb69Smrg# ----------
2831d63fdb69Smrg# find the pathname to the GNU or non-GNU linker
2832d63fdb69SmrgAC_DEFUN([LT_PATH_LD],
2833d63fdb69Smrg[AC_REQUIRE([AC_PROG_CC])dnl
2834d63fdb69SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2835d63fdb69SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2836d63fdb69Smrgm4_require([_LT_DECL_SED])dnl
2837d63fdb69Smrgm4_require([_LT_DECL_EGREP])dnl
28383da084b3Smrg
2839d63fdb69SmrgAC_ARG_WITH([gnu-ld],
2840d63fdb69Smrg    [AS_HELP_STRING([--with-gnu-ld],
2841d63fdb69Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2842d63fdb69Smrg    [test "$withval" = no || with_gnu_ld=yes],
2843d63fdb69Smrg    [with_gnu_ld=no])dnl
2844d63fdb69Smrg
2845d63fdb69Smrgac_prog=ld
2846d63fdb69Smrgif test "$GCC" = yes; then
2847d63fdb69Smrg  # Check if gcc -print-prog-name=ld gives a path.
2848d63fdb69Smrg  AC_MSG_CHECKING([for ld used by $CC])
2849d63fdb69Smrg  case $host in
2850d63fdb69Smrg  *-*-mingw*)
2851d63fdb69Smrg    # gcc leaves a trailing carriage return which upsets mingw
2852d63fdb69Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2853d63fdb69Smrg  *)
2854d63fdb69Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2855d63fdb69Smrg  esac
2856d63fdb69Smrg  case $ac_prog in
2857d63fdb69Smrg    # Accept absolute paths.
2858d63fdb69Smrg    [[\\/]]* | ?:[[\\/]]*)
2859d63fdb69Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2860d63fdb69Smrg      # Canonicalize the pathname of ld
2861d63fdb69Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2862d63fdb69Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2863d63fdb69Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2864d63fdb69Smrg      done
2865d63fdb69Smrg      test -z "$LD" && LD="$ac_prog"
2866d63fdb69Smrg      ;;
2867d63fdb69Smrg  "")
2868d63fdb69Smrg    # If it fails, then pretend we aren't using GCC.
2869d63fdb69Smrg    ac_prog=ld
28703da084b3Smrg    ;;
2871d63fdb69Smrg  *)
2872d63fdb69Smrg    # If it is relative, then search for the first ld in PATH.
2873d63fdb69Smrg    with_gnu_ld=unknown
2874d63fdb69Smrg    ;;
2875d63fdb69Smrg  esac
2876d63fdb69Smrgelif test "$with_gnu_ld" = yes; then
2877d63fdb69Smrg  AC_MSG_CHECKING([for GNU ld])
2878d63fdb69Smrgelse
2879d63fdb69Smrg  AC_MSG_CHECKING([for non-GNU ld])
2880d63fdb69Smrgfi
2881d63fdb69SmrgAC_CACHE_VAL(lt_cv_path_LD,
2882d63fdb69Smrg[if test -z "$LD"; then
2883d63fdb69Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2884d63fdb69Smrg  for ac_dir in $PATH; do
2885d63fdb69Smrg    IFS="$lt_save_ifs"
2886d63fdb69Smrg    test -z "$ac_dir" && ac_dir=.
2887d63fdb69Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2888d63fdb69Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2889d63fdb69Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2890d63fdb69Smrg      # but apparently some variants of GNU ld only accept -v.
2891d63fdb69Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2892d63fdb69Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2893d63fdb69Smrg      *GNU* | *'with BFD'*)
2894d63fdb69Smrg	test "$with_gnu_ld" != no && break
2895d63fdb69Smrg	;;
2896d63fdb69Smrg      *)
2897d63fdb69Smrg	test "$with_gnu_ld" != yes && break
28983da084b3Smrg	;;
28993da084b3Smrg      esac
29003da084b3Smrg    fi
2901d63fdb69Smrg  done
2902d63fdb69Smrg  IFS="$lt_save_ifs"
2903d63fdb69Smrgelse
2904d63fdb69Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2905d63fdb69Smrgfi])
2906d63fdb69SmrgLD="$lt_cv_path_LD"
2907d63fdb69Smrgif test -n "$LD"; then
2908d63fdb69Smrg  AC_MSG_RESULT($LD)
2909d63fdb69Smrgelse
2910d63fdb69Smrg  AC_MSG_RESULT(no)
2911d63fdb69Smrgfi
2912d63fdb69Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2913d63fdb69Smrg_LT_PATH_LD_GNU
2914d63fdb69SmrgAC_SUBST([LD])
29153da084b3Smrg
2916d63fdb69Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2917d63fdb69Smrg])# LT_PATH_LD
29183da084b3Smrg
2919d63fdb69Smrg# Old names:
2920d63fdb69SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2921d63fdb69SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2922d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
2923d63fdb69Smrgdnl AC_DEFUN([AM_PROG_LD], [])
2924d63fdb69Smrgdnl AC_DEFUN([AC_PROG_LD], [])
29253da084b3Smrg
29263da084b3Smrg
2927d63fdb69Smrg# _LT_PATH_LD_GNU
2928d63fdb69Smrg#- --------------
2929d63fdb69Smrgm4_defun([_LT_PATH_LD_GNU],
2930d63fdb69Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2931d63fdb69Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2932d63fdb69Smrgcase `$LD -v 2>&1 </dev/null` in
2933d63fdb69Smrg*GNU* | *'with BFD'*)
2934d63fdb69Smrg  lt_cv_prog_gnu_ld=yes
2935d63fdb69Smrg  ;;
2936d63fdb69Smrg*)
2937d63fdb69Smrg  lt_cv_prog_gnu_ld=no
2938d63fdb69Smrg  ;;
2939d63fdb69Smrgesac])
2940d63fdb69Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2941d63fdb69Smrg])# _LT_PATH_LD_GNU
29423da084b3Smrg
2943d63fdb69Smrg
2944d63fdb69Smrg# _LT_CMD_RELOAD
2945d63fdb69Smrg# --------------
2946d63fdb69Smrg# find reload flag for linker
2947d63fdb69Smrg#   -- PORTME Some linkers may need a different reload flag.
2948d63fdb69Smrgm4_defun([_LT_CMD_RELOAD],
2949d63fdb69Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
2950d63fdb69Smrg  lt_cv_ld_reload_flag,
2951d63fdb69Smrg  [lt_cv_ld_reload_flag='-r'])
2952d63fdb69Smrgreload_flag=$lt_cv_ld_reload_flag
2953d63fdb69Smrgcase $reload_flag in
2954d63fdb69Smrg"" | " "*) ;;
2955d63fdb69Smrg*) reload_flag=" $reload_flag" ;;
2956d63fdb69Smrgesac
2957d63fdb69Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2958d63fdb69Smrgcase $host_os in
2959d63fdb69Smrg  darwin*)
2960d63fdb69Smrg    if test "$GCC" = yes; then
2961d63fdb69Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
29623da084b3Smrg    else
2963d63fdb69Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
29643da084b3Smrg    fi
29653da084b3Smrg    ;;
2966d63fdb69Smrgesac
2967d63fdb69Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2968d63fdb69Smrg_LT_DECL([], [reload_cmds], [2])dnl
2969d63fdb69Smrg])# _LT_CMD_RELOAD
29703da084b3Smrg
29713da084b3Smrg
2972d63fdb69Smrg# _LT_CHECK_MAGIC_METHOD
2973d63fdb69Smrg# ----------------------
2974d63fdb69Smrg# how to check for library dependencies
2975d63fdb69Smrg#  -- PORTME fill in with the dynamic library characteristics
2976d63fdb69Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2977d63fdb69Smrg[m4_require([_LT_DECL_EGREP])
2978d63fdb69Smrgm4_require([_LT_DECL_OBJDUMP])
2979d63fdb69SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
2980d63fdb69Smrglt_cv_deplibs_check_method,
2981d63fdb69Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2982d63fdb69Smrglt_cv_file_magic_test_file=
2983d63fdb69Smrglt_cv_deplibs_check_method='unknown'
2984d63fdb69Smrg# Need to set the preceding variable on all platforms that support
2985d63fdb69Smrg# interlibrary dependencies.
2986d63fdb69Smrg# 'none' -- dependencies not supported.
2987d63fdb69Smrg# `unknown' -- same as none, but documents that we really don't know.
2988d63fdb69Smrg# 'pass_all' -- all dependencies passed with no checks.
2989d63fdb69Smrg# 'test_compile' -- check by making test program.
2990d63fdb69Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
2991d63fdb69Smrg# which responds to the $file_magic_cmd with a given extended regex.
2992d63fdb69Smrg# If you have `file' or equivalent on your system and you're not sure
2993d63fdb69Smrg# whether `pass_all' will *always* work, you probably want this one.
2994d63fdb69Smrg
2995d63fdb69Smrgcase $host_os in
2996d63fdb69Smrgaix[[4-9]]*)
2997d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
29983da084b3Smrg  ;;
29993da084b3Smrg
3000d63fdb69Smrgbeos*)
3001d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3002d63fdb69Smrg  ;;
30033da084b3Smrg
3004d63fdb69Smrgbsdi[[45]]*)
3005d63fdb69Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3006d63fdb69Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3007d63fdb69Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
3008d63fdb69Smrg  ;;
3009d63fdb69Smrg
3010d63fdb69Smrgcygwin*)
3011d63fdb69Smrg  # func_win32_libid is a shell function defined in ltmain.sh
3012d63fdb69Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3013d63fdb69Smrg  lt_cv_file_magic_cmd='func_win32_libid'
3014d63fdb69Smrg  ;;
3015d63fdb69Smrg
3016d63fdb69Smrgmingw* | pw32*)
3017d63fdb69Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3018d63fdb69Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3019d63fdb69Smrg  # unless we find 'file', for example because we are cross-compiling.
3020d63fdb69Smrg  if ( file / ) >/dev/null 2>&1; then
3021d63fdb69Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022d63fdb69Smrg    lt_cv_file_magic_cmd='func_win32_libid'
3023d63fdb69Smrg  else
3024d63fdb69Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3025d63fdb69Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3026d63fdb69Smrg  fi
3027d63fdb69Smrg  ;;
3028d63fdb69Smrg
3029d63fdb69Smrgcegcc)
3030d63fdb69Smrg  # use the weaker test based on 'objdump'. See mingw*.
3031d63fdb69Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3032d63fdb69Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3033d63fdb69Smrg  ;;
3034d63fdb69Smrg
3035d63fdb69Smrgdarwin* | rhapsody*)
3036d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3037d63fdb69Smrg  ;;
3038d63fdb69Smrg
3039d63fdb69Smrgfreebsd* | dragonfly*)
3040d63fdb69Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
30413da084b3Smrg    case $host_cpu in
3042d63fdb69Smrg    i*86 )
3043d63fdb69Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
3044d63fdb69Smrg      # Let's accept both of them until this is cleared up.
3045d63fdb69Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3046d63fdb69Smrg      lt_cv_file_magic_cmd=/usr/bin/file
3047d63fdb69Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
30483da084b3Smrg      ;;
30493da084b3Smrg    esac
3050d63fdb69Smrg  else
3051d63fdb69Smrg    lt_cv_deplibs_check_method=pass_all
3052d63fdb69Smrg  fi
3053d63fdb69Smrg  ;;
30543da084b3Smrg
3055d63fdb69Smrggnu*)
3056d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3057d63fdb69Smrg  ;;
30583da084b3Smrg
3059d63fdb69Smrghpux10.20* | hpux11*)
3060d63fdb69Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3061d63fdb69Smrg  case $host_cpu in
3062d63fdb69Smrg  ia64*)
3063d63fdb69Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3064d63fdb69Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
30653da084b3Smrg    ;;
3066d63fdb69Smrg  hppa*64*)
3067d63fdb69Smrg    [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]']
3068d63fdb69Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
30693da084b3Smrg    ;;
3070d63fdb69Smrg  *)
3071d63fdb69Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3072d63fdb69Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
30733da084b3Smrg    ;;
3074d63fdb69Smrg  esac
3075d63fdb69Smrg  ;;
30763da084b3Smrg
3077d63fdb69Smrginterix[[3-9]]*)
3078d63fdb69Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3079d63fdb69Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3080d63fdb69Smrg  ;;
30813da084b3Smrg
3082d63fdb69Smrgirix5* | irix6* | nonstopux*)
3083d63fdb69Smrg  case $LD in
3084d63fdb69Smrg  *-32|*"-32 ") libmagic=32-bit;;
3085d63fdb69Smrg  *-n32|*"-n32 ") libmagic=N32;;
3086d63fdb69Smrg  *-64|*"-64 ") libmagic=64-bit;;
3087d63fdb69Smrg  *) libmagic=never-match;;
3088d63fdb69Smrg  esac
3089d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3090d63fdb69Smrg  ;;
30913da084b3Smrg
3092d63fdb69Smrg# This must be Linux ELF.
3093d63fdb69Smrglinux* | k*bsd*-gnu)
3094d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3095d63fdb69Smrg  ;;
30963da084b3Smrg
3097d63fdb69Smrgnetbsd*)
3098d63fdb69Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3099d63fdb69Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3100d63fdb69Smrg  else
3101d63fdb69Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3102d63fdb69Smrg  fi
3103d63fdb69Smrg  ;;
31043da084b3Smrg
3105d63fdb69Smrgnewos6*)
3106d63fdb69Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3107d63fdb69Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3108d63fdb69Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3109d63fdb69Smrg  ;;
31103da084b3Smrg
3111d63fdb69Smrg*nto* | *qnx*)
3112d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3113d63fdb69Smrg  ;;
31143da084b3Smrg
3115d63fdb69Smrgopenbsd*)
3116d63fdb69Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3117d63fdb69Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3118d63fdb69Smrg  else
3119d63fdb69Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3120d63fdb69Smrg  fi
3121d63fdb69Smrg  ;;
31223da084b3Smrg
3123d63fdb69Smrgosf3* | osf4* | osf5*)
3124d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3125d63fdb69Smrg  ;;
31263da084b3Smrg
3127d63fdb69Smrgrdos*)
3128d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3129d63fdb69Smrg  ;;
31303da084b3Smrg
3131d63fdb69Smrgsolaris*)
3132d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3133d63fdb69Smrg  ;;
3134d63fdb69Smrg
3135d63fdb69Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3136d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3137d63fdb69Smrg  ;;
3138d63fdb69Smrg
3139d63fdb69Smrgsysv4 | sysv4.3*)
3140d63fdb69Smrg  case $host_vendor in
3141d63fdb69Smrg  motorola)
3142d63fdb69Smrg    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]]'
3143d63fdb69Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
31443da084b3Smrg    ;;
3145d63fdb69Smrg  ncr)
3146d63fdb69Smrg    lt_cv_deplibs_check_method=pass_all
31473da084b3Smrg    ;;
3148d63fdb69Smrg  sequent)
3149d63fdb69Smrg    lt_cv_file_magic_cmd='/bin/file'
3150d63fdb69Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
31513da084b3Smrg    ;;
3152d63fdb69Smrg  sni)
3153d63fdb69Smrg    lt_cv_file_magic_cmd='/bin/file'
3154d63fdb69Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3155d63fdb69Smrg    lt_cv_file_magic_test_file=/lib/libc.so
3156d63fdb69Smrg    ;;
3157d63fdb69Smrg  siemens)
3158d63fdb69Smrg    lt_cv_deplibs_check_method=pass_all
3159d63fdb69Smrg    ;;
3160d63fdb69Smrg  pc)
3161d63fdb69Smrg    lt_cv_deplibs_check_method=pass_all
3162d63fdb69Smrg    ;;
3163d63fdb69Smrg  esac
3164d63fdb69Smrg  ;;
31653da084b3Smrg
3166d63fdb69Smrgtpf*)
3167d63fdb69Smrg  lt_cv_deplibs_check_method=pass_all
3168d63fdb69Smrg  ;;
3169d63fdb69Smrgesac
3170d63fdb69Smrg])
3171d63fdb69Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
3172d63fdb69Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
3173d63fdb69Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
31743da084b3Smrg
3175d63fdb69Smrg_LT_DECL([], [deplibs_check_method], [1],
3176d63fdb69Smrg    [Method to check whether dependent libraries are shared objects])
3177d63fdb69Smrg_LT_DECL([], [file_magic_cmd], [1],
3178d63fdb69Smrg    [Command to use when deplibs_check_method == "file_magic"])
3179d63fdb69Smrg])# _LT_CHECK_MAGIC_METHOD
31803da084b3Smrg
31813da084b3Smrg
3182d63fdb69Smrg# LT_PATH_NM
3183d63fdb69Smrg# ----------
3184d63fdb69Smrg# find the pathname to a BSD- or MS-compatible name lister
3185d63fdb69SmrgAC_DEFUN([LT_PATH_NM],
3186d63fdb69Smrg[AC_REQUIRE([AC_PROG_CC])dnl
3187d63fdb69SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3188d63fdb69Smrg[if test -n "$NM"; then
3189d63fdb69Smrg  # Let the user override the test.
3190d63fdb69Smrg  lt_cv_path_NM="$NM"
3191d63fdb69Smrgelse
3192d63fdb69Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
3193d63fdb69Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3194d63fdb69Smrg    lt_nm_to_check="$lt_nm_to_check nm"
3195d63fdb69Smrg  fi
3196d63fdb69Smrg  for lt_tmp_nm in $lt_nm_to_check; do
3197d63fdb69Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3198d63fdb69Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3199d63fdb69Smrg      IFS="$lt_save_ifs"
3200d63fdb69Smrg      test -z "$ac_dir" && ac_dir=.
3201d63fdb69Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3202d63fdb69Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3203d63fdb69Smrg	# Check to see if the nm accepts a BSD-compat flag.
3204d63fdb69Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3205d63fdb69Smrg	#   nm: unknown option "B" ignored
3206d63fdb69Smrg	# Tru64's nm complains that /dev/null is an invalid object file
3207d63fdb69Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3208d63fdb69Smrg	*/dev/null* | *'Invalid file or object type'*)
3209d63fdb69Smrg	  lt_cv_path_NM="$tmp_nm -B"
3210d63fdb69Smrg	  break
3211d63fdb69Smrg	  ;;
3212d63fdb69Smrg	*)
3213d63fdb69Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3214d63fdb69Smrg	  */dev/null*)
3215d63fdb69Smrg	    lt_cv_path_NM="$tmp_nm -p"
3216d63fdb69Smrg	    break
3217d63fdb69Smrg	    ;;
3218d63fdb69Smrg	  *)
3219d63fdb69Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3220d63fdb69Smrg	    continue # so that we can try to find one that supports BSD flags
3221d63fdb69Smrg	    ;;
3222d63fdb69Smrg	  esac
3223d63fdb69Smrg	  ;;
3224d63fdb69Smrg	esac
3225d63fdb69Smrg      fi
3226d63fdb69Smrg    done
3227d63fdb69Smrg    IFS="$lt_save_ifs"
32283da084b3Smrg  done
3229d63fdb69Smrg  : ${lt_cv_path_NM=no}
3230d63fdb69Smrgfi])
3231d63fdb69Smrgif test "$lt_cv_path_NM" != "no"; then
3232d63fdb69Smrg  NM="$lt_cv_path_NM"
32333da084b3Smrgelse
3234d63fdb69Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3235d63fdb69Smrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3236d63fdb69Smrg  AC_SUBST([DUMPBIN])
3237d63fdb69Smrg  if test "$DUMPBIN" != ":"; then
3238d63fdb69Smrg    NM="$DUMPBIN"
3239d63fdb69Smrg  fi
32403da084b3Smrgfi
3241d63fdb69Smrgtest -z "$NM" && NM=nm
3242d63fdb69SmrgAC_SUBST([NM])
3243d63fdb69Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3244d63fdb69Smrg
3245d63fdb69SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3246d63fdb69Smrg  [lt_cv_nm_interface="BSD nm"
3247d63fdb69Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
3248d63fdb69Smrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3249d63fdb69Smrg  (eval "$ac_compile" 2>conftest.err)
3250d63fdb69Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3251d63fdb69Smrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3252d63fdb69Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3253d63fdb69Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3254d63fdb69Smrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3255d63fdb69Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3256d63fdb69Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3257d63fdb69Smrg    lt_cv_nm_interface="MS dumpbin"
3258d63fdb69Smrg  fi
3259d63fdb69Smrg  rm -f conftest*])
3260d63fdb69Smrg])# LT_PATH_NM
32613da084b3Smrg
3262d63fdb69Smrg# Old names:
3263d63fdb69SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3264d63fdb69SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3265d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
3266d63fdb69Smrgdnl AC_DEFUN([AM_PROG_NM], [])
3267d63fdb69Smrgdnl AC_DEFUN([AC_PROG_NM], [])
32683da084b3Smrg
32693da084b3Smrg
3270d63fdb69Smrg# LT_LIB_M
3271d63fdb69Smrg# --------
3272d63fdb69Smrg# check for math library
3273d63fdb69SmrgAC_DEFUN([LT_LIB_M],
3274d63fdb69Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3275d63fdb69SmrgLIBM=
3276d63fdb69Smrgcase $host in
3277d63fdb69Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3278d63fdb69Smrg  # These system don't have libm, or don't need it
3279d63fdb69Smrg  ;;
3280d63fdb69Smrg*-ncr-sysv4.3*)
3281d63fdb69Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3282d63fdb69Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3283d63fdb69Smrg  ;;
3284d63fdb69Smrg*)
3285d63fdb69Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
32863da084b3Smrg  ;;
32873da084b3Smrgesac
3288d63fdb69SmrgAC_SUBST([LIBM])
3289d63fdb69Smrg])# LT_LIB_M
32903da084b3Smrg
3291d63fdb69Smrg# Old name:
3292d63fdb69SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3293d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
3294d63fdb69Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
32953da084b3Smrg
32963da084b3Smrg
3297d63fdb69Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3298d63fdb69Smrg# -------------------------------
3299d63fdb69Smrgm4_defun([_LT_COMPILER_NO_RTTI],
3300d63fdb69Smrg[m4_require([_LT_TAG_COMPILER])dnl
33013da084b3Smrg
3302d63fdb69Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
33033da084b3Smrg
3304d63fdb69Smrgif test "$GCC" = yes; then
3305d63fdb69Smrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
33063da084b3Smrg
3307d63fdb69Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3308d63fdb69Smrg    lt_cv_prog_compiler_rtti_exceptions,
3309d63fdb69Smrg    [-fno-rtti -fno-exceptions], [],
3310d63fdb69Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3311d63fdb69Smrgfi
3312d63fdb69Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3313d63fdb69Smrg	[Compiler flag to turn off builtin functions])
3314d63fdb69Smrg])# _LT_COMPILER_NO_RTTI
33153da084b3Smrg
33163da084b3Smrg
3317d63fdb69Smrg# _LT_CMD_GLOBAL_SYMBOLS
3318d63fdb69Smrg# ----------------------
3319d63fdb69Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3320d63fdb69Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3321d63fdb69SmrgAC_REQUIRE([AC_PROG_CC])dnl
3322d63fdb69SmrgAC_REQUIRE([LT_PATH_NM])dnl
3323d63fdb69SmrgAC_REQUIRE([LT_PATH_LD])dnl
3324d63fdb69Smrgm4_require([_LT_DECL_SED])dnl
3325d63fdb69Smrgm4_require([_LT_DECL_EGREP])dnl
3326d63fdb69Smrgm4_require([_LT_TAG_COMPILER])dnl
33273da084b3Smrg
3328d63fdb69Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3329d63fdb69SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3330d63fdb69SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3331d63fdb69Smrg[
3332d63fdb69Smrg# These are sane defaults that work on at least a few old systems.
3333d63fdb69Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
33343da084b3Smrg
3335d63fdb69Smrg# Character class describing NM global symbol codes.
3336d63fdb69Smrgsymcode='[[BCDEGRST]]'
33373da084b3Smrg
3338d63fdb69Smrg# Regexp to match symbols that can be accessed directly from C.
3339d63fdb69Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
33403da084b3Smrg
3341d63fdb69Smrg# Define system-specific variables.
33423da084b3Smrgcase $host_os in
3343d63fdb69Smrgaix*)
3344d63fdb69Smrg  symcode='[[BCDT]]'
33453da084b3Smrg  ;;
3346d63fdb69Smrgcygwin* | mingw* | pw32* | cegcc*)
3347d63fdb69Smrg  symcode='[[ABCDGISTW]]'
3348d63fdb69Smrg  ;;
3349d63fdb69Smrghpux*)
3350d63fdb69Smrg  if test "$host_cpu" = ia64; then
3351d63fdb69Smrg    symcode='[[ABCDEGRST]]'
33523da084b3Smrg  fi
33533da084b3Smrg  ;;
3354d63fdb69Smrgirix* | nonstopux*)
3355d63fdb69Smrg  symcode='[[BCDEGRST]]'
3356d63fdb69Smrg  ;;
3357d63fdb69Smrgosf*)
3358d63fdb69Smrg  symcode='[[BCDEGQRST]]'
3359d63fdb69Smrg  ;;
3360d63fdb69Smrgsolaris*)
3361d63fdb69Smrg  symcode='[[BDRT]]'
3362d63fdb69Smrg  ;;
3363d63fdb69Smrgsco3.2v5*)
3364d63fdb69Smrg  symcode='[[DT]]'
3365d63fdb69Smrg  ;;
3366d63fdb69Smrgsysv4.2uw2*)
3367d63fdb69Smrg  symcode='[[DT]]'
3368d63fdb69Smrg  ;;
3369d63fdb69Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3370d63fdb69Smrg  symcode='[[ABDT]]'
3371d63fdb69Smrg  ;;
3372d63fdb69Smrgsysv4)
3373d63fdb69Smrg  symcode='[[DFNSTU]]'
3374d63fdb69Smrg  ;;
3375d63fdb69Smrgesac
33763da084b3Smrg
3377d63fdb69Smrg# If we're using GNU nm, then use its standard symbol codes.
3378d63fdb69Smrgcase `$NM -V 2>&1` in
3379d63fdb69Smrg*GNU* | *'with BFD'*)
3380d63fdb69Smrg  symcode='[[ABCDGIRSTW]]' ;;
3381d63fdb69Smrgesac
33823da084b3Smrg
3383d63fdb69Smrg# Transform an extracted symbol line into a proper C declaration.
3384d63fdb69Smrg# Some systems (esp. on ia64) link data and code symbols differently,
3385d63fdb69Smrg# so use this general approach.
3386d63fdb69Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
33873da084b3Smrg
3388d63fdb69Smrg# Transform an extracted symbol line into symbol name and symbol address
3389d63fdb69Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3390d63fdb69Smrglt_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'"
33913da084b3Smrg
3392d63fdb69Smrg# Handle CRLF in mingw tool chain
3393d63fdb69Smrgopt_cr=
3394d63fdb69Smrgcase $build_os in
3395d63fdb69Smrgmingw*)
3396d63fdb69Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3397d63fdb69Smrg  ;;
3398d63fdb69Smrgesac
33993da084b3Smrg
3400d63fdb69Smrg# Try without a prefix underscore, then with it.
3401d63fdb69Smrgfor ac_symprfx in "" "_"; do
34023da084b3Smrg
3403d63fdb69Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3404d63fdb69Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
34053da084b3Smrg
3406d63fdb69Smrg  # Write the raw and C identifiers.
3407d63fdb69Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3408d63fdb69Smrg    # Fake it for dumpbin and say T for any non-static function
3409d63fdb69Smrg    # and D for any global variable.
3410d63fdb69Smrg    # Also find C++ and __fastcall symbols from MSVC++,
3411d63fdb69Smrg    # which start with @ or ?.
3412d63fdb69Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3413d63fdb69Smrg"     {last_section=section; section=\$ 3};"\
3414d63fdb69Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3415d63fdb69Smrg"     \$ 0!~/External *\|/{next};"\
3416d63fdb69Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3417d63fdb69Smrg"     {if(hide[section]) next};"\
3418d63fdb69Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3419d63fdb69Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3420d63fdb69Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3421d63fdb69Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3422d63fdb69Smrg"     ' prfx=^$ac_symprfx]"
3423d63fdb69Smrg  else
3424d63fdb69Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3425d63fdb69Smrg  fi
34263da084b3Smrg
3427d63fdb69Smrg  # Check to see that the pipe works correctly.
3428d63fdb69Smrg  pipe_works=no
34293da084b3Smrg
3430d63fdb69Smrg  rm -f conftest*
3431d63fdb69Smrg  cat > conftest.$ac_ext <<_LT_EOF
3432d63fdb69Smrg#ifdef __cplusplus
3433d63fdb69Smrgextern "C" {
3434d63fdb69Smrg#endif
3435d63fdb69Smrgchar nm_test_var;
3436d63fdb69Smrgvoid nm_test_func(void);
3437d63fdb69Smrgvoid nm_test_func(void){}
3438d63fdb69Smrg#ifdef __cplusplus
3439d63fdb69Smrg}
3440d63fdb69Smrg#endif
3441d63fdb69Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
3442d63fdb69Smrg_LT_EOF
34433da084b3Smrg
3444d63fdb69Smrg  if AC_TRY_EVAL(ac_compile); then
3445d63fdb69Smrg    # Now try to grab the symbols.
3446d63fdb69Smrg    nlist=conftest.nm
3447d63fdb69Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3448d63fdb69Smrg      # Try sorting and uniquifying the output.
3449d63fdb69Smrg      if sort "$nlist" | uniq > "$nlist"T; then
3450d63fdb69Smrg	mv -f "$nlist"T "$nlist"
3451d63fdb69Smrg      else
3452d63fdb69Smrg	rm -f "$nlist"T
3453d63fdb69Smrg      fi
34543da084b3Smrg
3455d63fdb69Smrg      # Make sure that we snagged all the symbols we need.
3456d63fdb69Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3457d63fdb69Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3458d63fdb69Smrg	  cat <<_LT_EOF > conftest.$ac_ext
3459d63fdb69Smrg#ifdef __cplusplus
3460d63fdb69Smrgextern "C" {
3461d63fdb69Smrg#endif
34623da084b3Smrg
3463d63fdb69Smrg_LT_EOF
3464d63fdb69Smrg	  # Now generate the symbol file.
3465d63fdb69Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
34663da084b3Smrg
3467d63fdb69Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
34683da084b3Smrg
3469d63fdb69Smrg/* The mapping between symbol names and symbols.  */
3470d63fdb69Smrgconst struct {
3471d63fdb69Smrg  const char *name;
3472d63fdb69Smrg  void       *address;
3473d63fdb69Smrg}
3474d63fdb69Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3475d63fdb69Smrg{
3476d63fdb69Smrg  { "@PROGRAM@", (void *) 0 },
3477d63fdb69Smrg_LT_EOF
3478d63fdb69Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3479d63fdb69Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3480d63fdb69Smrg  {0, (void *) 0}
3481d63fdb69Smrg};
34823da084b3Smrg
3483d63fdb69Smrg/* This works around a problem in FreeBSD linker */
3484d63fdb69Smrg#ifdef FREEBSD_WORKAROUND
3485d63fdb69Smrgstatic const void *lt_preloaded_setup() {
3486d63fdb69Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
3487d63fdb69Smrg}
3488d63fdb69Smrg#endif
34893da084b3Smrg
3490d63fdb69Smrg#ifdef __cplusplus
3491d63fdb69Smrg}
3492d63fdb69Smrg#endif
3493d63fdb69Smrg_LT_EOF
3494d63fdb69Smrg	  # Now try linking the two files.
3495d63fdb69Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
3496d63fdb69Smrg	  lt_save_LIBS="$LIBS"
3497d63fdb69Smrg	  lt_save_CFLAGS="$CFLAGS"
3498d63fdb69Smrg	  LIBS="conftstm.$ac_objext"
3499d63fdb69Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3500d63fdb69Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3501d63fdb69Smrg	    pipe_works=yes
3502d63fdb69Smrg	  fi
3503d63fdb69Smrg	  LIBS="$lt_save_LIBS"
3504d63fdb69Smrg	  CFLAGS="$lt_save_CFLAGS"
3505d63fdb69Smrg	else
3506d63fdb69Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3507d63fdb69Smrg	fi
3508d63fdb69Smrg      else
3509d63fdb69Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3510d63fdb69Smrg      fi
3511d63fdb69Smrg    else
3512d63fdb69Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3513d63fdb69Smrg    fi
3514d63fdb69Smrg  else
3515d63fdb69Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3516d63fdb69Smrg    cat conftest.$ac_ext >&5
3517d63fdb69Smrg  fi
3518d63fdb69Smrg  rm -rf conftest* conftst*
35193da084b3Smrg
3520d63fdb69Smrg  # Do not use the global_symbol_pipe unless it works.
3521d63fdb69Smrg  if test "$pipe_works" = yes; then
3522d63fdb69Smrg    break
3523d63fdb69Smrg  else
3524d63fdb69Smrg    lt_cv_sys_global_symbol_pipe=
3525d63fdb69Smrg  fi
3526d63fdb69Smrgdone
3527d63fdb69Smrg])
3528d63fdb69Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3529d63fdb69Smrg  lt_cv_sys_global_symbol_to_cdecl=
3530d63fdb69Smrgfi
3531d63fdb69Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3532d63fdb69Smrg  AC_MSG_RESULT(failed)
3533d63fdb69Smrgelse
3534d63fdb69Smrg  AC_MSG_RESULT(ok)
3535d63fdb69Smrgfi
35363da084b3Smrg
3537d63fdb69Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3538d63fdb69Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
3539d63fdb69Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3540d63fdb69Smrg    [Transform the output of nm in a proper C declaration])
3541d63fdb69Smrg_LT_DECL([global_symbol_to_c_name_address],
3542d63fdb69Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3543d63fdb69Smrg    [Transform the output of nm in a C name address pair])
3544d63fdb69Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3545d63fdb69Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3546d63fdb69Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3547d63fdb69Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
35483da084b3Smrg
35493da084b3Smrg
3550d63fdb69Smrg# _LT_COMPILER_PIC([TAGNAME])
3551d63fdb69Smrg# ---------------------------
3552d63fdb69Smrgm4_defun([_LT_COMPILER_PIC],
3553d63fdb69Smrg[m4_require([_LT_TAG_COMPILER])dnl
3554d63fdb69Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3555d63fdb69Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3556d63fdb69Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
35573da084b3Smrg
3558d63fdb69SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3559d63fdb69Smrgm4_if([$1], [CXX], [
3560d63fdb69Smrg  # C++ specific cases for pic, static, wl, etc.
3561d63fdb69Smrg  if test "$GXX" = yes; then
3562d63fdb69Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563d63fdb69Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
35643da084b3Smrg
3565d63fdb69Smrg    case $host_os in
3566d63fdb69Smrg    aix*)
3567d63fdb69Smrg      # All AIX code is PIC.
3568d63fdb69Smrg      if test "$host_cpu" = ia64; then
3569d63fdb69Smrg	# AIX 5 now supports IA64 processor
3570d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3571d63fdb69Smrg      fi
3572d63fdb69Smrg      ;;
35733da084b3Smrg
3574d63fdb69Smrg    amigaos*)
3575d63fdb69Smrg      case $host_cpu in
3576d63fdb69Smrg      powerpc)
3577d63fdb69Smrg            # see comment about AmigaOS4 .so support
3578d63fdb69Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3579d63fdb69Smrg        ;;
3580d63fdb69Smrg      m68k)
3581d63fdb69Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
3582d63fdb69Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
3583d63fdb69Smrg            # like `-m68040'.
3584d63fdb69Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3585d63fdb69Smrg        ;;
3586d63fdb69Smrg      esac
3587d63fdb69Smrg      ;;
35883da084b3Smrg
3589d63fdb69Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3590d63fdb69Smrg      # PIC is the default for these OSes.
3591d63fdb69Smrg      ;;
3592d63fdb69Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3593d63fdb69Smrg      # This hack is so that the source file can tell whether it is being
3594d63fdb69Smrg      # built for inclusion in a dll (and should export symbols for example).
3595d63fdb69Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3596d63fdb69Smrg      # (--disable-auto-import) libraries
3597d63fdb69Smrg      m4_if([$1], [GCJ], [],
3598d63fdb69Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3599d63fdb69Smrg      ;;
3600d63fdb69Smrg    darwin* | rhapsody*)
3601d63fdb69Smrg      # PIC is the default on this platform
3602d63fdb69Smrg      # Common symbols not allowed in MH_DYLIB files
3603d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3604d63fdb69Smrg      ;;
3605d63fdb69Smrg    *djgpp*)
3606d63fdb69Smrg      # DJGPP does not support shared libraries at all
3607d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3608d63fdb69Smrg      ;;
3609d63fdb69Smrg    interix[[3-9]]*)
3610d63fdb69Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3611d63fdb69Smrg      # Instead, we relocate shared libraries at runtime.
3612d63fdb69Smrg      ;;
3613d63fdb69Smrg    sysv4*MP*)
3614d63fdb69Smrg      if test -d /usr/nec; then
3615d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3616d63fdb69Smrg      fi
3617d63fdb69Smrg      ;;
3618d63fdb69Smrg    hpux*)
3619d63fdb69Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3620d63fdb69Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3621d63fdb69Smrg      # sets the default TLS model and affects inlining.
3622d63fdb69Smrg      case $host_cpu in
3623d63fdb69Smrg      hppa*64*)
3624d63fdb69Smrg	;;
3625d63fdb69Smrg      *)
3626d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3627d63fdb69Smrg	;;
3628d63fdb69Smrg      esac
3629d63fdb69Smrg      ;;
3630d63fdb69Smrg    *qnx* | *nto*)
3631d63fdb69Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3632d63fdb69Smrg      # it will coredump.
3633d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
36343da084b3Smrg      ;;
36353da084b3Smrg    *)
3636d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
36373da084b3Smrg      ;;
36383da084b3Smrg    esac
3639d63fdb69Smrg  else
3640d63fdb69Smrg    case $host_os in
3641d63fdb69Smrg      aix[[4-9]]*)
3642d63fdb69Smrg	# All AIX code is PIC.
3643d63fdb69Smrg	if test "$host_cpu" = ia64; then
3644d63fdb69Smrg	  # AIX 5 now supports IA64 processor
3645d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3646d63fdb69Smrg	else
3647d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3648d63fdb69Smrg	fi
3649d63fdb69Smrg	;;
3650d63fdb69Smrg      chorus*)
3651d63fdb69Smrg	case $cc_basename in
3652d63fdb69Smrg	cxch68*)
3653d63fdb69Smrg	  # Green Hills C++ Compiler
3654d63fdb69Smrg	  # _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"
3655d63fdb69Smrg	  ;;
3656d63fdb69Smrg	esac
3657d63fdb69Smrg	;;
3658d63fdb69Smrg      dgux*)
3659d63fdb69Smrg	case $cc_basename in
3660d63fdb69Smrg	  ec++*)
3661d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3662d63fdb69Smrg	    ;;
3663d63fdb69Smrg	  ghcx*)
3664d63fdb69Smrg	    # Green Hills C++ Compiler
3665d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3666d63fdb69Smrg	    ;;
3667d63fdb69Smrg	  *)
3668d63fdb69Smrg	    ;;
3669d63fdb69Smrg	esac
3670d63fdb69Smrg	;;
3671d63fdb69Smrg      freebsd* | dragonfly*)
3672d63fdb69Smrg	# FreeBSD uses GNU C++
3673d63fdb69Smrg	;;
3674d63fdb69Smrg      hpux9* | hpux10* | hpux11*)
3675d63fdb69Smrg	case $cc_basename in
3676d63fdb69Smrg	  CC*)
3677d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3679d63fdb69Smrg	    if test "$host_cpu" != ia64; then
3680d63fdb69Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3681d63fdb69Smrg	    fi
3682d63fdb69Smrg	    ;;
3683d63fdb69Smrg	  aCC*)
3684d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3685d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3686d63fdb69Smrg	    case $host_cpu in
3687d63fdb69Smrg	    hppa*64*|ia64*)
3688d63fdb69Smrg	      # +Z the default
3689d63fdb69Smrg	      ;;
3690d63fdb69Smrg	    *)
3691d63fdb69Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3692d63fdb69Smrg	      ;;
3693d63fdb69Smrg	    esac
3694d63fdb69Smrg	    ;;
3695d63fdb69Smrg	  *)
3696d63fdb69Smrg	    ;;
3697d63fdb69Smrg	esac
3698d63fdb69Smrg	;;
3699d63fdb69Smrg      interix*)
3700d63fdb69Smrg	# This is c89, which is MS Visual C++ (no shared libs)
3701d63fdb69Smrg	# Anyone wants to do a port?
3702d63fdb69Smrg	;;
3703d63fdb69Smrg      irix5* | irix6* | nonstopux*)
3704d63fdb69Smrg	case $cc_basename in
3705d63fdb69Smrg	  CC*)
3706d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3708d63fdb69Smrg	    # CC pic flag -KPIC is the default.
3709d63fdb69Smrg	    ;;
3710d63fdb69Smrg	  *)
3711d63fdb69Smrg	    ;;
3712d63fdb69Smrg	esac
3713d63fdb69Smrg	;;
3714d63fdb69Smrg      linux* | k*bsd*-gnu)
3715d63fdb69Smrg	case $cc_basename in
3716d63fdb69Smrg	  KCC*)
3717d63fdb69Smrg	    # KAI C++ Compiler
3718d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3719d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3720d63fdb69Smrg	    ;;
3721d63fdb69Smrg	  ecpc* )
3722d63fdb69Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3723d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3724d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3725d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3726d63fdb69Smrg	    ;;
3727d63fdb69Smrg	  icpc* )
3728d63fdb69Smrg	    # Intel C++, used to be incompatible with GCC.
3729d63fdb69Smrg	    # ICC 10 doesn't accept -KPIC any more.
3730d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3732d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3733d63fdb69Smrg	    ;;
3734d63fdb69Smrg	  pgCC* | pgcpp*)
3735d63fdb69Smrg	    # Portland Group C++ compiler
3736d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3737d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3738d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739d63fdb69Smrg	    ;;
3740d63fdb69Smrg	  cxx*)
3741d63fdb69Smrg	    # Compaq C++
3742d63fdb69Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3743d63fdb69Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3744d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3745d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3746d63fdb69Smrg	    ;;
3747d63fdb69Smrg	  xlc* | xlC*)
3748d63fdb69Smrg	    # IBM XL 8.0 on PPC
3749d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3750d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3751d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3752d63fdb69Smrg	    ;;
3753d63fdb69Smrg	  *)
3754d63fdb69Smrg	    case `$CC -V 2>&1 | sed 5q` in
3755d63fdb69Smrg	    *Sun\ C*)
3756d63fdb69Smrg	      # Sun C++ 5.9
3757d63fdb69Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3758d63fdb69Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759d63fdb69Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3760d63fdb69Smrg	      ;;
3761d63fdb69Smrg	    esac
3762d63fdb69Smrg	    ;;
3763d63fdb69Smrg	esac
3764d63fdb69Smrg	;;
3765d63fdb69Smrg      lynxos*)
3766d63fdb69Smrg	;;
3767d63fdb69Smrg      m88k*)
3768d63fdb69Smrg	;;
3769d63fdb69Smrg      mvs*)
3770d63fdb69Smrg	case $cc_basename in
3771d63fdb69Smrg	  cxx*)
3772d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3773d63fdb69Smrg	    ;;
3774d63fdb69Smrg	  *)
3775d63fdb69Smrg	    ;;
3776d63fdb69Smrg	esac
3777d63fdb69Smrg	;;
3778d63fdb69Smrg      netbsd*)
3779d63fdb69Smrg	;;
3780d63fdb69Smrg      *qnx* | *nto*)
3781d63fdb69Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3782d63fdb69Smrg        # it will coredump.
3783d63fdb69Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3784d63fdb69Smrg        ;;
3785d63fdb69Smrg      osf3* | osf4* | osf5*)
3786d63fdb69Smrg	case $cc_basename in
3787d63fdb69Smrg	  KCC*)
3788d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3789d63fdb69Smrg	    ;;
3790d63fdb69Smrg	  RCC*)
3791d63fdb69Smrg	    # Rational C++ 2.4.1
3792d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3793d63fdb69Smrg	    ;;
3794d63fdb69Smrg	  cxx*)
3795d63fdb69Smrg	    # Digital/Compaq C++
3796d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3797d63fdb69Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3798d63fdb69Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3799d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3800d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3801d63fdb69Smrg	    ;;
3802d63fdb69Smrg	  *)
3803d63fdb69Smrg	    ;;
3804d63fdb69Smrg	esac
3805d63fdb69Smrg	;;
3806d63fdb69Smrg      psos*)
3807d63fdb69Smrg	;;
3808d63fdb69Smrg      solaris*)
3809d63fdb69Smrg	case $cc_basename in
3810d63fdb69Smrg	  CC*)
3811d63fdb69Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
3812d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3813d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3814d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3815d63fdb69Smrg	    ;;
3816d63fdb69Smrg	  gcx*)
3817d63fdb69Smrg	    # Green Hills C++ Compiler
3818d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3819d63fdb69Smrg	    ;;
3820d63fdb69Smrg	  *)
3821d63fdb69Smrg	    ;;
3822d63fdb69Smrg	esac
3823d63fdb69Smrg	;;
3824d63fdb69Smrg      sunos4*)
3825d63fdb69Smrg	case $cc_basename in
3826d63fdb69Smrg	  CC*)
3827d63fdb69Smrg	    # Sun C++ 4.x
3828d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3829d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3830d63fdb69Smrg	    ;;
3831d63fdb69Smrg	  lcc*)
3832d63fdb69Smrg	    # Lucid
3833d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3834d63fdb69Smrg	    ;;
3835d63fdb69Smrg	  *)
3836d63fdb69Smrg	    ;;
3837d63fdb69Smrg	esac
3838d63fdb69Smrg	;;
3839d63fdb69Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3840d63fdb69Smrg	case $cc_basename in
3841d63fdb69Smrg	  CC*)
3842d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3843d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3844d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3845d63fdb69Smrg	    ;;
3846d63fdb69Smrg	esac
3847d63fdb69Smrg	;;
3848d63fdb69Smrg      tandem*)
3849d63fdb69Smrg	case $cc_basename in
3850d63fdb69Smrg	  NCC*)
3851d63fdb69Smrg	    # NonStop-UX NCC 3.20
3852d63fdb69Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853d63fdb69Smrg	    ;;
3854d63fdb69Smrg	  *)
3855d63fdb69Smrg	    ;;
3856d63fdb69Smrg	esac
3857d63fdb69Smrg	;;
3858d63fdb69Smrg      vxworks*)
3859d63fdb69Smrg	;;
3860d63fdb69Smrg      *)
3861d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3862d63fdb69Smrg	;;
3863d63fdb69Smrg    esac
3864d63fdb69Smrg  fi
3865d63fdb69Smrg],
3866d63fdb69Smrg[
3867d63fdb69Smrg  if test "$GCC" = yes; then
3868d63fdb69Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3869d63fdb69Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
38703da084b3Smrg
3871d63fdb69Smrg    case $host_os in
3872d63fdb69Smrg      aix*)
3873d63fdb69Smrg      # All AIX code is PIC.
3874d63fdb69Smrg      if test "$host_cpu" = ia64; then
3875d63fdb69Smrg	# AIX 5 now supports IA64 processor
3876d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3877d63fdb69Smrg      fi
3878d63fdb69Smrg      ;;
38793da084b3Smrg
3880d63fdb69Smrg    amigaos*)
3881d63fdb69Smrg      case $host_cpu in
3882d63fdb69Smrg      powerpc)
3883d63fdb69Smrg            # see comment about AmigaOS4 .so support
3884d63fdb69Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3885d63fdb69Smrg        ;;
3886d63fdb69Smrg      m68k)
3887d63fdb69Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
3888d63fdb69Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
3889d63fdb69Smrg            # like `-m68040'.
3890d63fdb69Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3891d63fdb69Smrg        ;;
3892d63fdb69Smrg      esac
3893d63fdb69Smrg      ;;
38943da084b3Smrg
3895d63fdb69Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3896d63fdb69Smrg      # PIC is the default for these OSes.
3897d63fdb69Smrg      ;;
38983da084b3Smrg
3899d63fdb69Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3900d63fdb69Smrg      # This hack is so that the source file can tell whether it is being
3901d63fdb69Smrg      # built for inclusion in a dll (and should export symbols for example).
3902d63fdb69Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3903d63fdb69Smrg      # (--disable-auto-import) libraries
3904d63fdb69Smrg      m4_if([$1], [GCJ], [],
3905d63fdb69Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3906d63fdb69Smrg      ;;
39073da084b3Smrg
3908d63fdb69Smrg    darwin* | rhapsody*)
3909d63fdb69Smrg      # PIC is the default on this platform
3910d63fdb69Smrg      # Common symbols not allowed in MH_DYLIB files
3911d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3912d63fdb69Smrg      ;;
39133da084b3Smrg
3914d63fdb69Smrg    hpux*)
3915d63fdb69Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3916d63fdb69Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3917d63fdb69Smrg      # sets the default TLS model and affects inlining.
3918d63fdb69Smrg      case $host_cpu in
3919d63fdb69Smrg      hppa*64*)
3920d63fdb69Smrg	# +Z the default
3921d63fdb69Smrg	;;
3922d63fdb69Smrg      *)
3923d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3924d63fdb69Smrg	;;
3925d63fdb69Smrg      esac
3926d63fdb69Smrg      ;;
39273da084b3Smrg
3928d63fdb69Smrg    interix[[3-9]]*)
3929d63fdb69Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3930d63fdb69Smrg      # Instead, we relocate shared libraries at runtime.
3931d63fdb69Smrg      ;;
39323da084b3Smrg
3933d63fdb69Smrg    msdosdjgpp*)
3934d63fdb69Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3935d63fdb69Smrg      # on systems that don't support them.
3936d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3937d63fdb69Smrg      enable_shared=no
3938d63fdb69Smrg      ;;
39393da084b3Smrg
3940d63fdb69Smrg    *nto* | *qnx*)
3941d63fdb69Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3942d63fdb69Smrg      # it will coredump.
3943d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3944d63fdb69Smrg      ;;
39453da084b3Smrg
3946d63fdb69Smrg    sysv4*MP*)
3947d63fdb69Smrg      if test -d /usr/nec; then
3948d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3949d63fdb69Smrg      fi
3950d63fdb69Smrg      ;;
39513da084b3Smrg
3952d63fdb69Smrg    *)
3953d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3954d63fdb69Smrg      ;;
3955d63fdb69Smrg    esac
3956d63fdb69Smrg  else
3957d63fdb69Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
3958d63fdb69Smrg    case $host_os in
3959d63fdb69Smrg    aix*)
3960d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3961d63fdb69Smrg      if test "$host_cpu" = ia64; then
3962d63fdb69Smrg	# AIX 5 now supports IA64 processor
3963d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3964d63fdb69Smrg      else
3965d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3966d63fdb69Smrg      fi
3967d63fdb69Smrg      ;;
39683da084b3Smrg
3969d63fdb69Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3970d63fdb69Smrg      # This hack is so that the source file can tell whether it is being
3971d63fdb69Smrg      # built for inclusion in a dll (and should export symbols for example).
3972d63fdb69Smrg      m4_if([$1], [GCJ], [],
3973d63fdb69Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3974d63fdb69Smrg      ;;
39753da084b3Smrg
3976d63fdb69Smrg    hpux9* | hpux10* | hpux11*)
3977d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3978d63fdb69Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3979d63fdb69Smrg      # not for PA HP-UX.
3980d63fdb69Smrg      case $host_cpu in
3981d63fdb69Smrg      hppa*64*|ia64*)
3982d63fdb69Smrg	# +Z the default
3983d63fdb69Smrg	;;
3984d63fdb69Smrg      *)
3985d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3986d63fdb69Smrg	;;
3987d63fdb69Smrg      esac
3988d63fdb69Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3989d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3990d63fdb69Smrg      ;;
39913da084b3Smrg
3992d63fdb69Smrg    irix5* | irix6* | nonstopux*)
3993d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3994d63fdb69Smrg      # PIC (with -KPIC) is the default.
3995d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3996d63fdb69Smrg      ;;
39973da084b3Smrg
3998d63fdb69Smrg    linux* | k*bsd*-gnu)
3999d63fdb69Smrg      case $cc_basename in
4000d63fdb69Smrg      # old Intel for x86_64 which still supported -KPIC.
4001d63fdb69Smrg      ecc*)
4002d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4004d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4005d63fdb69Smrg        ;;
4006d63fdb69Smrg      # icc used to be incompatible with GCC.
4007d63fdb69Smrg      # ICC 10 doesn't accept -KPIC any more.
4008d63fdb69Smrg      icc* | ifort*)
4009d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4011d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4012d63fdb69Smrg        ;;
4013d63fdb69Smrg      # Lahey Fortran 8.1.
4014d63fdb69Smrg      lf95*)
4015d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4016d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4017d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4018d63fdb69Smrg	;;
4019d63fdb69Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
4020d63fdb69Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4021d63fdb69Smrg	# which looks to be a dead project)
4022d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4023d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4024d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4025d63fdb69Smrg        ;;
4026d63fdb69Smrg      ccc*)
4027d63fdb69Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028d63fdb69Smrg        # All Alpha code is PIC.
4029d63fdb69Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4030d63fdb69Smrg        ;;
4031d63fdb69Smrg      xl*)
4032d63fdb69Smrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4033d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4034d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4035d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4036d63fdb69Smrg	;;
4037d63fdb69Smrg      *)
4038d63fdb69Smrg	case `$CC -V 2>&1 | sed 5q` in
4039d63fdb69Smrg	*Sun\ C*)
4040d63fdb69Smrg	  # Sun C 5.9
4041d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044d63fdb69Smrg	  ;;
4045d63fdb69Smrg	*Sun\ F*)
4046d63fdb69Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4047d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4048d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4049d63fdb69Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4050d63fdb69Smrg	  ;;
4051d63fdb69Smrg	esac
4052d63fdb69Smrg	;;
4053d63fdb69Smrg      esac
4054d63fdb69Smrg      ;;
40553da084b3Smrg
4056d63fdb69Smrg    newsos6)
4057d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4058d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059d63fdb69Smrg      ;;
40603da084b3Smrg
4061d63fdb69Smrg    *nto* | *qnx*)
4062d63fdb69Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4063d63fdb69Smrg      # it will coredump.
4064d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4065d63fdb69Smrg      ;;
40663da084b3Smrg
4067d63fdb69Smrg    osf3* | osf4* | osf5*)
4068d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4069d63fdb69Smrg      # All OSF/1 code is PIC.
4070d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4071d63fdb69Smrg      ;;
40723da084b3Smrg
4073d63fdb69Smrg    rdos*)
4074d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4075d63fdb69Smrg      ;;
40763da084b3Smrg
4077d63fdb69Smrg    solaris*)
4078d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4079d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4080d63fdb69Smrg      case $cc_basename in
4081d63fdb69Smrg      f77* | f90* | f95*)
4082d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4083d63fdb69Smrg      *)
4084d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4085d63fdb69Smrg      esac
4086d63fdb69Smrg      ;;
40873da084b3Smrg
4088d63fdb69Smrg    sunos4*)
4089d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4091d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092d63fdb69Smrg      ;;
40933da084b3Smrg
4094d63fdb69Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4095d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4096d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4097d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098d63fdb69Smrg      ;;
40993da084b3Smrg
4100d63fdb69Smrg    sysv4*MP*)
4101d63fdb69Smrg      if test -d /usr/nec ;then
4102d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4103d63fdb69Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4104d63fdb69Smrg      fi
4105d63fdb69Smrg      ;;
41063da084b3Smrg
4107d63fdb69Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4108d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4110d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4111d63fdb69Smrg      ;;
41123da084b3Smrg
4113d63fdb69Smrg    unicos*)
4114d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4116d63fdb69Smrg      ;;
41173da084b3Smrg
4118d63fdb69Smrg    uts4*)
4119d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4120d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4121d63fdb69Smrg      ;;
41223da084b3Smrg
4123d63fdb69Smrg    *)
4124d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4125d63fdb69Smrg      ;;
4126d63fdb69Smrg    esac
4127d63fdb69Smrg  fi
4128d63fdb69Smrg])
4129d63fdb69Smrgcase $host_os in
4130d63fdb69Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
4131d63fdb69Smrg  *djgpp*)
4132d63fdb69Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4133d63fdb69Smrg    ;;
4134d63fdb69Smrg  *)
4135d63fdb69Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4136d63fdb69Smrg    ;;
4137d63fdb69Smrgesac
4138d63fdb69SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4139d63fdb69Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4140d63fdb69Smrg	[How to pass a linker flag through the compiler])
41413da084b3Smrg
4142d63fdb69Smrg#
4143d63fdb69Smrg# Check to make sure the PIC flag actually works.
4144d63fdb69Smrg#
4145d63fdb69Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4146d63fdb69Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4147d63fdb69Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4148d63fdb69Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4149d63fdb69Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4150d63fdb69Smrg     "" | " "*) ;;
4151d63fdb69Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4152d63fdb69Smrg     esac],
4153d63fdb69Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4154d63fdb69Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4155d63fdb69Smrgfi
4156d63fdb69Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4157d63fdb69Smrg	[Additional compiler flags for building library objects])
41583da084b3Smrg
4159d63fdb69Smrg#
4160d63fdb69Smrg# Check to make sure the static flag actually works.
4161d63fdb69Smrg#
4162d63fdb69Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4163d63fdb69Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4164d63fdb69Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4165d63fdb69Smrg  $lt_tmp_static_flag,
4166d63fdb69Smrg  [],
4167d63fdb69Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4168d63fdb69Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4169d63fdb69Smrg	[Compiler flag to prevent dynamic linking])
4170d63fdb69Smrg])# _LT_COMPILER_PIC
41713da084b3Smrg
41723da084b3Smrg
4173d63fdb69Smrg# _LT_LINKER_SHLIBS([TAGNAME])
4174d63fdb69Smrg# ----------------------------
4175d63fdb69Smrg# See if the linker supports building shared libraries.
4176d63fdb69Smrgm4_defun([_LT_LINKER_SHLIBS],
4177d63fdb69Smrg[AC_REQUIRE([LT_PATH_LD])dnl
4178d63fdb69SmrgAC_REQUIRE([LT_PATH_NM])dnl
4179d63fdb69Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4180d63fdb69Smrgm4_require([_LT_DECL_EGREP])dnl
4181d63fdb69Smrgm4_require([_LT_DECL_SED])dnl
4182d63fdb69Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4183d63fdb69Smrgm4_require([_LT_TAG_COMPILER])dnl
4184d63fdb69SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4185d63fdb69Smrgm4_if([$1], [CXX], [
4186d63fdb69Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4187d63fdb69Smrg  case $host_os in
4188d63fdb69Smrg  aix[[4-9]]*)
4189d63fdb69Smrg    # If we're using GNU nm, then we don't want the "-C" option.
4190d63fdb69Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4191d63fdb69Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4192d63fdb69Smrg      _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'
4193d63fdb69Smrg    else
4194d63fdb69Smrg      _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'
4195d63fdb69Smrg    fi
4196d63fdb69Smrg    ;;
4197d63fdb69Smrg  pw32*)
4198d63fdb69Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4199d63fdb69Smrg  ;;
4200d63fdb69Smrg  cygwin* | mingw* | cegcc*)
4201d63fdb69Smrg    _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'
4202d63fdb69Smrg  ;;
4203d63fdb69Smrg  *)
4204d63fdb69Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4205d63fdb69Smrg  ;;
4206d63fdb69Smrg  esac
4207d63fdb69Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4208d63fdb69Smrg], [
4209d63fdb69Smrg  runpath_var=
4210d63fdb69Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4211d63fdb69Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
4212d63fdb69Smrg  _LT_TAGVAR(archive_cmds, $1)=
4213d63fdb69Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4214d63fdb69Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4215d63fdb69Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4216d63fdb69Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4217d63fdb69Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4218d63fdb69Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4219d63fdb69Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
4220d63fdb69Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4221d63fdb69Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4222d63fdb69Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4223d63fdb69Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4224d63fdb69Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4225d63fdb69Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4226d63fdb69Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
4227d63fdb69Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4228d63fdb69Smrg  _LT_TAGVAR(module_cmds, $1)=
4229d63fdb69Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4230d63fdb69Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4231d63fdb69Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4232d63fdb69Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4233d63fdb69Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4234d63fdb69Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
4235d63fdb69Smrg  # included in the symbol list
4236d63fdb69Smrg  _LT_TAGVAR(include_expsyms, $1)=
4237d63fdb69Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4238d63fdb69Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4239d63fdb69Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4240d63fdb69Smrg  # as well as any symbol that contains `d'.
4241d63fdb69Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4242d63fdb69Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4243d63fdb69Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4244d63fdb69Smrg  # the symbol is explicitly referenced.  Since portable code cannot
4245d63fdb69Smrg  # rely on this symbol name, it's probably fine to never include it in
4246d63fdb69Smrg  # preloaded symbol tables.
4247d63fdb69Smrg  # Exclude shared library initialization/finalization symbols.
4248d63fdb69Smrgdnl Note also adjust exclude_expsyms for C++ above.
4249d63fdb69Smrg  extract_expsyms_cmds=
42503da084b3Smrg
4251d63fdb69Smrg  case $host_os in
4252d63fdb69Smrg  cygwin* | mingw* | pw32* | cegcc*)
4253d63fdb69Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4254d63fdb69Smrg    # When not using gcc, we currently assume that we are using
4255d63fdb69Smrg    # Microsoft Visual C++.
4256d63fdb69Smrg    if test "$GCC" != yes; then
4257d63fdb69Smrg      with_gnu_ld=no
4258d63fdb69Smrg    fi
4259d63fdb69Smrg    ;;
4260d63fdb69Smrg  interix*)
4261d63fdb69Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4262d63fdb69Smrg    with_gnu_ld=yes
4263d63fdb69Smrg    ;;
4264d63fdb69Smrg  openbsd*)
4265d63fdb69Smrg    with_gnu_ld=no
4266d63fdb69Smrg    ;;
4267d63fdb69Smrg  esac
42683da084b3Smrg
4269d63fdb69Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4270d63fdb69Smrg  if test "$with_gnu_ld" = yes; then
4271d63fdb69Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4272d63fdb69Smrg    wlarc='${wl}'
42733da084b3Smrg
4274d63fdb69Smrg    # Set some defaults for GNU ld with shared library support. These
4275d63fdb69Smrg    # are reset later if shared libraries are not supported. Putting them
4276d63fdb69Smrg    # here allows them to be overridden if necessary.
4277d63fdb69Smrg    runpath_var=LD_RUN_PATH
4278d63fdb69Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279d63fdb69Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280d63fdb69Smrg    # ancient GNU ld didn't support --whole-archive et. al.
4281d63fdb69Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282d63fdb69Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283d63fdb69Smrg    else
4284d63fdb69Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285d63fdb69Smrg    fi
4286d63fdb69Smrg    supports_anon_versioning=no
4287d63fdb69Smrg    case `$LD -v 2>&1` in
4288d63fdb69Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4289d63fdb69Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4290d63fdb69Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4291d63fdb69Smrg      *\ 2.11.*) ;; # other 2.11 versions
4292d63fdb69Smrg      *) supports_anon_versioning=yes ;;
4293d63fdb69Smrg    esac
42943da084b3Smrg
4295d63fdb69Smrg    # See if GNU ld supports shared libraries.
4296d63fdb69Smrg    case $host_os in
4297d63fdb69Smrg    aix[[3-9]]*)
4298d63fdb69Smrg      # On AIX/PPC, the GNU linker is very broken
4299d63fdb69Smrg      if test "$host_cpu" != ia64; then
4300d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4301d63fdb69Smrg	cat <<_LT_EOF 1>&2
43023da084b3Smrg
4303d63fdb69Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4304d63fdb69Smrg*** to be unable to reliably create shared libraries on AIX.
4305d63fdb69Smrg*** Therefore, libtool is disabling shared libraries support.  If you
4306d63fdb69Smrg*** really care for shared libraries, you may want to modify your PATH
4307d63fdb69Smrg*** so that a non-GNU linker is found, and then restart.
43083da084b3Smrg
4309d63fdb69Smrg_LT_EOF
4310d63fdb69Smrg      fi
4311d63fdb69Smrg      ;;
43123da084b3Smrg
4313d63fdb69Smrg    amigaos*)
4314d63fdb69Smrg      case $host_cpu in
4315d63fdb69Smrg      powerpc)
4316d63fdb69Smrg            # see comment about AmigaOS4 .so support
4317d63fdb69Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4318d63fdb69Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4319d63fdb69Smrg        ;;
4320d63fdb69Smrg      m68k)
4321d63fdb69Smrg            _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)'
4322d63fdb69Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4323d63fdb69Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4324d63fdb69Smrg        ;;
4325d63fdb69Smrg      esac
4326d63fdb69Smrg      ;;
43273da084b3Smrg
4328d63fdb69Smrg    beos*)
4329d63fdb69Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4330d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4331d63fdb69Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4332d63fdb69Smrg	# support --undefined.  This deserves some investigation.  FIXME
4333d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4334d63fdb69Smrg      else
4335d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4336d63fdb69Smrg      fi
4337d63fdb69Smrg      ;;
43383da084b3Smrg
4339d63fdb69Smrg    cygwin* | mingw* | pw32* | cegcc*)
4340d63fdb69Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4341d63fdb69Smrg      # as there is no search path for DLLs.
4342d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4343d63fdb69Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4344d63fdb69Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
4345d63fdb69Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4346d63fdb69Smrg      _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'
4347d63fdb69Smrg
4348d63fdb69Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4349d63fdb69Smrg        _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'
4350d63fdb69Smrg	# If the export-symbols file already is a .def file (1st line
4351d63fdb69Smrg	# is EXPORTS), use it as is; otherwise, prepend...
4352d63fdb69Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4353d63fdb69Smrg	  cp $export_symbols $output_objdir/$soname.def;
4354d63fdb69Smrg	else
4355d63fdb69Smrg	  echo EXPORTS > $output_objdir/$soname.def;
4356d63fdb69Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
4357d63fdb69Smrg	fi~
4358d63fdb69Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4359d63fdb69Smrg      else
4360d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4361d63fdb69Smrg      fi
4362d63fdb69Smrg      ;;
43633da084b3Smrg
4364d63fdb69Smrg    interix[[3-9]]*)
4365d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
4366d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4367d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4368d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369d63fdb69Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4370d63fdb69Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4371d63fdb69Smrg      # default) and relocated if they conflict, which is a slow very memory
4372d63fdb69Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4373d63fdb69Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4374d63fdb69Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4375d63fdb69Smrg      _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'
4376d63fdb69Smrg      _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'
4377d63fdb69Smrg      ;;
43783da084b3Smrg
4379d63fdb69Smrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4380d63fdb69Smrg      tmp_diet=no
4381d63fdb69Smrg      if test "$host_os" = linux-dietlibc; then
4382d63fdb69Smrg	case $cc_basename in
4383d63fdb69Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4384d63fdb69Smrg	esac
4385d63fdb69Smrg      fi
4386d63fdb69Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4387d63fdb69Smrg	 && test "$tmp_diet" = no
4388d63fdb69Smrg      then
4389d63fdb69Smrg	tmp_addflag=
4390d63fdb69Smrg	tmp_sharedflag='-shared'
4391d63fdb69Smrg	case $cc_basename,$host_cpu in
4392d63fdb69Smrg        pgcc*)				# Portland Group C compiler
4393d63fdb69Smrg	  _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'
4394d63fdb69Smrg	  tmp_addflag=' $pic_flag'
4395d63fdb69Smrg	  ;;
4396d63fdb69Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4397d63fdb69Smrg	  _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'
4398d63fdb69Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4399d63fdb69Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4400d63fdb69Smrg	  tmp_addflag=' -i_dynamic' ;;
4401d63fdb69Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4402d63fdb69Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4403d63fdb69Smrg	ifc* | ifort*)			# Intel Fortran compiler
4404d63fdb69Smrg	  tmp_addflag=' -nofor_main' ;;
4405d63fdb69Smrg	lf95*)				# Lahey Fortran 8.1
4406d63fdb69Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4407d63fdb69Smrg	  tmp_sharedflag='--shared' ;;
4408d63fdb69Smrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4409d63fdb69Smrg	  tmp_sharedflag='-qmkshrobj'
4410d63fdb69Smrg	  tmp_addflag= ;;
4411d63fdb69Smrg	esac
4412d63fdb69Smrg	case `$CC -V 2>&1 | sed 5q` in
4413d63fdb69Smrg	*Sun\ C*)			# Sun C 5.9
4414d63fdb69Smrg	  _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'
4415d63fdb69Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4416d63fdb69Smrg	  tmp_sharedflag='-G' ;;
4417d63fdb69Smrg	*Sun\ F*)			# Sun Fortran 8.3
4418d63fdb69Smrg	  tmp_sharedflag='-G' ;;
4419d63fdb69Smrg	esac
4420d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44213da084b3Smrg
4422d63fdb69Smrg        if test "x$supports_anon_versioning" = xyes; then
4423d63fdb69Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4424d63fdb69Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4425d63fdb69Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4426d63fdb69Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4427d63fdb69Smrg        fi
44283da084b3Smrg
4429d63fdb69Smrg	case $cc_basename in
4430d63fdb69Smrg	xlf*)
4431d63fdb69Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4432d63fdb69Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4433d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4434d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4435d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4436d63fdb69Smrg	  if test "x$supports_anon_versioning" = xyes; then
4437d63fdb69Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4438d63fdb69Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4439d63fdb69Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4440d63fdb69Smrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4441d63fdb69Smrg	  fi
4442d63fdb69Smrg	  ;;
4443d63fdb69Smrg	esac
4444d63fdb69Smrg      else
4445d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
4446d63fdb69Smrg      fi
4447d63fdb69Smrg      ;;
44483da084b3Smrg
4449d63fdb69Smrg    netbsd*)
4450d63fdb69Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4451d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4452d63fdb69Smrg	wlarc=
4453d63fdb69Smrg      else
4454d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455d63fdb69Smrg	_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'
4456d63fdb69Smrg      fi
4457d63fdb69Smrg      ;;
44583da084b3Smrg
4459d63fdb69Smrg    solaris*)
4460d63fdb69Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4461d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4462d63fdb69Smrg	cat <<_LT_EOF 1>&2
44633da084b3Smrg
4464d63fdb69Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4465d63fdb69Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
4466d63fdb69Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4467d63fdb69Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4468d63fdb69Smrg*** your PATH or compiler configuration so that the native linker is
4469d63fdb69Smrg*** used, and then restart.
44703da084b3Smrg
4471d63fdb69Smrg_LT_EOF
4472d63fdb69Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4473d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474d63fdb69Smrg	_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'
4475d63fdb69Smrg      else
4476d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4477d63fdb69Smrg      fi
4478d63fdb69Smrg      ;;
44793da084b3Smrg
4480d63fdb69Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4481d63fdb69Smrg      case `$LD -v 2>&1` in
4482d63fdb69Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4483d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4484d63fdb69Smrg	cat <<_LT_EOF 1>&2
44853da084b3Smrg
4486d63fdb69Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4487d63fdb69Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4488d63fdb69Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4489d63fdb69Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4490d63fdb69Smrg*** your PATH or compiler configuration so that the native linker is
4491d63fdb69Smrg*** used, and then restart.
44923da084b3Smrg
4493d63fdb69Smrg_LT_EOF
4494d63fdb69Smrg	;;
4495d63fdb69Smrg	*)
4496d63fdb69Smrg	  # For security reasons, it is highly recommended that you always
4497d63fdb69Smrg	  # use absolute paths for naming shared libraries, and exclude the
4498d63fdb69Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4499d63fdb69Smrg	  # requires that you compile everything twice, which is a pain.
4500d63fdb69Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4502d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4503d63fdb69Smrg	    _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'
4504d63fdb69Smrg	  else
4505d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4506d63fdb69Smrg	  fi
4507d63fdb69Smrg	;;
4508d63fdb69Smrg      esac
4509d63fdb69Smrg      ;;
45103da084b3Smrg
4511d63fdb69Smrg    sunos4*)
4512d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4513d63fdb69Smrg      wlarc=
4514d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4515d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4516d63fdb69Smrg      ;;
45173da084b3Smrg
4518d63fdb69Smrg    *)
4519d63fdb69Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4520d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521d63fdb69Smrg	_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'
4522d63fdb69Smrg      else
4523d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4524d63fdb69Smrg      fi
4525d63fdb69Smrg      ;;
4526d63fdb69Smrg    esac
45273da084b3Smrg
4528d63fdb69Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4529d63fdb69Smrg      runpath_var=
4530d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4531d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4532d63fdb69Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4533d63fdb69Smrg    fi
4534d63fdb69Smrg  else
4535d63fdb69Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
4536d63fdb69Smrg    case $host_os in
4537d63fdb69Smrg    aix3*)
4538d63fdb69Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4539d63fdb69Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4540d63fdb69Smrg      _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'
4541d63fdb69Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
4542d63fdb69Smrg      # are no directories specified by -L.
4543d63fdb69Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4544d63fdb69Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4545d63fdb69Smrg	# Neither direct hardcoding nor static linking is supported with a
4546d63fdb69Smrg	# broken collect2.
4547d63fdb69Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4548d63fdb69Smrg      fi
4549d63fdb69Smrg      ;;
45503da084b3Smrg
4551d63fdb69Smrg    aix[[4-9]]*)
4552d63fdb69Smrg      if test "$host_cpu" = ia64; then
4553d63fdb69Smrg	# On IA64, the linker does run time linking by default, so we don't
4554d63fdb69Smrg	# have to do anything special.
4555d63fdb69Smrg	aix_use_runtimelinking=no
4556d63fdb69Smrg	exp_sym_flag='-Bexport'
4557d63fdb69Smrg	no_entry_flag=""
4558d63fdb69Smrg      else
4559d63fdb69Smrg	# If we're using GNU nm, then we don't want the "-C" option.
4560d63fdb69Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4561d63fdb69Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562d63fdb69Smrg	  _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'
4563d63fdb69Smrg	else
4564d63fdb69Smrg	  _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'
4565d63fdb69Smrg	fi
4566d63fdb69Smrg	aix_use_runtimelinking=no
45673da084b3Smrg
4568d63fdb69Smrg	# Test if we are trying to use run time linking or normal
4569d63fdb69Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4570d63fdb69Smrg	# need to do runtime linking.
4571d63fdb69Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4572d63fdb69Smrg	  for ld_flag in $LDFLAGS; do
4573d63fdb69Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4574d63fdb69Smrg	    aix_use_runtimelinking=yes
4575d63fdb69Smrg	    break
4576d63fdb69Smrg	  fi
4577d63fdb69Smrg	  done
4578d63fdb69Smrg	  ;;
4579d63fdb69Smrg	esac
45803da084b3Smrg
4581d63fdb69Smrg	exp_sym_flag='-bexport'
4582d63fdb69Smrg	no_entry_flag='-bnoentry'
4583d63fdb69Smrg      fi
45843da084b3Smrg
4585d63fdb69Smrg      # When large executables or shared objects are built, AIX ld can
4586d63fdb69Smrg      # have problems creating the table of contents.  If linking a library
4587d63fdb69Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
4588d63fdb69Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4589d63fdb69Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
45903da084b3Smrg
4591d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)=''
4592d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4593d63fdb69Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4594d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4595d63fdb69Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4596d63fdb69Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
45973da084b3Smrg
4598d63fdb69Smrg      if test "$GCC" = yes; then
4599d63fdb69Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4600d63fdb69Smrg	# We only want to do this on AIX 4.2 and lower, the check
4601d63fdb69Smrg	# below for broken collect2 doesn't work under 4.3+
4602d63fdb69Smrg	  collect2name=`${CC} -print-prog-name=collect2`
4603d63fdb69Smrg	  if test -f "$collect2name" &&
4604d63fdb69Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4605d63fdb69Smrg	  then
4606d63fdb69Smrg	  # We have reworked collect2
4607d63fdb69Smrg	  :
4608d63fdb69Smrg	  else
4609d63fdb69Smrg	  # We have old collect2
4610d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4611d63fdb69Smrg	  # It fails to find uninstalled libraries when the uninstalled
4612d63fdb69Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4613d63fdb69Smrg	  # to unsupported forces relinking
4614d63fdb69Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4615d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4616d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617d63fdb69Smrg	  fi
4618d63fdb69Smrg	  ;;
4619d63fdb69Smrg	esac
4620d63fdb69Smrg	shared_flag='-shared'
4621d63fdb69Smrg	if test "$aix_use_runtimelinking" = yes; then
4622d63fdb69Smrg	  shared_flag="$shared_flag "'${wl}-G'
4623d63fdb69Smrg	fi
4624d63fdb69Smrg      else
4625d63fdb69Smrg	# not using gcc
4626d63fdb69Smrg	if test "$host_cpu" = ia64; then
4627d63fdb69Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4628d63fdb69Smrg	# chokes on -Wl,-G. The following line is correct:
4629d63fdb69Smrg	  shared_flag='-G'
4630d63fdb69Smrg	else
4631d63fdb69Smrg	  if test "$aix_use_runtimelinking" = yes; then
4632d63fdb69Smrg	    shared_flag='${wl}-G'
4633d63fdb69Smrg	  else
4634d63fdb69Smrg	    shared_flag='${wl}-bM:SRE'
4635d63fdb69Smrg	  fi
4636d63fdb69Smrg	fi
4637d63fdb69Smrg      fi
46383da084b3Smrg
4639d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4640d63fdb69Smrg      # It seems that -bexpall does not export symbols beginning with
4641d63fdb69Smrg      # underscore (_), so it is better to generate a list of symbols to export.
4642d63fdb69Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4643d63fdb69Smrg      if test "$aix_use_runtimelinking" = yes; then
4644d63fdb69Smrg	# Warning - without using the other runtime loading flags (-brtl),
4645d63fdb69Smrg	# -berok will link without error, but may produce a broken library.
4646d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4647d63fdb69Smrg        # Determine the default libpath from the value encoded in an
4648d63fdb69Smrg        # empty executable.
4649d63fdb69Smrg        _LT_SYS_MODULE_PATH_AIX
4650d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4651d63fdb69Smrg        _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"
4652d63fdb69Smrg      else
4653d63fdb69Smrg	if test "$host_cpu" = ia64; then
4654d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4655d63fdb69Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4656d63fdb69Smrg	  _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"
4657d63fdb69Smrg	else
4658d63fdb69Smrg	 # Determine the default libpath from the value encoded in an
4659d63fdb69Smrg	 # empty executable.
4660d63fdb69Smrg	 _LT_SYS_MODULE_PATH_AIX
4661d63fdb69Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4662d63fdb69Smrg	  # Warning - without using the other run time loading flags,
4663d63fdb69Smrg	  # -berok will link without error, but may produce a broken library.
4664d63fdb69Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4665d63fdb69Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4666d63fdb69Smrg	  # Exported symbols can be pulled into shared objects from archives
4667d63fdb69Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4668d63fdb69Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4669d63fdb69Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
4670d63fdb69Smrg	  _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'
4671d63fdb69Smrg	fi
4672d63fdb69Smrg      fi
4673d63fdb69Smrg      ;;
46743da084b3Smrg
4675d63fdb69Smrg    amigaos*)
4676d63fdb69Smrg      case $host_cpu in
4677d63fdb69Smrg      powerpc)
4678d63fdb69Smrg            # see comment about AmigaOS4 .so support
4679d63fdb69Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4680d63fdb69Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4681d63fdb69Smrg        ;;
4682d63fdb69Smrg      m68k)
4683d63fdb69Smrg            _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)'
4684d63fdb69Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4685d63fdb69Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4686d63fdb69Smrg        ;;
4687d63fdb69Smrg      esac
4688d63fdb69Smrg      ;;
46893da084b3Smrg
4690d63fdb69Smrg    bsdi[[45]]*)
4691d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4692d63fdb69Smrg      ;;
46933da084b3Smrg
4694d63fdb69Smrg    cygwin* | mingw* | pw32* | cegcc*)
4695d63fdb69Smrg      # When not using gcc, we currently assume that we are using
4696d63fdb69Smrg      # Microsoft Visual C++.
4697d63fdb69Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4698d63fdb69Smrg      # no search path for DLLs.
4699d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4700d63fdb69Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4701d63fdb69Smrg      # Tell ltmain to make .lib files, not .a files.
4702d63fdb69Smrg      libext=lib
4703d63fdb69Smrg      # Tell ltmain to make .dll files, not .so files.
4704d63fdb69Smrg      shrext_cmds=".dll"
4705d63fdb69Smrg      # FIXME: Setting linknames here is a bad hack.
4706d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4707d63fdb69Smrg      # The linker will automatically build a .lib file if we build a DLL.
4708d63fdb69Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4709d63fdb69Smrg      # FIXME: Should let the user specify the lib program.
4710d63fdb69Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4711d63fdb69Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4712d63fdb69Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4713d63fdb69Smrg      ;;
47143da084b3Smrg
4715d63fdb69Smrg    darwin* | rhapsody*)
4716d63fdb69Smrg      _LT_DARWIN_LINKER_FEATURES($1)
4717d63fdb69Smrg      ;;
47183da084b3Smrg
4719d63fdb69Smrg    dgux*)
4720d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4721d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4723d63fdb69Smrg      ;;
47243da084b3Smrg
4725d63fdb69Smrg    freebsd1*)
4726d63fdb69Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
4727d63fdb69Smrg      ;;
47283da084b3Smrg
4729d63fdb69Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4730d63fdb69Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4731d63fdb69Smrg    # does not break anything, and helps significantly (at the cost of a little
4732d63fdb69Smrg    # extra space).
4733d63fdb69Smrg    freebsd2.2*)
4734d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4735d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4736d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4737d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4738d63fdb69Smrg      ;;
47393da084b3Smrg
4740d63fdb69Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4741d63fdb69Smrg    freebsd2*)
4742d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4743d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4744d63fdb69Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4746d63fdb69Smrg      ;;
47473da084b3Smrg
4748d63fdb69Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4749d63fdb69Smrg    freebsd* | dragonfly*)
4750d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4751d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4753d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754d63fdb69Smrg      ;;
47553da084b3Smrg
4756d63fdb69Smrg    hpux9*)
4757d63fdb69Smrg      if test "$GCC" = yes; then
4758d63fdb69Smrg	_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'
4759d63fdb69Smrg      else
4760d63fdb69Smrg	_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'
4761d63fdb69Smrg      fi
4762d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4763d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4764d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
47653da084b3Smrg
4766d63fdb69Smrg      # hardcode_minus_L: Not really in the search PATH,
4767d63fdb69Smrg      # but as the default location of the library.
4768d63fdb69Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4769d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4770d63fdb69Smrg      ;;
47713da084b3Smrg
4772d63fdb69Smrg    hpux10*)
4773d63fdb69Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4774d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4775d63fdb69Smrg      else
4776d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4777d63fdb69Smrg      fi
4778d63fdb69Smrg      if test "$with_gnu_ld" = no; then
4779d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4780d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4781d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4782d63fdb69Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4783d63fdb69Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4784d63fdb69Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4785d63fdb69Smrg	# hardcode_minus_L: Not really in the search PATH,
4786d63fdb69Smrg	# but as the default location of the library.
4787d63fdb69Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4788d63fdb69Smrg      fi
4789d63fdb69Smrg      ;;
47903da084b3Smrg
4791d63fdb69Smrg    hpux11*)
4792d63fdb69Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4793d63fdb69Smrg	case $host_cpu in
4794d63fdb69Smrg	hppa*64*)
4795d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4796d63fdb69Smrg	  ;;
4797d63fdb69Smrg	ia64*)
4798d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4799d63fdb69Smrg	  ;;
4800d63fdb69Smrg	*)
4801d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4802d63fdb69Smrg	  ;;
4803d63fdb69Smrg	esac
4804d63fdb69Smrg      else
4805d63fdb69Smrg	case $host_cpu in
4806d63fdb69Smrg	hppa*64*)
4807d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4808d63fdb69Smrg	  ;;
4809d63fdb69Smrg	ia64*)
4810d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4811d63fdb69Smrg	  ;;
4812d63fdb69Smrg	*)
4813d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4814d63fdb69Smrg	  ;;
4815d63fdb69Smrg	esac
4816d63fdb69Smrg      fi
4817d63fdb69Smrg      if test "$with_gnu_ld" = no; then
4818d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4819d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
48203da084b3Smrg
4821d63fdb69Smrg	case $host_cpu in
4822d63fdb69Smrg	hppa*64*|ia64*)
4823d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4824d63fdb69Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4825d63fdb69Smrg	  ;;
4826d63fdb69Smrg	*)
4827d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4828d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4829d63fdb69Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48303da084b3Smrg
4831d63fdb69Smrg	  # hardcode_minus_L: Not really in the search PATH,
4832d63fdb69Smrg	  # but as the default location of the library.
4833d63fdb69Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4834d63fdb69Smrg	  ;;
4835d63fdb69Smrg	esac
4836d63fdb69Smrg      fi
4837d63fdb69Smrg      ;;
48383da084b3Smrg
4839d63fdb69Smrg    irix5* | irix6* | nonstopux*)
4840d63fdb69Smrg      if test "$GCC" = yes; then
4841d63fdb69Smrg	_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'
4842d63fdb69Smrg	# Try to use the -exported_symbol ld option, if it does not
4843d63fdb69Smrg	# work, assume that -exports_file does not work either and
4844d63fdb69Smrg	# implicitly export all symbols.
4845d63fdb69Smrg        save_LDFLAGS="$LDFLAGS"
4846d63fdb69Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4847d63fdb69Smrg        AC_LINK_IFELSE(int foo(void) {},
4848d63fdb69Smrg          _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'
4849d63fdb69Smrg        )
4850d63fdb69Smrg        LDFLAGS="$save_LDFLAGS"
4851d63fdb69Smrg      else
4852d63fdb69Smrg	_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'
4853d63fdb69Smrg	_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'
4854d63fdb69Smrg      fi
4855d63fdb69Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4856d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4857d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4858d63fdb69Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4859d63fdb69Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4860d63fdb69Smrg      ;;
48613da084b3Smrg
4862d63fdb69Smrg    netbsd*)
4863d63fdb69Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4864d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4865d63fdb69Smrg      else
4866d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4867d63fdb69Smrg      fi
4868d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4869d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4870d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871d63fdb69Smrg      ;;
48723da084b3Smrg
4873d63fdb69Smrg    newsos6)
4874d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4875d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4876d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4877d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4878d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4879d63fdb69Smrg      ;;
48803da084b3Smrg
4881d63fdb69Smrg    *nto* | *qnx*)
4882d63fdb69Smrg      ;;
48833da084b3Smrg
4884d63fdb69Smrg    openbsd*)
4885d63fdb69Smrg      if test -f /usr/libexec/ld.so; then
4886d63fdb69Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4887d63fdb69Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4888d63fdb69Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4889d63fdb69Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4890d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4891d63fdb69Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4892d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4893d63fdb69Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4894d63fdb69Smrg	else
4895d63fdb69Smrg	  case $host_os in
4896d63fdb69Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4897d63fdb69Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4898d63fdb69Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4899d63fdb69Smrg	     ;;
4900d63fdb69Smrg	   *)
4901d63fdb69Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4902d63fdb69Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4903d63fdb69Smrg	     ;;
4904d63fdb69Smrg	  esac
4905d63fdb69Smrg	fi
4906d63fdb69Smrg      else
4907d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4908d63fdb69Smrg      fi
4909d63fdb69Smrg      ;;
49103da084b3Smrg
4911d63fdb69Smrg    os2*)
4912d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4913d63fdb69Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4914d63fdb69Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4915d63fdb69Smrg      _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'
4916d63fdb69Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4917d63fdb69Smrg      ;;
49183da084b3Smrg
4919d63fdb69Smrg    osf3*)
4920d63fdb69Smrg      if test "$GCC" = yes; then
4921d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4922d63fdb69Smrg	_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'
4923d63fdb69Smrg      else
4924d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4925d63fdb69Smrg	_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'
4926d63fdb69Smrg      fi
4927d63fdb69Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4928d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4929d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4930d63fdb69Smrg      ;;
49313da084b3Smrg
4932d63fdb69Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4933d63fdb69Smrg      if test "$GCC" = yes; then
4934d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4935d63fdb69Smrg	_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'
4936d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4937d63fdb69Smrg      else
4938d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4939d63fdb69Smrg	_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'
4940d63fdb69Smrg	_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~
4941d63fdb69Smrg	$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'
49423da084b3Smrg
4943d63fdb69Smrg	# Both c and cxx compiler support -rpath directly
4944d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4945d63fdb69Smrg      fi
4946d63fdb69Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4947d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4948d63fdb69Smrg      ;;
49493da084b3Smrg
4950d63fdb69Smrg    solaris*)
4951d63fdb69Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4952d63fdb69Smrg      if test "$GCC" = yes; then
4953d63fdb69Smrg	wlarc='${wl}'
4954d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4955d63fdb69Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4956d63fdb69Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4957d63fdb69Smrg      else
4958d63fdb69Smrg	case `$CC -V 2>&1` in
4959d63fdb69Smrg	*"Compilers 5.0"*)
4960d63fdb69Smrg	  wlarc=''
4961d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4962d63fdb69Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4963d63fdb69Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4964d63fdb69Smrg	  ;;
4965d63fdb69Smrg	*)
4966d63fdb69Smrg	  wlarc='${wl}'
4967d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4968d63fdb69Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4969d63fdb69Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4970d63fdb69Smrg	  ;;
4971d63fdb69Smrg	esac
4972d63fdb69Smrg      fi
4973d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4974d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4975d63fdb69Smrg      case $host_os in
4976d63fdb69Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4977d63fdb69Smrg      *)
4978d63fdb69Smrg	# The compiler driver will combine and reorder linker options,
4979d63fdb69Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4980d63fdb69Smrg	# but is careful enough not to reorder.
4981d63fdb69Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4982d63fdb69Smrg	if test "$GCC" = yes; then
4983d63fdb69Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4984d63fdb69Smrg	else
4985d63fdb69Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4986d63fdb69Smrg	fi
4987d63fdb69Smrg	;;
4988d63fdb69Smrg      esac
4989d63fdb69Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4990d63fdb69Smrg      ;;
49913da084b3Smrg
4992d63fdb69Smrg    sunos4*)
4993d63fdb69Smrg      if test "x$host_vendor" = xsequent; then
4994d63fdb69Smrg	# Use $CC to link under sequent, because it throws in some extra .o
4995d63fdb69Smrg	# files that make .init and .fini sections work.
4996d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4997d63fdb69Smrg      else
4998d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4999d63fdb69Smrg      fi
5000d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5001d63fdb69Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5002d63fdb69Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5003d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5004d63fdb69Smrg      ;;
50053da084b3Smrg
5006d63fdb69Smrg    sysv4)
5007d63fdb69Smrg      case $host_vendor in
5008d63fdb69Smrg	sni)
5009d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5010d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5011d63fdb69Smrg	;;
5012d63fdb69Smrg	siemens)
5013d63fdb69Smrg	  ## LD is ld it makes a PLAMLIB
5014d63fdb69Smrg	  ## CC just makes a GrossModule.
5015d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5016d63fdb69Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5017d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5018d63fdb69Smrg        ;;
5019d63fdb69Smrg	motorola)
5020d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5021d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5022d63fdb69Smrg	;;
5023d63fdb69Smrg      esac
5024d63fdb69Smrg      runpath_var='LD_RUN_PATH'
5025d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5026d63fdb69Smrg      ;;
50273da084b3Smrg
5028d63fdb69Smrg    sysv4.3*)
5029d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5030d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5031d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5032d63fdb69Smrg      ;;
50333da084b3Smrg
5034d63fdb69Smrg    sysv4*MP*)
5035d63fdb69Smrg      if test -d /usr/nec; then
5036d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037d63fdb69Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5038d63fdb69Smrg	runpath_var=LD_RUN_PATH
5039d63fdb69Smrg	hardcode_runpath_var=yes
5040d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5041d63fdb69Smrg      fi
5042d63fdb69Smrg      ;;
50433da084b3Smrg
5044d63fdb69Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5045d63fdb69Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5046d63fdb69Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5047d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5048d63fdb69Smrg      runpath_var='LD_RUN_PATH'
50493da084b3Smrg
5050d63fdb69Smrg      if test "$GCC" = yes; then
5051d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5052d63fdb69Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5053d63fdb69Smrg      else
5054d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055d63fdb69Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5056d63fdb69Smrg      fi
5057d63fdb69Smrg      ;;
50583da084b3Smrg
5059d63fdb69Smrg    sysv5* | sco3.2v5* | sco5v6*)
5060d63fdb69Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
5061d63fdb69Smrg      # link with -lc, and that would cause any symbols used from libc to
5062d63fdb69Smrg      # always be unresolved, which means just about no library would
5063d63fdb69Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
5064d63fdb69Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
5065d63fdb69Smrg      # as -z defs.
5066d63fdb69Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5067d63fdb69Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5068d63fdb69Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5069d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5070d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5071d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5072d63fdb69Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5073d63fdb69Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5074d63fdb69Smrg      runpath_var='LD_RUN_PATH'
50753da084b3Smrg
5076d63fdb69Smrg      if test "$GCC" = yes; then
5077d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5078d63fdb69Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5079d63fdb69Smrg      else
5080d63fdb69Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081d63fdb69Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5082d63fdb69Smrg      fi
5083d63fdb69Smrg      ;;
50843da084b3Smrg
5085d63fdb69Smrg    uts4*)
5086d63fdb69Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5087d63fdb69Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5088d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5089d63fdb69Smrg      ;;
5090d63fdb69Smrg
5091d63fdb69Smrg    *)
5092d63fdb69Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
5093d63fdb69Smrg      ;;
5094d63fdb69Smrg    esac
5095d63fdb69Smrg
5096d63fdb69Smrg    if test x$host_vendor = xsni; then
5097d63fdb69Smrg      case $host in
5098d63fdb69Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5099d63fdb69Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5100d63fdb69Smrg	;;
5101d63fdb69Smrg      esac
5102d63fdb69Smrg    fi
51033da084b3Smrg  fi
5104d63fdb69Smrg])
5105d63fdb69SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5106d63fdb69Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5107d63fdb69Smrg
5108d63fdb69Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5109d63fdb69Smrg
5110d63fdb69Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5111d63fdb69Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5112d63fdb69Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
5113d63fdb69Smrg    [The commands to extract the exported symbol list from a shared archive])
5114d63fdb69Smrg
5115d63fdb69Smrg#
5116d63fdb69Smrg# Do we need to explicitly link libc?
5117d63fdb69Smrg#
5118d63fdb69Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5119d63fdb69Smrgx|xyes)
5120d63fdb69Smrg  # Assume -lc should be added
5121d63fdb69Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5122d63fdb69Smrg
5123d63fdb69Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5124d63fdb69Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
5125d63fdb69Smrg    *'~'*)
5126d63fdb69Smrg      # FIXME: we may have to deal with multi-command sequences.
5127d63fdb69Smrg      ;;
5128d63fdb69Smrg    '$CC '*)
5129d63fdb69Smrg      # Test whether the compiler implicitly links with -lc since on some
5130d63fdb69Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5131d63fdb69Smrg      # to ld, don't add -lc before -lgcc.
5132d63fdb69Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5133d63fdb69Smrg      $RM conftest*
5134d63fdb69Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5135d63fdb69Smrg
5136d63fdb69Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5137d63fdb69Smrg        soname=conftest
5138d63fdb69Smrg        lib=conftest
5139d63fdb69Smrg        libobjs=conftest.$ac_objext
5140d63fdb69Smrg        deplibs=
5141d63fdb69Smrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5142d63fdb69Smrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5143d63fdb69Smrg        compiler_flags=-v
5144d63fdb69Smrg        linker_flags=-v
5145d63fdb69Smrg        verstring=
5146d63fdb69Smrg        output_objdir=.
5147d63fdb69Smrg        libname=conftest
5148d63fdb69Smrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5149d63fdb69Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5150d63fdb69Smrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5151d63fdb69Smrg        then
5152d63fdb69Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5153d63fdb69Smrg        else
5154d63fdb69Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5155d63fdb69Smrg        fi
5156d63fdb69Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5157d63fdb69Smrg      else
5158d63fdb69Smrg        cat conftest.err 1>&5
5159d63fdb69Smrg      fi
5160d63fdb69Smrg      $RM conftest*
5161d63fdb69Smrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5162d63fdb69Smrg      ;;
5163d63fdb69Smrg    esac
51643da084b3Smrg  fi
51653da084b3Smrg  ;;
51663da084b3Smrgesac
51673da084b3Smrg
5168d63fdb69Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5169d63fdb69Smrg    [Whether or not to add -lc for building shared libraries])
5170d63fdb69Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5171d63fdb69Smrg    [enable_shared_with_static_runtimes], [0],
5172d63fdb69Smrg    [Whether or not to disallow shared libs when runtime libs are static])
5173d63fdb69Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5174d63fdb69Smrg    [Compiler flag to allow reflexive dlopens])
5175d63fdb69Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5176d63fdb69Smrg    [Compiler flag to generate shared objects directly from archives])
5177d63fdb69Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
5178d63fdb69Smrg    [Whether the compiler copes with passing no objects directly])
5179d63fdb69Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5180d63fdb69Smrg    [Create an old-style archive from a shared archive])
5181d63fdb69Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5182d63fdb69Smrg    [Create a temporary old-style archive to link instead of a shared archive])
5183d63fdb69Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5184d63fdb69Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5185d63fdb69Smrg_LT_TAGDECL([], [module_cmds], [2],
5186d63fdb69Smrg    [Commands used to build a loadable module if different from building
5187d63fdb69Smrg    a shared archive.])
5188d63fdb69Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5189d63fdb69Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
5190d63fdb69Smrg    [Whether we are building with GNU ld or not])
5191d63fdb69Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5192d63fdb69Smrg    [Flag that allows shared libraries with undefined symbols to be built])
5193d63fdb69Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
5194d63fdb69Smrg    [Flag that enforces no undefined symbols])
5195d63fdb69Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5196d63fdb69Smrg    [Flag to hardcode $libdir into a binary during linking.
5197d63fdb69Smrg    This must work even if $libdir does not exist])
5198d63fdb69Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5199d63fdb69Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5200d63fdb69Smrg    during linking.  This must work even if $libdir does not exist]])
5201d63fdb69Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5202d63fdb69Smrg    [Whether we need a single "-rpath" flag with a separated argument])
5203d63fdb69Smrg_LT_TAGDECL([], [hardcode_direct], [0],
5204d63fdb69Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5205d63fdb69Smrg    DIR into the resulting binary])
5206d63fdb69Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5207d63fdb69Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5208d63fdb69Smrg    DIR into the resulting binary and the resulting library dependency is
5209d63fdb69Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5210d63fdb69Smrg    library is relocated])
5211d63fdb69Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5212d63fdb69Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5213d63fdb69Smrg    into the resulting binary])
5214d63fdb69Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5215d63fdb69Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5216d63fdb69Smrg    into the resulting binary])
5217d63fdb69Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
5218d63fdb69Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5219d63fdb69Smrg    into the library and all subsequent libraries and executables linked
5220d63fdb69Smrg    against it])
5221d63fdb69Smrg_LT_TAGDECL([], [inherit_rpath], [0],
5222d63fdb69Smrg    [Set to yes if linker adds runtime paths of dependent libraries
5223d63fdb69Smrg    to runtime path list])
5224d63fdb69Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
5225d63fdb69Smrg    [Whether libtool must link a program against all its dependency libraries])
5226d63fdb69Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5227d63fdb69Smrg    [Fix the shell variable $srcfile for the compiler])
5228d63fdb69Smrg_LT_TAGDECL([], [always_export_symbols], [0],
5229d63fdb69Smrg    [Set to "yes" if exported symbols are required])
5230d63fdb69Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5231d63fdb69Smrg    [The commands to list exported symbols])
5232d63fdb69Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
5233d63fdb69Smrg    [Symbols that should not be listed in the preloaded symbols])
5234d63fdb69Smrg_LT_TAGDECL([], [include_expsyms], [1],
5235d63fdb69Smrg    [Symbols that must always be exported])
5236d63fdb69Smrg_LT_TAGDECL([], [prelink_cmds], [2],
5237d63fdb69Smrg    [Commands necessary for linking programs (against libraries) with templates])
5238d63fdb69Smrg_LT_TAGDECL([], [file_list_spec], [1],
5239d63fdb69Smrg    [Specify filename containing input files])
5240d63fdb69Smrgdnl FIXME: Not yet implemented
5241d63fdb69Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5242d63fdb69Smrgdnl    [Compiler flag to generate thread safe objects])
5243d63fdb69Smrg])# _LT_LINKER_SHLIBS
5244d63fdb69Smrg
5245d63fdb69Smrg
5246d63fdb69Smrg# _LT_LANG_C_CONFIG([TAG])
5247d63fdb69Smrg# ------------------------
5248d63fdb69Smrg# Ensure that the configuration variables for a C compiler are suitably
5249d63fdb69Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5250d63fdb69Smrg# the compiler configuration to `libtool'.
5251d63fdb69Smrgm4_defun([_LT_LANG_C_CONFIG],
5252d63fdb69Smrg[m4_require([_LT_DECL_EGREP])dnl
5253d63fdb69Smrglt_save_CC="$CC"
5254d63fdb69SmrgAC_LANG_PUSH(C)
52553da084b3Smrg
5256d63fdb69Smrg# Source file extension for C test sources.
5257d63fdb69Smrgac_ext=c
52583da084b3Smrg
5259d63fdb69Smrg# Object file extension for compiled C test sources.
5260d63fdb69Smrgobjext=o
5261d63fdb69Smrg_LT_TAGVAR(objext, $1)=$objext
52623da084b3Smrg
5263d63fdb69Smrg# Code to be used in simple compile tests
5264d63fdb69Smrglt_simple_compile_test_code="int some_variable = 0;"
52653da084b3Smrg
5266d63fdb69Smrg# Code to be used in simple link tests
5267d63fdb69Smrglt_simple_link_test_code='int main(){return(0);}'
52683da084b3Smrg
5269d63fdb69Smrg_LT_TAG_COMPILER
5270d63fdb69Smrg# Save the default compiler, since it gets overwritten when the other
5271d63fdb69Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5272d63fdb69Smrgcompiler_DEFAULT=$CC
52733da084b3Smrg
5274d63fdb69Smrg# save warnings/boilerplate of simple test code
5275d63fdb69Smrg_LT_COMPILER_BOILERPLATE
5276d63fdb69Smrg_LT_LINKER_BOILERPLATE
52773da084b3Smrg
5278d63fdb69Smrgif test -n "$compiler"; then
5279d63fdb69Smrg  _LT_COMPILER_NO_RTTI($1)
5280d63fdb69Smrg  _LT_COMPILER_PIC($1)
5281d63fdb69Smrg  _LT_COMPILER_C_O($1)
5282d63fdb69Smrg  _LT_COMPILER_FILE_LOCKS($1)
5283d63fdb69Smrg  _LT_LINKER_SHLIBS($1)
5284d63fdb69Smrg  _LT_SYS_DYNAMIC_LINKER($1)
5285d63fdb69Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5286d63fdb69Smrg  LT_SYS_DLOPEN_SELF
5287d63fdb69Smrg  _LT_CMD_STRIPLIB
5288d63fdb69Smrg
5289d63fdb69Smrg  # Report which library types will actually be built
5290d63fdb69Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5291d63fdb69Smrg  AC_MSG_RESULT([$can_build_shared])
5292d63fdb69Smrg
5293d63fdb69Smrg  AC_MSG_CHECKING([whether to build shared libraries])
5294d63fdb69Smrg  test "$can_build_shared" = "no" && enable_shared=no
5295d63fdb69Smrg
5296d63fdb69Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
5297d63fdb69Smrg  # are all built from PIC.
5298d63fdb69Smrg  case $host_os in
5299d63fdb69Smrg  aix3*)
5300d63fdb69Smrg    test "$enable_shared" = yes && enable_static=no
5301d63fdb69Smrg    if test -n "$RANLIB"; then
5302d63fdb69Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5303d63fdb69Smrg      postinstall_cmds='$RANLIB $lib'
5304d63fdb69Smrg    fi
5305d63fdb69Smrg    ;;
53063da084b3Smrg
5307d63fdb69Smrg  aix[[4-9]]*)
5308d63fdb69Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5309d63fdb69Smrg      test "$enable_shared" = yes && enable_static=no
5310d63fdb69Smrg    fi
5311d63fdb69Smrg    ;;
5312d63fdb69Smrg  esac
5313d63fdb69Smrg  AC_MSG_RESULT([$enable_shared])
53143da084b3Smrg
5315d63fdb69Smrg  AC_MSG_CHECKING([whether to build static libraries])
5316d63fdb69Smrg  # Make sure either enable_shared or enable_static is yes.
5317d63fdb69Smrg  test "$enable_shared" = yes || enable_static=yes
5318d63fdb69Smrg  AC_MSG_RESULT([$enable_static])
53193da084b3Smrg
5320d63fdb69Smrg  _LT_CONFIG($1)
5321d63fdb69Smrgfi
5322d63fdb69SmrgAC_LANG_POP
5323d63fdb69SmrgCC="$lt_save_CC"
5324d63fdb69Smrg])# _LT_LANG_C_CONFIG
53253da084b3Smrg
53263da084b3Smrg
5327d63fdb69Smrg# _LT_PROG_CXX
5328d63fdb69Smrg# ------------
5329d63fdb69Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5330d63fdb69Smrg# compiler, we have our own version here.
5331d63fdb69Smrgm4_defun([_LT_PROG_CXX],
5332d63fdb69Smrg[
5333d63fdb69Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5334d63fdb69SmrgAC_PROG_CXX
5335d63fdb69Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5336d63fdb69Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5337d63fdb69Smrg    (test "X$CXX" != "Xg++"))) ; then
5338d63fdb69Smrg  AC_PROG_CXXCPP
5339d63fdb69Smrgelse
5340d63fdb69Smrg  _lt_caught_CXX_error=yes
5341d63fdb69Smrgfi
5342d63fdb69Smrgpopdef([AC_MSG_ERROR])
5343d63fdb69Smrg])# _LT_PROG_CXX
5344d63fdb69Smrg
5345d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
5346d63fdb69Smrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5347d63fdb69Smrg
5348d63fdb69Smrg
5349d63fdb69Smrg# _LT_LANG_CXX_CONFIG([TAG])
5350d63fdb69Smrg# --------------------------
5351d63fdb69Smrg# Ensure that the configuration variables for a C++ compiler are suitably
5352d63fdb69Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5353d63fdb69Smrg# the compiler configuration to `libtool'.
5354d63fdb69Smrgm4_defun([_LT_LANG_CXX_CONFIG],
5355d63fdb69Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5356d63fdb69Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5357d63fdb69Smrgm4_require([_LT_DECL_EGREP])dnl
5358d63fdb69Smrg
5359d63fdb69SmrgAC_LANG_PUSH(C++)
5360d63fdb69Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5361d63fdb69Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
5362d63fdb69Smrg_LT_TAGVAR(always_export_symbols, $1)=no
5363d63fdb69Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5364d63fdb69Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
5365d63fdb69Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5366d63fdb69Smrg_LT_TAGVAR(hardcode_direct, $1)=no
5367d63fdb69Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5368d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5369d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5370d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5371d63fdb69Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5372d63fdb69Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5373d63fdb69Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
5374d63fdb69Smrg_LT_TAGVAR(inherit_rpath, $1)=no
5375d63fdb69Smrg_LT_TAGVAR(module_cmds, $1)=
5376d63fdb69Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
5377d63fdb69Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5378d63fdb69Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5379d63fdb69Smrg_LT_TAGVAR(no_undefined_flag, $1)=
5380d63fdb69Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5381d63fdb69Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5382d63fdb69Smrg
5383d63fdb69Smrg# Source file extension for C++ test sources.
5384d63fdb69Smrgac_ext=cpp
5385d63fdb69Smrg
5386d63fdb69Smrg# Object file extension for compiled C++ test sources.
5387d63fdb69Smrgobjext=o
5388d63fdb69Smrg_LT_TAGVAR(objext, $1)=$objext
5389d63fdb69Smrg
5390d63fdb69Smrg# No sense in running all these tests if we already determined that
5391d63fdb69Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5392d63fdb69Smrg# are currently assumed to apply to all compilers on this platform,
5393d63fdb69Smrg# and will be corrupted by setting them based on a non-working compiler.
5394d63fdb69Smrgif test "$_lt_caught_CXX_error" != yes; then
5395d63fdb69Smrg  # Code to be used in simple compile tests
5396d63fdb69Smrg  lt_simple_compile_test_code="int some_variable = 0;"
5397d63fdb69Smrg
5398d63fdb69Smrg  # Code to be used in simple link tests
5399d63fdb69Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5400d63fdb69Smrg
5401d63fdb69Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5402d63fdb69Smrg  _LT_TAG_COMPILER
5403d63fdb69Smrg
5404d63fdb69Smrg  # save warnings/boilerplate of simple test code
5405d63fdb69Smrg  _LT_COMPILER_BOILERPLATE
5406d63fdb69Smrg  _LT_LINKER_BOILERPLATE
5407d63fdb69Smrg
5408d63fdb69Smrg  # Allow CC to be a program name with arguments.
5409d63fdb69Smrg  lt_save_CC=$CC
5410d63fdb69Smrg  lt_save_LD=$LD
5411d63fdb69Smrg  lt_save_GCC=$GCC
5412d63fdb69Smrg  GCC=$GXX
5413d63fdb69Smrg  lt_save_with_gnu_ld=$with_gnu_ld
5414d63fdb69Smrg  lt_save_path_LD=$lt_cv_path_LD
5415d63fdb69Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5416d63fdb69Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
54173da084b3Smrg  else
5418d63fdb69Smrg    $as_unset lt_cv_prog_gnu_ld
54193da084b3Smrg  fi
5420d63fdb69Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5421d63fdb69Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
54223da084b3Smrg  else
5423d63fdb69Smrg    $as_unset lt_cv_path_LD
54243da084b3Smrg  fi
5425d63fdb69Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
5426d63fdb69Smrg  CC=${CXX-"c++"}
5427d63fdb69Smrg  compiler=$CC
5428d63fdb69Smrg  _LT_TAGVAR(compiler, $1)=$CC
5429d63fdb69Smrg  _LT_CC_BASENAME([$compiler])
54303da084b3Smrg
5431d63fdb69Smrg  if test -n "$compiler"; then
5432d63fdb69Smrg    # We don't want -fno-exception when compiling C++ code, so set the
5433d63fdb69Smrg    # no_builtin_flag separately
5434d63fdb69Smrg    if test "$GXX" = yes; then
5435d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5436d63fdb69Smrg    else
5437d63fdb69Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5438d63fdb69Smrg    fi
54393da084b3Smrg
5440d63fdb69Smrg    if test "$GXX" = yes; then
5441d63fdb69Smrg      # Set up default GNU C++ configuration
54423da084b3Smrg
5443d63fdb69Smrg      LT_PATH_LD
54443da084b3Smrg
5445d63fdb69Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5446d63fdb69Smrg      # archiving commands below assume that GNU ld is being used.
5447d63fdb69Smrg      if test "$with_gnu_ld" = yes; then
5448d63fdb69Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5449d63fdb69Smrg        _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'
5450d63fdb69Smrg
5451d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5452d63fdb69Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5453d63fdb69Smrg
5454d63fdb69Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5455d63fdb69Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5456d63fdb69Smrg        #     investigate it a little bit more. (MM)
5457d63fdb69Smrg        wlarc='${wl}'
5458d63fdb69Smrg
5459d63fdb69Smrg        # ancient GNU ld didn't support --whole-archive et. al.
5460d63fdb69Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5461d63fdb69Smrg	  $GREP 'no-whole-archive' > /dev/null; then
5462d63fdb69Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5463d63fdb69Smrg        else
5464d63fdb69Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5465d63fdb69Smrg        fi
5466d63fdb69Smrg      else
5467d63fdb69Smrg        with_gnu_ld=no
5468d63fdb69Smrg        wlarc=
5469d63fdb69Smrg
5470d63fdb69Smrg        # A generic and very simple default shared library creation
5471d63fdb69Smrg        # command for GNU C++ for the case where it uses the native
5472d63fdb69Smrg        # linker, instead of GNU ld.  If possible, this setting should
5473d63fdb69Smrg        # overridden to take advantage of the native linker features on
5474d63fdb69Smrg        # the platform it is being used on.
5475d63fdb69Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
54763da084b3Smrg      fi
5477d63fdb69Smrg
5478d63fdb69Smrg      # Commands to make compiler produce verbose output that lists
5479d63fdb69Smrg      # what "hidden" libraries, object files and flags are used when
5480d63fdb69Smrg      # linking a shared library.
5481d63fdb69Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5482d63fdb69Smrg
5483d63fdb69Smrg    else
5484d63fdb69Smrg      GXX=no
5485d63fdb69Smrg      with_gnu_ld=no
5486d63fdb69Smrg      wlarc=
5487d63fdb69Smrg    fi
5488d63fdb69Smrg
5489d63fdb69Smrg    # PORTME: fill in a description of your system's C++ link characteristics
5490d63fdb69Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5491d63fdb69Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
54923da084b3Smrg    case $host_os in
5493d63fdb69Smrg      aix3*)
5494d63fdb69Smrg        # FIXME: insert proper C++ library support
5495d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5496d63fdb69Smrg        ;;
5497d63fdb69Smrg      aix[[4-9]]*)
5498d63fdb69Smrg        if test "$host_cpu" = ia64; then
5499d63fdb69Smrg          # On IA64, the linker does run time linking by default, so we don't
5500d63fdb69Smrg          # have to do anything special.
5501d63fdb69Smrg          aix_use_runtimelinking=no
5502d63fdb69Smrg          exp_sym_flag='-Bexport'
5503d63fdb69Smrg          no_entry_flag=""
5504d63fdb69Smrg        else
5505d63fdb69Smrg          aix_use_runtimelinking=no
5506d63fdb69Smrg
5507d63fdb69Smrg          # Test if we are trying to use run time linking or normal
5508d63fdb69Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5509d63fdb69Smrg          # need to do runtime linking.
5510d63fdb69Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5511d63fdb69Smrg	    for ld_flag in $LDFLAGS; do
5512d63fdb69Smrg	      case $ld_flag in
5513d63fdb69Smrg	      *-brtl*)
5514d63fdb69Smrg	        aix_use_runtimelinking=yes
5515d63fdb69Smrg	        break
5516d63fdb69Smrg	        ;;
5517d63fdb69Smrg	      esac
5518d63fdb69Smrg	    done
5519d63fdb69Smrg	    ;;
5520d63fdb69Smrg          esac
5521d63fdb69Smrg
5522d63fdb69Smrg          exp_sym_flag='-bexport'
5523d63fdb69Smrg          no_entry_flag='-bnoentry'
5524d63fdb69Smrg        fi
5525d63fdb69Smrg
5526d63fdb69Smrg        # When large executables or shared objects are built, AIX ld can
5527d63fdb69Smrg        # have problems creating the table of contents.  If linking a library
5528d63fdb69Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
5529d63fdb69Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5530d63fdb69Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5531d63fdb69Smrg
5532d63fdb69Smrg        _LT_TAGVAR(archive_cmds, $1)=''
5533d63fdb69Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5534d63fdb69Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5535d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5536d63fdb69Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5537d63fdb69Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5538d63fdb69Smrg
5539d63fdb69Smrg        if test "$GXX" = yes; then
5540d63fdb69Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5541d63fdb69Smrg          # We only want to do this on AIX 4.2 and lower, the check
5542d63fdb69Smrg          # below for broken collect2 doesn't work under 4.3+
5543d63fdb69Smrg	  collect2name=`${CC} -print-prog-name=collect2`
5544d63fdb69Smrg	  if test -f "$collect2name" &&
5545d63fdb69Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5546d63fdb69Smrg	  then
5547d63fdb69Smrg	    # We have reworked collect2
5548d63fdb69Smrg	    :
5549d63fdb69Smrg	  else
5550d63fdb69Smrg	    # We have old collect2
5551d63fdb69Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5552d63fdb69Smrg	    # It fails to find uninstalled libraries when the uninstalled
5553d63fdb69Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5554d63fdb69Smrg	    # to unsupported forces relinking
5555d63fdb69Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5556d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5557d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5558d63fdb69Smrg	  fi
5559d63fdb69Smrg          esac
5560d63fdb69Smrg          shared_flag='-shared'
5561d63fdb69Smrg	  if test "$aix_use_runtimelinking" = yes; then
5562d63fdb69Smrg	    shared_flag="$shared_flag "'${wl}-G'
5563d63fdb69Smrg	  fi
5564d63fdb69Smrg        else
5565d63fdb69Smrg          # not using gcc
5566d63fdb69Smrg          if test "$host_cpu" = ia64; then
5567d63fdb69Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5568d63fdb69Smrg	  # chokes on -Wl,-G. The following line is correct:
5569d63fdb69Smrg	  shared_flag='-G'
5570d63fdb69Smrg          else
5571d63fdb69Smrg	    if test "$aix_use_runtimelinking" = yes; then
5572d63fdb69Smrg	      shared_flag='${wl}-G'
5573d63fdb69Smrg	    else
5574d63fdb69Smrg	      shared_flag='${wl}-bM:SRE'
5575d63fdb69Smrg	    fi
5576d63fdb69Smrg          fi
5577d63fdb69Smrg        fi
5578d63fdb69Smrg
5579d63fdb69Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5580d63fdb69Smrg        # It seems that -bexpall does not export symbols beginning with
5581d63fdb69Smrg        # underscore (_), so it is better to generate a list of symbols to
5582d63fdb69Smrg	# export.
5583d63fdb69Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5584d63fdb69Smrg        if test "$aix_use_runtimelinking" = yes; then
5585d63fdb69Smrg          # Warning - without using the other runtime loading flags (-brtl),
5586d63fdb69Smrg          # -berok will link without error, but may produce a broken library.
5587d63fdb69Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5588d63fdb69Smrg          # Determine the default libpath from the value encoded in an empty
5589d63fdb69Smrg          # executable.
5590d63fdb69Smrg          _LT_SYS_MODULE_PATH_AIX
5591d63fdb69Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5592d63fdb69Smrg
5593d63fdb69Smrg          _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"
5594d63fdb69Smrg        else
5595d63fdb69Smrg          if test "$host_cpu" = ia64; then
5596d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5597d63fdb69Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5598d63fdb69Smrg	    _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"
5599d63fdb69Smrg          else
5600d63fdb69Smrg	    # Determine the default libpath from the value encoded in an
5601d63fdb69Smrg	    # empty executable.
5602d63fdb69Smrg	    _LT_SYS_MODULE_PATH_AIX
5603d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5604d63fdb69Smrg	    # Warning - without using the other run time loading flags,
5605d63fdb69Smrg	    # -berok will link without error, but may produce a broken library.
5606d63fdb69Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5607d63fdb69Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5608d63fdb69Smrg	    # Exported symbols can be pulled into shared objects from archives
5609d63fdb69Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5610d63fdb69Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5611d63fdb69Smrg	    # This is similar to how AIX traditionally builds its shared
5612d63fdb69Smrg	    # libraries.
5613d63fdb69Smrg	    _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'
5614d63fdb69Smrg          fi
5615d63fdb69Smrg        fi
5616d63fdb69Smrg        ;;
5617d63fdb69Smrg
5618d63fdb69Smrg      beos*)
5619d63fdb69Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5620d63fdb69Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621d63fdb69Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5622d63fdb69Smrg	  # support --undefined.  This deserves some investigation.  FIXME
5623d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
56243da084b3Smrg	else
5625d63fdb69Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
56263da084b3Smrg	fi
56273da084b3Smrg	;;
5628d63fdb69Smrg
56293da084b3Smrg      chorus*)
5630d63fdb69Smrg        case $cc_basename in
5631d63fdb69Smrg          *)
5632d63fdb69Smrg	  # FIXME: insert proper C++ library support
5633d63fdb69Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
56343da084b3Smrg	  ;;
5635d63fdb69Smrg        esac
5636d63fdb69Smrg        ;;
5637d63fdb69Smrg
5638d63fdb69Smrg      cygwin* | mingw* | pw32* | cegcc*)
5639d63fdb69Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5640d63fdb69Smrg        # as there is no search path for DLLs.
5641d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5642d63fdb69Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5643d63fdb69Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
5644d63fdb69Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5645d63fdb69Smrg
5646d63fdb69Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5647d63fdb69Smrg          _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'
5648d63fdb69Smrg          # If the export-symbols file already is a .def file (1st line
5649d63fdb69Smrg          # is EXPORTS), use it as is; otherwise, prepend...
5650d63fdb69Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5651d63fdb69Smrg	    cp $export_symbols $output_objdir/$soname.def;
5652d63fdb69Smrg          else
5653d63fdb69Smrg	    echo EXPORTS > $output_objdir/$soname.def;
5654d63fdb69Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
5655d63fdb69Smrg          fi~
5656d63fdb69Smrg          $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'
5657d63fdb69Smrg        else
5658d63fdb69Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
5659d63fdb69Smrg        fi
5660d63fdb69Smrg        ;;
5661d63fdb69Smrg      darwin* | rhapsody*)
5662d63fdb69Smrg        _LT_DARWIN_LINKER_FEATURES($1)
56633da084b3Smrg	;;
5664d63fdb69Smrg
56653da084b3Smrg      dgux*)
5666d63fdb69Smrg        case $cc_basename in
5667d63fdb69Smrg          ec++*)
5668d63fdb69Smrg	    # FIXME: insert proper C++ library support
5669d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
56703da084b3Smrg	    ;;
5671d63fdb69Smrg          ghcx*)
56723da084b3Smrg	    # Green Hills C++ Compiler
5673d63fdb69Smrg	    # FIXME: insert proper C++ library support
5674d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
56753da084b3Smrg	    ;;
5676d63fdb69Smrg          *)
5677d63fdb69Smrg	    # FIXME: insert proper C++ library support
5678d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
56793da084b3Smrg	    ;;
5680d63fdb69Smrg        esac
5681d63fdb69Smrg        ;;
5682d63fdb69Smrg
5683d63fdb69Smrg      freebsd[[12]]*)
5684d63fdb69Smrg        # C++ shared libraries reported to be fairly broken before
5685d63fdb69Smrg	# switch to ELF
5686d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5687d63fdb69Smrg        ;;
5688d63fdb69Smrg
5689d63fdb69Smrg      freebsd-elf*)
5690d63fdb69Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5691d63fdb69Smrg        ;;
5692d63fdb69Smrg
56933da084b3Smrg      freebsd* | dragonfly*)
5694d63fdb69Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5695d63fdb69Smrg        # conventions
5696d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5697d63fdb69Smrg        ;;
5698d63fdb69Smrg
5699d63fdb69Smrg      gnu*)
5700d63fdb69Smrg        ;;
5701d63fdb69Smrg
5702d63fdb69Smrg      hpux9*)
5703d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5704d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5705d63fdb69Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5706d63fdb69Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5707d63fdb69Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5708d63fdb69Smrg				             # but as the default
5709d63fdb69Smrg				             # location of the library.
5710d63fdb69Smrg
5711d63fdb69Smrg        case $cc_basename in
5712d63fdb69Smrg          CC*)
5713d63fdb69Smrg            # FIXME: insert proper C++ library support
5714d63fdb69Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
5715d63fdb69Smrg            ;;
5716d63fdb69Smrg          aCC*)
5717d63fdb69Smrg            _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'
5718d63fdb69Smrg            # Commands to make compiler produce verbose output that lists
5719d63fdb69Smrg            # what "hidden" libraries, object files and flags are used when
5720d63fdb69Smrg            # linking a shared library.
5721d63fdb69Smrg            #
5722d63fdb69Smrg            # There doesn't appear to be a way to prevent this compiler from
5723d63fdb69Smrg            # explicitly linking system object files so we need to strip them
5724d63fdb69Smrg            # from the output so that they don't get included in the library
5725d63fdb69Smrg            # dependencies.
5726d63fdb69Smrg            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'
5727d63fdb69Smrg            ;;
5728d63fdb69Smrg          *)
5729d63fdb69Smrg            if test "$GXX" = yes; then
5730d63fdb69Smrg              _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'
5731d63fdb69Smrg            else
5732d63fdb69Smrg              # FIXME: insert proper C++ library support
5733d63fdb69Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
5734d63fdb69Smrg            fi
5735d63fdb69Smrg            ;;
5736d63fdb69Smrg        esac
5737d63fdb69Smrg        ;;
5738d63fdb69Smrg
5739d63fdb69Smrg      hpux10*|hpux11*)
5740d63fdb69Smrg        if test $with_gnu_ld = no; then
5741d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5742d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5743d63fdb69Smrg
5744d63fdb69Smrg          case $host_cpu in
5745d63fdb69Smrg            hppa*64*|ia64*)
5746d63fdb69Smrg              ;;
5747d63fdb69Smrg            *)
5748d63fdb69Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749d63fdb69Smrg              ;;
5750d63fdb69Smrg          esac
5751d63fdb69Smrg        fi
5752d63fdb69Smrg        case $host_cpu in
5753d63fdb69Smrg          hppa*64*|ia64*)
5754d63fdb69Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
5755d63fdb69Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5756d63fdb69Smrg            ;;
5757d63fdb69Smrg          *)
5758d63fdb69Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5759d63fdb69Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760d63fdb69Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5761d63fdb69Smrg					         # but as the default
5762d63fdb69Smrg					         # location of the library.
5763d63fdb69Smrg            ;;
5764d63fdb69Smrg        esac
5765d63fdb69Smrg
5766d63fdb69Smrg        case $cc_basename in
5767d63fdb69Smrg          CC*)
5768d63fdb69Smrg	    # FIXME: insert proper C++ library support
5769d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
57703da084b3Smrg	    ;;
5771d63fdb69Smrg          aCC*)
57723da084b3Smrg	    case $host_cpu in
5773d63fdb69Smrg	      hppa*64*)
5774d63fdb69Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5775d63fdb69Smrg	        ;;
5776d63fdb69Smrg	      ia64*)
5777d63fdb69Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5778d63fdb69Smrg	        ;;
5779d63fdb69Smrg	      *)
5780d63fdb69Smrg	        _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'
5781d63fdb69Smrg	        ;;
57823da084b3Smrg	    esac
5783d63fdb69Smrg	    # Commands to make compiler produce verbose output that lists
5784d63fdb69Smrg	    # what "hidden" libraries, object files and flags are used when
5785d63fdb69Smrg	    # linking a shared library.
5786d63fdb69Smrg	    #
5787d63fdb69Smrg	    # There doesn't appear to be a way to prevent this compiler from
5788d63fdb69Smrg	    # explicitly linking system object files so we need to strip them
5789d63fdb69Smrg	    # from the output so that they don't get included in the library
5790d63fdb69Smrg	    # dependencies.
5791d63fdb69Smrg	    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'
57923da084b3Smrg	    ;;
5793d63fdb69Smrg          *)
5794d63fdb69Smrg	    if test "$GXX" = yes; then
5795d63fdb69Smrg	      if test $with_gnu_ld = no; then
5796d63fdb69Smrg	        case $host_cpu in
5797d63fdb69Smrg	          hppa*64*)
5798d63fdb69Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5799d63fdb69Smrg	            ;;
5800d63fdb69Smrg	          ia64*)
5801d63fdb69Smrg	            _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'
5802d63fdb69Smrg	            ;;
5803d63fdb69Smrg	          *)
5804d63fdb69Smrg	            _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'
5805d63fdb69Smrg	            ;;
5806d63fdb69Smrg	        esac
5807d63fdb69Smrg	      fi
5808d63fdb69Smrg	    else
5809d63fdb69Smrg	      # FIXME: insert proper C++ library support
5810d63fdb69Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5811d63fdb69Smrg	    fi
58123da084b3Smrg	    ;;
5813d63fdb69Smrg        esac
5814d63fdb69Smrg        ;;
5815d63fdb69Smrg
5816d63fdb69Smrg      interix[[3-9]]*)
5817d63fdb69Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
5818d63fdb69Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5820d63fdb69Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5821d63fdb69Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5822d63fdb69Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5823d63fdb69Smrg	# default) and relocated if they conflict, which is a slow very memory
5824d63fdb69Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5825d63fdb69Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5826d63fdb69Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5827d63fdb69Smrg	_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'
5828d63fdb69Smrg	_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'
58293da084b3Smrg	;;
5830d63fdb69Smrg      irix5* | irix6*)
5831d63fdb69Smrg        case $cc_basename in
5832d63fdb69Smrg          CC*)
5833d63fdb69Smrg	    # SGI C++
5834d63fdb69Smrg	    _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'
5835d63fdb69Smrg
5836d63fdb69Smrg	    # Archives containing C++ object files must be created using
5837d63fdb69Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5838d63fdb69Smrg	    # necessary to make sure instantiated templates are included
5839d63fdb69Smrg	    # in the archive.
5840d63fdb69Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
58413da084b3Smrg	    ;;
5842d63fdb69Smrg          *)
5843d63fdb69Smrg	    if test "$GXX" = yes; then
5844d63fdb69Smrg	      if test "$with_gnu_ld" = no; then
5845d63fdb69Smrg	        _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'
5846d63fdb69Smrg	      else
5847d63fdb69Smrg	        _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'
5848d63fdb69Smrg	      fi
5849d63fdb69Smrg	    fi
5850d63fdb69Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
58513da084b3Smrg	    ;;
5852d63fdb69Smrg        esac
5853d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5854d63fdb69Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5855d63fdb69Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5856d63fdb69Smrg        ;;
5857d63fdb69Smrg
58583da084b3Smrg      linux* | k*bsd*-gnu)
5859d63fdb69Smrg        case $cc_basename in
5860d63fdb69Smrg          KCC*)
5861d63fdb69Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5862d63fdb69Smrg
5863d63fdb69Smrg	    # KCC will only create a shared library if the output file
5864d63fdb69Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5865d63fdb69Smrg	    # to its proper name (with version) after linking.
5866d63fdb69Smrg	    _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'
5867d63fdb69Smrg	    _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'
5868d63fdb69Smrg	    # Commands to make compiler produce verbose output that lists
5869d63fdb69Smrg	    # what "hidden" libraries, object files and flags are used when
5870d63fdb69Smrg	    # linking a shared library.
5871d63fdb69Smrg	    #
5872d63fdb69Smrg	    # There doesn't appear to be a way to prevent this compiler from
5873d63fdb69Smrg	    # explicitly linking system object files so we need to strip them
5874d63fdb69Smrg	    # from the output so that they don't get included in the library
5875d63fdb69Smrg	    # dependencies.
5876d63fdb69Smrg	    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'
5877d63fdb69Smrg
5878d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5879d63fdb69Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5880d63fdb69Smrg
5881d63fdb69Smrg	    # Archives containing C++ object files must be created using
5882d63fdb69Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5883d63fdb69Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
58843da084b3Smrg	    ;;
5885d63fdb69Smrg	  icpc* | ecpc* )
58863da084b3Smrg	    # Intel C++
5887d63fdb69Smrg	    with_gnu_ld=yes
5888d63fdb69Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5889d63fdb69Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5890d63fdb69Smrg	    # earlier do not add the objects themselves.
5891d63fdb69Smrg	    case `$CC -V 2>&1` in
5892d63fdb69Smrg	      *"Version 7."*)
5893d63fdb69Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5894d63fdb69Smrg		_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'
5895d63fdb69Smrg		;;
5896d63fdb69Smrg	      *)  # Version 8.0 or newer
5897d63fdb69Smrg	        tmp_idyn=
5898d63fdb69Smrg	        case $host_cpu in
5899d63fdb69Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
5900d63fdb69Smrg		esac
5901d63fdb69Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5902d63fdb69Smrg		_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'
5903d63fdb69Smrg		;;
5904d63fdb69Smrg	    esac
5905d63fdb69Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5906d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5907d63fdb69Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5908d63fdb69Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
59093da084b3Smrg	    ;;
5910d63fdb69Smrg          pgCC* | pgcpp*)
5911d63fdb69Smrg            # Portland Group C++ compiler
5912d63fdb69Smrg	    case `$CC -V` in
5913d63fdb69Smrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5914d63fdb69Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5915d63fdb69Smrg		rm -rf $tpldir~
5916d63fdb69Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5917d63fdb69Smrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5918d63fdb69Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5919d63fdb69Smrg		rm -rf $tpldir~
5920d63fdb69Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5921d63fdb69Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5922d63fdb69Smrg		$RANLIB $oldlib'
5923d63fdb69Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5924d63fdb69Smrg		rm -rf $tpldir~
5925d63fdb69Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5926d63fdb69Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5927d63fdb69Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5928d63fdb69Smrg		rm -rf $tpldir~
5929d63fdb69Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5930d63fdb69Smrg		$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'
5931d63fdb69Smrg	      ;;
5932d63fdb69Smrg	    *) # Version 6 will use weak symbols
5933d63fdb69Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5934d63fdb69Smrg	      _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'
5935d63fdb69Smrg	      ;;
5936d63fdb69Smrg	    esac
5937d63fdb69Smrg
5938d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5939d63fdb69Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5940d63fdb69Smrg	    _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'
5941d63fdb69Smrg            ;;
59423da084b3Smrg	  cxx*)
59433da084b3Smrg	    # Compaq C++
5944d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5945d63fdb69Smrg	    _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'
5946d63fdb69Smrg
5947d63fdb69Smrg	    runpath_var=LD_RUN_PATH
5948d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5949d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5950d63fdb69Smrg
5951d63fdb69Smrg	    # Commands to make compiler produce verbose output that lists
5952d63fdb69Smrg	    # what "hidden" libraries, object files and flags are used when
5953d63fdb69Smrg	    # linking a shared library.
5954d63fdb69Smrg	    #
5955d63fdb69Smrg	    # There doesn't appear to be a way to prevent this compiler from
5956d63fdb69Smrg	    # explicitly linking system object files so we need to strip them
5957d63fdb69Smrg	    # from the output so that they don't get included in the library
5958d63fdb69Smrg	    # dependencies.
5959d63fdb69Smrg	    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'
5960d63fdb69Smrg	    ;;
5961d63fdb69Smrg	  xl*)
5962d63fdb69Smrg	    # IBM XL 8.0 on PPC, with GNU ld
5963d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5964d63fdb69Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5965d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5966d63fdb69Smrg	    if test "x$supports_anon_versioning" = xyes; then
5967d63fdb69Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5968d63fdb69Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5969d63fdb69Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5970d63fdb69Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5971d63fdb69Smrg	    fi
59723da084b3Smrg	    ;;
59733da084b3Smrg	  *)
5974d63fdb69Smrg	    case `$CC -V 2>&1 | sed 5q` in
5975d63fdb69Smrg	    *Sun\ C*)
5976d63fdb69Smrg	      # Sun C++ 5.9
5977d63fdb69Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5978d63fdb69Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5979d63fdb69Smrg	      _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'
5980d63fdb69Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5981d63fdb69Smrg	      _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'
5982d63fdb69Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5983d63fdb69Smrg
5984d63fdb69Smrg	      # Not sure whether something based on
5985d63fdb69Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5986d63fdb69Smrg	      # would be better.
5987d63fdb69Smrg	      output_verbose_link_cmd='echo'
5988d63fdb69Smrg
5989d63fdb69Smrg	      # Archives containing C++ object files must be created using
5990d63fdb69Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5991d63fdb69Smrg	      # necessary to make sure instantiated templates are included
5992d63fdb69Smrg	      # in the archive.
5993d63fdb69Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5994d63fdb69Smrg	      ;;
5995d63fdb69Smrg	    esac
59963da084b3Smrg	    ;;
59973da084b3Smrg	esac
59983da084b3Smrg	;;
5999d63fdb69Smrg
60003da084b3Smrg      lynxos*)
6001d63fdb69Smrg        # FIXME: insert proper C++ library support
6002d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60033da084b3Smrg	;;
6004d63fdb69Smrg
60053da084b3Smrg      m88k*)
6006d63fdb69Smrg        # FIXME: insert proper C++ library support
6007d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
60083da084b3Smrg	;;
6009d63fdb69Smrg
60103da084b3Smrg      mvs*)
6011d63fdb69Smrg        case $cc_basename in
6012d63fdb69Smrg          cxx*)
6013d63fdb69Smrg	    # FIXME: insert proper C++ library support
6014d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60153da084b3Smrg	    ;;
60163da084b3Smrg	  *)
6017d63fdb69Smrg	    # FIXME: insert proper C++ library support
6018d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60193da084b3Smrg	    ;;
60203da084b3Smrg	esac
60213da084b3Smrg	;;
6022d63fdb69Smrg
6023d63fdb69Smrg      netbsd*)
6024d63fdb69Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6025d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6026d63fdb69Smrg	  wlarc=
6027d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6028d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6029d63fdb69Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030d63fdb69Smrg	fi
6031d63fdb69Smrg	# Workaround some broken pre-1.5 toolchains
6032d63fdb69Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6033d63fdb69Smrg	;;
6034d63fdb69Smrg
6035d63fdb69Smrg      *nto* | *qnx*)
6036d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6037d63fdb69Smrg	;;
6038d63fdb69Smrg
6039d63fdb69Smrg      openbsd2*)
6040d63fdb69Smrg        # C++ shared libraries are fairly broken
6041d63fdb69Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6042d63fdb69Smrg	;;
6043d63fdb69Smrg
6044d63fdb69Smrg      openbsd*)
6045d63fdb69Smrg	if test -f /usr/libexec/ld.so; then
6046d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6047d63fdb69Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6048d63fdb69Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6049d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050d63fdb69Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6051d63fdb69Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6052d63fdb69Smrg	    _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'
6053d63fdb69Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6054d63fdb69Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6055d63fdb69Smrg	  fi
6056d63fdb69Smrg	  output_verbose_link_cmd=echo
6057d63fdb69Smrg	else
6058d63fdb69Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6059d63fdb69Smrg	fi
60603da084b3Smrg	;;
6061d63fdb69Smrg
60623da084b3Smrg      osf3* | osf4* | osf5*)
6063d63fdb69Smrg        case $cc_basename in
6064d63fdb69Smrg          KCC*)
6065d63fdb69Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6066d63fdb69Smrg
6067d63fdb69Smrg	    # KCC will only create a shared library if the output file
6068d63fdb69Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6069d63fdb69Smrg	    # to its proper name (with version) after linking.
6070d63fdb69Smrg	    _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'
6071d63fdb69Smrg
6072d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6073d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6074d63fdb69Smrg
6075d63fdb69Smrg	    # Archives containing C++ object files must be created using
6076d63fdb69Smrg	    # the KAI C++ compiler.
6077d63fdb69Smrg	    case $host in
6078d63fdb69Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6079d63fdb69Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6080d63fdb69Smrg	    esac
60813da084b3Smrg	    ;;
6082d63fdb69Smrg          RCC*)
60833da084b3Smrg	    # Rational C++ 2.4.1
6084d63fdb69Smrg	    # FIXME: insert proper C++ library support
6085d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60863da084b3Smrg	    ;;
6087d63fdb69Smrg          cxx*)
6088d63fdb69Smrg	    case $host in
6089d63fdb69Smrg	      osf3*)
6090d63fdb69Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6091d63fdb69Smrg	        _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'
6092d63fdb69Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6093d63fdb69Smrg		;;
6094d63fdb69Smrg	      *)
6095d63fdb69Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6096d63fdb69Smrg	        _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'
6097d63fdb69Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6098d63fdb69Smrg	          echo "-hidden">> $lib.exp~
6099d63fdb69Smrg	          $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~
6100d63fdb69Smrg	          $RM $lib.exp'
6101d63fdb69Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6102d63fdb69Smrg		;;
6103d63fdb69Smrg	    esac
6104d63fdb69Smrg
6105d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6106d63fdb69Smrg
6107d63fdb69Smrg	    # Commands to make compiler produce verbose output that lists
6108d63fdb69Smrg	    # what "hidden" libraries, object files and flags are used when
6109d63fdb69Smrg	    # linking a shared library.
6110d63fdb69Smrg	    #
6111d63fdb69Smrg	    # There doesn't appear to be a way to prevent this compiler from
6112d63fdb69Smrg	    # explicitly linking system object files so we need to strip them
6113d63fdb69Smrg	    # from the output so that they don't get included in the library
6114d63fdb69Smrg	    # dependencies.
6115d63fdb69Smrg	    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'
61163da084b3Smrg	    ;;
61173da084b3Smrg	  *)
6118d63fdb69Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6119d63fdb69Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6120d63fdb69Smrg	      case $host in
6121d63fdb69Smrg	        osf3*)
6122d63fdb69Smrg	          _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'
6123d63fdb69Smrg		  ;;
6124d63fdb69Smrg	        *)
6125d63fdb69Smrg	          _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'
6126d63fdb69Smrg		  ;;
6127d63fdb69Smrg	      esac
6128d63fdb69Smrg
6129d63fdb69Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130d63fdb69Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6131d63fdb69Smrg
6132d63fdb69Smrg	      # Commands to make compiler produce verbose output that lists
6133d63fdb69Smrg	      # what "hidden" libraries, object files and flags are used when
6134d63fdb69Smrg	      # linking a shared library.
6135d63fdb69Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6136d63fdb69Smrg
6137d63fdb69Smrg	    else
6138d63fdb69Smrg	      # FIXME: insert proper C++ library support
6139d63fdb69Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6140d63fdb69Smrg	    fi
61413da084b3Smrg	    ;;
6142d63fdb69Smrg        esac
6143d63fdb69Smrg        ;;
6144d63fdb69Smrg
61453da084b3Smrg      psos*)
6146d63fdb69Smrg        # FIXME: insert proper C++ library support
6147d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6148d63fdb69Smrg        ;;
6149d63fdb69Smrg
6150d63fdb69Smrg      sunos4*)
6151d63fdb69Smrg        case $cc_basename in
6152d63fdb69Smrg          CC*)
6153d63fdb69Smrg	    # Sun C++ 4.x
6154d63fdb69Smrg	    # FIXME: insert proper C++ library support
6155d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6156d63fdb69Smrg	    ;;
6157d63fdb69Smrg          lcc*)
6158d63fdb69Smrg	    # Lucid
6159d63fdb69Smrg	    # FIXME: insert proper C++ library support
6160d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6161d63fdb69Smrg	    ;;
6162d63fdb69Smrg          *)
6163d63fdb69Smrg	    # FIXME: insert proper C++ library support
6164d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6165d63fdb69Smrg	    ;;
6166d63fdb69Smrg        esac
6167d63fdb69Smrg        ;;
6168d63fdb69Smrg
61693da084b3Smrg      solaris*)
6170d63fdb69Smrg        case $cc_basename in
6171d63fdb69Smrg          CC*)
61723da084b3Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
6173d63fdb69Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6174d63fdb69Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6175d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6176d63fdb69Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6177d63fdb69Smrg	      $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'
6178d63fdb69Smrg
6179d63fdb69Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6180d63fdb69Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6181d63fdb69Smrg	    case $host_os in
6182d63fdb69Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6183d63fdb69Smrg	      *)
6184d63fdb69Smrg		# The compiler driver will combine and reorder linker options,
6185d63fdb69Smrg		# but understands `-z linker_flag'.
6186d63fdb69Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6187d63fdb69Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6188d63fdb69Smrg	        ;;
6189d63fdb69Smrg	    esac
6190d63fdb69Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6191d63fdb69Smrg
6192d63fdb69Smrg	    output_verbose_link_cmd='echo'
6193d63fdb69Smrg
6194d63fdb69Smrg	    # Archives containing C++ object files must be created using
6195d63fdb69Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6196d63fdb69Smrg	    # necessary to make sure instantiated templates are included
6197d63fdb69Smrg	    # in the archive.
6198d63fdb69Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
61993da084b3Smrg	    ;;
6200d63fdb69Smrg          gcx*)
62013da084b3Smrg	    # Green Hills C++ Compiler
6202d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6203d63fdb69Smrg
6204d63fdb69Smrg	    # The C++ compiler must be used to create the archive.
6205d63fdb69Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
62063da084b3Smrg	    ;;
6207d63fdb69Smrg          *)
6208d63fdb69Smrg	    # GNU C++ compiler with Solaris linker
6209d63fdb69Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6210d63fdb69Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6211d63fdb69Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6212d63fdb69Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6213d63fdb69Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6214d63fdb69Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6215d63fdb69Smrg
6216d63fdb69Smrg	        # Commands to make compiler produce verbose output that lists
6217d63fdb69Smrg	        # what "hidden" libraries, object files and flags are used when
6218d63fdb69Smrg	        # linking a shared library.
6219d63fdb69Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6220d63fdb69Smrg	      else
6221d63fdb69Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6222d63fdb69Smrg	        # platform.
6223d63fdb69Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6224d63fdb69Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6225d63fdb69Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6226d63fdb69Smrg
6227d63fdb69Smrg	        # Commands to make compiler produce verbose output that lists
6228d63fdb69Smrg	        # what "hidden" libraries, object files and flags are used when
6229d63fdb69Smrg	        # linking a shared library.
6230d63fdb69Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6231d63fdb69Smrg	      fi
6232d63fdb69Smrg
6233d63fdb69Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6234d63fdb69Smrg	      case $host_os in
6235d63fdb69Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6236d63fdb69Smrg		*)
6237d63fdb69Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6238d63fdb69Smrg		  ;;
6239d63fdb69Smrg	      esac
6240d63fdb69Smrg	    fi
62413da084b3Smrg	    ;;
6242d63fdb69Smrg        esac
6243d63fdb69Smrg        ;;
6244d63fdb69Smrg
6245d63fdb69Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6246d63fdb69Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6247d63fdb69Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6248d63fdb69Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249d63fdb69Smrg      runpath_var='LD_RUN_PATH'
6250d63fdb69Smrg
6251d63fdb69Smrg      case $cc_basename in
6252d63fdb69Smrg        CC*)
6253d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6254d63fdb69Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6255d63fdb69Smrg	  ;;
6256d63fdb69Smrg	*)
6257d63fdb69Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6258d63fdb69Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6259d63fdb69Smrg	  ;;
6260d63fdb69Smrg      esac
6261d63fdb69Smrg      ;;
6262d63fdb69Smrg
6263d63fdb69Smrg      sysv5* | sco3.2v5* | sco5v6*)
6264d63fdb69Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
6265d63fdb69Smrg	# link with -lc, and that would cause any symbols used from libc to
6266d63fdb69Smrg	# always be unresolved, which means just about no library would
6267d63fdb69Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
6268d63fdb69Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
6269d63fdb69Smrg	# as -z defs.
6270d63fdb69Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6271d63fdb69Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6272d63fdb69Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6273d63fdb69Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6274d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6275d63fdb69Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6276d63fdb69Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6277d63fdb69Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6278d63fdb69Smrg	runpath_var='LD_RUN_PATH'
6279d63fdb69Smrg
62803da084b3Smrg	case $cc_basename in
6281d63fdb69Smrg          CC*)
6282d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6283d63fdb69Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62843da084b3Smrg	    ;;
62853da084b3Smrg	  *)
6286d63fdb69Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6287d63fdb69Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62883da084b3Smrg	    ;;
62893da084b3Smrg	esac
6290d63fdb69Smrg      ;;
6291d63fdb69Smrg
62923da084b3Smrg      tandem*)
6293d63fdb69Smrg        case $cc_basename in
6294d63fdb69Smrg          NCC*)
62953da084b3Smrg	    # NonStop-UX NCC 3.20
6296d63fdb69Smrg	    # FIXME: insert proper C++ library support
6297d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
62983da084b3Smrg	    ;;
6299d63fdb69Smrg          *)
6300d63fdb69Smrg	    # FIXME: insert proper C++ library support
6301d63fdb69Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
63023da084b3Smrg	    ;;
6303d63fdb69Smrg        esac
6304d63fdb69Smrg        ;;
6305d63fdb69Smrg
63063da084b3Smrg      vxworks*)
6307d63fdb69Smrg        # FIXME: insert proper C++ library support
6308d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6309d63fdb69Smrg        ;;
6310d63fdb69Smrg
63113da084b3Smrg      *)
6312d63fdb69Smrg        # FIXME: insert proper C++ library support
6313d63fdb69Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6314d63fdb69Smrg        ;;
63153da084b3Smrg    esac
63163da084b3Smrg
6317d63fdb69Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6318d63fdb69Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6319d63fdb69Smrg
6320d63fdb69Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
6321d63fdb69Smrg    _LT_TAGVAR(LD, $1)="$LD"
6322d63fdb69Smrg
6323d63fdb69Smrg    ## CAVEAT EMPTOR:
6324d63fdb69Smrg    ## There is no encapsulation within the following macros, do not change
6325d63fdb69Smrg    ## the running order or otherwise move them around unless you know exactly
6326d63fdb69Smrg    ## what you are doing...
6327d63fdb69Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6328d63fdb69Smrg    _LT_COMPILER_PIC($1)
6329d63fdb69Smrg    _LT_COMPILER_C_O($1)
6330d63fdb69Smrg    _LT_COMPILER_FILE_LOCKS($1)
6331d63fdb69Smrg    _LT_LINKER_SHLIBS($1)
6332d63fdb69Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6333d63fdb69Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6334d63fdb69Smrg
6335d63fdb69Smrg    _LT_CONFIG($1)
6336d63fdb69Smrg  fi # test -n "$compiler"
6337d63fdb69Smrg
6338d63fdb69Smrg  CC=$lt_save_CC
6339d63fdb69Smrg  LDCXX=$LD
6340d63fdb69Smrg  LD=$lt_save_LD
6341d63fdb69Smrg  GCC=$lt_save_GCC
6342d63fdb69Smrg  with_gnu_ld=$lt_save_with_gnu_ld
6343d63fdb69Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6344d63fdb69Smrg  lt_cv_path_LD=$lt_save_path_LD
6345d63fdb69Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6346d63fdb69Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6347d63fdb69Smrgfi # test "$_lt_caught_CXX_error" != yes
63483da084b3Smrg
6349d63fdb69SmrgAC_LANG_POP
6350d63fdb69Smrg])# _LT_LANG_CXX_CONFIG
63513da084b3Smrg
63523da084b3Smrg
6353d63fdb69Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6354d63fdb69Smrg# ---------------------------------
6355d63fdb69Smrg# Figure out "hidden" library dependencies from verbose
6356d63fdb69Smrg# compiler output when linking a shared library.
6357d63fdb69Smrg# Parse the compiler output and extract the necessary
6358d63fdb69Smrg# objects, libraries and library flags.
6359d63fdb69Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6360d63fdb69Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6361d63fdb69Smrg# Dependencies to place before and after the object being linked:
6362d63fdb69Smrg_LT_TAGVAR(predep_objects, $1)=
6363d63fdb69Smrg_LT_TAGVAR(postdep_objects, $1)=
6364d63fdb69Smrg_LT_TAGVAR(predeps, $1)=
6365d63fdb69Smrg_LT_TAGVAR(postdeps, $1)=
6366d63fdb69Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
63673da084b3Smrg
6368d63fdb69Smrgdnl we can't use the lt_simple_compile_test_code here,
6369d63fdb69Smrgdnl because it contains code intended for an executable,
6370d63fdb69Smrgdnl not a library.  It's possible we should let each
6371d63fdb69Smrgdnl tag define a new lt_????_link_test_code variable,
6372d63fdb69Smrgdnl but it's only used here...
6373d63fdb69Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6374d63fdb69Smrgint a;
6375d63fdb69Smrgvoid foo (void) { a = 0; }
6376d63fdb69Smrg_LT_EOF
6377d63fdb69Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6378d63fdb69Smrgclass Foo
6379d63fdb69Smrg{
6380d63fdb69Smrgpublic:
6381d63fdb69Smrg  Foo (void) { a = 0; }
6382d63fdb69Smrgprivate:
6383d63fdb69Smrg  int a;
6384d63fdb69Smrg};
6385d63fdb69Smrg_LT_EOF
6386d63fdb69Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6387d63fdb69Smrg      subroutine foo
6388d63fdb69Smrg      implicit none
6389d63fdb69Smrg      integer*4 a
6390d63fdb69Smrg      a=0
6391d63fdb69Smrg      return
6392d63fdb69Smrg      end
6393d63fdb69Smrg_LT_EOF
6394d63fdb69Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6395d63fdb69Smrg      subroutine foo
6396d63fdb69Smrg      implicit none
6397d63fdb69Smrg      integer a
6398d63fdb69Smrg      a=0
6399d63fdb69Smrg      return
6400d63fdb69Smrg      end
6401d63fdb69Smrg_LT_EOF
6402d63fdb69Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6403d63fdb69Smrgpublic class foo {
6404d63fdb69Smrg  private int a;
6405d63fdb69Smrg  public void bar (void) {
6406d63fdb69Smrg    a = 0;
6407d63fdb69Smrg  }
6408d63fdb69Smrg};
6409d63fdb69Smrg_LT_EOF
6410d63fdb69Smrg])
6411d63fdb69Smrgdnl Parse the compiler output and extract the necessary
6412d63fdb69Smrgdnl objects, libraries and library flags.
6413d63fdb69Smrgif AC_TRY_EVAL(ac_compile); then
6414d63fdb69Smrg  # Parse the compiler output and extract the necessary
6415d63fdb69Smrg  # objects, libraries and library flags.
64163da084b3Smrg
6417d63fdb69Smrg  # Sentinel used to keep track of whether or not we are before
6418d63fdb69Smrg  # the conftest object file.
6419d63fdb69Smrg  pre_test_object_deps_done=no
64203da084b3Smrg
6421d63fdb69Smrg  for p in `eval "$output_verbose_link_cmd"`; do
6422d63fdb69Smrg    case $p in
64233da084b3Smrg
6424d63fdb69Smrg    -L* | -R* | -l*)
6425d63fdb69Smrg       # Some compilers place space between "-{L,R}" and the path.
6426d63fdb69Smrg       # Remove the space.
6427d63fdb69Smrg       if test $p = "-L" ||
6428d63fdb69Smrg          test $p = "-R"; then
6429d63fdb69Smrg	 prev=$p
6430d63fdb69Smrg	 continue
6431d63fdb69Smrg       else
6432d63fdb69Smrg	 prev=
6433d63fdb69Smrg       fi
64343da084b3Smrg
6435d63fdb69Smrg       if test "$pre_test_object_deps_done" = no; then
6436d63fdb69Smrg	 case $p in
6437d63fdb69Smrg	 -L* | -R*)
6438d63fdb69Smrg	   # Internal compiler library paths should come after those
6439d63fdb69Smrg	   # provided the user.  The postdeps already come after the
6440d63fdb69Smrg	   # user supplied libs so there is no need to process them.
6441d63fdb69Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6442d63fdb69Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6443d63fdb69Smrg	   else
6444d63fdb69Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6445d63fdb69Smrg	   fi
6446d63fdb69Smrg	   ;;
6447d63fdb69Smrg	 # The "-l" case would never come before the object being
6448d63fdb69Smrg	 # linked, so don't bother handling this case.
6449d63fdb69Smrg	 esac
6450d63fdb69Smrg       else
6451d63fdb69Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6452d63fdb69Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6453d63fdb69Smrg	 else
6454d63fdb69Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6455d63fdb69Smrg	 fi
6456d63fdb69Smrg       fi
6457d63fdb69Smrg       ;;
64583da084b3Smrg
6459d63fdb69Smrg    *.$objext)
6460d63fdb69Smrg       # This assumes that the test object file only shows up
6461d63fdb69Smrg       # once in the compiler output.
6462d63fdb69Smrg       if test "$p" = "conftest.$objext"; then
6463d63fdb69Smrg	 pre_test_object_deps_done=yes
6464d63fdb69Smrg	 continue
6465d63fdb69Smrg       fi
6466d63fdb69Smrg
6467d63fdb69Smrg       if test "$pre_test_object_deps_done" = no; then
6468d63fdb69Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6469d63fdb69Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6470d63fdb69Smrg	 else
6471d63fdb69Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6472d63fdb69Smrg	 fi
6473d63fdb69Smrg       else
6474d63fdb69Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6475d63fdb69Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6476d63fdb69Smrg	 else
6477d63fdb69Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6478d63fdb69Smrg	 fi
6479d63fdb69Smrg       fi
64803da084b3Smrg       ;;
64813da084b3Smrg
6482d63fdb69Smrg    *) ;; # Ignore the rest.
64833da084b3Smrg
6484d63fdb69Smrg    esac
6485d63fdb69Smrg  done
64863da084b3Smrg
6487d63fdb69Smrg  # Clean up.
6488d63fdb69Smrg  rm -f a.out a.exe
6489d63fdb69Smrgelse
6490d63fdb69Smrg  echo "libtool.m4: error: problem compiling $1 test program"
6491d63fdb69Smrgfi
64923da084b3Smrg
6493d63fdb69Smrg$RM -f confest.$objext
64943da084b3Smrg
6495d63fdb69Smrg# PORTME: override above test on systems where it is broken
6496d63fdb69Smrgm4_if([$1], [CXX],
6497d63fdb69Smrg[case $host_os in
6498d63fdb69Smrginterix[[3-9]]*)
6499d63fdb69Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6500d63fdb69Smrg  # hack all around it, let's just trust "g++" to DTRT.
6501d63fdb69Smrg  _LT_TAGVAR(predep_objects,$1)=
6502d63fdb69Smrg  _LT_TAGVAR(postdep_objects,$1)=
6503d63fdb69Smrg  _LT_TAGVAR(postdeps,$1)=
6504d63fdb69Smrg  ;;
65053da084b3Smrg
6506d63fdb69Smrglinux*)
6507d63fdb69Smrg  case `$CC -V 2>&1 | sed 5q` in
6508d63fdb69Smrg  *Sun\ C*)
6509d63fdb69Smrg    # Sun C++ 5.9
6510d63fdb69Smrg
6511d63fdb69Smrg    # The more standards-conforming stlport4 library is
6512d63fdb69Smrg    # incompatible with the Cstd library. Avoid specifying
6513d63fdb69Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
6514d63fdb69Smrg    # -library=stlport4 depends on it.
6515d63fdb69Smrg    case " $CXX $CXXFLAGS " in
6516d63fdb69Smrg    *" -library=stlport4 "*)
6517d63fdb69Smrg      solaris_use_stlport4=yes
65183da084b3Smrg      ;;
6519d63fdb69Smrg    esac
65203da084b3Smrg
6521d63fdb69Smrg    if test "$solaris_use_stlport4" != yes; then
6522d63fdb69Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6523d63fdb69Smrg    fi
6524d63fdb69Smrg    ;;
6525d63fdb69Smrg  esac
6526d63fdb69Smrg  ;;
65273da084b3Smrg
6528d63fdb69Smrgsolaris*)
6529d63fdb69Smrg  case $cc_basename in
6530d63fdb69Smrg  CC*)
6531d63fdb69Smrg    # The more standards-conforming stlport4 library is
6532d63fdb69Smrg    # incompatible with the Cstd library. Avoid specifying
6533d63fdb69Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
6534d63fdb69Smrg    # -library=stlport4 depends on it.
6535d63fdb69Smrg    case " $CXX $CXXFLAGS " in
6536d63fdb69Smrg    *" -library=stlport4 "*)
6537d63fdb69Smrg      solaris_use_stlport4=yes
65383da084b3Smrg      ;;
6539d63fdb69Smrg    esac
65403da084b3Smrg
6541d63fdb69Smrg    # Adding this requires a known-good setup of shared libraries for
6542d63fdb69Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
6543d63fdb69Smrg    # archive will be linked into the output, leading to subtle bugs.
6544d63fdb69Smrg    if test "$solaris_use_stlport4" != yes; then
6545d63fdb69Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6546d63fdb69Smrg    fi
6547d63fdb69Smrg    ;;
6548d63fdb69Smrg  esac
6549d63fdb69Smrg  ;;
6550d63fdb69Smrgesac
6551d63fdb69Smrg])
65523da084b3Smrg
6553d63fdb69Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
6554d63fdb69Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6555d63fdb69Smrgesac
6556d63fdb69Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6557d63fdb69Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6558d63fdb69Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6559d63fdb69Smrgfi
6560d63fdb69Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6561d63fdb69Smrg    [The directories searched by this compiler when creating a shared library])
6562d63fdb69Smrg_LT_TAGDECL([], [predep_objects], [1],
6563d63fdb69Smrg    [Dependencies to place before and after the objects being linked to
6564d63fdb69Smrg    create a shared library])
6565d63fdb69Smrg_LT_TAGDECL([], [postdep_objects], [1])
6566d63fdb69Smrg_LT_TAGDECL([], [predeps], [1])
6567d63fdb69Smrg_LT_TAGDECL([], [postdeps], [1])
6568d63fdb69Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6569d63fdb69Smrg    [The library search path used internally by the compiler when linking
6570d63fdb69Smrg    a shared library])
6571d63fdb69Smrg])# _LT_SYS_HIDDEN_LIBDEPS
6572d63fdb69Smrg
6573d63fdb69Smrg
6574d63fdb69Smrg# _LT_PROG_F77
6575d63fdb69Smrg# ------------
6576d63fdb69Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6577d63fdb69Smrg# if there is no fortran compiler, we have our own version here.
6578d63fdb69Smrgm4_defun([_LT_PROG_F77],
6579d63fdb69Smrg[
6580d63fdb69Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6581d63fdb69SmrgAC_PROG_F77
6582d63fdb69Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
6583d63fdb69Smrg  _lt_disable_F77=yes
6584d63fdb69Smrgfi
6585d63fdb69Smrgpopdef([AC_MSG_ERROR])
6586d63fdb69Smrg])# _LT_PROG_F77
65873da084b3Smrg
6588d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
6589d63fdb69Smrgdnl AC_DEFUN([_LT_PROG_F77], [])
65903da084b3Smrg
65913da084b3Smrg
6592d63fdb69Smrg# _LT_LANG_F77_CONFIG([TAG])
6593d63fdb69Smrg# --------------------------
6594d63fdb69Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
6595d63fdb69Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6596d63fdb69Smrg# to write the compiler configuration to `libtool'.
6597d63fdb69Smrgm4_defun([_LT_LANG_F77_CONFIG],
6598d63fdb69Smrg[AC_REQUIRE([_LT_PROG_F77])dnl
6599d63fdb69SmrgAC_LANG_PUSH(Fortran 77)
66003da084b3Smrg
6601d63fdb69Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6602d63fdb69Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6603d63fdb69Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6604d63fdb69Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6605d63fdb69Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6606d63fdb69Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6607d63fdb69Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6608d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6609d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6610d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6611d63fdb69Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6612d63fdb69Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6613d63fdb69Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6614d63fdb69Smrg_LT_TAGVAR(module_cmds, $1)=
6615d63fdb69Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6616d63fdb69Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6617d63fdb69Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6618d63fdb69Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6619d63fdb69Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6620d63fdb69Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
66213da084b3Smrg
6622d63fdb69Smrg# Source file extension for f77 test sources.
6623d63fdb69Smrgac_ext=f
66243da084b3Smrg
6625d63fdb69Smrg# Object file extension for compiled f77 test sources.
6626d63fdb69Smrgobjext=o
6627d63fdb69Smrg_LT_TAGVAR(objext, $1)=$objext
6628d63fdb69Smrg
6629d63fdb69Smrg# No sense in running all these tests if we already determined that
6630d63fdb69Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6631d63fdb69Smrg# are currently assumed to apply to all compilers on this platform,
6632d63fdb69Smrg# and will be corrupted by setting them based on a non-working compiler.
6633d63fdb69Smrgif test "$_lt_disable_F77" != yes; then
6634d63fdb69Smrg  # Code to be used in simple compile tests
6635d63fdb69Smrg  lt_simple_compile_test_code="\
6636d63fdb69Smrg      subroutine t
6637d63fdb69Smrg      return
6638d63fdb69Smrg      end
6639d63fdb69Smrg"
66403da084b3Smrg
6641d63fdb69Smrg  # Code to be used in simple link tests
6642d63fdb69Smrg  lt_simple_link_test_code="\
6643d63fdb69Smrg      program t
6644d63fdb69Smrg      end
6645d63fdb69Smrg"
66463da084b3Smrg
6647d63fdb69Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6648d63fdb69Smrg  _LT_TAG_COMPILER
6649d63fdb69Smrg
6650d63fdb69Smrg  # save warnings/boilerplate of simple test code
6651d63fdb69Smrg  _LT_COMPILER_BOILERPLATE
6652d63fdb69Smrg  _LT_LINKER_BOILERPLATE
6653d63fdb69Smrg
6654d63fdb69Smrg  # Allow CC to be a program name with arguments.
6655d63fdb69Smrg  lt_save_CC="$CC"
6656d63fdb69Smrg  lt_save_GCC=$GCC
6657d63fdb69Smrg  CC=${F77-"f77"}
6658d63fdb69Smrg  compiler=$CC
6659d63fdb69Smrg  _LT_TAGVAR(compiler, $1)=$CC
66603da084b3Smrg  _LT_CC_BASENAME([$compiler])
6661d63fdb69Smrg  GCC=$G77
6662d63fdb69Smrg  if test -n "$compiler"; then
6663d63fdb69Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6664d63fdb69Smrg    AC_MSG_RESULT([$can_build_shared])
66653da084b3Smrg
6666d63fdb69Smrg    AC_MSG_CHECKING([whether to build shared libraries])
6667d63fdb69Smrg    test "$can_build_shared" = "no" && enable_shared=no
66683da084b3Smrg
6669d63fdb69Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
6670d63fdb69Smrg    # are all built from PIC.
6671d63fdb69Smrg    case $host_os in
6672d63fdb69Smrg      aix3*)
6673d63fdb69Smrg        test "$enable_shared" = yes && enable_static=no
6674d63fdb69Smrg        if test -n "$RANLIB"; then
6675d63fdb69Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6676d63fdb69Smrg          postinstall_cmds='$RANLIB $lib'
6677d63fdb69Smrg        fi
6678d63fdb69Smrg        ;;
6679d63fdb69Smrg      aix[[4-9]]*)
6680d63fdb69Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6681d63fdb69Smrg	  test "$enable_shared" = yes && enable_static=no
6682d63fdb69Smrg	fi
6683d63fdb69Smrg        ;;
66843da084b3Smrg    esac
6685d63fdb69Smrg    AC_MSG_RESULT([$enable_shared])
6686d63fdb69Smrg
6687d63fdb69Smrg    AC_MSG_CHECKING([whether to build static libraries])
6688d63fdb69Smrg    # Make sure either enable_shared or enable_static is yes.
6689d63fdb69Smrg    test "$enable_shared" = yes || enable_static=yes
6690d63fdb69Smrg    AC_MSG_RESULT([$enable_static])
6691d63fdb69Smrg
6692d63fdb69Smrg    _LT_TAGVAR(GCC, $1)="$G77"
6693d63fdb69Smrg    _LT_TAGVAR(LD, $1)="$LD"
6694d63fdb69Smrg
6695d63fdb69Smrg    ## CAVEAT EMPTOR:
6696d63fdb69Smrg    ## There is no encapsulation within the following macros, do not change
6697d63fdb69Smrg    ## the running order or otherwise move them around unless you know exactly
6698d63fdb69Smrg    ## what you are doing...
6699d63fdb69Smrg    _LT_COMPILER_PIC($1)
6700d63fdb69Smrg    _LT_COMPILER_C_O($1)
6701d63fdb69Smrg    _LT_COMPILER_FILE_LOCKS($1)
6702d63fdb69Smrg    _LT_LINKER_SHLIBS($1)
6703d63fdb69Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6704d63fdb69Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6705d63fdb69Smrg
6706d63fdb69Smrg    _LT_CONFIG($1)
6707d63fdb69Smrg  fi # test -n "$compiler"
6708d63fdb69Smrg
6709d63fdb69Smrg  GCC=$lt_save_GCC
6710d63fdb69Smrg  CC="$lt_save_CC"
6711d63fdb69Smrgfi # test "$_lt_disable_F77" != yes
67123da084b3Smrg
6713d63fdb69SmrgAC_LANG_POP
6714d63fdb69Smrg])# _LT_LANG_F77_CONFIG
67153da084b3Smrg
67163da084b3Smrg
6717d63fdb69Smrg# _LT_PROG_FC
6718d63fdb69Smrg# -----------
6719d63fdb69Smrg# Since AC_PROG_FC is broken, in that it returns the empty string
6720d63fdb69Smrg# if there is no fortran compiler, we have our own version here.
6721d63fdb69Smrgm4_defun([_LT_PROG_FC],
6722d63fdb69Smrg[
6723d63fdb69Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6724d63fdb69SmrgAC_PROG_FC
6725d63fdb69Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
6726d63fdb69Smrg  _lt_disable_FC=yes
6727d63fdb69Smrgfi
6728d63fdb69Smrgpopdef([AC_MSG_ERROR])
6729d63fdb69Smrg])# _LT_PROG_FC
67303da084b3Smrg
6731d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
6732d63fdb69Smrgdnl AC_DEFUN([_LT_PROG_FC], [])
67333da084b3Smrg
67343da084b3Smrg
6735d63fdb69Smrg# _LT_LANG_FC_CONFIG([TAG])
6736d63fdb69Smrg# -------------------------
6737d63fdb69Smrg# Ensure that the configuration variables for a Fortran compiler are
6738d63fdb69Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6739d63fdb69Smrg# to write the compiler configuration to `libtool'.
6740d63fdb69Smrgm4_defun([_LT_LANG_FC_CONFIG],
6741d63fdb69Smrg[AC_REQUIRE([_LT_PROG_FC])dnl
6742d63fdb69SmrgAC_LANG_PUSH(Fortran)
6743d63fdb69Smrg
6744d63fdb69Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6745d63fdb69Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6746d63fdb69Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6747d63fdb69Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6748d63fdb69Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6749d63fdb69Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6750d63fdb69Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6751d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6752d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6753d63fdb69Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6754d63fdb69Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6755d63fdb69Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6756d63fdb69Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6757d63fdb69Smrg_LT_TAGVAR(module_cmds, $1)=
6758d63fdb69Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6759d63fdb69Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6760d63fdb69Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6761d63fdb69Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6762d63fdb69Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6763d63fdb69Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6764d63fdb69Smrg
6765d63fdb69Smrg# Source file extension for fc test sources.
6766d63fdb69Smrgac_ext=${ac_fc_srcext-f}
6767d63fdb69Smrg
6768d63fdb69Smrg# Object file extension for compiled fc test sources.
6769d63fdb69Smrgobjext=o
6770d63fdb69Smrg_LT_TAGVAR(objext, $1)=$objext
6771d63fdb69Smrg
6772d63fdb69Smrg# No sense in running all these tests if we already determined that
6773d63fdb69Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
6774d63fdb69Smrg# are currently assumed to apply to all compilers on this platform,
6775d63fdb69Smrg# and will be corrupted by setting them based on a non-working compiler.
6776d63fdb69Smrgif test "$_lt_disable_FC" != yes; then
6777d63fdb69Smrg  # Code to be used in simple compile tests
6778d63fdb69Smrg  lt_simple_compile_test_code="\
6779d63fdb69Smrg      subroutine t
6780d63fdb69Smrg      return
6781d63fdb69Smrg      end
6782d63fdb69Smrg"
67833da084b3Smrg
6784d63fdb69Smrg  # Code to be used in simple link tests
6785d63fdb69Smrg  lt_simple_link_test_code="\
6786d63fdb69Smrg      program t
6787d63fdb69Smrg      end
6788d63fdb69Smrg"
67893da084b3Smrg
6790d63fdb69Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6791d63fdb69Smrg  _LT_TAG_COMPILER
67923da084b3Smrg
6793d63fdb69Smrg  # save warnings/boilerplate of simple test code
6794d63fdb69Smrg  _LT_COMPILER_BOILERPLATE
6795d63fdb69Smrg  _LT_LINKER_BOILERPLATE
67963da084b3Smrg
6797d63fdb69Smrg  # Allow CC to be a program name with arguments.
6798d63fdb69Smrg  lt_save_CC="$CC"
6799d63fdb69Smrg  lt_save_GCC=$GCC
6800d63fdb69Smrg  CC=${FC-"f95"}
6801d63fdb69Smrg  compiler=$CC
6802d63fdb69Smrg  GCC=$ac_cv_fc_compiler_gnu
68033da084b3Smrg
6804d63fdb69Smrg  _LT_TAGVAR(compiler, $1)=$CC
6805d63fdb69Smrg  _LT_CC_BASENAME([$compiler])
68063da084b3Smrg
6807d63fdb69Smrg  if test -n "$compiler"; then
6808d63fdb69Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6809d63fdb69Smrg    AC_MSG_RESULT([$can_build_shared])
68103da084b3Smrg
6811d63fdb69Smrg    AC_MSG_CHECKING([whether to build shared libraries])
6812d63fdb69Smrg    test "$can_build_shared" = "no" && enable_shared=no
68133da084b3Smrg
6814d63fdb69Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
6815d63fdb69Smrg    # are all built from PIC.
6816d63fdb69Smrg    case $host_os in
6817d63fdb69Smrg      aix3*)
6818d63fdb69Smrg        test "$enable_shared" = yes && enable_static=no
6819d63fdb69Smrg        if test -n "$RANLIB"; then
6820d63fdb69Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821d63fdb69Smrg          postinstall_cmds='$RANLIB $lib'
6822d63fdb69Smrg        fi
6823d63fdb69Smrg        ;;
6824d63fdb69Smrg      aix[[4-9]]*)
6825d63fdb69Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6826d63fdb69Smrg	  test "$enable_shared" = yes && enable_static=no
6827d63fdb69Smrg	fi
6828d63fdb69Smrg        ;;
6829d63fdb69Smrg    esac
6830d63fdb69Smrg    AC_MSG_RESULT([$enable_shared])
6831d63fdb69Smrg
6832d63fdb69Smrg    AC_MSG_CHECKING([whether to build static libraries])
6833d63fdb69Smrg    # Make sure either enable_shared or enable_static is yes.
6834d63fdb69Smrg    test "$enable_shared" = yes || enable_static=yes
6835d63fdb69Smrg    AC_MSG_RESULT([$enable_static])
6836d63fdb69Smrg
6837d63fdb69Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6838d63fdb69Smrg    _LT_TAGVAR(LD, $1)="$LD"
6839d63fdb69Smrg
6840d63fdb69Smrg    ## CAVEAT EMPTOR:
6841d63fdb69Smrg    ## There is no encapsulation within the following macros, do not change
6842d63fdb69Smrg    ## the running order or otherwise move them around unless you know exactly
6843d63fdb69Smrg    ## what you are doing...
6844d63fdb69Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6845d63fdb69Smrg    _LT_COMPILER_PIC($1)
6846d63fdb69Smrg    _LT_COMPILER_C_O($1)
6847d63fdb69Smrg    _LT_COMPILER_FILE_LOCKS($1)
6848d63fdb69Smrg    _LT_LINKER_SHLIBS($1)
6849d63fdb69Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6850d63fdb69Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6851d63fdb69Smrg
6852d63fdb69Smrg    _LT_CONFIG($1)
6853d63fdb69Smrg  fi # test -n "$compiler"
6854d63fdb69Smrg
6855d63fdb69Smrg  GCC=$lt_save_GCC
6856d63fdb69Smrg  CC="$lt_save_CC"
6857d63fdb69Smrgfi # test "$_lt_disable_FC" != yes
68583da084b3Smrg
6859d63fdb69SmrgAC_LANG_POP
6860d63fdb69Smrg])# _LT_LANG_FC_CONFIG
68613da084b3Smrg
68623da084b3Smrg
6863d63fdb69Smrg# _LT_LANG_GCJ_CONFIG([TAG])
6864d63fdb69Smrg# --------------------------
6865d63fdb69Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6866d63fdb69Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6867d63fdb69Smrg# to write the compiler configuration to `libtool'.
6868d63fdb69Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
6869d63fdb69Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6870d63fdb69SmrgAC_LANG_SAVE
68713da084b3Smrg
6872d63fdb69Smrg# Source file extension for Java test sources.
6873d63fdb69Smrgac_ext=java
68743da084b3Smrg
6875d63fdb69Smrg# Object file extension for compiled Java test sources.
6876d63fdb69Smrgobjext=o
6877d63fdb69Smrg_LT_TAGVAR(objext, $1)=$objext
68783da084b3Smrg
6879d63fdb69Smrg# Code to be used in simple compile tests
6880d63fdb69Smrglt_simple_compile_test_code="class foo {}"
68813da084b3Smrg
6882d63fdb69Smrg# Code to be used in simple link tests
6883d63fdb69Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
68843da084b3Smrg
6885d63fdb69Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6886d63fdb69Smrg_LT_TAG_COMPILER
68873da084b3Smrg
6888d63fdb69Smrg# save warnings/boilerplate of simple test code
6889d63fdb69Smrg_LT_COMPILER_BOILERPLATE
6890d63fdb69Smrg_LT_LINKER_BOILERPLATE
68913da084b3Smrg
6892d63fdb69Smrg# Allow CC to be a program name with arguments.
6893d63fdb69Smrglt_save_CC="$CC"
6894d63fdb69Smrglt_save_GCC=$GCC
6895d63fdb69SmrgGCC=yes
6896d63fdb69SmrgCC=${GCJ-"gcj"}
6897d63fdb69Smrgcompiler=$CC
6898d63fdb69Smrg_LT_TAGVAR(compiler, $1)=$CC
6899d63fdb69Smrg_LT_TAGVAR(LD, $1)="$LD"
6900d63fdb69Smrg_LT_CC_BASENAME([$compiler])
69013da084b3Smrg
6902d63fdb69Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6903d63fdb69Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69043da084b3Smrg
6905d63fdb69Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
69063da084b3Smrg
6907d63fdb69Smrgif test -n "$compiler"; then
6908d63fdb69Smrg  _LT_COMPILER_NO_RTTI($1)
6909d63fdb69Smrg  _LT_COMPILER_PIC($1)
6910d63fdb69Smrg  _LT_COMPILER_C_O($1)
6911d63fdb69Smrg  _LT_COMPILER_FILE_LOCKS($1)
6912d63fdb69Smrg  _LT_LINKER_SHLIBS($1)
6913d63fdb69Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
69143da084b3Smrg
6915d63fdb69Smrg  _LT_CONFIG($1)
6916d63fdb69Smrgfi
69173da084b3Smrg
6918d63fdb69SmrgAC_LANG_RESTORE
69193da084b3Smrg
6920d63fdb69SmrgGCC=$lt_save_GCC
6921d63fdb69SmrgCC="$lt_save_CC"
6922d63fdb69Smrg])# _LT_LANG_GCJ_CONFIG
69233da084b3Smrg
69243da084b3Smrg
6925d63fdb69Smrg# _LT_LANG_RC_CONFIG([TAG])
6926d63fdb69Smrg# -------------------------
6927d63fdb69Smrg# Ensure that the configuration variables for the Windows resource compiler
6928d63fdb69Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6929d63fdb69Smrg# to write the compiler configuration to `libtool'.
6930d63fdb69Smrgm4_defun([_LT_LANG_RC_CONFIG],
6931d63fdb69Smrg[AC_REQUIRE([LT_PROG_RC])dnl
6932d63fdb69SmrgAC_LANG_SAVE
69333da084b3Smrg
6934d63fdb69Smrg# Source file extension for RC test sources.
6935d63fdb69Smrgac_ext=rc
69363da084b3Smrg
6937d63fdb69Smrg# Object file extension for compiled RC test sources.
6938d63fdb69Smrgobjext=o
6939d63fdb69Smrg_LT_TAGVAR(objext, $1)=$objext
69403da084b3Smrg
6941d63fdb69Smrg# Code to be used in simple compile tests
6942d63fdb69Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
69433da084b3Smrg
6944d63fdb69Smrg# Code to be used in simple link tests
6945d63fdb69Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
69463da084b3Smrg
6947d63fdb69Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6948d63fdb69Smrg_LT_TAG_COMPILER
69493da084b3Smrg
6950d63fdb69Smrg# save warnings/boilerplate of simple test code
6951d63fdb69Smrg_LT_COMPILER_BOILERPLATE
6952d63fdb69Smrg_LT_LINKER_BOILERPLATE
69533da084b3Smrg
6954d63fdb69Smrg# Allow CC to be a program name with arguments.
6955d63fdb69Smrglt_save_CC="$CC"
6956d63fdb69Smrglt_save_GCC=$GCC
6957d63fdb69SmrgGCC=
6958d63fdb69SmrgCC=${RC-"windres"}
6959d63fdb69Smrgcompiler=$CC
6960d63fdb69Smrg_LT_TAGVAR(compiler, $1)=$CC
6961d63fdb69Smrg_LT_CC_BASENAME([$compiler])
6962d63fdb69Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
69633da084b3Smrg
6964d63fdb69Smrgif test -n "$compiler"; then
6965d63fdb69Smrg  :
6966d63fdb69Smrg  _LT_CONFIG($1)
6967d63fdb69Smrgfi
69683da084b3Smrg
6969d63fdb69SmrgGCC=$lt_save_GCC
6970d63fdb69SmrgAC_LANG_RESTORE
6971d63fdb69SmrgCC="$lt_save_CC"
6972d63fdb69Smrg])# _LT_LANG_RC_CONFIG
69733da084b3Smrg
69743da084b3Smrg
6975d63fdb69Smrg# LT_PROG_GCJ
6976d63fdb69Smrg# -----------
6977d63fdb69SmrgAC_DEFUN([LT_PROG_GCJ],
6978d63fdb69Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6979d63fdb69Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6980d63fdb69Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
6981d63fdb69Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6982d63fdb69Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
6983d63fdb69Smrg])
69843da084b3Smrg
6985d63fdb69Smrg# Old name:
6986d63fdb69SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6987d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
6988d63fdb69Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
69893da084b3Smrg
69903da084b3Smrg
6991d63fdb69Smrg# LT_PROG_RC
6992d63fdb69Smrg# ----------
6993d63fdb69SmrgAC_DEFUN([LT_PROG_RC],
6994d63fdb69Smrg[AC_CHECK_TOOL(RC, windres,)
6995d63fdb69Smrg])
69963da084b3Smrg
6997d63fdb69Smrg# Old name:
6998d63fdb69SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6999d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7000d63fdb69Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
70013da084b3Smrg
70023da084b3Smrg
7003d63fdb69Smrg# _LT_DECL_EGREP
7004d63fdb69Smrg# --------------
7005d63fdb69Smrg# If we don't have a new enough Autoconf to choose the best grep
7006d63fdb69Smrg# available, choose the one first in the user's PATH.
7007d63fdb69Smrgm4_defun([_LT_DECL_EGREP],
7008d63fdb69Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7009d63fdb69SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7010d63fdb69Smrgtest -z "$GREP" && GREP=grep
7011d63fdb69Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7012d63fdb69Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7013d63fdb69Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7014d63fdb69Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7015d63fdb69SmrgAC_SUBST([GREP])
7016d63fdb69Smrg])
70173da084b3Smrg
70183da084b3Smrg
7019d63fdb69Smrg# _LT_DECL_OBJDUMP
7020d63fdb69Smrg# --------------
7021d63fdb69Smrg# If we don't have a new enough Autoconf to choose the best objdump
7022d63fdb69Smrg# available, choose the one first in the user's PATH.
7023d63fdb69Smrgm4_defun([_LT_DECL_OBJDUMP],
7024d63fdb69Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7025d63fdb69Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7026d63fdb69Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7027d63fdb69SmrgAC_SUBST([OBJDUMP])
7028d63fdb69Smrg])
70293da084b3Smrg
70303da084b3Smrg
7031d63fdb69Smrg# _LT_DECL_SED
7032d63fdb69Smrg# ------------
7033d63fdb69Smrg# Check for a fully-functional sed program, that truncates
7034d63fdb69Smrg# as few characters as possible.  Prefer GNU sed if found.
7035d63fdb69Smrgm4_defun([_LT_DECL_SED],
7036d63fdb69Smrg[AC_PROG_SED
7037d63fdb69Smrgtest -z "$SED" && SED=sed
7038d63fdb69SmrgXsed="$SED -e 1s/^X//"
7039d63fdb69Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7040d63fdb69Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7041d63fdb69Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7042d63fdb69Smrg])# _LT_DECL_SED
70433da084b3Smrg
7044d63fdb69Smrgm4_ifndef([AC_PROG_SED], [
7045d63fdb69Smrg# NOTE: This macro has been submitted for inclusion into   #
7046d63fdb69Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7047d63fdb69Smrg#  a released version of Autoconf we should remove this    #
7048d63fdb69Smrg#  macro and use it instead.                               #
70493da084b3Smrg
7050d63fdb69Smrgm4_defun([AC_PROG_SED],
70513da084b3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
70523da084b3SmrgAC_CACHE_VAL(lt_cv_path_SED,
70533da084b3Smrg[# Loop through the user's path and test for sed and gsed.
70543da084b3Smrg# Then use that list of sed's as ones to test for truncation.
70553da084b3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70563da084b3Smrgfor as_dir in $PATH
70573da084b3Smrgdo
70583da084b3Smrg  IFS=$as_save_IFS
70593da084b3Smrg  test -z "$as_dir" && as_dir=.
70603da084b3Smrg  for lt_ac_prog in sed gsed; do
70613da084b3Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
70623da084b3Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
70633da084b3Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
70643da084b3Smrg      fi
70653da084b3Smrg    done
70663da084b3Smrg  done
70673da084b3Smrgdone
7068d63fdb69SmrgIFS=$as_save_IFS
70693da084b3Smrglt_ac_max=0
70703da084b3Smrglt_ac_count=0
70713da084b3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
70723da084b3Smrg# along with /bin/sed that truncates output.
70733da084b3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
70743da084b3Smrg  test ! -f $lt_ac_sed && continue
70753da084b3Smrg  cat /dev/null > conftest.in
70763da084b3Smrg  lt_ac_count=0
70773da084b3Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
70783da084b3Smrg  # Check for GNU sed and select it if it is found.
70793da084b3Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
70803da084b3Smrg    lt_cv_path_SED=$lt_ac_sed
70813da084b3Smrg    break
70823da084b3Smrg  fi
70833da084b3Smrg  while true; do
70843da084b3Smrg    cat conftest.in conftest.in >conftest.tmp
70853da084b3Smrg    mv conftest.tmp conftest.in
70863da084b3Smrg    cp conftest.in conftest.nl
70873da084b3Smrg    echo >>conftest.nl
70883da084b3Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
70893da084b3Smrg    cmp -s conftest.out conftest.nl || break
70903da084b3Smrg    # 10000 chars as input seems more than enough
70913da084b3Smrg    test $lt_ac_count -gt 10 && break
70923da084b3Smrg    lt_ac_count=`expr $lt_ac_count + 1`
70933da084b3Smrg    if test $lt_ac_count -gt $lt_ac_max; then
70943da084b3Smrg      lt_ac_max=$lt_ac_count
70953da084b3Smrg      lt_cv_path_SED=$lt_ac_sed
70963da084b3Smrg    fi
70973da084b3Smrg  done
70983da084b3Smrgdone
70993da084b3Smrg])
71003da084b3SmrgSED=$lt_cv_path_SED
7101d63fdb69SmrgAC_SUBST([SED])
71023da084b3SmrgAC_MSG_RESULT([$SED])
7103d63fdb69Smrg])#AC_PROG_SED
7104d63fdb69Smrg])#m4_ifndef
71053da084b3Smrg
7106d63fdb69Smrg# Old name:
7107d63fdb69SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7108d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7109d63fdb69Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
71103da084b3Smrg
7111d63fdb69Smrg
7112d63fdb69Smrg# _LT_CHECK_SHELL_FEATURES
7113d63fdb69Smrg# ------------------------
7114d63fdb69Smrg# Find out whether the shell is Bourne or XSI compatible,
7115d63fdb69Smrg# or has some other useful features.
7116d63fdb69Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7117d63fdb69Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7118d63fdb69Smrg# Try some XSI features
7119d63fdb69Smrgxsi_shell=no
7120d63fdb69Smrg( _lt_dummy="a/b/c"
7121d63fdb69Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7122d63fdb69Smrg      = c,a/b,, \
7123d63fdb69Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7124d63fdb69Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7125d63fdb69Smrg  && xsi_shell=yes
7126d63fdb69SmrgAC_MSG_RESULT([$xsi_shell])
7127d63fdb69Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7128d63fdb69Smrg
7129d63fdb69SmrgAC_MSG_CHECKING([whether the shell understands "+="])
7130d63fdb69Smrglt_shell_append=no
7131d63fdb69Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7132d63fdb69Smrg    >/dev/null 2>&1 \
7133d63fdb69Smrg  && lt_shell_append=yes
7134d63fdb69SmrgAC_MSG_RESULT([$lt_shell_append])
7135d63fdb69Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7136d63fdb69Smrg
7137d63fdb69Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7138d63fdb69Smrg  lt_unset=unset
7139d63fdb69Smrgelse
7140d63fdb69Smrg  lt_unset=false
71413da084b3Smrgfi
7142d63fdb69Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7143d63fdb69Smrg
7144d63fdb69Smrg# test EBCDIC or ASCII
7145d63fdb69Smrgcase `echo X|tr X '\101'` in
7146d63fdb69Smrg A) # ASCII based system
7147d63fdb69Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7148d63fdb69Smrg  lt_SP2NL='tr \040 \012'
7149d63fdb69Smrg  lt_NL2SP='tr \015\012 \040\040'
7150d63fdb69Smrg  ;;
7151d63fdb69Smrg *) # EBCDIC based system
7152d63fdb69Smrg  lt_SP2NL='tr \100 \n'
7153d63fdb69Smrg  lt_NL2SP='tr \r\n \100\100'
7154d63fdb69Smrg  ;;
7155d63fdb69Smrgesac
7156d63fdb69Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7157d63fdb69Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7158d63fdb69Smrg])# _LT_CHECK_SHELL_FEATURES
71593da084b3Smrg
71603da084b3Smrg
7161d63fdb69Smrg# _LT_PROG_XSI_SHELLFNS
7162d63fdb69Smrg# ---------------------
7163d63fdb69Smrg# Bourne and XSI compatible variants of some useful shell functions.
7164d63fdb69Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7165d63fdb69Smrg[case $xsi_shell in
7166d63fdb69Smrg  yes)
7167d63fdb69Smrg    cat << \_LT_EOF >> "$cfgfile"
7168d63fdb69Smrg
7169d63fdb69Smrg# func_dirname file append nondir_replacement
7170d63fdb69Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7171d63fdb69Smrg# otherwise set result to NONDIR_REPLACEMENT.
7172d63fdb69Smrgfunc_dirname ()
7173d63fdb69Smrg{
7174d63fdb69Smrg  case ${1} in
7175d63fdb69Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
7176d63fdb69Smrg    *  ) func_dirname_result="${3}" ;;
7177d63fdb69Smrg  esac
7178d63fdb69Smrg}
71793da084b3Smrg
7180d63fdb69Smrg# func_basename file
7181d63fdb69Smrgfunc_basename ()
7182d63fdb69Smrg{
7183d63fdb69Smrg  func_basename_result="${1##*/}"
7184d63fdb69Smrg}
71853da084b3Smrg
7186d63fdb69Smrg# func_dirname_and_basename file append nondir_replacement
7187d63fdb69Smrg# perform func_basename and func_dirname in a single function
7188d63fdb69Smrg# call:
7189d63fdb69Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7190d63fdb69Smrg#             add APPEND to the result, otherwise set result
7191d63fdb69Smrg#             to NONDIR_REPLACEMENT.
7192d63fdb69Smrg#             value returned in "$func_dirname_result"
7193d63fdb69Smrg#   basename: Compute filename of FILE.
7194d63fdb69Smrg#             value retuned in "$func_basename_result"
7195d63fdb69Smrg# Implementation must be kept synchronized with func_dirname
7196d63fdb69Smrg# and func_basename. For efficiency, we do not delegate to
7197d63fdb69Smrg# those functions but instead duplicate the functionality here.
7198d63fdb69Smrgfunc_dirname_and_basename ()
7199d63fdb69Smrg{
7200d63fdb69Smrg  case ${1} in
7201d63fdb69Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
7202d63fdb69Smrg    *  ) func_dirname_result="${3}" ;;
7203d63fdb69Smrg  esac
7204d63fdb69Smrg  func_basename_result="${1##*/}"
7205d63fdb69Smrg}
72063da084b3Smrg
7207d63fdb69Smrg# func_stripname prefix suffix name
7208d63fdb69Smrg# strip PREFIX and SUFFIX off of NAME.
7209d63fdb69Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7210d63fdb69Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7211d63fdb69Smrg# dot (in which case that matches only a dot).
7212d63fdb69Smrgfunc_stripname ()
7213d63fdb69Smrg{
7214d63fdb69Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7215d63fdb69Smrg  # positional parameters, so assign one to ordinary parameter first.
7216d63fdb69Smrg  func_stripname_result=${3}
7217d63fdb69Smrg  func_stripname_result=${func_stripname_result#"${1}"}
7218d63fdb69Smrg  func_stripname_result=${func_stripname_result%"${2}"}
7219d63fdb69Smrg}
72203da084b3Smrg
7221d63fdb69Smrg# func_opt_split
7222d63fdb69Smrgfunc_opt_split ()
7223d63fdb69Smrg{
7224d63fdb69Smrg  func_opt_split_opt=${1%%=*}
7225d63fdb69Smrg  func_opt_split_arg=${1#*=}
7226d63fdb69Smrg}
72273da084b3Smrg
7228d63fdb69Smrg# func_lo2o object
7229d63fdb69Smrgfunc_lo2o ()
7230d63fdb69Smrg{
7231d63fdb69Smrg  case ${1} in
7232d63fdb69Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7233d63fdb69Smrg    *)    func_lo2o_result=${1} ;;
7234d63fdb69Smrg  esac
7235d63fdb69Smrg}
72363da084b3Smrg
7237d63fdb69Smrg# func_xform libobj-or-source
7238d63fdb69Smrgfunc_xform ()
7239d63fdb69Smrg{
7240d63fdb69Smrg  func_xform_result=${1%.*}.lo
7241d63fdb69Smrg}
72423da084b3Smrg
7243d63fdb69Smrg# func_arith arithmetic-term...
7244d63fdb69Smrgfunc_arith ()
7245d63fdb69Smrg{
7246d63fdb69Smrg  func_arith_result=$(( $[*] ))
7247d63fdb69Smrg}
72483da084b3Smrg
7249d63fdb69Smrg# func_len string
7250d63fdb69Smrg# STRING may not start with a hyphen.
7251d63fdb69Smrgfunc_len ()
7252d63fdb69Smrg{
7253d63fdb69Smrg  func_len_result=${#1}
7254d63fdb69Smrg}
72553da084b3Smrg
7256d63fdb69Smrg_LT_EOF
7257d63fdb69Smrg    ;;
7258d63fdb69Smrg  *) # Bourne compatible functions.
7259d63fdb69Smrg    cat << \_LT_EOF >> "$cfgfile"
72603da084b3Smrg
7261d63fdb69Smrg# func_dirname file append nondir_replacement
7262d63fdb69Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7263d63fdb69Smrg# otherwise set result to NONDIR_REPLACEMENT.
7264d63fdb69Smrgfunc_dirname ()
7265d63fdb69Smrg{
7266d63fdb69Smrg  # Extract subdirectory from the argument.
7267d63fdb69Smrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7268d63fdb69Smrg  if test "X$func_dirname_result" = "X${1}"; then
7269d63fdb69Smrg    func_dirname_result="${3}"
7270d63fdb69Smrg  else
7271d63fdb69Smrg    func_dirname_result="$func_dirname_result${2}"
7272d63fdb69Smrg  fi
7273d63fdb69Smrg}
72743da084b3Smrg
7275d63fdb69Smrg# func_basename file
7276d63fdb69Smrgfunc_basename ()
7277d63fdb69Smrg{
7278d63fdb69Smrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7279d63fdb69Smrg}
72803da084b3Smrg
7281d63fdb69Smrgdnl func_dirname_and_basename
7282d63fdb69Smrgdnl A portable version of this function is already defined in general.m4sh
7283d63fdb69Smrgdnl so there is no need for it here.
7284d63fdb69Smrg
7285d63fdb69Smrg# func_stripname prefix suffix name
7286d63fdb69Smrg# strip PREFIX and SUFFIX off of NAME.
7287d63fdb69Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7288d63fdb69Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7289d63fdb69Smrg# dot (in which case that matches only a dot).
7290d63fdb69Smrg# func_strip_suffix prefix name
7291d63fdb69Smrgfunc_stripname ()
7292d63fdb69Smrg{
7293d63fdb69Smrg  case ${2} in
7294d63fdb69Smrg    .*) func_stripname_result=`$ECHO "X${3}" \
7295d63fdb69Smrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7296d63fdb69Smrg    *)  func_stripname_result=`$ECHO "X${3}" \
7297d63fdb69Smrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7298d63fdb69Smrg  esac
7299d63fdb69Smrg}
73003da084b3Smrg
7301d63fdb69Smrg# sed scripts:
7302d63fdb69Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7303d63fdb69Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
73043da084b3Smrg
7305d63fdb69Smrg# func_opt_split
7306d63fdb69Smrgfunc_opt_split ()
7307d63fdb69Smrg{
7308d63fdb69Smrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7309d63fdb69Smrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7310d63fdb69Smrg}
73113da084b3Smrg
7312d63fdb69Smrg# func_lo2o object
7313d63fdb69Smrgfunc_lo2o ()
7314d63fdb69Smrg{
7315d63fdb69Smrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7316d63fdb69Smrg}
73173da084b3Smrg
7318d63fdb69Smrg# func_xform libobj-or-source
7319d63fdb69Smrgfunc_xform ()
7320d63fdb69Smrg{
7321d63fdb69Smrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7322d63fdb69Smrg}
73233da084b3Smrg
7324d63fdb69Smrg# func_arith arithmetic-term...
7325d63fdb69Smrgfunc_arith ()
7326d63fdb69Smrg{
7327d63fdb69Smrg  func_arith_result=`expr "$[@]"`
7328d63fdb69Smrg}
73293da084b3Smrg
7330d63fdb69Smrg# func_len string
7331d63fdb69Smrg# STRING may not start with a hyphen.
7332d63fdb69Smrgfunc_len ()
7333d63fdb69Smrg{
7334d63fdb69Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7335d63fdb69Smrg}
73363da084b3Smrg
7337d63fdb69Smrg_LT_EOF
7338d63fdb69Smrgesac
73393da084b3Smrg
7340d63fdb69Smrgcase $lt_shell_append in
7341d63fdb69Smrg  yes)
7342d63fdb69Smrg    cat << \_LT_EOF >> "$cfgfile"
73433da084b3Smrg
7344d63fdb69Smrg# func_append var value
7345d63fdb69Smrg# Append VALUE to the end of shell variable VAR.
7346d63fdb69Smrgfunc_append ()
7347d63fdb69Smrg{
7348d63fdb69Smrg  eval "$[1]+=\$[2]"
7349d63fdb69Smrg}
7350d63fdb69Smrg_LT_EOF
7351d63fdb69Smrg    ;;
7352d63fdb69Smrg  *)
7353d63fdb69Smrg    cat << \_LT_EOF >> "$cfgfile"
73543da084b3Smrg
7355d63fdb69Smrg# func_append var value
7356d63fdb69Smrg# Append VALUE to the end of shell variable VAR.
7357d63fdb69Smrgfunc_append ()
7358d63fdb69Smrg{
7359d63fdb69Smrg  eval "$[1]=\$$[1]\$[2]"
7360d63fdb69Smrg}
73613da084b3Smrg
7362d63fdb69Smrg_LT_EOF
7363d63fdb69Smrg    ;;
7364d63fdb69Smrg  esac
7365d63fdb69Smrg])
73663da084b3Smrg
7367d63fdb69Smrg# Helper functions for option handling.                    -*- Autoconf -*-
7368d63fdb69Smrg#
7369d63fdb69Smrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7370d63fdb69Smrg#   Written by Gary V. Vaughan, 2004
7371d63fdb69Smrg#
7372d63fdb69Smrg# This file is free software; the Free Software Foundation gives
7373d63fdb69Smrg# unlimited permission to copy and/or distribute it, with or without
7374d63fdb69Smrg# modifications, as long as this notice is preserved.
73753da084b3Smrg
7376d63fdb69Smrg# serial 6 ltoptions.m4
73773da084b3Smrg
7378d63fdb69Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7379d63fdb69SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
73803da084b3Smrg
73813da084b3Smrg
7382d63fdb69Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7383d63fdb69Smrg# ------------------------------------------
7384d63fdb69Smrgm4_define([_LT_MANGLE_OPTION],
7385d63fdb69Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
73863da084b3Smrg
73873da084b3Smrg
7388d63fdb69Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7389d63fdb69Smrg# ---------------------------------------
7390d63fdb69Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7391d63fdb69Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7392d63fdb69Smrg# saved as a flag.
7393d63fdb69Smrgm4_define([_LT_SET_OPTION],
7394d63fdb69Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7395d63fdb69Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7396d63fdb69Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
7397d63fdb69Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7398d63fdb69Smrg])
73993da084b3Smrg
74003da084b3Smrg
7401d63fdb69Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7402d63fdb69Smrg# ------------------------------------------------------------
7403d63fdb69Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7404d63fdb69Smrgm4_define([_LT_IF_OPTION],
7405d63fdb69Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7406d63fdb69Smrg
7407d63fdb69Smrg
7408d63fdb69Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7409d63fdb69Smrg# -------------------------------------------------------
7410d63fdb69Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7411d63fdb69Smrg# are set.
7412d63fdb69Smrgm4_define([_LT_UNLESS_OPTIONS],
7413d63fdb69Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7414d63fdb69Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7415d63fdb69Smrg		      [m4_define([$0_found])])])[]dnl
7416d63fdb69Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7417d63fdb69Smrg])[]dnl
7418d63fdb69Smrg])
74193da084b3Smrg
74203da084b3Smrg
7421d63fdb69Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7422d63fdb69Smrg# ----------------------------------------
7423d63fdb69Smrg# OPTION-LIST is a space-separated list of Libtool options associated
7424d63fdb69Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7425d63fdb69Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7426d63fdb69Smrg# the unknown option and exit.
7427d63fdb69Smrgm4_defun([_LT_SET_OPTIONS],
7428d63fdb69Smrg[# Set options
7429d63fdb69Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430d63fdb69Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
7431d63fdb69Smrg
7432d63fdb69Smrgm4_if([$1],[LT_INIT],[
7433d63fdb69Smrg  dnl
7434d63fdb69Smrg  dnl Simply set some default values (i.e off) if boolean options were not
7435d63fdb69Smrg  dnl specified:
7436d63fdb69Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7437d63fdb69Smrg  ])
7438d63fdb69Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7439d63fdb69Smrg  ])
7440d63fdb69Smrg  dnl
7441d63fdb69Smrg  dnl If no reference was made to various pairs of opposing options, then
7442d63fdb69Smrg  dnl we run the default mode handler for the pair.  For example, if neither
7443d63fdb69Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7444d63fdb69Smrg  dnl archives by default:
7445d63fdb69Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7446d63fdb69Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7447d63fdb69Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7448d63fdb69Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7449d63fdb69Smrg  		   [_LT_ENABLE_FAST_INSTALL])
7450d63fdb69Smrg  ])
7451d63fdb69Smrg])# _LT_SET_OPTIONS
74523da084b3Smrg
74533da084b3Smrg
74543da084b3Smrg
7455d63fdb69Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7456d63fdb69Smrg# -----------------------------------------
7457d63fdb69Smrgm4_define([_LT_MANGLE_DEFUN],
7458d63fdb69Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
74593da084b3Smrg
74603da084b3Smrg
7461d63fdb69Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7462d63fdb69Smrg# -----------------------------------------------
7463d63fdb69Smrgm4_define([LT_OPTION_DEFINE],
7464d63fdb69Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7465d63fdb69Smrg])# LT_OPTION_DEFINE
74663da084b3Smrg
74673da084b3Smrg
7468d63fdb69Smrg# dlopen
7469d63fdb69Smrg# ------
7470d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7471d63fdb69Smrg])
74723da084b3Smrg
7473d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7474d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7475d63fdb69SmrgAC_DIAGNOSE([obsolete],
7476d63fdb69Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7477d63fdb69Smrgput the `dlopen' option into LT_INIT's first parameter.])
7478d63fdb69Smrg])
74793da084b3Smrg
7480d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7481d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
74823da084b3Smrg
74833da084b3Smrg
7484d63fdb69Smrg# win32-dll
7485d63fdb69Smrg# ---------
7486d63fdb69Smrg# Declare package support for building win32 dll's.
7487d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7488d63fdb69Smrg[enable_win32_dll=yes
74893da084b3Smrg
7490d63fdb69Smrgcase $host in
7491d63fdb69Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7492d63fdb69Smrg  AC_CHECK_TOOL(AS, as, false)
7493d63fdb69Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7494d63fdb69Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7495d63fdb69Smrg  ;;
7496d63fdb69Smrgesac
74973da084b3Smrg
7498d63fdb69Smrgtest -z "$AS" && AS=as
7499d63fdb69Smrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
75003da084b3Smrg
7501d63fdb69Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7502d63fdb69Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
75033da084b3Smrg
7504d63fdb69Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7505d63fdb69Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7506d63fdb69Smrg])# win32-dll
75073da084b3Smrg
7508d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7509d63fdb69Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7510d63fdb69Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7511d63fdb69SmrgAC_DIAGNOSE([obsolete],
7512d63fdb69Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7513d63fdb69Smrgput the `win32-dll' option into LT_INIT's first parameter.])
7514d63fdb69Smrg])
75153da084b3Smrg
7516d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7517d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
75183da084b3Smrg
75193da084b3Smrg
7520d63fdb69Smrg# _LT_ENABLE_SHARED([DEFAULT])
7521d63fdb69Smrg# ----------------------------
7522d63fdb69Smrg# implement the --enable-shared flag, and supports the `shared' and
7523d63fdb69Smrg# `disable-shared' LT_INIT options.
7524d63fdb69Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7525d63fdb69Smrgm4_define([_LT_ENABLE_SHARED],
7526d63fdb69Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7527d63fdb69SmrgAC_ARG_ENABLE([shared],
7528d63fdb69Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7529d63fdb69Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7530d63fdb69Smrg    [p=${PACKAGE-default}
7531d63fdb69Smrg    case $enableval in
7532d63fdb69Smrg    yes) enable_shared=yes ;;
7533d63fdb69Smrg    no) enable_shared=no ;;
7534d63fdb69Smrg    *)
7535d63fdb69Smrg      enable_shared=no
7536d63fdb69Smrg      # Look at the argument we got.  We use all the common list separators.
7537d63fdb69Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7538d63fdb69Smrg      for pkg in $enableval; do
7539d63fdb69Smrg	IFS="$lt_save_ifs"
7540d63fdb69Smrg	if test "X$pkg" = "X$p"; then
7541d63fdb69Smrg	  enable_shared=yes
7542d63fdb69Smrg	fi
7543d63fdb69Smrg      done
7544d63fdb69Smrg      IFS="$lt_save_ifs"
7545d63fdb69Smrg      ;;
7546d63fdb69Smrg    esac],
7547d63fdb69Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
75483da084b3Smrg
7549d63fdb69Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7550d63fdb69Smrg	[Whether or not to build shared libraries])
7551d63fdb69Smrg])# _LT_ENABLE_SHARED
75523da084b3Smrg
7553d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7554d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
75553da084b3Smrg
7556d63fdb69Smrg# Old names:
7557d63fdb69SmrgAC_DEFUN([AC_ENABLE_SHARED],
7558d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7559d63fdb69Smrg])
75603da084b3Smrg
7561d63fdb69SmrgAC_DEFUN([AC_DISABLE_SHARED],
7562d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7563d63fdb69Smrg])
75643da084b3Smrg
7565d63fdb69SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7566d63fdb69SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
75673da084b3Smrg
7568d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7569d63fdb69Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7570d63fdb69Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
75713da084b3Smrg
75723da084b3Smrg
7573d63fdb69Smrg
7574d63fdb69Smrg# _LT_ENABLE_STATIC([DEFAULT])
7575d63fdb69Smrg# ----------------------------
7576d63fdb69Smrg# implement the --enable-static flag, and support the `static' and
7577d63fdb69Smrg# `disable-static' LT_INIT options.
7578d63fdb69Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7579d63fdb69Smrgm4_define([_LT_ENABLE_STATIC],
7580d63fdb69Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7581d63fdb69SmrgAC_ARG_ENABLE([static],
7582d63fdb69Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7583d63fdb69Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7584d63fdb69Smrg    [p=${PACKAGE-default}
7585d63fdb69Smrg    case $enableval in
7586d63fdb69Smrg    yes) enable_static=yes ;;
7587d63fdb69Smrg    no) enable_static=no ;;
7588d63fdb69Smrg    *)
7589d63fdb69Smrg     enable_static=no
7590d63fdb69Smrg      # Look at the argument we got.  We use all the common list separators.
7591d63fdb69Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7592d63fdb69Smrg      for pkg in $enableval; do
7593d63fdb69Smrg	IFS="$lt_save_ifs"
7594d63fdb69Smrg	if test "X$pkg" = "X$p"; then
7595d63fdb69Smrg	  enable_static=yes
75963da084b3Smrg	fi
7597d63fdb69Smrg      done
7598d63fdb69Smrg      IFS="$lt_save_ifs"
7599d63fdb69Smrg      ;;
7600d63fdb69Smrg    esac],
7601d63fdb69Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
76023da084b3Smrg
7603d63fdb69Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
7604d63fdb69Smrg	[Whether or not to build static libraries])
7605d63fdb69Smrg])# _LT_ENABLE_STATIC
76063da084b3Smrg
7607d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7608d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
76093da084b3Smrg
7610d63fdb69Smrg# Old names:
7611d63fdb69SmrgAC_DEFUN([AC_ENABLE_STATIC],
7612d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
76133da084b3Smrg])
76143da084b3Smrg
7615d63fdb69SmrgAC_DEFUN([AC_DISABLE_STATIC],
7616d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7617d63fdb69Smrg])
7618d63fdb69Smrg
7619d63fdb69SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7620d63fdb69SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7621d63fdb69Smrg
7622d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7623d63fdb69Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7624d63fdb69Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7625d63fdb69Smrg
7626d63fdb69Smrg
7627d63fdb69Smrg
7628d63fdb69Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7629d63fdb69Smrg# ----------------------------------
7630d63fdb69Smrg# implement the --enable-fast-install flag, and support the `fast-install'
7631d63fdb69Smrg# and `disable-fast-install' LT_INIT options.
7632d63fdb69Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7633d63fdb69Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
7634d63fdb69Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7635d63fdb69SmrgAC_ARG_ENABLE([fast-install],
7636d63fdb69Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7637d63fdb69Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7638d63fdb69Smrg    [p=${PACKAGE-default}
7639d63fdb69Smrg    case $enableval in
7640d63fdb69Smrg    yes) enable_fast_install=yes ;;
7641d63fdb69Smrg    no) enable_fast_install=no ;;
7642d63fdb69Smrg    *)
7643d63fdb69Smrg      enable_fast_install=no
7644d63fdb69Smrg      # Look at the argument we got.  We use all the common list separators.
7645d63fdb69Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7646d63fdb69Smrg      for pkg in $enableval; do
7647d63fdb69Smrg	IFS="$lt_save_ifs"
7648d63fdb69Smrg	if test "X$pkg" = "X$p"; then
7649d63fdb69Smrg	  enable_fast_install=yes
7650d63fdb69Smrg	fi
7651d63fdb69Smrg      done
7652d63fdb69Smrg      IFS="$lt_save_ifs"
7653d63fdb69Smrg      ;;
7654d63fdb69Smrg    esac],
7655d63fdb69Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7656d63fdb69Smrg
7657d63fdb69Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
7658d63fdb69Smrg	 [Whether or not to optimize for fast installation])dnl
7659d63fdb69Smrg])# _LT_ENABLE_FAST_INSTALL
7660d63fdb69Smrg
7661d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7662d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7663d63fdb69Smrg
7664d63fdb69Smrg# Old names:
7665d63fdb69SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7666d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7667d63fdb69SmrgAC_DIAGNOSE([obsolete],
7668d63fdb69Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7669d63fdb69Smrgthe `fast-install' option into LT_INIT's first parameter.])
7670d63fdb69Smrg])
7671d63fdb69Smrg
7672d63fdb69SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7673d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7674d63fdb69SmrgAC_DIAGNOSE([obsolete],
7675d63fdb69Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7676d63fdb69Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7677d63fdb69Smrg])
7678d63fdb69Smrg
7679d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7680d63fdb69Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7681d63fdb69Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7682d63fdb69Smrg
7683d63fdb69Smrg
7684d63fdb69Smrg# _LT_WITH_PIC([MODE])
7685d63fdb69Smrg# --------------------
7686d63fdb69Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7687d63fdb69Smrg# LT_INIT options.
7688d63fdb69Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7689d63fdb69Smrgm4_define([_LT_WITH_PIC],
7690d63fdb69Smrg[AC_ARG_WITH([pic],
7691d63fdb69Smrg    [AS_HELP_STRING([--with-pic],
7692d63fdb69Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7693d63fdb69Smrg    [pic_mode="$withval"],
7694d63fdb69Smrg    [pic_mode=default])
7695d63fdb69Smrg
7696d63fdb69Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7697d63fdb69Smrg
7698d63fdb69Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7699d63fdb69Smrg])# _LT_WITH_PIC
7700d63fdb69Smrg
7701d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7702d63fdb69SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7703d63fdb69Smrg
7704d63fdb69Smrg# Old name:
7705d63fdb69SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7706d63fdb69Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7707d63fdb69SmrgAC_DIAGNOSE([obsolete],
7708d63fdb69Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7709d63fdb69Smrgput the `pic-only' option into LT_INIT's first parameter.])
7710d63fdb69Smrg])
7711d63fdb69Smrg
7712d63fdb69Smrgdnl aclocal-1.4 backwards compatibility:
7713d63fdb69Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7714d63fdb69Smrg
7715d63fdb69Smrg
7716d63fdb69Smrgm4_define([_LTDL_MODE], [])
7717d63fdb69SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7718d63fdb69Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7719d63fdb69SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7720d63fdb69Smrg		 [m4_define([_LTDL_MODE], [recursive])])
7721d63fdb69SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7722d63fdb69Smrg		 [m4_define([_LTDL_MODE], [subproject])])
7723d63fdb69Smrg
7724d63fdb69Smrgm4_define([_LTDL_TYPE], [])
7725d63fdb69SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7726d63fdb69Smrg		 [m4_define([_LTDL_TYPE], [installable])])
7727d63fdb69SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7728d63fdb69Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
7729d63fdb69Smrg
7730d63fdb69Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7731d63fdb69Smrg#
7732d63fdb69Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7733d63fdb69Smrg# Written by Gary V. Vaughan, 2004
7734d63fdb69Smrg#
7735d63fdb69Smrg# This file is free software; the Free Software Foundation gives
7736d63fdb69Smrg# unlimited permission to copy and/or distribute it, with or without
7737d63fdb69Smrg# modifications, as long as this notice is preserved.
7738d63fdb69Smrg
7739d63fdb69Smrg# serial 6 ltsugar.m4
7740d63fdb69Smrg
7741d63fdb69Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7742d63fdb69SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7743d63fdb69Smrg
7744d63fdb69Smrg
7745d63fdb69Smrg# lt_join(SEP, ARG1, [ARG2...])
7746d63fdb69Smrg# -----------------------------
7747d63fdb69Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7748d63fdb69Smrg# associated separator.
7749d63fdb69Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7750d63fdb69Smrg# versions in m4sugar had bugs.
7751d63fdb69Smrgm4_define([lt_join],
7752d63fdb69Smrg[m4_if([$#], [1], [],
7753d63fdb69Smrg       [$#], [2], [[$2]],
7754d63fdb69Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7755d63fdb69Smrgm4_define([_lt_join],
7756d63fdb69Smrg[m4_if([$#$2], [2], [],
7757d63fdb69Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7758d63fdb69Smrg
7759d63fdb69Smrg
7760d63fdb69Smrg# lt_car(LIST)
7761d63fdb69Smrg# lt_cdr(LIST)
7762d63fdb69Smrg# ------------
7763d63fdb69Smrg# Manipulate m4 lists.
7764d63fdb69Smrg# These macros are necessary as long as will still need to support
7765d63fdb69Smrg# Autoconf-2.59 which quotes differently.
7766d63fdb69Smrgm4_define([lt_car], [[$1]])
7767d63fdb69Smrgm4_define([lt_cdr],
7768d63fdb69Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7769d63fdb69Smrg       [$#], 1, [],
7770d63fdb69Smrg       [m4_dquote(m4_shift($@))])])
7771d63fdb69Smrgm4_define([lt_unquote], $1)
7772d63fdb69Smrg
7773d63fdb69Smrg
7774d63fdb69Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7775d63fdb69Smrg# ------------------------------------------
7776d63fdb69Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7777d63fdb69Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7778d63fdb69Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7779d63fdb69Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7780d63fdb69Smrg# than defined and empty).
7781d63fdb69Smrg#
7782d63fdb69Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7783d63fdb69Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7784d63fdb69Smrgm4_define([lt_append],
7785d63fdb69Smrg[m4_define([$1],
7786d63fdb69Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7787d63fdb69Smrg
7788d63fdb69Smrg
7789d63fdb69Smrg
7790d63fdb69Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7791d63fdb69Smrg# ----------------------------------------------------------
7792d63fdb69Smrg# Produce a SEP delimited list of all paired combinations of elements of
7793d63fdb69Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7794d63fdb69Smrg# has the form PREFIXmINFIXSUFFIXn.
7795d63fdb69Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7796d63fdb69Smrgm4_define([lt_combine],
7797d63fdb69Smrg[m4_if(m4_eval([$# > 3]), [1],
7798d63fdb69Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7799d63fdb69Smrg[[m4_foreach([_Lt_prefix], [$2],
7800d63fdb69Smrg	     [m4_foreach([_Lt_suffix],
7801d63fdb69Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7802d63fdb69Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7803d63fdb69Smrg
7804d63fdb69Smrg
7805d63fdb69Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7806d63fdb69Smrg# -----------------------------------------------------------------------
7807d63fdb69Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7808d63fdb69Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7809d63fdb69Smrgm4_define([lt_if_append_uniq],
7810d63fdb69Smrg[m4_ifdef([$1],
7811d63fdb69Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7812d63fdb69Smrg		 [lt_append([$1], [$2], [$3])$4],
7813d63fdb69Smrg		 [$5])],
7814d63fdb69Smrg	  [lt_append([$1], [$2], [$3])$4])])
7815d63fdb69Smrg
7816d63fdb69Smrg
7817d63fdb69Smrg# lt_dict_add(DICT, KEY, VALUE)
7818d63fdb69Smrg# -----------------------------
7819d63fdb69Smrgm4_define([lt_dict_add],
7820d63fdb69Smrg[m4_define([$1($2)], [$3])])
7821d63fdb69Smrg
7822d63fdb69Smrg
7823d63fdb69Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7824d63fdb69Smrg# --------------------------------------------
7825d63fdb69Smrgm4_define([lt_dict_add_subkey],
7826d63fdb69Smrg[m4_define([$1($2:$3)], [$4])])
7827d63fdb69Smrg
7828d63fdb69Smrg
7829d63fdb69Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7830d63fdb69Smrg# ----------------------------------
7831d63fdb69Smrgm4_define([lt_dict_fetch],
7832d63fdb69Smrg[m4_ifval([$3],
7833d63fdb69Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7834d63fdb69Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7835d63fdb69Smrg
7836d63fdb69Smrg
7837d63fdb69Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7838d63fdb69Smrg# -----------------------------------------------------------------
7839d63fdb69Smrgm4_define([lt_if_dict_fetch],
7840d63fdb69Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7841d63fdb69Smrg	[$5],
7842d63fdb69Smrg    [$6])])
7843d63fdb69Smrg
7844d63fdb69Smrg
7845d63fdb69Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7846d63fdb69Smrg# --------------------------------------------------------------
7847d63fdb69Smrgm4_define([lt_dict_filter],
7848d63fdb69Smrg[m4_if([$5], [], [],
7849d63fdb69Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7850d63fdb69Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7851d63fdb69Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7852d63fdb69Smrg])
7853d63fdb69Smrg
7854d63fdb69Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7855d63fdb69Smrg#
7856d63fdb69Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7857d63fdb69Smrg#   Written by Scott James Remnant, 2004
7858d63fdb69Smrg#
7859d63fdb69Smrg# This file is free software; the Free Software Foundation gives
7860d63fdb69Smrg# unlimited permission to copy and/or distribute it, with or without
7861d63fdb69Smrg# modifications, as long as this notice is preserved.
7862d63fdb69Smrg
7863d63fdb69Smrg# Generated from ltversion.in.
7864d63fdb69Smrg
7865d63fdb69Smrg# serial 3012 ltversion.m4
7866d63fdb69Smrg# This file is part of GNU Libtool
7867d63fdb69Smrg
7868d63fdb69Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
7869d63fdb69Smrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7870d63fdb69Smrg
7871d63fdb69SmrgAC_DEFUN([LTVERSION_VERSION],
7872d63fdb69Smrg[macro_version='2.2.6'
7873d63fdb69Smrgmacro_revision='1.3012'
7874d63fdb69Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7875d63fdb69Smrg_LT_DECL(, macro_revision, 0)
7876d63fdb69Smrg])
7877d63fdb69Smrg
7878d63fdb69Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7879d63fdb69Smrg#
7880d63fdb69Smrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7881d63fdb69Smrg#   Written by Scott James Remnant, 2004.
7882d63fdb69Smrg#
7883d63fdb69Smrg# This file is free software; the Free Software Foundation gives
7884d63fdb69Smrg# unlimited permission to copy and/or distribute it, with or without
7885d63fdb69Smrg# modifications, as long as this notice is preserved.
7886d63fdb69Smrg
7887d63fdb69Smrg# serial 4 lt~obsolete.m4
7888d63fdb69Smrg
7889d63fdb69Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
7890d63fdb69Smrg#
7891d63fdb69Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7892d63fdb69Smrg# which have later been changed to m4_define as they aren't part of the
7893d63fdb69Smrg# exported API, or moved to Autoconf or Automake where they belong.
7894d63fdb69Smrg#
7895d63fdb69Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7896d63fdb69Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7897d63fdb69Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
7898d63fdb69Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7899d63fdb69Smrg# and doesn't know about Autoconf macros at all.)
7900d63fdb69Smrg#
7901d63fdb69Smrg# So we provide this file, which has a silly filename so it's always
7902d63fdb69Smrg# included after everything else.  This provides aclocal with the
7903d63fdb69Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7904d63fdb69Smrg# because those macros already exist, or will be overwritten later.
7905d63fdb69Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7906d63fdb69Smrg#
7907d63fdb69Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7908d63fdb69Smrg# Yes, that means every name once taken will need to remain here until
7909d63fdb69Smrg# we give up compatibility with versions before 1.7, at which point
7910d63fdb69Smrg# we need to keep only those names which we still refer to.
7911d63fdb69Smrg
7912d63fdb69Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7913d63fdb69SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7914d63fdb69Smrg
7915d63fdb69Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7916d63fdb69Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7917d63fdb69Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7918d63fdb69Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7919d63fdb69Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7920d63fdb69Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7921d63fdb69Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7922d63fdb69Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7923d63fdb69Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7924d63fdb69Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7925d63fdb69Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7926d63fdb69Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7927d63fdb69Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7928d63fdb69Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7929d63fdb69Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7930d63fdb69Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7931d63fdb69Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7932d63fdb69Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7933d63fdb69Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7934d63fdb69Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7935d63fdb69Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7936d63fdb69Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7937d63fdb69Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7938d63fdb69Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7939d63fdb69Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7940d63fdb69Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7941d63fdb69Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7942d63fdb69Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7943d63fdb69Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7944d63fdb69Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7945d63fdb69Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7946d63fdb69Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7947d63fdb69Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7948d63fdb69Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7949d63fdb69Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7950d63fdb69Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7951d63fdb69Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7952d63fdb69Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7953d63fdb69Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7954d63fdb69Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7955d63fdb69Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7956d63fdb69Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7957d63fdb69Smrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7958d63fdb69Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7959d63fdb69Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7960d63fdb69Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7961d63fdb69Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7962d63fdb69Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7963d63fdb69Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7964d63fdb69Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7965d63fdb69Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7966d63fdb69Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7967d63fdb69Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7968d63fdb69Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7969d63fdb69Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7970d63fdb69Smrg
7971d63fdb69Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7972d63fdb69Smrg# 
7973d63fdb69Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7974d63fdb69Smrg#
7975d63fdb69Smrg# This program is free software; you can redistribute it and/or modify
7976d63fdb69Smrg# it under the terms of the GNU General Public License as published by
7977d63fdb69Smrg# the Free Software Foundation; either version 2 of the License, or
7978d63fdb69Smrg# (at your option) any later version.
7979d63fdb69Smrg#
7980d63fdb69Smrg# This program is distributed in the hope that it will be useful, but
7981d63fdb69Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7982d63fdb69Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7983d63fdb69Smrg# General Public License for more details.
7984d63fdb69Smrg#
7985d63fdb69Smrg# You should have received a copy of the GNU General Public License
7986d63fdb69Smrg# along with this program; if not, write to the Free Software
7987d63fdb69Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7988d63fdb69Smrg#
7989d63fdb69Smrg# As a special exception to the GNU General Public License, if you
7990d63fdb69Smrg# distribute this file as part of a program that contains a
7991d63fdb69Smrg# configuration script generated by Autoconf, you may include it under
7992d63fdb69Smrg# the same distribution terms that you use for the rest of that program.
7993d63fdb69Smrg
7994d63fdb69Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7995d63fdb69Smrg# ----------------------------------
7996d63fdb69SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7997d63fdb69Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7998d63fdb69Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7999d63fdb69SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8000d63fdb69Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8001d63fdb69Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8002d63fdb69Smrgfi
8003d63fdb69Smrgif test -n "$PKG_CONFIG"; then
8004d63fdb69Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
8005d63fdb69Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8006d63fdb69Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8007d63fdb69Smrg		AC_MSG_RESULT([yes])
8008d63fdb69Smrg	else
8009d63fdb69Smrg		AC_MSG_RESULT([no])
8010d63fdb69Smrg		PKG_CONFIG=""
8011d63fdb69Smrg	fi
8012d63fdb69Smrg		
8013d63fdb69Smrgfi[]dnl
8014d63fdb69Smrg])# PKG_PROG_PKG_CONFIG
8015d63fdb69Smrg
8016d63fdb69Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8017d63fdb69Smrg#
8018d63fdb69Smrg# Check to see whether a particular set of modules exists.  Similar
8019d63fdb69Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8020d63fdb69Smrg#
8021d63fdb69Smrg#
8022d63fdb69Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8023d63fdb69Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
8024d63fdb69Smrg# PKG_CHECK_EXISTS manually
8025d63fdb69Smrg# --------------------------------------------------------------
8026d63fdb69SmrgAC_DEFUN([PKG_CHECK_EXISTS],
8027d63fdb69Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8028d63fdb69Smrgif test -n "$PKG_CONFIG" && \
8029d63fdb69Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8030d63fdb69Smrg  m4_ifval([$2], [$2], [:])
8031d63fdb69Smrgm4_ifvaln([$3], [else
8032d63fdb69Smrg  $3])dnl
8033d63fdb69Smrgfi])
8034d63fdb69Smrg
8035d63fdb69Smrg
8036d63fdb69Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8037d63fdb69Smrg# ---------------------------------------------
8038d63fdb69Smrgm4_define([_PKG_CONFIG],
8039d63fdb69Smrg[if test -n "$$1"; then
8040d63fdb69Smrg    pkg_cv_[]$1="$$1"
8041d63fdb69Smrg elif test -n "$PKG_CONFIG"; then
8042d63fdb69Smrg    PKG_CHECK_EXISTS([$3],
8043d63fdb69Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8044d63fdb69Smrg		     [pkg_failed=yes])
8045d63fdb69Smrg else
8046d63fdb69Smrg    pkg_failed=untried
8047d63fdb69Smrgfi[]dnl
8048d63fdb69Smrg])# _PKG_CONFIG
8049d63fdb69Smrg
8050d63fdb69Smrg# _PKG_SHORT_ERRORS_SUPPORTED
8051d63fdb69Smrg# -----------------------------
8052d63fdb69SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8053d63fdb69Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8054d63fdb69Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8055d63fdb69Smrg        _pkg_short_errors_supported=yes
8056d63fdb69Smrgelse
8057d63fdb69Smrg        _pkg_short_errors_supported=no
8058d63fdb69Smrgfi[]dnl
8059d63fdb69Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
8060d63fdb69Smrg
8061d63fdb69Smrg
8062d63fdb69Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8063d63fdb69Smrg# [ACTION-IF-NOT-FOUND])
8064d63fdb69Smrg#
8065d63fdb69Smrg#
8066d63fdb69Smrg# Note that if there is a possibility the first call to
8067d63fdb69Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8068d63fdb69Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8069d63fdb69Smrg#
8070d63fdb69Smrg#
8071d63fdb69Smrg# --------------------------------------------------------------
8072d63fdb69SmrgAC_DEFUN([PKG_CHECK_MODULES],
8073d63fdb69Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8074d63fdb69SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8075d63fdb69SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8076d63fdb69Smrg
8077d63fdb69Smrgpkg_failed=no
8078d63fdb69SmrgAC_MSG_CHECKING([for $1])
8079d63fdb69Smrg
8080d63fdb69Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8081d63fdb69Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8082d63fdb69Smrg
8083d63fdb69Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8084d63fdb69Smrgand $1[]_LIBS to avoid the need to call pkg-config.
8085d63fdb69SmrgSee the pkg-config man page for more details.])
8086d63fdb69Smrg
8087d63fdb69Smrgif test $pkg_failed = yes; then
8088d63fdb69Smrg        _PKG_SHORT_ERRORS_SUPPORTED
8089d63fdb69Smrg        if test $_pkg_short_errors_supported = yes; then
8090d63fdb69Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8091d63fdb69Smrg        else 
8092d63fdb69Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8093d63fdb69Smrg        fi
8094d63fdb69Smrg	# Put the nasty error message in config.log where it belongs
8095d63fdb69Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8096d63fdb69Smrg
8097d63fdb69Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8098d63fdb69Smrg[Package requirements ($2) were not met:
8099d63fdb69Smrg
8100d63fdb69Smrg$$1_PKG_ERRORS
8101d63fdb69Smrg
8102d63fdb69SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8103d63fdb69Smrginstalled software in a non-standard prefix.
8104d63fdb69Smrg
8105d63fdb69Smrg_PKG_TEXT
8106d63fdb69Smrg])],
8107d63fdb69Smrg		[AC_MSG_RESULT([no])
8108d63fdb69Smrg                $4])
8109d63fdb69Smrgelif test $pkg_failed = untried; then
8110d63fdb69Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8111d63fdb69Smrg[The pkg-config script could not be found or is too old.  Make sure it
8112d63fdb69Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
8113d63fdb69Smrgpath to pkg-config.
8114d63fdb69Smrg
8115d63fdb69Smrg_PKG_TEXT
8116d63fdb69Smrg
8117d63fdb69SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8118d63fdb69Smrg		[$4])
8119d63fdb69Smrgelse
8120d63fdb69Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8121d63fdb69Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8122d63fdb69Smrg        AC_MSG_RESULT([yes])
8123d63fdb69Smrg	ifelse([$3], , :, [$3])
8124d63fdb69Smrgfi[]dnl
8125d63fdb69Smrg])# PKG_CHECK_MODULES
8126d63fdb69Smrg
8127d63fdb69Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8128d63fdb69Smrg#
8129d63fdb69Smrg# This file is free software; the Free Software Foundation
81303da084b3Smrg# gives unlimited permission to copy and/or distribute it,
81313da084b3Smrg# with or without modifications, as long as this notice is preserved.
81323da084b3Smrg
81333da084b3Smrg# AM_AUTOMAKE_VERSION(VERSION)
81343da084b3Smrg# ----------------------------
81353da084b3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
81363da084b3Smrg# generated from the m4 files accompanying Automake X.Y.
8137d63fdb69Smrg# (This private macro should not be called outside this file.)
8138d63fdb69SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8139d63fdb69Smrg[am__api_version='1.11'
8140d63fdb69Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8141d63fdb69Smrgdnl require some minimum version.  Point them to the right macro.
8142d63fdb69Smrgm4_if([$1], [1.11], [],
8143d63fdb69Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8144d63fdb69Smrg])
8145d63fdb69Smrg
8146d63fdb69Smrg# _AM_AUTOCONF_VERSION(VERSION)
8147d63fdb69Smrg# -----------------------------
8148d63fdb69Smrg# aclocal traces this macro to find the Autoconf version.
8149d63fdb69Smrg# This is a private macro too.  Using m4_define simplifies
8150d63fdb69Smrg# the logic in aclocal, which can simply ignore this definition.
8151d63fdb69Smrgm4_define([_AM_AUTOCONF_VERSION], [])
81523da084b3Smrg
81533da084b3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
81543da084b3Smrg# -------------------------------
8155d63fdb69Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8156d63fdb69Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
81573da084b3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8158d63fdb69Smrg[AM_AUTOMAKE_VERSION([1.11])dnl
8159d63fdb69Smrgm4_ifndef([AC_AUTOCONF_VERSION],
8160d63fdb69Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8161d63fdb69Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
81623da084b3Smrg
81633da084b3Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
81643da084b3Smrg
81653da084b3Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
81663da084b3Smrg#
81673da084b3Smrg# This file is free software; the Free Software Foundation
81683da084b3Smrg# gives unlimited permission to copy and/or distribute it,
81693da084b3Smrg# with or without modifications, as long as this notice is preserved.
81703da084b3Smrg
81713da084b3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
81723da084b3Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
81733da084b3Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
81743da084b3Smrg#
81753da084b3Smrg# Of course, Automake must honor this variable whenever it calls a
81763da084b3Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
81773da084b3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
81783da084b3Smrg# depending on how configure is run.  This is pretty annoying, since
81793da084b3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
81803da084b3Smrg# source directory, any form will work fine, but in subdirectories a
81813da084b3Smrg# relative path needs to be adjusted first.
81823da084b3Smrg#
81833da084b3Smrg# $ac_aux_dir/missing
81843da084b3Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
81853da084b3Smrg# $top_srcdir/$ac_aux_dir/missing
81863da084b3Smrg#    fails if $ac_aux_dir is absolute,
81873da084b3Smrg#    fails when called from a subdirectory in a VPATH build with
81883da084b3Smrg#          a relative $ac_aux_dir
81893da084b3Smrg#
81903da084b3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
81913da084b3Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
81923da084b3Smrg# harmless because $srcdir is `.', but things will broke when you
81933da084b3Smrg# start a VPATH build or use an absolute $srcdir.
81943da084b3Smrg#
81953da084b3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
81963da084b3Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
81973da084b3Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
81983da084b3Smrg# and then we would define $MISSING as
81993da084b3Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
82003da084b3Smrg# This will work as long as MISSING is not called from configure, because
82013da084b3Smrg# unfortunately $(top_srcdir) has no meaning in configure.
82023da084b3Smrg# However there are other variables, like CC, which are often used in
82033da084b3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
82043da084b3Smrg#
82053da084b3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
82063da084b3Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
82073da084b3Smrg# configured tree to be moved without reconfiguration.
82083da084b3Smrg
82093da084b3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
82103da084b3Smrg[dnl Rely on autoconf to set up CDPATH properly.
82113da084b3SmrgAC_PREREQ([2.50])dnl
82123da084b3Smrg# expand $ac_aux_dir to an absolute path
82133da084b3Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
82143da084b3Smrg])
82153da084b3Smrg
82163da084b3Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
82173da084b3Smrg
8218d63fdb69Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
82193da084b3Smrg# Free Software Foundation, Inc.
82203da084b3Smrg#
82213da084b3Smrg# This file is free software; the Free Software Foundation
82223da084b3Smrg# gives unlimited permission to copy and/or distribute it,
82233da084b3Smrg# with or without modifications, as long as this notice is preserved.
82243da084b3Smrg
8225d63fdb69Smrg# serial 9
82263da084b3Smrg
82273da084b3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
82283da084b3Smrg# -------------------------------------
82293da084b3Smrg# Define a conditional.
82303da084b3SmrgAC_DEFUN([AM_CONDITIONAL],
82313da084b3Smrg[AC_PREREQ(2.52)dnl
82323da084b3Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
82333da084b3Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8234d63fdb69SmrgAC_SUBST([$1_TRUE])dnl
8235d63fdb69SmrgAC_SUBST([$1_FALSE])dnl
8236d63fdb69Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8237d63fdb69Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8238d63fdb69Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
82393da084b3Smrgif $2; then
82403da084b3Smrg  $1_TRUE=
82413da084b3Smrg  $1_FALSE='#'
82423da084b3Smrgelse
82433da084b3Smrg  $1_TRUE='#'
82443da084b3Smrg  $1_FALSE=
82453da084b3Smrgfi
82463da084b3SmrgAC_CONFIG_COMMANDS_PRE(
82473da084b3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
82483da084b3Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
82493da084b3SmrgUsually this means the macro was only invoked conditionally.]])
82503da084b3Smrgfi])])
82513da084b3Smrg
8252d63fdb69Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
82533da084b3Smrg# Free Software Foundation, Inc.
82543da084b3Smrg#
82553da084b3Smrg# This file is free software; the Free Software Foundation
82563da084b3Smrg# gives unlimited permission to copy and/or distribute it,
82573da084b3Smrg# with or without modifications, as long as this notice is preserved.
82583da084b3Smrg
8259d63fdb69Smrg# serial 10
82603da084b3Smrg
82613da084b3Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
82623da084b3Smrg# written in clear, in which case automake, when reading aclocal.m4,
82633da084b3Smrg# will think it sees a *use*, and therefore will trigger all it's
82643da084b3Smrg# C support machinery.  Also note that it means that autoscan, seeing
82653da084b3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
82663da084b3Smrg
82673da084b3Smrg
82683da084b3Smrg# _AM_DEPENDENCIES(NAME)
82693da084b3Smrg# ----------------------
82703da084b3Smrg# See how the compiler implements dependency checking.
82713da084b3Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
82723da084b3Smrg# We try a few techniques and use that to set a single cache variable.
82733da084b3Smrg#
82743da084b3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
82753da084b3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
82763da084b3Smrg# dependency, and given that the user is not expected to run this macro,
82773da084b3Smrg# just rely on AC_PROG_CC.
82783da084b3SmrgAC_DEFUN([_AM_DEPENDENCIES],
82793da084b3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
82803da084b3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
82813da084b3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
82823da084b3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
82833da084b3Smrg
82843da084b3Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
82853da084b3Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
82863da084b3Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8287d63fdb69Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
82883da084b3Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
82893da084b3Smrg                   [depcc="$$1"   am_compiler_list=])
82903da084b3Smrg
82913da084b3SmrgAC_CACHE_CHECK([dependency style of $depcc],
82923da084b3Smrg               [am_cv_$1_dependencies_compiler_type],
82933da084b3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
82943da084b3Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
82953da084b3Smrg  # making bogus files that we don't know about and never remove.  For
82963da084b3Smrg  # instance it was reported that on HP-UX the gcc test will end up
82973da084b3Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
82983da084b3Smrg  # in D'.
82993da084b3Smrg  mkdir conftest.dir
83003da084b3Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
83013da084b3Smrg  # using a relative directory.
83023da084b3Smrg  cp "$am_depcomp" conftest.dir
83033da084b3Smrg  cd conftest.dir
83043da084b3Smrg  # We will build objects and dependencies in a subdirectory because
83053da084b3Smrg  # it helps to detect inapplicable dependency modes.  For instance
83063da084b3Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
83073da084b3Smrg  # side effect of compilation, but ICC will put the dependencies in
83083da084b3Smrg  # the current directory while Tru64 will put them in the object
83093da084b3Smrg  # directory.
83103da084b3Smrg  mkdir sub
83113da084b3Smrg
83123da084b3Smrg  am_cv_$1_dependencies_compiler_type=none
83133da084b3Smrg  if test "$am_compiler_list" = ""; then
83143da084b3Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
83153da084b3Smrg  fi
8316d63fdb69Smrg  am__universal=false
8317d63fdb69Smrg  m4_case([$1], [CC],
8318d63fdb69Smrg    [case " $depcc " in #(
8319d63fdb69Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8320d63fdb69Smrg     esac],
8321d63fdb69Smrg    [CXX],
8322d63fdb69Smrg    [case " $depcc " in #(
8323d63fdb69Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8324d63fdb69Smrg     esac])
8325d63fdb69Smrg
83263da084b3Smrg  for depmode in $am_compiler_list; do
83273da084b3Smrg    # Setup a source with many dependencies, because some compilers
83283da084b3Smrg    # like to wrap large dependency lists on column 80 (with \), and
83293da084b3Smrg    # we should not choose a depcomp mode which is confused by this.
83303da084b3Smrg    #
83313da084b3Smrg    # We need to recreate these files for each test, as the compiler may
83323da084b3Smrg    # overwrite some of them when testing with obscure command lines.
83333da084b3Smrg    # This happens at least with the AIX C compiler.
83343da084b3Smrg    : > sub/conftest.c
83353da084b3Smrg    for i in 1 2 3 4 5 6; do
83363da084b3Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
83373da084b3Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
83383da084b3Smrg      # Solaris 8's {/usr,}/bin/sh.
83393da084b3Smrg      touch sub/conftst$i.h
83403da084b3Smrg    done
83413da084b3Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
83423da084b3Smrg
8343d63fdb69Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8344d63fdb69Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
8345d63fdb69Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
8346d63fdb69Smrg    # versions had trouble with output in subdirs
8347d63fdb69Smrg    am__obj=sub/conftest.${OBJEXT-o}
8348d63fdb69Smrg    am__minus_obj="-o $am__obj"
83493da084b3Smrg    case $depmode in
8350d63fdb69Smrg    gcc)
8351d63fdb69Smrg      # This depmode causes a compiler race in universal mode.
8352d63fdb69Smrg      test "$am__universal" = false || continue
8353d63fdb69Smrg      ;;
83543da084b3Smrg    nosideeffect)
83553da084b3Smrg      # after this tag, mechanisms are not by side-effect, so they'll
83563da084b3Smrg      # only be used when explicitly requested
83573da084b3Smrg      if test "x$enable_dependency_tracking" = xyes; then
83583da084b3Smrg	continue
83593da084b3Smrg      else
83603da084b3Smrg	break
83613da084b3Smrg      fi
83623da084b3Smrg      ;;
8363d63fdb69Smrg    msvisualcpp | msvcmsys)
8364d63fdb69Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
8365d63fdb69Smrg      # not run yet.  These depmodes are late enough in the game, and
8366d63fdb69Smrg      # so weak that their functioning should not be impacted.
8367d63fdb69Smrg      am__obj=conftest.${OBJEXT-o}
8368d63fdb69Smrg      am__minus_obj=
8369d63fdb69Smrg      ;;
83703da084b3Smrg    none) break ;;
83713da084b3Smrg    esac
83723da084b3Smrg    if depmode=$depmode \
8373d63fdb69Smrg       source=sub/conftest.c object=$am__obj \
83743da084b3Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8375d63fdb69Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
83763da084b3Smrg         >/dev/null 2>conftest.err &&
8377d63fdb69Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
83783da084b3Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8379d63fdb69Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
83803da084b3Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
83813da084b3Smrg      # icc doesn't choke on unknown options, it will just issue warnings
83823da084b3Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
83833da084b3Smrg      # that says an option was ignored or not supported.
83843da084b3Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
83853da084b3Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
83863da084b3Smrg      # The diagnosis changed in icc 8.0:
83873da084b3Smrg      #   icc: Command line remark: option '-MP' not supported
83883da084b3Smrg      if (grep 'ignoring option' conftest.err ||
83893da084b3Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
83903da084b3Smrg        am_cv_$1_dependencies_compiler_type=$depmode
83913da084b3Smrg        break
83923da084b3Smrg      fi
83933da084b3Smrg    fi
83943da084b3Smrg  done
83953da084b3Smrg
83963da084b3Smrg  cd ..
83973da084b3Smrg  rm -rf conftest.dir
83983da084b3Smrgelse
83993da084b3Smrg  am_cv_$1_dependencies_compiler_type=none
84003da084b3Smrgfi
84013da084b3Smrg])
84023da084b3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
84033da084b3SmrgAM_CONDITIONAL([am__fastdep$1], [
84043da084b3Smrg  test "x$enable_dependency_tracking" != xno \
84053da084b3Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
84063da084b3Smrg])
84073da084b3Smrg
84083da084b3Smrg
84093da084b3Smrg# AM_SET_DEPDIR
84103da084b3Smrg# -------------
84113da084b3Smrg# Choose a directory name for dependency files.
84123da084b3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
84133da084b3SmrgAC_DEFUN([AM_SET_DEPDIR],
84143da084b3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
84153da084b3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
84163da084b3Smrg])
84173da084b3Smrg
84183da084b3Smrg
84193da084b3Smrg# AM_DEP_TRACK
84203da084b3Smrg# ------------
84213da084b3SmrgAC_DEFUN([AM_DEP_TRACK],
84223da084b3Smrg[AC_ARG_ENABLE(dependency-tracking,
84233da084b3Smrg[  --disable-dependency-tracking  speeds up one-time build
84243da084b3Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
84253da084b3Smrgif test "x$enable_dependency_tracking" != xno; then
84263da084b3Smrg  am_depcomp="$ac_aux_dir/depcomp"
84273da084b3Smrg  AMDEPBACKSLASH='\'
84283da084b3Smrgfi
84293da084b3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8430d63fdb69SmrgAC_SUBST([AMDEPBACKSLASH])dnl
8431d63fdb69Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
84323da084b3Smrg])
84333da084b3Smrg
84343da084b3Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
84353da084b3Smrg
8436d63fdb69Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
84373da084b3Smrg# Free Software Foundation, Inc.
84383da084b3Smrg#
84393da084b3Smrg# This file is free software; the Free Software Foundation
84403da084b3Smrg# gives unlimited permission to copy and/or distribute it,
84413da084b3Smrg# with or without modifications, as long as this notice is preserved.
84423da084b3Smrg
8443d63fdb69Smrg#serial 5
84443da084b3Smrg
84453da084b3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
84463da084b3Smrg# ------------------------------
84473da084b3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8448d63fdb69Smrg[{
8449d63fdb69Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
8450d63fdb69Smrg  # are listed without --file.  Let's play safe and only enable the eval
8451d63fdb69Smrg  # if we detect the quoting.
8452d63fdb69Smrg  case $CONFIG_FILES in
8453d63fdb69Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
8454d63fdb69Smrg  *)   set x $CONFIG_FILES ;;
8455d63fdb69Smrg  esac
8456d63fdb69Smrg  shift
8457d63fdb69Smrg  for mf
8458d63fdb69Smrg  do
8459d63fdb69Smrg    # Strip MF so we end up with the name of the file.
8460d63fdb69Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
8461d63fdb69Smrg    # Check whether this is an Automake generated Makefile or not.
8462d63fdb69Smrg    # We used to match only the files named `Makefile.in', but
8463d63fdb69Smrg    # some people rename them; so instead we look at the file content.
8464d63fdb69Smrg    # Grep'ing the first line is not enough: some people post-process
8465d63fdb69Smrg    # each Makefile.in and add a new line on top of each file to say so.
8466d63fdb69Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
8467d63fdb69Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
8468d63fdb69Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8469d63fdb69Smrg      dirpart=`AS_DIRNAME("$mf")`
8470d63fdb69Smrg    else
8471d63fdb69Smrg      continue
8472d63fdb69Smrg    fi
8473d63fdb69Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
8474d63fdb69Smrg    # from the Makefile without running `make'.
8475d63fdb69Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8476d63fdb69Smrg    test -z "$DEPDIR" && continue
8477d63fdb69Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
8478d63fdb69Smrg    test -z "am__include" && continue
8479d63fdb69Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8480d63fdb69Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
8481d63fdb69Smrg    U=`sed -n 's/^U = //p' < "$mf"`
8482d63fdb69Smrg    # Find all dependency output files, they are included files with
8483d63fdb69Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
8484d63fdb69Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
8485d63fdb69Smrg    # expansion.
8486d63fdb69Smrg    for file in `sed -n "
8487d63fdb69Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8488d63fdb69Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8489d63fdb69Smrg      # Make sure the directory exists.
8490d63fdb69Smrg      test -f "$dirpart/$file" && continue
8491d63fdb69Smrg      fdir=`AS_DIRNAME(["$file"])`
8492d63fdb69Smrg      AS_MKDIR_P([$dirpart/$fdir])
8493d63fdb69Smrg      # echo "creating $dirpart/$file"
8494d63fdb69Smrg      echo '# dummy' > "$dirpart/$file"
8495d63fdb69Smrg    done
84963da084b3Smrg  done
8497d63fdb69Smrg}
84983da084b3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
84993da084b3Smrg
85003da084b3Smrg
85013da084b3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
85023da084b3Smrg# -----------------------------
85033da084b3Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
85043da084b3Smrg#
85053da084b3Smrg# This code is only required when automatic dependency tracking
85063da084b3Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
85073da084b3Smrg# need in order to bootstrap the dependency handling code.
85083da084b3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
85093da084b3Smrg[AC_CONFIG_COMMANDS([depfiles],
85103da084b3Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
85113da084b3Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
85123da084b3Smrg])
85133da084b3Smrg
85143da084b3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
85153da084b3Smrg# Free Software Foundation, Inc.
85163da084b3Smrg#
85173da084b3Smrg# This file is free software; the Free Software Foundation
85183da084b3Smrg# gives unlimited permission to copy and/or distribute it,
85193da084b3Smrg# with or without modifications, as long as this notice is preserved.
85203da084b3Smrg
85213da084b3Smrg# serial 8
85223da084b3Smrg
85233da084b3Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
85243da084b3SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
85253da084b3Smrg
85263da084b3Smrg# Do all the work for Automake.                             -*- Autoconf -*-
85273da084b3Smrg
8528d63fdb69Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8529d63fdb69Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
85303da084b3Smrg#
85313da084b3Smrg# This file is free software; the Free Software Foundation
85323da084b3Smrg# gives unlimited permission to copy and/or distribute it,
85333da084b3Smrg# with or without modifications, as long as this notice is preserved.
85343da084b3Smrg
8535d63fdb69Smrg# serial 16
85363da084b3Smrg
85373da084b3Smrg# This macro actually does too much.  Some checks are only needed if
85383da084b3Smrg# your package does certain things.  But this isn't really a big deal.
85393da084b3Smrg
85403da084b3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
85413da084b3Smrg# AM_INIT_AUTOMAKE([OPTIONS])
85423da084b3Smrg# -----------------------------------------------
85433da084b3Smrg# The call with PACKAGE and VERSION arguments is the old style
85443da084b3Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
85453da084b3Smrg# and VERSION should now be passed to AC_INIT and removed from
85463da084b3Smrg# the call to AM_INIT_AUTOMAKE.
85473da084b3Smrg# We support both call styles for the transition.  After
85483da084b3Smrg# the next Automake release, Autoconf can make the AC_INIT
85493da084b3Smrg# arguments mandatory, and then we can depend on a new Autoconf
85503da084b3Smrg# release and drop the old call support.
85513da084b3SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
8552d63fdb69Smrg[AC_PREREQ([2.62])dnl
85533da084b3Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
85543da084b3Smrgdnl the ones we care about.
85553da084b3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
85563da084b3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
85573da084b3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
8558d63fdb69Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
8559d63fdb69Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8560d63fdb69Smrg  # is not polluted with repeated "-I."
8561d63fdb69Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8562d63fdb69Smrg  # test to see if srcdir already configured
8563d63fdb69Smrg  if test -f $srcdir/config.status; then
8564d63fdb69Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8565d63fdb69Smrg  fi
85663da084b3Smrgfi
85673da084b3Smrg
85683da084b3Smrg# test whether we have cygpath
85693da084b3Smrgif test -z "$CYGPATH_W"; then
85703da084b3Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
85713da084b3Smrg    CYGPATH_W='cygpath -w'
85723da084b3Smrg  else
85733da084b3Smrg    CYGPATH_W=echo
85743da084b3Smrg  fi
85753da084b3Smrgfi
85763da084b3SmrgAC_SUBST([CYGPATH_W])
85773da084b3Smrg
85783da084b3Smrg# Define the identity of the package.
85793da084b3Smrgdnl Distinguish between old-style and new-style calls.
85803da084b3Smrgm4_ifval([$2],
85813da084b3Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
85823da084b3Smrg AC_SUBST([PACKAGE], [$1])dnl
85833da084b3Smrg AC_SUBST([VERSION], [$2])],
85843da084b3Smrg[_AM_SET_OPTIONS([$1])dnl
8585d63fdb69Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8586d63fdb69Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8587d63fdb69Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
85883da084b3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
85893da084b3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
85903da084b3Smrg
85913da084b3Smrg_AM_IF_OPTION([no-define],,
85923da084b3Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
85933da084b3Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
85943da084b3Smrg
85953da084b3Smrg# Some tools Automake needs.
85963da084b3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
85973da084b3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
85983da084b3SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
85993da084b3SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
86003da084b3SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
86013da084b3SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
86023da084b3SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
8603d63fdb69SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8604d63fdb69SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
86053da084b3SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
86063da084b3Smrg# We need awk for the "check" target.  The system "awk" is bad on
86073da084b3Smrg# some platforms.
86083da084b3SmrgAC_REQUIRE([AC_PROG_AWK])dnl
86093da084b3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
86103da084b3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
86113da084b3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8612d63fdb69Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8613d63fdb69Smrg			     [_AM_PROG_TAR([v7])])])
86143da084b3Smrg_AM_IF_OPTION([no-dependencies],,
86153da084b3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
8616d63fdb69Smrg		  [_AM_DEPENDENCIES(CC)],
8617d63fdb69Smrg		  [define([AC_PROG_CC],
8618d63fdb69Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
86193da084b3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
8620d63fdb69Smrg		  [_AM_DEPENDENCIES(CXX)],
8621d63fdb69Smrg		  [define([AC_PROG_CXX],
8622d63fdb69Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8623d63fdb69SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
8624d63fdb69Smrg		  [_AM_DEPENDENCIES(OBJC)],
8625d63fdb69Smrg		  [define([AC_PROG_OBJC],
8626d63fdb69Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
86273da084b3Smrg])
8628d63fdb69Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
8629d63fdb69Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
8630d63fdb69Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
8631d63fdb69Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
8632d63fdb69SmrgAC_CONFIG_COMMANDS_PRE(dnl
8633d63fdb69Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
8634d63fdb69Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
86353da084b3Smrg])
86363da084b3Smrg
8637d63fdb69Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
8638d63fdb69Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
8639d63fdb69Smrgdnl mangled by Autoconf and run in a shell conditional statement.
8640d63fdb69Smrgm4_define([_AC_COMPILER_EXEEXT],
8641d63fdb69Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
8642d63fdb69Smrg
86433da084b3Smrg
86443da084b3Smrg# When config.status generates a header, we must update the stamp-h file.
86453da084b3Smrg# This file resides in the same directory as the config header
86463da084b3Smrg# that is generated.  The stamp files are numbered to have different names.
86473da084b3Smrg
86483da084b3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
86493da084b3Smrg# loop where config.status creates the headers, so we can generate
86503da084b3Smrg# our stamp files there.
86513da084b3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
86523da084b3Smrg[# Compute $1's index in $config_headers.
8653d63fdb69Smrg_am_arg=$1
86543da084b3Smrg_am_stamp_count=1
86553da084b3Smrgfor _am_header in $config_headers :; do
86563da084b3Smrg  case $_am_header in
8657d63fdb69Smrg    $_am_arg | $_am_arg:* )
86583da084b3Smrg      break ;;
86593da084b3Smrg    * )
86603da084b3Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
86613da084b3Smrg  esac
86623da084b3Smrgdone
8663d63fdb69Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
86643da084b3Smrg
8665d63fdb69Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
86663da084b3Smrg#
86673da084b3Smrg# This file is free software; the Free Software Foundation
86683da084b3Smrg# gives unlimited permission to copy and/or distribute it,
86693da084b3Smrg# with or without modifications, as long as this notice is preserved.
86703da084b3Smrg
86713da084b3Smrg# AM_PROG_INSTALL_SH
86723da084b3Smrg# ------------------
86733da084b3Smrg# Define $install_sh.
86743da084b3SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
86753da084b3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8676d63fdb69Smrgif test x"${install_sh}" != xset; then
8677d63fdb69Smrg  case $am_aux_dir in
8678d63fdb69Smrg  *\ * | *\	*)
8679d63fdb69Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8680d63fdb69Smrg  *)
8681d63fdb69Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
8682d63fdb69Smrg  esac
8683d63fdb69Smrgfi
86843da084b3SmrgAC_SUBST(install_sh)])
86853da084b3Smrg
86863da084b3Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
86873da084b3Smrg#
86883da084b3Smrg# This file is free software; the Free Software Foundation
86893da084b3Smrg# gives unlimited permission to copy and/or distribute it,
86903da084b3Smrg# with or without modifications, as long as this notice is preserved.
86913da084b3Smrg
86923da084b3Smrg# serial 2
86933da084b3Smrg
86943da084b3Smrg# Check whether the underlying file-system supports filenames
86953da084b3Smrg# with a leading dot.  For instance MS-DOS doesn't.
86963da084b3SmrgAC_DEFUN([AM_SET_LEADING_DOT],
86973da084b3Smrg[rm -rf .tst 2>/dev/null
86983da084b3Smrgmkdir .tst 2>/dev/null
86993da084b3Smrgif test -d .tst; then
87003da084b3Smrg  am__leading_dot=.
87013da084b3Smrgelse
87023da084b3Smrg  am__leading_dot=_
87033da084b3Smrgfi
87043da084b3Smrgrmdir .tst 2>/dev/null
87053da084b3SmrgAC_SUBST([am__leading_dot])])
87063da084b3Smrg
87073da084b3Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
87083da084b3Smrg# From Jim Meyering
87093da084b3Smrg
8710d63fdb69Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
87113da084b3Smrg# Free Software Foundation, Inc.
87123da084b3Smrg#
87133da084b3Smrg# This file is free software; the Free Software Foundation
87143da084b3Smrg# gives unlimited permission to copy and/or distribute it,
87153da084b3Smrg# with or without modifications, as long as this notice is preserved.
87163da084b3Smrg
8717d63fdb69Smrg# serial 5
87183da084b3Smrg
8719d63fdb69Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
8720d63fdb69Smrg# ----------------------------------
8721d63fdb69Smrg# Control maintainer-specific portions of Makefiles.
8722d63fdb69Smrg# Default is to disable them, unless `enable' is passed literally.
8723d63fdb69Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
8724d63fdb69Smrg# can override the default with the --enable/--disable switch.
87253da084b3SmrgAC_DEFUN([AM_MAINTAINER_MODE],
8726d63fdb69Smrg[m4_case(m4_default([$1], [disable]),
8727d63fdb69Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
8728d63fdb69Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
8729d63fdb69Smrg       [m4_define([am_maintainer_other], [enable])
8730d63fdb69Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8731d63fdb69SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
8732d63fdb69Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
8733d63fdb69Smrg  AC_ARG_ENABLE([maintainer-mode],
8734d63fdb69Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
87353da084b3Smrg			  (and sometimes confusing) to the casual installer],
8736d63fdb69Smrg      [USE_MAINTAINER_MODE=$enableval],
8737d63fdb69Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
87383da084b3Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8739d63fdb69Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
87403da084b3Smrg  MAINT=$MAINTAINER_MODE_TRUE
8741d63fdb69Smrg  AC_SUBST([MAINT])dnl
87423da084b3Smrg]
87433da084b3Smrg)
87443da084b3Smrg
87453da084b3SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
87463da084b3Smrg
87473da084b3Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
87483da084b3Smrg
8749d63fdb69Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
87503da084b3Smrg#
87513da084b3Smrg# This file is free software; the Free Software Foundation
87523da084b3Smrg# gives unlimited permission to copy and/or distribute it,
87533da084b3Smrg# with or without modifications, as long as this notice is preserved.
87543da084b3Smrg
8755d63fdb69Smrg# serial 4
87563da084b3Smrg
87573da084b3Smrg# AM_MAKE_INCLUDE()
87583da084b3Smrg# -----------------
87593da084b3Smrg# Check to see how make treats includes.
87603da084b3SmrgAC_DEFUN([AM_MAKE_INCLUDE],
87613da084b3Smrg[am_make=${MAKE-make}
87623da084b3Smrgcat > confinc << 'END'
87633da084b3Smrgam__doit:
8764d63fdb69Smrg	@echo this is the am__doit target
87653da084b3Smrg.PHONY: am__doit
87663da084b3SmrgEND
87673da084b3Smrg# If we don't find an include directive, just comment out the code.
87683da084b3SmrgAC_MSG_CHECKING([for style of include used by $am_make])
87693da084b3Smrgam__include="#"
87703da084b3Smrgam__quote=
87713da084b3Smrg_am_result=none
87723da084b3Smrg# First try GNU make style include.
87733da084b3Smrgecho "include confinc" > confmf
8774d63fdb69Smrg# Ignore all kinds of additional output from `make'.
8775d63fdb69Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
8776d63fdb69Smrg*the\ am__doit\ target*)
8777d63fdb69Smrg  am__include=include
8778d63fdb69Smrg  am__quote=
8779d63fdb69Smrg  _am_result=GNU
8780d63fdb69Smrg  ;;
8781d63fdb69Smrgesac
87823da084b3Smrg# Now try BSD make style include.
87833da084b3Smrgif test "$am__include" = "#"; then
87843da084b3Smrg   echo '.include "confinc"' > confmf
8785d63fdb69Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
8786d63fdb69Smrg   *the\ am__doit\ target*)
8787d63fdb69Smrg     am__include=.include
8788d63fdb69Smrg     am__quote="\""
8789d63fdb69Smrg     _am_result=BSD
8790d63fdb69Smrg     ;;
8791d63fdb69Smrg   esac
87923da084b3Smrgfi
87933da084b3SmrgAC_SUBST([am__include])
87943da084b3SmrgAC_SUBST([am__quote])
87953da084b3SmrgAC_MSG_RESULT([$_am_result])
87963da084b3Smrgrm -f confinc confmf
87973da084b3Smrg])
87983da084b3Smrg
87993da084b3Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
88003da084b3Smrg
8801d63fdb69Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
88023da084b3Smrg# Free Software Foundation, Inc.
88033da084b3Smrg#
88043da084b3Smrg# This file is free software; the Free Software Foundation
88053da084b3Smrg# gives unlimited permission to copy and/or distribute it,
88063da084b3Smrg# with or without modifications, as long as this notice is preserved.
88073da084b3Smrg
8808d63fdb69Smrg# serial 6
88093da084b3Smrg
88103da084b3Smrg# AM_MISSING_PROG(NAME, PROGRAM)
88113da084b3Smrg# ------------------------------
88123da084b3SmrgAC_DEFUN([AM_MISSING_PROG],
88133da084b3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
88143da084b3Smrg$1=${$1-"${am_missing_run}$2"}
88153da084b3SmrgAC_SUBST($1)])
88163da084b3Smrg
88173da084b3Smrg
88183da084b3Smrg# AM_MISSING_HAS_RUN
88193da084b3Smrg# ------------------
88203da084b3Smrg# Define MISSING if not defined so far and test if it supports --run.
88213da084b3Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
88223da084b3SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
88233da084b3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8824d63fdb69SmrgAC_REQUIRE_AUX_FILE([missing])dnl
8825d63fdb69Smrgif test x"${MISSING+set}" != xset; then
8826d63fdb69Smrg  case $am_aux_dir in
8827d63fdb69Smrg  *\ * | *\	*)
8828d63fdb69Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8829d63fdb69Smrg  *)
8830d63fdb69Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8831d63fdb69Smrg  esac
8832d63fdb69Smrgfi
88333da084b3Smrg# Use eval to expand $SHELL
88343da084b3Smrgif eval "$MISSING --run true"; then
88353da084b3Smrg  am_missing_run="$MISSING --run "
88363da084b3Smrgelse
88373da084b3Smrg  am_missing_run=
88383da084b3Smrg  AC_MSG_WARN([`missing' script is too old or missing])
88393da084b3Smrgfi
88403da084b3Smrg])
88413da084b3Smrg
8842d63fdb69Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
88433da084b3Smrg#
88443da084b3Smrg# This file is free software; the Free Software Foundation
88453da084b3Smrg# gives unlimited permission to copy and/or distribute it,
88463da084b3Smrg# with or without modifications, as long as this notice is preserved.
88473da084b3Smrg
88483da084b3Smrg# AM_PROG_MKDIR_P
88493da084b3Smrg# ---------------
8850d63fdb69Smrg# Check for `mkdir -p'.
88513da084b3SmrgAC_DEFUN([AM_PROG_MKDIR_P],
8852d63fdb69Smrg[AC_PREREQ([2.60])dnl
8853d63fdb69SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8854d63fdb69Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8855d63fdb69Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
8856d63fdb69Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8857d63fdb69Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8858d63fdb69Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
8859d63fdb69Smrgdnl adjustment using top_builddir (which is defined more often than
8860d63fdb69Smrgdnl MKDIR_P).
8861d63fdb69SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8862d63fdb69Smrgcase $mkdir_p in
8863d63fdb69Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
8864d63fdb69Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8865d63fdb69Smrgesac
8866d63fdb69Smrg])
88673da084b3Smrg
88683da084b3Smrg# Helper functions for option handling.                     -*- Autoconf -*-
88693da084b3Smrg
8870d63fdb69Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
88713da084b3Smrg#
88723da084b3Smrg# This file is free software; the Free Software Foundation
88733da084b3Smrg# gives unlimited permission to copy and/or distribute it,
88743da084b3Smrg# with or without modifications, as long as this notice is preserved.
88753da084b3Smrg
8876d63fdb69Smrg# serial 4
88773da084b3Smrg
88783da084b3Smrg# _AM_MANGLE_OPTION(NAME)
88793da084b3Smrg# -----------------------
88803da084b3SmrgAC_DEFUN([_AM_MANGLE_OPTION],
88813da084b3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
88823da084b3Smrg
88833da084b3Smrg# _AM_SET_OPTION(NAME)
88843da084b3Smrg# ------------------------------
88853da084b3Smrg# Set option NAME.  Presently that only means defining a flag for this option.
88863da084b3SmrgAC_DEFUN([_AM_SET_OPTION],
88873da084b3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
88883da084b3Smrg
88893da084b3Smrg# _AM_SET_OPTIONS(OPTIONS)
88903da084b3Smrg# ----------------------------------
88913da084b3Smrg# OPTIONS is a space-separated list of Automake options.
88923da084b3SmrgAC_DEFUN([_AM_SET_OPTIONS],
8893d63fdb69Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
88943da084b3Smrg
88953da084b3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
88963da084b3Smrg# -------------------------------------------
88973da084b3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
88983da084b3SmrgAC_DEFUN([_AM_IF_OPTION],
88993da084b3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
89003da084b3Smrg
89013da084b3Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
89023da084b3Smrg
8903d63fdb69Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
89043da084b3Smrg# Free Software Foundation, Inc.
89053da084b3Smrg#
89063da084b3Smrg# This file is free software; the Free Software Foundation
89073da084b3Smrg# gives unlimited permission to copy and/or distribute it,
89083da084b3Smrg# with or without modifications, as long as this notice is preserved.
89093da084b3Smrg
8910d63fdb69Smrg# serial 5
89113da084b3Smrg
89123da084b3Smrg# AM_SANITY_CHECK
89133da084b3Smrg# ---------------
89143da084b3SmrgAC_DEFUN([AM_SANITY_CHECK],
89153da084b3Smrg[AC_MSG_CHECKING([whether build environment is sane])
89163da084b3Smrg# Just in case
89173da084b3Smrgsleep 1
89183da084b3Smrgecho timestamp > conftest.file
8919d63fdb69Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8920d63fdb69Smrg# name.  Accept space and tab only in the latter.
8921d63fdb69Smrgam_lf='
8922d63fdb69Smrg'
8923d63fdb69Smrgcase `pwd` in
8924d63fdb69Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8925d63fdb69Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8926d63fdb69Smrgesac
8927d63fdb69Smrgcase $srcdir in
8928d63fdb69Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8929d63fdb69Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8930d63fdb69Smrgesac
8931d63fdb69Smrg
89323da084b3Smrg# Do `set' in a subshell so we don't clobber the current shell's
89333da084b3Smrg# arguments.  Must try -L first in case configure is actually a
89343da084b3Smrg# symlink; some systems play weird games with the mod time of symlinks
89353da084b3Smrg# (eg FreeBSD returns the mod time of the symlink's containing
89363da084b3Smrg# directory).
89373da084b3Smrgif (
8938d63fdb69Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
89393da084b3Smrg   if test "$[*]" = "X"; then
89403da084b3Smrg      # -L didn't work.
8941d63fdb69Smrg      set X `ls -t "$srcdir/configure" conftest.file`
89423da084b3Smrg   fi
89433da084b3Smrg   rm -f conftest.file
89443da084b3Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
89453da084b3Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
89463da084b3Smrg
89473da084b3Smrg      # If neither matched, then we have a broken ls.  This can happen
89483da084b3Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
89493da084b3Smrg      # broken ls alias from the environment.  This has actually
89503da084b3Smrg      # happened.  Such a system could not be considered "sane".
89513da084b3Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
89523da084b3Smrgalias in your environment])
89533da084b3Smrg   fi
89543da084b3Smrg
89553da084b3Smrg   test "$[2]" = conftest.file
89563da084b3Smrg   )
89573da084b3Smrgthen
89583da084b3Smrg   # Ok.
89593da084b3Smrg   :
89603da084b3Smrgelse
89613da084b3Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
89623da084b3SmrgCheck your system clock])
89633da084b3Smrgfi
89643da084b3SmrgAC_MSG_RESULT(yes)])
89653da084b3Smrg
8966d63fdb69Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
8967d63fdb69Smrg#
8968d63fdb69Smrg# This file is free software; the Free Software Foundation
8969d63fdb69Smrg# gives unlimited permission to copy and/or distribute it,
8970d63fdb69Smrg# with or without modifications, as long as this notice is preserved.
8971d63fdb69Smrg
8972d63fdb69Smrg# serial 1
8973d63fdb69Smrg
8974d63fdb69Smrg# AM_SILENT_RULES([DEFAULT])
8975d63fdb69Smrg# --------------------------
8976d63fdb69Smrg# Enable less verbose build rules; with the default set to DEFAULT
8977d63fdb69Smrg# (`yes' being less verbose, `no' or empty being verbose).
8978d63fdb69SmrgAC_DEFUN([AM_SILENT_RULES],
8979d63fdb69Smrg[AC_ARG_ENABLE([silent-rules],
8980d63fdb69Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8981d63fdb69Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8982d63fdb69Smrgcase $enable_silent_rules in
8983d63fdb69Smrgyes) AM_DEFAULT_VERBOSITY=0;;
8984d63fdb69Smrgno)  AM_DEFAULT_VERBOSITY=1;;
8985d63fdb69Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8986d63fdb69Smrgesac
8987d63fdb69SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8988d63fdb69SmrgAM_BACKSLASH='\'
8989d63fdb69SmrgAC_SUBST([AM_BACKSLASH])dnl
8990d63fdb69Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8991d63fdb69Smrg])
8992d63fdb69Smrg
89933da084b3Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
89943da084b3Smrg#
89953da084b3Smrg# This file is free software; the Free Software Foundation
89963da084b3Smrg# gives unlimited permission to copy and/or distribute it,
89973da084b3Smrg# with or without modifications, as long as this notice is preserved.
89983da084b3Smrg
89993da084b3Smrg# AM_PROG_INSTALL_STRIP
90003da084b3Smrg# ---------------------
90013da084b3Smrg# One issue with vendor `install' (even GNU) is that you can't
90023da084b3Smrg# specify the program used to strip binaries.  This is especially
90033da084b3Smrg# annoying in cross-compiling environments, where the build's strip
90043da084b3Smrg# is unlikely to handle the host's binaries.
90053da084b3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
90063da084b3Smrg# always use install-sh in `make install-strip', and initialize
90073da084b3Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
90083da084b3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
90093da084b3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
90103da084b3Smrg# Installed binaries are usually stripped using `strip' when the user
90113da084b3Smrg# run `make install-strip'.  However `strip' might not be the right
90123da084b3Smrg# tool to use in cross-compilation environments, therefore Automake
90133da084b3Smrg# will honor the `STRIP' environment variable to overrule this program.
90143da084b3Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
90153da084b3Smrgif test "$cross_compiling" != no; then
90163da084b3Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
90173da084b3Smrgfi
9018d63fdb69SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
90193da084b3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
90203da084b3Smrg
9021d63fdb69Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9022d63fdb69Smrg#
9023d63fdb69Smrg# This file is free software; the Free Software Foundation
9024d63fdb69Smrg# gives unlimited permission to copy and/or distribute it,
9025d63fdb69Smrg# with or without modifications, as long as this notice is preserved.
9026d63fdb69Smrg
9027d63fdb69Smrg# serial 2
9028d63fdb69Smrg
9029d63fdb69Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
9030d63fdb69Smrg# ---------------------------
9031d63fdb69Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9032d63fdb69Smrg# This macro is traced by Automake.
9033d63fdb69SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9034d63fdb69Smrg
9035d63fdb69Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9036d63fdb69Smrg# ---------------------------
9037d63fdb69Smrg# Public sister of _AM_SUBST_NOTMAKE.
9038d63fdb69SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9039d63fdb69Smrg
90403da084b3Smrg# Check how to create a tarball.                            -*- Autoconf -*-
90413da084b3Smrg
90423da084b3Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
90433da084b3Smrg#
90443da084b3Smrg# This file is free software; the Free Software Foundation
90453da084b3Smrg# gives unlimited permission to copy and/or distribute it,
90463da084b3Smrg# with or without modifications, as long as this notice is preserved.
90473da084b3Smrg
90483da084b3Smrg# serial 2
90493da084b3Smrg
90503da084b3Smrg# _AM_PROG_TAR(FORMAT)
90513da084b3Smrg# --------------------
90523da084b3Smrg# Check how to create a tarball in format FORMAT.
90533da084b3Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
90543da084b3Smrg#
90553da084b3Smrg# Substitute a variable $(am__tar) that is a command
90563da084b3Smrg# writing to stdout a FORMAT-tarball containing the directory
90573da084b3Smrg# $tardir.
90583da084b3Smrg#     tardir=directory && $(am__tar) > result.tar
90593da084b3Smrg#
90603da084b3Smrg# Substitute a variable $(am__untar) that extract such
90613da084b3Smrg# a tarball read from stdin.
90623da084b3Smrg#     $(am__untar) < result.tar
90633da084b3SmrgAC_DEFUN([_AM_PROG_TAR],
90643da084b3Smrg[# Always define AMTAR for backward compatibility.
90653da084b3SmrgAM_MISSING_PROG([AMTAR], [tar])
90663da084b3Smrgm4_if([$1], [v7],
90673da084b3Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
90683da084b3Smrg     [m4_case([$1], [ustar],, [pax],,
90693da084b3Smrg              [m4_fatal([Unknown tar format])])
90703da084b3SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
90713da084b3Smrg# Loop over all known methods to create a tar archive until one works.
90723da084b3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
90733da084b3Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
90743da084b3Smrg# Do not fold the above two line into one, because Tru64 sh and
90753da084b3Smrg# Solaris sh will not grok spaces in the rhs of `-'.
90763da084b3Smrgfor _am_tool in $_am_tools
90773da084b3Smrgdo
90783da084b3Smrg  case $_am_tool in
90793da084b3Smrg  gnutar)
90803da084b3Smrg    for _am_tar in tar gnutar gtar;
90813da084b3Smrg    do
90823da084b3Smrg      AM_RUN_LOG([$_am_tar --version]) && break
90833da084b3Smrg    done
90843da084b3Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
90853da084b3Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
90863da084b3Smrg    am__untar="$_am_tar -xf -"
90873da084b3Smrg    ;;
90883da084b3Smrg  plaintar)
90893da084b3Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
90903da084b3Smrg    # ustar tarball either.
90913da084b3Smrg    (tar --version) >/dev/null 2>&1 && continue
90923da084b3Smrg    am__tar='tar chf - "$$tardir"'
90933da084b3Smrg    am__tar_='tar chf - "$tardir"'
90943da084b3Smrg    am__untar='tar xf -'
90953da084b3Smrg    ;;
90963da084b3Smrg  pax)
90973da084b3Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
90983da084b3Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
90993da084b3Smrg    am__untar='pax -r'
91003da084b3Smrg    ;;
91013da084b3Smrg  cpio)
91023da084b3Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
91033da084b3Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
91043da084b3Smrg    am__untar='cpio -i -H $1 -d'
91053da084b3Smrg    ;;
91063da084b3Smrg  none)
91073da084b3Smrg    am__tar=false
91083da084b3Smrg    am__tar_=false
91093da084b3Smrg    am__untar=false
91103da084b3Smrg    ;;
91113da084b3Smrg  esac
91123da084b3Smrg
91133da084b3Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
91143da084b3Smrg  # and am__untar set.
91153da084b3Smrg  test -n "${am_cv_prog_tar_$1}" && break
91163da084b3Smrg
91173da084b3Smrg  # tar/untar a dummy directory, and stop if the command works
91183da084b3Smrg  rm -rf conftest.dir
91193da084b3Smrg  mkdir conftest.dir
91203da084b3Smrg  echo GrepMe > conftest.dir/file
91213da084b3Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
91223da084b3Smrg  rm -rf conftest.dir
91233da084b3Smrg  if test -s conftest.tar; then
91243da084b3Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
91253da084b3Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
91263da084b3Smrg  fi
91273da084b3Smrgdone
91283da084b3Smrgrm -rf conftest.dir
91293da084b3Smrg
91303da084b3SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
91313da084b3SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
91323da084b3SmrgAC_SUBST([am__tar])
91333da084b3SmrgAC_SUBST([am__untar])
91343da084b3Smrg]) # _AM_PROG_TAR
91353da084b3Smrg
9136d63fdb69Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9137d63fdb69Smrgdnl
9138d63fdb69Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
9139d63fdb69Smrgdnl 
9140d63fdb69Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
9141d63fdb69Smrgdnl copy of this software and associated documentation files (the
9142d63fdb69Smrgdnl "Software"), to deal in the Software without restriction, including
9143d63fdb69Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
9144d63fdb69Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
9145d63fdb69Smrgdnl to whom the Software is furnished to do so, provided that the above
9146d63fdb69Smrgdnl copyright notice(s) and this permission notice appear in all copies of
9147d63fdb69Smrgdnl the Software and that both the above copyright notice(s) and this
9148d63fdb69Smrgdnl permission notice appear in supporting documentation.
9149d63fdb69Smrgdnl
9150d63fdb69Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9151d63fdb69Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9152d63fdb69Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
9153d63fdb69Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
9154d63fdb69Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
9155d63fdb69Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
9156d63fdb69Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
9157d63fdb69Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
9158d63fdb69Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9159d63fdb69Smrgdnl
9160d63fdb69Smrgdnl Except as contained in this notice, the name of a copyright holder
9161d63fdb69Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
9162d63fdb69Smrgdnl or other dealings in this Software without prior written authorization
9163d63fdb69Smrgdnl of the copyright holder.
9164d63fdb69Smrg
9165d63fdb69Smrg# XORG_MACROS_VERSION(required-version)
9166d63fdb69Smrg# -------------------------------------
9167d63fdb69Smrg# Minimum version: 1.1.0
9168d63fdb69Smrg#
9169d63fdb69Smrg# If you're using a macro added in Version 1.1 or newer, include this in
9170d63fdb69Smrg# your configure.ac with the minimum required version, such as:
9171d63fdb69Smrg# XORG_MACROS_VERSION(1.1)
9172d63fdb69Smrg#
9173d63fdb69Smrg# To ensure that this macro is defined, also add:
9174d63fdb69Smrg# m4_ifndef([XORG_MACROS_VERSION],
9175d63fdb69Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9176d63fdb69Smrg#
9177d63fdb69Smrg#
9178d63fdb69Smrg# See the "minimum version" comment for each macro you use to see what 
9179d63fdb69Smrg# version you require.
9180d63fdb69Smrgm4_defun([XORG_MACROS_VERSION],[
9181d63fdb69Smrgm4_define([vers_have], [1.2.2])
9182d63fdb69Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9183d63fdb69Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9184d63fdb69Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
9185d63fdb69Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9186d63fdb69Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
9187d63fdb69Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9188d63fdb69Smrgm4_undefine([vers_have])
9189d63fdb69Smrgm4_undefine([maj_have])
9190d63fdb69Smrgm4_undefine([maj_needed])
9191d63fdb69Smrg]) # XORG_MACROS_VERSION
9192d63fdb69Smrg
9193d63fdb69Smrg# XORG_PROG_RAWCPP()
9194d63fdb69Smrg# ------------------
9195d63fdb69Smrg# Minimum version: 1.0.0
9196d63fdb69Smrg#
9197d63fdb69Smrg# Find cpp program and necessary flags for use in pre-processing text files
9198d63fdb69Smrg# such as man pages and config files
9199d63fdb69SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
9200d63fdb69SmrgAC_REQUIRE([AC_PROG_CPP])
9201d63fdb69SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
9202d63fdb69Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9203d63fdb69Smrg
9204d63fdb69Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
9205d63fdb69Smrg# which is not the best choice for supporting other OS'es, but covers most
9206d63fdb69Smrg# of the ones we need for now.
9207d63fdb69SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
9208d63fdb69SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
9209d63fdb69Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9210d63fdb69Smrg	AC_MSG_RESULT([no])
9211d63fdb69Smrgelse
9212d63fdb69Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9213d63fdb69Smrg		RAWCPPFLAGS=-undef
9214d63fdb69Smrg		AC_MSG_RESULT([yes])
9215d63fdb69Smrg	# under Cygwin unix is still defined even with -undef
9216d63fdb69Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9217d63fdb69Smrg		RAWCPPFLAGS="-undef -ansi"
9218d63fdb69Smrg		AC_MSG_RESULT([yes, with -ansi])
9219d63fdb69Smrg	else
9220d63fdb69Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9221d63fdb69Smrg	fi
9222d63fdb69Smrgfi
9223d63fdb69Smrgrm -f conftest.$ac_ext
9224d63fdb69Smrg
9225d63fdb69SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
9226d63fdb69SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
9227d63fdb69Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9228d63fdb69Smrg	AC_MSG_RESULT([no])
9229d63fdb69Smrgelse
9230d63fdb69Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9231d63fdb69Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9232d63fdb69Smrg		AC_MSG_RESULT([yes])
9233d63fdb69Smrg	else
9234d63fdb69Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9235d63fdb69Smrg	fi
9236d63fdb69Smrgfi
9237d63fdb69Smrgrm -f conftest.$ac_ext
9238d63fdb69SmrgAC_SUBST(RAWCPPFLAGS)
9239d63fdb69Smrg]) # XORG_PROG_RAWCPP
9240d63fdb69Smrg
9241d63fdb69Smrg# XORG_MANPAGE_SECTIONS()
9242d63fdb69Smrg# -----------------------
9243d63fdb69Smrg# Minimum version: 1.0.0
9244d63fdb69Smrg#
9245d63fdb69Smrg# Determine which sections man pages go in for the different man page types
9246d63fdb69Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9247d63fdb69Smrg# Not sure if there's any better way than just hardcoding by OS name.
9248d63fdb69Smrg# Override default settings by setting environment variables
9249d63fdb69Smrg
9250d63fdb69SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
9251d63fdb69SmrgAC_REQUIRE([AC_CANONICAL_HOST])
9252d63fdb69Smrg
9253d63fdb69Smrgif test x$APP_MAN_SUFFIX = x    ; then
9254d63fdb69Smrg    APP_MAN_SUFFIX=1
9255d63fdb69Smrgfi
9256d63fdb69Smrgif test x$APP_MAN_DIR = x    ; then
9257d63fdb69Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9258d63fdb69Smrgfi
9259d63fdb69Smrg
9260d63fdb69Smrgif test x$LIB_MAN_SUFFIX = x    ; then
9261d63fdb69Smrg    LIB_MAN_SUFFIX=3
9262d63fdb69Smrgfi
9263d63fdb69Smrgif test x$LIB_MAN_DIR = x    ; then
9264d63fdb69Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9265d63fdb69Smrgfi
9266d63fdb69Smrg
9267d63fdb69Smrgif test x$FILE_MAN_SUFFIX = x    ; then
9268d63fdb69Smrg    case $host_os in
9269d63fdb69Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
9270d63fdb69Smrg	*)		FILE_MAN_SUFFIX=5  ;;
9271d63fdb69Smrg    esac
9272d63fdb69Smrgfi
9273d63fdb69Smrgif test x$FILE_MAN_DIR = x    ; then
9274d63fdb69Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9275d63fdb69Smrgfi
9276d63fdb69Smrg
9277d63fdb69Smrgif test x$MISC_MAN_SUFFIX = x    ; then
9278d63fdb69Smrg    case $host_os in
9279d63fdb69Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
9280d63fdb69Smrg	*)		MISC_MAN_SUFFIX=7  ;;
9281d63fdb69Smrg    esac
9282d63fdb69Smrgfi
9283d63fdb69Smrgif test x$MISC_MAN_DIR = x    ; then
9284d63fdb69Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9285d63fdb69Smrgfi
9286d63fdb69Smrg
9287d63fdb69Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
9288d63fdb69Smrg    case $host_os in
9289d63fdb69Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
9290d63fdb69Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
9291d63fdb69Smrg    esac
9292d63fdb69Smrgfi
9293d63fdb69Smrgif test x$DRIVER_MAN_DIR = x    ; then
9294d63fdb69Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9295d63fdb69Smrgfi
9296d63fdb69Smrg
9297d63fdb69Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
9298d63fdb69Smrg    case $host_os in
9299d63fdb69Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
9300d63fdb69Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
9301d63fdb69Smrg    esac
9302d63fdb69Smrgfi
9303d63fdb69Smrgif test x$ADMIN_MAN_DIR = x    ; then
9304d63fdb69Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9305d63fdb69Smrgfi
9306d63fdb69Smrg
9307d63fdb69Smrg
9308d63fdb69SmrgAC_SUBST([APP_MAN_SUFFIX])
9309d63fdb69SmrgAC_SUBST([LIB_MAN_SUFFIX])
9310d63fdb69SmrgAC_SUBST([FILE_MAN_SUFFIX])
9311d63fdb69SmrgAC_SUBST([MISC_MAN_SUFFIX])
9312d63fdb69SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
9313d63fdb69SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
9314d63fdb69SmrgAC_SUBST([APP_MAN_DIR])
9315d63fdb69SmrgAC_SUBST([LIB_MAN_DIR])
9316d63fdb69SmrgAC_SUBST([FILE_MAN_DIR])
9317d63fdb69SmrgAC_SUBST([MISC_MAN_DIR])
9318d63fdb69SmrgAC_SUBST([DRIVER_MAN_DIR])
9319d63fdb69SmrgAC_SUBST([ADMIN_MAN_DIR])
9320d63fdb69Smrg]) # XORG_MANPAGE_SECTIONS
9321d63fdb69Smrg
9322d63fdb69Smrg# XORG_CHECK_LINUXDOC
9323d63fdb69Smrg# -------------------
9324d63fdb69Smrg# Minimum version: 1.0.0
9325d63fdb69Smrg#
9326d63fdb69Smrg# Defines the variable MAKE_TEXT if the necessary tools and
9327d63fdb69Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9328d63fdb69Smrg# Whether or not the necessary tools and files are found can be checked
9329d63fdb69Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
9330d63fdb69SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
9331d63fdb69Smrgif test x$XORG_SGML_PATH = x ; then
9332d63fdb69Smrg    XORG_SGML_PATH=$prefix/share/sgml
9333d63fdb69Smrgfi
9334d63fdb69SmrgHAVE_DEFS_ENT=
9335d63fdb69Smrg
9336d63fdb69Smrgif test x"$cross_compiling" = x"yes" ; then
9337d63fdb69Smrg  HAVE_DEFS_ENT=no
9338d63fdb69Smrgelse
9339d63fdb69Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
9340d63fdb69Smrgfi
9341d63fdb69Smrg
9342d63fdb69SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
9343d63fdb69SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
9344d63fdb69Smrg
9345d63fdb69SmrgAC_MSG_CHECKING([Whether to build documentation])
9346d63fdb69Smrg
9347d63fdb69Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
9348d63fdb69Smrg   BUILDDOC=yes
9349d63fdb69Smrgelse
9350d63fdb69Smrg   BUILDDOC=no
9351d63fdb69Smrgfi
9352d63fdb69Smrg
9353d63fdb69SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9354d63fdb69Smrg
9355d63fdb69SmrgAC_MSG_RESULT([$BUILDDOC])
9356d63fdb69Smrg
9357d63fdb69SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
9358d63fdb69Smrg
9359d63fdb69Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
9360d63fdb69Smrg   BUILDPDFDOC=yes
9361d63fdb69Smrgelse
9362d63fdb69Smrg   BUILDPDFDOC=no
9363d63fdb69Smrgfi
9364d63fdb69Smrg
9365d63fdb69SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9366d63fdb69Smrg
9367d63fdb69SmrgAC_MSG_RESULT([$BUILDPDFDOC])
9368d63fdb69Smrg
9369d63fdb69SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
9370d63fdb69SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9371d63fdb69SmrgMAKE_PDF="$PS2PDF"
9372d63fdb69SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9373d63fdb69Smrg
9374d63fdb69SmrgAC_SUBST(MAKE_TEXT)
9375d63fdb69SmrgAC_SUBST(MAKE_PS)
9376d63fdb69SmrgAC_SUBST(MAKE_PDF)
9377d63fdb69SmrgAC_SUBST(MAKE_HTML)
9378d63fdb69Smrg]) # XORG_CHECK_LINUXDOC
9379d63fdb69Smrg
9380d63fdb69Smrg# XORG_CHECK_DOCBOOK
9381d63fdb69Smrg# -------------------
9382d63fdb69Smrg# Minimum version: 1.0.0
9383d63fdb69Smrg#
9384d63fdb69Smrg# Checks for the ability to build output formats from SGML DocBook source.
9385d63fdb69Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9386d63fdb69Smrg# indicates whether the necessary tools and files are found and, if set,
9387d63fdb69Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
9388d63fdb69SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
9389d63fdb69Smrgif test x$XORG_SGML_PATH = x ; then
9390d63fdb69Smrg    XORG_SGML_PATH=$prefix/share/sgml
9391d63fdb69Smrgfi
9392d63fdb69SmrgHAVE_DEFS_ENT=
9393d63fdb69SmrgBUILDTXTDOC=no
9394d63fdb69SmrgBUILDPDFDOC=no
9395d63fdb69SmrgBUILDPSDOC=no
9396d63fdb69SmrgBUILDHTMLDOC=no
9397d63fdb69Smrg
9398d63fdb69SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
9399d63fdb69Smrg
9400d63fdb69SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
9401d63fdb69SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9402d63fdb69SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
9403d63fdb69SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9404d63fdb69Smrg
9405d63fdb69SmrgAC_MSG_CHECKING([Whether to build text documentation])
9406d63fdb69Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
9407d63fdb69Smrg   test x$BUILD_TXTDOC != xno; then
9408d63fdb69Smrg	BUILDTXTDOC=yes
9409d63fdb69Smrgfi
9410d63fdb69SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9411d63fdb69SmrgAC_MSG_RESULT([$BUILDTXTDOC])
9412d63fdb69Smrg
9413d63fdb69SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
9414d63fdb69Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
9415d63fdb69Smrg   test x$BUILD_PDFDOC != xno; then
9416d63fdb69Smrg	BUILDPDFDOC=yes
9417d63fdb69Smrgfi
9418d63fdb69SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9419d63fdb69SmrgAC_MSG_RESULT([$BUILDPDFDOC])
9420d63fdb69Smrg
9421d63fdb69SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
9422d63fdb69Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
9423d63fdb69Smrg   test x$BUILD_PSDOC != xno; then
9424d63fdb69Smrg	BUILDPSDOC=yes
9425d63fdb69Smrgfi
9426d63fdb69SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9427d63fdb69SmrgAC_MSG_RESULT([$BUILDPSDOC])
9428d63fdb69Smrg
9429d63fdb69SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
9430d63fdb69Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
9431d63fdb69Smrg   test x$BUILD_HTMLDOC != xno; then
9432d63fdb69Smrg	BUILDHTMLDOC=yes
9433d63fdb69Smrgfi
9434d63fdb69SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9435d63fdb69SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
9436d63fdb69Smrg
9437d63fdb69SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9438d63fdb69SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9439d63fdb69SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9440d63fdb69SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9441d63fdb69Smrg
9442d63fdb69SmrgAC_SUBST(MAKE_TEXT)
9443d63fdb69SmrgAC_SUBST(MAKE_PS)
9444d63fdb69SmrgAC_SUBST(MAKE_PDF)
9445d63fdb69SmrgAC_SUBST(MAKE_HTML)
9446d63fdb69Smrg]) # XORG_CHECK_DOCBOOK
9447d63fdb69Smrg
9448d63fdb69Smrg# XORG_CHECK_MALLOC_ZERO
9449d63fdb69Smrg# ----------------------
9450d63fdb69Smrg# Minimum version: 1.0.0
9451d63fdb69Smrg#
9452d63fdb69Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
9453d63fdb69Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
9454d63fdb69Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
9455d63fdb69SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
9456d63fdb69SmrgAC_ARG_ENABLE(malloc0returnsnull,
9457d63fdb69Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
9458d63fdb69Smrg		       [malloc(0) returns NULL (default: auto)]),
9459d63fdb69Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
9460d63fdb69Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
9461d63fdb69Smrg
9462d63fdb69SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
9463d63fdb69Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
9464d63fdb69Smrg	AC_RUN_IFELSE([
9465d63fdb69Smrgchar *malloc();
9466d63fdb69Smrgchar *realloc();
9467d63fdb69Smrgchar *calloc();
9468d63fdb69Smrgmain() {
9469d63fdb69Smrg    char *m0, *r0, *c0, *p;
9470d63fdb69Smrg    m0 = malloc(0);
9471d63fdb69Smrg    p = malloc(10);
9472d63fdb69Smrg    r0 = realloc(p,0);
9473d63fdb69Smrg    c0 = calloc(0);
9474d63fdb69Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
9475d63fdb69Smrg}],
9476d63fdb69Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
9477d63fdb69Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
9478d63fdb69Smrgfi
9479d63fdb69SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
9480d63fdb69Smrg
9481d63fdb69Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
9482d63fdb69Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
9483d63fdb69Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
9484d63fdb69Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
9485d63fdb69Smrgelse
9486d63fdb69Smrg	MALLOC_ZERO_CFLAGS=""
9487d63fdb69Smrg	XMALLOC_ZERO_CFLAGS=""
9488d63fdb69Smrg	XTMALLOC_ZERO_CFLAGS=""
9489d63fdb69Smrgfi
9490d63fdb69Smrg
9491d63fdb69SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
9492d63fdb69SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
9493d63fdb69SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
9494d63fdb69Smrg]) # XORG_CHECK_MALLOC_ZERO
9495d63fdb69Smrg
9496d63fdb69Smrg# XORG_WITH_LINT()
9497d63fdb69Smrg# ----------------
9498d63fdb69Smrg# Minimum version: 1.1.0
9499d63fdb69Smrg#
9500d63fdb69Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
9501d63fdb69Smrg# is specified.   (Use --with-lint=sparse for sparse.)
9502d63fdb69Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
9503d63fdb69Smrg# Sets $LINT_FLAGS to flags to pass to source checker
9504d63fdb69Smrg# Sets LINT automake conditional if enabled (default: disabled)
9505d63fdb69Smrg#
9506d63fdb69SmrgAC_DEFUN([XORG_WITH_LINT],[
9507d63fdb69Smrg
9508d63fdb69Smrg# Allow checking code with lint, sparse, etc.
9509d63fdb69SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
9510d63fdb69Smrg		[Use a lint-style source code checker (default: disabled)])],
9511d63fdb69Smrg		[use_lint=$withval], [use_lint=no])
9512d63fdb69Smrgif test "x$use_lint" = "xyes" ; then
9513d63fdb69Smrg	LINT="lint"
9514d63fdb69Smrgelse
9515d63fdb69Smrg	LINT="$use_lint"
9516d63fdb69Smrgfi
9517d63fdb69Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
9518d63fdb69Smrg    case $LINT in
9519d63fdb69Smrg	lint|*/lint)
9520d63fdb69Smrg	    case $host_os in
9521d63fdb69Smrg		solaris*)
9522d63fdb69Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
9523d63fdb69Smrg			;;
9524d63fdb69Smrg	    esac
9525d63fdb69Smrg	    ;;
9526d63fdb69Smrg    esac
9527d63fdb69Smrgfi
9528d63fdb69Smrg
9529d63fdb69SmrgAC_SUBST(LINT)
9530d63fdb69SmrgAC_SUBST(LINT_FLAGS)
9531d63fdb69SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
9532d63fdb69Smrg
9533d63fdb69Smrg]) # XORG_WITH_LINT
9534d63fdb69Smrg
9535d63fdb69Smrg# XORG_LINT_LIBRARY(LIBNAME)
9536d63fdb69Smrg# --------------------------
9537d63fdb69Smrg# Minimum version: 1.1.0
9538d63fdb69Smrg#
9539d63fdb69Smrg# Sets up flags for building lint libraries for checking programs that call
9540d63fdb69Smrg# functions in the library.
9541d63fdb69Smrg# Disabled by default, enable with --enable-lint-library
9542d63fdb69Smrg# Sets: 
9543d63fdb69Smrg#	@LINTLIB@		- name of lint library file to make
9544d63fdb69Smrg#	MAKE_LINT_LIB		- automake conditional
9545d63fdb69Smrg#
9546d63fdb69Smrg
9547d63fdb69SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
9548d63fdb69SmrgAC_REQUIRE([XORG_WITH_LINT])
9549d63fdb69Smrg# Build lint "library" for more indepth checks of programs calling this library
9550d63fdb69SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
9551d63fdb69Smrg	[Create lint library (default: disabled)])],
9552d63fdb69Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
9553d63fdb69Smrgif test "x$make_lint_lib" != "xno" ; then
9554d63fdb69Smrg	if test "x$LINT" = "xno" ; then
9555d63fdb69Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
9556d63fdb69Smrg	fi
9557d63fdb69Smrg	if test "x$make_lint_lib" = "xyes" ; then
9558d63fdb69Smrg		LINTLIB=llib-l$1.ln
9559d63fdb69Smrg	else
9560d63fdb69Smrg		LINTLIB=$make_lint_lib
9561d63fdb69Smrg	fi
9562d63fdb69Smrgfi
9563d63fdb69SmrgAC_SUBST(LINTLIB)
9564d63fdb69SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
9565d63fdb69Smrg
9566d63fdb69Smrg]) # XORG_LINT_LIBRARY
9567d63fdb69Smrg
9568d63fdb69Smrg# XORG_CWARNFLAGS
9569d63fdb69Smrg# ---------------
9570d63fdb69Smrg# Minimum version: 1.2.0
9571d63fdb69Smrg#
9572d63fdb69Smrg# Defines CWARNFLAGS to enable C compiler warnings.
9573d63fdb69Smrg#
9574d63fdb69SmrgAC_DEFUN([XORG_CWARNFLAGS], [
9575d63fdb69SmrgAC_REQUIRE([AC_PROG_CC])
9576d63fdb69Smrgif  test "x$GCC" = xyes ; then
9577d63fdb69Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
9578d63fdb69Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
9579d63fdb69Smrg-Wbad-function-cast"
9580d63fdb69Smrg    case `$CC -dumpversion` in
9581d63fdb69Smrg    3.4.* | 4.*)
9582d63fdb69Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
9583d63fdb69Smrg	;;
9584d63fdb69Smrg    esac
9585d63fdb69Smrgelse
9586d63fdb69Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9587d63fdb69Smrg    if test "x$SUNCC" = "xyes"; then
9588d63fdb69Smrg	CWARNFLAGS="-v"
9589d63fdb69Smrg    fi
9590d63fdb69Smrgfi
9591d63fdb69SmrgAC_SUBST(CWARNFLAGS)
9592d63fdb69Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9593d63fdb69Smrg]) # XORG_CWARNFLAGS
9594d63fdb69Smrgdnl Copyright 2005 Red Hat, Inc
9595d63fdb69Smrgdnl
9596d63fdb69Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
9597d63fdb69Smrgdnl documentation for any purpose is hereby granted without fee, provided that
9598d63fdb69Smrgdnl the above copyright notice appear in all copies and that both that
9599d63fdb69Smrgdnl copyright notice and this permission notice appear in supporting
9600d63fdb69Smrgdnl documentation.
9601d63fdb69Smrgdnl
9602d63fdb69Smrgdnl The above copyright notice and this permission notice shall be included
9603d63fdb69Smrgdnl in all copies or substantial portions of the Software.
9604d63fdb69Smrgdnl
9605d63fdb69Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9606d63fdb69Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9607d63fdb69Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9608d63fdb69Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
9609d63fdb69Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
9610d63fdb69Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
9611d63fdb69Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
9612d63fdb69Smrgdnl
9613d63fdb69Smrgdnl Except as contained in this notice, the name of the copyright holders shall
9614d63fdb69Smrgdnl not be used in advertising or otherwise to promote the sale, use or
9615d63fdb69Smrgdnl other dealings in this Software without prior written authorization
9616d63fdb69Smrgdnl from the copyright holders.
9617d63fdb69Smrgdnl
9618d63fdb69Smrg
9619d63fdb69Smrg# XORG_RELEASE_VERSION
9620d63fdb69Smrg# --------------------
9621d63fdb69Smrg# Adds --with/without-release-string and changes the PACKAGE and
9622d63fdb69Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
9623d63fdb69Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
9624d63fdb69Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
9625d63fdb69Smrg 
9626d63fdb69SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
9627d63fdb69Smrg	AC_ARG_WITH(release-version,
9628d63fdb69Smrg			AC_HELP_STRING([--with-release-version=STRING],
9629d63fdb69Smrg				[Use release version string in package name]),
9630d63fdb69Smrg			[RELEASE_VERSION="$withval"],
9631d63fdb69Smrg			[RELEASE_VERSION=""])
9632d63fdb69Smrg	if test "x$RELEASE_VERSION" != "x"; then
9633d63fdb69Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
9634d63fdb69Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
9635d63fdb69Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
9636d63fdb69Smrg	fi
9637d63fdb69Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
9638d63fdb69Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
9639d63fdb69Smrg		[Major version of this package])
9640d63fdb69Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
9641d63fdb69Smrg	if test "x$PVM" = "x"; then
9642d63fdb69Smrg		PVM="0"
9643d63fdb69Smrg	fi
9644d63fdb69Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
9645d63fdb69Smrg		[$PVM],
9646d63fdb69Smrg		[Minor version of this package])
9647d63fdb69Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
9648d63fdb69Smrg	if test "x$PVP" = "x"; then
9649d63fdb69Smrg		PVP="0"
9650d63fdb69Smrg	fi
9651d63fdb69Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
9652d63fdb69Smrg		[$PVP],
9653d63fdb69Smrg		[Patch version of this package])
9654d63fdb69Smrg])
9655d63fdb69Smrg
9656d63fdb69Smrg# XORG_CHANGELOG()
9657d63fdb69Smrg# ----------------
9658d63fdb69Smrg# Minimum version: 1.2.0
9659d63fdb69Smrg#
9660d63fdb69Smrg# Defines the variable CHANGELOG_CMD as the command to generate
9661d63fdb69Smrg# ChangeLog from git.
9662d63fdb69Smrg#
9663d63fdb69Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
9664d63fdb69Smrg#
9665d63fdb69SmrgAC_DEFUN([XORG_CHANGELOG], [
9666d63fdb69SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
9667d63fdb69Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
9668d63fdb69Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
9669d63fdb69SmrgAC_SUBST([CHANGELOG_CMD])
9670d63fdb69SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
9671d63fdb69Smrg]) # XORG_CHANGELOG
9672d63fdb69Smrg
9673