aclocal.m4 revision 786a6f21
1786a6f21Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
21d54945dSmrg
31d54945dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4ba85709eSmrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
51d54945dSmrg# This file is free software; the Free Software Foundation
61d54945dSmrg# gives unlimited permission to copy and/or distribute it,
71d54945dSmrg# with or without modifications, as long as this notice is preserved.
81d54945dSmrg
91d54945dSmrg# This program is distributed in the hope that it will be useful,
101d54945dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111d54945dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121d54945dSmrg# PARTICULAR PURPOSE.
131d54945dSmrg
14ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15ba85709eSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16786a6f21Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17ba85709eSmrg[m4_warning([this file was generated for autoconf 2.63.
18ba85709eSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19ba85709eSmrgIf you have problems, you may need to regenerate the build system entirely.
20ba85709eSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21ba85709eSmrg
221d54945dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23786a6f21Smrg#
24786a6f21Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25786a6f21Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26786a6f21Smrg#   Written by Gordon Matzigkeit, 1996
27786a6f21Smrg#
28786a6f21Smrg# This file is free software; the Free Software Foundation gives
29786a6f21Smrg# unlimited permission to copy and/or distribute it, with or without
30786a6f21Smrg# modifications, as long as this notice is preserved.
31786a6f21Smrg
32786a6f21Smrgm4_define([_LT_COPYING], [dnl
33786a6f21Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34786a6f21Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35786a6f21Smrg#   Written by Gordon Matzigkeit, 1996
36786a6f21Smrg#
37786a6f21Smrg#   This file is part of GNU Libtool.
38786a6f21Smrg#
39786a6f21Smrg# GNU Libtool is free software; you can redistribute it and/or
40786a6f21Smrg# modify it under the terms of the GNU General Public License as
41786a6f21Smrg# published by the Free Software Foundation; either version 2 of
42786a6f21Smrg# the License, or (at your option) any later version.
43786a6f21Smrg#
44786a6f21Smrg# As a special exception to the GNU General Public License,
45786a6f21Smrg# if you distribute this file as part of a program or library that
46786a6f21Smrg# is built using GNU Libtool, you may include this file under the
47786a6f21Smrg# same distribution terms that you use for the rest of that program.
48786a6f21Smrg#
49786a6f21Smrg# GNU Libtool is distributed in the hope that it will be useful,
50786a6f21Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51786a6f21Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52786a6f21Smrg# GNU General Public License for more details.
53786a6f21Smrg#
54786a6f21Smrg# You should have received a copy of the GNU General Public License
55786a6f21Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56786a6f21Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57786a6f21Smrg# obtained by writing to the Free Software Foundation, Inc.,
58786a6f21Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59786a6f21Smrg])
601d54945dSmrg
61786a6f21Smrg# serial 56 LT_INIT
621d54945dSmrg
631d54945dSmrg
64786a6f21Smrg# LT_PREREQ(VERSION)
65786a6f21Smrg# ------------------
66786a6f21Smrg# Complain and exit if this libtool version is less that VERSION.
67786a6f21Smrgm4_defun([LT_PREREQ],
68786a6f21Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69786a6f21Smrg       [m4_default([$3],
70786a6f21Smrg		   [m4_fatal([Libtool version $1 or higher is required],
71786a6f21Smrg		             63)])],
72786a6f21Smrg       [$2])])
731d54945dSmrg
741d54945dSmrg
75786a6f21Smrg# _LT_CHECK_BUILDDIR
76786a6f21Smrg# ------------------
77786a6f21Smrg# Complain if the absolute build directory name contains unusual characters
78786a6f21Smrgm4_defun([_LT_CHECK_BUILDDIR],
79786a6f21Smrg[case `pwd` in
80786a6f21Smrg  *\ * | *\	*)
81786a6f21Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82786a6f21Smrgesac
83786a6f21Smrg])
84786a6f21Smrg
85786a6f21Smrg
86786a6f21Smrg# LT_INIT([OPTIONS])
87786a6f21Smrg# ------------------
88786a6f21SmrgAC_DEFUN([LT_INIT],
89786a6f21Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90786a6f21SmrgAC_BEFORE([$0], [LT_LANG])dnl
91786a6f21SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92786a6f21SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93786a6f21Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
94786a6f21Smrg
95786a6f21Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96786a6f21Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97786a6f21Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98786a6f21Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99786a6f21Smrgdnl unless we require an AC_DEFUNed macro:
100786a6f21SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101786a6f21SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102786a6f21SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103786a6f21SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104786a6f21Smrgm4_require([_LT_PROG_LTMAIN])dnl
105786a6f21Smrg
106786a6f21Smrgdnl Parse OPTIONS
107786a6f21Smrg_LT_SET_OPTIONS([$0], [$1])
1081d54945dSmrg
1091d54945dSmrg# This can be used to rebuild libtool when needed
110786a6f21SmrgLIBTOOL_DEPS="$ltmain"
1111d54945dSmrg
1121d54945dSmrg# Always use our own libtool.
1131d54945dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1141d54945dSmrgAC_SUBST(LIBTOOL)dnl
1151d54945dSmrg
116786a6f21Smrg_LT_SETUP
1171d54945dSmrg
118786a6f21Smrg# Only expand once:
119786a6f21Smrgm4_define([LT_INIT])
120786a6f21Smrg])# LT_INIT
1211d54945dSmrg
122786a6f21Smrg# Old names:
123786a6f21SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124786a6f21SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
126786a6f21Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127786a6f21Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128786a6f21Smrg
129786a6f21Smrg
130786a6f21Smrg# _LT_CC_BASENAME(CC)
131786a6f21Smrg# -------------------
132786a6f21Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133786a6f21Smrgm4_defun([_LT_CC_BASENAME],
134786a6f21Smrg[for cc_temp in $1""; do
135786a6f21Smrg  case $cc_temp in
136786a6f21Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137786a6f21Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138786a6f21Smrg    \-*) ;;
139786a6f21Smrg    *) break;;
140786a6f21Smrg  esac
141786a6f21Smrgdone
142786a6f21Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143786a6f21Smrg])
144786a6f21Smrg
145786a6f21Smrg
146786a6f21Smrg# _LT_FILEUTILS_DEFAULTS
147786a6f21Smrg# ----------------------
148786a6f21Smrg# It is okay to use these file commands and assume they have been set
149786a6f21Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150786a6f21Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151786a6f21Smrg[: ${CP="cp -f"}
152786a6f21Smrg: ${MV="mv -f"}
153786a6f21Smrg: ${RM="rm -f"}
154786a6f21Smrg])# _LT_FILEUTILS_DEFAULTS
155786a6f21Smrg
156786a6f21Smrg
157786a6f21Smrg# _LT_SETUP
158786a6f21Smrg# ---------
159786a6f21Smrgm4_defun([_LT_SETUP],
160786a6f21Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1611d54945dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162786a6f21Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163786a6f21Smrg_LT_DECL([], [host], [0])dnl
164786a6f21Smrg_LT_DECL([], [host_os], [0])dnl
165786a6f21Smrgdnl
166786a6f21Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167786a6f21Smrg_LT_DECL([], [build], [0])dnl
168786a6f21Smrg_LT_DECL([], [build_os], [0])dnl
169786a6f21Smrgdnl
1701d54945dSmrgAC_REQUIRE([AC_PROG_CC])dnl
171786a6f21SmrgAC_REQUIRE([LT_PATH_LD])dnl
172786a6f21SmrgAC_REQUIRE([LT_PATH_NM])dnl
173786a6f21Smrgdnl
1741d54945dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175786a6f21Smrgtest -z "$LN_S" && LN_S="ln -s"
176786a6f21Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177786a6f21Smrgdnl
178786a6f21SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179786a6f21Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180786a6f21Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1811d54945dSmrgdnl
182786a6f21Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183786a6f21Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184786a6f21Smrgm4_require([_LT_CMD_RELOAD])dnl
185786a6f21Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186786a6f21Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187786a6f21Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188786a6f21Smrg
189786a6f21Smrg_LT_CONFIG_LIBTOOL_INIT([
190786a6f21Smrg# See if we are running on zsh, and set the options which allow our
191786a6f21Smrg# commands through without removal of \ escapes INIT.
192786a6f21Smrgif test -n "\${ZSH_VERSION+set}" ; then
193786a6f21Smrg   setopt NO_GLOB_SUBST
194786a6f21Smrgfi
195786a6f21Smrg])
196786a6f21Smrgif test -n "${ZSH_VERSION+set}" ; then
197786a6f21Smrg   setopt NO_GLOB_SUBST
198786a6f21Smrgfi
199786a6f21Smrg
200786a6f21Smrg_LT_CHECK_OBJDIR
2011d54945dSmrg
202786a6f21Smrgm4_require([_LT_TAG_COMPILER])dnl
203786a6f21Smrg_LT_PROG_ECHO_BACKSLASH
2041d54945dSmrg
2051d54945dSmrgcase $host_os in
2061d54945dSmrgaix3*)
2071d54945dSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2081d54945dSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2091d54945dSmrg  # vanish in a puff of smoke.
2101d54945dSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
2111d54945dSmrg    COLLECT_NAMES=
2121d54945dSmrg    export COLLECT_NAMES
2131d54945dSmrg  fi
2141d54945dSmrg  ;;
2151d54945dSmrgesac
2161d54945dSmrg
2171d54945dSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
2181d54945dSmrg# metacharacters that are still active within double-quoted strings.
219786a6f21Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2201d54945dSmrg
2211d54945dSmrg# Same as above, but do not quote variable references.
222786a6f21Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2231d54945dSmrg
2241d54945dSmrg# Sed substitution to delay expansion of an escaped shell variable in a
2251d54945dSmrg# double_quote_subst'ed string.
2261d54945dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2271d54945dSmrg
228786a6f21Smrg# Sed substitution to delay expansion of an escaped single quote.
229786a6f21Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230786a6f21Smrg
2311d54945dSmrg# Sed substitution to avoid accidental globbing in evaled expressions
2321d54945dSmrgno_glob_subst='s/\*/\\\*/g'
2331d54945dSmrg
2341d54945dSmrg# Global variables:
235786a6f21Smrgofile=libtool
2361d54945dSmrgcan_build_shared=yes
2371d54945dSmrg
2381d54945dSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
2391d54945dSmrg# which needs '.lib').
2401d54945dSmrglibext=a
2411d54945dSmrg
242786a6f21Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
2431d54945dSmrg
2441d54945dSmrgold_CC="$CC"
2451d54945dSmrgold_CFLAGS="$CFLAGS"
2461d54945dSmrg
2471d54945dSmrg# Set sane defaults for various variables
2481d54945dSmrgtest -z "$CC" && CC=cc
2491d54945dSmrgtest -z "$LTCC" && LTCC=$CC
2501d54945dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2511d54945dSmrgtest -z "$LD" && LD=ld
2521d54945dSmrgtest -z "$ac_objext" && ac_objext=o
2531d54945dSmrg
2541d54945dSmrg_LT_CC_BASENAME([$compiler])
2551d54945dSmrg
2561d54945dSmrg# Only perform the check for file, if the check method requires it
257786a6f21Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2581d54945dSmrgcase $deplibs_check_method in
2591d54945dSmrgfile_magic*)
2601d54945dSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261786a6f21Smrg    _LT_PATH_MAGIC
2621d54945dSmrg  fi
2631d54945dSmrg  ;;
2641d54945dSmrgesac
2651d54945dSmrg
266786a6f21Smrg# Use C for the default configuration in the libtool script
267786a6f21SmrgLT_SUPPORTED_TAG([CC])
268786a6f21Smrg_LT_LANG_C_CONFIG
269786a6f21Smrg_LT_LANG_DEFAULT_CONFIG
270786a6f21Smrg_LT_CONFIG_COMMANDS
271786a6f21Smrg])# _LT_SETUP
272ba85709eSmrg
2731d54945dSmrg
274786a6f21Smrg# _LT_PROG_LTMAIN
275786a6f21Smrg# ---------------
276786a6f21Smrg# Note that this code is called both from `configure', and `config.status'
277786a6f21Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278786a6f21Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279786a6f21Smrg# so we pass a copy along to make sure it has a sensible value anyway.
280786a6f21Smrgm4_defun([_LT_PROG_LTMAIN],
281786a6f21Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282786a6f21Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283786a6f21Smrgltmain="$ac_aux_dir/ltmain.sh"
284786a6f21Smrg])# _LT_PROG_LTMAIN
2851d54945dSmrg
2861d54945dSmrg
287786a6f21Smrg
288786a6f21Smrg# So that we can recreate a full libtool script including additional
289786a6f21Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290786a6f21Smrg# in macros and then make a single call at the end using the `libtool'
291786a6f21Smrg# label.
292786a6f21Smrg
293786a6f21Smrg
294786a6f21Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295786a6f21Smrg# ----------------------------------------
296786a6f21Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297786a6f21Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298786a6f21Smrg[m4_ifval([$1],
299786a6f21Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300786a6f21Smrg                     [$1
301786a6f21Smrg])])])
302786a6f21Smrg
303786a6f21Smrg# Initialize.
304786a6f21Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305786a6f21Smrg
306786a6f21Smrg
307786a6f21Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308786a6f21Smrg# ------------------------------
309786a6f21Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310786a6f21Smrgm4_define([_LT_CONFIG_LIBTOOL],
311786a6f21Smrg[m4_ifval([$1],
312786a6f21Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313786a6f21Smrg                     [$1
314786a6f21Smrg])])])
315786a6f21Smrg
316786a6f21Smrg# Initialize.
317786a6f21Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318786a6f21Smrg
319786a6f21Smrg
320786a6f21Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321786a6f21Smrg# -----------------------------------------------------
322786a6f21Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323786a6f21Smrg[_LT_CONFIG_LIBTOOL([$1])
324786a6f21Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
325786a6f21Smrg])
326786a6f21Smrg
327786a6f21Smrg
328786a6f21Smrg# _LT_FORMAT_COMMENT([COMMENT])
329786a6f21Smrg# -----------------------------
330786a6f21Smrg# Add leading comment marks to the start of each line, and a trailing
331786a6f21Smrg# full-stop to the whole comment if one is not present already.
332786a6f21Smrgm4_define([_LT_FORMAT_COMMENT],
333786a6f21Smrg[m4_ifval([$1], [
334786a6f21Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335786a6f21Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336786a6f21Smrg)])
337786a6f21Smrg
338786a6f21Smrg
339786a6f21Smrg
340786a6f21Smrg
341786a6f21Smrg
342786a6f21Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343786a6f21Smrg# -------------------------------------------------------------------
344786a6f21Smrg# CONFIGNAME is the name given to the value in the libtool script.
345786a6f21Smrg# VARNAME is the (base) name used in the configure script.
346786a6f21Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347786a6f21Smrg# VARNAME.  Any other value will be used directly.
348786a6f21Smrgm4_define([_LT_DECL],
349786a6f21Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350786a6f21Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351786a6f21Smrg	[m4_ifval([$1], [$1], [$2])])
352786a6f21Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353786a6f21Smrg    m4_ifval([$4],
354786a6f21Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355786a6f21Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356786a6f21Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357786a6f21Smrg])
358786a6f21Smrg
359786a6f21Smrg
360786a6f21Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361786a6f21Smrg# --------------------------------------------------------
362786a6f21Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363786a6f21Smrg
364786a6f21Smrg
365786a6f21Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366786a6f21Smrg# ------------------------------------------------
367786a6f21Smrgm4_define([lt_decl_tag_varnames],
368786a6f21Smrg[_lt_decl_filter([tagged?], [yes], $@)])
369786a6f21Smrg
370786a6f21Smrg
371786a6f21Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372786a6f21Smrg# ---------------------------------------------------------
373786a6f21Smrgm4_define([_lt_decl_filter],
374786a6f21Smrg[m4_case([$#],
375786a6f21Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
376786a6f21Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377786a6f21Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378786a6f21Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379786a6f21Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380786a6f21Smrg])
381786a6f21Smrg
382786a6f21Smrg
383786a6f21Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384786a6f21Smrg# --------------------------------------------------
385786a6f21Smrgm4_define([lt_decl_quote_varnames],
386786a6f21Smrg[_lt_decl_filter([value], [1], $@)])
387786a6f21Smrg
388786a6f21Smrg
389786a6f21Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390786a6f21Smrg# ---------------------------------------------------
391786a6f21Smrgm4_define([lt_decl_dquote_varnames],
392786a6f21Smrg[_lt_decl_filter([value], [2], $@)])
393786a6f21Smrg
394786a6f21Smrg
395786a6f21Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396786a6f21Smrg# ---------------------------------------------------
397786a6f21Smrgm4_define([lt_decl_varnames_tagged],
398786a6f21Smrg[m4_assert([$# <= 2])dnl
399786a6f21Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
400786a6f21Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401786a6f21Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402786a6f21Smrgm4_define([_lt_decl_varnames_tagged],
403786a6f21Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404786a6f21Smrg
405786a6f21Smrg
406786a6f21Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407786a6f21Smrg# ------------------------------------------------
408786a6f21Smrgm4_define([lt_decl_all_varnames],
409786a6f21Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410786a6f21Smrg     m4_if([$2], [],
411786a6f21Smrg	   m4_quote(lt_decl_varnames),
412786a6f21Smrg	m4_quote(m4_shift($@))))[]dnl
413786a6f21Smrg])
414786a6f21Smrgm4_define([_lt_decl_all_varnames],
415786a6f21Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
416786a6f21Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417786a6f21Smrg])
418786a6f21Smrg
419786a6f21Smrg
420786a6f21Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421786a6f21Smrg# ------------------------------------
422786a6f21Smrg# Quote a variable value, and forward it to `config.status' so that its
423786a6f21Smrg# declaration there will have the same value as in `configure'.  VARNAME
424786a6f21Smrg# must have a single quote delimited value for this to work.
425786a6f21Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426786a6f21Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427786a6f21Smrg
428786a6f21Smrg
429786a6f21Smrg# _LT_CONFIG_STATUS_DECLARATIONS
430786a6f21Smrg# ------------------------------
431786a6f21Smrg# We delimit libtool config variables with single quotes, so when
432786a6f21Smrg# we write them to config.status, we have to be sure to quote all
433786a6f21Smrg# embedded single quotes properly.  In configure, this macro expands
434786a6f21Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435786a6f21Smrg#
436786a6f21Smrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437786a6f21Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438786a6f21Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439786a6f21Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4401d54945dSmrg
4411d54945dSmrg
442786a6f21Smrg# _LT_LIBTOOL_TAGS
443786a6f21Smrg# ----------------
444786a6f21Smrg# Output comment and list of tags supported by the script
445786a6f21Smrgm4_defun([_LT_LIBTOOL_TAGS],
446786a6f21Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447786a6f21Smrgavailable_tags="_LT_TAGS"dnl
448786a6f21Smrg])
449786a6f21Smrg
450786a6f21Smrg
451786a6f21Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452786a6f21Smrg# -----------------------------------
453786a6f21Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454786a6f21Smrg# expand to a commented shell variable setting:
455786a6f21Smrg#
456786a6f21Smrg#    # Some comment about what VAR is for.
457786a6f21Smrg#    visible_name=$lt_internal_name
458786a6f21Smrgm4_define([_LT_LIBTOOL_DECLARE],
459786a6f21Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460786a6f21Smrg					   [description])))[]dnl
461786a6f21Smrgm4_pushdef([_libtool_name],
462786a6f21Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463786a6f21Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464786a6f21Smrg    [0], [_libtool_name=[$]$1],
465786a6f21Smrg    [1], [_libtool_name=$lt_[]$1],
466786a6f21Smrg    [2], [_libtool_name=$lt_[]$1],
467786a6f21Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468786a6f21Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469786a6f21Smrg])
470786a6f21Smrg
471786a6f21Smrg
472786a6f21Smrg# _LT_LIBTOOL_CONFIG_VARS
473786a6f21Smrg# -----------------------
474786a6f21Smrg# Produce commented declarations of non-tagged libtool config variables
475786a6f21Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476786a6f21Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477786a6f21Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478786a6f21Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479786a6f21Smrg[m4_foreach([_lt_var],
480786a6f21Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481786a6f21Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482786a6f21Smrg
483786a6f21Smrg
484786a6f21Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
485786a6f21Smrg# -------------------------
486786a6f21Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
487786a6f21Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488786a6f21Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489786a6f21Smrg
490786a6f21Smrg
491786a6f21Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492786a6f21Smrg# ------------------------------
493786a6f21Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494786a6f21Smrg
495786a6f21Smrg
496786a6f21Smrg# _LT_CONFIG_COMMANDS
4971d54945dSmrg# -------------------
498786a6f21Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499786a6f21Smrg# variables for single and double quote escaping we saved from calls
500786a6f21Smrg# to _LT_DECL, we can put quote escaped variables declarations
501786a6f21Smrg# into `config.status', and then the shell code to quote escape them in
502786a6f21Smrg# for loops in `config.status'.  Finally, any additional code accumulated
503786a6f21Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504786a6f21Smrgm4_defun([_LT_CONFIG_COMMANDS],
505786a6f21Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506786a6f21Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507786a6f21Smrg	dnl instead of duplicating it all over again into config.status,
508786a6f21Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
509786a6f21Smrg	dnl needs to know what name is stored there:
510786a6f21Smrg        [AC_CONFIG_COMMANDS([libtool],
511786a6f21Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512786a6f21Smrg    dnl If the libtool generation code is destined for config.status,
513786a6f21Smrg    dnl expand the accumulated commands and init code now:
514786a6f21Smrg    [AC_CONFIG_COMMANDS([libtool],
515786a6f21Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516786a6f21Smrg])#_LT_CONFIG_COMMANDS
517786a6f21Smrg
518786a6f21Smrg
519786a6f21Smrg# Initialize.
520786a6f21Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521786a6f21Smrg[
522786a6f21Smrg
523786a6f21Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524786a6f21Smrg# if CDPATH is set.
525786a6f21Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526786a6f21Smrg
527786a6f21Smrgsed_quote_subst='$sed_quote_subst'
528786a6f21Smrgdouble_quote_subst='$double_quote_subst'
529786a6f21Smrgdelay_variable_subst='$delay_variable_subst'
530786a6f21Smrg_LT_CONFIG_STATUS_DECLARATIONS
531786a6f21SmrgLTCC='$LTCC'
532786a6f21SmrgLTCFLAGS='$LTCFLAGS'
533786a6f21Smrgcompiler='$compiler_DEFAULT'
534786a6f21Smrg
535786a6f21Smrg# Quote evaled strings.
536786a6f21Smrgfor var in lt_decl_all_varnames([[ \
537786a6f21Smrg]], lt_decl_quote_varnames); do
538786a6f21Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539786a6f21Smrg    *[[\\\\\\\`\\"\\\$]]*)
540786a6f21Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541786a6f21Smrg      ;;
542786a6f21Smrg    *)
543786a6f21Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544786a6f21Smrg      ;;
545786a6f21Smrg    esac
546786a6f21Smrgdone
547786a6f21Smrg
548786a6f21Smrg# Double-quote double-evaled strings.
549786a6f21Smrgfor var in lt_decl_all_varnames([[ \
550786a6f21Smrg]], lt_decl_dquote_varnames); do
551786a6f21Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552786a6f21Smrg    *[[\\\\\\\`\\"\\\$]]*)
553786a6f21Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554786a6f21Smrg      ;;
555786a6f21Smrg    *)
556786a6f21Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557786a6f21Smrg      ;;
558786a6f21Smrg    esac
559786a6f21Smrgdone
560786a6f21Smrg
561786a6f21Smrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562786a6f21Smrgcase \$lt_ECHO in
563786a6f21Smrg*'\\\[$]0 --fallback-echo"')dnl "
564786a6f21Smrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565786a6f21Smrg  ;;
566786a6f21Smrgesac
567786a6f21Smrg
568786a6f21Smrg_LT_OUTPUT_LIBTOOL_INIT
569786a6f21Smrg])
570786a6f21Smrg
571786a6f21Smrg
572786a6f21Smrg# LT_OUTPUT
573786a6f21Smrg# ---------
574786a6f21Smrg# This macro allows early generation of the libtool script (before
575786a6f21Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
576786a6f21Smrg# tests.
577786a6f21SmrgAC_DEFUN([LT_OUTPUT],
578786a6f21Smrg[: ${CONFIG_LT=./config.lt}
579786a6f21SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580786a6f21Smrgcat >"$CONFIG_LT" <<_LTEOF
581786a6f21Smrg#! $SHELL
582786a6f21Smrg# Generated by $as_me.
583786a6f21Smrg# Run this file to recreate a libtool stub with the current configuration.
584786a6f21Smrg
585786a6f21Smrglt_cl_silent=false
586786a6f21SmrgSHELL=\${CONFIG_SHELL-$SHELL}
587786a6f21Smrg_LTEOF
588786a6f21Smrg
589786a6f21Smrgcat >>"$CONFIG_LT" <<\_LTEOF
590786a6f21SmrgAS_SHELL_SANITIZE
591786a6f21Smrg_AS_PREPARE
592786a6f21Smrg
593786a6f21Smrgexec AS_MESSAGE_FD>&1
594786a6f21Smrgexec AS_MESSAGE_LOG_FD>>config.log
595786a6f21Smrg{
596786a6f21Smrg  echo
597786a6f21Smrg  AS_BOX([Running $as_me.])
598786a6f21Smrg} >&AS_MESSAGE_LOG_FD
599786a6f21Smrg
600786a6f21Smrglt_cl_help="\
601786a6f21Smrg\`$as_me' creates a local libtool stub from the current configuration,
602786a6f21Smrgfor use in further configure time tests before the real libtool is
603786a6f21Smrggenerated.
604786a6f21Smrg
605786a6f21SmrgUsage: $[0] [[OPTIONS]]
606786a6f21Smrg
607786a6f21Smrg  -h, --help      print this help, then exit
608786a6f21Smrg  -V, --version   print version number, then exit
609786a6f21Smrg  -q, --quiet     do not print progress messages
610786a6f21Smrg  -d, --debug     don't remove temporary files
611786a6f21Smrg
612786a6f21SmrgReport bugs to <bug-libtool@gnu.org>."
613786a6f21Smrg
614786a6f21Smrglt_cl_version="\
615786a6f21Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616786a6f21Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617786a6f21Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618786a6f21Smrg
619786a6f21SmrgCopyright (C) 2008 Free Software Foundation, Inc.
620786a6f21SmrgThis config.lt script is free software; the Free Software Foundation
621786a6f21Smrggives unlimited permision to copy, distribute and modify it."
622786a6f21Smrg
623786a6f21Smrgwhile test $[#] != 0
624786a6f21Smrgdo
625786a6f21Smrg  case $[1] in
626786a6f21Smrg    --version | --v* | -V )
627786a6f21Smrg      echo "$lt_cl_version"; exit 0 ;;
628786a6f21Smrg    --help | --h* | -h )
629786a6f21Smrg      echo "$lt_cl_help"; exit 0 ;;
630786a6f21Smrg    --debug | --d* | -d )
631786a6f21Smrg      debug=: ;;
632786a6f21Smrg    --quiet | --q* | --silent | --s* | -q )
633786a6f21Smrg      lt_cl_silent=: ;;
634786a6f21Smrg
635786a6f21Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636786a6f21SmrgTry \`$[0] --help' for more information.]) ;;
637786a6f21Smrg
638786a6f21Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639786a6f21SmrgTry \`$[0] --help' for more information.]) ;;
640786a6f21Smrg  esac
641786a6f21Smrg  shift
642786a6f21Smrgdone
643786a6f21Smrg
644786a6f21Smrgif $lt_cl_silent; then
645786a6f21Smrg  exec AS_MESSAGE_FD>/dev/null
646786a6f21Smrgfi
647786a6f21Smrg_LTEOF
648786a6f21Smrg
649786a6f21Smrgcat >>"$CONFIG_LT" <<_LTEOF
650786a6f21Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651786a6f21Smrg_LTEOF
652786a6f21Smrg
653786a6f21Smrgcat >>"$CONFIG_LT" <<\_LTEOF
654786a6f21SmrgAC_MSG_NOTICE([creating $ofile])
655786a6f21Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
656786a6f21SmrgAS_EXIT(0)
657786a6f21Smrg_LTEOF
658786a6f21Smrgchmod +x "$CONFIG_LT"
659786a6f21Smrg
660786a6f21Smrg# configure is writing to config.log, but config.lt does its own redirection,
661786a6f21Smrg# appending to config.log, which fails on DOS, as config.log is still kept
662786a6f21Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663786a6f21Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664786a6f21Smrgif test "$no_create" != yes; then
665786a6f21Smrg  lt_cl_success=:
666786a6f21Smrg  test "$silent" = yes &&
667786a6f21Smrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668786a6f21Smrg  exec AS_MESSAGE_LOG_FD>/dev/null
669786a6f21Smrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670786a6f21Smrg  exec AS_MESSAGE_LOG_FD>>config.log
671786a6f21Smrg  $lt_cl_success || AS_EXIT(1)
672786a6f21Smrgfi
673786a6f21Smrg])# LT_OUTPUT
674786a6f21Smrg
675786a6f21Smrg
676786a6f21Smrg# _LT_CONFIG(TAG)
677786a6f21Smrg# ---------------
678786a6f21Smrg# If TAG is the built-in tag, create an initial libtool script with a
679786a6f21Smrg# default configuration from the untagged config vars.  Otherwise add code
680786a6f21Smrg# to config.status for appending the configuration named by TAG from the
681786a6f21Smrg# matching tagged config vars.
682786a6f21Smrgm4_defun([_LT_CONFIG],
683786a6f21Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684786a6f21Smrg_LT_CONFIG_SAVE_COMMANDS([
685786a6f21Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686786a6f21Smrg  m4_if(_LT_TAG, [C], [
687786a6f21Smrg    # See if we are running on zsh, and set the options which allow our
688786a6f21Smrg    # commands through without removal of \ escapes.
689786a6f21Smrg    if test -n "${ZSH_VERSION+set}" ; then
690786a6f21Smrg      setopt NO_GLOB_SUBST
691786a6f21Smrg    fi
692786a6f21Smrg
693786a6f21Smrg    cfgfile="${ofile}T"
694786a6f21Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695786a6f21Smrg    $RM "$cfgfile"
696786a6f21Smrg
697786a6f21Smrg    cat <<_LT_EOF >> "$cfgfile"
698786a6f21Smrg#! $SHELL
699786a6f21Smrg
700786a6f21Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701786a6f21Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702786a6f21Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703786a6f21Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704786a6f21Smrg#
705786a6f21Smrg_LT_COPYING
706786a6f21Smrg_LT_LIBTOOL_TAGS
707786a6f21Smrg
708786a6f21Smrg# ### BEGIN LIBTOOL CONFIG
709786a6f21Smrg_LT_LIBTOOL_CONFIG_VARS
710786a6f21Smrg_LT_LIBTOOL_TAG_VARS
711786a6f21Smrg# ### END LIBTOOL CONFIG
712786a6f21Smrg
713786a6f21Smrg_LT_EOF
714786a6f21Smrg
715786a6f21Smrg  case $host_os in
716786a6f21Smrg  aix3*)
717786a6f21Smrg    cat <<\_LT_EOF >> "$cfgfile"
718786a6f21Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
719786a6f21Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720786a6f21Smrg# vanish in a puff of smoke.
721786a6f21Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
722786a6f21Smrg  COLLECT_NAMES=
723786a6f21Smrg  export COLLECT_NAMES
724786a6f21Smrgfi
725786a6f21Smrg_LT_EOF
726786a6f21Smrg    ;;
727786a6f21Smrg  esac
728786a6f21Smrg
729786a6f21Smrg  _LT_PROG_LTMAIN
730786a6f21Smrg
731786a6f21Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
732786a6f21Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733786a6f21Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734786a6f21Smrg  # is reportedly fixed, but why not run on old versions too?
735786a6f21Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736786a6f21Smrg    || (rm -f "$cfgfile"; exit 1)
737786a6f21Smrg
738786a6f21Smrg  _LT_PROG_XSI_SHELLFNS
739786a6f21Smrg
740786a6f21Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741786a6f21Smrg    || (rm -f "$cfgfile"; exit 1)
742786a6f21Smrg
743786a6f21Smrg  mv -f "$cfgfile" "$ofile" ||
744786a6f21Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745786a6f21Smrg  chmod +x "$ofile"
746786a6f21Smrg],
747786a6f21Smrg[cat <<_LT_EOF >> "$ofile"
748786a6f21Smrg
749786a6f21Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750786a6f21Smrgdnl in a comment (ie after a #).
751786a6f21Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752786a6f21Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753786a6f21Smrg# ### END LIBTOOL TAG CONFIG: $1
754786a6f21Smrg_LT_EOF
755786a6f21Smrg])dnl /m4_if
756786a6f21Smrg],
757786a6f21Smrg[m4_if([$1], [], [
758786a6f21Smrg    PACKAGE='$PACKAGE'
759786a6f21Smrg    VERSION='$VERSION'
760786a6f21Smrg    TIMESTAMP='$TIMESTAMP'
761786a6f21Smrg    RM='$RM'
762786a6f21Smrg    ofile='$ofile'], [])
763786a6f21Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764786a6f21Smrg])# _LT_CONFIG
765786a6f21Smrg
766786a6f21Smrg
767786a6f21Smrg# LT_SUPPORTED_TAG(TAG)
768786a6f21Smrg# ---------------------
769786a6f21Smrg# Trace this macro to discover what tags are supported by the libtool
770786a6f21Smrg# --tag option, using:
771786a6f21Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772786a6f21SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773786a6f21Smrg
774786a6f21Smrg
775786a6f21Smrg# C support is built-in for now
776786a6f21Smrgm4_define([_LT_LANG_C_enabled], [])
777786a6f21Smrgm4_define([_LT_TAGS], [])
778786a6f21Smrg
779786a6f21Smrg
780786a6f21Smrg# LT_LANG(LANG)
781786a6f21Smrg# -------------
782786a6f21Smrg# Enable libtool support for the given language if not already enabled.
783786a6f21SmrgAC_DEFUN([LT_LANG],
784786a6f21Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785786a6f21Smrgm4_case([$1],
786786a6f21Smrg  [C],			[_LT_LANG(C)],
787786a6f21Smrg  [C++],		[_LT_LANG(CXX)],
788786a6f21Smrg  [Java],		[_LT_LANG(GCJ)],
789786a6f21Smrg  [Fortran 77],		[_LT_LANG(F77)],
790786a6f21Smrg  [Fortran],		[_LT_LANG(FC)],
791786a6f21Smrg  [Windows Resource],	[_LT_LANG(RC)],
792786a6f21Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793786a6f21Smrg    [_LT_LANG($1)],
794786a6f21Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795786a6f21Smrg])# LT_LANG
796786a6f21Smrg
797786a6f21Smrg
798786a6f21Smrg# _LT_LANG(LANGNAME)
799786a6f21Smrg# ------------------
800786a6f21Smrgm4_defun([_LT_LANG],
801786a6f21Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802786a6f21Smrg  [LT_SUPPORTED_TAG([$1])dnl
803786a6f21Smrg  m4_append([_LT_TAGS], [$1 ])dnl
804786a6f21Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805786a6f21Smrg  _LT_LANG_$1_CONFIG($1)])dnl
806786a6f21Smrg])# _LT_LANG
807786a6f21Smrg
808786a6f21Smrg
809786a6f21Smrg# _LT_LANG_DEFAULT_CONFIG
810786a6f21Smrg# -----------------------
811786a6f21Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812786a6f21Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813786a6f21Smrg  [LT_LANG(CXX)],
814786a6f21Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815786a6f21Smrg
816786a6f21SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817786a6f21Smrg  [LT_LANG(F77)],
818786a6f21Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819786a6f21Smrg
820786a6f21SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821786a6f21Smrg  [LT_LANG(FC)],
822786a6f21Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823786a6f21Smrg
824786a6f21Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825786a6f21Smrgdnl pulling things in needlessly.
826786a6f21SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827786a6f21Smrg  [LT_LANG(GCJ)],
828786a6f21Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829786a6f21Smrg    [LT_LANG(GCJ)],
830786a6f21Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831786a6f21Smrg      [LT_LANG(GCJ)],
832786a6f21Smrg      [m4_ifdef([AC_PROG_GCJ],
833786a6f21Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834786a6f21Smrg       m4_ifdef([A][M_PROG_GCJ],
835786a6f21Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836786a6f21Smrg       m4_ifdef([LT_PROG_GCJ],
837786a6f21Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838786a6f21Smrg
839786a6f21SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840786a6f21Smrg  [LT_LANG(RC)],
841786a6f21Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842786a6f21Smrg])# _LT_LANG_DEFAULT_CONFIG
843786a6f21Smrg
844786a6f21Smrg# Obsolete macros:
845786a6f21SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846786a6f21SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847786a6f21SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848786a6f21SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
850786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854786a6f21Smrg
855786a6f21Smrg
856786a6f21Smrg# _LT_TAG_COMPILER
857786a6f21Smrg# ----------------
858786a6f21Smrgm4_defun([_LT_TAG_COMPILER],
8591d54945dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
8601d54945dSmrg
861786a6f21Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862786a6f21Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863786a6f21Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864786a6f21Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865786a6f21Smrg
8661d54945dSmrg# If no C compiler was specified, use CC.
8671d54945dSmrgLTCC=${LTCC-"$CC"}
8681d54945dSmrg
8691d54945dSmrg# If no C compiler flags were specified, use CFLAGS.
8701d54945dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8711d54945dSmrg
8721d54945dSmrg# Allow CC to be a program name with arguments.
8731d54945dSmrgcompiler=$CC
874786a6f21Smrg])# _LT_TAG_COMPILER
8751d54945dSmrg
8761d54945dSmrg
8771d54945dSmrg# _LT_COMPILER_BOILERPLATE
8781d54945dSmrg# ------------------------
8791d54945dSmrg# Check for compiler boilerplate output or warnings with
8801d54945dSmrg# the simple compiler test code.
881786a6f21Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
882786a6f21Smrg[m4_require([_LT_DECL_SED])dnl
883ba85709eSmrgac_outfile=conftest.$ac_objext
884ba85709eSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
8851d54945dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8861d54945dSmrg_lt_compiler_boilerplate=`cat conftest.err`
887786a6f21Smrg$RM conftest*
8881d54945dSmrg])# _LT_COMPILER_BOILERPLATE
8891d54945dSmrg
8901d54945dSmrg
8911d54945dSmrg# _LT_LINKER_BOILERPLATE
8921d54945dSmrg# ----------------------
8931d54945dSmrg# Check for linker boilerplate output or warnings with
8941d54945dSmrg# the simple link test code.
895786a6f21Smrgm4_defun([_LT_LINKER_BOILERPLATE],
896786a6f21Smrg[m4_require([_LT_DECL_SED])dnl
897ba85709eSmrgac_outfile=conftest.$ac_objext
898ba85709eSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
8991d54945dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9001d54945dSmrg_lt_linker_boilerplate=`cat conftest.err`
901786a6f21Smrg$RM -r conftest*
9021d54945dSmrg])# _LT_LINKER_BOILERPLATE
9031d54945dSmrg
904ba85709eSmrg# _LT_REQUIRED_DARWIN_CHECKS
905786a6f21Smrg# -------------------------
906786a6f21Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907ba85709eSmrg  case $host_os in
908ba85709eSmrg    rhapsody* | darwin*)
909ba85709eSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910ba85709eSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911786a6f21Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912786a6f21Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913786a6f21Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914786a6f21Smrg    _LT_DECL([], [DSYMUTIL], [1],
915786a6f21Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916786a6f21Smrg    _LT_DECL([], [NMEDIT], [1],
917786a6f21Smrg      [Tool to change global to local symbols on Mac OS X])
918786a6f21Smrg    _LT_DECL([], [LIPO], [1],
919786a6f21Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
920786a6f21Smrg    _LT_DECL([], [OTOOL], [1],
921786a6f21Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922786a6f21Smrg    _LT_DECL([], [OTOOL64], [1],
923786a6f21Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924ba85709eSmrg
925ba85709eSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926ba85709eSmrg      [lt_cv_apple_cc_single_mod=no
927ba85709eSmrg      if test -z "${LT_MULTI_MODULE}"; then
928786a6f21Smrg	# By default we will add the -single_module flag. You can override
929786a6f21Smrg	# by either setting the environment variable LT_MULTI_MODULE
930786a6f21Smrg	# non-empty at configure time, or by adding -multi_module to the
931786a6f21Smrg	# link flags.
932786a6f21Smrg	rm -rf libconftest.dylib*
933786a6f21Smrg	echo "int foo(void){return 1;}" > conftest.c
934786a6f21Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935786a6f21Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936786a6f21Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937786a6f21Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938786a6f21Smrg        _lt_result=$?
939786a6f21Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940786a6f21Smrg	  lt_cv_apple_cc_single_mod=yes
941786a6f21Smrg	else
942786a6f21Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943786a6f21Smrg	fi
944786a6f21Smrg	rm -rf libconftest.dylib*
945786a6f21Smrg	rm -f conftest.*
946ba85709eSmrg      fi])
947ba85709eSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948ba85709eSmrg      [lt_cv_ld_exported_symbols_list],
949ba85709eSmrg      [lt_cv_ld_exported_symbols_list=no
950ba85709eSmrg      save_LDFLAGS=$LDFLAGS
951ba85709eSmrg      echo "_main" > conftest.sym
952ba85709eSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953ba85709eSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954786a6f21Smrg	[lt_cv_ld_exported_symbols_list=yes],
955786a6f21Smrg	[lt_cv_ld_exported_symbols_list=no])
956786a6f21Smrg	LDFLAGS="$save_LDFLAGS"
957ba85709eSmrg    ])
958ba85709eSmrg    case $host_os in
959786a6f21Smrg    rhapsody* | darwin1.[[012]])
960ba85709eSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961ba85709eSmrg    darwin1.*)
962786a6f21Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963786a6f21Smrg    darwin*) # darwin 5.x on
964ba85709eSmrg      # if running on 10.5 or later, the deployment target defaults
965ba85709eSmrg      # to the OS version, if on x86, and 10.4, the deployment
966ba85709eSmrg      # target defaults to 10.4. Don't you love it?
967ba85709eSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968786a6f21Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969786a6f21Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970786a6f21Smrg	10.[[012]]*)
971786a6f21Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972786a6f21Smrg	10.*)
973786a6f21Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974ba85709eSmrg      esac
975ba85709eSmrg    ;;
976ba85709eSmrg  esac
977ba85709eSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978ba85709eSmrg      _lt_dar_single_mod='$single_module'
979ba85709eSmrg    fi
980ba85709eSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981ba85709eSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982ba85709eSmrg    else
983786a6f21Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984ba85709eSmrg    fi
985ba85709eSmrg    if test "$DSYMUTIL" != ":"; then
986786a6f21Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987ba85709eSmrg    else
988ba85709eSmrg      _lt_dsymutil=
989ba85709eSmrg    fi
990ba85709eSmrg    ;;
991ba85709eSmrg  esac
992ba85709eSmrg])
9931d54945dSmrg
994786a6f21Smrg
995786a6f21Smrg# _LT_DARWIN_LINKER_FEATURES
996786a6f21Smrg# --------------------------
997786a6f21Smrg# Checks for linker and compiler features on darwin
998786a6f21Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999786a6f21Smrg[
1000786a6f21Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001786a6f21Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002786a6f21Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003786a6f21Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004786a6f21Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005786a6f21Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006786a6f21Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007786a6f21Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008786a6f21Smrg  case $cc_basename in
1009786a6f21Smrg     ifort*) _lt_dar_can_shared=yes ;;
1010786a6f21Smrg     *) _lt_dar_can_shared=$GCC ;;
1011786a6f21Smrg  esac
1012786a6f21Smrg  if test "$_lt_dar_can_shared" = "yes"; then
1013786a6f21Smrg    output_verbose_link_cmd=echo
1014786a6f21Smrg    _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}"
1015786a6f21Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016786a6f21Smrg    _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}"
1017786a6f21Smrg    _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}"
1018786a6f21Smrg    m4_if([$1], [CXX],
1019786a6f21Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020786a6f21Smrg      _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}"
1021786a6f21Smrg      _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}"
1022786a6f21Smrg    fi
1023786a6f21Smrg],[])
1024786a6f21Smrg  else
1025786a6f21Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026786a6f21Smrg  fi
1027786a6f21Smrg])
1028786a6f21Smrg
1029786a6f21Smrg# _LT_SYS_MODULE_PATH_AIX
1030786a6f21Smrg# -----------------------
10311d54945dSmrg# Links a minimal program and checks the executable
10321d54945dSmrg# for the system default hardcoded library path. In most cases,
10331d54945dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
10341d54945dSmrg# the location of the communication and MPI libs are included too.
10351d54945dSmrg# If we don't find anything, use the default library path according
10361d54945dSmrg# to the aix ld manual.
1037786a6f21Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038786a6f21Smrg[m4_require([_LT_DECL_SED])dnl
1039ba85709eSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040ba85709eSmrglt_aix_libpath_sed='
1041ba85709eSmrg    /Import File Strings/,/^$/ {
1042ba85709eSmrg	/^0/ {
1043ba85709eSmrg	    s/^0  *\(.*\)$/\1/
1044ba85709eSmrg	    p
1045ba85709eSmrg	}
1046ba85709eSmrg    }'
1047ba85709eSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10481d54945dSmrg# Check for a 64-bit object if we didn't find anything.
1049ba85709eSmrgif test -z "$aix_libpath"; then
1050ba85709eSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051ba85709eSmrgfi],[])
10521d54945dSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053786a6f21Smrg])# _LT_SYS_MODULE_PATH_AIX
10541d54945dSmrg
10551d54945dSmrg
1056786a6f21Smrg# _LT_SHELL_INIT(ARG)
1057786a6f21Smrg# -------------------
1058786a6f21Smrgm4_define([_LT_SHELL_INIT],
10591d54945dSmrg[ifdef([AC_DIVERSION_NOTICE],
10601d54945dSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
10611d54945dSmrg	 [AC_DIVERT_PUSH(NOTICE)])
10621d54945dSmrg$1
10631d54945dSmrgAC_DIVERT_POP
1064786a6f21Smrg])# _LT_SHELL_INIT
10651d54945dSmrg
10661d54945dSmrg
1067786a6f21Smrg# _LT_PROG_ECHO_BACKSLASH
1068786a6f21Smrg# -----------------------
10691d54945dSmrg# Add some code to the start of the generated configure script which
10701d54945dSmrg# will find an echo command which doesn't interpret backslashes.
1071786a6f21Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072786a6f21Smrg[_LT_SHELL_INIT([
10731d54945dSmrg# Check that we are running under the correct shell.
10741d54945dSmrgSHELL=${CONFIG_SHELL-/bin/sh}
10751d54945dSmrg
1076786a6f21Smrgcase X$lt_ECHO in
10771d54945dSmrgX*--fallback-echo)
10781d54945dSmrg  # Remove one level of quotation (which was required for Make).
1079786a6f21Smrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
10801d54945dSmrg  ;;
10811d54945dSmrgesac
10821d54945dSmrg
1083786a6f21SmrgECHO=${lt_ECHO-echo}
10841d54945dSmrgif test "X[$]1" = X--no-reexec; then
10851d54945dSmrg  # Discard the --no-reexec flag, and continue.
10861d54945dSmrg  shift
10871d54945dSmrgelif test "X[$]1" = X--fallback-echo; then
10881d54945dSmrg  # Avoid inline document here, it may be left over
10891d54945dSmrg  :
1090786a6f21Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091786a6f21Smrg  # Yippee, $ECHO works!
10921d54945dSmrg  :
10931d54945dSmrgelse
10941d54945dSmrg  # Restart under the correct shell.
10951d54945dSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
10961d54945dSmrgfi
10971d54945dSmrg
10981d54945dSmrgif test "X[$]1" = X--fallback-echo; then
10991d54945dSmrg  # used as fallback echo
11001d54945dSmrg  shift
1101786a6f21Smrg  cat <<_LT_EOF
11021d54945dSmrg[$]*
1103786a6f21Smrg_LT_EOF
11041d54945dSmrg  exit 0
11051d54945dSmrgfi
11061d54945dSmrg
11071d54945dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
11081d54945dSmrg# if CDPATH is set.
11091d54945dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11101d54945dSmrg
1111786a6f21Smrgif test -z "$lt_ECHO"; then
1112786a6f21Smrg  if test "X${echo_test_string+set}" != Xset; then
1113786a6f21Smrg    # find a string as large as possible, as long as the shell can cope with it
1114786a6f21Smrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115786a6f21Smrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116786a6f21Smrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117786a6f21Smrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118786a6f21Smrg      then
1119786a6f21Smrg        break
1120786a6f21Smrg      fi
1121786a6f21Smrg    done
1122786a6f21Smrg  fi
11231d54945dSmrg
1124786a6f21Smrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125786a6f21Smrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126786a6f21Smrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127786a6f21Smrg    :
1128786a6f21Smrg  else
1129786a6f21Smrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130786a6f21Smrg    # backslashes.  This makes it impossible to quote backslashes using
1131786a6f21Smrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132786a6f21Smrg    #
1133786a6f21Smrg    # So, first we look for a working echo in the user's PATH.
11341d54945dSmrg
1135786a6f21Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136786a6f21Smrg    for dir in $PATH /usr/ucb; do
1137786a6f21Smrg      IFS="$lt_save_ifs"
1138786a6f21Smrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139786a6f21Smrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140786a6f21Smrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141786a6f21Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142786a6f21Smrg        ECHO="$dir/echo"
1143786a6f21Smrg        break
1144786a6f21Smrg      fi
1145786a6f21Smrg    done
11461d54945dSmrg    IFS="$lt_save_ifs"
11471d54945dSmrg
1148786a6f21Smrg    if test "X$ECHO" = Xecho; then
1149786a6f21Smrg      # We didn't find a better echo, so look for alternatives.
1150786a6f21Smrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151786a6f21Smrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152786a6f21Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153786a6f21Smrg        # This shell has a builtin print -r that does the trick.
1154786a6f21Smrg        ECHO='print -r'
1155786a6f21Smrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156786a6f21Smrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157786a6f21Smrg        # If we have ksh, try running configure again with it.
1158786a6f21Smrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159786a6f21Smrg        export ORIGINAL_CONFIG_SHELL
1160786a6f21Smrg        CONFIG_SHELL=/bin/ksh
1161786a6f21Smrg        export CONFIG_SHELL
1162786a6f21Smrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
11631d54945dSmrg      else
1164786a6f21Smrg        # Try using printf.
1165786a6f21Smrg        ECHO='printf %s\n'
1166786a6f21Smrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167786a6f21Smrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168786a6f21Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169786a6f21Smrg	  # Cool, printf works
1170786a6f21Smrg	  :
1171786a6f21Smrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172786a6f21Smrg	     test "X$echo_testing_string" = 'X\t' &&
1173786a6f21Smrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174786a6f21Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175786a6f21Smrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176786a6f21Smrg	  export CONFIG_SHELL
1177786a6f21Smrg	  SHELL="$CONFIG_SHELL"
1178786a6f21Smrg	  export SHELL
1179786a6f21Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180786a6f21Smrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181786a6f21Smrg	     test "X$echo_testing_string" = 'X\t' &&
1182786a6f21Smrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183786a6f21Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184786a6f21Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185786a6f21Smrg        else
1186786a6f21Smrg	  # maybe with a smaller string...
1187786a6f21Smrg	  prev=:
11881d54945dSmrg
1189786a6f21Smrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190786a6f21Smrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191786a6f21Smrg	    then
1192786a6f21Smrg	      break
1193786a6f21Smrg	    fi
1194786a6f21Smrg	    prev="$cmd"
1195786a6f21Smrg	  done
11961d54945dSmrg
1197786a6f21Smrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198786a6f21Smrg	    echo_test_string=`eval $prev`
1199786a6f21Smrg	    export echo_test_string
1200786a6f21Smrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201786a6f21Smrg	  else
1202786a6f21Smrg	    # Oops.  We lost completely, so just stick with echo.
1203786a6f21Smrg	    ECHO=echo
1204786a6f21Smrg	  fi
1205786a6f21Smrg        fi
12061d54945dSmrg      fi
12071d54945dSmrg    fi
12081d54945dSmrg  fi
12091d54945dSmrgfi
12101d54945dSmrg
12111d54945dSmrg# Copy echo and quote the copy suitably for passing to libtool from
12121d54945dSmrg# the Makefile, instead of quoting the original, which is used later.
1213786a6f21Smrglt_ECHO=$ECHO
1214786a6f21Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215786a6f21Smrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
12161d54945dSmrgfi
12171d54945dSmrg
1218786a6f21SmrgAC_SUBST(lt_ECHO)
1219786a6f21Smrg])
1220786a6f21Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221786a6f21Smrg_LT_DECL([], [ECHO], [1],
1222786a6f21Smrg    [An echo program that does not interpret backslashes])
1223786a6f21Smrg])# _LT_PROG_ECHO_BACKSLASH
12241d54945dSmrg
12251d54945dSmrg
1226786a6f21Smrg# _LT_ENABLE_LOCK
1227786a6f21Smrg# ---------------
1228786a6f21Smrgm4_defun([_LT_ENABLE_LOCK],
12291d54945dSmrg[AC_ARG_ENABLE([libtool-lock],
1230786a6f21Smrg  [AS_HELP_STRING([--disable-libtool-lock],
1231786a6f21Smrg    [avoid locking (might break parallel builds)])])
12321d54945dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12331d54945dSmrg
12341d54945dSmrg# Some flags need to be propagated to the compiler or linker for good
12351d54945dSmrg# libtool support.
12361d54945dSmrgcase $host in
12371d54945dSmrgia64-*-hpux*)
12381d54945dSmrg  # Find out which ABI we are using.
12391d54945dSmrg  echo 'int i;' > conftest.$ac_ext
12401d54945dSmrg  if AC_TRY_EVAL(ac_compile); then
12411d54945dSmrg    case `/usr/bin/file conftest.$ac_objext` in
1242786a6f21Smrg      *ELF-32*)
1243786a6f21Smrg	HPUX_IA64_MODE="32"
1244786a6f21Smrg	;;
1245786a6f21Smrg      *ELF-64*)
1246786a6f21Smrg	HPUX_IA64_MODE="64"
1247786a6f21Smrg	;;
12481d54945dSmrg    esac
12491d54945dSmrg  fi
12501d54945dSmrg  rm -rf conftest*
12511d54945dSmrg  ;;
12521d54945dSmrg*-*-irix6*)
12531d54945dSmrg  # Find out which ABI we are using.
12541d54945dSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
12551d54945dSmrg  if AC_TRY_EVAL(ac_compile); then
1256786a6f21Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257786a6f21Smrg      case `/usr/bin/file conftest.$ac_objext` in
1258786a6f21Smrg	*32-bit*)
1259786a6f21Smrg	  LD="${LD-ld} -melf32bsmip"
1260786a6f21Smrg	  ;;
1261786a6f21Smrg	*N32*)
1262786a6f21Smrg	  LD="${LD-ld} -melf32bmipn32"
1263786a6f21Smrg	  ;;
1264786a6f21Smrg	*64-bit*)
1265786a6f21Smrg	  LD="${LD-ld} -melf64bmip"
1266786a6f21Smrg	;;
1267786a6f21Smrg      esac
1268786a6f21Smrg    else
1269786a6f21Smrg      case `/usr/bin/file conftest.$ac_objext` in
1270786a6f21Smrg	*32-bit*)
1271786a6f21Smrg	  LD="${LD-ld} -32"
1272786a6f21Smrg	  ;;
1273786a6f21Smrg	*N32*)
1274786a6f21Smrg	  LD="${LD-ld} -n32"
1275786a6f21Smrg	  ;;
1276786a6f21Smrg	*64-bit*)
1277786a6f21Smrg	  LD="${LD-ld} -64"
1278786a6f21Smrg	  ;;
1279786a6f21Smrg      esac
1280786a6f21Smrg    fi
12811d54945dSmrg  fi
12821d54945dSmrg  rm -rf conftest*
12831d54945dSmrg  ;;
12841d54945dSmrg
1285ba85709eSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286786a6f21Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12871d54945dSmrg  # Find out which ABI we are using.
12881d54945dSmrg  echo 'int i;' > conftest.$ac_ext
12891d54945dSmrg  if AC_TRY_EVAL(ac_compile); then
12901d54945dSmrg    case `/usr/bin/file conftest.o` in
1291786a6f21Smrg      *32-bit*)
1292786a6f21Smrg	case $host in
1293786a6f21Smrg	  x86_64-*kfreebsd*-gnu)
1294786a6f21Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295786a6f21Smrg	    ;;
1296786a6f21Smrg	  x86_64-*linux*)
1297786a6f21Smrg	    LD="${LD-ld} -m elf_i386"
1298786a6f21Smrg	    ;;
1299786a6f21Smrg	  ppc64-*linux*|powerpc64-*linux*)
1300786a6f21Smrg	    LD="${LD-ld} -m elf32ppclinux"
1301786a6f21Smrg	    ;;
1302786a6f21Smrg	  s390x-*linux*)
1303786a6f21Smrg	    LD="${LD-ld} -m elf_s390"
1304786a6f21Smrg	    ;;
1305786a6f21Smrg	  sparc64-*linux*)
1306786a6f21Smrg	    LD="${LD-ld} -m elf32_sparc"
1307786a6f21Smrg	    ;;
1308786a6f21Smrg	esac
1309786a6f21Smrg	;;
1310786a6f21Smrg      *64-bit*)
1311786a6f21Smrg	case $host in
1312786a6f21Smrg	  x86_64-*kfreebsd*-gnu)
1313786a6f21Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314786a6f21Smrg	    ;;
1315786a6f21Smrg	  x86_64-*linux*)
1316786a6f21Smrg	    LD="${LD-ld} -m elf_x86_64"
1317786a6f21Smrg	    ;;
1318786a6f21Smrg	  ppc*-*linux*|powerpc*-*linux*)
1319786a6f21Smrg	    LD="${LD-ld} -m elf64ppc"
1320786a6f21Smrg	    ;;
1321786a6f21Smrg	  s390*-*linux*|s390*-*tpf*)
1322786a6f21Smrg	    LD="${LD-ld} -m elf64_s390"
1323786a6f21Smrg	    ;;
1324786a6f21Smrg	  sparc*-*linux*)
1325786a6f21Smrg	    LD="${LD-ld} -m elf64_sparc"
1326786a6f21Smrg	    ;;
1327786a6f21Smrg	esac
1328786a6f21Smrg	;;
13291d54945dSmrg    esac
13301d54945dSmrg  fi
13311d54945dSmrg  rm -rf conftest*
13321d54945dSmrg  ;;
13331d54945dSmrg
13341d54945dSmrg*-*-sco3.2v5*)
13351d54945dSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
13361d54945dSmrg  SAVE_CFLAGS="$CFLAGS"
13371d54945dSmrg  CFLAGS="$CFLAGS -belf"
13381d54945dSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
13391d54945dSmrg    [AC_LANG_PUSH(C)
1340786a6f21Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
13411d54945dSmrg     AC_LANG_POP])
13421d54945dSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
13431d54945dSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
13441d54945dSmrg    CFLAGS="$SAVE_CFLAGS"
13451d54945dSmrg  fi
13461d54945dSmrg  ;;
13471d54945dSmrgsparc*-*solaris*)
13481d54945dSmrg  # Find out which ABI we are using.
13491d54945dSmrg  echo 'int i;' > conftest.$ac_ext
13501d54945dSmrg  if AC_TRY_EVAL(ac_compile); then
13511d54945dSmrg    case `/usr/bin/file conftest.o` in
13521d54945dSmrg    *64-bit*)
13531d54945dSmrg      case $lt_cv_prog_gnu_ld in
13541d54945dSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355ba85709eSmrg      *)
1356786a6f21Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357ba85709eSmrg	  LD="${LD-ld} -64"
1358ba85709eSmrg	fi
1359ba85709eSmrg	;;
13601d54945dSmrg      esac
13611d54945dSmrg      ;;
13621d54945dSmrg    esac
13631d54945dSmrg  fi
13641d54945dSmrg  rm -rf conftest*
13651d54945dSmrg  ;;
13661d54945dSmrgesac
13671d54945dSmrg
13681d54945dSmrgneed_locks="$enable_libtool_lock"
1369786a6f21Smrg])# _LT_ENABLE_LOCK
1370786a6f21Smrg
1371786a6f21Smrg
1372786a6f21Smrg# _LT_CMD_OLD_ARCHIVE
1373786a6f21Smrg# -------------------
1374786a6f21Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375786a6f21Smrg[AC_CHECK_TOOL(AR, ar, false)
1376786a6f21Smrgtest -z "$AR" && AR=ar
1377786a6f21Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378786a6f21Smrg_LT_DECL([], [AR], [1], [The archiver])
1379786a6f21Smrg_LT_DECL([], [AR_FLAGS], [1])
1380786a6f21Smrg
1381786a6f21SmrgAC_CHECK_TOOL(STRIP, strip, :)
1382786a6f21Smrgtest -z "$STRIP" && STRIP=:
1383786a6f21Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384786a6f21Smrg
1385786a6f21SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386786a6f21Smrgtest -z "$RANLIB" && RANLIB=:
1387786a6f21Smrg_LT_DECL([], [RANLIB], [1],
1388786a6f21Smrg    [Commands used to install an old-style archive])
1389786a6f21Smrg
1390786a6f21Smrg# Determine commands to create old-style static archives.
1391786a6f21Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392786a6f21Smrgold_postinstall_cmds='chmod 644 $oldlib'
1393786a6f21Smrgold_postuninstall_cmds=
13941d54945dSmrg
1395786a6f21Smrgif test -n "$RANLIB"; then
1396786a6f21Smrg  case $host_os in
1397786a6f21Smrg  openbsd*)
1398786a6f21Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399786a6f21Smrg    ;;
1400786a6f21Smrg  *)
1401786a6f21Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402786a6f21Smrg    ;;
1403786a6f21Smrg  esac
1404786a6f21Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405786a6f21Smrgfi
1406786a6f21Smrg_LT_DECL([], [old_postinstall_cmds], [2])
1407786a6f21Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408786a6f21Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409786a6f21Smrg    [Commands used to build an old-style archive])
1410786a6f21Smrg])# _LT_CMD_OLD_ARCHIVE
14111d54945dSmrg
14121d54945dSmrg
1413786a6f21Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
14141d54945dSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
14151d54945dSmrg# ----------------------------------------------------------------
14161d54945dSmrg# Check whether the given compiler option works
1417786a6f21SmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418786a6f21Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419786a6f21Smrgm4_require([_LT_DECL_SED])dnl
14201d54945dSmrgAC_CACHE_CHECK([$1], [$2],
14211d54945dSmrg  [$2=no
1422786a6f21Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423ba85709eSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14241d54945dSmrg   lt_compiler_flag="$3"
14251d54945dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
14261d54945dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
14271d54945dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
14281d54945dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
14291d54945dSmrg   # The option is referenced via a variable to avoid confusing sed.
14301d54945dSmrg   lt_compile=`echo "$ac_compile" | $SED \
14311d54945dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14321d54945dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
14331d54945dSmrg   -e 's:$: $lt_compiler_flag:'`
14341d54945dSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
14351d54945dSmrg   (eval "$lt_compile" 2>conftest.err)
14361d54945dSmrg   ac_status=$?
14371d54945dSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
14381d54945dSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
14391d54945dSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
14401d54945dSmrg     # The compiler can only warn and ignore the option if not recognized
14411d54945dSmrg     # So say no if there are warnings other than the usual output.
1442786a6f21Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
14431d54945dSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14441d54945dSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14451d54945dSmrg       $2=yes
14461d54945dSmrg     fi
14471d54945dSmrg   fi
1448786a6f21Smrg   $RM conftest*
14491d54945dSmrg])
14501d54945dSmrg
14511d54945dSmrgif test x"[$]$2" = xyes; then
1452786a6f21Smrg    m4_if([$5], , :, [$5])
14531d54945dSmrgelse
1454786a6f21Smrg    m4_if([$6], , :, [$6])
14551d54945dSmrgfi
1456786a6f21Smrg])# _LT_COMPILER_OPTION
14571d54945dSmrg
1458786a6f21Smrg# Old name:
1459786a6f21SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
1461786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
14621d54945dSmrg
1463786a6f21Smrg
1464786a6f21Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465786a6f21Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466786a6f21Smrg# ----------------------------------------------------
1467786a6f21Smrg# Check whether the given linker option works
1468786a6f21SmrgAC_DEFUN([_LT_LINKER_OPTION],
1469786a6f21Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470786a6f21Smrgm4_require([_LT_DECL_SED])dnl
1471ba85709eSmrgAC_CACHE_CHECK([$1], [$2],
14721d54945dSmrg  [$2=no
14731d54945dSmrg   save_LDFLAGS="$LDFLAGS"
14741d54945dSmrg   LDFLAGS="$LDFLAGS $3"
1475ba85709eSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
14761d54945dSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14771d54945dSmrg     # The linker can only warn and ignore the option if not recognized
14781d54945dSmrg     # So say no if there are warnings
14791d54945dSmrg     if test -s conftest.err; then
14801d54945dSmrg       # Append any errors to the config.log.
14811d54945dSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482786a6f21Smrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
14831d54945dSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14841d54945dSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
14851d54945dSmrg         $2=yes
14861d54945dSmrg       fi
14871d54945dSmrg     else
14881d54945dSmrg       $2=yes
14891d54945dSmrg     fi
14901d54945dSmrg   fi
1491786a6f21Smrg   $RM -r conftest*
14921d54945dSmrg   LDFLAGS="$save_LDFLAGS"
14931d54945dSmrg])
14941d54945dSmrg
14951d54945dSmrgif test x"[$]$2" = xyes; then
1496786a6f21Smrg    m4_if([$4], , :, [$4])
14971d54945dSmrgelse
1498786a6f21Smrg    m4_if([$5], , :, [$5])
14991d54945dSmrgfi
1500786a6f21Smrg])# _LT_LINKER_OPTION
15011d54945dSmrg
1502786a6f21Smrg# Old name:
1503786a6f21SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
1505786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
15061d54945dSmrg
1507786a6f21Smrg
1508786a6f21Smrg# LT_CMD_MAX_LEN
1509786a6f21Smrg#---------------
1510786a6f21SmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511786a6f21Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512786a6f21Smrg# find the maximum length of command line arguments
15131d54945dSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
15141d54945dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
15151d54945dSmrg  i=0
15161d54945dSmrg  teststring="ABCD"
15171d54945dSmrg
15181d54945dSmrg  case $build_os in
15191d54945dSmrg  msdosdjgpp*)
15201d54945dSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
15211d54945dSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
15221d54945dSmrg    # during glob expansion).  Even if it were fixed, the result of this
15231d54945dSmrg    # check would be larger than it should be.
15241d54945dSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
15251d54945dSmrg    ;;
15261d54945dSmrg
15271d54945dSmrg  gnu*)
15281d54945dSmrg    # Under GNU Hurd, this test is not required because there is
15291d54945dSmrg    # no limit to the length of command line arguments.
15301d54945dSmrg    # Libtool will interpret -1 as no limit whatsoever
15311d54945dSmrg    lt_cv_sys_max_cmd_len=-1;
15321d54945dSmrg    ;;
15331d54945dSmrg
1534786a6f21Smrg  cygwin* | mingw* | cegcc*)
15351d54945dSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
15361d54945dSmrg    # about 5 minutes as the teststring grows exponentially.
15371d54945dSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
15381d54945dSmrg    # you end up with a "frozen" computer, even though with patience
15391d54945dSmrg    # the test eventually succeeds (with a max line length of 256k).
15401d54945dSmrg    # Instead, let's just punt: use the minimum linelength reported by
15411d54945dSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
15421d54945dSmrg    lt_cv_sys_max_cmd_len=8192;
15431d54945dSmrg    ;;
15441d54945dSmrg
15451d54945dSmrg  amigaos*)
15461d54945dSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
15471d54945dSmrg    # So we just punt and use a minimum line length of 8192.
15481d54945dSmrg    lt_cv_sys_max_cmd_len=8192;
15491d54945dSmrg    ;;
15501d54945dSmrg
15511d54945dSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
15521d54945dSmrg    # This has been around since 386BSD, at least.  Likely further.
15531d54945dSmrg    if test -x /sbin/sysctl; then
15541d54945dSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
15551d54945dSmrg    elif test -x /usr/sbin/sysctl; then
15561d54945dSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
15571d54945dSmrg    else
15581d54945dSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
15591d54945dSmrg    fi
15601d54945dSmrg    # And add a safety zone
15611d54945dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15621d54945dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15631d54945dSmrg    ;;
15641d54945dSmrg
15651d54945dSmrg  interix*)
15661d54945dSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
15671d54945dSmrg    lt_cv_sys_max_cmd_len=196608
15681d54945dSmrg    ;;
15691d54945dSmrg
15701d54945dSmrg  osf*)
15711d54945dSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
15721d54945dSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
15731d54945dSmrg    # nice to cause kernel panics so lets avoid the loop below.
15741d54945dSmrg    # First set a reasonable default.
15751d54945dSmrg    lt_cv_sys_max_cmd_len=16384
15761d54945dSmrg    #
15771d54945dSmrg    if test -x /sbin/sysconfig; then
15781d54945dSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
15791d54945dSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
15801d54945dSmrg      esac
15811d54945dSmrg    fi
15821d54945dSmrg    ;;
15831d54945dSmrg  sco3.2v5*)
15841d54945dSmrg    lt_cv_sys_max_cmd_len=102400
15851d54945dSmrg    ;;
15861d54945dSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
15871d54945dSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
15881d54945dSmrg    if test -n "$kargmax"; then
1589786a6f21Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
15901d54945dSmrg    else
15911d54945dSmrg      lt_cv_sys_max_cmd_len=32768
15921d54945dSmrg    fi
15931d54945dSmrg    ;;
15941d54945dSmrg  *)
1595ba85709eSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596ba85709eSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597ba85709eSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598ba85709eSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599ba85709eSmrg    else
1600786a6f21Smrg      # Make teststring a little bigger before we do anything with it.
1601786a6f21Smrg      # a 1K string should be a reasonable start.
1602786a6f21Smrg      for i in 1 2 3 4 5 6 7 8 ; do
1603786a6f21Smrg        teststring=$teststring$teststring
1604786a6f21Smrg      done
1605ba85709eSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606786a6f21Smrg      # If test is not a shell built-in, we'll probably end up computing a
1607786a6f21Smrg      # maximum length that is only half of the actual maximum length, but
1608786a6f21Smrg      # we can't tell.
1609786a6f21Smrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610786a6f21Smrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611ba85709eSmrg	      test $i != 17 # 1/2 MB should be enough
1612ba85709eSmrg      do
1613ba85709eSmrg        i=`expr $i + 1`
1614ba85709eSmrg        teststring=$teststring$teststring
1615ba85709eSmrg      done
1616786a6f21Smrg      # Only check the string length outside the loop.
1617786a6f21Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618ba85709eSmrg      teststring=
1619786a6f21Smrg      # Add a significant safety factor because C++ compilers can tack on
1620786a6f21Smrg      # massive amounts of additional arguments before passing them to the
1621786a6f21Smrg      # linker.  It appears as though 1/2 is a usable value.
1622ba85709eSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623ba85709eSmrg    fi
16241d54945dSmrg    ;;
16251d54945dSmrg  esac
16261d54945dSmrg])
16271d54945dSmrgif test -n $lt_cv_sys_max_cmd_len ; then
16281d54945dSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
16291d54945dSmrgelse
16301d54945dSmrg  AC_MSG_RESULT(none)
16311d54945dSmrgfi
1632786a6f21Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633786a6f21Smrg_LT_DECL([], [max_cmd_len], [0],
1634786a6f21Smrg    [What is the maximum length of a command?])
1635786a6f21Smrg])# LT_CMD_MAX_LEN
16361d54945dSmrg
1637786a6f21Smrg# Old name:
1638786a6f21SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
1640786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
16411d54945dSmrg
1642786a6f21Smrg
1643786a6f21Smrg# _LT_HEADER_DLFCN
1644786a6f21Smrg# ----------------
1645786a6f21Smrgm4_defun([_LT_HEADER_DLFCN],
1646786a6f21Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647786a6f21Smrg])# _LT_HEADER_DLFCN
16481d54945dSmrg
16491d54945dSmrg
1650786a6f21Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651786a6f21Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652786a6f21Smrg# ----------------------------------------------------------------
1653786a6f21Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654786a6f21Smrg[m4_require([_LT_HEADER_DLFCN])dnl
16551d54945dSmrgif test "$cross_compiling" = yes; then :
16561d54945dSmrg  [$4]
16571d54945dSmrgelse
16581d54945dSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16591d54945dSmrg  lt_status=$lt_dlunknown
1660786a6f21Smrg  cat > conftest.$ac_ext <<_LT_EOF
16611d54945dSmrg[#line __oline__ "configure"
16621d54945dSmrg#include "confdefs.h"
16631d54945dSmrg
16641d54945dSmrg#if HAVE_DLFCN_H
16651d54945dSmrg#include <dlfcn.h>
16661d54945dSmrg#endif
16671d54945dSmrg
16681d54945dSmrg#include <stdio.h>
16691d54945dSmrg
16701d54945dSmrg#ifdef RTLD_GLOBAL
16711d54945dSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
16721d54945dSmrg#else
16731d54945dSmrg#  ifdef DL_GLOBAL
16741d54945dSmrg#    define LT_DLGLOBAL		DL_GLOBAL
16751d54945dSmrg#  else
16761d54945dSmrg#    define LT_DLGLOBAL		0
16771d54945dSmrg#  endif
16781d54945dSmrg#endif
16791d54945dSmrg
16801d54945dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16811d54945dSmrg   find out it does not work in some platform. */
16821d54945dSmrg#ifndef LT_DLLAZY_OR_NOW
16831d54945dSmrg#  ifdef RTLD_LAZY
16841d54945dSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
16851d54945dSmrg#  else
16861d54945dSmrg#    ifdef DL_LAZY
16871d54945dSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
16881d54945dSmrg#    else
16891d54945dSmrg#      ifdef RTLD_NOW
16901d54945dSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
16911d54945dSmrg#      else
16921d54945dSmrg#        ifdef DL_NOW
16931d54945dSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
16941d54945dSmrg#        else
16951d54945dSmrg#          define LT_DLLAZY_OR_NOW	0
16961d54945dSmrg#        endif
16971d54945dSmrg#      endif
16981d54945dSmrg#    endif
16991d54945dSmrg#  endif
17001d54945dSmrg#endif
17011d54945dSmrg
17021d54945dSmrgvoid fnord() { int i=42;}
17031d54945dSmrgint main ()
17041d54945dSmrg{
17051d54945dSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17061d54945dSmrg  int status = $lt_dlunknown;
17071d54945dSmrg
17081d54945dSmrg  if (self)
17091d54945dSmrg    {
17101d54945dSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
17111d54945dSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17121d54945dSmrg      /* dlclose (self); */
17131d54945dSmrg    }
17141d54945dSmrg  else
17151d54945dSmrg    puts (dlerror ());
17161d54945dSmrg
1717786a6f21Smrg  return status;
17181d54945dSmrg}]
1719786a6f21Smrg_LT_EOF
17201d54945dSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
17211d54945dSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
17221d54945dSmrg    lt_status=$?
17231d54945dSmrg    case x$lt_status in
17241d54945dSmrg      x$lt_dlno_uscore) $1 ;;
17251d54945dSmrg      x$lt_dlneed_uscore) $2 ;;
17261d54945dSmrg      x$lt_dlunknown|x*) $3 ;;
17271d54945dSmrg    esac
17281d54945dSmrg  else :
17291d54945dSmrg    # compilation failed
17301d54945dSmrg    $3
17311d54945dSmrg  fi
17321d54945dSmrgfi
17331d54945dSmrgrm -fr conftest*
1734786a6f21Smrg])# _LT_TRY_DLOPEN_SELF
17351d54945dSmrg
17361d54945dSmrg
1737786a6f21Smrg# LT_SYS_DLOPEN_SELF
1738786a6f21Smrg# ------------------
1739786a6f21SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740786a6f21Smrg[m4_require([_LT_HEADER_DLFCN])dnl
17411d54945dSmrgif test "x$enable_dlopen" != xyes; then
17421d54945dSmrg  enable_dlopen=unknown
17431d54945dSmrg  enable_dlopen_self=unknown
17441d54945dSmrg  enable_dlopen_self_static=unknown
17451d54945dSmrgelse
17461d54945dSmrg  lt_cv_dlopen=no
17471d54945dSmrg  lt_cv_dlopen_libs=
17481d54945dSmrg
17491d54945dSmrg  case $host_os in
17501d54945dSmrg  beos*)
17511d54945dSmrg    lt_cv_dlopen="load_add_on"
17521d54945dSmrg    lt_cv_dlopen_libs=
17531d54945dSmrg    lt_cv_dlopen_self=yes
17541d54945dSmrg    ;;
17551d54945dSmrg
1756786a6f21Smrg  mingw* | pw32* | cegcc*)
17571d54945dSmrg    lt_cv_dlopen="LoadLibrary"
17581d54945dSmrg    lt_cv_dlopen_libs=
1759786a6f21Smrg    ;;
17601d54945dSmrg
17611d54945dSmrg  cygwin*)
17621d54945dSmrg    lt_cv_dlopen="dlopen"
17631d54945dSmrg    lt_cv_dlopen_libs=
1764786a6f21Smrg    ;;
17651d54945dSmrg
17661d54945dSmrg  darwin*)
17671d54945dSmrg  # if libdl is installed we need to link against it
17681d54945dSmrg    AC_CHECK_LIB([dl], [dlopen],
17691d54945dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
17701d54945dSmrg    lt_cv_dlopen="dyld"
17711d54945dSmrg    lt_cv_dlopen_libs=
17721d54945dSmrg    lt_cv_dlopen_self=yes
17731d54945dSmrg    ])
1774786a6f21Smrg    ;;
17751d54945dSmrg
17761d54945dSmrg  *)
17771d54945dSmrg    AC_CHECK_FUNC([shl_load],
17781d54945dSmrg	  [lt_cv_dlopen="shl_load"],
17791d54945dSmrg      [AC_CHECK_LIB([dld], [shl_load],
1780ba85709eSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
17811d54945dSmrg	[AC_CHECK_FUNC([dlopen],
17821d54945dSmrg	      [lt_cv_dlopen="dlopen"],
17831d54945dSmrg	  [AC_CHECK_LIB([dl], [dlopen],
17841d54945dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
17851d54945dSmrg	    [AC_CHECK_LIB([svld], [dlopen],
17861d54945dSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
17871d54945dSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1788ba85709eSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
17891d54945dSmrg	      ])
17901d54945dSmrg	    ])
17911d54945dSmrg	  ])
17921d54945dSmrg	])
17931d54945dSmrg      ])
17941d54945dSmrg    ;;
17951d54945dSmrg  esac
17961d54945dSmrg
17971d54945dSmrg  if test "x$lt_cv_dlopen" != xno; then
17981d54945dSmrg    enable_dlopen=yes
17991d54945dSmrg  else
18001d54945dSmrg    enable_dlopen=no
18011d54945dSmrg  fi
18021d54945dSmrg
18031d54945dSmrg  case $lt_cv_dlopen in
18041d54945dSmrg  dlopen)
18051d54945dSmrg    save_CPPFLAGS="$CPPFLAGS"
18061d54945dSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
18071d54945dSmrg
18081d54945dSmrg    save_LDFLAGS="$LDFLAGS"
18091d54945dSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
18101d54945dSmrg
18111d54945dSmrg    save_LIBS="$LIBS"
18121d54945dSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
18131d54945dSmrg
18141d54945dSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
18151d54945dSmrg	  lt_cv_dlopen_self, [dnl
1816786a6f21Smrg	  _LT_TRY_DLOPEN_SELF(
18171d54945dSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
18181d54945dSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
18191d54945dSmrg    ])
18201d54945dSmrg
18211d54945dSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
18221d54945dSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
18231d54945dSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824786a6f21Smrg	  lt_cv_dlopen_self_static, [dnl
1825786a6f21Smrg	  _LT_TRY_DLOPEN_SELF(
18261d54945dSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
18271d54945dSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
18281d54945dSmrg      ])
18291d54945dSmrg    fi
18301d54945dSmrg
18311d54945dSmrg    CPPFLAGS="$save_CPPFLAGS"
18321d54945dSmrg    LDFLAGS="$save_LDFLAGS"
18331d54945dSmrg    LIBS="$save_LIBS"
18341d54945dSmrg    ;;
18351d54945dSmrg  esac
18361d54945dSmrg
18371d54945dSmrg  case $lt_cv_dlopen_self in
18381d54945dSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
18391d54945dSmrg  *) enable_dlopen_self=unknown ;;
18401d54945dSmrg  esac
18411d54945dSmrg
18421d54945dSmrg  case $lt_cv_dlopen_self_static in
18431d54945dSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
18441d54945dSmrg  *) enable_dlopen_self_static=unknown ;;
18451d54945dSmrg  esac
18461d54945dSmrgfi
1847786a6f21Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848786a6f21Smrg	 [Whether dlopen is supported])
1849786a6f21Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850786a6f21Smrg	 [Whether dlopen of programs is supported])
1851786a6f21Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852786a6f21Smrg	 [Whether dlopen of statically linked programs is supported])
1853786a6f21Smrg])# LT_SYS_DLOPEN_SELF
18541d54945dSmrg
1855786a6f21Smrg# Old name:
1856786a6f21SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
1858786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
18591d54945dSmrg
1860786a6f21Smrg
1861786a6f21Smrg# _LT_COMPILER_C_O([TAGNAME])
1862786a6f21Smrg# ---------------------------
1863786a6f21Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864786a6f21Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865786a6f21Smrgm4_defun([_LT_COMPILER_C_O],
1866786a6f21Smrg[m4_require([_LT_DECL_SED])dnl
1867786a6f21Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868786a6f21Smrgm4_require([_LT_TAG_COMPILER])dnl
18691d54945dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870786a6f21Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871786a6f21Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872786a6f21Smrg   $RM -r conftest 2>/dev/null
18731d54945dSmrg   mkdir conftest
18741d54945dSmrg   cd conftest
18751d54945dSmrg   mkdir out
1876ba85709eSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18771d54945dSmrg
18781d54945dSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
18791d54945dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
18801d54945dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
18811d54945dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
18821d54945dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
18831d54945dSmrg   lt_compile=`echo "$ac_compile" | $SED \
18841d54945dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18851d54945dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
18861d54945dSmrg   -e 's:$: $lt_compiler_flag:'`
18871d54945dSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
18881d54945dSmrg   (eval "$lt_compile" 2>out/conftest.err)
18891d54945dSmrg   ac_status=$?
18901d54945dSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
18911d54945dSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
18921d54945dSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
18931d54945dSmrg   then
18941d54945dSmrg     # The compiler can only warn and ignore the option if not recognized
18951d54945dSmrg     # So say no if there are warnings
1896786a6f21Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
18971d54945dSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18981d54945dSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899786a6f21Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
19001d54945dSmrg     fi
19011d54945dSmrg   fi
19021d54945dSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903786a6f21Smrg   $RM conftest*
19041d54945dSmrg   # SGI C++ compiler will create directory out/ii_files/ for
19051d54945dSmrg   # template instantiation
1906786a6f21Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907786a6f21Smrg   $RM out/* && rmdir out
19081d54945dSmrg   cd ..
1909786a6f21Smrg   $RM -r conftest
1910786a6f21Smrg   $RM conftest*
19111d54945dSmrg])
1912786a6f21Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913786a6f21Smrg	[Does compiler simultaneously support -c and -o options?])
1914786a6f21Smrg])# _LT_COMPILER_C_O
19151d54945dSmrg
19161d54945dSmrg
1917786a6f21Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918786a6f21Smrg# ----------------------------------
19191d54945dSmrg# Check to see if we can do hard links to lock some files if needed
1920786a6f21Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921786a6f21Smrg[m4_require([_LT_ENABLE_LOCK])dnl
1922786a6f21Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923786a6f21Smrg_LT_COMPILER_C_O([$1])
19241d54945dSmrg
19251d54945dSmrghard_links="nottested"
1926786a6f21Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
19271d54945dSmrg  # do not overwrite the value of need_locks provided by the user
19281d54945dSmrg  AC_MSG_CHECKING([if we can lock with hard links])
19291d54945dSmrg  hard_links=yes
1930786a6f21Smrg  $RM conftest*
19311d54945dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19321d54945dSmrg  touch conftest.a
19331d54945dSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
19341d54945dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19351d54945dSmrg  AC_MSG_RESULT([$hard_links])
19361d54945dSmrg  if test "$hard_links" = no; then
19371d54945dSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
19381d54945dSmrg    need_locks=warn
19391d54945dSmrg  fi
19401d54945dSmrgelse
19411d54945dSmrg  need_locks=no
19421d54945dSmrgfi
1943786a6f21Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944786a6f21Smrg])# _LT_COMPILER_FILE_LOCKS
19451d54945dSmrg
19461d54945dSmrg
1947786a6f21Smrg# _LT_CHECK_OBJDIR
1948786a6f21Smrg# ----------------
1949786a6f21Smrgm4_defun([_LT_CHECK_OBJDIR],
19501d54945dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
19511d54945dSmrg[rm -f .libs 2>/dev/null
19521d54945dSmrgmkdir .libs 2>/dev/null
19531d54945dSmrgif test -d .libs; then
19541d54945dSmrg  lt_cv_objdir=.libs
19551d54945dSmrgelse
19561d54945dSmrg  # MS-DOS does not allow filenames that begin with a dot.
19571d54945dSmrg  lt_cv_objdir=_libs
19581d54945dSmrgfi
19591d54945dSmrgrmdir .libs 2>/dev/null])
19601d54945dSmrgobjdir=$lt_cv_objdir
1961786a6f21Smrg_LT_DECL([], [objdir], [0],
1962786a6f21Smrg         [The name of the directory that contains temporary libtool files])dnl
1963786a6f21Smrgm4_pattern_allow([LT_OBJDIR])dnl
1964786a6f21SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965786a6f21Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966786a6f21Smrg])# _LT_CHECK_OBJDIR
19671d54945dSmrg
19681d54945dSmrg
1969786a6f21Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970786a6f21Smrg# --------------------------------------
19711d54945dSmrg# Check hardcoding attributes.
1972786a6f21Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
19731d54945dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974786a6f21Smrg_LT_TAGVAR(hardcode_action, $1)=
1975786a6f21Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976786a6f21Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977786a6f21Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
19781d54945dSmrg
1979786a6f21Smrg  # We can hardcode non-existent directories.
1980786a6f21Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
19811d54945dSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
19821d54945dSmrg     # have to relink, otherwise we might link with an installed library
19831d54945dSmrg     # when we should be linking with a yet-to-be-installed one
1984786a6f21Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985786a6f21Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
19861d54945dSmrg    # Linking always hardcodes the temporary library directory.
1987786a6f21Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
19881d54945dSmrg  else
19891d54945dSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990786a6f21Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
19911d54945dSmrg  fi
19921d54945dSmrgelse
19931d54945dSmrg  # We cannot hardcode anything, or else we can only hardcode existing
19941d54945dSmrg  # directories.
1995786a6f21Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
19961d54945dSmrgfi
1997786a6f21SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
19981d54945dSmrg
1999786a6f21Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000786a6f21Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
20011d54945dSmrg  # Fast installation is not supported
20021d54945dSmrg  enable_fast_install=no
20031d54945dSmrgelif test "$shlibpath_overrides_runpath" = yes ||
20041d54945dSmrg     test "$enable_shared" = no; then
20051d54945dSmrg  # Fast installation is not necessary
20061d54945dSmrg  enable_fast_install=needless
20071d54945dSmrgfi
2008786a6f21Smrg_LT_TAGDECL([], [hardcode_action], [0],
2009786a6f21Smrg    [How to hardcode a shared library path into an executable])
2010786a6f21Smrg])# _LT_LINKER_HARDCODE_LIBPATH
20111d54945dSmrg
20121d54945dSmrg
2013786a6f21Smrg# _LT_CMD_STRIPLIB
2014786a6f21Smrg# ----------------
2015786a6f21Smrgm4_defun([_LT_CMD_STRIPLIB],
2016786a6f21Smrg[m4_require([_LT_DECL_EGREP])
2017786a6f21Smrgstriplib=
20181d54945dSmrgold_striplib=
20191d54945dSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020786a6f21Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
20211d54945dSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
20221d54945dSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
20231d54945dSmrg  AC_MSG_RESULT([yes])
20241d54945dSmrgelse
20251d54945dSmrg# FIXME - insert some real tests, host_os isn't really good enough
20261d54945dSmrg  case $host_os in
2027786a6f21Smrg  darwin*)
2028786a6f21Smrg    if test -n "$STRIP" ; then
2029786a6f21Smrg      striplib="$STRIP -x"
2030786a6f21Smrg      old_striplib="$STRIP -S"
2031786a6f21Smrg      AC_MSG_RESULT([yes])
2032786a6f21Smrg    else
2033786a6f21Smrg      AC_MSG_RESULT([no])
2034786a6f21Smrg    fi
2035786a6f21Smrg    ;;
2036786a6f21Smrg  *)
2037786a6f21Smrg    AC_MSG_RESULT([no])
20381d54945dSmrg    ;;
20391d54945dSmrg  esac
20401d54945dSmrgfi
2041786a6f21Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042786a6f21Smrg_LT_DECL([], [striplib], [1])
2043786a6f21Smrg])# _LT_CMD_STRIPLIB
20441d54945dSmrg
20451d54945dSmrg
2046786a6f21Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
20471d54945dSmrg# -----------------------------
20481d54945dSmrg# PORTME Fill in your ld.so characteristics
2049786a6f21Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050786a6f21Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051786a6f21Smrgm4_require([_LT_DECL_EGREP])dnl
2052786a6f21Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053786a6f21Smrgm4_require([_LT_DECL_OBJDUMP])dnl
2054786a6f21Smrgm4_require([_LT_DECL_SED])dnl
2055ba85709eSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056786a6f21Smrgm4_if([$1],
2057786a6f21Smrg	[], [
20581d54945dSmrgif test "$GCC" = yes; then
2059ba85709eSmrg  case $host_os in
2060ba85709eSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061ba85709eSmrg    *) lt_awk_arg="/^libraries:/" ;;
2062ba85709eSmrg  esac
2063ba85709eSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064786a6f21Smrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
20651d54945dSmrg    # if the path contains ";" then we assume it to be the separator
20661d54945dSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
20671d54945dSmrg    # assumed that no part of a normal pathname contains ";" but that should
20681d54945dSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069786a6f21Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
20701d54945dSmrg  else
2071786a6f21Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
20721d54945dSmrg  fi
2073ba85709eSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2074ba85709eSmrg  # and add multilib dir if necessary.
2075ba85709eSmrg  lt_tmp_lt_search_path_spec=
2076ba85709eSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077ba85709eSmrg  for lt_sys_path in $lt_search_path_spec; do
2078ba85709eSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079ba85709eSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080ba85709eSmrg    else
2081ba85709eSmrg      test -d "$lt_sys_path" && \
2082ba85709eSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083ba85709eSmrg    fi
2084ba85709eSmrg  done
2085786a6f21Smrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086ba85709eSmrgBEGIN {RS=" "; FS="/|\n";} {
2087ba85709eSmrg  lt_foo="";
2088ba85709eSmrg  lt_count=0;
2089ba85709eSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090ba85709eSmrg    if ($lt_i != "" && $lt_i != ".") {
2091ba85709eSmrg      if ($lt_i == "..") {
2092ba85709eSmrg        lt_count++;
2093ba85709eSmrg      } else {
2094ba85709eSmrg        if (lt_count == 0) {
2095ba85709eSmrg          lt_foo="/" $lt_i lt_foo;
2096ba85709eSmrg        } else {
2097ba85709eSmrg          lt_count--;
2098ba85709eSmrg        }
2099ba85709eSmrg      }
2100ba85709eSmrg    }
2101ba85709eSmrg  }
2102ba85709eSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103ba85709eSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104ba85709eSmrg}'`
2105786a6f21Smrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
21061d54945dSmrgelse
21071d54945dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108ba85709eSmrgfi])
2109786a6f21Smrglibrary_names_spec=
2110786a6f21Smrglibname_spec='lib$name'
2111786a6f21Smrgsoname_spec=
2112786a6f21Smrgshrext_cmds=".so"
2113786a6f21Smrgpostinstall_cmds=
2114786a6f21Smrgpostuninstall_cmds=
2115786a6f21Smrgfinish_cmds=
2116786a6f21Smrgfinish_eval=
2117786a6f21Smrgshlibpath_var=
2118786a6f21Smrgshlibpath_overrides_runpath=unknown
2119786a6f21Smrgversion_type=none
2120786a6f21Smrgdynamic_linker="$host_os ld.so"
2121786a6f21Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
21221d54945dSmrgneed_lib_prefix=unknown
21231d54945dSmrghardcode_into_libs=no
21241d54945dSmrg
21251d54945dSmrg# when you set need_version to no, make sure it does not cause -set_version
21261d54945dSmrg# flags to be left without arguments
21271d54945dSmrgneed_version=unknown
21281d54945dSmrg
21291d54945dSmrgcase $host_os in
21301d54945dSmrgaix3*)
21311d54945dSmrg  version_type=linux
21321d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21331d54945dSmrg  shlibpath_var=LIBPATH
21341d54945dSmrg
21351d54945dSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
21361d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
21371d54945dSmrg  ;;
21381d54945dSmrg
2139ba85709eSmrgaix[[4-9]]*)
21401d54945dSmrg  version_type=linux
21411d54945dSmrg  need_lib_prefix=no
21421d54945dSmrg  need_version=no
21431d54945dSmrg  hardcode_into_libs=yes
21441d54945dSmrg  if test "$host_cpu" = ia64; then
21451d54945dSmrg    # AIX 5 supports IA64
21461d54945dSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21471d54945dSmrg    shlibpath_var=LD_LIBRARY_PATH
21481d54945dSmrg  else
21491d54945dSmrg    # With GCC up to 2.95.x, collect2 would create an import file
21501d54945dSmrg    # for dependence libraries.  The import file would start with
21511d54945dSmrg    # the line `#! .'.  This would cause the generated library to
21521d54945dSmrg    # depend on `.', always an invalid library.  This was fixed in
21531d54945dSmrg    # development snapshots of GCC prior to 3.0.
21541d54945dSmrg    case $host_os in
21551d54945dSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
21561d54945dSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21571d54945dSmrg	   echo ' yes '
2158786a6f21Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
21591d54945dSmrg	:
21601d54945dSmrg      else
21611d54945dSmrg	can_build_shared=no
21621d54945dSmrg      fi
21631d54945dSmrg      ;;
21641d54945dSmrg    esac
21651d54945dSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
21661d54945dSmrg    # soname into executable. Probably we can add versioning support to
21671d54945dSmrg    # collect2, so additional links can be useful in future.
21681d54945dSmrg    if test "$aix_use_runtimelinking" = yes; then
21691d54945dSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21701d54945dSmrg      # instead of lib<name>.a to let people know that these are not
21711d54945dSmrg      # typical AIX shared libraries.
21721d54945dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21731d54945dSmrg    else
21741d54945dSmrg      # We preserve .a as extension for shared libraries through AIX4.2
21751d54945dSmrg      # and later when we are not doing run time linking.
21761d54945dSmrg      library_names_spec='${libname}${release}.a $libname.a'
21771d54945dSmrg      soname_spec='${libname}${release}${shared_ext}$major'
21781d54945dSmrg    fi
21791d54945dSmrg    shlibpath_var=LIBPATH
21801d54945dSmrg  fi
21811d54945dSmrg  ;;
21821d54945dSmrg
21831d54945dSmrgamigaos*)
2184786a6f21Smrg  case $host_cpu in
2185786a6f21Smrg  powerpc)
2186786a6f21Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187786a6f21Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188786a6f21Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189786a6f21Smrg    ;;
2190786a6f21Smrg  m68k)
2191786a6f21Smrg    library_names_spec='$libname.ixlibrary $libname.a'
2192786a6f21Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193786a6f21Smrg    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'
2194786a6f21Smrg    ;;
2195786a6f21Smrg  esac
21961d54945dSmrg  ;;
21971d54945dSmrg
21981d54945dSmrgbeos*)
21991d54945dSmrg  library_names_spec='${libname}${shared_ext}'
22001d54945dSmrg  dynamic_linker="$host_os ld.so"
22011d54945dSmrg  shlibpath_var=LIBRARY_PATH
22021d54945dSmrg  ;;
22031d54945dSmrg
22041d54945dSmrgbsdi[[45]]*)
22051d54945dSmrg  version_type=linux
22061d54945dSmrg  need_version=no
22071d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22081d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
22091d54945dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
22101d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
22111d54945dSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
22121d54945dSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
22131d54945dSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
22141d54945dSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
22151d54945dSmrg  # libtool to hard-code these into programs
22161d54945dSmrg  ;;
22171d54945dSmrg
2218786a6f21Smrgcygwin* | mingw* | pw32* | cegcc*)
22191d54945dSmrg  version_type=windows
22201d54945dSmrg  shrext_cmds=".dll"
22211d54945dSmrg  need_version=no
22221d54945dSmrg  need_lib_prefix=no
22231d54945dSmrg
22241d54945dSmrg  case $GCC,$host_os in
2225786a6f21Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
22261d54945dSmrg    library_names_spec='$libname.dll.a'
22271d54945dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
22281d54945dSmrg    postinstall_cmds='base_file=`basename \${file}`~
2229786a6f21Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
22301d54945dSmrg      dldir=$destdir/`dirname \$dlpath`~
22311d54945dSmrg      test -d \$dldir || mkdir -p \$dldir~
22321d54945dSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233786a6f21Smrg      chmod a+x \$dldir/$dlname~
2234786a6f21Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235786a6f21Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236786a6f21Smrg      fi'
22371d54945dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22381d54945dSmrg      dlpath=$dir/\$dldll~
2239786a6f21Smrg       $RM \$dlpath'
22401d54945dSmrg    shlibpath_overrides_runpath=yes
22411d54945dSmrg
22421d54945dSmrg    case $host_os in
22431d54945dSmrg    cygwin*)
22441d54945dSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
22451d54945dSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22461d54945dSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
22471d54945dSmrg      ;;
2248786a6f21Smrg    mingw* | cegcc*)
22491d54945dSmrg      # MinGW DLLs use traditional 'lib' prefix
22501d54945dSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251786a6f21Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252786a6f21Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
22531d54945dSmrg        # It is most probably a Windows format PATH printed by
22541d54945dSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
22551d54945dSmrg        # path with ; separators, and with drive letters. We can handle the
22561d54945dSmrg        # drive letters (cygwin fileutils understands them), so leave them,
22571d54945dSmrg        # especially as we might pass files found there to a mingw objdump,
22581d54945dSmrg        # which wouldn't understand a cygwinified path. Ahh.
2259786a6f21Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
22601d54945dSmrg      else
2261786a6f21Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
22621d54945dSmrg      fi
22631d54945dSmrg      ;;
22641d54945dSmrg    pw32*)
22651d54945dSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
22661d54945dSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22671d54945dSmrg      ;;
22681d54945dSmrg    esac
22691d54945dSmrg    ;;
22701d54945dSmrg
22711d54945dSmrg  *)
22721d54945dSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
22731d54945dSmrg    ;;
22741d54945dSmrg  esac
22751d54945dSmrg  dynamic_linker='Win32 ld.exe'
22761d54945dSmrg  # FIXME: first we should search . and the directory the executable is in
22771d54945dSmrg  shlibpath_var=PATH
22781d54945dSmrg  ;;
22791d54945dSmrg
22801d54945dSmrgdarwin* | rhapsody*)
22811d54945dSmrg  dynamic_linker="$host_os dyld"
22821d54945dSmrg  version_type=darwin
22831d54945dSmrg  need_lib_prefix=no
22841d54945dSmrg  need_version=no
2285786a6f21Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
22861d54945dSmrg  soname_spec='${libname}${release}${major}$shared_ext'
22871d54945dSmrg  shlibpath_overrides_runpath=yes
22881d54945dSmrg  shlibpath_var=DYLD_LIBRARY_PATH
22891d54945dSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290786a6f21Smrgm4_if([$1], [],[
2291786a6f21Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
22921d54945dSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22931d54945dSmrg  ;;
22941d54945dSmrg
22951d54945dSmrgdgux*)
22961d54945dSmrg  version_type=linux
22971d54945dSmrg  need_lib_prefix=no
22981d54945dSmrg  need_version=no
22991d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
23001d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
23011d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
23021d54945dSmrg  ;;
23031d54945dSmrg
23041d54945dSmrgfreebsd1*)
23051d54945dSmrg  dynamic_linker=no
23061d54945dSmrg  ;;
23071d54945dSmrg
23081d54945dSmrgfreebsd* | dragonfly*)
23091d54945dSmrg  # DragonFly does not have aout.  When/if they implement a new
23101d54945dSmrg  # versioning mechanism, adjust this.
23111d54945dSmrg  if test -x /usr/bin/objformat; then
23121d54945dSmrg    objformat=`/usr/bin/objformat`
23131d54945dSmrg  else
23141d54945dSmrg    case $host_os in
23151d54945dSmrg    freebsd[[123]]*) objformat=aout ;;
23161d54945dSmrg    *) objformat=elf ;;
23171d54945dSmrg    esac
23181d54945dSmrg  fi
23191d54945dSmrg  version_type=freebsd-$objformat
23201d54945dSmrg  case $version_type in
23211d54945dSmrg    freebsd-elf*)
23221d54945dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
23231d54945dSmrg      need_version=no
23241d54945dSmrg      need_lib_prefix=no
23251d54945dSmrg      ;;
23261d54945dSmrg    freebsd-*)
23271d54945dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
23281d54945dSmrg      need_version=yes
23291d54945dSmrg      ;;
23301d54945dSmrg  esac
23311d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
23321d54945dSmrg  case $host_os in
23331d54945dSmrg  freebsd2*)
23341d54945dSmrg    shlibpath_overrides_runpath=yes
23351d54945dSmrg    ;;
23361d54945dSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
23371d54945dSmrg    shlibpath_overrides_runpath=yes
23381d54945dSmrg    hardcode_into_libs=yes
23391d54945dSmrg    ;;
23401d54945dSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
23411d54945dSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
23421d54945dSmrg    shlibpath_overrides_runpath=no
23431d54945dSmrg    hardcode_into_libs=yes
23441d54945dSmrg    ;;
2345ba85709eSmrg  *) # from 4.6 on, and DragonFly
23461d54945dSmrg    shlibpath_overrides_runpath=yes
23471d54945dSmrg    hardcode_into_libs=yes
23481d54945dSmrg    ;;
23491d54945dSmrg  esac
23501d54945dSmrg  ;;
23511d54945dSmrg
23521d54945dSmrggnu*)
23531d54945dSmrg  version_type=linux
23541d54945dSmrg  need_lib_prefix=no
23551d54945dSmrg  need_version=no
23561d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
23571d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
23581d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
23591d54945dSmrg  hardcode_into_libs=yes
23601d54945dSmrg  ;;
23611d54945dSmrg
23621d54945dSmrghpux9* | hpux10* | hpux11*)
23631d54945dSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
23641d54945dSmrg  # link against other versions.
23651d54945dSmrg  version_type=sunos
23661d54945dSmrg  need_lib_prefix=no
23671d54945dSmrg  need_version=no
23681d54945dSmrg  case $host_cpu in
23691d54945dSmrg  ia64*)
23701d54945dSmrg    shrext_cmds='.so'
23711d54945dSmrg    hardcode_into_libs=yes
23721d54945dSmrg    dynamic_linker="$host_os dld.so"
23731d54945dSmrg    shlibpath_var=LD_LIBRARY_PATH
23741d54945dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
23751d54945dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23761d54945dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
23771d54945dSmrg    if test "X$HPUX_IA64_MODE" = X32; then
23781d54945dSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
23791d54945dSmrg    else
23801d54945dSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
23811d54945dSmrg    fi
23821d54945dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23831d54945dSmrg    ;;
2384786a6f21Smrg  hppa*64*)
2385786a6f21Smrg    shrext_cmds='.sl'
2386786a6f21Smrg    hardcode_into_libs=yes
2387786a6f21Smrg    dynamic_linker="$host_os dld.sl"
2388786a6f21Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2389786a6f21Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2390786a6f21Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2391786a6f21Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2392786a6f21Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2393786a6f21Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394786a6f21Smrg    ;;
2395786a6f21Smrg  *)
23961d54945dSmrg    shrext_cmds='.sl'
23971d54945dSmrg    dynamic_linker="$host_os dld.sl"
23981d54945dSmrg    shlibpath_var=SHLIB_PATH
23991d54945dSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
24001d54945dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24011d54945dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
24021d54945dSmrg    ;;
24031d54945dSmrg  esac
24041d54945dSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
24051d54945dSmrg  postinstall_cmds='chmod 555 $lib'
24061d54945dSmrg  ;;
24071d54945dSmrg
2408ba85709eSmrginterix[[3-9]]*)
24091d54945dSmrg  version_type=linux
24101d54945dSmrg  need_lib_prefix=no
24111d54945dSmrg  need_version=no
24121d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
24131d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
24141d54945dSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
24151d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
24161d54945dSmrg  shlibpath_overrides_runpath=no
24171d54945dSmrg  hardcode_into_libs=yes
24181d54945dSmrg  ;;
24191d54945dSmrg
24201d54945dSmrgirix5* | irix6* | nonstopux*)
24211d54945dSmrg  case $host_os in
24221d54945dSmrg    nonstopux*) version_type=nonstopux ;;
24231d54945dSmrg    *)
24241d54945dSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
24251d54945dSmrg		version_type=linux
24261d54945dSmrg	else
24271d54945dSmrg		version_type=irix
24281d54945dSmrg	fi ;;
24291d54945dSmrg  esac
24301d54945dSmrg  need_lib_prefix=no
24311d54945dSmrg  need_version=no
24321d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
24331d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
24341d54945dSmrg  case $host_os in
24351d54945dSmrg  irix5* | nonstopux*)
24361d54945dSmrg    libsuff= shlibsuff=
24371d54945dSmrg    ;;
24381d54945dSmrg  *)
24391d54945dSmrg    case $LD in # libtool.m4 will add one of these switches to LD
24401d54945dSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
24411d54945dSmrg      libsuff= shlibsuff= libmagic=32-bit;;
24421d54945dSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
24431d54945dSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
24441d54945dSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
24451d54945dSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
24461d54945dSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
24471d54945dSmrg    esac
24481d54945dSmrg    ;;
24491d54945dSmrg  esac
24501d54945dSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
24511d54945dSmrg  shlibpath_overrides_runpath=no
24521d54945dSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
24531d54945dSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
24541d54945dSmrg  hardcode_into_libs=yes
24551d54945dSmrg  ;;
24561d54945dSmrg
24571d54945dSmrg# No shared lib support for Linux oldld, aout, or coff.
24581d54945dSmrglinux*oldld* | linux*aout* | linux*coff*)
24591d54945dSmrg  dynamic_linker=no
24601d54945dSmrg  ;;
24611d54945dSmrg
24621d54945dSmrg# This must be Linux ELF.
2463ba85709eSmrglinux* | k*bsd*-gnu)
24641d54945dSmrg  version_type=linux
24651d54945dSmrg  need_lib_prefix=no
24661d54945dSmrg  need_version=no
24671d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24681d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
24691d54945dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
24701d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
24711d54945dSmrg  shlibpath_overrides_runpath=no
2472786a6f21Smrg  # Some binutils ld are patched to set DT_RUNPATH
2473786a6f21Smrg  save_LDFLAGS=$LDFLAGS
2474786a6f21Smrg  save_libdir=$libdir
2475786a6f21Smrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476786a6f21Smrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477786a6f21Smrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478786a6f21Smrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479786a6f21Smrg       [shlibpath_overrides_runpath=yes])])
2480786a6f21Smrg  LDFLAGS=$save_LDFLAGS
2481786a6f21Smrg  libdir=$save_libdir
2482786a6f21Smrg
24831d54945dSmrg  # This implies no fast_install, which is unacceptable.
24841d54945dSmrg  # Some rework will be needed to allow for fast_install
24851d54945dSmrg  # before this can be enabled.
24861d54945dSmrg  hardcode_into_libs=yes
2487786a6f21Smrg
2488786a6f21Smrg  # Add ABI-specific directories to the system library path.
2489786a6f21Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
24901d54945dSmrg
24911d54945dSmrg  # Append ld.so.conf contents to the search path
24921d54945dSmrg  if test -f /etc/ld.so.conf; then
2493786a6f21Smrg    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' ' '`
2494ba85709eSmrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
24951d54945dSmrg  fi
24961d54945dSmrg
24971d54945dSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
24981d54945dSmrg  # powerpc, because MkLinux only supported shared libraries with the
24991d54945dSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
25001d54945dSmrg  # most powerpc-linux boxes support dynamic linking these days and
25011d54945dSmrg  # people can always --disable-shared, the test was removed, and we
25021d54945dSmrg  # assume the GNU/Linux dynamic linker is in use.
25031d54945dSmrg  dynamic_linker='GNU/Linux ld.so'
25041d54945dSmrg  ;;
25051d54945dSmrg
25061d54945dSmrgnetbsd*)
25071d54945dSmrg  version_type=sunos
25081d54945dSmrg  need_lib_prefix=no
25091d54945dSmrg  need_version=no
2510786a6f21Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
25111d54945dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25121d54945dSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25131d54945dSmrg    dynamic_linker='NetBSD (a.out) ld.so'
25141d54945dSmrg  else
25151d54945dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25161d54945dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
25171d54945dSmrg    dynamic_linker='NetBSD ld.elf_so'
25181d54945dSmrg  fi
25191d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
25201d54945dSmrg  shlibpath_overrides_runpath=yes
25211d54945dSmrg  hardcode_into_libs=yes
25221d54945dSmrg  ;;
25231d54945dSmrg
25241d54945dSmrgnewsos6)
25251d54945dSmrg  version_type=linux
25261d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25271d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
25281d54945dSmrg  shlibpath_overrides_runpath=yes
25291d54945dSmrg  ;;
25301d54945dSmrg
2531786a6f21Smrg*nto* | *qnx*)
2532786a6f21Smrg  version_type=qnx
25331d54945dSmrg  need_lib_prefix=no
25341d54945dSmrg  need_version=no
25351d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25361d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
25371d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
2538786a6f21Smrg  shlibpath_overrides_runpath=no
2539786a6f21Smrg  hardcode_into_libs=yes
2540786a6f21Smrg  dynamic_linker='ldqnx.so'
25411d54945dSmrg  ;;
25421d54945dSmrg
25431d54945dSmrgopenbsd*)
25441d54945dSmrg  version_type=sunos
25451d54945dSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
25461d54945dSmrg  need_lib_prefix=no
25471d54945dSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
25481d54945dSmrg  case $host_os in
2549786a6f21Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2550786a6f21Smrg    *)				need_version=no  ;;
25511d54945dSmrg  esac
25521d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25531d54945dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25541d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
2555786a6f21Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
25561d54945dSmrg    case $host_os in
25571d54945dSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
25581d54945dSmrg	shlibpath_overrides_runpath=no
25591d54945dSmrg	;;
25601d54945dSmrg      *)
25611d54945dSmrg	shlibpath_overrides_runpath=yes
25621d54945dSmrg	;;
25631d54945dSmrg      esac
25641d54945dSmrg  else
25651d54945dSmrg    shlibpath_overrides_runpath=yes
25661d54945dSmrg  fi
25671d54945dSmrg  ;;
25681d54945dSmrg
25691d54945dSmrgos2*)
25701d54945dSmrg  libname_spec='$name'
25711d54945dSmrg  shrext_cmds=".dll"
25721d54945dSmrg  need_lib_prefix=no
25731d54945dSmrg  library_names_spec='$libname${shared_ext} $libname.a'
25741d54945dSmrg  dynamic_linker='OS/2 ld.exe'
25751d54945dSmrg  shlibpath_var=LIBPATH
25761d54945dSmrg  ;;
25771d54945dSmrg
25781d54945dSmrgosf3* | osf4* | osf5*)
25791d54945dSmrg  version_type=osf
25801d54945dSmrg  need_lib_prefix=no
25811d54945dSmrg  need_version=no
25821d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
25831d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25841d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
25851d54945dSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
25861d54945dSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
25871d54945dSmrg  ;;
25881d54945dSmrg
2589ba85709eSmrgrdos*)
2590ba85709eSmrg  dynamic_linker=no
2591ba85709eSmrg  ;;
2592ba85709eSmrg
25931d54945dSmrgsolaris*)
25941d54945dSmrg  version_type=linux
25951d54945dSmrg  need_lib_prefix=no
25961d54945dSmrg  need_version=no
25971d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25981d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
25991d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
26001d54945dSmrg  shlibpath_overrides_runpath=yes
26011d54945dSmrg  hardcode_into_libs=yes
26021d54945dSmrg  # ldd complains unless libraries are executable
26031d54945dSmrg  postinstall_cmds='chmod +x $lib'
26041d54945dSmrg  ;;
26051d54945dSmrg
26061d54945dSmrgsunos4*)
26071d54945dSmrg  version_type=sunos
26081d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
26091d54945dSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
26101d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
26111d54945dSmrg  shlibpath_overrides_runpath=yes
26121d54945dSmrg  if test "$with_gnu_ld" = yes; then
26131d54945dSmrg    need_lib_prefix=no
26141d54945dSmrg  fi
26151d54945dSmrg  need_version=yes
26161d54945dSmrg  ;;
26171d54945dSmrg
26181d54945dSmrgsysv4 | sysv4.3*)
26191d54945dSmrg  version_type=linux
26201d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26211d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
26221d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
26231d54945dSmrg  case $host_vendor in
26241d54945dSmrg    sni)
26251d54945dSmrg      shlibpath_overrides_runpath=no
26261d54945dSmrg      need_lib_prefix=no
26271d54945dSmrg      runpath_var=LD_RUN_PATH
26281d54945dSmrg      ;;
26291d54945dSmrg    siemens)
26301d54945dSmrg      need_lib_prefix=no
26311d54945dSmrg      ;;
26321d54945dSmrg    motorola)
26331d54945dSmrg      need_lib_prefix=no
26341d54945dSmrg      need_version=no
26351d54945dSmrg      shlibpath_overrides_runpath=no
26361d54945dSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
26371d54945dSmrg      ;;
26381d54945dSmrg  esac
26391d54945dSmrg  ;;
26401d54945dSmrg
26411d54945dSmrgsysv4*MP*)
26421d54945dSmrg  if test -d /usr/nec ;then
26431d54945dSmrg    version_type=linux
26441d54945dSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
26451d54945dSmrg    soname_spec='$libname${shared_ext}.$major'
26461d54945dSmrg    shlibpath_var=LD_LIBRARY_PATH
26471d54945dSmrg  fi
26481d54945dSmrg  ;;
26491d54945dSmrg
26501d54945dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
26511d54945dSmrg  version_type=freebsd-elf
26521d54945dSmrg  need_lib_prefix=no
26531d54945dSmrg  need_version=no
26541d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
26551d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
26561d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
2657786a6f21Smrg  shlibpath_overrides_runpath=yes
26581d54945dSmrg  hardcode_into_libs=yes
26591d54945dSmrg  if test "$with_gnu_ld" = yes; then
26601d54945dSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
26611d54945dSmrg  else
26621d54945dSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
26631d54945dSmrg    case $host_os in
26641d54945dSmrg      sco3.2v5*)
26651d54945dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
26661d54945dSmrg	;;
26671d54945dSmrg    esac
26681d54945dSmrg  fi
26691d54945dSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
26701d54945dSmrg  ;;
26711d54945dSmrg
2672786a6f21Smrgtpf*)
2673786a6f21Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2674786a6f21Smrg  version_type=linux
2675786a6f21Smrg  need_lib_prefix=no
2676786a6f21Smrg  need_version=no
2677786a6f21Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678786a6f21Smrg  shlibpath_var=LD_LIBRARY_PATH
2679786a6f21Smrg  shlibpath_overrides_runpath=no
2680786a6f21Smrg  hardcode_into_libs=yes
2681786a6f21Smrg  ;;
2682786a6f21Smrg
26831d54945dSmrguts4*)
26841d54945dSmrg  version_type=linux
26851d54945dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26861d54945dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
26871d54945dSmrg  shlibpath_var=LD_LIBRARY_PATH
26881d54945dSmrg  ;;
26891d54945dSmrg
26901d54945dSmrg*)
26911d54945dSmrg  dynamic_linker=no
26921d54945dSmrg  ;;
26931d54945dSmrgesac
26941d54945dSmrgAC_MSG_RESULT([$dynamic_linker])
26951d54945dSmrgtest "$dynamic_linker" = no && can_build_shared=no
26961d54945dSmrg
26971d54945dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
26981d54945dSmrgif test "$GCC" = yes; then
26991d54945dSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
27001d54945dSmrgfi
27011d54945dSmrg
2702786a6f21Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2703786a6f21Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2704786a6f21Smrgfi
2705786a6f21Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2706786a6f21Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2707786a6f21Smrgfi
27081d54945dSmrg
2709786a6f21Smrg_LT_DECL([], [variables_saved_for_relink], [1],
2710786a6f21Smrg    [Variables whose values should be saved in libtool wrapper scripts and
2711786a6f21Smrg    restored at link time])
2712786a6f21Smrg_LT_DECL([], [need_lib_prefix], [0],
2713786a6f21Smrg    [Do we need the "lib" prefix for modules?])
2714786a6f21Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2715786a6f21Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
2716786a6f21Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2717786a6f21Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2718786a6f21Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2719786a6f21Smrg    [Is shlibpath searched before the hard-coded library search path?])
2720786a6f21Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2721786a6f21Smrg_LT_DECL([], [library_names_spec], [1],
2722786a6f21Smrg    [[List of archive names.  First name is the real one, the rest are links.
2723786a6f21Smrg    The last name is the one that the linker finds with -lNAME]])
2724786a6f21Smrg_LT_DECL([], [soname_spec], [1],
2725786a6f21Smrg    [[The coded name of the library, if different from the real name]])
2726786a6f21Smrg_LT_DECL([], [postinstall_cmds], [2],
2727786a6f21Smrg    [Command to use after installation of a shared archive])
2728786a6f21Smrg_LT_DECL([], [postuninstall_cmds], [2],
2729786a6f21Smrg    [Command to use after uninstallation of a shared archive])
2730786a6f21Smrg_LT_DECL([], [finish_cmds], [2],
2731786a6f21Smrg    [Commands used to finish a libtool library installation in a directory])
2732786a6f21Smrg_LT_DECL([], [finish_eval], [1],
2733786a6f21Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
2734786a6f21Smrg    not shown]])
2735786a6f21Smrg_LT_DECL([], [hardcode_into_libs], [0],
2736786a6f21Smrg    [Whether we should hardcode library paths into libraries])
2737786a6f21Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2738786a6f21Smrg    [Compile-time system search path for libraries])
2739786a6f21Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2740786a6f21Smrg    [Run-time system search path for libraries])
2741786a6f21Smrg])# _LT_SYS_DYNAMIC_LINKER
2742786a6f21Smrg
2743786a6f21Smrg
2744786a6f21Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
27451d54945dSmrg# --------------------------
2746ba85709eSmrg# find a file program which can recognize shared library
2747786a6f21SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2748786a6f21Smrg[m4_require([_LT_DECL_EGREP])dnl
27491d54945dSmrgAC_MSG_CHECKING([for $1])
27501d54945dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
27511d54945dSmrg[case $MAGIC_CMD in
27521d54945dSmrg[[\\/*] |  ?:[\\/]*])
27531d54945dSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
27541d54945dSmrg  ;;
27551d54945dSmrg*)
27561d54945dSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
27571d54945dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
27581d54945dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
27591d54945dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
27601d54945dSmrgdnl not every word.  This closes a longstanding sh security hole.
2761786a6f21Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
27621d54945dSmrg  for ac_dir in $ac_dummy; do
27631d54945dSmrg    IFS="$lt_save_ifs"
27641d54945dSmrg    test -z "$ac_dir" && ac_dir=.
27651d54945dSmrg    if test -f $ac_dir/$1; then
27661d54945dSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
27671d54945dSmrg      if test -n "$file_magic_test_file"; then
27681d54945dSmrg	case $deplibs_check_method in
27691d54945dSmrg	"file_magic "*)
27701d54945dSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
27711d54945dSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
27721d54945dSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
27731d54945dSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
27741d54945dSmrg	    :
27751d54945dSmrg	  else
2776786a6f21Smrg	    cat <<_LT_EOF 1>&2
27771d54945dSmrg
27781d54945dSmrg*** Warning: the command libtool uses to detect shared libraries,
27791d54945dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
27801d54945dSmrg*** The result is that libtool may fail to recognize shared libraries
27811d54945dSmrg*** as such.  This will affect the creation of libtool libraries that
27821d54945dSmrg*** depend on shared libraries, but programs linked with such libtool
27831d54945dSmrg*** libraries will work regardless of this problem.  Nevertheless, you
27841d54945dSmrg*** may want to report the problem to your system manager and/or to
27851d54945dSmrg*** bug-libtool@gnu.org
27861d54945dSmrg
2787786a6f21Smrg_LT_EOF
27881d54945dSmrg	  fi ;;
27891d54945dSmrg	esac
27901d54945dSmrg      fi
27911d54945dSmrg      break
27921d54945dSmrg    fi
27931d54945dSmrg  done
27941d54945dSmrg  IFS="$lt_save_ifs"
27951d54945dSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
27961d54945dSmrg  ;;
27971d54945dSmrgesac])
27981d54945dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
27991d54945dSmrgif test -n "$MAGIC_CMD"; then
28001d54945dSmrg  AC_MSG_RESULT($MAGIC_CMD)
28011d54945dSmrgelse
28021d54945dSmrg  AC_MSG_RESULT(no)
28031d54945dSmrgfi
2804786a6f21Smrg_LT_DECL([], [MAGIC_CMD], [0],
2805786a6f21Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2806786a6f21Smrg])# _LT_PATH_TOOL_PREFIX
28071d54945dSmrg
2808786a6f21Smrg# Old name:
2809786a6f21SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2810786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
2811786a6f21Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
28121d54945dSmrg
2813786a6f21Smrg
2814786a6f21Smrg# _LT_PATH_MAGIC
2815786a6f21Smrg# --------------
2816ba85709eSmrg# find a file program which can recognize a shared library
2817786a6f21Smrgm4_defun([_LT_PATH_MAGIC],
2818786a6f21Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
28191d54945dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
28201d54945dSmrg  if test -n "$ac_tool_prefix"; then
2821786a6f21Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
28221d54945dSmrg  else
28231d54945dSmrg    MAGIC_CMD=:
28241d54945dSmrg  fi
28251d54945dSmrgfi
2826786a6f21Smrg])# _LT_PATH_MAGIC
28271d54945dSmrg
28281d54945dSmrg
2829786a6f21Smrg# LT_PATH_LD
28301d54945dSmrg# ----------
28311d54945dSmrg# find the pathname to the GNU or non-GNU linker
2832786a6f21SmrgAC_DEFUN([LT_PATH_LD],
2833786a6f21Smrg[AC_REQUIRE([AC_PROG_CC])dnl
28341d54945dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
28351d54945dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2836786a6f21Smrgm4_require([_LT_DECL_SED])dnl
2837786a6f21Smrgm4_require([_LT_DECL_EGREP])dnl
2838786a6f21Smrg
2839786a6f21SmrgAC_ARG_WITH([gnu-ld],
2840786a6f21Smrg    [AS_HELP_STRING([--with-gnu-ld],
2841786a6f21Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2842786a6f21Smrg    [test "$withval" = no || with_gnu_ld=yes],
2843786a6f21Smrg    [with_gnu_ld=no])dnl
2844786a6f21Smrg
28451d54945dSmrgac_prog=ld
28461d54945dSmrgif test "$GCC" = yes; then
28471d54945dSmrg  # Check if gcc -print-prog-name=ld gives a path.
28481d54945dSmrg  AC_MSG_CHECKING([for ld used by $CC])
28491d54945dSmrg  case $host in
28501d54945dSmrg  *-*-mingw*)
28511d54945dSmrg    # gcc leaves a trailing carriage return which upsets mingw
28521d54945dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
28531d54945dSmrg  *)
28541d54945dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
28551d54945dSmrg  esac
28561d54945dSmrg  case $ac_prog in
28571d54945dSmrg    # Accept absolute paths.
28581d54945dSmrg    [[\\/]]* | ?:[[\\/]]*)
28591d54945dSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
28601d54945dSmrg      # Canonicalize the pathname of ld
2861786a6f21Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2862786a6f21Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2863786a6f21Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
28641d54945dSmrg      done
28651d54945dSmrg      test -z "$LD" && LD="$ac_prog"
28661d54945dSmrg      ;;
28671d54945dSmrg  "")
28681d54945dSmrg    # If it fails, then pretend we aren't using GCC.
28691d54945dSmrg    ac_prog=ld
28701d54945dSmrg    ;;
28711d54945dSmrg  *)
28721d54945dSmrg    # If it is relative, then search for the first ld in PATH.
28731d54945dSmrg    with_gnu_ld=unknown
28741d54945dSmrg    ;;
28751d54945dSmrg  esac
28761d54945dSmrgelif test "$with_gnu_ld" = yes; then
28771d54945dSmrg  AC_MSG_CHECKING([for GNU ld])
28781d54945dSmrgelse
28791d54945dSmrg  AC_MSG_CHECKING([for non-GNU ld])
28801d54945dSmrgfi
28811d54945dSmrgAC_CACHE_VAL(lt_cv_path_LD,
28821d54945dSmrg[if test -z "$LD"; then
28831d54945dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
28841d54945dSmrg  for ac_dir in $PATH; do
28851d54945dSmrg    IFS="$lt_save_ifs"
28861d54945dSmrg    test -z "$ac_dir" && ac_dir=.
28871d54945dSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
28881d54945dSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
28891d54945dSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
28901d54945dSmrg      # but apparently some variants of GNU ld only accept -v.
28911d54945dSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
28921d54945dSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
28931d54945dSmrg      *GNU* | *'with BFD'*)
28941d54945dSmrg	test "$with_gnu_ld" != no && break
28951d54945dSmrg	;;
28961d54945dSmrg      *)
28971d54945dSmrg	test "$with_gnu_ld" != yes && break
28981d54945dSmrg	;;
28991d54945dSmrg      esac
29001d54945dSmrg    fi
29011d54945dSmrg  done
29021d54945dSmrg  IFS="$lt_save_ifs"
29031d54945dSmrgelse
29041d54945dSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
29051d54945dSmrgfi])
29061d54945dSmrgLD="$lt_cv_path_LD"
29071d54945dSmrgif test -n "$LD"; then
29081d54945dSmrg  AC_MSG_RESULT($LD)
29091d54945dSmrgelse
29101d54945dSmrg  AC_MSG_RESULT(no)
29111d54945dSmrgfi
29121d54945dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2913786a6f21Smrg_LT_PATH_LD_GNU
2914786a6f21SmrgAC_SUBST([LD])
29151d54945dSmrg
2916786a6f21Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2917786a6f21Smrg])# LT_PATH_LD
29181d54945dSmrg
2919786a6f21Smrg# Old names:
2920786a6f21SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2921786a6f21SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2922786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
2923786a6f21Smrgdnl AC_DEFUN([AM_PROG_LD], [])
2924786a6f21Smrgdnl AC_DEFUN([AC_PROG_LD], [])
2925786a6f21Smrg
2926786a6f21Smrg
2927786a6f21Smrg# _LT_PATH_LD_GNU
2928786a6f21Smrg#- --------------
2929786a6f21Smrgm4_defun([_LT_PATH_LD_GNU],
2930786a6f21Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
29311d54945dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
29321d54945dSmrgcase `$LD -v 2>&1 </dev/null` in
29331d54945dSmrg*GNU* | *'with BFD'*)
29341d54945dSmrg  lt_cv_prog_gnu_ld=yes
29351d54945dSmrg  ;;
29361d54945dSmrg*)
29371d54945dSmrg  lt_cv_prog_gnu_ld=no
29381d54945dSmrg  ;;
29391d54945dSmrgesac])
29401d54945dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2941786a6f21Smrg])# _LT_PATH_LD_GNU
29421d54945dSmrg
29431d54945dSmrg
2944786a6f21Smrg# _LT_CMD_RELOAD
2945786a6f21Smrg# --------------
29461d54945dSmrg# find reload flag for linker
29471d54945dSmrg#   -- PORTME Some linkers may need a different reload flag.
2948786a6f21Smrgm4_defun([_LT_CMD_RELOAD],
29491d54945dSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
29501d54945dSmrg  lt_cv_ld_reload_flag,
29511d54945dSmrg  [lt_cv_ld_reload_flag='-r'])
29521d54945dSmrgreload_flag=$lt_cv_ld_reload_flag
29531d54945dSmrgcase $reload_flag in
29541d54945dSmrg"" | " "*) ;;
29551d54945dSmrg*) reload_flag=" $reload_flag" ;;
29561d54945dSmrgesac
29571d54945dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
29581d54945dSmrgcase $host_os in
29591d54945dSmrg  darwin*)
29601d54945dSmrg    if test "$GCC" = yes; then
29611d54945dSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
29621d54945dSmrg    else
29631d54945dSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
29641d54945dSmrg    fi
29651d54945dSmrg    ;;
29661d54945dSmrgesac
2967786a6f21Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2968786a6f21Smrg_LT_DECL([], [reload_cmds], [2])dnl
2969786a6f21Smrg])# _LT_CMD_RELOAD
29701d54945dSmrg
29711d54945dSmrg
2972786a6f21Smrg# _LT_CHECK_MAGIC_METHOD
2973786a6f21Smrg# ----------------------
29741d54945dSmrg# how to check for library dependencies
29751d54945dSmrg#  -- PORTME fill in with the dynamic library characteristics
2976786a6f21Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2977786a6f21Smrg[m4_require([_LT_DECL_EGREP])
2978786a6f21Smrgm4_require([_LT_DECL_OBJDUMP])
2979786a6f21SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
29801d54945dSmrglt_cv_deplibs_check_method,
29811d54945dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
29821d54945dSmrglt_cv_file_magic_test_file=
29831d54945dSmrglt_cv_deplibs_check_method='unknown'
29841d54945dSmrg# Need to set the preceding variable on all platforms that support
29851d54945dSmrg# interlibrary dependencies.
29861d54945dSmrg# 'none' -- dependencies not supported.
29871d54945dSmrg# `unknown' -- same as none, but documents that we really don't know.
29881d54945dSmrg# 'pass_all' -- all dependencies passed with no checks.
29891d54945dSmrg# 'test_compile' -- check by making test program.
29901d54945dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
29911d54945dSmrg# which responds to the $file_magic_cmd with a given extended regex.
29921d54945dSmrg# If you have `file' or equivalent on your system and you're not sure
29931d54945dSmrg# whether `pass_all' will *always* work, you probably want this one.
29941d54945dSmrg
29951d54945dSmrgcase $host_os in
2996ba85709eSmrgaix[[4-9]]*)
29971d54945dSmrg  lt_cv_deplibs_check_method=pass_all
29981d54945dSmrg  ;;
29991d54945dSmrg
30001d54945dSmrgbeos*)
30011d54945dSmrg  lt_cv_deplibs_check_method=pass_all
30021d54945dSmrg  ;;
30031d54945dSmrg
30041d54945dSmrgbsdi[[45]]*)
30051d54945dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
30061d54945dSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
30071d54945dSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
30081d54945dSmrg  ;;
30091d54945dSmrg
30101d54945dSmrgcygwin*)
30111d54945dSmrg  # func_win32_libid is a shell function defined in ltmain.sh
30121d54945dSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
30131d54945dSmrg  lt_cv_file_magic_cmd='func_win32_libid'
30141d54945dSmrg  ;;
30151d54945dSmrg
30161d54945dSmrgmingw* | pw32*)
30171d54945dSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3018ba85709eSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3019ba85709eSmrg  # unless we find 'file', for example because we are cross-compiling.
3020ba85709eSmrg  if ( file / ) >/dev/null 2>&1; then
3021ba85709eSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022ba85709eSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3023ba85709eSmrg  else
3024ba85709eSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3025ba85709eSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3026ba85709eSmrg  fi
30271d54945dSmrg  ;;
30281d54945dSmrg
3029786a6f21Smrgcegcc)
3030786a6f21Smrg  # use the weaker test based on 'objdump'. See mingw*.
3031786a6f21Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3032786a6f21Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3033786a6f21Smrg  ;;
3034786a6f21Smrg
30351d54945dSmrgdarwin* | rhapsody*)
30361d54945dSmrg  lt_cv_deplibs_check_method=pass_all
30371d54945dSmrg  ;;
30381d54945dSmrg
3039ba85709eSmrgfreebsd* | dragonfly*)
3040786a6f21Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
30411d54945dSmrg    case $host_cpu in
30421d54945dSmrg    i*86 )
30431d54945dSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
30441d54945dSmrg      # Let's accept both of them until this is cleared up.
30451d54945dSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
30461d54945dSmrg      lt_cv_file_magic_cmd=/usr/bin/file
30471d54945dSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
30481d54945dSmrg      ;;
30491d54945dSmrg    esac
30501d54945dSmrg  else
30511d54945dSmrg    lt_cv_deplibs_check_method=pass_all
30521d54945dSmrg  fi
30531d54945dSmrg  ;;
30541d54945dSmrg
30551d54945dSmrggnu*)
30561d54945dSmrg  lt_cv_deplibs_check_method=pass_all
30571d54945dSmrg  ;;
30581d54945dSmrg
30591d54945dSmrghpux10.20* | hpux11*)
30601d54945dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
30611d54945dSmrg  case $host_cpu in
30621d54945dSmrg  ia64*)
30631d54945dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
30641d54945dSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
30651d54945dSmrg    ;;
30661d54945dSmrg  hppa*64*)
30671d54945dSmrg    [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]']
30681d54945dSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
30691d54945dSmrg    ;;
30701d54945dSmrg  *)
30711d54945dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
30721d54945dSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
30731d54945dSmrg    ;;
30741d54945dSmrg  esac
30751d54945dSmrg  ;;
30761d54945dSmrg
3077ba85709eSmrginterix[[3-9]]*)
30781d54945dSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
30791d54945dSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
30801d54945dSmrg  ;;
30811d54945dSmrg
30821d54945dSmrgirix5* | irix6* | nonstopux*)
30831d54945dSmrg  case $LD in
30841d54945dSmrg  *-32|*"-32 ") libmagic=32-bit;;
30851d54945dSmrg  *-n32|*"-n32 ") libmagic=N32;;
30861d54945dSmrg  *-64|*"-64 ") libmagic=64-bit;;
30871d54945dSmrg  *) libmagic=never-match;;
30881d54945dSmrg  esac
30891d54945dSmrg  lt_cv_deplibs_check_method=pass_all
30901d54945dSmrg  ;;
30911d54945dSmrg
30921d54945dSmrg# This must be Linux ELF.
3093ba85709eSmrglinux* | k*bsd*-gnu)
30941d54945dSmrg  lt_cv_deplibs_check_method=pass_all
30951d54945dSmrg  ;;
30961d54945dSmrg
30971d54945dSmrgnetbsd*)
3098786a6f21Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
30991d54945dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
31001d54945dSmrg  else
31011d54945dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
31021d54945dSmrg  fi
31031d54945dSmrg  ;;
31041d54945dSmrg
31051d54945dSmrgnewos6*)
31061d54945dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
31071d54945dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
31081d54945dSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
31091d54945dSmrg  ;;
31101d54945dSmrg
3111786a6f21Smrg*nto* | *qnx*)
3112786a6f21Smrg  lt_cv_deplibs_check_method=pass_all
31131d54945dSmrg  ;;
31141d54945dSmrg
31151d54945dSmrgopenbsd*)
3116786a6f21Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
31171d54945dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
31181d54945dSmrg  else
31191d54945dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
31201d54945dSmrg  fi
31211d54945dSmrg  ;;
31221d54945dSmrg
31231d54945dSmrgosf3* | osf4* | osf5*)
31241d54945dSmrg  lt_cv_deplibs_check_method=pass_all
31251d54945dSmrg  ;;
31261d54945dSmrg
3127ba85709eSmrgrdos*)
3128ba85709eSmrg  lt_cv_deplibs_check_method=pass_all
3129ba85709eSmrg  ;;
3130ba85709eSmrg
31311d54945dSmrgsolaris*)
31321d54945dSmrg  lt_cv_deplibs_check_method=pass_all
31331d54945dSmrg  ;;
31341d54945dSmrg
3135786a6f21Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3136786a6f21Smrg  lt_cv_deplibs_check_method=pass_all
3137786a6f21Smrg  ;;
3138786a6f21Smrg
31391d54945dSmrgsysv4 | sysv4.3*)
31401d54945dSmrg  case $host_vendor in
31411d54945dSmrg  motorola)
31421d54945dSmrg    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]]'
31431d54945dSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
31441d54945dSmrg    ;;
31451d54945dSmrg  ncr)
31461d54945dSmrg    lt_cv_deplibs_check_method=pass_all
31471d54945dSmrg    ;;
31481d54945dSmrg  sequent)
31491d54945dSmrg    lt_cv_file_magic_cmd='/bin/file'
31501d54945dSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
31511d54945dSmrg    ;;
31521d54945dSmrg  sni)
31531d54945dSmrg    lt_cv_file_magic_cmd='/bin/file'
31541d54945dSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
31551d54945dSmrg    lt_cv_file_magic_test_file=/lib/libc.so
31561d54945dSmrg    ;;
31571d54945dSmrg  siemens)
31581d54945dSmrg    lt_cv_deplibs_check_method=pass_all
31591d54945dSmrg    ;;
31601d54945dSmrg  pc)
31611d54945dSmrg    lt_cv_deplibs_check_method=pass_all
31621d54945dSmrg    ;;
31631d54945dSmrg  esac
31641d54945dSmrg  ;;
31651d54945dSmrg
3166786a6f21Smrgtpf*)
31671d54945dSmrg  lt_cv_deplibs_check_method=pass_all
31681d54945dSmrg  ;;
31691d54945dSmrgesac
31701d54945dSmrg])
31711d54945dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
31721d54945dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
31731d54945dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
31741d54945dSmrg
3175786a6f21Smrg_LT_DECL([], [deplibs_check_method], [1],
3176786a6f21Smrg    [Method to check whether dependent libraries are shared objects])
3177786a6f21Smrg_LT_DECL([], [file_magic_cmd], [1],
3178786a6f21Smrg    [Command to use when deplibs_check_method == "file_magic"])
3179786a6f21Smrg])# _LT_CHECK_MAGIC_METHOD
31801d54945dSmrg
3181786a6f21Smrg
3182786a6f21Smrg# LT_PATH_NM
31831d54945dSmrg# ----------
3184786a6f21Smrg# find the pathname to a BSD- or MS-compatible name lister
3185786a6f21SmrgAC_DEFUN([LT_PATH_NM],
3186786a6f21Smrg[AC_REQUIRE([AC_PROG_CC])dnl
3187786a6f21SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
31881d54945dSmrg[if test -n "$NM"; then
31891d54945dSmrg  # Let the user override the test.
31901d54945dSmrg  lt_cv_path_NM="$NM"
31911d54945dSmrgelse
31921d54945dSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3193ba85709eSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
31941d54945dSmrg    lt_nm_to_check="$lt_nm_to_check nm"
31951d54945dSmrg  fi
31961d54945dSmrg  for lt_tmp_nm in $lt_nm_to_check; do
31971d54945dSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
31981d54945dSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
31991d54945dSmrg      IFS="$lt_save_ifs"
32001d54945dSmrg      test -z "$ac_dir" && ac_dir=.
32011d54945dSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
32021d54945dSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
32031d54945dSmrg	# Check to see if the nm accepts a BSD-compat flag.
32041d54945dSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
32051d54945dSmrg	#   nm: unknown option "B" ignored
32061d54945dSmrg	# Tru64's nm complains that /dev/null is an invalid object file
32071d54945dSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
32081d54945dSmrg	*/dev/null* | *'Invalid file or object type'*)
32091d54945dSmrg	  lt_cv_path_NM="$tmp_nm -B"
32101d54945dSmrg	  break
32111d54945dSmrg	  ;;
32121d54945dSmrg	*)
32131d54945dSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
32141d54945dSmrg	  */dev/null*)
32151d54945dSmrg	    lt_cv_path_NM="$tmp_nm -p"
32161d54945dSmrg	    break
32171d54945dSmrg	    ;;
32181d54945dSmrg	  *)
32191d54945dSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
32201d54945dSmrg	    continue # so that we can try to find one that supports BSD flags
32211d54945dSmrg	    ;;
32221d54945dSmrg	  esac
32231d54945dSmrg	  ;;
32241d54945dSmrg	esac
32251d54945dSmrg      fi
32261d54945dSmrg    done
32271d54945dSmrg    IFS="$lt_save_ifs"
32281d54945dSmrg  done
3229786a6f21Smrg  : ${lt_cv_path_NM=no}
32301d54945dSmrgfi])
3231786a6f21Smrgif test "$lt_cv_path_NM" != "no"; then
3232786a6f21Smrg  NM="$lt_cv_path_NM"
3233786a6f21Smrgelse
3234786a6f21Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3235786a6f21Smrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3236786a6f21Smrg  AC_SUBST([DUMPBIN])
3237786a6f21Smrg  if test "$DUMPBIN" != ":"; then
3238786a6f21Smrg    NM="$DUMPBIN"
3239786a6f21Smrg  fi
3240786a6f21Smrgfi
3241786a6f21Smrgtest -z "$NM" && NM=nm
3242786a6f21SmrgAC_SUBST([NM])
3243786a6f21Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3244786a6f21Smrg
3245786a6f21SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3246786a6f21Smrg  [lt_cv_nm_interface="BSD nm"
3247786a6f21Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
3248786a6f21Smrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3249786a6f21Smrg  (eval "$ac_compile" 2>conftest.err)
3250786a6f21Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3251786a6f21Smrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3252786a6f21Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3253786a6f21Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3254786a6f21Smrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3255786a6f21Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3256786a6f21Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3257786a6f21Smrg    lt_cv_nm_interface="MS dumpbin"
3258786a6f21Smrg  fi
3259786a6f21Smrg  rm -f conftest*])
3260786a6f21Smrg])# LT_PATH_NM
32611d54945dSmrg
3262786a6f21Smrg# Old names:
3263786a6f21SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3264786a6f21SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3265786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
3266786a6f21Smrgdnl AC_DEFUN([AM_PROG_NM], [])
3267786a6f21Smrgdnl AC_DEFUN([AC_PROG_NM], [])
32681d54945dSmrg
3269786a6f21Smrg
3270786a6f21Smrg# LT_LIB_M
3271786a6f21Smrg# --------
32721d54945dSmrg# check for math library
3273786a6f21SmrgAC_DEFUN([LT_LIB_M],
32741d54945dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
32751d54945dSmrgLIBM=
32761d54945dSmrgcase $host in
32771d54945dSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
32781d54945dSmrg  # These system don't have libm, or don't need it
32791d54945dSmrg  ;;
32801d54945dSmrg*-ncr-sysv4.3*)
32811d54945dSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
32821d54945dSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
32831d54945dSmrg  ;;
32841d54945dSmrg*)
32851d54945dSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
32861d54945dSmrg  ;;
32871d54945dSmrgesac
3288786a6f21SmrgAC_SUBST([LIBM])
3289786a6f21Smrg])# LT_LIB_M
32901d54945dSmrg
3291786a6f21Smrg# Old name:
3292786a6f21SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3293786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
3294786a6f21Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
32951d54945dSmrg
32961d54945dSmrg
3297786a6f21Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3298786a6f21Smrg# -------------------------------
3299786a6f21Smrgm4_defun([_LT_COMPILER_NO_RTTI],
3300786a6f21Smrg[m4_require([_LT_TAG_COMPILER])dnl
33011d54945dSmrg
3302786a6f21Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
33031d54945dSmrg
3304786a6f21Smrgif test "$GCC" = yes; then
3305786a6f21Smrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
33061d54945dSmrg
3307786a6f21Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3308786a6f21Smrg    lt_cv_prog_compiler_rtti_exceptions,
3309786a6f21Smrg    [-fno-rtti -fno-exceptions], [],
3310786a6f21Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3311786a6f21Smrgfi
3312786a6f21Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3313786a6f21Smrg	[Compiler flag to turn off builtin functions])
3314786a6f21Smrg])# _LT_COMPILER_NO_RTTI
33151d54945dSmrg
33161d54945dSmrg
3317786a6f21Smrg# _LT_CMD_GLOBAL_SYMBOLS
3318786a6f21Smrg# ----------------------
3319786a6f21Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3320786a6f21Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3321786a6f21SmrgAC_REQUIRE([AC_PROG_CC])dnl
3322786a6f21SmrgAC_REQUIRE([LT_PATH_NM])dnl
3323786a6f21SmrgAC_REQUIRE([LT_PATH_LD])dnl
3324786a6f21Smrgm4_require([_LT_DECL_SED])dnl
3325786a6f21Smrgm4_require([_LT_DECL_EGREP])dnl
3326786a6f21Smrgm4_require([_LT_TAG_COMPILER])dnl
33271d54945dSmrg
3328786a6f21Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3329786a6f21SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3330786a6f21SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
33311d54945dSmrg[
3332786a6f21Smrg# These are sane defaults that work on at least a few old systems.
3333786a6f21Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
33341d54945dSmrg
3335786a6f21Smrg# Character class describing NM global symbol codes.
3336786a6f21Smrgsymcode='[[BCDEGRST]]'
33371d54945dSmrg
3338786a6f21Smrg# Regexp to match symbols that can be accessed directly from C.
3339786a6f21Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
33401d54945dSmrg
3341786a6f21Smrg# Define system-specific variables.
3342786a6f21Smrgcase $host_os in
3343786a6f21Smrgaix*)
3344786a6f21Smrg  symcode='[[BCDT]]'
3345786a6f21Smrg  ;;
3346786a6f21Smrgcygwin* | mingw* | pw32* | cegcc*)
3347786a6f21Smrg  symcode='[[ABCDGISTW]]'
3348786a6f21Smrg  ;;
3349786a6f21Smrghpux*)
3350786a6f21Smrg  if test "$host_cpu" = ia64; then
3351786a6f21Smrg    symcode='[[ABCDEGRST]]'
3352786a6f21Smrg  fi
3353786a6f21Smrg  ;;
3354786a6f21Smrgirix* | nonstopux*)
3355786a6f21Smrg  symcode='[[BCDEGRST]]'
3356786a6f21Smrg  ;;
3357786a6f21Smrgosf*)
3358786a6f21Smrg  symcode='[[BCDEGQRST]]'
3359786a6f21Smrg  ;;
3360786a6f21Smrgsolaris*)
3361786a6f21Smrg  symcode='[[BDRT]]'
3362786a6f21Smrg  ;;
3363786a6f21Smrgsco3.2v5*)
3364786a6f21Smrg  symcode='[[DT]]'
3365786a6f21Smrg  ;;
3366786a6f21Smrgsysv4.2uw2*)
3367786a6f21Smrg  symcode='[[DT]]'
3368786a6f21Smrg  ;;
3369786a6f21Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3370786a6f21Smrg  symcode='[[ABDT]]'
3371786a6f21Smrg  ;;
3372786a6f21Smrgsysv4)
3373786a6f21Smrg  symcode='[[DFNSTU]]'
3374786a6f21Smrg  ;;
3375786a6f21Smrgesac
33761d54945dSmrg
3377786a6f21Smrg# If we're using GNU nm, then use its standard symbol codes.
3378786a6f21Smrgcase `$NM -V 2>&1` in
3379786a6f21Smrg*GNU* | *'with BFD'*)
3380786a6f21Smrg  symcode='[[ABCDGIRSTW]]' ;;
3381786a6f21Smrgesac
33821d54945dSmrg
3383786a6f21Smrg# Transform an extracted symbol line into a proper C declaration.
3384786a6f21Smrg# Some systems (esp. on ia64) link data and code symbols differently,
3385786a6f21Smrg# so use this general approach.
3386786a6f21Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
33871d54945dSmrg
3388786a6f21Smrg# Transform an extracted symbol line into symbol name and symbol address
3389786a6f21Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3390786a6f21Smrglt_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'"
33911d54945dSmrg
3392786a6f21Smrg# Handle CRLF in mingw tool chain
3393786a6f21Smrgopt_cr=
3394786a6f21Smrgcase $build_os in
3395786a6f21Smrgmingw*)
3396786a6f21Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3397786a6f21Smrg  ;;
3398786a6f21Smrgesac
33991d54945dSmrg
3400786a6f21Smrg# Try without a prefix underscore, then with it.
3401786a6f21Smrgfor ac_symprfx in "" "_"; do
34021d54945dSmrg
3403786a6f21Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3404786a6f21Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
34051d54945dSmrg
3406786a6f21Smrg  # Write the raw and C identifiers.
3407786a6f21Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3408786a6f21Smrg    # Fake it for dumpbin and say T for any non-static function
3409786a6f21Smrg    # and D for any global variable.
3410786a6f21Smrg    # Also find C++ and __fastcall symbols from MSVC++,
3411786a6f21Smrg    # which start with @ or ?.
3412786a6f21Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3413786a6f21Smrg"     {last_section=section; section=\$ 3};"\
3414786a6f21Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3415786a6f21Smrg"     \$ 0!~/External *\|/{next};"\
3416786a6f21Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3417786a6f21Smrg"     {if(hide[section]) next};"\
3418786a6f21Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3419786a6f21Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3420786a6f21Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3421786a6f21Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3422786a6f21Smrg"     ' prfx=^$ac_symprfx]"
3423786a6f21Smrg  else
3424786a6f21Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
34251d54945dSmrg  fi
34261d54945dSmrg
3427786a6f21Smrg  # Check to see that the pipe works correctly.
3428786a6f21Smrg  pipe_works=no
34291d54945dSmrg
3430786a6f21Smrg  rm -f conftest*
3431786a6f21Smrg  cat > conftest.$ac_ext <<_LT_EOF
3432786a6f21Smrg#ifdef __cplusplus
3433786a6f21Smrgextern "C" {
3434786a6f21Smrg#endif
3435786a6f21Smrgchar nm_test_var;
3436786a6f21Smrgvoid nm_test_func(void);
3437786a6f21Smrgvoid nm_test_func(void){}
3438786a6f21Smrg#ifdef __cplusplus
3439786a6f21Smrg}
3440786a6f21Smrg#endif
3441786a6f21Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
3442786a6f21Smrg_LT_EOF
34431d54945dSmrg
3444786a6f21Smrg  if AC_TRY_EVAL(ac_compile); then
3445786a6f21Smrg    # Now try to grab the symbols.
3446786a6f21Smrg    nlist=conftest.nm
3447786a6f21Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3448786a6f21Smrg      # Try sorting and uniquifying the output.
3449786a6f21Smrg      if sort "$nlist" | uniq > "$nlist"T; then
3450786a6f21Smrg	mv -f "$nlist"T "$nlist"
3451786a6f21Smrg      else
3452786a6f21Smrg	rm -f "$nlist"T
3453786a6f21Smrg      fi
34541d54945dSmrg
3455786a6f21Smrg      # Make sure that we snagged all the symbols we need.
3456786a6f21Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3457786a6f21Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3458786a6f21Smrg	  cat <<_LT_EOF > conftest.$ac_ext
3459786a6f21Smrg#ifdef __cplusplus
3460786a6f21Smrgextern "C" {
3461786a6f21Smrg#endif
34621d54945dSmrg
3463786a6f21Smrg_LT_EOF
3464786a6f21Smrg	  # Now generate the symbol file.
3465786a6f21Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
34661d54945dSmrg
3467786a6f21Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
34681d54945dSmrg
3469786a6f21Smrg/* The mapping between symbol names and symbols.  */
3470786a6f21Smrgconst struct {
3471786a6f21Smrg  const char *name;
3472786a6f21Smrg  void       *address;
3473786a6f21Smrg}
3474786a6f21Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3475786a6f21Smrg{
3476786a6f21Smrg  { "@PROGRAM@", (void *) 0 },
3477786a6f21Smrg_LT_EOF
3478786a6f21Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3479786a6f21Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3480786a6f21Smrg  {0, (void *) 0}
3481786a6f21Smrg};
34821d54945dSmrg
3483786a6f21Smrg/* This works around a problem in FreeBSD linker */
3484786a6f21Smrg#ifdef FREEBSD_WORKAROUND
3485786a6f21Smrgstatic const void *lt_preloaded_setup() {
3486786a6f21Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
3487786a6f21Smrg}
3488786a6f21Smrg#endif
34891d54945dSmrg
3490786a6f21Smrg#ifdef __cplusplus
3491786a6f21Smrg}
3492786a6f21Smrg#endif
3493786a6f21Smrg_LT_EOF
3494786a6f21Smrg	  # Now try linking the two files.
3495786a6f21Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
3496786a6f21Smrg	  lt_save_LIBS="$LIBS"
3497786a6f21Smrg	  lt_save_CFLAGS="$CFLAGS"
3498786a6f21Smrg	  LIBS="conftstm.$ac_objext"
3499786a6f21Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3500786a6f21Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3501786a6f21Smrg	    pipe_works=yes
3502786a6f21Smrg	  fi
3503786a6f21Smrg	  LIBS="$lt_save_LIBS"
3504786a6f21Smrg	  CFLAGS="$lt_save_CFLAGS"
3505786a6f21Smrg	else
3506786a6f21Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3507786a6f21Smrg	fi
3508786a6f21Smrg      else
3509786a6f21Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3510786a6f21Smrg      fi
35111d54945dSmrg    else
3512786a6f21Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
35131d54945dSmrg    fi
35141d54945dSmrg  else
3515786a6f21Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3516786a6f21Smrg    cat conftest.$ac_ext >&5
35171d54945dSmrg  fi
3518786a6f21Smrg  rm -rf conftest* conftst*
35191d54945dSmrg
3520786a6f21Smrg  # Do not use the global_symbol_pipe unless it works.
3521786a6f21Smrg  if test "$pipe_works" = yes; then
3522786a6f21Smrg    break
3523786a6f21Smrg  else
3524786a6f21Smrg    lt_cv_sys_global_symbol_pipe=
3525786a6f21Smrg  fi
3526786a6f21Smrgdone
3527786a6f21Smrg])
3528786a6f21Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3529786a6f21Smrg  lt_cv_sys_global_symbol_to_cdecl=
3530786a6f21Smrgfi
3531786a6f21Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3532786a6f21Smrg  AC_MSG_RESULT(failed)
35331d54945dSmrgelse
3534786a6f21Smrg  AC_MSG_RESULT(ok)
35351d54945dSmrgfi
35361d54945dSmrg
3537786a6f21Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3538786a6f21Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
3539786a6f21Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3540786a6f21Smrg    [Transform the output of nm in a proper C declaration])
3541786a6f21Smrg_LT_DECL([global_symbol_to_c_name_address],
3542786a6f21Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3543786a6f21Smrg    [Transform the output of nm in a C name address pair])
3544786a6f21Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3545786a6f21Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3546786a6f21Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3547786a6f21Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
35481d54945dSmrg
35491d54945dSmrg
3550786a6f21Smrg# _LT_COMPILER_PIC([TAGNAME])
3551786a6f21Smrg# ---------------------------
3552786a6f21Smrgm4_defun([_LT_COMPILER_PIC],
3553786a6f21Smrg[m4_require([_LT_TAG_COMPILER])dnl
3554786a6f21Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3555786a6f21Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3556786a6f21Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
35571d54945dSmrg
3558786a6f21SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3559786a6f21Smrgm4_if([$1], [CXX], [
3560786a6f21Smrg  # C++ specific cases for pic, static, wl, etc.
3561786a6f21Smrg  if test "$GXX" = yes; then
3562786a6f21Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563786a6f21Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
35641d54945dSmrg
3565786a6f21Smrg    case $host_os in
3566786a6f21Smrg    aix*)
3567786a6f21Smrg      # All AIX code is PIC.
35681d54945dSmrg      if test "$host_cpu" = ia64; then
3569786a6f21Smrg	# AIX 5 now supports IA64 processor
3570786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
35711d54945dSmrg      fi
3572786a6f21Smrg      ;;
35731d54945dSmrg
3574786a6f21Smrg    amigaos*)
3575786a6f21Smrg      case $host_cpu in
3576786a6f21Smrg      powerpc)
3577786a6f21Smrg            # see comment about AmigaOS4 .so support
3578786a6f21Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
35791d54945dSmrg        ;;
3580786a6f21Smrg      m68k)
3581786a6f21Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
3582786a6f21Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
3583786a6f21Smrg            # like `-m68040'.
3584786a6f21Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3585786a6f21Smrg        ;;
3586786a6f21Smrg      esac
3587786a6f21Smrg      ;;
35881d54945dSmrg
3589786a6f21Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3590786a6f21Smrg      # PIC is the default for these OSes.
3591786a6f21Smrg      ;;
3592786a6f21Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3593786a6f21Smrg      # This hack is so that the source file can tell whether it is being
3594786a6f21Smrg      # built for inclusion in a dll (and should export symbols for example).
3595786a6f21Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3596786a6f21Smrg      # (--disable-auto-import) libraries
3597786a6f21Smrg      m4_if([$1], [GCJ], [],
3598786a6f21Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3599786a6f21Smrg      ;;
3600786a6f21Smrg    darwin* | rhapsody*)
3601786a6f21Smrg      # PIC is the default on this platform
3602786a6f21Smrg      # Common symbols not allowed in MH_DYLIB files
3603786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3604786a6f21Smrg      ;;
3605786a6f21Smrg    *djgpp*)
3606786a6f21Smrg      # DJGPP does not support shared libraries at all
3607786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3608786a6f21Smrg      ;;
3609786a6f21Smrg    interix[[3-9]]*)
3610786a6f21Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3611786a6f21Smrg      # Instead, we relocate shared libraries at runtime.
3612786a6f21Smrg      ;;
3613786a6f21Smrg    sysv4*MP*)
3614786a6f21Smrg      if test -d /usr/nec; then
3615786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3616786a6f21Smrg      fi
3617786a6f21Smrg      ;;
3618786a6f21Smrg    hpux*)
3619786a6f21Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3620786a6f21Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3621786a6f21Smrg      # sets the default TLS model and affects inlining.
3622786a6f21Smrg      case $host_cpu in
3623786a6f21Smrg      hppa*64*)
36241d54945dSmrg	;;
36251d54945dSmrg      *)
3626786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
36271d54945dSmrg	;;
3628786a6f21Smrg      esac
36291d54945dSmrg      ;;
3630786a6f21Smrg    *qnx* | *nto*)
3631786a6f21Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3632786a6f21Smrg      # it will coredump.
3633786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
36341d54945dSmrg      ;;
36351d54945dSmrg    *)
3636786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
36371d54945dSmrg      ;;
36381d54945dSmrg    esac
3639786a6f21Smrg  else
3640786a6f21Smrg    case $host_os in
3641786a6f21Smrg      aix[[4-9]]*)
3642786a6f21Smrg	# All AIX code is PIC.
3643786a6f21Smrg	if test "$host_cpu" = ia64; then
3644786a6f21Smrg	  # AIX 5 now supports IA64 processor
3645786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3646786a6f21Smrg	else
3647786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3648786a6f21Smrg	fi
36491d54945dSmrg	;;
3650786a6f21Smrg      chorus*)
3651786a6f21Smrg	case $cc_basename in
3652786a6f21Smrg	cxch68*)
3653786a6f21Smrg	  # Green Hills C++ Compiler
3654786a6f21Smrg	  # _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"
36551d54945dSmrg	  ;;
36561d54945dSmrg	esac
36571d54945dSmrg	;;
3658786a6f21Smrg      dgux*)
3659786a6f21Smrg	case $cc_basename in
3660786a6f21Smrg	  ec++*)
3661786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3662786a6f21Smrg	    ;;
3663786a6f21Smrg	  ghcx*)
3664786a6f21Smrg	    # Green Hills C++ Compiler
3665786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3666786a6f21Smrg	    ;;
3667786a6f21Smrg	  *)
3668786a6f21Smrg	    ;;
3669786a6f21Smrg	esac
3670786a6f21Smrg	;;
3671786a6f21Smrg      freebsd* | dragonfly*)
3672786a6f21Smrg	# FreeBSD uses GNU C++
3673786a6f21Smrg	;;
3674786a6f21Smrg      hpux9* | hpux10* | hpux11*)
3675786a6f21Smrg	case $cc_basename in
3676786a6f21Smrg	  CC*)
3677786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3679786a6f21Smrg	    if test "$host_cpu" != ia64; then
3680786a6f21Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3681786a6f21Smrg	    fi
3682786a6f21Smrg	    ;;
3683786a6f21Smrg	  aCC*)
3684786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3685786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
36861d54945dSmrg	    case $host_cpu in
3687786a6f21Smrg	    hppa*64*|ia64*)
3688786a6f21Smrg	      # +Z the default
36891d54945dSmrg	      ;;
36901d54945dSmrg	    *)
3691786a6f21Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
36921d54945dSmrg	      ;;
36931d54945dSmrg	    esac
3694786a6f21Smrg	    ;;
3695786a6f21Smrg	  *)
3696786a6f21Smrg	    ;;
36971d54945dSmrg	esac
36981d54945dSmrg	;;
3699786a6f21Smrg      interix*)
3700786a6f21Smrg	# This is c89, which is MS Visual C++ (no shared libs)
3701786a6f21Smrg	# Anyone wants to do a port?
37021d54945dSmrg	;;
3703786a6f21Smrg      irix5* | irix6* | nonstopux*)
3704786a6f21Smrg	case $cc_basename in
3705786a6f21Smrg	  CC*)
3706786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3708786a6f21Smrg	    # CC pic flag -KPIC is the default.
3709786a6f21Smrg	    ;;
3710786a6f21Smrg	  *)
3711786a6f21Smrg	    ;;
3712ba85709eSmrg	esac
3713ba85709eSmrg	;;
3714786a6f21Smrg      linux* | k*bsd*-gnu)
3715786a6f21Smrg	case $cc_basename in
3716786a6f21Smrg	  KCC*)
3717786a6f21Smrg	    # KAI C++ Compiler
3718786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3719786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3720786a6f21Smrg	    ;;
3721786a6f21Smrg	  ecpc* )
3722786a6f21Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3723786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3724786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3725786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3726786a6f21Smrg	    ;;
3727786a6f21Smrg	  icpc* )
3728786a6f21Smrg	    # Intel C++, used to be incompatible with GCC.
3729786a6f21Smrg	    # ICC 10 doesn't accept -KPIC any more.
3730786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3732786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3733786a6f21Smrg	    ;;
3734786a6f21Smrg	  pgCC* | pgcpp*)
3735786a6f21Smrg	    # Portland Group C++ compiler
3736786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3737786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3738786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739786a6f21Smrg	    ;;
3740786a6f21Smrg	  cxx*)
3741786a6f21Smrg	    # Compaq C++
3742786a6f21Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3743786a6f21Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3744786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3745786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3746786a6f21Smrg	    ;;
3747786a6f21Smrg	  xlc* | xlC*)
3748786a6f21Smrg	    # IBM XL 8.0 on PPC
3749786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3750786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3751786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3752786a6f21Smrg	    ;;
3753786a6f21Smrg	  *)
3754786a6f21Smrg	    case `$CC -V 2>&1 | sed 5q` in
3755786a6f21Smrg	    *Sun\ C*)
3756786a6f21Smrg	      # Sun C++ 5.9
3757786a6f21Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3758786a6f21Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759786a6f21Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3760786a6f21Smrg	      ;;
3761786a6f21Smrg	    esac
3762786a6f21Smrg	    ;;
3763786a6f21Smrg	esac
37641d54945dSmrg	;;
3765786a6f21Smrg      lynxos*)
37661d54945dSmrg	;;
3767786a6f21Smrg      m88k*)
37681d54945dSmrg	;;
3769786a6f21Smrg      mvs*)
3770786a6f21Smrg	case $cc_basename in
3771786a6f21Smrg	  cxx*)
3772786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3773786a6f21Smrg	    ;;
3774786a6f21Smrg	  *)
3775786a6f21Smrg	    ;;
3776786a6f21Smrg	esac
37771d54945dSmrg	;;
3778786a6f21Smrg      netbsd*)
37791d54945dSmrg	;;
3780786a6f21Smrg      *qnx* | *nto*)
3781786a6f21Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3782786a6f21Smrg        # it will coredump.
3783786a6f21Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3784786a6f21Smrg        ;;
3785786a6f21Smrg      osf3* | osf4* | osf5*)
3786786a6f21Smrg	case $cc_basename in
3787786a6f21Smrg	  KCC*)
3788786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3789786a6f21Smrg	    ;;
3790786a6f21Smrg	  RCC*)
3791786a6f21Smrg	    # Rational C++ 2.4.1
3792786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3793786a6f21Smrg	    ;;
3794786a6f21Smrg	  cxx*)
3795786a6f21Smrg	    # Digital/Compaq C++
3796786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3797786a6f21Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3798786a6f21Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3799786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3800786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3801786a6f21Smrg	    ;;
3802786a6f21Smrg	  *)
3803786a6f21Smrg	    ;;
3804786a6f21Smrg	esac
38051d54945dSmrg	;;
3806786a6f21Smrg      psos*)
38071d54945dSmrg	;;
3808786a6f21Smrg      solaris*)
3809786a6f21Smrg	case $cc_basename in
3810786a6f21Smrg	  CC*)
3811786a6f21Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
3812786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3813786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3814786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3815786a6f21Smrg	    ;;
3816786a6f21Smrg	  gcx*)
3817786a6f21Smrg	    # Green Hills C++ Compiler
3818786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3819786a6f21Smrg	    ;;
38201d54945dSmrg	  *)
38211d54945dSmrg	    ;;
38221d54945dSmrg	esac
38231d54945dSmrg	;;
3824786a6f21Smrg      sunos4*)
3825786a6f21Smrg	case $cc_basename in
3826786a6f21Smrg	  CC*)
3827786a6f21Smrg	    # Sun C++ 4.x
3828786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3829786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3830786a6f21Smrg	    ;;
3831786a6f21Smrg	  lcc*)
3832786a6f21Smrg	    # Lucid
3833786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3834786a6f21Smrg	    ;;
3835ba85709eSmrg	  *)
3836ba85709eSmrg	    ;;
3837786a6f21Smrg	esac
38381d54945dSmrg	;;
3839786a6f21Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3840786a6f21Smrg	case $cc_basename in
3841786a6f21Smrg	  CC*)
3842786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3843786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3844786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3845786a6f21Smrg	    ;;
3846786a6f21Smrg	esac
38471d54945dSmrg	;;
3848786a6f21Smrg      tandem*)
3849786a6f21Smrg	case $cc_basename in
3850786a6f21Smrg	  NCC*)
3851786a6f21Smrg	    # NonStop-UX NCC 3.20
3852786a6f21Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853786a6f21Smrg	    ;;
3854786a6f21Smrg	  *)
3855786a6f21Smrg	    ;;
3856786a6f21Smrg	esac
38571d54945dSmrg	;;
3858786a6f21Smrg      vxworks*)
38591d54945dSmrg	;;
38601d54945dSmrg      *)
3861786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
38621d54945dSmrg	;;
38631d54945dSmrg    esac
3864786a6f21Smrg  fi
3865786a6f21Smrg],
3866786a6f21Smrg[
3867786a6f21Smrg  if test "$GCC" = yes; then
3868786a6f21Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3869786a6f21Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
38701d54945dSmrg
3871786a6f21Smrg    case $host_os in
3872786a6f21Smrg      aix*)
3873786a6f21Smrg      # All AIX code is PIC.
3874786a6f21Smrg      if test "$host_cpu" = ia64; then
3875786a6f21Smrg	# AIX 5 now supports IA64 processor
3876786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3877786a6f21Smrg      fi
3878786a6f21Smrg      ;;
38791d54945dSmrg
3880786a6f21Smrg    amigaos*)
3881786a6f21Smrg      case $host_cpu in
3882786a6f21Smrg      powerpc)
3883786a6f21Smrg            # see comment about AmigaOS4 .so support
3884786a6f21Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3885786a6f21Smrg        ;;
3886786a6f21Smrg      m68k)
3887786a6f21Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
3888786a6f21Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
3889786a6f21Smrg            # like `-m68040'.
3890786a6f21Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3891786a6f21Smrg        ;;
3892786a6f21Smrg      esac
3893786a6f21Smrg      ;;
38941d54945dSmrg
3895786a6f21Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3896786a6f21Smrg      # PIC is the default for these OSes.
3897786a6f21Smrg      ;;
38981d54945dSmrg
3899786a6f21Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3900786a6f21Smrg      # This hack is so that the source file can tell whether it is being
3901786a6f21Smrg      # built for inclusion in a dll (and should export symbols for example).
3902786a6f21Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3903786a6f21Smrg      # (--disable-auto-import) libraries
3904786a6f21Smrg      m4_if([$1], [GCJ], [],
3905786a6f21Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3906786a6f21Smrg      ;;
39071d54945dSmrg
3908786a6f21Smrg    darwin* | rhapsody*)
3909786a6f21Smrg      # PIC is the default on this platform
3910786a6f21Smrg      # Common symbols not allowed in MH_DYLIB files
3911786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3912786a6f21Smrg      ;;
39131d54945dSmrg
3914786a6f21Smrg    hpux*)
3915786a6f21Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3916786a6f21Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3917786a6f21Smrg      # sets the default TLS model and affects inlining.
3918786a6f21Smrg      case $host_cpu in
3919786a6f21Smrg      hppa*64*)
3920786a6f21Smrg	# +Z the default
3921786a6f21Smrg	;;
3922786a6f21Smrg      *)
3923786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3924786a6f21Smrg	;;
3925786a6f21Smrg      esac
3926786a6f21Smrg      ;;
39271d54945dSmrg
3928786a6f21Smrg    interix[[3-9]]*)
3929786a6f21Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3930786a6f21Smrg      # Instead, we relocate shared libraries at runtime.
3931786a6f21Smrg      ;;
39321d54945dSmrg
3933786a6f21Smrg    msdosdjgpp*)
3934786a6f21Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3935786a6f21Smrg      # on systems that don't support them.
3936786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3937786a6f21Smrg      enable_shared=no
3938786a6f21Smrg      ;;
39391d54945dSmrg
3940786a6f21Smrg    *nto* | *qnx*)
3941786a6f21Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3942786a6f21Smrg      # it will coredump.
3943786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3944786a6f21Smrg      ;;
39451d54945dSmrg
3946786a6f21Smrg    sysv4*MP*)
3947786a6f21Smrg      if test -d /usr/nec; then
3948786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3949786a6f21Smrg      fi
3950786a6f21Smrg      ;;
39511d54945dSmrg
3952786a6f21Smrg    *)
3953786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3954786a6f21Smrg      ;;
39551d54945dSmrg    esac
3956786a6f21Smrg  else
3957786a6f21Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
3958786a6f21Smrg    case $host_os in
3959786a6f21Smrg    aix*)
3960786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3961786a6f21Smrg      if test "$host_cpu" = ia64; then
3962786a6f21Smrg	# AIX 5 now supports IA64 processor
3963786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3964786a6f21Smrg      else
3965786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3966786a6f21Smrg      fi
3967786a6f21Smrg      ;;
39681d54945dSmrg
3969786a6f21Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3970786a6f21Smrg      # This hack is so that the source file can tell whether it is being
3971786a6f21Smrg      # built for inclusion in a dll (and should export symbols for example).
3972786a6f21Smrg      m4_if([$1], [GCJ], [],
3973786a6f21Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3974786a6f21Smrg      ;;
39751d54945dSmrg
3976786a6f21Smrg    hpux9* | hpux10* | hpux11*)
3977786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3978786a6f21Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3979786a6f21Smrg      # not for PA HP-UX.
3980786a6f21Smrg      case $host_cpu in
3981786a6f21Smrg      hppa*64*|ia64*)
3982786a6f21Smrg	# +Z the default
3983786a6f21Smrg	;;
3984786a6f21Smrg      *)
3985786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3986786a6f21Smrg	;;
3987786a6f21Smrg      esac
3988786a6f21Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3989786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3990786a6f21Smrg      ;;
39911d54945dSmrg
3992786a6f21Smrg    irix5* | irix6* | nonstopux*)
3993786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3994786a6f21Smrg      # PIC (with -KPIC) is the default.
3995786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3996786a6f21Smrg      ;;
3997ba85709eSmrg
3998786a6f21Smrg    linux* | k*bsd*-gnu)
3999786a6f21Smrg      case $cc_basename in
4000786a6f21Smrg      # old Intel for x86_64 which still supported -KPIC.
4001786a6f21Smrg      ecc*)
4002786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4004786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4005786a6f21Smrg        ;;
4006786a6f21Smrg      # icc used to be incompatible with GCC.
4007786a6f21Smrg      # ICC 10 doesn't accept -KPIC any more.
4008786a6f21Smrg      icc* | ifort*)
4009786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4011786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4012786a6f21Smrg        ;;
4013786a6f21Smrg      # Lahey Fortran 8.1.
4014786a6f21Smrg      lf95*)
4015786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4016786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4017786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4018786a6f21Smrg	;;
4019786a6f21Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
4020786a6f21Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4021786a6f21Smrg	# which looks to be a dead project)
4022786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4023786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4024786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4025786a6f21Smrg        ;;
4026786a6f21Smrg      ccc*)
4027786a6f21Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028786a6f21Smrg        # All Alpha code is PIC.
4029786a6f21Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4030786a6f21Smrg        ;;
4031786a6f21Smrg      xl*)
4032786a6f21Smrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4033786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4034786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4035786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4036786a6f21Smrg	;;
4037786a6f21Smrg      *)
4038786a6f21Smrg	case `$CC -V 2>&1 | sed 5q` in
4039786a6f21Smrg	*Sun\ C*)
4040786a6f21Smrg	  # Sun C 5.9
4041786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044786a6f21Smrg	  ;;
4045786a6f21Smrg	*Sun\ F*)
4046786a6f21Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4047786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4048786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4049786a6f21Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4050786a6f21Smrg	  ;;
4051786a6f21Smrg	esac
4052786a6f21Smrg	;;
4053786a6f21Smrg      esac
4054786a6f21Smrg      ;;
40551d54945dSmrg
4056786a6f21Smrg    newsos6)
4057786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4058786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059ba85709eSmrg      ;;
4060ba85709eSmrg
4061786a6f21Smrg    *nto* | *qnx*)
4062786a6f21Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4063786a6f21Smrg      # it will coredump.
4064786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4065ba85709eSmrg      ;;
4066ba85709eSmrg
4067786a6f21Smrg    osf3* | osf4* | osf5*)
4068786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4069786a6f21Smrg      # All OSF/1 code is PIC.
4070786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4071786a6f21Smrg      ;;
40721d54945dSmrg
4073786a6f21Smrg    rdos*)
4074786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4075786a6f21Smrg      ;;
40761d54945dSmrg
4077786a6f21Smrg    solaris*)
4078786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4079786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4080786a6f21Smrg      case $cc_basename in
4081786a6f21Smrg      f77* | f90* | f95*)
4082786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4083786a6f21Smrg      *)
4084786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4085786a6f21Smrg      esac
4086786a6f21Smrg      ;;
40871d54945dSmrg
4088786a6f21Smrg    sunos4*)
4089786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4091786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092786a6f21Smrg      ;;
40931d54945dSmrg
4094786a6f21Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4095786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4096786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4097786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098786a6f21Smrg      ;;
40991d54945dSmrg
4100786a6f21Smrg    sysv4*MP*)
4101786a6f21Smrg      if test -d /usr/nec ;then
4102786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4103786a6f21Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4104786a6f21Smrg      fi
4105786a6f21Smrg      ;;
41061d54945dSmrg
4107786a6f21Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4108786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4110786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4111786a6f21Smrg      ;;
41121d54945dSmrg
4113786a6f21Smrg    unicos*)
4114786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4116786a6f21Smrg      ;;
41171d54945dSmrg
4118786a6f21Smrg    uts4*)
4119786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4120786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4121786a6f21Smrg      ;;
41221d54945dSmrg
4123786a6f21Smrg    *)
4124786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4125786a6f21Smrg      ;;
4126786a6f21Smrg    esac
41271d54945dSmrg  fi
4128786a6f21Smrg])
4129786a6f21Smrgcase $host_os in
4130786a6f21Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
4131786a6f21Smrg  *djgpp*)
4132786a6f21Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4133786a6f21Smrg    ;;
4134786a6f21Smrg  *)
4135786a6f21Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4136786a6f21Smrg    ;;
41371d54945dSmrgesac
4138786a6f21SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4139786a6f21Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4140786a6f21Smrg	[How to pass a linker flag through the compiler])
41411d54945dSmrg
4142786a6f21Smrg#
4143786a6f21Smrg# Check to make sure the PIC flag actually works.
4144786a6f21Smrg#
4145786a6f21Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4146786a6f21Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4147786a6f21Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4148786a6f21Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4149786a6f21Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4150786a6f21Smrg     "" | " "*) ;;
4151786a6f21Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4152786a6f21Smrg     esac],
4153786a6f21Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4154786a6f21Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4155786a6f21Smrgfi
4156786a6f21Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4157786a6f21Smrg	[Additional compiler flags for building library objects])
41581d54945dSmrg
4159786a6f21Smrg#
4160786a6f21Smrg# Check to make sure the static flag actually works.
4161786a6f21Smrg#
4162786a6f21Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4163786a6f21Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4164786a6f21Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4165786a6f21Smrg  $lt_tmp_static_flag,
4166786a6f21Smrg  [],
4167786a6f21Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4168786a6f21Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4169786a6f21Smrg	[Compiler flag to prevent dynamic linking])
4170786a6f21Smrg])# _LT_COMPILER_PIC
41711d54945dSmrg
41721d54945dSmrg
4173786a6f21Smrg# _LT_LINKER_SHLIBS([TAGNAME])
4174786a6f21Smrg# ----------------------------
4175786a6f21Smrg# See if the linker supports building shared libraries.
4176786a6f21Smrgm4_defun([_LT_LINKER_SHLIBS],
4177786a6f21Smrg[AC_REQUIRE([LT_PATH_LD])dnl
4178786a6f21SmrgAC_REQUIRE([LT_PATH_NM])dnl
4179786a6f21Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4180786a6f21Smrgm4_require([_LT_DECL_EGREP])dnl
4181786a6f21Smrgm4_require([_LT_DECL_SED])dnl
4182786a6f21Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4183786a6f21Smrgm4_require([_LT_TAG_COMPILER])dnl
4184786a6f21SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4185786a6f21Smrgm4_if([$1], [CXX], [
4186786a6f21Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4187786a6f21Smrg  case $host_os in
4188786a6f21Smrg  aix[[4-9]]*)
4189786a6f21Smrg    # If we're using GNU nm, then we don't want the "-C" option.
4190786a6f21Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4191786a6f21Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4192786a6f21Smrg      _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'
4193786a6f21Smrg    else
4194786a6f21Smrg      _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'
4195786a6f21Smrg    fi
4196786a6f21Smrg    ;;
4197786a6f21Smrg  pw32*)
4198786a6f21Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4199786a6f21Smrg  ;;
4200786a6f21Smrg  cygwin* | mingw* | cegcc*)
4201786a6f21Smrg    _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'
4202786a6f21Smrg  ;;
4203786a6f21Smrg  *)
4204786a6f21Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4205786a6f21Smrg  ;;
4206786a6f21Smrg  esac
4207786a6f21Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4208786a6f21Smrg], [
4209786a6f21Smrg  runpath_var=
4210786a6f21Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4211786a6f21Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
4212786a6f21Smrg  _LT_TAGVAR(archive_cmds, $1)=
4213786a6f21Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4214786a6f21Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4215786a6f21Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4216786a6f21Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4217786a6f21Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4218786a6f21Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4219786a6f21Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
4220786a6f21Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4221786a6f21Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4222786a6f21Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4223786a6f21Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4224786a6f21Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4225786a6f21Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4226786a6f21Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
4227786a6f21Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4228786a6f21Smrg  _LT_TAGVAR(module_cmds, $1)=
4229786a6f21Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4230786a6f21Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4231786a6f21Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4232786a6f21Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4233786a6f21Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4234786a6f21Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
4235786a6f21Smrg  # included in the symbol list
4236786a6f21Smrg  _LT_TAGVAR(include_expsyms, $1)=
4237786a6f21Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4238786a6f21Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4239786a6f21Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4240786a6f21Smrg  # as well as any symbol that contains `d'.
4241786a6f21Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4242786a6f21Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4243786a6f21Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4244786a6f21Smrg  # the symbol is explicitly referenced.  Since portable code cannot
4245786a6f21Smrg  # rely on this symbol name, it's probably fine to never include it in
4246786a6f21Smrg  # preloaded symbol tables.
4247786a6f21Smrg  # Exclude shared library initialization/finalization symbols.
4248786a6f21Smrgdnl Note also adjust exclude_expsyms for C++ above.
4249786a6f21Smrg  extract_expsyms_cmds=
42501d54945dSmrg
4251786a6f21Smrg  case $host_os in
4252786a6f21Smrg  cygwin* | mingw* | pw32* | cegcc*)
4253786a6f21Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4254786a6f21Smrg    # When not using gcc, we currently assume that we are using
4255786a6f21Smrg    # Microsoft Visual C++.
4256786a6f21Smrg    if test "$GCC" != yes; then
4257786a6f21Smrg      with_gnu_ld=no
4258786a6f21Smrg    fi
4259786a6f21Smrg    ;;
4260786a6f21Smrg  interix*)
4261786a6f21Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4262786a6f21Smrg    with_gnu_ld=yes
4263786a6f21Smrg    ;;
4264786a6f21Smrg  openbsd*)
4265786a6f21Smrg    with_gnu_ld=no
4266786a6f21Smrg    ;;
4267786a6f21Smrg  esac
42681d54945dSmrg
4269786a6f21Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4270786a6f21Smrg  if test "$with_gnu_ld" = yes; then
4271786a6f21Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4272786a6f21Smrg    wlarc='${wl}'
42731d54945dSmrg
4274786a6f21Smrg    # Set some defaults for GNU ld with shared library support. These
4275786a6f21Smrg    # are reset later if shared libraries are not supported. Putting them
4276786a6f21Smrg    # here allows them to be overridden if necessary.
4277786a6f21Smrg    runpath_var=LD_RUN_PATH
4278786a6f21Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279786a6f21Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280786a6f21Smrg    # ancient GNU ld didn't support --whole-archive et. al.
4281786a6f21Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282786a6f21Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283786a6f21Smrg    else
4284786a6f21Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285786a6f21Smrg    fi
4286786a6f21Smrg    supports_anon_versioning=no
4287786a6f21Smrg    case `$LD -v 2>&1` in
4288786a6f21Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4289786a6f21Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4290786a6f21Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4291786a6f21Smrg      *\ 2.11.*) ;; # other 2.11 versions
4292786a6f21Smrg      *) supports_anon_versioning=yes ;;
4293786a6f21Smrg    esac
42941d54945dSmrg
4295786a6f21Smrg    # See if GNU ld supports shared libraries.
4296786a6f21Smrg    case $host_os in
4297786a6f21Smrg    aix[[3-9]]*)
4298786a6f21Smrg      # On AIX/PPC, the GNU linker is very broken
4299786a6f21Smrg      if test "$host_cpu" != ia64; then
4300786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4301786a6f21Smrg	cat <<_LT_EOF 1>&2
43021d54945dSmrg
4303786a6f21Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4304786a6f21Smrg*** to be unable to reliably create shared libraries on AIX.
4305786a6f21Smrg*** Therefore, libtool is disabling shared libraries support.  If you
4306786a6f21Smrg*** really care for shared libraries, you may want to modify your PATH
4307786a6f21Smrg*** so that a non-GNU linker is found, and then restart.
43081d54945dSmrg
4309786a6f21Smrg_LT_EOF
4310786a6f21Smrg      fi
4311786a6f21Smrg      ;;
43121d54945dSmrg
4313786a6f21Smrg    amigaos*)
4314786a6f21Smrg      case $host_cpu in
4315786a6f21Smrg      powerpc)
4316786a6f21Smrg            # see comment about AmigaOS4 .so support
4317786a6f21Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4318786a6f21Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4319786a6f21Smrg        ;;
4320786a6f21Smrg      m68k)
4321786a6f21Smrg            _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)'
4322786a6f21Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4323786a6f21Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4324786a6f21Smrg        ;;
4325786a6f21Smrg      esac
4326786a6f21Smrg      ;;
43271d54945dSmrg
4328786a6f21Smrg    beos*)
4329786a6f21Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4330786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4331786a6f21Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4332786a6f21Smrg	# support --undefined.  This deserves some investigation.  FIXME
4333786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4334786a6f21Smrg      else
4335786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4336786a6f21Smrg      fi
4337786a6f21Smrg      ;;
43381d54945dSmrg
4339786a6f21Smrg    cygwin* | mingw* | pw32* | cegcc*)
4340786a6f21Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4341786a6f21Smrg      # as there is no search path for DLLs.
4342786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4343786a6f21Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4344786a6f21Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
4345786a6f21Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4346786a6f21Smrg      _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'
4347786a6f21Smrg
4348786a6f21Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4349786a6f21Smrg        _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'
4350786a6f21Smrg	# If the export-symbols file already is a .def file (1st line
4351786a6f21Smrg	# is EXPORTS), use it as is; otherwise, prepend...
4352786a6f21Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4353786a6f21Smrg	  cp $export_symbols $output_objdir/$soname.def;
4354786a6f21Smrg	else
4355786a6f21Smrg	  echo EXPORTS > $output_objdir/$soname.def;
4356786a6f21Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
4357786a6f21Smrg	fi~
4358786a6f21Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4359786a6f21Smrg      else
4360786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4361786a6f21Smrg      fi
4362786a6f21Smrg      ;;
43631d54945dSmrg
4364786a6f21Smrg    interix[[3-9]]*)
4365786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
4366786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4367786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4368786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369786a6f21Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4370786a6f21Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4371786a6f21Smrg      # default) and relocated if they conflict, which is a slow very memory
4372786a6f21Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4373786a6f21Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4374786a6f21Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4375786a6f21Smrg      _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'
4376786a6f21Smrg      _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'
4377786a6f21Smrg      ;;
43781d54945dSmrg
4379786a6f21Smrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4380786a6f21Smrg      tmp_diet=no
4381786a6f21Smrg      if test "$host_os" = linux-dietlibc; then
4382786a6f21Smrg	case $cc_basename in
4383786a6f21Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4384786a6f21Smrg	esac
4385786a6f21Smrg      fi
4386786a6f21Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4387786a6f21Smrg	 && test "$tmp_diet" = no
4388786a6f21Smrg      then
4389786a6f21Smrg	tmp_addflag=
4390786a6f21Smrg	tmp_sharedflag='-shared'
4391786a6f21Smrg	case $cc_basename,$host_cpu in
4392786a6f21Smrg        pgcc*)				# Portland Group C compiler
4393786a6f21Smrg	  _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'
4394786a6f21Smrg	  tmp_addflag=' $pic_flag'
4395786a6f21Smrg	  ;;
4396786a6f21Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4397786a6f21Smrg	  _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'
4398786a6f21Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4399786a6f21Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4400786a6f21Smrg	  tmp_addflag=' -i_dynamic' ;;
4401786a6f21Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4402786a6f21Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4403786a6f21Smrg	ifc* | ifort*)			# Intel Fortran compiler
4404786a6f21Smrg	  tmp_addflag=' -nofor_main' ;;
4405786a6f21Smrg	lf95*)				# Lahey Fortran 8.1
4406786a6f21Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4407786a6f21Smrg	  tmp_sharedflag='--shared' ;;
4408786a6f21Smrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4409786a6f21Smrg	  tmp_sharedflag='-qmkshrobj'
4410786a6f21Smrg	  tmp_addflag= ;;
4411786a6f21Smrg	esac
4412786a6f21Smrg	case `$CC -V 2>&1 | sed 5q` in
4413786a6f21Smrg	*Sun\ C*)			# Sun C 5.9
4414786a6f21Smrg	  _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'
4415786a6f21Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4416786a6f21Smrg	  tmp_sharedflag='-G' ;;
4417786a6f21Smrg	*Sun\ F*)			# Sun Fortran 8.3
4418786a6f21Smrg	  tmp_sharedflag='-G' ;;
4419786a6f21Smrg	esac
4420786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44211d54945dSmrg
4422786a6f21Smrg        if test "x$supports_anon_versioning" = xyes; then
4423786a6f21Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4424786a6f21Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4425786a6f21Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4426786a6f21Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4427786a6f21Smrg        fi
44281d54945dSmrg
4429786a6f21Smrg	case $cc_basename in
4430786a6f21Smrg	xlf*)
4431786a6f21Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4432786a6f21Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4433786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4434786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4435786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4436786a6f21Smrg	  if test "x$supports_anon_versioning" = xyes; then
4437786a6f21Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4438786a6f21Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4439786a6f21Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4440786a6f21Smrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4441786a6f21Smrg	  fi
4442786a6f21Smrg	  ;;
4443786a6f21Smrg	esac
4444786a6f21Smrg      else
4445786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
4446786a6f21Smrg      fi
4447786a6f21Smrg      ;;
44481d54945dSmrg
4449786a6f21Smrg    netbsd*)
4450786a6f21Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4451786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4452786a6f21Smrg	wlarc=
4453786a6f21Smrg      else
4454786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455786a6f21Smrg	_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'
4456786a6f21Smrg      fi
4457786a6f21Smrg      ;;
44581d54945dSmrg
4459786a6f21Smrg    solaris*)
4460786a6f21Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4461786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4462786a6f21Smrg	cat <<_LT_EOF 1>&2
44631d54945dSmrg
4464786a6f21Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4465786a6f21Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
4466786a6f21Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4467786a6f21Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4468786a6f21Smrg*** your PATH or compiler configuration so that the native linker is
4469786a6f21Smrg*** used, and then restart.
44701d54945dSmrg
4471786a6f21Smrg_LT_EOF
4472786a6f21Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4473786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474786a6f21Smrg	_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'
4475786a6f21Smrg      else
4476786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4477786a6f21Smrg      fi
4478786a6f21Smrg      ;;
44791d54945dSmrg
4480786a6f21Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4481786a6f21Smrg      case `$LD -v 2>&1` in
4482786a6f21Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4483786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4484786a6f21Smrg	cat <<_LT_EOF 1>&2
44851d54945dSmrg
4486786a6f21Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4487786a6f21Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4488786a6f21Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4489786a6f21Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4490786a6f21Smrg*** your PATH or compiler configuration so that the native linker is
4491786a6f21Smrg*** used, and then restart.
44921d54945dSmrg
4493786a6f21Smrg_LT_EOF
4494786a6f21Smrg	;;
4495786a6f21Smrg	*)
4496786a6f21Smrg	  # For security reasons, it is highly recommended that you always
4497786a6f21Smrg	  # use absolute paths for naming shared libraries, and exclude the
4498786a6f21Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4499786a6f21Smrg	  # requires that you compile everything twice, which is a pain.
4500786a6f21Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4502786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4503786a6f21Smrg	    _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'
4504786a6f21Smrg	  else
4505786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4506786a6f21Smrg	  fi
4507786a6f21Smrg	;;
4508786a6f21Smrg      esac
4509786a6f21Smrg      ;;
45101d54945dSmrg
4511786a6f21Smrg    sunos4*)
4512786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4513786a6f21Smrg      wlarc=
4514786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4515786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
45161d54945dSmrg      ;;
4517786a6f21Smrg
45181d54945dSmrg    *)
4519786a6f21Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4520786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521786a6f21Smrg	_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'
4522786a6f21Smrg      else
4523786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4524786a6f21Smrg      fi
45251d54945dSmrg      ;;
45261d54945dSmrg    esac
45271d54945dSmrg
4528786a6f21Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4529786a6f21Smrg      runpath_var=
4530786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4531786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4532786a6f21Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4533786a6f21Smrg    fi
4534786a6f21Smrg  else
4535786a6f21Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
4536786a6f21Smrg    case $host_os in
4537786a6f21Smrg    aix3*)
4538786a6f21Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4539786a6f21Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4540786a6f21Smrg      _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'
4541786a6f21Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
4542786a6f21Smrg      # are no directories specified by -L.
4543786a6f21Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4544786a6f21Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4545786a6f21Smrg	# Neither direct hardcoding nor static linking is supported with a
4546786a6f21Smrg	# broken collect2.
4547786a6f21Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4548786a6f21Smrg      fi
4549786a6f21Smrg      ;;
45501d54945dSmrg
4551786a6f21Smrg    aix[[4-9]]*)
4552786a6f21Smrg      if test "$host_cpu" = ia64; then
4553786a6f21Smrg	# On IA64, the linker does run time linking by default, so we don't
4554786a6f21Smrg	# have to do anything special.
4555786a6f21Smrg	aix_use_runtimelinking=no
4556786a6f21Smrg	exp_sym_flag='-Bexport'
4557786a6f21Smrg	no_entry_flag=""
4558786a6f21Smrg      else
4559786a6f21Smrg	# If we're using GNU nm, then we don't want the "-C" option.
4560786a6f21Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4561786a6f21Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562786a6f21Smrg	  _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'
4563786a6f21Smrg	else
4564786a6f21Smrg	  _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'
4565786a6f21Smrg	fi
4566786a6f21Smrg	aix_use_runtimelinking=no
45671d54945dSmrg
4568786a6f21Smrg	# Test if we are trying to use run time linking or normal
4569786a6f21Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4570786a6f21Smrg	# need to do runtime linking.
4571786a6f21Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4572786a6f21Smrg	  for ld_flag in $LDFLAGS; do
4573786a6f21Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4574786a6f21Smrg	    aix_use_runtimelinking=yes
4575786a6f21Smrg	    break
4576786a6f21Smrg	  fi
4577786a6f21Smrg	  done
4578786a6f21Smrg	  ;;
4579786a6f21Smrg	esac
45801d54945dSmrg
4581786a6f21Smrg	exp_sym_flag='-bexport'
4582786a6f21Smrg	no_entry_flag='-bnoentry'
4583786a6f21Smrg      fi
45841d54945dSmrg
4585786a6f21Smrg      # When large executables or shared objects are built, AIX ld can
4586786a6f21Smrg      # have problems creating the table of contents.  If linking a library
4587786a6f21Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
4588786a6f21Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4589786a6f21Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
45901d54945dSmrg
4591786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)=''
4592786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4593786a6f21Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4594786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4595786a6f21Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4596786a6f21Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
45971d54945dSmrg
4598786a6f21Smrg      if test "$GCC" = yes; then
4599786a6f21Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4600786a6f21Smrg	# We only want to do this on AIX 4.2 and lower, the check
4601786a6f21Smrg	# below for broken collect2 doesn't work under 4.3+
4602786a6f21Smrg	  collect2name=`${CC} -print-prog-name=collect2`
4603786a6f21Smrg	  if test -f "$collect2name" &&
4604786a6f21Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4605786a6f21Smrg	  then
4606786a6f21Smrg	  # We have reworked collect2
4607786a6f21Smrg	  :
4608786a6f21Smrg	  else
4609786a6f21Smrg	  # We have old collect2
4610786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4611786a6f21Smrg	  # It fails to find uninstalled libraries when the uninstalled
4612786a6f21Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4613786a6f21Smrg	  # to unsupported forces relinking
4614786a6f21Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4615786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4616786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617786a6f21Smrg	  fi
4618786a6f21Smrg	  ;;
4619786a6f21Smrg	esac
4620786a6f21Smrg	shared_flag='-shared'
4621786a6f21Smrg	if test "$aix_use_runtimelinking" = yes; then
4622786a6f21Smrg	  shared_flag="$shared_flag "'${wl}-G'
4623786a6f21Smrg	fi
4624786a6f21Smrg      else
4625786a6f21Smrg	# not using gcc
4626786a6f21Smrg	if test "$host_cpu" = ia64; then
4627786a6f21Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4628786a6f21Smrg	# chokes on -Wl,-G. The following line is correct:
4629786a6f21Smrg	  shared_flag='-G'
4630786a6f21Smrg	else
4631786a6f21Smrg	  if test "$aix_use_runtimelinking" = yes; then
4632786a6f21Smrg	    shared_flag='${wl}-G'
4633786a6f21Smrg	  else
4634786a6f21Smrg	    shared_flag='${wl}-bM:SRE'
4635786a6f21Smrg	  fi
4636786a6f21Smrg	fi
4637786a6f21Smrg      fi
46381d54945dSmrg
4639786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4640786a6f21Smrg      # It seems that -bexpall does not export symbols beginning with
4641786a6f21Smrg      # underscore (_), so it is better to generate a list of symbols to export.
4642786a6f21Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4643786a6f21Smrg      if test "$aix_use_runtimelinking" = yes; then
4644786a6f21Smrg	# Warning - without using the other runtime loading flags (-brtl),
4645786a6f21Smrg	# -berok will link without error, but may produce a broken library.
4646786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4647786a6f21Smrg        # Determine the default libpath from the value encoded in an
4648786a6f21Smrg        # empty executable.
4649786a6f21Smrg        _LT_SYS_MODULE_PATH_AIX
4650786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4651786a6f21Smrg        _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"
4652786a6f21Smrg      else
4653786a6f21Smrg	if test "$host_cpu" = ia64; then
4654786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4655786a6f21Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4656786a6f21Smrg	  _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"
4657786a6f21Smrg	else
4658786a6f21Smrg	 # Determine the default libpath from the value encoded in an
4659786a6f21Smrg	 # empty executable.
4660786a6f21Smrg	 _LT_SYS_MODULE_PATH_AIX
4661786a6f21Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4662786a6f21Smrg	  # Warning - without using the other run time loading flags,
4663786a6f21Smrg	  # -berok will link without error, but may produce a broken library.
4664786a6f21Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4665786a6f21Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4666786a6f21Smrg	  # Exported symbols can be pulled into shared objects from archives
4667786a6f21Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4668786a6f21Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4669786a6f21Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
4670786a6f21Smrg	  _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'
4671786a6f21Smrg	fi
4672786a6f21Smrg      fi
4673786a6f21Smrg      ;;
46741d54945dSmrg
4675786a6f21Smrg    amigaos*)
4676786a6f21Smrg      case $host_cpu in
4677786a6f21Smrg      powerpc)
4678786a6f21Smrg            # see comment about AmigaOS4 .so support
4679786a6f21Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4680786a6f21Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4681786a6f21Smrg        ;;
4682786a6f21Smrg      m68k)
4683786a6f21Smrg            _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)'
4684786a6f21Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4685786a6f21Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4686786a6f21Smrg        ;;
4687786a6f21Smrg      esac
4688786a6f21Smrg      ;;
46891d54945dSmrg
4690786a6f21Smrg    bsdi[[45]]*)
4691786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4692786a6f21Smrg      ;;
46931d54945dSmrg
4694786a6f21Smrg    cygwin* | mingw* | pw32* | cegcc*)
4695786a6f21Smrg      # When not using gcc, we currently assume that we are using
4696786a6f21Smrg      # Microsoft Visual C++.
4697786a6f21Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4698786a6f21Smrg      # no search path for DLLs.
4699786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4700786a6f21Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4701786a6f21Smrg      # Tell ltmain to make .lib files, not .a files.
4702786a6f21Smrg      libext=lib
4703786a6f21Smrg      # Tell ltmain to make .dll files, not .so files.
4704786a6f21Smrg      shrext_cmds=".dll"
4705786a6f21Smrg      # FIXME: Setting linknames here is a bad hack.
4706786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4707786a6f21Smrg      # The linker will automatically build a .lib file if we build a DLL.
4708786a6f21Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4709786a6f21Smrg      # FIXME: Should let the user specify the lib program.
4710786a6f21Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4711786a6f21Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4712786a6f21Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4713786a6f21Smrg      ;;
47141d54945dSmrg
4715786a6f21Smrg    darwin* | rhapsody*)
4716786a6f21Smrg      _LT_DARWIN_LINKER_FEATURES($1)
4717786a6f21Smrg      ;;
47181d54945dSmrg
4719786a6f21Smrg    dgux*)
4720786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4721786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4723786a6f21Smrg      ;;
47241d54945dSmrg
4725786a6f21Smrg    freebsd1*)
4726786a6f21Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
4727786a6f21Smrg      ;;
47281d54945dSmrg
4729786a6f21Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4730786a6f21Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4731786a6f21Smrg    # does not break anything, and helps significantly (at the cost of a little
4732786a6f21Smrg    # extra space).
4733786a6f21Smrg    freebsd2.2*)
4734786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4735786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4736786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4737786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4738786a6f21Smrg      ;;
47391d54945dSmrg
4740786a6f21Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4741786a6f21Smrg    freebsd2*)
4742786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4743786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4744786a6f21Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4746786a6f21Smrg      ;;
47471d54945dSmrg
4748786a6f21Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4749786a6f21Smrg    freebsd* | dragonfly*)
4750786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4751786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4753786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754786a6f21Smrg      ;;
47551d54945dSmrg
4756786a6f21Smrg    hpux9*)
4757786a6f21Smrg      if test "$GCC" = yes; then
4758786a6f21Smrg	_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'
4759786a6f21Smrg      else
4760786a6f21Smrg	_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'
4761786a6f21Smrg      fi
4762786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4763786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4764786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
47651d54945dSmrg
4766786a6f21Smrg      # hardcode_minus_L: Not really in the search PATH,
4767786a6f21Smrg      # but as the default location of the library.
4768786a6f21Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4769786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4770786a6f21Smrg      ;;
47711d54945dSmrg
4772786a6f21Smrg    hpux10*)
4773786a6f21Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4774786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4775786a6f21Smrg      else
4776786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4777786a6f21Smrg      fi
4778786a6f21Smrg      if test "$with_gnu_ld" = no; then
4779786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4780786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4781786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4782786a6f21Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4783786a6f21Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4784786a6f21Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4785786a6f21Smrg	# hardcode_minus_L: Not really in the search PATH,
4786786a6f21Smrg	# but as the default location of the library.
4787786a6f21Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4788786a6f21Smrg      fi
4789786a6f21Smrg      ;;
47901d54945dSmrg
4791786a6f21Smrg    hpux11*)
4792786a6f21Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4793786a6f21Smrg	case $host_cpu in
4794786a6f21Smrg	hppa*64*)
4795786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4796786a6f21Smrg	  ;;
4797786a6f21Smrg	ia64*)
4798786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4799786a6f21Smrg	  ;;
4800786a6f21Smrg	*)
4801786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4802786a6f21Smrg	  ;;
4803786a6f21Smrg	esac
4804786a6f21Smrg      else
4805786a6f21Smrg	case $host_cpu in
4806786a6f21Smrg	hppa*64*)
4807786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4808786a6f21Smrg	  ;;
4809786a6f21Smrg	ia64*)
4810786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4811786a6f21Smrg	  ;;
4812786a6f21Smrg	*)
4813786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4814786a6f21Smrg	  ;;
4815786a6f21Smrg	esac
4816786a6f21Smrg      fi
4817786a6f21Smrg      if test "$with_gnu_ld" = no; then
4818786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4819786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
48201d54945dSmrg
4821786a6f21Smrg	case $host_cpu in
4822786a6f21Smrg	hppa*64*|ia64*)
4823786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4824786a6f21Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4825786a6f21Smrg	  ;;
4826786a6f21Smrg	*)
4827786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4828786a6f21Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4829786a6f21Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48301d54945dSmrg
4831786a6f21Smrg	  # hardcode_minus_L: Not really in the search PATH,
4832786a6f21Smrg	  # but as the default location of the library.
4833786a6f21Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4834786a6f21Smrg	  ;;
4835786a6f21Smrg	esac
4836786a6f21Smrg      fi
4837786a6f21Smrg      ;;
48381d54945dSmrg
4839786a6f21Smrg    irix5* | irix6* | nonstopux*)
4840786a6f21Smrg      if test "$GCC" = yes; then
4841786a6f21Smrg	_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'
4842786a6f21Smrg	# Try to use the -exported_symbol ld option, if it does not
4843786a6f21Smrg	# work, assume that -exports_file does not work either and
4844786a6f21Smrg	# implicitly export all symbols.
4845786a6f21Smrg        save_LDFLAGS="$LDFLAGS"
4846786a6f21Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4847786a6f21Smrg        AC_LINK_IFELSE(int foo(void) {},
4848786a6f21Smrg          _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'
4849786a6f21Smrg        )
4850786a6f21Smrg        LDFLAGS="$save_LDFLAGS"
4851786a6f21Smrg      else
4852786a6f21Smrg	_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'
4853786a6f21Smrg	_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'
4854786a6f21Smrg      fi
4855786a6f21Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4856786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4857786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4858786a6f21Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4859786a6f21Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4860786a6f21Smrg      ;;
48611d54945dSmrg
4862786a6f21Smrg    netbsd*)
4863786a6f21Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4864786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4865786a6f21Smrg      else
4866786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4867786a6f21Smrg      fi
4868786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4869786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4870786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871786a6f21Smrg      ;;
48721d54945dSmrg
4873786a6f21Smrg    newsos6)
4874786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4875786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4876786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4877786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4878786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4879786a6f21Smrg      ;;
48801d54945dSmrg
4881786a6f21Smrg    *nto* | *qnx*)
4882786a6f21Smrg      ;;
48831d54945dSmrg
4884786a6f21Smrg    openbsd*)
4885786a6f21Smrg      if test -f /usr/libexec/ld.so; then
4886786a6f21Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4887786a6f21Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4888786a6f21Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4889786a6f21Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4890786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4891786a6f21Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4892786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4893786a6f21Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4894786a6f21Smrg	else
4895786a6f21Smrg	  case $host_os in
4896786a6f21Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4897786a6f21Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4898786a6f21Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4899786a6f21Smrg	     ;;
4900786a6f21Smrg	   *)
4901786a6f21Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4902786a6f21Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4903786a6f21Smrg	     ;;
4904786a6f21Smrg	  esac
4905786a6f21Smrg	fi
4906786a6f21Smrg      else
4907786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4908786a6f21Smrg      fi
4909786a6f21Smrg      ;;
49101d54945dSmrg
4911786a6f21Smrg    os2*)
4912786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4913786a6f21Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4914786a6f21Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4915786a6f21Smrg      _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'
4916786a6f21Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4917786a6f21Smrg      ;;
49181d54945dSmrg
4919786a6f21Smrg    osf3*)
4920786a6f21Smrg      if test "$GCC" = yes; then
4921786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4922786a6f21Smrg	_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'
4923786a6f21Smrg      else
4924786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4925786a6f21Smrg	_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'
4926786a6f21Smrg      fi
4927786a6f21Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4928786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4929786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4930786a6f21Smrg      ;;
49311d54945dSmrg
4932786a6f21Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4933786a6f21Smrg      if test "$GCC" = yes; then
4934786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4935786a6f21Smrg	_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'
4936786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4937786a6f21Smrg      else
4938786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4939786a6f21Smrg	_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'
4940786a6f21Smrg	_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~
4941786a6f21Smrg	$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'
49421d54945dSmrg
4943786a6f21Smrg	# Both c and cxx compiler support -rpath directly
4944786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4945786a6f21Smrg      fi
4946786a6f21Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4947786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4948786a6f21Smrg      ;;
49491d54945dSmrg
4950786a6f21Smrg    solaris*)
4951786a6f21Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4952786a6f21Smrg      if test "$GCC" = yes; then
4953786a6f21Smrg	wlarc='${wl}'
4954786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4955786a6f21Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4956786a6f21Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4957786a6f21Smrg      else
4958786a6f21Smrg	case `$CC -V 2>&1` in
4959786a6f21Smrg	*"Compilers 5.0"*)
4960786a6f21Smrg	  wlarc=''
4961786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4962786a6f21Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4963786a6f21Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4964786a6f21Smrg	  ;;
4965786a6f21Smrg	*)
4966786a6f21Smrg	  wlarc='${wl}'
4967786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4968786a6f21Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4969786a6f21Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4970786a6f21Smrg	  ;;
4971786a6f21Smrg	esac
4972786a6f21Smrg      fi
4973786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4974786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4975786a6f21Smrg      case $host_os in
4976786a6f21Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4977786a6f21Smrg      *)
4978786a6f21Smrg	# The compiler driver will combine and reorder linker options,
4979786a6f21Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4980786a6f21Smrg	# but is careful enough not to reorder.
4981786a6f21Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4982786a6f21Smrg	if test "$GCC" = yes; then
4983786a6f21Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4984786a6f21Smrg	else
4985786a6f21Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4986786a6f21Smrg	fi
4987786a6f21Smrg	;;
4988786a6f21Smrg      esac
4989786a6f21Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4990786a6f21Smrg      ;;
49911d54945dSmrg
4992786a6f21Smrg    sunos4*)
4993786a6f21Smrg      if test "x$host_vendor" = xsequent; then
4994786a6f21Smrg	# Use $CC to link under sequent, because it throws in some extra .o
4995786a6f21Smrg	# files that make .init and .fini sections work.
4996786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4997786a6f21Smrg      else
4998786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4999786a6f21Smrg      fi
5000786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5001786a6f21Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5002786a6f21Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5003786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5004786a6f21Smrg      ;;
50051d54945dSmrg
5006786a6f21Smrg    sysv4)
5007786a6f21Smrg      case $host_vendor in
5008786a6f21Smrg	sni)
5009786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5010786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5011786a6f21Smrg	;;
5012786a6f21Smrg	siemens)
5013786a6f21Smrg	  ## LD is ld it makes a PLAMLIB
5014786a6f21Smrg	  ## CC just makes a GrossModule.
5015786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5016786a6f21Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5017786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5018786a6f21Smrg        ;;
5019786a6f21Smrg	motorola)
5020786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5021786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5022786a6f21Smrg	;;
5023786a6f21Smrg      esac
5024786a6f21Smrg      runpath_var='LD_RUN_PATH'
5025786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5026786a6f21Smrg      ;;
50271d54945dSmrg
5028786a6f21Smrg    sysv4.3*)
5029786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5030786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5031786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5032786a6f21Smrg      ;;
50331d54945dSmrg
5034786a6f21Smrg    sysv4*MP*)
5035786a6f21Smrg      if test -d /usr/nec; then
5036786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037786a6f21Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5038786a6f21Smrg	runpath_var=LD_RUN_PATH
5039786a6f21Smrg	hardcode_runpath_var=yes
5040786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5041786a6f21Smrg      fi
5042786a6f21Smrg      ;;
50431d54945dSmrg
5044786a6f21Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5045786a6f21Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5046786a6f21Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5047786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5048786a6f21Smrg      runpath_var='LD_RUN_PATH'
50491d54945dSmrg
5050786a6f21Smrg      if test "$GCC" = yes; then
5051786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5052786a6f21Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5053786a6f21Smrg      else
5054786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055786a6f21Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5056786a6f21Smrg      fi
5057786a6f21Smrg      ;;
50581d54945dSmrg
5059786a6f21Smrg    sysv5* | sco3.2v5* | sco5v6*)
5060786a6f21Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
5061786a6f21Smrg      # link with -lc, and that would cause any symbols used from libc to
5062786a6f21Smrg      # always be unresolved, which means just about no library would
5063786a6f21Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
5064786a6f21Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
5065786a6f21Smrg      # as -z defs.
5066786a6f21Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5067786a6f21Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5068786a6f21Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5069786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5070786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5071786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5072786a6f21Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5073786a6f21Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5074786a6f21Smrg      runpath_var='LD_RUN_PATH'
50751d54945dSmrg
5076786a6f21Smrg      if test "$GCC" = yes; then
5077786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5078786a6f21Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5079786a6f21Smrg      else
5080786a6f21Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081786a6f21Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5082786a6f21Smrg      fi
5083786a6f21Smrg      ;;
50841d54945dSmrg
5085786a6f21Smrg    uts4*)
5086786a6f21Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5087786a6f21Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5088786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5089786a6f21Smrg      ;;
50901d54945dSmrg
5091786a6f21Smrg    *)
5092786a6f21Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
5093786a6f21Smrg      ;;
5094786a6f21Smrg    esac
50951d54945dSmrg
5096786a6f21Smrg    if test x$host_vendor = xsni; then
5097786a6f21Smrg      case $host in
5098786a6f21Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5099786a6f21Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5100786a6f21Smrg	;;
5101786a6f21Smrg      esac
5102786a6f21Smrg    fi
5103786a6f21Smrg  fi
5104786a6f21Smrg])
5105786a6f21SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5106786a6f21Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
51071d54945dSmrg
5108786a6f21Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
51091d54945dSmrg
5110786a6f21Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5111786a6f21Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5112786a6f21Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
5113786a6f21Smrg    [The commands to extract the exported symbol list from a shared archive])
51141d54945dSmrg
5115786a6f21Smrg#
5116786a6f21Smrg# Do we need to explicitly link libc?
5117786a6f21Smrg#
5118786a6f21Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5119786a6f21Smrgx|xyes)
5120786a6f21Smrg  # Assume -lc should be added
5121786a6f21Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
51221d54945dSmrg
5123786a6f21Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5124786a6f21Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
5125786a6f21Smrg    *'~'*)
5126786a6f21Smrg      # FIXME: we may have to deal with multi-command sequences.
5127786a6f21Smrg      ;;
5128786a6f21Smrg    '$CC '*)
5129786a6f21Smrg      # Test whether the compiler implicitly links with -lc since on some
5130786a6f21Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5131786a6f21Smrg      # to ld, don't add -lc before -lgcc.
5132786a6f21Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5133786a6f21Smrg      $RM conftest*
5134786a6f21Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
51351d54945dSmrg
5136786a6f21Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5137786a6f21Smrg        soname=conftest
5138786a6f21Smrg        lib=conftest
5139786a6f21Smrg        libobjs=conftest.$ac_objext
5140786a6f21Smrg        deplibs=
5141786a6f21Smrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5142786a6f21Smrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5143786a6f21Smrg        compiler_flags=-v
5144786a6f21Smrg        linker_flags=-v
5145786a6f21Smrg        verstring=
5146786a6f21Smrg        output_objdir=.
5147786a6f21Smrg        libname=conftest
5148786a6f21Smrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5149786a6f21Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5150786a6f21Smrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5151786a6f21Smrg        then
5152786a6f21Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5153786a6f21Smrg        else
5154786a6f21Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5155786a6f21Smrg        fi
5156786a6f21Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5157786a6f21Smrg      else
5158786a6f21Smrg        cat conftest.err 1>&5
5159786a6f21Smrg      fi
5160786a6f21Smrg      $RM conftest*
5161786a6f21Smrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5162786a6f21Smrg      ;;
5163786a6f21Smrg    esac
5164786a6f21Smrg  fi
5165786a6f21Smrg  ;;
5166786a6f21Smrgesac
51671d54945dSmrg
5168786a6f21Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5169786a6f21Smrg    [Whether or not to add -lc for building shared libraries])
5170786a6f21Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5171786a6f21Smrg    [enable_shared_with_static_runtimes], [0],
5172786a6f21Smrg    [Whether or not to disallow shared libs when runtime libs are static])
5173786a6f21Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5174786a6f21Smrg    [Compiler flag to allow reflexive dlopens])
5175786a6f21Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5176786a6f21Smrg    [Compiler flag to generate shared objects directly from archives])
5177786a6f21Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
5178786a6f21Smrg    [Whether the compiler copes with passing no objects directly])
5179786a6f21Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5180786a6f21Smrg    [Create an old-style archive from a shared archive])
5181786a6f21Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5182786a6f21Smrg    [Create a temporary old-style archive to link instead of a shared archive])
5183786a6f21Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5184786a6f21Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5185786a6f21Smrg_LT_TAGDECL([], [module_cmds], [2],
5186786a6f21Smrg    [Commands used to build a loadable module if different from building
5187786a6f21Smrg    a shared archive.])
5188786a6f21Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5189786a6f21Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
5190786a6f21Smrg    [Whether we are building with GNU ld or not])
5191786a6f21Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5192786a6f21Smrg    [Flag that allows shared libraries with undefined symbols to be built])
5193786a6f21Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
5194786a6f21Smrg    [Flag that enforces no undefined symbols])
5195786a6f21Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5196786a6f21Smrg    [Flag to hardcode $libdir into a binary during linking.
5197786a6f21Smrg    This must work even if $libdir does not exist])
5198786a6f21Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5199786a6f21Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5200786a6f21Smrg    during linking.  This must work even if $libdir does not exist]])
5201786a6f21Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5202786a6f21Smrg    [Whether we need a single "-rpath" flag with a separated argument])
5203786a6f21Smrg_LT_TAGDECL([], [hardcode_direct], [0],
5204786a6f21Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5205786a6f21Smrg    DIR into the resulting binary])
5206786a6f21Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5207786a6f21Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5208786a6f21Smrg    DIR into the resulting binary and the resulting library dependency is
5209786a6f21Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5210786a6f21Smrg    library is relocated])
5211786a6f21Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5212786a6f21Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5213786a6f21Smrg    into the resulting binary])
5214786a6f21Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5215786a6f21Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5216786a6f21Smrg    into the resulting binary])
5217786a6f21Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
5218786a6f21Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5219786a6f21Smrg    into the library and all subsequent libraries and executables linked
5220786a6f21Smrg    against it])
5221786a6f21Smrg_LT_TAGDECL([], [inherit_rpath], [0],
5222786a6f21Smrg    [Set to yes if linker adds runtime paths of dependent libraries
5223786a6f21Smrg    to runtime path list])
5224786a6f21Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
5225786a6f21Smrg    [Whether libtool must link a program against all its dependency libraries])
5226786a6f21Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5227786a6f21Smrg    [Fix the shell variable $srcfile for the compiler])
5228786a6f21Smrg_LT_TAGDECL([], [always_export_symbols], [0],
5229786a6f21Smrg    [Set to "yes" if exported symbols are required])
5230786a6f21Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5231786a6f21Smrg    [The commands to list exported symbols])
5232786a6f21Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
5233786a6f21Smrg    [Symbols that should not be listed in the preloaded symbols])
5234786a6f21Smrg_LT_TAGDECL([], [include_expsyms], [1],
5235786a6f21Smrg    [Symbols that must always be exported])
5236786a6f21Smrg_LT_TAGDECL([], [prelink_cmds], [2],
5237786a6f21Smrg    [Commands necessary for linking programs (against libraries) with templates])
5238786a6f21Smrg_LT_TAGDECL([], [file_list_spec], [1],
5239786a6f21Smrg    [Specify filename containing input files])
5240786a6f21Smrgdnl FIXME: Not yet implemented
5241786a6f21Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5242786a6f21Smrgdnl    [Compiler flag to generate thread safe objects])
5243786a6f21Smrg])# _LT_LINKER_SHLIBS
5244786a6f21Smrg
5245786a6f21Smrg
5246786a6f21Smrg# _LT_LANG_C_CONFIG([TAG])
5247786a6f21Smrg# ------------------------
5248786a6f21Smrg# Ensure that the configuration variables for a C compiler are suitably
5249786a6f21Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5250786a6f21Smrg# the compiler configuration to `libtool'.
5251786a6f21Smrgm4_defun([_LT_LANG_C_CONFIG],
5252786a6f21Smrg[m4_require([_LT_DECL_EGREP])dnl
5253786a6f21Smrglt_save_CC="$CC"
5254786a6f21SmrgAC_LANG_PUSH(C)
52551d54945dSmrg
5256786a6f21Smrg# Source file extension for C test sources.
5257786a6f21Smrgac_ext=c
52581d54945dSmrg
5259786a6f21Smrg# Object file extension for compiled C test sources.
5260786a6f21Smrgobjext=o
5261786a6f21Smrg_LT_TAGVAR(objext, $1)=$objext
52621d54945dSmrg
5263786a6f21Smrg# Code to be used in simple compile tests
5264786a6f21Smrglt_simple_compile_test_code="int some_variable = 0;"
52651d54945dSmrg
5266786a6f21Smrg# Code to be used in simple link tests
5267786a6f21Smrglt_simple_link_test_code='int main(){return(0);}'
52681d54945dSmrg
5269786a6f21Smrg_LT_TAG_COMPILER
5270786a6f21Smrg# Save the default compiler, since it gets overwritten when the other
5271786a6f21Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5272786a6f21Smrgcompiler_DEFAULT=$CC
52731d54945dSmrg
5274786a6f21Smrg# save warnings/boilerplate of simple test code
5275786a6f21Smrg_LT_COMPILER_BOILERPLATE
5276786a6f21Smrg_LT_LINKER_BOILERPLATE
52771d54945dSmrg
5278786a6f21Smrgif test -n "$compiler"; then
5279786a6f21Smrg  _LT_COMPILER_NO_RTTI($1)
5280786a6f21Smrg  _LT_COMPILER_PIC($1)
5281786a6f21Smrg  _LT_COMPILER_C_O($1)
5282786a6f21Smrg  _LT_COMPILER_FILE_LOCKS($1)
5283786a6f21Smrg  _LT_LINKER_SHLIBS($1)
5284786a6f21Smrg  _LT_SYS_DYNAMIC_LINKER($1)
5285786a6f21Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5286786a6f21Smrg  LT_SYS_DLOPEN_SELF
5287786a6f21Smrg  _LT_CMD_STRIPLIB
5288786a6f21Smrg
5289786a6f21Smrg  # Report which library types will actually be built
5290786a6f21Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5291786a6f21Smrg  AC_MSG_RESULT([$can_build_shared])
5292786a6f21Smrg
5293786a6f21Smrg  AC_MSG_CHECKING([whether to build shared libraries])
5294786a6f21Smrg  test "$can_build_shared" = "no" && enable_shared=no
5295786a6f21Smrg
5296786a6f21Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
5297786a6f21Smrg  # are all built from PIC.
5298786a6f21Smrg  case $host_os in
5299786a6f21Smrg  aix3*)
5300786a6f21Smrg    test "$enable_shared" = yes && enable_static=no
5301786a6f21Smrg    if test -n "$RANLIB"; then
5302786a6f21Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5303786a6f21Smrg      postinstall_cmds='$RANLIB $lib'
5304786a6f21Smrg    fi
5305786a6f21Smrg    ;;
53061d54945dSmrg
5307786a6f21Smrg  aix[[4-9]]*)
5308786a6f21Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5309786a6f21Smrg      test "$enable_shared" = yes && enable_static=no
5310786a6f21Smrg    fi
5311786a6f21Smrg    ;;
5312786a6f21Smrg  esac
5313786a6f21Smrg  AC_MSG_RESULT([$enable_shared])
53141d54945dSmrg
5315786a6f21Smrg  AC_MSG_CHECKING([whether to build static libraries])
5316786a6f21Smrg  # Make sure either enable_shared or enable_static is yes.
5317786a6f21Smrg  test "$enable_shared" = yes || enable_static=yes
5318786a6f21Smrg  AC_MSG_RESULT([$enable_static])
53191d54945dSmrg
5320786a6f21Smrg  _LT_CONFIG($1)
5321786a6f21Smrgfi
5322786a6f21SmrgAC_LANG_POP
5323786a6f21SmrgCC="$lt_save_CC"
5324786a6f21Smrg])# _LT_LANG_C_CONFIG
53251d54945dSmrg
53261d54945dSmrg
5327786a6f21Smrg# _LT_PROG_CXX
5328786a6f21Smrg# ------------
5329786a6f21Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5330786a6f21Smrg# compiler, we have our own version here.
5331786a6f21Smrgm4_defun([_LT_PROG_CXX],
5332786a6f21Smrg[
5333786a6f21Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5334786a6f21SmrgAC_PROG_CXX
5335786a6f21Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5336786a6f21Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5337786a6f21Smrg    (test "X$CXX" != "Xg++"))) ; then
5338786a6f21Smrg  AC_PROG_CXXCPP
5339786a6f21Smrgelse
5340786a6f21Smrg  _lt_caught_CXX_error=yes
5341786a6f21Smrgfi
5342786a6f21Smrgpopdef([AC_MSG_ERROR])
5343786a6f21Smrg])# _LT_PROG_CXX
53441d54945dSmrg
5345786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
5346786a6f21Smrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5347ba85709eSmrg
53481d54945dSmrg
5349786a6f21Smrg# _LT_LANG_CXX_CONFIG([TAG])
5350786a6f21Smrg# --------------------------
5351786a6f21Smrg# Ensure that the configuration variables for a C++ compiler are suitably
5352786a6f21Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5353786a6f21Smrg# the compiler configuration to `libtool'.
5354786a6f21Smrgm4_defun([_LT_LANG_CXX_CONFIG],
5355786a6f21Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5356786a6f21Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5357786a6f21Smrgm4_require([_LT_DECL_EGREP])dnl
5358786a6f21Smrg
5359786a6f21SmrgAC_LANG_PUSH(C++)
5360786a6f21Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5361786a6f21Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
5362786a6f21Smrg_LT_TAGVAR(always_export_symbols, $1)=no
5363786a6f21Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5364786a6f21Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
5365786a6f21Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5366786a6f21Smrg_LT_TAGVAR(hardcode_direct, $1)=no
5367786a6f21Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5368786a6f21Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5369786a6f21Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5370786a6f21Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5371786a6f21Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5372786a6f21Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5373786a6f21Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
5374786a6f21Smrg_LT_TAGVAR(inherit_rpath, $1)=no
5375786a6f21Smrg_LT_TAGVAR(module_cmds, $1)=
5376786a6f21Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
5377786a6f21Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5378786a6f21Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5379786a6f21Smrg_LT_TAGVAR(no_undefined_flag, $1)=
5380786a6f21Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5381786a6f21Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
53821d54945dSmrg
5383786a6f21Smrg# Source file extension for C++ test sources.
5384786a6f21Smrgac_ext=cpp
53851d54945dSmrg
5386786a6f21Smrg# Object file extension for compiled C++ test sources.
5387786a6f21Smrgobjext=o
5388786a6f21Smrg_LT_TAGVAR(objext, $1)=$objext
5389786a6f21Smrg
5390786a6f21Smrg# No sense in running all these tests if we already determined that
5391786a6f21Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5392786a6f21Smrg# are currently assumed to apply to all compilers on this platform,
5393786a6f21Smrg# and will be corrupted by setting them based on a non-working compiler.
5394786a6f21Smrgif test "$_lt_caught_CXX_error" != yes; then
5395786a6f21Smrg  # Code to be used in simple compile tests
5396786a6f21Smrg  lt_simple_compile_test_code="int some_variable = 0;"
5397786a6f21Smrg
5398786a6f21Smrg  # Code to be used in simple link tests
5399786a6f21Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5400786a6f21Smrg
5401786a6f21Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5402786a6f21Smrg  _LT_TAG_COMPILER
5403786a6f21Smrg
5404786a6f21Smrg  # save warnings/boilerplate of simple test code
5405786a6f21Smrg  _LT_COMPILER_BOILERPLATE
5406786a6f21Smrg  _LT_LINKER_BOILERPLATE
5407786a6f21Smrg
5408786a6f21Smrg  # Allow CC to be a program name with arguments.
5409786a6f21Smrg  lt_save_CC=$CC
5410786a6f21Smrg  lt_save_LD=$LD
5411786a6f21Smrg  lt_save_GCC=$GCC
5412786a6f21Smrg  GCC=$GXX
5413786a6f21Smrg  lt_save_with_gnu_ld=$with_gnu_ld
5414786a6f21Smrg  lt_save_path_LD=$lt_cv_path_LD
5415786a6f21Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5416786a6f21Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5417786a6f21Smrg  else
5418786a6f21Smrg    $as_unset lt_cv_prog_gnu_ld
5419786a6f21Smrg  fi
5420786a6f21Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5421786a6f21Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5422786a6f21Smrg  else
5423786a6f21Smrg    $as_unset lt_cv_path_LD
5424786a6f21Smrg  fi
5425786a6f21Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
5426786a6f21Smrg  CC=${CXX-"c++"}
5427786a6f21Smrg  compiler=$CC
5428786a6f21Smrg  _LT_TAGVAR(compiler, $1)=$CC
5429786a6f21Smrg  _LT_CC_BASENAME([$compiler])
54301d54945dSmrg
5431786a6f21Smrg  if test -n "$compiler"; then
5432786a6f21Smrg    # We don't want -fno-exception when compiling C++ code, so set the
5433786a6f21Smrg    # no_builtin_flag separately
5434786a6f21Smrg    if test "$GXX" = yes; then
5435786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5436786a6f21Smrg    else
5437786a6f21Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5438786a6f21Smrg    fi
54391d54945dSmrg
5440786a6f21Smrg    if test "$GXX" = yes; then
5441786a6f21Smrg      # Set up default GNU C++ configuration
54421d54945dSmrg
5443786a6f21Smrg      LT_PATH_LD
54441d54945dSmrg
5445786a6f21Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5446786a6f21Smrg      # archiving commands below assume that GNU ld is being used.
5447786a6f21Smrg      if test "$with_gnu_ld" = yes; then
5448786a6f21Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5449786a6f21Smrg        _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'
54501d54945dSmrg
5451786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5452786a6f21Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
54531d54945dSmrg
5454786a6f21Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5455786a6f21Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5456786a6f21Smrg        #     investigate it a little bit more. (MM)
5457786a6f21Smrg        wlarc='${wl}'
54581d54945dSmrg
5459786a6f21Smrg        # ancient GNU ld didn't support --whole-archive et. al.
5460786a6f21Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5461786a6f21Smrg	  $GREP 'no-whole-archive' > /dev/null; then
5462786a6f21Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5463786a6f21Smrg        else
5464786a6f21Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5465786a6f21Smrg        fi
5466786a6f21Smrg      else
5467786a6f21Smrg        with_gnu_ld=no
5468786a6f21Smrg        wlarc=
5469786a6f21Smrg
5470786a6f21Smrg        # A generic and very simple default shared library creation
5471786a6f21Smrg        # command for GNU C++ for the case where it uses the native
5472786a6f21Smrg        # linker, instead of GNU ld.  If possible, this setting should
5473786a6f21Smrg        # overridden to take advantage of the native linker features on
5474786a6f21Smrg        # the platform it is being used on.
5475786a6f21Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5476786a6f21Smrg      fi
54771d54945dSmrg
5478786a6f21Smrg      # Commands to make compiler produce verbose output that lists
5479786a6f21Smrg      # what "hidden" libraries, object files and flags are used when
5480786a6f21Smrg      # linking a shared library.
5481786a6f21Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
54821d54945dSmrg
5483786a6f21Smrg    else
5484786a6f21Smrg      GXX=no
5485786a6f21Smrg      with_gnu_ld=no
5486786a6f21Smrg      wlarc=
5487786a6f21Smrg    fi
54881d54945dSmrg
5489786a6f21Smrg    # PORTME: fill in a description of your system's C++ link characteristics
5490786a6f21Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5491786a6f21Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5492786a6f21Smrg    case $host_os in
5493786a6f21Smrg      aix3*)
5494786a6f21Smrg        # FIXME: insert proper C++ library support
5495786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5496786a6f21Smrg        ;;
5497786a6f21Smrg      aix[[4-9]]*)
5498786a6f21Smrg        if test "$host_cpu" = ia64; then
5499786a6f21Smrg          # On IA64, the linker does run time linking by default, so we don't
5500786a6f21Smrg          # have to do anything special.
5501786a6f21Smrg          aix_use_runtimelinking=no
5502786a6f21Smrg          exp_sym_flag='-Bexport'
5503786a6f21Smrg          no_entry_flag=""
5504786a6f21Smrg        else
5505786a6f21Smrg          aix_use_runtimelinking=no
5506786a6f21Smrg
5507786a6f21Smrg          # Test if we are trying to use run time linking or normal
5508786a6f21Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5509786a6f21Smrg          # need to do runtime linking.
5510786a6f21Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5511786a6f21Smrg	    for ld_flag in $LDFLAGS; do
5512786a6f21Smrg	      case $ld_flag in
5513786a6f21Smrg	      *-brtl*)
5514786a6f21Smrg	        aix_use_runtimelinking=yes
5515786a6f21Smrg	        break
5516786a6f21Smrg	        ;;
5517786a6f21Smrg	      esac
5518786a6f21Smrg	    done
5519786a6f21Smrg	    ;;
5520786a6f21Smrg          esac
55211d54945dSmrg
5522786a6f21Smrg          exp_sym_flag='-bexport'
5523786a6f21Smrg          no_entry_flag='-bnoentry'
5524786a6f21Smrg        fi
55251d54945dSmrg
5526786a6f21Smrg        # When large executables or shared objects are built, AIX ld can
5527786a6f21Smrg        # have problems creating the table of contents.  If linking a library
5528786a6f21Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
5529786a6f21Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5530786a6f21Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5531786a6f21Smrg
5532786a6f21Smrg        _LT_TAGVAR(archive_cmds, $1)=''
5533786a6f21Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5534786a6f21Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5535786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5536786a6f21Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5537786a6f21Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5538786a6f21Smrg
5539786a6f21Smrg        if test "$GXX" = yes; then
5540786a6f21Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5541786a6f21Smrg          # We only want to do this on AIX 4.2 and lower, the check
5542786a6f21Smrg          # below for broken collect2 doesn't work under 4.3+
5543786a6f21Smrg	  collect2name=`${CC} -print-prog-name=collect2`
5544786a6f21Smrg	  if test -f "$collect2name" &&
5545786a6f21Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5546786a6f21Smrg	  then
5547786a6f21Smrg	    # We have reworked collect2
5548786a6f21Smrg	    :
5549786a6f21Smrg	  else
5550786a6f21Smrg	    # We have old collect2
5551786a6f21Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5552786a6f21Smrg	    # It fails to find uninstalled libraries when the uninstalled
5553786a6f21Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5554786a6f21Smrg	    # to unsupported forces relinking
5555786a6f21Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5556786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5557786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5558786a6f21Smrg	  fi
5559786a6f21Smrg          esac
5560786a6f21Smrg          shared_flag='-shared'
5561786a6f21Smrg	  if test "$aix_use_runtimelinking" = yes; then
5562786a6f21Smrg	    shared_flag="$shared_flag "'${wl}-G'
5563786a6f21Smrg	  fi
5564786a6f21Smrg        else
5565786a6f21Smrg          # not using gcc
5566786a6f21Smrg          if test "$host_cpu" = ia64; then
5567786a6f21Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5568786a6f21Smrg	  # chokes on -Wl,-G. The following line is correct:
5569786a6f21Smrg	  shared_flag='-G'
5570786a6f21Smrg          else
5571786a6f21Smrg	    if test "$aix_use_runtimelinking" = yes; then
5572786a6f21Smrg	      shared_flag='${wl}-G'
5573786a6f21Smrg	    else
5574786a6f21Smrg	      shared_flag='${wl}-bM:SRE'
5575786a6f21Smrg	    fi
5576786a6f21Smrg          fi
5577786a6f21Smrg        fi
55781d54945dSmrg
5579786a6f21Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5580786a6f21Smrg        # It seems that -bexpall does not export symbols beginning with
5581786a6f21Smrg        # underscore (_), so it is better to generate a list of symbols to
5582786a6f21Smrg	# export.
5583786a6f21Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5584786a6f21Smrg        if test "$aix_use_runtimelinking" = yes; then
5585786a6f21Smrg          # Warning - without using the other runtime loading flags (-brtl),
5586786a6f21Smrg          # -berok will link without error, but may produce a broken library.
5587786a6f21Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5588786a6f21Smrg          # Determine the default libpath from the value encoded in an empty
5589786a6f21Smrg          # executable.
5590786a6f21Smrg          _LT_SYS_MODULE_PATH_AIX
5591786a6f21Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5592786a6f21Smrg
5593786a6f21Smrg          _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"
5594786a6f21Smrg        else
5595786a6f21Smrg          if test "$host_cpu" = ia64; then
5596786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5597786a6f21Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5598786a6f21Smrg	    _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"
5599786a6f21Smrg          else
5600786a6f21Smrg	    # Determine the default libpath from the value encoded in an
5601786a6f21Smrg	    # empty executable.
5602786a6f21Smrg	    _LT_SYS_MODULE_PATH_AIX
5603786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5604786a6f21Smrg	    # Warning - without using the other run time loading flags,
5605786a6f21Smrg	    # -berok will link without error, but may produce a broken library.
5606786a6f21Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5607786a6f21Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5608786a6f21Smrg	    # Exported symbols can be pulled into shared objects from archives
5609786a6f21Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5610786a6f21Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5611786a6f21Smrg	    # This is similar to how AIX traditionally builds its shared
5612786a6f21Smrg	    # libraries.
5613786a6f21Smrg	    _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'
5614786a6f21Smrg          fi
5615786a6f21Smrg        fi
5616786a6f21Smrg        ;;
56171d54945dSmrg
5618786a6f21Smrg      beos*)
5619786a6f21Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5620786a6f21Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621786a6f21Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5622786a6f21Smrg	  # support --undefined.  This deserves some investigation.  FIXME
5623786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5624786a6f21Smrg	else
5625786a6f21Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5626786a6f21Smrg	fi
5627786a6f21Smrg	;;
56281d54945dSmrg
5629786a6f21Smrg      chorus*)
5630786a6f21Smrg        case $cc_basename in
5631786a6f21Smrg          *)
5632786a6f21Smrg	  # FIXME: insert proper C++ library support
5633786a6f21Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5634786a6f21Smrg	  ;;
5635786a6f21Smrg        esac
5636786a6f21Smrg        ;;
56371d54945dSmrg
5638786a6f21Smrg      cygwin* | mingw* | pw32* | cegcc*)
5639786a6f21Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5640786a6f21Smrg        # as there is no search path for DLLs.
5641786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5642786a6f21Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5643786a6f21Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
5644786a6f21Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5645786a6f21Smrg
5646786a6f21Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5647786a6f21Smrg          _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'
5648786a6f21Smrg          # If the export-symbols file already is a .def file (1st line
5649786a6f21Smrg          # is EXPORTS), use it as is; otherwise, prepend...
5650786a6f21Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5651786a6f21Smrg	    cp $export_symbols $output_objdir/$soname.def;
5652786a6f21Smrg          else
5653786a6f21Smrg	    echo EXPORTS > $output_objdir/$soname.def;
5654786a6f21Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
5655786a6f21Smrg          fi~
5656786a6f21Smrg          $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'
5657786a6f21Smrg        else
5658786a6f21Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
5659786a6f21Smrg        fi
5660786a6f21Smrg        ;;
5661786a6f21Smrg      darwin* | rhapsody*)
5662786a6f21Smrg        _LT_DARWIN_LINKER_FEATURES($1)
5663786a6f21Smrg	;;
56641d54945dSmrg
5665786a6f21Smrg      dgux*)
5666786a6f21Smrg        case $cc_basename in
5667786a6f21Smrg          ec++*)
5668786a6f21Smrg	    # FIXME: insert proper C++ library support
5669786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5670786a6f21Smrg	    ;;
5671786a6f21Smrg          ghcx*)
5672786a6f21Smrg	    # Green Hills C++ Compiler
5673786a6f21Smrg	    # FIXME: insert proper C++ library support
5674786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5675786a6f21Smrg	    ;;
5676786a6f21Smrg          *)
5677786a6f21Smrg	    # FIXME: insert proper C++ library support
5678786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5679786a6f21Smrg	    ;;
5680786a6f21Smrg        esac
5681786a6f21Smrg        ;;
56821d54945dSmrg
5683786a6f21Smrg      freebsd[[12]]*)
5684786a6f21Smrg        # C++ shared libraries reported to be fairly broken before
5685786a6f21Smrg	# switch to ELF
5686786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5687786a6f21Smrg        ;;
56881d54945dSmrg
5689786a6f21Smrg      freebsd-elf*)
5690786a6f21Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5691786a6f21Smrg        ;;
56921d54945dSmrg
5693786a6f21Smrg      freebsd* | dragonfly*)
5694786a6f21Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5695786a6f21Smrg        # conventions
5696786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5697786a6f21Smrg        ;;
56981d54945dSmrg
5699786a6f21Smrg      gnu*)
5700786a6f21Smrg        ;;
57011d54945dSmrg
5702786a6f21Smrg      hpux9*)
5703786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5704786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5705786a6f21Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5706786a6f21Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5707786a6f21Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5708786a6f21Smrg				             # but as the default
5709786a6f21Smrg				             # location of the library.
5710786a6f21Smrg
5711786a6f21Smrg        case $cc_basename in
5712786a6f21Smrg          CC*)
5713786a6f21Smrg            # FIXME: insert proper C++ library support
5714786a6f21Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
5715786a6f21Smrg            ;;
5716786a6f21Smrg          aCC*)
5717786a6f21Smrg            _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'
5718786a6f21Smrg            # Commands to make compiler produce verbose output that lists
5719786a6f21Smrg            # what "hidden" libraries, object files and flags are used when
5720786a6f21Smrg            # linking a shared library.
5721786a6f21Smrg            #
5722786a6f21Smrg            # There doesn't appear to be a way to prevent this compiler from
5723786a6f21Smrg            # explicitly linking system object files so we need to strip them
5724786a6f21Smrg            # from the output so that they don't get included in the library
5725786a6f21Smrg            # dependencies.
5726786a6f21Smrg            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'
5727786a6f21Smrg            ;;
5728786a6f21Smrg          *)
5729786a6f21Smrg            if test "$GXX" = yes; then
5730786a6f21Smrg              _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'
5731786a6f21Smrg            else
5732786a6f21Smrg              # FIXME: insert proper C++ library support
5733786a6f21Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
5734786a6f21Smrg            fi
5735786a6f21Smrg            ;;
5736786a6f21Smrg        esac
5737786a6f21Smrg        ;;
57381d54945dSmrg
5739786a6f21Smrg      hpux10*|hpux11*)
5740786a6f21Smrg        if test $with_gnu_ld = no; then
5741786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5742786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5743786a6f21Smrg
5744786a6f21Smrg          case $host_cpu in
5745786a6f21Smrg            hppa*64*|ia64*)
5746786a6f21Smrg              ;;
5747786a6f21Smrg            *)
5748786a6f21Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749786a6f21Smrg              ;;
5750786a6f21Smrg          esac
5751786a6f21Smrg        fi
5752786a6f21Smrg        case $host_cpu in
5753786a6f21Smrg          hppa*64*|ia64*)
5754786a6f21Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
5755786a6f21Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5756786a6f21Smrg            ;;
5757786a6f21Smrg          *)
5758786a6f21Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5759786a6f21Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760786a6f21Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5761786a6f21Smrg					         # but as the default
5762786a6f21Smrg					         # location of the library.
5763786a6f21Smrg            ;;
5764786a6f21Smrg        esac
5765786a6f21Smrg
5766786a6f21Smrg        case $cc_basename in
5767786a6f21Smrg          CC*)
5768786a6f21Smrg	    # FIXME: insert proper C++ library support
5769786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5770786a6f21Smrg	    ;;
5771786a6f21Smrg          aCC*)
5772786a6f21Smrg	    case $host_cpu in
5773786a6f21Smrg	      hppa*64*)
5774786a6f21Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5775786a6f21Smrg	        ;;
5776786a6f21Smrg	      ia64*)
5777786a6f21Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5778786a6f21Smrg	        ;;
5779786a6f21Smrg	      *)
5780786a6f21Smrg	        _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'
5781786a6f21Smrg	        ;;
5782786a6f21Smrg	    esac
5783786a6f21Smrg	    # Commands to make compiler produce verbose output that lists
5784786a6f21Smrg	    # what "hidden" libraries, object files and flags are used when
5785786a6f21Smrg	    # linking a shared library.
5786786a6f21Smrg	    #
5787786a6f21Smrg	    # There doesn't appear to be a way to prevent this compiler from
5788786a6f21Smrg	    # explicitly linking system object files so we need to strip them
5789786a6f21Smrg	    # from the output so that they don't get included in the library
5790786a6f21Smrg	    # dependencies.
5791786a6f21Smrg	    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'
5792786a6f21Smrg	    ;;
5793786a6f21Smrg          *)
5794786a6f21Smrg	    if test "$GXX" = yes; then
5795786a6f21Smrg	      if test $with_gnu_ld = no; then
5796786a6f21Smrg	        case $host_cpu in
5797786a6f21Smrg	          hppa*64*)
5798786a6f21Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5799786a6f21Smrg	            ;;
5800786a6f21Smrg	          ia64*)
5801786a6f21Smrg	            _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'
5802786a6f21Smrg	            ;;
5803786a6f21Smrg	          *)
5804786a6f21Smrg	            _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'
5805786a6f21Smrg	            ;;
5806786a6f21Smrg	        esac
5807786a6f21Smrg	      fi
5808786a6f21Smrg	    else
5809786a6f21Smrg	      # FIXME: insert proper C++ library support
5810786a6f21Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5811786a6f21Smrg	    fi
5812786a6f21Smrg	    ;;
5813786a6f21Smrg        esac
5814786a6f21Smrg        ;;
58151d54945dSmrg
5816786a6f21Smrg      interix[[3-9]]*)
5817786a6f21Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
5818786a6f21Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5820786a6f21Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5821786a6f21Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5822786a6f21Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5823786a6f21Smrg	# default) and relocated if they conflict, which is a slow very memory
5824786a6f21Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5825786a6f21Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5826786a6f21Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5827786a6f21Smrg	_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'
5828786a6f21Smrg	_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'
5829786a6f21Smrg	;;
5830786a6f21Smrg      irix5* | irix6*)
5831786a6f21Smrg        case $cc_basename in
5832786a6f21Smrg          CC*)
5833786a6f21Smrg	    # SGI C++
5834786a6f21Smrg	    _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'
5835786a6f21Smrg
5836786a6f21Smrg	    # Archives containing C++ object files must be created using
5837786a6f21Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5838786a6f21Smrg	    # necessary to make sure instantiated templates are included
5839786a6f21Smrg	    # in the archive.
5840786a6f21Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5841786a6f21Smrg	    ;;
5842786a6f21Smrg          *)
5843786a6f21Smrg	    if test "$GXX" = yes; then
5844786a6f21Smrg	      if test "$with_gnu_ld" = no; then
5845786a6f21Smrg	        _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'
5846786a6f21Smrg	      else
5847786a6f21Smrg	        _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'
5848786a6f21Smrg	      fi
5849786a6f21Smrg	    fi
5850786a6f21Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5851786a6f21Smrg	    ;;
5852786a6f21Smrg        esac
5853786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5854786a6f21Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5855786a6f21Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5856786a6f21Smrg        ;;
58571d54945dSmrg
5858786a6f21Smrg      linux* | k*bsd*-gnu)
5859786a6f21Smrg        case $cc_basename in
5860786a6f21Smrg          KCC*)
5861786a6f21Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5862786a6f21Smrg
5863786a6f21Smrg	    # KCC will only create a shared library if the output file
5864786a6f21Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5865786a6f21Smrg	    # to its proper name (with version) after linking.
5866786a6f21Smrg	    _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'
5867786a6f21Smrg	    _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'
5868786a6f21Smrg	    # Commands to make compiler produce verbose output that lists
5869786a6f21Smrg	    # what "hidden" libraries, object files and flags are used when
5870786a6f21Smrg	    # linking a shared library.
5871786a6f21Smrg	    #
5872786a6f21Smrg	    # There doesn't appear to be a way to prevent this compiler from
5873786a6f21Smrg	    # explicitly linking system object files so we need to strip them
5874786a6f21Smrg	    # from the output so that they don't get included in the library
5875786a6f21Smrg	    # dependencies.
5876786a6f21Smrg	    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'
5877786a6f21Smrg
5878786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5879786a6f21Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5880786a6f21Smrg
5881786a6f21Smrg	    # Archives containing C++ object files must be created using
5882786a6f21Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5883786a6f21Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5884786a6f21Smrg	    ;;
5885786a6f21Smrg	  icpc* | ecpc* )
5886786a6f21Smrg	    # Intel C++
5887786a6f21Smrg	    with_gnu_ld=yes
5888786a6f21Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5889786a6f21Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5890786a6f21Smrg	    # earlier do not add the objects themselves.
5891786a6f21Smrg	    case `$CC -V 2>&1` in
5892786a6f21Smrg	      *"Version 7."*)
5893786a6f21Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5894786a6f21Smrg		_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'
5895786a6f21Smrg		;;
5896786a6f21Smrg	      *)  # Version 8.0 or newer
5897786a6f21Smrg	        tmp_idyn=
5898786a6f21Smrg	        case $host_cpu in
5899786a6f21Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
5900786a6f21Smrg		esac
5901786a6f21Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5902786a6f21Smrg		_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'
5903786a6f21Smrg		;;
5904786a6f21Smrg	    esac
5905786a6f21Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5906786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5907786a6f21Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5908786a6f21Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5909786a6f21Smrg	    ;;
5910786a6f21Smrg          pgCC* | pgcpp*)
5911786a6f21Smrg            # Portland Group C++ compiler
5912786a6f21Smrg	    case `$CC -V` in
5913786a6f21Smrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5914786a6f21Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5915786a6f21Smrg		rm -rf $tpldir~
5916786a6f21Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5917786a6f21Smrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5918786a6f21Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5919786a6f21Smrg		rm -rf $tpldir~
5920786a6f21Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5921786a6f21Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5922786a6f21Smrg		$RANLIB $oldlib'
5923786a6f21Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5924786a6f21Smrg		rm -rf $tpldir~
5925786a6f21Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5926786a6f21Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5927786a6f21Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5928786a6f21Smrg		rm -rf $tpldir~
5929786a6f21Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5930786a6f21Smrg		$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'
5931786a6f21Smrg	      ;;
5932786a6f21Smrg	    *) # Version 6 will use weak symbols
5933786a6f21Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5934786a6f21Smrg	      _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'
5935786a6f21Smrg	      ;;
5936786a6f21Smrg	    esac
59371d54945dSmrg
5938786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5939786a6f21Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5940786a6f21Smrg	    _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'
5941786a6f21Smrg            ;;
5942786a6f21Smrg	  cxx*)
5943786a6f21Smrg	    # Compaq C++
5944786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5945786a6f21Smrg	    _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'
59461d54945dSmrg
5947786a6f21Smrg	    runpath_var=LD_RUN_PATH
5948786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5949786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59501d54945dSmrg
5951786a6f21Smrg	    # Commands to make compiler produce verbose output that lists
5952786a6f21Smrg	    # what "hidden" libraries, object files and flags are used when
5953786a6f21Smrg	    # linking a shared library.
5954786a6f21Smrg	    #
5955786a6f21Smrg	    # There doesn't appear to be a way to prevent this compiler from
5956786a6f21Smrg	    # explicitly linking system object files so we need to strip them
5957786a6f21Smrg	    # from the output so that they don't get included in the library
5958786a6f21Smrg	    # dependencies.
5959786a6f21Smrg	    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'
5960786a6f21Smrg	    ;;
5961786a6f21Smrg	  xl*)
5962786a6f21Smrg	    # IBM XL 8.0 on PPC, with GNU ld
5963786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5964786a6f21Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5965786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5966786a6f21Smrg	    if test "x$supports_anon_versioning" = xyes; then
5967786a6f21Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5968786a6f21Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5969786a6f21Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5970786a6f21Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5971786a6f21Smrg	    fi
5972786a6f21Smrg	    ;;
5973786a6f21Smrg	  *)
5974786a6f21Smrg	    case `$CC -V 2>&1 | sed 5q` in
5975786a6f21Smrg	    *Sun\ C*)
5976786a6f21Smrg	      # Sun C++ 5.9
5977786a6f21Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5978786a6f21Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5979786a6f21Smrg	      _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'
5980786a6f21Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5981786a6f21Smrg	      _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'
5982786a6f21Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5983786a6f21Smrg
5984786a6f21Smrg	      # Not sure whether something based on
5985786a6f21Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5986786a6f21Smrg	      # would be better.
5987786a6f21Smrg	      output_verbose_link_cmd='echo'
5988786a6f21Smrg
5989786a6f21Smrg	      # Archives containing C++ object files must be created using
5990786a6f21Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5991786a6f21Smrg	      # necessary to make sure instantiated templates are included
5992786a6f21Smrg	      # in the archive.
5993786a6f21Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5994786a6f21Smrg	      ;;
5995786a6f21Smrg	    esac
5996786a6f21Smrg	    ;;
5997786a6f21Smrg	esac
5998786a6f21Smrg	;;
59991d54945dSmrg
6000786a6f21Smrg      lynxos*)
6001786a6f21Smrg        # FIXME: insert proper C++ library support
6002786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6003786a6f21Smrg	;;
60041d54945dSmrg
6005786a6f21Smrg      m88k*)
6006786a6f21Smrg        # FIXME: insert proper C++ library support
6007786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6008786a6f21Smrg	;;
60091d54945dSmrg
6010786a6f21Smrg      mvs*)
6011786a6f21Smrg        case $cc_basename in
6012786a6f21Smrg          cxx*)
6013786a6f21Smrg	    # FIXME: insert proper C++ library support
6014786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6015786a6f21Smrg	    ;;
6016786a6f21Smrg	  *)
6017786a6f21Smrg	    # FIXME: insert proper C++ library support
6018786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6019786a6f21Smrg	    ;;
6020786a6f21Smrg	esac
6021786a6f21Smrg	;;
60221d54945dSmrg
6023786a6f21Smrg      netbsd*)
6024786a6f21Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6025786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6026786a6f21Smrg	  wlarc=
6027786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6028786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6029786a6f21Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030786a6f21Smrg	fi
6031786a6f21Smrg	# Workaround some broken pre-1.5 toolchains
6032786a6f21Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6033786a6f21Smrg	;;
60341d54945dSmrg
6035786a6f21Smrg      *nto* | *qnx*)
6036786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6037786a6f21Smrg	;;
60381d54945dSmrg
6039786a6f21Smrg      openbsd2*)
6040786a6f21Smrg        # C++ shared libraries are fairly broken
6041786a6f21Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6042786a6f21Smrg	;;
60431d54945dSmrg
6044786a6f21Smrg      openbsd*)
6045786a6f21Smrg	if test -f /usr/libexec/ld.so; then
6046786a6f21Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6047786a6f21Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6048786a6f21Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6049786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050786a6f21Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6051786a6f21Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6052786a6f21Smrg	    _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'
6053786a6f21Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6054786a6f21Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6055786a6f21Smrg	  fi
6056786a6f21Smrg	  output_verbose_link_cmd=echo
6057786a6f21Smrg	else
6058786a6f21Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6059786a6f21Smrg	fi
6060786a6f21Smrg	;;
60611d54945dSmrg
6062786a6f21Smrg      osf3* | osf4* | osf5*)
6063786a6f21Smrg        case $cc_basename in
6064786a6f21Smrg          KCC*)
6065786a6f21Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6066786a6f21Smrg
6067786a6f21Smrg	    # KCC will only create a shared library if the output file
6068786a6f21Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6069786a6f21Smrg	    # to its proper name (with version) after linking.
6070786a6f21Smrg	    _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'
6071786a6f21Smrg
6072786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6073786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6074786a6f21Smrg
6075786a6f21Smrg	    # Archives containing C++ object files must be created using
6076786a6f21Smrg	    # the KAI C++ compiler.
6077786a6f21Smrg	    case $host in
6078786a6f21Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6079786a6f21Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6080786a6f21Smrg	    esac
6081786a6f21Smrg	    ;;
6082786a6f21Smrg          RCC*)
6083786a6f21Smrg	    # Rational C++ 2.4.1
6084786a6f21Smrg	    # FIXME: insert proper C++ library support
6085786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6086786a6f21Smrg	    ;;
6087786a6f21Smrg          cxx*)
6088786a6f21Smrg	    case $host in
6089786a6f21Smrg	      osf3*)
6090786a6f21Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6091786a6f21Smrg	        _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'
6092786a6f21Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6093786a6f21Smrg		;;
6094786a6f21Smrg	      *)
6095786a6f21Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6096786a6f21Smrg	        _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'
6097786a6f21Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6098786a6f21Smrg	          echo "-hidden">> $lib.exp~
6099786a6f21Smrg	          $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~
6100786a6f21Smrg	          $RM $lib.exp'
6101786a6f21Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6102786a6f21Smrg		;;
6103786a6f21Smrg	    esac
61041d54945dSmrg
6105786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
61061d54945dSmrg
6107786a6f21Smrg	    # Commands to make compiler produce verbose output that lists
6108786a6f21Smrg	    # what "hidden" libraries, object files and flags are used when
6109786a6f21Smrg	    # linking a shared library.
6110786a6f21Smrg	    #
6111786a6f21Smrg	    # There doesn't appear to be a way to prevent this compiler from
6112786a6f21Smrg	    # explicitly linking system object files so we need to strip them
6113786a6f21Smrg	    # from the output so that they don't get included in the library
6114786a6f21Smrg	    # dependencies.
6115786a6f21Smrg	    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'
6116786a6f21Smrg	    ;;
6117786a6f21Smrg	  *)
6118786a6f21Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6119786a6f21Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6120786a6f21Smrg	      case $host in
6121786a6f21Smrg	        osf3*)
6122786a6f21Smrg	          _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'
6123786a6f21Smrg		  ;;
6124786a6f21Smrg	        *)
6125786a6f21Smrg	          _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'
6126786a6f21Smrg		  ;;
6127786a6f21Smrg	      esac
6128786a6f21Smrg
6129786a6f21Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130786a6f21Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6131786a6f21Smrg
6132786a6f21Smrg	      # Commands to make compiler produce verbose output that lists
6133786a6f21Smrg	      # what "hidden" libraries, object files and flags are used when
6134786a6f21Smrg	      # linking a shared library.
6135786a6f21Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6136786a6f21Smrg
6137786a6f21Smrg	    else
6138786a6f21Smrg	      # FIXME: insert proper C++ library support
6139786a6f21Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6140786a6f21Smrg	    fi
6141786a6f21Smrg	    ;;
6142786a6f21Smrg        esac
6143786a6f21Smrg        ;;
61441d54945dSmrg
6145786a6f21Smrg      psos*)
6146786a6f21Smrg        # FIXME: insert proper C++ library support
6147786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6148786a6f21Smrg        ;;
61491d54945dSmrg
6150786a6f21Smrg      sunos4*)
6151786a6f21Smrg        case $cc_basename in
6152786a6f21Smrg          CC*)
6153786a6f21Smrg	    # Sun C++ 4.x
6154786a6f21Smrg	    # FIXME: insert proper C++ library support
6155786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6156786a6f21Smrg	    ;;
6157786a6f21Smrg          lcc*)
6158786a6f21Smrg	    # Lucid
6159786a6f21Smrg	    # FIXME: insert proper C++ library support
6160786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6161786a6f21Smrg	    ;;
6162786a6f21Smrg          *)
6163786a6f21Smrg	    # FIXME: insert proper C++ library support
6164786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6165786a6f21Smrg	    ;;
6166786a6f21Smrg        esac
6167786a6f21Smrg        ;;
61681d54945dSmrg
6169786a6f21Smrg      solaris*)
6170786a6f21Smrg        case $cc_basename in
6171786a6f21Smrg          CC*)
6172786a6f21Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
6173786a6f21Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6174786a6f21Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6175786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6176786a6f21Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6177786a6f21Smrg	      $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'
6178786a6f21Smrg
6179786a6f21Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6180786a6f21Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6181786a6f21Smrg	    case $host_os in
6182786a6f21Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6183786a6f21Smrg	      *)
6184786a6f21Smrg		# The compiler driver will combine and reorder linker options,
6185786a6f21Smrg		# but understands `-z linker_flag'.
6186786a6f21Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6187786a6f21Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6188786a6f21Smrg	        ;;
6189786a6f21Smrg	    esac
6190786a6f21Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
61911d54945dSmrg
6192786a6f21Smrg	    output_verbose_link_cmd='echo'
61931d54945dSmrg
6194786a6f21Smrg	    # Archives containing C++ object files must be created using
6195786a6f21Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6196786a6f21Smrg	    # necessary to make sure instantiated templates are included
6197786a6f21Smrg	    # in the archive.
6198786a6f21Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6199786a6f21Smrg	    ;;
6200786a6f21Smrg          gcx*)
6201786a6f21Smrg	    # Green Hills C++ Compiler
6202786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62031d54945dSmrg
6204786a6f21Smrg	    # The C++ compiler must be used to create the archive.
6205786a6f21Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6206786a6f21Smrg	    ;;
6207786a6f21Smrg          *)
6208786a6f21Smrg	    # GNU C++ compiler with Solaris linker
6209786a6f21Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6210786a6f21Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6211786a6f21Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6212786a6f21Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6213786a6f21Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6214786a6f21Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6215786a6f21Smrg
6216786a6f21Smrg	        # Commands to make compiler produce verbose output that lists
6217786a6f21Smrg	        # what "hidden" libraries, object files and flags are used when
6218786a6f21Smrg	        # linking a shared library.
6219786a6f21Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6220786a6f21Smrg	      else
6221786a6f21Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6222786a6f21Smrg	        # platform.
6223786a6f21Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6224786a6f21Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6225786a6f21Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6226786a6f21Smrg
6227786a6f21Smrg	        # Commands to make compiler produce verbose output that lists
6228786a6f21Smrg	        # what "hidden" libraries, object files and flags are used when
6229786a6f21Smrg	        # linking a shared library.
6230786a6f21Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6231786a6f21Smrg	      fi
6232786a6f21Smrg
6233786a6f21Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6234786a6f21Smrg	      case $host_os in
6235786a6f21Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6236786a6f21Smrg		*)
6237786a6f21Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6238786a6f21Smrg		  ;;
6239786a6f21Smrg	      esac
6240786a6f21Smrg	    fi
6241786a6f21Smrg	    ;;
6242786a6f21Smrg        esac
6243786a6f21Smrg        ;;
62441d54945dSmrg
6245786a6f21Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6246786a6f21Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6247786a6f21Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6248786a6f21Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249786a6f21Smrg      runpath_var='LD_RUN_PATH'
62501d54945dSmrg
6251786a6f21Smrg      case $cc_basename in
6252786a6f21Smrg        CC*)
6253786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6254786a6f21Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6255786a6f21Smrg	  ;;
6256786a6f21Smrg	*)
6257786a6f21Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6258786a6f21Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6259786a6f21Smrg	  ;;
6260786a6f21Smrg      esac
6261786a6f21Smrg      ;;
62621d54945dSmrg
6263786a6f21Smrg      sysv5* | sco3.2v5* | sco5v6*)
6264786a6f21Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
6265786a6f21Smrg	# link with -lc, and that would cause any symbols used from libc to
6266786a6f21Smrg	# always be unresolved, which means just about no library would
6267786a6f21Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
6268786a6f21Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
6269786a6f21Smrg	# as -z defs.
6270786a6f21Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6271786a6f21Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6272786a6f21Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6273786a6f21Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6274786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6275786a6f21Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6276786a6f21Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6277786a6f21Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6278786a6f21Smrg	runpath_var='LD_RUN_PATH'
62791d54945dSmrg
6280786a6f21Smrg	case $cc_basename in
6281786a6f21Smrg          CC*)
6282786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6283786a6f21Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6284786a6f21Smrg	    ;;
6285786a6f21Smrg	  *)
6286786a6f21Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6287786a6f21Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6288786a6f21Smrg	    ;;
6289786a6f21Smrg	esac
6290786a6f21Smrg      ;;
62911d54945dSmrg
6292786a6f21Smrg      tandem*)
6293786a6f21Smrg        case $cc_basename in
6294786a6f21Smrg          NCC*)
6295786a6f21Smrg	    # NonStop-UX NCC 3.20
6296786a6f21Smrg	    # FIXME: insert proper C++ library support
6297786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6298786a6f21Smrg	    ;;
6299786a6f21Smrg          *)
6300786a6f21Smrg	    # FIXME: insert proper C++ library support
6301786a6f21Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6302786a6f21Smrg	    ;;
6303786a6f21Smrg        esac
6304786a6f21Smrg        ;;
63051d54945dSmrg
6306786a6f21Smrg      vxworks*)
6307786a6f21Smrg        # FIXME: insert proper C++ library support
6308786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6309786a6f21Smrg        ;;
63101d54945dSmrg
6311786a6f21Smrg      *)
6312786a6f21Smrg        # FIXME: insert proper C++ library support
6313786a6f21Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6314786a6f21Smrg        ;;
6315786a6f21Smrg    esac
63161d54945dSmrg
6317786a6f21Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6318786a6f21Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6319786a6f21Smrg
6320786a6f21Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
6321786a6f21Smrg    _LT_TAGVAR(LD, $1)="$LD"
6322786a6f21Smrg
6323786a6f21Smrg    ## CAVEAT EMPTOR:
6324786a6f21Smrg    ## There is no encapsulation within the following macros, do not change
6325786a6f21Smrg    ## the running order or otherwise move them around unless you know exactly
6326786a6f21Smrg    ## what you are doing...
6327786a6f21Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6328786a6f21Smrg    _LT_COMPILER_PIC($1)
6329786a6f21Smrg    _LT_COMPILER_C_O($1)
6330786a6f21Smrg    _LT_COMPILER_FILE_LOCKS($1)
6331786a6f21Smrg    _LT_LINKER_SHLIBS($1)
6332786a6f21Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6333786a6f21Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6334786a6f21Smrg
6335786a6f21Smrg    _LT_CONFIG($1)
6336786a6f21Smrg  fi # test -n "$compiler"
6337786a6f21Smrg
6338786a6f21Smrg  CC=$lt_save_CC
6339786a6f21Smrg  LDCXX=$LD
6340786a6f21Smrg  LD=$lt_save_LD
6341786a6f21Smrg  GCC=$lt_save_GCC
6342786a6f21Smrg  with_gnu_ld=$lt_save_with_gnu_ld
6343786a6f21Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6344786a6f21Smrg  lt_cv_path_LD=$lt_save_path_LD
6345786a6f21Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6346786a6f21Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6347786a6f21Smrgfi # test "$_lt_caught_CXX_error" != yes
63481d54945dSmrg
6349786a6f21SmrgAC_LANG_POP
6350786a6f21Smrg])# _LT_LANG_CXX_CONFIG
63511d54945dSmrg
63521d54945dSmrg
6353786a6f21Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6354786a6f21Smrg# ---------------------------------
6355786a6f21Smrg# Figure out "hidden" library dependencies from verbose
6356786a6f21Smrg# compiler output when linking a shared library.
6357786a6f21Smrg# Parse the compiler output and extract the necessary
6358786a6f21Smrg# objects, libraries and library flags.
6359786a6f21Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6360786a6f21Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6361786a6f21Smrg# Dependencies to place before and after the object being linked:
6362786a6f21Smrg_LT_TAGVAR(predep_objects, $1)=
6363786a6f21Smrg_LT_TAGVAR(postdep_objects, $1)=
6364786a6f21Smrg_LT_TAGVAR(predeps, $1)=
6365786a6f21Smrg_LT_TAGVAR(postdeps, $1)=
6366786a6f21Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
63671d54945dSmrg
6368786a6f21Smrgdnl we can't use the lt_simple_compile_test_code here,
6369786a6f21Smrgdnl because it contains code intended for an executable,
6370786a6f21Smrgdnl not a library.  It's possible we should let each
6371786a6f21Smrgdnl tag define a new lt_????_link_test_code variable,
6372786a6f21Smrgdnl but it's only used here...
6373786a6f21Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6374786a6f21Smrgint a;
6375786a6f21Smrgvoid foo (void) { a = 0; }
6376786a6f21Smrg_LT_EOF
6377786a6f21Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6378786a6f21Smrgclass Foo
63791d54945dSmrg{
6380786a6f21Smrgpublic:
6381786a6f21Smrg  Foo (void) { a = 0; }
6382786a6f21Smrgprivate:
6383786a6f21Smrg  int a;
6384786a6f21Smrg};
6385786a6f21Smrg_LT_EOF
6386786a6f21Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6387786a6f21Smrg      subroutine foo
6388786a6f21Smrg      implicit none
6389786a6f21Smrg      integer*4 a
6390786a6f21Smrg      a=0
6391786a6f21Smrg      return
6392786a6f21Smrg      end
6393786a6f21Smrg_LT_EOF
6394786a6f21Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6395786a6f21Smrg      subroutine foo
6396786a6f21Smrg      implicit none
6397786a6f21Smrg      integer a
6398786a6f21Smrg      a=0
6399786a6f21Smrg      return
6400786a6f21Smrg      end
6401786a6f21Smrg_LT_EOF
6402786a6f21Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6403786a6f21Smrgpublic class foo {
6404786a6f21Smrg  private int a;
6405786a6f21Smrg  public void bar (void) {
6406786a6f21Smrg    a = 0;
6407786a6f21Smrg  }
64081d54945dSmrg};
6409786a6f21Smrg_LT_EOF
6410786a6f21Smrg])
6411786a6f21Smrgdnl Parse the compiler output and extract the necessary
6412786a6f21Smrgdnl objects, libraries and library flags.
6413786a6f21Smrgif AC_TRY_EVAL(ac_compile); then
6414786a6f21Smrg  # Parse the compiler output and extract the necessary
6415786a6f21Smrg  # objects, libraries and library flags.
64161d54945dSmrg
6417786a6f21Smrg  # Sentinel used to keep track of whether or not we are before
6418786a6f21Smrg  # the conftest object file.
6419786a6f21Smrg  pre_test_object_deps_done=no
64201d54945dSmrg
6421786a6f21Smrg  for p in `eval "$output_verbose_link_cmd"`; do
6422786a6f21Smrg    case $p in
6423786a6f21Smrg
6424786a6f21Smrg    -L* | -R* | -l*)
6425786a6f21Smrg       # Some compilers place space between "-{L,R}" and the path.
6426786a6f21Smrg       # Remove the space.
6427786a6f21Smrg       if test $p = "-L" ||
6428786a6f21Smrg          test $p = "-R"; then
6429786a6f21Smrg	 prev=$p
6430786a6f21Smrg	 continue
6431786a6f21Smrg       else
6432786a6f21Smrg	 prev=
6433786a6f21Smrg       fi
6434786a6f21Smrg
6435786a6f21Smrg       if test "$pre_test_object_deps_done" = no; then
6436786a6f21Smrg	 case $p in
6437786a6f21Smrg	 -L* | -R*)
6438786a6f21Smrg	   # Internal compiler library paths should come after those
6439786a6f21Smrg	   # provided the user.  The postdeps already come after the
6440786a6f21Smrg	   # user supplied libs so there is no need to process them.
6441786a6f21Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6442786a6f21Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6443786a6f21Smrg	   else
6444786a6f21Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6445786a6f21Smrg	   fi
6446786a6f21Smrg	   ;;
6447786a6f21Smrg	 # The "-l" case would never come before the object being
6448786a6f21Smrg	 # linked, so don't bother handling this case.
6449786a6f21Smrg	 esac
6450786a6f21Smrg       else
6451786a6f21Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6452786a6f21Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6453786a6f21Smrg	 else
6454786a6f21Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6455786a6f21Smrg	 fi
6456786a6f21Smrg       fi
6457786a6f21Smrg       ;;
6458786a6f21Smrg
6459786a6f21Smrg    *.$objext)
6460786a6f21Smrg       # This assumes that the test object file only shows up
6461786a6f21Smrg       # once in the compiler output.
6462786a6f21Smrg       if test "$p" = "conftest.$objext"; then
6463786a6f21Smrg	 pre_test_object_deps_done=yes
6464786a6f21Smrg	 continue
6465786a6f21Smrg       fi
6466786a6f21Smrg
6467786a6f21Smrg       if test "$pre_test_object_deps_done" = no; then
6468786a6f21Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6469786a6f21Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6470786a6f21Smrg	 else
6471786a6f21Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6472786a6f21Smrg	 fi
6473786a6f21Smrg       else
6474786a6f21Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6475786a6f21Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6476786a6f21Smrg	 else
6477786a6f21Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6478786a6f21Smrg	 fi
6479786a6f21Smrg       fi
6480786a6f21Smrg       ;;
6481786a6f21Smrg
6482786a6f21Smrg    *) ;; # Ignore the rest.
6483786a6f21Smrg
6484786a6f21Smrg    esac
6485786a6f21Smrg  done
6486786a6f21Smrg
6487786a6f21Smrg  # Clean up.
6488786a6f21Smrg  rm -f a.out a.exe
64891d54945dSmrgelse
6490786a6f21Smrg  echo "libtool.m4: error: problem compiling $1 test program"
64911d54945dSmrgfi
64921d54945dSmrg
6493786a6f21Smrg$RM -f confest.$objext
64941d54945dSmrg
6495786a6f21Smrg# PORTME: override above test on systems where it is broken
6496786a6f21Smrgm4_if([$1], [CXX],
6497786a6f21Smrg[case $host_os in
6498786a6f21Smrginterix[[3-9]]*)
6499786a6f21Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6500786a6f21Smrg  # hack all around it, let's just trust "g++" to DTRT.
6501786a6f21Smrg  _LT_TAGVAR(predep_objects,$1)=
6502786a6f21Smrg  _LT_TAGVAR(postdep_objects,$1)=
6503786a6f21Smrg  _LT_TAGVAR(postdeps,$1)=
6504786a6f21Smrg  ;;
65051d54945dSmrg
6506786a6f21Smrglinux*)
6507786a6f21Smrg  case `$CC -V 2>&1 | sed 5q` in
6508786a6f21Smrg  *Sun\ C*)
6509786a6f21Smrg    # Sun C++ 5.9
65101d54945dSmrg
6511786a6f21Smrg    # The more standards-conforming stlport4 library is
6512786a6f21Smrg    # incompatible with the Cstd library. Avoid specifying
6513786a6f21Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
6514786a6f21Smrg    # -library=stlport4 depends on it.
6515786a6f21Smrg    case " $CXX $CXXFLAGS " in
6516786a6f21Smrg    *" -library=stlport4 "*)
6517786a6f21Smrg      solaris_use_stlport4=yes
65181d54945dSmrg      ;;
6519786a6f21Smrg    esac
6520786a6f21Smrg
6521786a6f21Smrg    if test "$solaris_use_stlport4" != yes; then
6522786a6f21Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6523786a6f21Smrg    fi
6524786a6f21Smrg    ;;
6525786a6f21Smrg  esac
6526786a6f21Smrg  ;;
6527786a6f21Smrg
6528786a6f21Smrgsolaris*)
6529786a6f21Smrg  case $cc_basename in
6530786a6f21Smrg  CC*)
6531786a6f21Smrg    # The more standards-conforming stlport4 library is
6532786a6f21Smrg    # incompatible with the Cstd library. Avoid specifying
6533786a6f21Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
6534786a6f21Smrg    # -library=stlport4 depends on it.
6535786a6f21Smrg    case " $CXX $CXXFLAGS " in
6536786a6f21Smrg    *" -library=stlport4 "*)
6537786a6f21Smrg      solaris_use_stlport4=yes
65381d54945dSmrg      ;;
65391d54945dSmrg    esac
6540786a6f21Smrg
6541786a6f21Smrg    # Adding this requires a known-good setup of shared libraries for
6542786a6f21Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
6543786a6f21Smrg    # archive will be linked into the output, leading to subtle bugs.
6544786a6f21Smrg    if test "$solaris_use_stlport4" != yes; then
6545786a6f21Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6546786a6f21Smrg    fi
6547786a6f21Smrg    ;;
6548786a6f21Smrg  esac
6549786a6f21Smrg  ;;
6550786a6f21Smrgesac
6551786a6f21Smrg])
6552786a6f21Smrg
6553786a6f21Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
6554786a6f21Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6555786a6f21Smrgesac
6556786a6f21Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6557786a6f21Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6558786a6f21Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6559786a6f21Smrgfi
6560786a6f21Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6561786a6f21Smrg    [The directories searched by this compiler when creating a shared library])
6562786a6f21Smrg_LT_TAGDECL([], [predep_objects], [1],
6563786a6f21Smrg    [Dependencies to place before and after the objects being linked to
6564786a6f21Smrg    create a shared library])
6565786a6f21Smrg_LT_TAGDECL([], [postdep_objects], [1])
6566786a6f21Smrg_LT_TAGDECL([], [predeps], [1])
6567786a6f21Smrg_LT_TAGDECL([], [postdeps], [1])
6568786a6f21Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6569786a6f21Smrg    [The library search path used internally by the compiler when linking
6570786a6f21Smrg    a shared library])
6571786a6f21Smrg])# _LT_SYS_HIDDEN_LIBDEPS
6572786a6f21Smrg
6573786a6f21Smrg
6574786a6f21Smrg# _LT_PROG_F77
6575786a6f21Smrg# ------------
6576786a6f21Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6577786a6f21Smrg# if there is no fortran compiler, we have our own version here.
6578786a6f21Smrgm4_defun([_LT_PROG_F77],
6579786a6f21Smrg[
6580786a6f21Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6581786a6f21SmrgAC_PROG_F77
6582786a6f21Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
6583786a6f21Smrg  _lt_disable_F77=yes
6584786a6f21Smrgfi
6585786a6f21Smrgpopdef([AC_MSG_ERROR])
6586786a6f21Smrg])# _LT_PROG_F77
6587786a6f21Smrg
6588786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
6589786a6f21Smrgdnl AC_DEFUN([_LT_PROG_F77], [])
6590786a6f21Smrg
6591786a6f21Smrg
6592786a6f21Smrg# _LT_LANG_F77_CONFIG([TAG])
6593786a6f21Smrg# --------------------------
6594786a6f21Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
6595786a6f21Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6596786a6f21Smrg# to write the compiler configuration to `libtool'.
6597786a6f21Smrgm4_defun([_LT_LANG_F77_CONFIG],
6598786a6f21Smrg[AC_REQUIRE([_LT_PROG_F77])dnl
6599786a6f21SmrgAC_LANG_PUSH(Fortran 77)
6600786a6f21Smrg
6601786a6f21Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6602786a6f21Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6603786a6f21Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6604786a6f21Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6605786a6f21Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6606786a6f21Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6607786a6f21Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6608786a6f21Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6609786a6f21Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6610786a6f21Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6611786a6f21Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6612786a6f21Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6613786a6f21Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6614786a6f21Smrg_LT_TAGVAR(module_cmds, $1)=
6615786a6f21Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6616786a6f21Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6617786a6f21Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6618786a6f21Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6619786a6f21Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6620786a6f21Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6621786a6f21Smrg
6622786a6f21Smrg# Source file extension for f77 test sources.
6623786a6f21Smrgac_ext=f
6624786a6f21Smrg
6625786a6f21Smrg# Object file extension for compiled f77 test sources.
6626786a6f21Smrgobjext=o
6627786a6f21Smrg_LT_TAGVAR(objext, $1)=$objext
6628786a6f21Smrg
6629786a6f21Smrg# No sense in running all these tests if we already determined that
6630786a6f21Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6631786a6f21Smrg# are currently assumed to apply to all compilers on this platform,
6632786a6f21Smrg# and will be corrupted by setting them based on a non-working compiler.
6633786a6f21Smrgif test "$_lt_disable_F77" != yes; then
6634786a6f21Smrg  # Code to be used in simple compile tests
6635786a6f21Smrg  lt_simple_compile_test_code="\
6636786a6f21Smrg      subroutine t
6637786a6f21Smrg      return
6638786a6f21Smrg      end
6639786a6f21Smrg"
6640786a6f21Smrg
6641786a6f21Smrg  # Code to be used in simple link tests
6642786a6f21Smrg  lt_simple_link_test_code="\
6643786a6f21Smrg      program t
6644786a6f21Smrg      end
6645786a6f21Smrg"
6646786a6f21Smrg
6647786a6f21Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6648786a6f21Smrg  _LT_TAG_COMPILER
6649786a6f21Smrg
6650786a6f21Smrg  # save warnings/boilerplate of simple test code
6651786a6f21Smrg  _LT_COMPILER_BOILERPLATE
6652786a6f21Smrg  _LT_LINKER_BOILERPLATE
6653786a6f21Smrg
6654786a6f21Smrg  # Allow CC to be a program name with arguments.
6655786a6f21Smrg  lt_save_CC="$CC"
6656786a6f21Smrg  lt_save_GCC=$GCC
6657786a6f21Smrg  CC=${F77-"f77"}
6658786a6f21Smrg  compiler=$CC
6659786a6f21Smrg  _LT_TAGVAR(compiler, $1)=$CC
6660786a6f21Smrg  _LT_CC_BASENAME([$compiler])
6661786a6f21Smrg  GCC=$G77
6662786a6f21Smrg  if test -n "$compiler"; then
6663786a6f21Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6664786a6f21Smrg    AC_MSG_RESULT([$can_build_shared])
6665786a6f21Smrg
6666786a6f21Smrg    AC_MSG_CHECKING([whether to build shared libraries])
6667786a6f21Smrg    test "$can_build_shared" = "no" && enable_shared=no
6668786a6f21Smrg
6669786a6f21Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
6670786a6f21Smrg    # are all built from PIC.
6671786a6f21Smrg    case $host_os in
6672786a6f21Smrg      aix3*)
6673786a6f21Smrg        test "$enable_shared" = yes && enable_static=no
6674786a6f21Smrg        if test -n "$RANLIB"; then
6675786a6f21Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6676786a6f21Smrg          postinstall_cmds='$RANLIB $lib'
6677786a6f21Smrg        fi
6678786a6f21Smrg        ;;
6679786a6f21Smrg      aix[[4-9]]*)
6680786a6f21Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6681786a6f21Smrg	  test "$enable_shared" = yes && enable_static=no
6682786a6f21Smrg	fi
6683786a6f21Smrg        ;;
66841d54945dSmrg    esac
6685786a6f21Smrg    AC_MSG_RESULT([$enable_shared])
6686786a6f21Smrg
6687786a6f21Smrg    AC_MSG_CHECKING([whether to build static libraries])
6688786a6f21Smrg    # Make sure either enable_shared or enable_static is yes.
6689786a6f21Smrg    test "$enable_shared" = yes || enable_static=yes
6690786a6f21Smrg    AC_MSG_RESULT([$enable_static])
6691786a6f21Smrg
6692786a6f21Smrg    _LT_TAGVAR(GCC, $1)="$G77"
6693786a6f21Smrg    _LT_TAGVAR(LD, $1)="$LD"
6694786a6f21Smrg
6695786a6f21Smrg    ## CAVEAT EMPTOR:
6696786a6f21Smrg    ## There is no encapsulation within the following macros, do not change
6697786a6f21Smrg    ## the running order or otherwise move them around unless you know exactly
6698786a6f21Smrg    ## what you are doing...
6699786a6f21Smrg    _LT_COMPILER_PIC($1)
6700786a6f21Smrg    _LT_COMPILER_C_O($1)
6701786a6f21Smrg    _LT_COMPILER_FILE_LOCKS($1)
6702786a6f21Smrg    _LT_LINKER_SHLIBS($1)
6703786a6f21Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6704786a6f21Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6705786a6f21Smrg
6706786a6f21Smrg    _LT_CONFIG($1)
6707786a6f21Smrg  fi # test -n "$compiler"
6708786a6f21Smrg
6709786a6f21Smrg  GCC=$lt_save_GCC
6710786a6f21Smrg  CC="$lt_save_CC"
6711786a6f21Smrgfi # test "$_lt_disable_F77" != yes
6712786a6f21Smrg
6713786a6f21SmrgAC_LANG_POP
6714786a6f21Smrg])# _LT_LANG_F77_CONFIG
6715786a6f21Smrg
6716786a6f21Smrg
6717786a6f21Smrg# _LT_PROG_FC
6718786a6f21Smrg# -----------
6719786a6f21Smrg# Since AC_PROG_FC is broken, in that it returns the empty string
6720786a6f21Smrg# if there is no fortran compiler, we have our own version here.
6721786a6f21Smrgm4_defun([_LT_PROG_FC],
67221d54945dSmrg[
6723786a6f21Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6724786a6f21SmrgAC_PROG_FC
6725786a6f21Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
6726786a6f21Smrg  _lt_disable_FC=yes
6727786a6f21Smrgfi
6728786a6f21Smrgpopdef([AC_MSG_ERROR])
6729786a6f21Smrg])# _LT_PROG_FC
6730786a6f21Smrg
6731786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
6732786a6f21Smrgdnl AC_DEFUN([_LT_PROG_FC], [])
6733786a6f21Smrg
6734786a6f21Smrg
6735786a6f21Smrg# _LT_LANG_FC_CONFIG([TAG])
6736786a6f21Smrg# -------------------------
6737786a6f21Smrg# Ensure that the configuration variables for a Fortran compiler are
6738786a6f21Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6739786a6f21Smrg# to write the compiler configuration to `libtool'.
6740786a6f21Smrgm4_defun([_LT_LANG_FC_CONFIG],
6741786a6f21Smrg[AC_REQUIRE([_LT_PROG_FC])dnl
6742786a6f21SmrgAC_LANG_PUSH(Fortran)
6743786a6f21Smrg
6744786a6f21Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6745786a6f21Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6746786a6f21Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6747786a6f21Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6748786a6f21Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6749786a6f21Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6750786a6f21Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6751786a6f21Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6752786a6f21Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6753786a6f21Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6754786a6f21Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6755786a6f21Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6756786a6f21Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6757786a6f21Smrg_LT_TAGVAR(module_cmds, $1)=
6758786a6f21Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6759786a6f21Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6760786a6f21Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6761786a6f21Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6762786a6f21Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6763786a6f21Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6764786a6f21Smrg
6765786a6f21Smrg# Source file extension for fc test sources.
6766786a6f21Smrgac_ext=${ac_fc_srcext-f}
6767786a6f21Smrg
6768786a6f21Smrg# Object file extension for compiled fc test sources.
6769786a6f21Smrgobjext=o
6770786a6f21Smrg_LT_TAGVAR(objext, $1)=$objext
6771786a6f21Smrg
6772786a6f21Smrg# No sense in running all these tests if we already determined that
6773786a6f21Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
6774786a6f21Smrg# are currently assumed to apply to all compilers on this platform,
6775786a6f21Smrg# and will be corrupted by setting them based on a non-working compiler.
6776786a6f21Smrgif test "$_lt_disable_FC" != yes; then
6777786a6f21Smrg  # Code to be used in simple compile tests
6778786a6f21Smrg  lt_simple_compile_test_code="\
6779786a6f21Smrg      subroutine t
6780786a6f21Smrg      return
6781786a6f21Smrg      end
6782786a6f21Smrg"
67831d54945dSmrg
6784786a6f21Smrg  # Code to be used in simple link tests
6785786a6f21Smrg  lt_simple_link_test_code="\
6786786a6f21Smrg      program t
6787786a6f21Smrg      end
6788786a6f21Smrg"
6789786a6f21Smrg
6790786a6f21Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6791786a6f21Smrg  _LT_TAG_COMPILER
6792786a6f21Smrg
6793786a6f21Smrg  # save warnings/boilerplate of simple test code
6794786a6f21Smrg  _LT_COMPILER_BOILERPLATE
6795786a6f21Smrg  _LT_LINKER_BOILERPLATE
6796786a6f21Smrg
6797786a6f21Smrg  # Allow CC to be a program name with arguments.
6798786a6f21Smrg  lt_save_CC="$CC"
6799786a6f21Smrg  lt_save_GCC=$GCC
6800786a6f21Smrg  CC=${FC-"f95"}
6801786a6f21Smrg  compiler=$CC
6802786a6f21Smrg  GCC=$ac_cv_fc_compiler_gnu
6803786a6f21Smrg
6804786a6f21Smrg  _LT_TAGVAR(compiler, $1)=$CC
6805786a6f21Smrg  _LT_CC_BASENAME([$compiler])
6806786a6f21Smrg
6807786a6f21Smrg  if test -n "$compiler"; then
6808786a6f21Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6809786a6f21Smrg    AC_MSG_RESULT([$can_build_shared])
6810786a6f21Smrg
6811786a6f21Smrg    AC_MSG_CHECKING([whether to build shared libraries])
6812786a6f21Smrg    test "$can_build_shared" = "no" && enable_shared=no
6813786a6f21Smrg
6814786a6f21Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
6815786a6f21Smrg    # are all built from PIC.
68161d54945dSmrg    case $host_os in
6817786a6f21Smrg      aix3*)
6818786a6f21Smrg        test "$enable_shared" = yes && enable_static=no
6819786a6f21Smrg        if test -n "$RANLIB"; then
6820786a6f21Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821786a6f21Smrg          postinstall_cmds='$RANLIB $lib'
6822786a6f21Smrg        fi
6823786a6f21Smrg        ;;
6824786a6f21Smrg      aix[[4-9]]*)
6825786a6f21Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6826786a6f21Smrg	  test "$enable_shared" = yes && enable_static=no
6827786a6f21Smrg	fi
6828786a6f21Smrg        ;;
6829786a6f21Smrg    esac
6830786a6f21Smrg    AC_MSG_RESULT([$enable_shared])
6831786a6f21Smrg
6832786a6f21Smrg    AC_MSG_CHECKING([whether to build static libraries])
6833786a6f21Smrg    # Make sure either enable_shared or enable_static is yes.
6834786a6f21Smrg    test "$enable_shared" = yes || enable_static=yes
6835786a6f21Smrg    AC_MSG_RESULT([$enable_static])
6836786a6f21Smrg
6837786a6f21Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6838786a6f21Smrg    _LT_TAGVAR(LD, $1)="$LD"
6839786a6f21Smrg
6840786a6f21Smrg    ## CAVEAT EMPTOR:
6841786a6f21Smrg    ## There is no encapsulation within the following macros, do not change
6842786a6f21Smrg    ## the running order or otherwise move them around unless you know exactly
6843786a6f21Smrg    ## what you are doing...
6844786a6f21Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6845786a6f21Smrg    _LT_COMPILER_PIC($1)
6846786a6f21Smrg    _LT_COMPILER_C_O($1)
6847786a6f21Smrg    _LT_COMPILER_FILE_LOCKS($1)
6848786a6f21Smrg    _LT_LINKER_SHLIBS($1)
6849786a6f21Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6850786a6f21Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6851786a6f21Smrg
6852786a6f21Smrg    _LT_CONFIG($1)
6853786a6f21Smrg  fi # test -n "$compiler"
6854786a6f21Smrg
6855786a6f21Smrg  GCC=$lt_save_GCC
6856786a6f21Smrg  CC="$lt_save_CC"
6857786a6f21Smrgfi # test "$_lt_disable_FC" != yes
68581d54945dSmrg
6859786a6f21SmrgAC_LANG_POP
6860786a6f21Smrg])# _LT_LANG_FC_CONFIG
68611d54945dSmrg
68621d54945dSmrg
6863786a6f21Smrg# _LT_LANG_GCJ_CONFIG([TAG])
6864786a6f21Smrg# --------------------------
6865786a6f21Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6866786a6f21Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6867786a6f21Smrg# to write the compiler configuration to `libtool'.
6868786a6f21Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
6869786a6f21Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6870786a6f21SmrgAC_LANG_SAVE
68711d54945dSmrg
6872786a6f21Smrg# Source file extension for Java test sources.
6873786a6f21Smrgac_ext=java
68741d54945dSmrg
6875786a6f21Smrg# Object file extension for compiled Java test sources.
6876786a6f21Smrgobjext=o
6877786a6f21Smrg_LT_TAGVAR(objext, $1)=$objext
68781d54945dSmrg
6879786a6f21Smrg# Code to be used in simple compile tests
6880786a6f21Smrglt_simple_compile_test_code="class foo {}"
68811d54945dSmrg
6882786a6f21Smrg# Code to be used in simple link tests
6883786a6f21Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
68841d54945dSmrg
6885786a6f21Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6886786a6f21Smrg_LT_TAG_COMPILER
6887786a6f21Smrg
6888786a6f21Smrg# save warnings/boilerplate of simple test code
6889786a6f21Smrg_LT_COMPILER_BOILERPLATE
6890786a6f21Smrg_LT_LINKER_BOILERPLATE
6891786a6f21Smrg
6892786a6f21Smrg# Allow CC to be a program name with arguments.
6893786a6f21Smrglt_save_CC="$CC"
6894786a6f21Smrglt_save_GCC=$GCC
6895786a6f21SmrgGCC=yes
6896786a6f21SmrgCC=${GCJ-"gcj"}
6897786a6f21Smrgcompiler=$CC
6898786a6f21Smrg_LT_TAGVAR(compiler, $1)=$CC
6899786a6f21Smrg_LT_TAGVAR(LD, $1)="$LD"
6900786a6f21Smrg_LT_CC_BASENAME([$compiler])
6901786a6f21Smrg
6902786a6f21Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6903786a6f21Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6904786a6f21Smrg
6905786a6f21Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6906786a6f21Smrg
6907786a6f21Smrgif test -n "$compiler"; then
6908786a6f21Smrg  _LT_COMPILER_NO_RTTI($1)
6909786a6f21Smrg  _LT_COMPILER_PIC($1)
6910786a6f21Smrg  _LT_COMPILER_C_O($1)
6911786a6f21Smrg  _LT_COMPILER_FILE_LOCKS($1)
6912786a6f21Smrg  _LT_LINKER_SHLIBS($1)
6913786a6f21Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6914786a6f21Smrg
6915786a6f21Smrg  _LT_CONFIG($1)
6916786a6f21Smrgfi
6917786a6f21Smrg
6918786a6f21SmrgAC_LANG_RESTORE
6919786a6f21Smrg
6920786a6f21SmrgGCC=$lt_save_GCC
6921786a6f21SmrgCC="$lt_save_CC"
6922786a6f21Smrg])# _LT_LANG_GCJ_CONFIG
6923786a6f21Smrg
6924786a6f21Smrg
6925786a6f21Smrg# _LT_LANG_RC_CONFIG([TAG])
6926786a6f21Smrg# -------------------------
6927786a6f21Smrg# Ensure that the configuration variables for the Windows resource compiler
6928786a6f21Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6929786a6f21Smrg# to write the compiler configuration to `libtool'.
6930786a6f21Smrgm4_defun([_LT_LANG_RC_CONFIG],
6931786a6f21Smrg[AC_REQUIRE([LT_PROG_RC])dnl
6932786a6f21SmrgAC_LANG_SAVE
6933786a6f21Smrg
6934786a6f21Smrg# Source file extension for RC test sources.
6935786a6f21Smrgac_ext=rc
6936786a6f21Smrg
6937786a6f21Smrg# Object file extension for compiled RC test sources.
6938786a6f21Smrgobjext=o
6939786a6f21Smrg_LT_TAGVAR(objext, $1)=$objext
6940786a6f21Smrg
6941786a6f21Smrg# Code to be used in simple compile tests
6942786a6f21Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6943786a6f21Smrg
6944786a6f21Smrg# Code to be used in simple link tests
6945786a6f21Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
6946786a6f21Smrg
6947786a6f21Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6948786a6f21Smrg_LT_TAG_COMPILER
6949786a6f21Smrg
6950786a6f21Smrg# save warnings/boilerplate of simple test code
6951786a6f21Smrg_LT_COMPILER_BOILERPLATE
6952786a6f21Smrg_LT_LINKER_BOILERPLATE
6953786a6f21Smrg
6954786a6f21Smrg# Allow CC to be a program name with arguments.
6955786a6f21Smrglt_save_CC="$CC"
6956786a6f21Smrglt_save_GCC=$GCC
6957786a6f21SmrgGCC=
6958786a6f21SmrgCC=${RC-"windres"}
6959786a6f21Smrgcompiler=$CC
6960786a6f21Smrg_LT_TAGVAR(compiler, $1)=$CC
6961786a6f21Smrg_LT_CC_BASENAME([$compiler])
6962786a6f21Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
69631d54945dSmrg
6964786a6f21Smrgif test -n "$compiler"; then
6965786a6f21Smrg  :
6966786a6f21Smrg  _LT_CONFIG($1)
6967786a6f21Smrgfi
69681d54945dSmrg
6969786a6f21SmrgGCC=$lt_save_GCC
6970786a6f21SmrgAC_LANG_RESTORE
6971786a6f21SmrgCC="$lt_save_CC"
6972786a6f21Smrg])# _LT_LANG_RC_CONFIG
69731d54945dSmrg
69741d54945dSmrg
6975786a6f21Smrg# LT_PROG_GCJ
6976786a6f21Smrg# -----------
6977786a6f21SmrgAC_DEFUN([LT_PROG_GCJ],
6978786a6f21Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6979786a6f21Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6980786a6f21Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
6981786a6f21Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6982786a6f21Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
6983786a6f21Smrg])
69841d54945dSmrg
6985786a6f21Smrg# Old name:
6986786a6f21SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6987786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
6988786a6f21Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
69891d54945dSmrg
69901d54945dSmrg
6991786a6f21Smrg# LT_PROG_RC
6992786a6f21Smrg# ----------
6993786a6f21SmrgAC_DEFUN([LT_PROG_RC],
6994786a6f21Smrg[AC_CHECK_TOOL(RC, windres,)
6995786a6f21Smrg])
69961d54945dSmrg
6997786a6f21Smrg# Old name:
6998786a6f21SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6999786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7000786a6f21Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7001ba85709eSmrg
70021d54945dSmrg
7003786a6f21Smrg# _LT_DECL_EGREP
7004786a6f21Smrg# --------------
7005786a6f21Smrg# If we don't have a new enough Autoconf to choose the best grep
7006786a6f21Smrg# available, choose the one first in the user's PATH.
7007786a6f21Smrgm4_defun([_LT_DECL_EGREP],
7008786a6f21Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7009786a6f21SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7010786a6f21Smrgtest -z "$GREP" && GREP=grep
7011786a6f21Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7012786a6f21Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7013786a6f21Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7014786a6f21Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7015786a6f21SmrgAC_SUBST([GREP])
7016786a6f21Smrg])
70171d54945dSmrg
70181d54945dSmrg
7019786a6f21Smrg# _LT_DECL_OBJDUMP
7020786a6f21Smrg# --------------
7021786a6f21Smrg# If we don't have a new enough Autoconf to choose the best objdump
7022786a6f21Smrg# available, choose the one first in the user's PATH.
7023786a6f21Smrgm4_defun([_LT_DECL_OBJDUMP],
7024786a6f21Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7025786a6f21Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7026786a6f21Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7027786a6f21SmrgAC_SUBST([OBJDUMP])
7028786a6f21Smrg])
70291d54945dSmrg
70301d54945dSmrg
7031786a6f21Smrg# _LT_DECL_SED
7032786a6f21Smrg# ------------
7033786a6f21Smrg# Check for a fully-functional sed program, that truncates
7034786a6f21Smrg# as few characters as possible.  Prefer GNU sed if found.
7035786a6f21Smrgm4_defun([_LT_DECL_SED],
7036786a6f21Smrg[AC_PROG_SED
7037786a6f21Smrgtest -z "$SED" && SED=sed
7038786a6f21SmrgXsed="$SED -e 1s/^X//"
7039786a6f21Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7040786a6f21Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7041786a6f21Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7042786a6f21Smrg])# _LT_DECL_SED
70431d54945dSmrg
7044786a6f21Smrgm4_ifndef([AC_PROG_SED], [
7045786a6f21Smrg# NOTE: This macro has been submitted for inclusion into   #
7046786a6f21Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7047786a6f21Smrg#  a released version of Autoconf we should remove this    #
7048786a6f21Smrg#  macro and use it instead.                               #
70491d54945dSmrg
7050786a6f21Smrgm4_defun([AC_PROG_SED],
7051786a6f21Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7052786a6f21SmrgAC_CACHE_VAL(lt_cv_path_SED,
7053786a6f21Smrg[# Loop through the user's path and test for sed and gsed.
7054786a6f21Smrg# Then use that list of sed's as ones to test for truncation.
7055786a6f21Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056786a6f21Smrgfor as_dir in $PATH
7057786a6f21Smrgdo
7058786a6f21Smrg  IFS=$as_save_IFS
7059786a6f21Smrg  test -z "$as_dir" && as_dir=.
7060786a6f21Smrg  for lt_ac_prog in sed gsed; do
7061786a6f21Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
7062786a6f21Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7063786a6f21Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7064786a6f21Smrg      fi
7065786a6f21Smrg    done
7066786a6f21Smrg  done
7067786a6f21Smrgdone
7068786a6f21SmrgIFS=$as_save_IFS
7069786a6f21Smrglt_ac_max=0
7070786a6f21Smrglt_ac_count=0
7071786a6f21Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7072786a6f21Smrg# along with /bin/sed that truncates output.
7073786a6f21Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7074786a6f21Smrg  test ! -f $lt_ac_sed && continue
7075786a6f21Smrg  cat /dev/null > conftest.in
7076786a6f21Smrg  lt_ac_count=0
7077786a6f21Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7078786a6f21Smrg  # Check for GNU sed and select it if it is found.
7079786a6f21Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7080786a6f21Smrg    lt_cv_path_SED=$lt_ac_sed
7081786a6f21Smrg    break
70821d54945dSmrg  fi
7083786a6f21Smrg  while true; do
7084786a6f21Smrg    cat conftest.in conftest.in >conftest.tmp
7085786a6f21Smrg    mv conftest.tmp conftest.in
7086786a6f21Smrg    cp conftest.in conftest.nl
7087786a6f21Smrg    echo >>conftest.nl
7088786a6f21Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7089786a6f21Smrg    cmp -s conftest.out conftest.nl || break
7090786a6f21Smrg    # 10000 chars as input seems more than enough
7091786a6f21Smrg    test $lt_ac_count -gt 10 && break
7092786a6f21Smrg    lt_ac_count=`expr $lt_ac_count + 1`
7093786a6f21Smrg    if test $lt_ac_count -gt $lt_ac_max; then
7094786a6f21Smrg      lt_ac_max=$lt_ac_count
7095786a6f21Smrg      lt_cv_path_SED=$lt_ac_sed
7096786a6f21Smrg    fi
7097786a6f21Smrg  done
7098786a6f21Smrgdone
70991d54945dSmrg])
7100786a6f21SmrgSED=$lt_cv_path_SED
7101786a6f21SmrgAC_SUBST([SED])
7102786a6f21SmrgAC_MSG_RESULT([$SED])
7103786a6f21Smrg])#AC_PROG_SED
7104786a6f21Smrg])#m4_ifndef
71051d54945dSmrg
7106786a6f21Smrg# Old name:
7107786a6f21SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7108786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7109786a6f21Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7110786a6f21Smrg
7111786a6f21Smrg
7112786a6f21Smrg# _LT_CHECK_SHELL_FEATURES
7113786a6f21Smrg# ------------------------
7114786a6f21Smrg# Find out whether the shell is Bourne or XSI compatible,
7115786a6f21Smrg# or has some other useful features.
7116786a6f21Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7117786a6f21Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7118786a6f21Smrg# Try some XSI features
7119786a6f21Smrgxsi_shell=no
7120786a6f21Smrg( _lt_dummy="a/b/c"
7121786a6f21Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7122786a6f21Smrg      = c,a/b,, \
7123786a6f21Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7124786a6f21Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7125786a6f21Smrg  && xsi_shell=yes
7126786a6f21SmrgAC_MSG_RESULT([$xsi_shell])
7127786a6f21Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7128786a6f21Smrg
7129786a6f21SmrgAC_MSG_CHECKING([whether the shell understands "+="])
7130786a6f21Smrglt_shell_append=no
7131786a6f21Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7132786a6f21Smrg    >/dev/null 2>&1 \
7133786a6f21Smrg  && lt_shell_append=yes
7134786a6f21SmrgAC_MSG_RESULT([$lt_shell_append])
7135786a6f21Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7136786a6f21Smrg
7137786a6f21Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7138786a6f21Smrg  lt_unset=unset
7139786a6f21Smrgelse
7140786a6f21Smrg  lt_unset=false
71411d54945dSmrgfi
7142786a6f21Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7143786a6f21Smrg
7144786a6f21Smrg# test EBCDIC or ASCII
7145786a6f21Smrgcase `echo X|tr X '\101'` in
7146786a6f21Smrg A) # ASCII based system
7147786a6f21Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7148786a6f21Smrg  lt_SP2NL='tr \040 \012'
7149786a6f21Smrg  lt_NL2SP='tr \015\012 \040\040'
7150786a6f21Smrg  ;;
7151786a6f21Smrg *) # EBCDIC based system
7152786a6f21Smrg  lt_SP2NL='tr \100 \n'
7153786a6f21Smrg  lt_NL2SP='tr \r\n \100\100'
7154786a6f21Smrg  ;;
71551d54945dSmrgesac
7156786a6f21Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7157786a6f21Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7158786a6f21Smrg])# _LT_CHECK_SHELL_FEATURES
7159786a6f21Smrg
7160786a6f21Smrg
7161786a6f21Smrg# _LT_PROG_XSI_SHELLFNS
7162786a6f21Smrg# ---------------------
7163786a6f21Smrg# Bourne and XSI compatible variants of some useful shell functions.
7164786a6f21Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7165786a6f21Smrg[case $xsi_shell in
7166786a6f21Smrg  yes)
7167786a6f21Smrg    cat << \_LT_EOF >> "$cfgfile"
7168786a6f21Smrg
7169786a6f21Smrg# func_dirname file append nondir_replacement
7170786a6f21Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7171786a6f21Smrg# otherwise set result to NONDIR_REPLACEMENT.
7172786a6f21Smrgfunc_dirname ()
7173786a6f21Smrg{
7174786a6f21Smrg  case ${1} in
7175786a6f21Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
7176786a6f21Smrg    *  ) func_dirname_result="${3}" ;;
7177786a6f21Smrg  esac
7178786a6f21Smrg}
71791d54945dSmrg
7180786a6f21Smrg# func_basename file
7181786a6f21Smrgfunc_basename ()
7182786a6f21Smrg{
7183786a6f21Smrg  func_basename_result="${1##*/}"
7184786a6f21Smrg}
71851d54945dSmrg
7186786a6f21Smrg# func_dirname_and_basename file append nondir_replacement
7187786a6f21Smrg# perform func_basename and func_dirname in a single function
7188786a6f21Smrg# call:
7189786a6f21Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7190786a6f21Smrg#             add APPEND to the result, otherwise set result
7191786a6f21Smrg#             to NONDIR_REPLACEMENT.
7192786a6f21Smrg#             value returned in "$func_dirname_result"
7193786a6f21Smrg#   basename: Compute filename of FILE.
7194786a6f21Smrg#             value retuned in "$func_basename_result"
7195786a6f21Smrg# Implementation must be kept synchronized with func_dirname
7196786a6f21Smrg# and func_basename. For efficiency, we do not delegate to
7197786a6f21Smrg# those functions but instead duplicate the functionality here.
7198786a6f21Smrgfunc_dirname_and_basename ()
7199786a6f21Smrg{
7200786a6f21Smrg  case ${1} in
7201786a6f21Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
7202786a6f21Smrg    *  ) func_dirname_result="${3}" ;;
7203786a6f21Smrg  esac
7204786a6f21Smrg  func_basename_result="${1##*/}"
7205786a6f21Smrg}
72061d54945dSmrg
7207786a6f21Smrg# func_stripname prefix suffix name
7208786a6f21Smrg# strip PREFIX and SUFFIX off of NAME.
7209786a6f21Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7210786a6f21Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7211786a6f21Smrg# dot (in which case that matches only a dot).
7212786a6f21Smrgfunc_stripname ()
7213786a6f21Smrg{
7214786a6f21Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7215786a6f21Smrg  # positional parameters, so assign one to ordinary parameter first.
7216786a6f21Smrg  func_stripname_result=${3}
7217786a6f21Smrg  func_stripname_result=${func_stripname_result#"${1}"}
7218786a6f21Smrg  func_stripname_result=${func_stripname_result%"${2}"}
7219786a6f21Smrg}
7220786a6f21Smrg
7221786a6f21Smrg# func_opt_split
7222786a6f21Smrgfunc_opt_split ()
7223786a6f21Smrg{
7224786a6f21Smrg  func_opt_split_opt=${1%%=*}
7225786a6f21Smrg  func_opt_split_arg=${1#*=}
7226786a6f21Smrg}
7227786a6f21Smrg
7228786a6f21Smrg# func_lo2o object
7229786a6f21Smrgfunc_lo2o ()
7230786a6f21Smrg{
7231786a6f21Smrg  case ${1} in
7232786a6f21Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7233786a6f21Smrg    *)    func_lo2o_result=${1} ;;
72341d54945dSmrg  esac
7235786a6f21Smrg}
7236786a6f21Smrg
7237786a6f21Smrg# func_xform libobj-or-source
7238786a6f21Smrgfunc_xform ()
7239786a6f21Smrg{
7240786a6f21Smrg  func_xform_result=${1%.*}.lo
7241786a6f21Smrg}
7242786a6f21Smrg
7243786a6f21Smrg# func_arith arithmetic-term...
7244786a6f21Smrgfunc_arith ()
7245786a6f21Smrg{
7246786a6f21Smrg  func_arith_result=$(( $[*] ))
7247786a6f21Smrg}
7248786a6f21Smrg
7249786a6f21Smrg# func_len string
7250786a6f21Smrg# STRING may not start with a hyphen.
7251786a6f21Smrgfunc_len ()
7252786a6f21Smrg{
7253786a6f21Smrg  func_len_result=${#1}
7254786a6f21Smrg}
7255786a6f21Smrg
7256786a6f21Smrg_LT_EOF
72571d54945dSmrg    ;;
7258786a6f21Smrg  *) # Bourne compatible functions.
7259786a6f21Smrg    cat << \_LT_EOF >> "$cfgfile"
7260786a6f21Smrg
7261786a6f21Smrg# func_dirname file append nondir_replacement
7262786a6f21Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7263786a6f21Smrg# otherwise set result to NONDIR_REPLACEMENT.
7264786a6f21Smrgfunc_dirname ()
7265786a6f21Smrg{
7266786a6f21Smrg  # Extract subdirectory from the argument.
7267786a6f21Smrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7268786a6f21Smrg  if test "X$func_dirname_result" = "X${1}"; then
7269786a6f21Smrg    func_dirname_result="${3}"
7270786a6f21Smrg  else
7271786a6f21Smrg    func_dirname_result="$func_dirname_result${2}"
7272786a6f21Smrg  fi
7273786a6f21Smrg}
7274786a6f21Smrg
7275786a6f21Smrg# func_basename file
7276786a6f21Smrgfunc_basename ()
7277786a6f21Smrg{
7278786a6f21Smrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7279786a6f21Smrg}
7280786a6f21Smrg
7281786a6f21Smrgdnl func_dirname_and_basename
7282786a6f21Smrgdnl A portable version of this function is already defined in general.m4sh
7283786a6f21Smrgdnl so there is no need for it here.
7284786a6f21Smrg
7285786a6f21Smrg# func_stripname prefix suffix name
7286786a6f21Smrg# strip PREFIX and SUFFIX off of NAME.
7287786a6f21Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7288786a6f21Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7289786a6f21Smrg# dot (in which case that matches only a dot).
7290786a6f21Smrg# func_strip_suffix prefix name
7291786a6f21Smrgfunc_stripname ()
7292786a6f21Smrg{
7293786a6f21Smrg  case ${2} in
7294786a6f21Smrg    .*) func_stripname_result=`$ECHO "X${3}" \
7295786a6f21Smrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7296786a6f21Smrg    *)  func_stripname_result=`$ECHO "X${3}" \
7297786a6f21Smrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
72981d54945dSmrg  esac
7299786a6f21Smrg}
73001d54945dSmrg
7301786a6f21Smrg# sed scripts:
7302786a6f21Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7303786a6f21Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
73041d54945dSmrg
7305786a6f21Smrg# func_opt_split
7306786a6f21Smrgfunc_opt_split ()
7307786a6f21Smrg{
7308786a6f21Smrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7309786a6f21Smrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7310786a6f21Smrg}
73111d54945dSmrg
7312786a6f21Smrg# func_lo2o object
7313786a6f21Smrgfunc_lo2o ()
7314786a6f21Smrg{
7315786a6f21Smrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7316786a6f21Smrg}
73171d54945dSmrg
7318786a6f21Smrg# func_xform libobj-or-source
7319786a6f21Smrgfunc_xform ()
7320786a6f21Smrg{
7321786a6f21Smrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7322786a6f21Smrg}
73231d54945dSmrg
7324786a6f21Smrg# func_arith arithmetic-term...
7325786a6f21Smrgfunc_arith ()
7326786a6f21Smrg{
7327786a6f21Smrg  func_arith_result=`expr "$[@]"`
7328786a6f21Smrg}
73291d54945dSmrg
7330786a6f21Smrg# func_len string
7331786a6f21Smrg# STRING may not start with a hyphen.
7332786a6f21Smrgfunc_len ()
7333786a6f21Smrg{
7334786a6f21Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7335786a6f21Smrg}
73361d54945dSmrg
7337786a6f21Smrg_LT_EOF
7338786a6f21Smrgesac
73391d54945dSmrg
7340786a6f21Smrgcase $lt_shell_append in
7341786a6f21Smrg  yes)
7342786a6f21Smrg    cat << \_LT_EOF >> "$cfgfile"
73431d54945dSmrg
7344786a6f21Smrg# func_append var value
7345786a6f21Smrg# Append VALUE to the end of shell variable VAR.
7346786a6f21Smrgfunc_append ()
7347786a6f21Smrg{
7348786a6f21Smrg  eval "$[1]+=\$[2]"
7349786a6f21Smrg}
7350786a6f21Smrg_LT_EOF
7351786a6f21Smrg    ;;
7352786a6f21Smrg  *)
7353786a6f21Smrg    cat << \_LT_EOF >> "$cfgfile"
73541d54945dSmrg
7355786a6f21Smrg# func_append var value
7356786a6f21Smrg# Append VALUE to the end of shell variable VAR.
7357786a6f21Smrgfunc_append ()
7358786a6f21Smrg{
7359786a6f21Smrg  eval "$[1]=\$$[1]\$[2]"
7360786a6f21Smrg}
73611d54945dSmrg
7362786a6f21Smrg_LT_EOF
7363786a6f21Smrg    ;;
7364786a6f21Smrg  esac
7365786a6f21Smrg])
73661d54945dSmrg
7367786a6f21Smrg# Helper functions for option handling.                    -*- Autoconf -*-
7368786a6f21Smrg#
7369786a6f21Smrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7370786a6f21Smrg#   Written by Gary V. Vaughan, 2004
7371786a6f21Smrg#
7372786a6f21Smrg# This file is free software; the Free Software Foundation gives
7373786a6f21Smrg# unlimited permission to copy and/or distribute it, with or without
7374786a6f21Smrg# modifications, as long as this notice is preserved.
73751d54945dSmrg
7376786a6f21Smrg# serial 6 ltoptions.m4
73771d54945dSmrg
7378786a6f21Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7379786a6f21SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
73801d54945dSmrg
73811d54945dSmrg
7382786a6f21Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7383786a6f21Smrg# ------------------------------------------
7384786a6f21Smrgm4_define([_LT_MANGLE_OPTION],
7385786a6f21Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
73861d54945dSmrg
73871d54945dSmrg
7388786a6f21Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7389786a6f21Smrg# ---------------------------------------
7390786a6f21Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7391786a6f21Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7392786a6f21Smrg# saved as a flag.
7393786a6f21Smrgm4_define([_LT_SET_OPTION],
7394786a6f21Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7395786a6f21Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7396786a6f21Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
7397786a6f21Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7398786a6f21Smrg])
73991d54945dSmrg
74001d54945dSmrg
7401786a6f21Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7402786a6f21Smrg# ------------------------------------------------------------
7403786a6f21Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7404786a6f21Smrgm4_define([_LT_IF_OPTION],
7405786a6f21Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7406786a6f21Smrg
7407786a6f21Smrg
7408786a6f21Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7409786a6f21Smrg# -------------------------------------------------------
7410786a6f21Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7411786a6f21Smrg# are set.
7412786a6f21Smrgm4_define([_LT_UNLESS_OPTIONS],
7413786a6f21Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7414786a6f21Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7415786a6f21Smrg		      [m4_define([$0_found])])])[]dnl
7416786a6f21Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7417786a6f21Smrg])[]dnl
7418786a6f21Smrg])
74191d54945dSmrg
74201d54945dSmrg
7421786a6f21Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7422786a6f21Smrg# ----------------------------------------
7423786a6f21Smrg# OPTION-LIST is a space-separated list of Libtool options associated
7424786a6f21Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7425786a6f21Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7426786a6f21Smrg# the unknown option and exit.
7427786a6f21Smrgm4_defun([_LT_SET_OPTIONS],
7428786a6f21Smrg[# Set options
7429786a6f21Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430786a6f21Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
7431786a6f21Smrg
7432786a6f21Smrgm4_if([$1],[LT_INIT],[
7433786a6f21Smrg  dnl
7434786a6f21Smrg  dnl Simply set some default values (i.e off) if boolean options were not
7435786a6f21Smrg  dnl specified:
7436786a6f21Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7437786a6f21Smrg  ])
7438786a6f21Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7439786a6f21Smrg  ])
7440786a6f21Smrg  dnl
7441786a6f21Smrg  dnl If no reference was made to various pairs of opposing options, then
7442786a6f21Smrg  dnl we run the default mode handler for the pair.  For example, if neither
7443786a6f21Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7444786a6f21Smrg  dnl archives by default:
7445786a6f21Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7446786a6f21Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7447786a6f21Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7448786a6f21Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7449786a6f21Smrg  		   [_LT_ENABLE_FAST_INSTALL])
7450786a6f21Smrg  ])
7451786a6f21Smrg])# _LT_SET_OPTIONS
74521d54945dSmrg
74531d54945dSmrg
74541d54945dSmrg
7455786a6f21Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7456786a6f21Smrg# -----------------------------------------
7457786a6f21Smrgm4_define([_LT_MANGLE_DEFUN],
7458786a6f21Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
74591d54945dSmrg
74601d54945dSmrg
7461786a6f21Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7462786a6f21Smrg# -----------------------------------------------
7463786a6f21Smrgm4_define([LT_OPTION_DEFINE],
7464786a6f21Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7465786a6f21Smrg])# LT_OPTION_DEFINE
74661d54945dSmrg
74671d54945dSmrg
7468786a6f21Smrg# dlopen
7469786a6f21Smrg# ------
7470786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7471786a6f21Smrg])
7472786a6f21Smrg
7473786a6f21SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7474786a6f21Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7475786a6f21SmrgAC_DIAGNOSE([obsolete],
7476786a6f21Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7477786a6f21Smrgput the `dlopen' option into LT_INIT's first parameter.])
7478786a6f21Smrg])
7479786a6f21Smrg
7480786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7481786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7482786a6f21Smrg
7483786a6f21Smrg
7484786a6f21Smrg# win32-dll
7485786a6f21Smrg# ---------
7486786a6f21Smrg# Declare package support for building win32 dll's.
7487786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7488786a6f21Smrg[enable_win32_dll=yes
74891d54945dSmrg
7490786a6f21Smrgcase $host in
7491786a6f21Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7492786a6f21Smrg  AC_CHECK_TOOL(AS, as, false)
7493786a6f21Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7494786a6f21Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7495786a6f21Smrg  ;;
7496786a6f21Smrgesac
74971d54945dSmrg
7498786a6f21Smrgtest -z "$AS" && AS=as
7499786a6f21Smrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
75001d54945dSmrg
7501786a6f21Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7502786a6f21Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
75031d54945dSmrg
7504786a6f21Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7505786a6f21Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7506786a6f21Smrg])# win32-dll
75071d54945dSmrg
7508786a6f21SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7509786a6f21Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7510786a6f21Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7511786a6f21SmrgAC_DIAGNOSE([obsolete],
7512786a6f21Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7513786a6f21Smrgput the `win32-dll' option into LT_INIT's first parameter.])
7514786a6f21Smrg])
75151d54945dSmrg
7516786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7517786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
75181d54945dSmrg
75191d54945dSmrg
7520786a6f21Smrg# _LT_ENABLE_SHARED([DEFAULT])
7521786a6f21Smrg# ----------------------------
7522786a6f21Smrg# implement the --enable-shared flag, and supports the `shared' and
7523786a6f21Smrg# `disable-shared' LT_INIT options.
7524786a6f21Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7525786a6f21Smrgm4_define([_LT_ENABLE_SHARED],
7526786a6f21Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7527786a6f21SmrgAC_ARG_ENABLE([shared],
7528786a6f21Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7529786a6f21Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7530786a6f21Smrg    [p=${PACKAGE-default}
7531786a6f21Smrg    case $enableval in
7532786a6f21Smrg    yes) enable_shared=yes ;;
7533786a6f21Smrg    no) enable_shared=no ;;
7534786a6f21Smrg    *)
7535786a6f21Smrg      enable_shared=no
7536786a6f21Smrg      # Look at the argument we got.  We use all the common list separators.
7537786a6f21Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7538786a6f21Smrg      for pkg in $enableval; do
7539786a6f21Smrg	IFS="$lt_save_ifs"
7540786a6f21Smrg	if test "X$pkg" = "X$p"; then
7541786a6f21Smrg	  enable_shared=yes
7542786a6f21Smrg	fi
7543786a6f21Smrg      done
7544786a6f21Smrg      IFS="$lt_save_ifs"
75451d54945dSmrg      ;;
7546786a6f21Smrg    esac],
7547786a6f21Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
75481d54945dSmrg
7549786a6f21Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7550786a6f21Smrg	[Whether or not to build shared libraries])
7551786a6f21Smrg])# _LT_ENABLE_SHARED
75521d54945dSmrg
7553786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7554786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
75551d54945dSmrg
7556786a6f21Smrg# Old names:
7557786a6f21SmrgAC_DEFUN([AC_ENABLE_SHARED],
7558786a6f21Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7559786a6f21Smrg])
75601d54945dSmrg
7561786a6f21SmrgAC_DEFUN([AC_DISABLE_SHARED],
7562786a6f21Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7563786a6f21Smrg])
75641d54945dSmrg
7565786a6f21SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7566786a6f21SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
75671d54945dSmrg
7568786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7569786a6f21Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7570786a6f21Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
75711d54945dSmrg
75721d54945dSmrg
75731d54945dSmrg
7574786a6f21Smrg# _LT_ENABLE_STATIC([DEFAULT])
7575786a6f21Smrg# ----------------------------
7576786a6f21Smrg# implement the --enable-static flag, and support the `static' and
7577786a6f21Smrg# `disable-static' LT_INIT options.
7578786a6f21Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7579786a6f21Smrgm4_define([_LT_ENABLE_STATIC],
7580786a6f21Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7581786a6f21SmrgAC_ARG_ENABLE([static],
7582786a6f21Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7583786a6f21Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7584786a6f21Smrg    [p=${PACKAGE-default}
7585786a6f21Smrg    case $enableval in
7586786a6f21Smrg    yes) enable_static=yes ;;
7587786a6f21Smrg    no) enable_static=no ;;
7588786a6f21Smrg    *)
7589786a6f21Smrg     enable_static=no
7590786a6f21Smrg      # Look at the argument we got.  We use all the common list separators.
7591786a6f21Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7592786a6f21Smrg      for pkg in $enableval; do
7593786a6f21Smrg	IFS="$lt_save_ifs"
7594786a6f21Smrg	if test "X$pkg" = "X$p"; then
7595786a6f21Smrg	  enable_static=yes
7596786a6f21Smrg	fi
7597786a6f21Smrg      done
7598786a6f21Smrg      IFS="$lt_save_ifs"
75991d54945dSmrg      ;;
7600786a6f21Smrg    esac],
7601786a6f21Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
76021d54945dSmrg
7603786a6f21Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
7604786a6f21Smrg	[Whether or not to build static libraries])
7605786a6f21Smrg])# _LT_ENABLE_STATIC
76061d54945dSmrg
7607786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7608786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
76091d54945dSmrg
7610786a6f21Smrg# Old names:
7611786a6f21SmrgAC_DEFUN([AC_ENABLE_STATIC],
7612786a6f21Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7613786a6f21Smrg])
76141d54945dSmrg
7615786a6f21SmrgAC_DEFUN([AC_DISABLE_STATIC],
7616786a6f21Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7617786a6f21Smrg])
76181d54945dSmrg
7619786a6f21SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7620786a6f21SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
76211d54945dSmrg
7622786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7623786a6f21Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7624786a6f21Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
76251d54945dSmrg
76261d54945dSmrg
7627786a6f21Smrg
7628786a6f21Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7629786a6f21Smrg# ----------------------------------
7630786a6f21Smrg# implement the --enable-fast-install flag, and support the `fast-install'
7631786a6f21Smrg# and `disable-fast-install' LT_INIT options.
7632786a6f21Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7633786a6f21Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
7634786a6f21Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7635786a6f21SmrgAC_ARG_ENABLE([fast-install],
7636786a6f21Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7637786a6f21Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7638786a6f21Smrg    [p=${PACKAGE-default}
7639786a6f21Smrg    case $enableval in
7640786a6f21Smrg    yes) enable_fast_install=yes ;;
7641786a6f21Smrg    no) enable_fast_install=no ;;
7642786a6f21Smrg    *)
7643786a6f21Smrg      enable_fast_install=no
7644786a6f21Smrg      # Look at the argument we got.  We use all the common list separators.
7645786a6f21Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7646786a6f21Smrg      for pkg in $enableval; do
7647786a6f21Smrg	IFS="$lt_save_ifs"
7648786a6f21Smrg	if test "X$pkg" = "X$p"; then
7649786a6f21Smrg	  enable_fast_install=yes
7650ba85709eSmrg	fi
7651786a6f21Smrg      done
7652786a6f21Smrg      IFS="$lt_save_ifs"
76531d54945dSmrg      ;;
7654786a6f21Smrg    esac],
7655786a6f21Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
76561d54945dSmrg
7657786a6f21Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
7658786a6f21Smrg	 [Whether or not to optimize for fast installation])dnl
7659786a6f21Smrg])# _LT_ENABLE_FAST_INSTALL
76601d54945dSmrg
7661786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7662786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
76631d54945dSmrg
7664786a6f21Smrg# Old names:
7665786a6f21SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7666786a6f21Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7667786a6f21SmrgAC_DIAGNOSE([obsolete],
7668786a6f21Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7669786a6f21Smrgthe `fast-install' option into LT_INIT's first parameter.])
7670786a6f21Smrg])
76711d54945dSmrg
7672786a6f21SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7673786a6f21Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7674786a6f21SmrgAC_DIAGNOSE([obsolete],
7675786a6f21Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7676786a6f21Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7677786a6f21Smrg])
76781d54945dSmrg
7679786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7680786a6f21Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7681786a6f21Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
76821d54945dSmrg
76831d54945dSmrg
7684786a6f21Smrg# _LT_WITH_PIC([MODE])
7685786a6f21Smrg# --------------------
7686786a6f21Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7687786a6f21Smrg# LT_INIT options.
7688786a6f21Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7689786a6f21Smrgm4_define([_LT_WITH_PIC],
7690786a6f21Smrg[AC_ARG_WITH([pic],
7691786a6f21Smrg    [AS_HELP_STRING([--with-pic],
7692786a6f21Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7693786a6f21Smrg    [pic_mode="$withval"],
7694786a6f21Smrg    [pic_mode=default])
76951d54945dSmrg
7696786a6f21Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
76971d54945dSmrg
7698786a6f21Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7699786a6f21Smrg])# _LT_WITH_PIC
77001d54945dSmrg
7701786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7702786a6f21SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7703786a6f21Smrg
7704786a6f21Smrg# Old name:
7705786a6f21SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7706786a6f21Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7707786a6f21SmrgAC_DIAGNOSE([obsolete],
7708786a6f21Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7709786a6f21Smrgput the `pic-only' option into LT_INIT's first parameter.])
77101d54945dSmrg])
77111d54945dSmrg
7712786a6f21Smrgdnl aclocal-1.4 backwards compatibility:
7713786a6f21Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
77141d54945dSmrg
77151d54945dSmrg
7716786a6f21Smrgm4_define([_LTDL_MODE], [])
7717786a6f21SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7718786a6f21Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7719786a6f21SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7720786a6f21Smrg		 [m4_define([_LTDL_MODE], [recursive])])
7721786a6f21SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7722786a6f21Smrg		 [m4_define([_LTDL_MODE], [subproject])])
77231d54945dSmrg
7724786a6f21Smrgm4_define([_LTDL_TYPE], [])
7725786a6f21SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7726786a6f21Smrg		 [m4_define([_LTDL_TYPE], [installable])])
7727786a6f21SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7728786a6f21Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
77291d54945dSmrg
7730786a6f21Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
77311d54945dSmrg#
7732786a6f21Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7733786a6f21Smrg# Written by Gary V. Vaughan, 2004
77341d54945dSmrg#
7735786a6f21Smrg# This file is free software; the Free Software Foundation gives
7736786a6f21Smrg# unlimited permission to copy and/or distribute it, with or without
7737786a6f21Smrg# modifications, as long as this notice is preserved.
7738786a6f21Smrg
7739786a6f21Smrg# serial 6 ltsugar.m4
7740786a6f21Smrg
7741786a6f21Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7742786a6f21SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7743786a6f21Smrg
7744786a6f21Smrg
7745786a6f21Smrg# lt_join(SEP, ARG1, [ARG2...])
7746786a6f21Smrg# -----------------------------
7747786a6f21Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7748786a6f21Smrg# associated separator.
7749786a6f21Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7750786a6f21Smrg# versions in m4sugar had bugs.
7751786a6f21Smrgm4_define([lt_join],
7752786a6f21Smrg[m4_if([$#], [1], [],
7753786a6f21Smrg       [$#], [2], [[$2]],
7754786a6f21Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7755786a6f21Smrgm4_define([_lt_join],
7756786a6f21Smrg[m4_if([$#$2], [2], [],
7757786a6f21Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7758786a6f21Smrg
7759786a6f21Smrg
7760786a6f21Smrg# lt_car(LIST)
7761786a6f21Smrg# lt_cdr(LIST)
7762786a6f21Smrg# ------------
7763786a6f21Smrg# Manipulate m4 lists.
7764786a6f21Smrg# These macros are necessary as long as will still need to support
7765786a6f21Smrg# Autoconf-2.59 which quotes differently.
7766786a6f21Smrgm4_define([lt_car], [[$1]])
7767786a6f21Smrgm4_define([lt_cdr],
7768786a6f21Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7769786a6f21Smrg       [$#], 1, [],
7770786a6f21Smrg       [m4_dquote(m4_shift($@))])])
7771786a6f21Smrgm4_define([lt_unquote], $1)
7772786a6f21Smrg
7773786a6f21Smrg
7774786a6f21Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7775786a6f21Smrg# ------------------------------------------
7776786a6f21Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7777786a6f21Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7778786a6f21Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7779786a6f21Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7780786a6f21Smrg# than defined and empty).
77811d54945dSmrg#
7782786a6f21Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7783786a6f21Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7784786a6f21Smrgm4_define([lt_append],
7785786a6f21Smrg[m4_define([$1],
7786786a6f21Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7787786a6f21Smrg
7788786a6f21Smrg
7789786a6f21Smrg
7790786a6f21Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7791786a6f21Smrg# ----------------------------------------------------------
7792786a6f21Smrg# Produce a SEP delimited list of all paired combinations of elements of
7793786a6f21Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7794786a6f21Smrg# has the form PREFIXmINFIXSUFFIXn.
7795786a6f21Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7796786a6f21Smrgm4_define([lt_combine],
7797786a6f21Smrg[m4_if(m4_eval([$# > 3]), [1],
7798786a6f21Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7799786a6f21Smrg[[m4_foreach([_Lt_prefix], [$2],
7800786a6f21Smrg	     [m4_foreach([_Lt_suffix],
7801786a6f21Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7802786a6f21Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7803786a6f21Smrg
7804786a6f21Smrg
7805786a6f21Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7806786a6f21Smrg# -----------------------------------------------------------------------
7807786a6f21Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7808786a6f21Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7809786a6f21Smrgm4_define([lt_if_append_uniq],
7810786a6f21Smrg[m4_ifdef([$1],
7811786a6f21Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7812786a6f21Smrg		 [lt_append([$1], [$2], [$3])$4],
7813786a6f21Smrg		 [$5])],
7814786a6f21Smrg	  [lt_append([$1], [$2], [$3])$4])])
7815786a6f21Smrg
7816786a6f21Smrg
7817786a6f21Smrg# lt_dict_add(DICT, KEY, VALUE)
7818786a6f21Smrg# -----------------------------
7819786a6f21Smrgm4_define([lt_dict_add],
7820786a6f21Smrg[m4_define([$1($2)], [$3])])
78211d54945dSmrg
78221d54945dSmrg
7823786a6f21Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7824786a6f21Smrg# --------------------------------------------
7825786a6f21Smrgm4_define([lt_dict_add_subkey],
7826786a6f21Smrg[m4_define([$1($2:$3)], [$4])])
7827786a6f21Smrg
78281d54945dSmrg
7829786a6f21Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7830786a6f21Smrg# ----------------------------------
7831786a6f21Smrgm4_define([lt_dict_fetch],
7832786a6f21Smrg[m4_ifval([$3],
7833786a6f21Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7834786a6f21Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
78351d54945dSmrg
78361d54945dSmrg
7837786a6f21Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7838786a6f21Smrg# -----------------------------------------------------------------
7839786a6f21Smrgm4_define([lt_if_dict_fetch],
7840786a6f21Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7841786a6f21Smrg	[$5],
7842786a6f21Smrg    [$6])])
78431d54945dSmrg
78441d54945dSmrg
7845786a6f21Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7846786a6f21Smrg# --------------------------------------------------------------
7847786a6f21Smrgm4_define([lt_dict_filter],
7848786a6f21Smrg[m4_if([$5], [], [],
7849786a6f21Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7850786a6f21Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7851786a6f21Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
78521d54945dSmrg])
78531d54945dSmrg
7854786a6f21Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7855786a6f21Smrg#
7856786a6f21Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7857786a6f21Smrg#   Written by Scott James Remnant, 2004
7858786a6f21Smrg#
7859786a6f21Smrg# This file is free software; the Free Software Foundation gives
7860786a6f21Smrg# unlimited permission to copy and/or distribute it, with or without
7861786a6f21Smrg# modifications, as long as this notice is preserved.
7862ba85709eSmrg
7863786a6f21Smrg# Generated from ltversion.in.
7864ba85709eSmrg
7865786a6f21Smrg# serial 3012 ltversion.m4
7866786a6f21Smrg# This file is part of GNU Libtool
7867ba85709eSmrg
7868786a6f21Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
7869786a6f21Smrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7870ba85709eSmrg
7871786a6f21SmrgAC_DEFUN([LTVERSION_VERSION],
7872786a6f21Smrg[macro_version='2.2.6'
7873786a6f21Smrgmacro_revision='1.3012'
7874786a6f21Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7875786a6f21Smrg_LT_DECL(, macro_revision, 0)
78761d54945dSmrg])
78771d54945dSmrg
7878786a6f21Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7879786a6f21Smrg#
7880786a6f21Smrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7881786a6f21Smrg#   Written by Scott James Remnant, 2004.
7882786a6f21Smrg#
7883786a6f21Smrg# This file is free software; the Free Software Foundation gives
7884786a6f21Smrg# unlimited permission to copy and/or distribute it, with or without
7885786a6f21Smrg# modifications, as long as this notice is preserved.
7886786a6f21Smrg
7887786a6f21Smrg# serial 4 lt~obsolete.m4
7888786a6f21Smrg
7889786a6f21Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
7890786a6f21Smrg#
7891786a6f21Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7892786a6f21Smrg# which have later been changed to m4_define as they aren't part of the
7893786a6f21Smrg# exported API, or moved to Autoconf or Automake where they belong.
7894786a6f21Smrg#
7895786a6f21Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7896786a6f21Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7897786a6f21Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
7898786a6f21Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7899786a6f21Smrg# and doesn't know about Autoconf macros at all.)
7900786a6f21Smrg#
7901786a6f21Smrg# So we provide this file, which has a silly filename so it's always
7902786a6f21Smrg# included after everything else.  This provides aclocal with the
7903786a6f21Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7904786a6f21Smrg# because those macros already exist, or will be overwritten later.
7905786a6f21Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7906786a6f21Smrg#
7907786a6f21Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7908786a6f21Smrg# Yes, that means every name once taken will need to remain here until
7909786a6f21Smrg# we give up compatibility with versions before 1.7, at which point
7910786a6f21Smrg# we need to keep only those names which we still refer to.
7911786a6f21Smrg
7912786a6f21Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7913786a6f21SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7914786a6f21Smrg
7915786a6f21Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7916786a6f21Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7917786a6f21Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7918786a6f21Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7919786a6f21Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7920786a6f21Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7921786a6f21Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7922786a6f21Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7923786a6f21Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7924786a6f21Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7925786a6f21Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7926786a6f21Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7927786a6f21Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7928786a6f21Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7929786a6f21Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7930786a6f21Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7931786a6f21Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7932786a6f21Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7933786a6f21Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7934786a6f21Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7935786a6f21Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7936786a6f21Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7937786a6f21Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7938786a6f21Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7939786a6f21Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7940786a6f21Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7941786a6f21Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7942786a6f21Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7943786a6f21Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7944786a6f21Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7945786a6f21Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7946786a6f21Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7947786a6f21Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7948786a6f21Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7949786a6f21Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7950786a6f21Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7951786a6f21Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7952786a6f21Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7953786a6f21Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7954786a6f21Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7955786a6f21Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7956786a6f21Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7957786a6f21Smrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7958786a6f21Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7959786a6f21Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7960786a6f21Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7961786a6f21Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7962786a6f21Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7963786a6f21Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7964786a6f21Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7965786a6f21Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7966786a6f21Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7967786a6f21Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7968786a6f21Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7969786a6f21Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7970786a6f21Smrg
79711d54945dSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
79721d54945dSmrg# 
79731d54945dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
79741d54945dSmrg#
79751d54945dSmrg# This program is free software; you can redistribute it and/or modify
79761d54945dSmrg# it under the terms of the GNU General Public License as published by
79771d54945dSmrg# the Free Software Foundation; either version 2 of the License, or
79781d54945dSmrg# (at your option) any later version.
79791d54945dSmrg#
79801d54945dSmrg# This program is distributed in the hope that it will be useful, but
79811d54945dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
79821d54945dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
79831d54945dSmrg# General Public License for more details.
79841d54945dSmrg#
79851d54945dSmrg# You should have received a copy of the GNU General Public License
79861d54945dSmrg# along with this program; if not, write to the Free Software
79871d54945dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
79881d54945dSmrg#
79891d54945dSmrg# As a special exception to the GNU General Public License, if you
79901d54945dSmrg# distribute this file as part of a program that contains a
79911d54945dSmrg# configuration script generated by Autoconf, you may include it under
79921d54945dSmrg# the same distribution terms that you use for the rest of that program.
79931d54945dSmrg
79941d54945dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
79951d54945dSmrg# ----------------------------------
79961d54945dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
79971d54945dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
79981d54945dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
79991d54945dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
80001d54945dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
80011d54945dSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
80021d54945dSmrgfi
80031d54945dSmrgif test -n "$PKG_CONFIG"; then
80041d54945dSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
80051d54945dSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
80061d54945dSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
80071d54945dSmrg		AC_MSG_RESULT([yes])
80081d54945dSmrg	else
80091d54945dSmrg		AC_MSG_RESULT([no])
80101d54945dSmrg		PKG_CONFIG=""
80111d54945dSmrg	fi
80121d54945dSmrg		
80131d54945dSmrgfi[]dnl
80141d54945dSmrg])# PKG_PROG_PKG_CONFIG
80151d54945dSmrg
80161d54945dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
80171d54945dSmrg#
80181d54945dSmrg# Check to see whether a particular set of modules exists.  Similar
80191d54945dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
80201d54945dSmrg#
80211d54945dSmrg#
80221d54945dSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
80231d54945dSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
80241d54945dSmrg# PKG_CHECK_EXISTS manually
80251d54945dSmrg# --------------------------------------------------------------
80261d54945dSmrgAC_DEFUN([PKG_CHECK_EXISTS],
80271d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
80281d54945dSmrgif test -n "$PKG_CONFIG" && \
80291d54945dSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
80301d54945dSmrg  m4_ifval([$2], [$2], [:])
80311d54945dSmrgm4_ifvaln([$3], [else
80321d54945dSmrg  $3])dnl
80331d54945dSmrgfi])
80341d54945dSmrg
80351d54945dSmrg
80361d54945dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
80371d54945dSmrg# ---------------------------------------------
80381d54945dSmrgm4_define([_PKG_CONFIG],
8039ba85709eSmrg[if test -n "$$1"; then
8040ba85709eSmrg    pkg_cv_[]$1="$$1"
8041ba85709eSmrg elif test -n "$PKG_CONFIG"; then
8042ba85709eSmrg    PKG_CHECK_EXISTS([$3],
8043ba85709eSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8044ba85709eSmrg		     [pkg_failed=yes])
8045ba85709eSmrg else
8046ba85709eSmrg    pkg_failed=untried
80471d54945dSmrgfi[]dnl
80481d54945dSmrg])# _PKG_CONFIG
80491d54945dSmrg
80501d54945dSmrg# _PKG_SHORT_ERRORS_SUPPORTED
80511d54945dSmrg# -----------------------------
80521d54945dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
80531d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
80541d54945dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
80551d54945dSmrg        _pkg_short_errors_supported=yes
80561d54945dSmrgelse
80571d54945dSmrg        _pkg_short_errors_supported=no
80581d54945dSmrgfi[]dnl
80591d54945dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
80601d54945dSmrg
80611d54945dSmrg
80621d54945dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
80631d54945dSmrg# [ACTION-IF-NOT-FOUND])
80641d54945dSmrg#
80651d54945dSmrg#
80661d54945dSmrg# Note that if there is a possibility the first call to
80671d54945dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
80681d54945dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
80691d54945dSmrg#
80701d54945dSmrg#
80711d54945dSmrg# --------------------------------------------------------------
80721d54945dSmrgAC_DEFUN([PKG_CHECK_MODULES],
80731d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
80741d54945dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
80751d54945dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
80761d54945dSmrg
80771d54945dSmrgpkg_failed=no
80781d54945dSmrgAC_MSG_CHECKING([for $1])
80791d54945dSmrg
80801d54945dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
80811d54945dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
80821d54945dSmrg
80831d54945dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
80841d54945dSmrgand $1[]_LIBS to avoid the need to call pkg-config.
80851d54945dSmrgSee the pkg-config man page for more details.])
80861d54945dSmrg
80871d54945dSmrgif test $pkg_failed = yes; then
80881d54945dSmrg        _PKG_SHORT_ERRORS_SUPPORTED
80891d54945dSmrg        if test $_pkg_short_errors_supported = yes; then
8090ba85709eSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
80911d54945dSmrg        else 
8092ba85709eSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
80931d54945dSmrg        fi
80941d54945dSmrg	# Put the nasty error message in config.log where it belongs
80951d54945dSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
80961d54945dSmrg
80971d54945dSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
80981d54945dSmrg[Package requirements ($2) were not met:
80991d54945dSmrg
81001d54945dSmrg$$1_PKG_ERRORS
81011d54945dSmrg
81021d54945dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
81031d54945dSmrginstalled software in a non-standard prefix.
81041d54945dSmrg
81051d54945dSmrg_PKG_TEXT
81061d54945dSmrg])],
8107ba85709eSmrg		[AC_MSG_RESULT([no])
8108ba85709eSmrg                $4])
81091d54945dSmrgelif test $pkg_failed = untried; then
81101d54945dSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
81111d54945dSmrg[The pkg-config script could not be found or is too old.  Make sure it
81121d54945dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
81131d54945dSmrgpath to pkg-config.
81141d54945dSmrg
81151d54945dSmrg_PKG_TEXT
81161d54945dSmrg
8117ba85709eSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
81181d54945dSmrg		[$4])
81191d54945dSmrgelse
81201d54945dSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
81211d54945dSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
81221d54945dSmrg        AC_MSG_RESULT([yes])
81231d54945dSmrg	ifelse([$3], , :, [$3])
81241d54945dSmrgfi[]dnl
81251d54945dSmrg])# PKG_CHECK_MODULES
81261d54945dSmrg
8127786a6f21Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
81281d54945dSmrgdnl
8129ba85709eSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
81301d54945dSmrgdnl 
8131ba85709eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
8132ba85709eSmrgdnl copy of this software and associated documentation files (the
8133ba85709eSmrgdnl "Software"), to deal in the Software without restriction, including
8134ba85709eSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
8135ba85709eSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
8136ba85709eSmrgdnl to whom the Software is furnished to do so, provided that the above
8137ba85709eSmrgdnl copyright notice(s) and this permission notice appear in all copies of
8138ba85709eSmrgdnl the Software and that both the above copyright notice(s) and this
8139ba85709eSmrgdnl permission notice appear in supporting documentation.
8140ba85709eSmrgdnl
81411d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
81421d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8143ba85709eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
8144ba85709eSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
8145ba85709eSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
8146ba85709eSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
8147ba85709eSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
8148ba85709eSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
8149ba85709eSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
8150ba85709eSmrgdnl
8151ba85709eSmrgdnl Except as contained in this notice, the name of a copyright holder
8152ba85709eSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
8153ba85709eSmrgdnl or other dealings in this Software without prior written authorization
8154ba85709eSmrgdnl of the copyright holder.
8155ba85709eSmrg
8156ba85709eSmrg# XORG_MACROS_VERSION(required-version)
8157ba85709eSmrg# -------------------------------------
8158ba85709eSmrg# Minimum version: 1.1.0
8159ba85709eSmrg#
8160ba85709eSmrg# If you're using a macro added in Version 1.1 or newer, include this in
8161ba85709eSmrg# your configure.ac with the minimum required version, such as:
8162ba85709eSmrg# XORG_MACROS_VERSION(1.1)
8163ba85709eSmrg#
8164ba85709eSmrg# To force at least a version with this macro defined, also add:
8165ba85709eSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
8166ba85709eSmrg#
8167ba85709eSmrg#
8168ba85709eSmrg# See the "minimum version" comment for each macro you use to see what 
8169ba85709eSmrg# version you require.
8170ba85709eSmrgAC_DEFUN([XORG_MACROS_VERSION],[
8171ba85709eSmrg	[XORG_MACROS_needed_version=$1
8172ba85709eSmrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
8173ba85709eSmrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
8174ba85709eSmrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
8175786a6f21Smrg	[XORG_MACROS_version=1.2.1
8176ba85709eSmrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
8177ba85709eSmrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
8178ba85709eSmrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
8179ba85709eSmrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
8180ba85709eSmrg	fi
8181ba85709eSmrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
8182ba85709eSmrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
8183ba85709eSmrg	fi
8184ba85709eSmrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
8185ba85709eSmrg]) # XORG_MACROS_VERSION
81861d54945dSmrg
81871d54945dSmrg# XORG_PROG_RAWCPP()
81881d54945dSmrg# ------------------
8189ba85709eSmrg# Minimum version: 1.0.0
8190ba85709eSmrg#
81911d54945dSmrg# Find cpp program and necessary flags for use in pre-processing text files
81921d54945dSmrg# such as man pages and config files
81931d54945dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
81941d54945dSmrgAC_REQUIRE([AC_PROG_CPP])
81951d54945dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
81961d54945dSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
81971d54945dSmrg
81981d54945dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
81991d54945dSmrg# which is not the best choice for supporting other OS'es, but covers most
82001d54945dSmrg# of the ones we need for now.
82011d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
82021d54945dSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
82031d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
82041d54945dSmrg	AC_MSG_RESULT([no])
82051d54945dSmrgelse
82061d54945dSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
82071d54945dSmrg		RAWCPPFLAGS=-undef
82081d54945dSmrg		AC_MSG_RESULT([yes])
8209786a6f21Smrg	# under Cygwin unix is still defined even with -undef
8210786a6f21Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8211786a6f21Smrg		RAWCPPFLAGS="-undef -ansi"
8212786a6f21Smrg		AC_MSG_RESULT([yes, with -ansi])
82131d54945dSmrg	else
82141d54945dSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
82151d54945dSmrg	fi
82161d54945dSmrgfi
82171d54945dSmrgrm -f conftest.$ac_ext
82181d54945dSmrg
82191d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
82201d54945dSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
82211d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
82221d54945dSmrg	AC_MSG_RESULT([no])
82231d54945dSmrgelse
82241d54945dSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
82251d54945dSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
82261d54945dSmrg		AC_MSG_RESULT([yes])
82271d54945dSmrg	else
82281d54945dSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
82291d54945dSmrg	fi
82301d54945dSmrgfi
82311d54945dSmrgrm -f conftest.$ac_ext
82321d54945dSmrgAC_SUBST(RAWCPPFLAGS)
82331d54945dSmrg]) # XORG_PROG_RAWCPP
82341d54945dSmrg
82351d54945dSmrg# XORG_MANPAGE_SECTIONS()
82361d54945dSmrg# -----------------------
8237ba85709eSmrg# Minimum version: 1.0.0
8238ba85709eSmrg#
82391d54945dSmrg# Determine which sections man pages go in for the different man page types
82401d54945dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
82411d54945dSmrg# Not sure if there's any better way than just hardcoding by OS name.
82421d54945dSmrg# Override default settings by setting environment variables
82431d54945dSmrg
82441d54945dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
82451d54945dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
82461d54945dSmrg
82471d54945dSmrgif test x$APP_MAN_SUFFIX = x    ; then
8248ba85709eSmrg    APP_MAN_SUFFIX=1
82491d54945dSmrgfi
82501d54945dSmrgif test x$APP_MAN_DIR = x    ; then
8251ba85709eSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
82521d54945dSmrgfi
82531d54945dSmrg
82541d54945dSmrgif test x$LIB_MAN_SUFFIX = x    ; then
8255ba85709eSmrg    LIB_MAN_SUFFIX=3
82561d54945dSmrgfi
82571d54945dSmrgif test x$LIB_MAN_DIR = x    ; then
8258ba85709eSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
82591d54945dSmrgfi
82601d54945dSmrg
82611d54945dSmrgif test x$FILE_MAN_SUFFIX = x    ; then
82621d54945dSmrg    case $host_os in
82631d54945dSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
82641d54945dSmrg	*)		FILE_MAN_SUFFIX=5  ;;
82651d54945dSmrg    esac
82661d54945dSmrgfi
82671d54945dSmrgif test x$FILE_MAN_DIR = x    ; then
8268ba85709eSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
82691d54945dSmrgfi
82701d54945dSmrg
82711d54945dSmrgif test x$MISC_MAN_SUFFIX = x    ; then
82721d54945dSmrg    case $host_os in
82731d54945dSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
82741d54945dSmrg	*)		MISC_MAN_SUFFIX=7  ;;
82751d54945dSmrg    esac
82761d54945dSmrgfi
82771d54945dSmrgif test x$MISC_MAN_DIR = x    ; then
8278ba85709eSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
82791d54945dSmrgfi
82801d54945dSmrg
82811d54945dSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
82821d54945dSmrg    case $host_os in
82831d54945dSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
82841d54945dSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
82851d54945dSmrg    esac
82861d54945dSmrgfi
82871d54945dSmrgif test x$DRIVER_MAN_DIR = x    ; then
8288ba85709eSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
82891d54945dSmrgfi
82901d54945dSmrg
82911d54945dSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
82921d54945dSmrg    case $host_os in
82931d54945dSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
82941d54945dSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
82951d54945dSmrg    esac
82961d54945dSmrgfi
82971d54945dSmrgif test x$ADMIN_MAN_DIR = x    ; then
82981d54945dSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
82991d54945dSmrgfi
83001d54945dSmrg
83011d54945dSmrg
83021d54945dSmrgAC_SUBST([APP_MAN_SUFFIX])
83031d54945dSmrgAC_SUBST([LIB_MAN_SUFFIX])
83041d54945dSmrgAC_SUBST([FILE_MAN_SUFFIX])
83051d54945dSmrgAC_SUBST([MISC_MAN_SUFFIX])
83061d54945dSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
83071d54945dSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
83081d54945dSmrgAC_SUBST([APP_MAN_DIR])
83091d54945dSmrgAC_SUBST([LIB_MAN_DIR])
83101d54945dSmrgAC_SUBST([FILE_MAN_DIR])
83111d54945dSmrgAC_SUBST([MISC_MAN_DIR])
83121d54945dSmrgAC_SUBST([DRIVER_MAN_DIR])
83131d54945dSmrgAC_SUBST([ADMIN_MAN_DIR])
83141d54945dSmrg]) # XORG_MANPAGE_SECTIONS
83151d54945dSmrg
83161d54945dSmrg# XORG_CHECK_LINUXDOC
83171d54945dSmrg# -------------------
8318ba85709eSmrg# Minimum version: 1.0.0
8319ba85709eSmrg#
83201d54945dSmrg# Defines the variable MAKE_TEXT if the necessary tools and
83211d54945dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
83221d54945dSmrg# Whether or not the necessary tools and files are found can be checked
83231d54945dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
83241d54945dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
8325786a6f21Smrgif test x$XORG_SGML_PATH = x ; then
8326786a6f21Smrg    XORG_SGML_PATH=$prefix/share/sgml
8327786a6f21Smrgfi
8328ba85709eSmrgHAVE_DEFS_ENT=
8329ba85709eSmrg
8330ba85709eSmrgif test x"$cross_compiling" = x"yes" ; then
8331ba85709eSmrg  HAVE_DEFS_ENT=no
8332ba85709eSmrgelse
8333ba85709eSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8334ba85709eSmrgfi
83351d54945dSmrg
83361d54945dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
83371d54945dSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
83381d54945dSmrg
83391d54945dSmrgAC_MSG_CHECKING([Whether to build documentation])
83401d54945dSmrg
8341ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
83421d54945dSmrg   BUILDDOC=yes
83431d54945dSmrgelse
83441d54945dSmrg   BUILDDOC=no
83451d54945dSmrgfi
83461d54945dSmrg
83471d54945dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
83481d54945dSmrg
83491d54945dSmrgAC_MSG_RESULT([$BUILDDOC])
83501d54945dSmrg
83511d54945dSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
83521d54945dSmrg
8353ba85709eSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
83541d54945dSmrg   BUILDPDFDOC=yes
83551d54945dSmrgelse
83561d54945dSmrg   BUILDPDFDOC=no
83571d54945dSmrgfi
83581d54945dSmrg
83591d54945dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
83601d54945dSmrg
83611d54945dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
83621d54945dSmrg
8363ba85709eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
8364ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
83651d54945dSmrgMAKE_PDF="$PS2PDF"
8366ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
83671d54945dSmrg
83681d54945dSmrgAC_SUBST(MAKE_TEXT)
83691d54945dSmrgAC_SUBST(MAKE_PS)
83701d54945dSmrgAC_SUBST(MAKE_PDF)
83711d54945dSmrgAC_SUBST(MAKE_HTML)
83721d54945dSmrg]) # XORG_CHECK_LINUXDOC
83731d54945dSmrg
8374ba85709eSmrg# XORG_CHECK_DOCBOOK
8375ba85709eSmrg# -------------------
8376ba85709eSmrg# Minimum version: 1.0.0
8377ba85709eSmrg#
8378ba85709eSmrg# Checks for the ability to build output formats from SGML DocBook source.
8379ba85709eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
8380ba85709eSmrg# indicates whether the necessary tools and files are found and, if set,
8381ba85709eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
8382ba85709eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
8383786a6f21Smrgif test x$XORG_SGML_PATH = x ; then
8384786a6f21Smrg    XORG_SGML_PATH=$prefix/share/sgml
8385786a6f21Smrgfi
8386ba85709eSmrgHAVE_DEFS_ENT=
8387ba85709eSmrgBUILDTXTDOC=no
8388ba85709eSmrgBUILDPDFDOC=no
8389ba85709eSmrgBUILDPSDOC=no
8390ba85709eSmrgBUILDHTMLDOC=no
8391ba85709eSmrg
8392ba85709eSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
8393ba85709eSmrg
8394ba85709eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
8395ba85709eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
8396ba85709eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
8397ba85709eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
8398ba85709eSmrg
8399ba85709eSmrgAC_MSG_CHECKING([Whether to build text documentation])
8400ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
8401ba85709eSmrg   test x$BUILD_TXTDOC != xno; then
8402ba85709eSmrg	BUILDTXTDOC=yes
8403ba85709eSmrgfi
8404ba85709eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
8405ba85709eSmrgAC_MSG_RESULT([$BUILDTXTDOC])
8406ba85709eSmrg
8407ba85709eSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
8408ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
8409ba85709eSmrg   test x$BUILD_PDFDOC != xno; then
8410ba85709eSmrg	BUILDPDFDOC=yes
8411ba85709eSmrgfi
8412ba85709eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8413ba85709eSmrgAC_MSG_RESULT([$BUILDPDFDOC])
8414ba85709eSmrg
8415ba85709eSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
8416ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
8417ba85709eSmrg   test x$BUILD_PSDOC != xno; then
8418ba85709eSmrg	BUILDPSDOC=yes
8419ba85709eSmrgfi
8420ba85709eSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
8421ba85709eSmrgAC_MSG_RESULT([$BUILDPSDOC])
8422ba85709eSmrg
8423ba85709eSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
8424ba85709eSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
8425ba85709eSmrg   test x$BUILD_HTMLDOC != xno; then
8426ba85709eSmrg	BUILDHTMLDOC=yes
8427ba85709eSmrgfi
8428ba85709eSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
8429ba85709eSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
8430ba85709eSmrg
8431ba85709eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
8432ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
8433ba85709eSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
8434ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
8435ba85709eSmrg
8436ba85709eSmrgAC_SUBST(MAKE_TEXT)
8437ba85709eSmrgAC_SUBST(MAKE_PS)
8438ba85709eSmrgAC_SUBST(MAKE_PDF)
8439ba85709eSmrgAC_SUBST(MAKE_HTML)
8440ba85709eSmrg]) # XORG_CHECK_DOCBOOK
8441ba85709eSmrg
84421d54945dSmrg# XORG_CHECK_MALLOC_ZERO
84431d54945dSmrg# ----------------------
8444ba85709eSmrg# Minimum version: 1.0.0
8445ba85709eSmrg#
84461d54945dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
84471d54945dSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
84481d54945dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
84491d54945dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
84501d54945dSmrgAC_ARG_ENABLE(malloc0returnsnull,
84511d54945dSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
84521d54945dSmrg		       [malloc(0) returns NULL (default: auto)]),
84531d54945dSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
84541d54945dSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
84551d54945dSmrg
84561d54945dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
84571d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
84581d54945dSmrg	AC_RUN_IFELSE([
84591d54945dSmrgchar *malloc();
84601d54945dSmrgchar *realloc();
84611d54945dSmrgchar *calloc();
84621d54945dSmrgmain() {
84631d54945dSmrg    char *m0, *r0, *c0, *p;
84641d54945dSmrg    m0 = malloc(0);
84651d54945dSmrg    p = malloc(10);
84661d54945dSmrg    r0 = realloc(p,0);
84671d54945dSmrg    c0 = calloc(0);
84681d54945dSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
84691d54945dSmrg}],
84701d54945dSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
84711d54945dSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
84721d54945dSmrgfi
84731d54945dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
84741d54945dSmrg
84751d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
84761d54945dSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
84771d54945dSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
84781d54945dSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
84791d54945dSmrgelse
84801d54945dSmrg	MALLOC_ZERO_CFLAGS=""
84811d54945dSmrg	XMALLOC_ZERO_CFLAGS=""
84821d54945dSmrg	XTMALLOC_ZERO_CFLAGS=""
84831d54945dSmrgfi
84841d54945dSmrg
84851d54945dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
84861d54945dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
84871d54945dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
84881d54945dSmrg]) # XORG_CHECK_MALLOC_ZERO
84891d54945dSmrg
8490ba85709eSmrg# XORG_WITH_LINT()
8491ba85709eSmrg# ----------------
8492ba85709eSmrg# Minimum version: 1.1.0
8493ba85709eSmrg#
8494ba85709eSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
8495ba85709eSmrg# is specified.   (Use --with-lint=sparse for sparse.)
8496ba85709eSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
8497ba85709eSmrg# Sets $LINT_FLAGS to flags to pass to source checker
8498ba85709eSmrg# Sets LINT automake conditional if enabled (default: disabled)
8499ba85709eSmrg#
8500ba85709eSmrgAC_DEFUN([XORG_WITH_LINT],[
8501ba85709eSmrg
8502ba85709eSmrg# Allow checking code with lint, sparse, etc.
8503ba85709eSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
8504ba85709eSmrg		[Use a lint-style source code checker (default: disabled)])],
8505ba85709eSmrg		[use_lint=$withval], [use_lint=no])
8506ba85709eSmrgif test "x$use_lint" = "xyes" ; then
8507ba85709eSmrg	LINT="lint"
8508ba85709eSmrgelse
8509ba85709eSmrg	LINT="$use_lint"
8510ba85709eSmrgfi
8511ba85709eSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
8512ba85709eSmrg    case $LINT in
8513ba85709eSmrg	lint|*/lint)
8514ba85709eSmrg	    case $host_os in
8515ba85709eSmrg		solaris*)
8516ba85709eSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
8517ba85709eSmrg			;;
8518ba85709eSmrg	    esac
8519ba85709eSmrg	    ;;
8520ba85709eSmrg    esac
8521ba85709eSmrgfi
8522ba85709eSmrg
8523ba85709eSmrgAC_SUBST(LINT)
8524ba85709eSmrgAC_SUBST(LINT_FLAGS)
8525ba85709eSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
8526ba85709eSmrg
8527ba85709eSmrg]) # XORG_WITH_LINT
8528ba85709eSmrg
8529ba85709eSmrg# XORG_LINT_LIBRARY(LIBNAME)
8530ba85709eSmrg# --------------------------
8531ba85709eSmrg# Minimum version: 1.1.0
8532ba85709eSmrg#
8533ba85709eSmrg# Sets up flags for building lint libraries for checking programs that call
8534ba85709eSmrg# functions in the library.
8535ba85709eSmrg# Disabled by default, enable with --enable-lint-library
8536ba85709eSmrg# Sets: 
8537ba85709eSmrg#	@LINTLIB@		- name of lint library file to make
8538ba85709eSmrg#	MAKE_LINT_LIB		- automake conditional
8539ba85709eSmrg#
8540ba85709eSmrg
8541ba85709eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
8542ba85709eSmrgAC_REQUIRE([XORG_WITH_LINT])
8543ba85709eSmrg# Build lint "library" for more indepth checks of programs calling this library
8544ba85709eSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
8545ba85709eSmrg	[Create lint library (default: disabled)])],
8546ba85709eSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
8547ba85709eSmrgif test "x$make_lint_lib" != "xno" ; then
8548ba85709eSmrg	if test "x$LINT" = "xno" ; then
8549ba85709eSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
8550ba85709eSmrg	fi
8551ba85709eSmrg	if test "x$make_lint_lib" = "xyes" ; then
8552ba85709eSmrg		LINTLIB=llib-l$1.ln
8553ba85709eSmrg	else
8554ba85709eSmrg		LINTLIB=$make_lint_lib
8555ba85709eSmrg	fi
8556ba85709eSmrgfi
8557ba85709eSmrgAC_SUBST(LINTLIB)
8558ba85709eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
8559ba85709eSmrg
8560ba85709eSmrg]) # XORG_LINT_LIBRARY
8561ba85709eSmrg
8562786a6f21Smrg# XORG_CWARNFLAGS
8563786a6f21Smrg# ---------------
8564786a6f21Smrg# Minimum version: 1.2.0
8565786a6f21Smrg#
8566786a6f21Smrg# Defines CWARNFLAGS to enable C compiler warnings.
8567786a6f21Smrg#
8568786a6f21SmrgAC_DEFUN([XORG_CWARNFLAGS], [
8569786a6f21SmrgAC_REQUIRE([AC_PROG_CC])
8570786a6f21Smrgif  test "x$GCC" = xyes ; then
8571786a6f21Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
8572786a6f21Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
8573786a6f21Smrg-Wbad-function-cast"
8574786a6f21Smrg    case `gcc -dumpversion` in
8575786a6f21Smrg    3.4.* | 4.*)
8576786a6f21Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
8577786a6f21Smrg	;;
8578786a6f21Smrg    esac
8579786a6f21Smrgelse
8580786a6f21Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
8581786a6f21Smrg    if test "x$SUNCC" = "xyes"; then
8582786a6f21Smrg	CWARNFLAGS="-v"
8583786a6f21Smrg    fi
8584786a6f21Smrgfi
8585786a6f21SmrgAC_SUBST(CWARNFLAGS)
8586786a6f21Smrg]) # XORG_CWARNFLAGS
85871d54945dSmrgdnl Copyright 2005 Red Hat, Inc
85881d54945dSmrgdnl
85891d54945dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
85901d54945dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
85911d54945dSmrgdnl the above copyright notice appear in all copies and that both that
85921d54945dSmrgdnl copyright notice and this permission notice appear in supporting
85931d54945dSmrgdnl documentation.
85941d54945dSmrgdnl
85951d54945dSmrgdnl The above copyright notice and this permission notice shall be included
85961d54945dSmrgdnl in all copies or substantial portions of the Software.
85971d54945dSmrgdnl
85981d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
85991d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86001d54945dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86011d54945dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
86021d54945dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86031d54945dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86041d54945dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
86051d54945dSmrgdnl
86061d54945dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
86071d54945dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
86081d54945dSmrgdnl other dealings in this Software without prior written authorization
86091d54945dSmrgdnl from the copyright holders.
86101d54945dSmrgdnl
86111d54945dSmrg
86121d54945dSmrg# XORG_RELEASE_VERSION
86131d54945dSmrg# --------------------
86141d54945dSmrg# Adds --with/without-release-string and changes the PACKAGE and
86151d54945dSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
8616ba85709eSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
8617ba85709eSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
86181d54945dSmrg 
86191d54945dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
86201d54945dSmrg	AC_ARG_WITH(release-version,
86211d54945dSmrg			AC_HELP_STRING([--with-release-version=STRING],
86221d54945dSmrg				[Use release version string in package name]),
86231d54945dSmrg			[RELEASE_VERSION="$withval"],
86241d54945dSmrg			[RELEASE_VERSION=""])
86251d54945dSmrg	if test "x$RELEASE_VERSION" != "x"; then
86261d54945dSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
86271d54945dSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
86281d54945dSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
86291d54945dSmrg	fi
8630ba85709eSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
8631ba85709eSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
8632ba85709eSmrg		[Major version of this package])
8633ba85709eSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
8634ba85709eSmrg	if test "x$PVM" = "x"; then
8635ba85709eSmrg		PVM="0"
8636ba85709eSmrg	fi
8637ba85709eSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
8638ba85709eSmrg		[$PVM],
8639ba85709eSmrg		[Minor version of this package])
8640ba85709eSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
8641ba85709eSmrg	if test "x$PVP" = "x"; then
8642ba85709eSmrg		PVP="0"
8643ba85709eSmrg	fi
8644ba85709eSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
8645ba85709eSmrg		[$PVP],
8646ba85709eSmrg		[Patch version of this package])
86471d54945dSmrg])
86481d54945dSmrg
8649786a6f21Smrg# XORG_CHANGELOG()
8650786a6f21Smrg# ----------------
8651786a6f21Smrg# Minimum version: 1.2.0
8652786a6f21Smrg#
8653786a6f21Smrg# Defines the variable CHANGELOG_CMD as the command to generate
8654786a6f21Smrg# ChangeLog from git.
8655786a6f21Smrg#
8656786a6f21Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
8657786a6f21Smrg#
8658786a6f21SmrgAC_DEFUN([XORG_CHANGELOG], [
8659786a6f21SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
8660786a6f21Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
8661786a6f21Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
8662786a6f21SmrgAC_SUBST([CHANGELOG_CMD])
8663786a6f21SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
8664786a6f21Smrg]) # XORG_CHANGELOG
8665786a6f21Smrg
8666786a6f21Smrgdnl Copyright 2005 Red Hat, Inc
8667786a6f21Smrgdnl 
8668786a6f21Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
8669786a6f21Smrgdnl documentation for any purpose is hereby granted without fee, provided that
8670786a6f21Smrgdnl the above copyright notice appear in all copies and that both that
8671786a6f21Smrgdnl copyright notice and this permission notice appear in supporting
8672786a6f21Smrgdnl documentation.
8673786a6f21Smrgdnl 
8674786a6f21Smrgdnl The above copyright notice and this permission notice shall be included
8675786a6f21Smrgdnl in all copies or substantial portions of the Software.
8676786a6f21Smrgdnl 
8677786a6f21Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8678786a6f21Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8679786a6f21Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8680786a6f21Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
8681786a6f21Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8682786a6f21Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8683786a6f21Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
8684786a6f21Smrgdnl 
8685786a6f21Smrgdnl Except as contained in this notice, the name of the copyright holders shall
8686786a6f21Smrgdnl not be used in advertising or otherwise to promote the sale, use or
8687786a6f21Smrgdnl other dealings in this Software without prior written authorization
8688786a6f21Smrgdnl from the copyright holders.
8689786a6f21Smrgdnl 
8690786a6f21Smrg
8691786a6f21Smrg# XORG_DRIVER_CHECK_EXT()
8692786a6f21Smrg# --------------------------
8693786a6f21Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
8694786a6f21Smrg# is defined, then add $1 to $REQUIRED_MODULES.
8695786a6f21Smrg
8696786a6f21SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
8697786a6f21Smrg	SAVE_CFLAGS="$CFLAGS"
8698786a6f21Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
8699786a6f21Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8700786a6f21Smrg#include "xorg-server.h"
8701786a6f21Smrg#if !defined $1
8702786a6f21Smrg#error $1 not defined
8703786a6f21Smrg#endif
8704786a6f21Smrg		]])],
8705786a6f21Smrg		[_EXT_CHECK=yes],
8706786a6f21Smrg		[_EXT_CHECK=no])
8707786a6f21Smrg	CFLAGS="$SAVE_CFLAGS"
8708786a6f21Smrg	AC_MSG_CHECKING([if $1 is defined])
8709786a6f21Smrg	AC_MSG_RESULT([$_EXT_CHECK])
8710786a6f21Smrg	if test "$_EXT_CHECK" != no; then
8711786a6f21Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
8712786a6f21Smrg	fi
8713786a6f21Smrg])
8714786a6f21Smrg
8715786a6f21Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
87161d54945dSmrg#
87171d54945dSmrg# This file is free software; the Free Software Foundation
87181d54945dSmrg# gives unlimited permission to copy and/or distribute it,
87191d54945dSmrg# with or without modifications, as long as this notice is preserved.
87201d54945dSmrg
87211d54945dSmrg# AM_AUTOMAKE_VERSION(VERSION)
87221d54945dSmrg# ----------------------------
87231d54945dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
87241d54945dSmrg# generated from the m4 files accompanying Automake X.Y.
8725ba85709eSmrg# (This private macro should not be called outside this file.)
8726ba85709eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8727ba85709eSmrg[am__api_version='1.10'
8728ba85709eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8729ba85709eSmrgdnl require some minimum version.  Point them to the right macro.
8730786a6f21Smrgm4_if([$1], [1.10.2], [],
8731ba85709eSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8732ba85709eSmrg])
8733ba85709eSmrg
8734ba85709eSmrg# _AM_AUTOCONF_VERSION(VERSION)
8735ba85709eSmrg# -----------------------------
8736ba85709eSmrg# aclocal traces this macro to find the Autoconf version.
8737ba85709eSmrg# This is a private macro too.  Using m4_define simplifies
8738ba85709eSmrg# the logic in aclocal, which can simply ignore this definition.
8739ba85709eSmrgm4_define([_AM_AUTOCONF_VERSION], [])
87401d54945dSmrg
87411d54945dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
87421d54945dSmrg# -------------------------------
8743ba85709eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8744786a6f21Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
87451d54945dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8746786a6f21Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl
8747ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION],
8748ba85709eSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8749786a6f21Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
87501d54945dSmrg
87511d54945dSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
87521d54945dSmrg
87531d54945dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
87541d54945dSmrg#
87551d54945dSmrg# This file is free software; the Free Software Foundation
87561d54945dSmrg# gives unlimited permission to copy and/or distribute it,
87571d54945dSmrg# with or without modifications, as long as this notice is preserved.
87581d54945dSmrg
87591d54945dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
87601d54945dSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
87611d54945dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
87621d54945dSmrg#
87631d54945dSmrg# Of course, Automake must honor this variable whenever it calls a
87641d54945dSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
87651d54945dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
87661d54945dSmrg# depending on how configure is run.  This is pretty annoying, since
87671d54945dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
87681d54945dSmrg# source directory, any form will work fine, but in subdirectories a
87691d54945dSmrg# relative path needs to be adjusted first.
87701d54945dSmrg#
87711d54945dSmrg# $ac_aux_dir/missing
87721d54945dSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
87731d54945dSmrg# $top_srcdir/$ac_aux_dir/missing
87741d54945dSmrg#    fails if $ac_aux_dir is absolute,
87751d54945dSmrg#    fails when called from a subdirectory in a VPATH build with
87761d54945dSmrg#          a relative $ac_aux_dir
87771d54945dSmrg#
87781d54945dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87791d54945dSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
87801d54945dSmrg# harmless because $srcdir is `.', but things will broke when you
87811d54945dSmrg# start a VPATH build or use an absolute $srcdir.
87821d54945dSmrg#
87831d54945dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
87841d54945dSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
87851d54945dSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
87861d54945dSmrg# and then we would define $MISSING as
87871d54945dSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
87881d54945dSmrg# This will work as long as MISSING is not called from configure, because
87891d54945dSmrg# unfortunately $(top_srcdir) has no meaning in configure.
87901d54945dSmrg# However there are other variables, like CC, which are often used in
87911d54945dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
87921d54945dSmrg#
87931d54945dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
87941d54945dSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
87951d54945dSmrg# configured tree to be moved without reconfiguration.
87961d54945dSmrg
87971d54945dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
87981d54945dSmrg[dnl Rely on autoconf to set up CDPATH properly.
87991d54945dSmrgAC_PREREQ([2.50])dnl
88001d54945dSmrg# expand $ac_aux_dir to an absolute path
88011d54945dSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
88021d54945dSmrg])
88031d54945dSmrg
88041d54945dSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
88051d54945dSmrg
8806ba85709eSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
88071d54945dSmrg# Free Software Foundation, Inc.
88081d54945dSmrg#
88091d54945dSmrg# This file is free software; the Free Software Foundation
88101d54945dSmrg# gives unlimited permission to copy and/or distribute it,
88111d54945dSmrg# with or without modifications, as long as this notice is preserved.
88121d54945dSmrg
8813ba85709eSmrg# serial 8
88141d54945dSmrg
88151d54945dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
88161d54945dSmrg# -------------------------------------
88171d54945dSmrg# Define a conditional.
88181d54945dSmrgAC_DEFUN([AM_CONDITIONAL],
88191d54945dSmrg[AC_PREREQ(2.52)dnl
88201d54945dSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
88211d54945dSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8822ba85709eSmrgAC_SUBST([$1_TRUE])dnl
8823ba85709eSmrgAC_SUBST([$1_FALSE])dnl
8824ba85709eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8825ba85709eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
88261d54945dSmrgif $2; then
88271d54945dSmrg  $1_TRUE=
88281d54945dSmrg  $1_FALSE='#'
88291d54945dSmrgelse
88301d54945dSmrg  $1_TRUE='#'
88311d54945dSmrg  $1_FALSE=
88321d54945dSmrgfi
88331d54945dSmrgAC_CONFIG_COMMANDS_PRE(
88341d54945dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
88351d54945dSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
88361d54945dSmrgUsually this means the macro was only invoked conditionally.]])
88371d54945dSmrgfi])])
88381d54945dSmrg
8839ba85709eSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
88401d54945dSmrg# Free Software Foundation, Inc.
88411d54945dSmrg#
88421d54945dSmrg# This file is free software; the Free Software Foundation
88431d54945dSmrg# gives unlimited permission to copy and/or distribute it,
88441d54945dSmrg# with or without modifications, as long as this notice is preserved.
88451d54945dSmrg
8846ba85709eSmrg# serial 9
88471d54945dSmrg
88481d54945dSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
88491d54945dSmrg# written in clear, in which case automake, when reading aclocal.m4,
88501d54945dSmrg# will think it sees a *use*, and therefore will trigger all it's
88511d54945dSmrg# C support machinery.  Also note that it means that autoscan, seeing
88521d54945dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
88531d54945dSmrg
88541d54945dSmrg
88551d54945dSmrg# _AM_DEPENDENCIES(NAME)
88561d54945dSmrg# ----------------------
88571d54945dSmrg# See how the compiler implements dependency checking.
88581d54945dSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
88591d54945dSmrg# We try a few techniques and use that to set a single cache variable.
88601d54945dSmrg#
88611d54945dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
88621d54945dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
88631d54945dSmrg# dependency, and given that the user is not expected to run this macro,
88641d54945dSmrg# just rely on AC_PROG_CC.
88651d54945dSmrgAC_DEFUN([_AM_DEPENDENCIES],
88661d54945dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
88671d54945dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
88681d54945dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
88691d54945dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
88701d54945dSmrg
88711d54945dSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
88721d54945dSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
88731d54945dSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8874ba85709eSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
88751d54945dSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
88761d54945dSmrg                   [depcc="$$1"   am_compiler_list=])
88771d54945dSmrg
88781d54945dSmrgAC_CACHE_CHECK([dependency style of $depcc],
88791d54945dSmrg               [am_cv_$1_dependencies_compiler_type],
88801d54945dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
88811d54945dSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
88821d54945dSmrg  # making bogus files that we don't know about and never remove.  For
88831d54945dSmrg  # instance it was reported that on HP-UX the gcc test will end up
88841d54945dSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
88851d54945dSmrg  # in D'.
88861d54945dSmrg  mkdir conftest.dir
88871d54945dSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
88881d54945dSmrg  # using a relative directory.
88891d54945dSmrg  cp "$am_depcomp" conftest.dir
88901d54945dSmrg  cd conftest.dir
88911d54945dSmrg  # We will build objects and dependencies in a subdirectory because
88921d54945dSmrg  # it helps to detect inapplicable dependency modes.  For instance
88931d54945dSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
88941d54945dSmrg  # side effect of compilation, but ICC will put the dependencies in
88951d54945dSmrg  # the current directory while Tru64 will put them in the object
88961d54945dSmrg  # directory.
88971d54945dSmrg  mkdir sub
88981d54945dSmrg
88991d54945dSmrg  am_cv_$1_dependencies_compiler_type=none
89001d54945dSmrg  if test "$am_compiler_list" = ""; then
89011d54945dSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
89021d54945dSmrg  fi
89031d54945dSmrg  for depmode in $am_compiler_list; do
89041d54945dSmrg    # Setup a source with many dependencies, because some compilers
89051d54945dSmrg    # like to wrap large dependency lists on column 80 (with \), and
89061d54945dSmrg    # we should not choose a depcomp mode which is confused by this.
89071d54945dSmrg    #
89081d54945dSmrg    # We need to recreate these files for each test, as the compiler may
89091d54945dSmrg    # overwrite some of them when testing with obscure command lines.
89101d54945dSmrg    # This happens at least with the AIX C compiler.
89111d54945dSmrg    : > sub/conftest.c
89121d54945dSmrg    for i in 1 2 3 4 5 6; do
89131d54945dSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
89141d54945dSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
89151d54945dSmrg      # Solaris 8's {/usr,}/bin/sh.
89161d54945dSmrg      touch sub/conftst$i.h
89171d54945dSmrg    done
89181d54945dSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
89191d54945dSmrg
89201d54945dSmrg    case $depmode in
89211d54945dSmrg    nosideeffect)
89221d54945dSmrg      # after this tag, mechanisms are not by side-effect, so they'll
89231d54945dSmrg      # only be used when explicitly requested
89241d54945dSmrg      if test "x$enable_dependency_tracking" = xyes; then
89251d54945dSmrg	continue
89261d54945dSmrg      else
89271d54945dSmrg	break
89281d54945dSmrg      fi
89291d54945dSmrg      ;;
89301d54945dSmrg    none) break ;;
89311d54945dSmrg    esac
89321d54945dSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
89331d54945dSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
89341d54945dSmrg    # handle `-M -o', and we need to detect this.
89351d54945dSmrg    if depmode=$depmode \
89361d54945dSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
89371d54945dSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
89381d54945dSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
89391d54945dSmrg         >/dev/null 2>conftest.err &&
8940ba85709eSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
89411d54945dSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
89421d54945dSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
89431d54945dSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
89441d54945dSmrg      # icc doesn't choke on unknown options, it will just issue warnings
89451d54945dSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
89461d54945dSmrg      # that says an option was ignored or not supported.
89471d54945dSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
89481d54945dSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
89491d54945dSmrg      # The diagnosis changed in icc 8.0:
89501d54945dSmrg      #   icc: Command line remark: option '-MP' not supported
89511d54945dSmrg      if (grep 'ignoring option' conftest.err ||
89521d54945dSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
89531d54945dSmrg        am_cv_$1_dependencies_compiler_type=$depmode
89541d54945dSmrg        break
89551d54945dSmrg      fi
89561d54945dSmrg    fi
89571d54945dSmrg  done
89581d54945dSmrg
89591d54945dSmrg  cd ..
89601d54945dSmrg  rm -rf conftest.dir
89611d54945dSmrgelse
89621d54945dSmrg  am_cv_$1_dependencies_compiler_type=none
89631d54945dSmrgfi
89641d54945dSmrg])
89651d54945dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
89661d54945dSmrgAM_CONDITIONAL([am__fastdep$1], [
89671d54945dSmrg  test "x$enable_dependency_tracking" != xno \
89681d54945dSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
89691d54945dSmrg])
89701d54945dSmrg
89711d54945dSmrg
89721d54945dSmrg# AM_SET_DEPDIR
89731d54945dSmrg# -------------
89741d54945dSmrg# Choose a directory name for dependency files.
89751d54945dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
89761d54945dSmrgAC_DEFUN([AM_SET_DEPDIR],
89771d54945dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
89781d54945dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
89791d54945dSmrg])
89801d54945dSmrg
89811d54945dSmrg
89821d54945dSmrg# AM_DEP_TRACK
89831d54945dSmrg# ------------
89841d54945dSmrgAC_DEFUN([AM_DEP_TRACK],
89851d54945dSmrg[AC_ARG_ENABLE(dependency-tracking,
89861d54945dSmrg[  --disable-dependency-tracking  speeds up one-time build
89871d54945dSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
89881d54945dSmrgif test "x$enable_dependency_tracking" != xno; then
89891d54945dSmrg  am_depcomp="$ac_aux_dir/depcomp"
89901d54945dSmrg  AMDEPBACKSLASH='\'
89911d54945dSmrgfi
89921d54945dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8993ba85709eSmrgAC_SUBST([AMDEPBACKSLASH])dnl
8994ba85709eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
89951d54945dSmrg])
89961d54945dSmrg
89971d54945dSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
89981d54945dSmrg
8999786a6f21Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
90001d54945dSmrg# Free Software Foundation, Inc.
90011d54945dSmrg#
90021d54945dSmrg# This file is free software; the Free Software Foundation
90031d54945dSmrg# gives unlimited permission to copy and/or distribute it,
90041d54945dSmrg# with or without modifications, as long as this notice is preserved.
90051d54945dSmrg
9006786a6f21Smrg#serial 4
90071d54945dSmrg
90081d54945dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
90091d54945dSmrg# ------------------------------
90101d54945dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9011786a6f21Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files
9012786a6f21Smrg# are listed without --file.  Let's play safe and only enable the eval
9013786a6f21Smrg# if we detect the quoting.
9014786a6f21Smrgcase $CONFIG_FILES in
9015786a6f21Smrg*\'*) eval set x "$CONFIG_FILES" ;;
9016786a6f21Smrg*)   set x $CONFIG_FILES ;;
9017786a6f21Smrgesac
9018786a6f21Smrgshift
9019786a6f21Smrgfor mf
9020786a6f21Smrgdo
90211d54945dSmrg  # Strip MF so we end up with the name of the file.
90221d54945dSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
90231d54945dSmrg  # Check whether this is an Automake generated Makefile or not.
90241d54945dSmrg  # We used to match only the files named `Makefile.in', but
90251d54945dSmrg  # some people rename them; so instead we look at the file content.
90261d54945dSmrg  # Grep'ing the first line is not enough: some people post-process
90271d54945dSmrg  # each Makefile.in and add a new line on top of each file to say so.
9028ba85709eSmrg  # Grep'ing the whole file is not good either: AIX grep has a line
9029ba85709eSmrg  # limit of 2048, but all sed's we know have understand at least 4000.
9030ba85709eSmrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
90311d54945dSmrg    dirpart=`AS_DIRNAME("$mf")`
90321d54945dSmrg  else
90331d54945dSmrg    continue
90341d54945dSmrg  fi
90351d54945dSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
90361d54945dSmrg  # from the Makefile without running `make'.
90371d54945dSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
90381d54945dSmrg  test -z "$DEPDIR" && continue
90391d54945dSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
90401d54945dSmrg  test -z "am__include" && continue
90411d54945dSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
90421d54945dSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
90431d54945dSmrg  U=`sed -n 's/^U = //p' < "$mf"`
90441d54945dSmrg  # Find all dependency output files, they are included files with
90451d54945dSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
90461d54945dSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
90471d54945dSmrg  # expansion.
90481d54945dSmrg  for file in `sed -n "
90491d54945dSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
90501d54945dSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
90511d54945dSmrg    # Make sure the directory exists.
90521d54945dSmrg    test -f "$dirpart/$file" && continue
90531d54945dSmrg    fdir=`AS_DIRNAME(["$file"])`
90541d54945dSmrg    AS_MKDIR_P([$dirpart/$fdir])
90551d54945dSmrg    # echo "creating $dirpart/$file"
90561d54945dSmrg    echo '# dummy' > "$dirpart/$file"
90571d54945dSmrg  done
90581d54945dSmrgdone
90591d54945dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
90601d54945dSmrg
90611d54945dSmrg
90621d54945dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
90631d54945dSmrg# -----------------------------
90641d54945dSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
90651d54945dSmrg#
90661d54945dSmrg# This code is only required when automatic dependency tracking
90671d54945dSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
90681d54945dSmrg# need in order to bootstrap the dependency handling code.
90691d54945dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
90701d54945dSmrg[AC_CONFIG_COMMANDS([depfiles],
90711d54945dSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
90721d54945dSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
90731d54945dSmrg])
90741d54945dSmrg
90751d54945dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
90761d54945dSmrg# Free Software Foundation, Inc.
90771d54945dSmrg#
90781d54945dSmrg# This file is free software; the Free Software Foundation
90791d54945dSmrg# gives unlimited permission to copy and/or distribute it,
90801d54945dSmrg# with or without modifications, as long as this notice is preserved.
90811d54945dSmrg
90821d54945dSmrg# serial 8
90831d54945dSmrg
90841d54945dSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
90851d54945dSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
90861d54945dSmrg
90871d54945dSmrg# Do all the work for Automake.                             -*- Autoconf -*-
90881d54945dSmrg
9089ba85709eSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9090ba85709eSmrg# 2005, 2006, 2008 Free Software Foundation, Inc.
90911d54945dSmrg#
90921d54945dSmrg# This file is free software; the Free Software Foundation
90931d54945dSmrg# gives unlimited permission to copy and/or distribute it,
90941d54945dSmrg# with or without modifications, as long as this notice is preserved.
90951d54945dSmrg
9096ba85709eSmrg# serial 13
90971d54945dSmrg
90981d54945dSmrg# This macro actually does too much.  Some checks are only needed if
90991d54945dSmrg# your package does certain things.  But this isn't really a big deal.
91001d54945dSmrg
91011d54945dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
91021d54945dSmrg# AM_INIT_AUTOMAKE([OPTIONS])
91031d54945dSmrg# -----------------------------------------------
91041d54945dSmrg# The call with PACKAGE and VERSION arguments is the old style
91051d54945dSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
91061d54945dSmrg# and VERSION should now be passed to AC_INIT and removed from
91071d54945dSmrg# the call to AM_INIT_AUTOMAKE.
91081d54945dSmrg# We support both call styles for the transition.  After
91091d54945dSmrg# the next Automake release, Autoconf can make the AC_INIT
91101d54945dSmrg# arguments mandatory, and then we can depend on a new Autoconf
91111d54945dSmrg# release and drop the old call support.
91121d54945dSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
9113ba85709eSmrg[AC_PREREQ([2.60])dnl
91141d54945dSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
91151d54945dSmrgdnl the ones we care about.
91161d54945dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
91171d54945dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
91181d54945dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
9119ba85709eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
9120ba85709eSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9121ba85709eSmrg  # is not polluted with repeated "-I."
9122ba85709eSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9123ba85709eSmrg  # test to see if srcdir already configured
9124ba85709eSmrg  if test -f $srcdir/config.status; then
9125ba85709eSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9126ba85709eSmrg  fi
91271d54945dSmrgfi
91281d54945dSmrg
91291d54945dSmrg# test whether we have cygpath
91301d54945dSmrgif test -z "$CYGPATH_W"; then
91311d54945dSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
91321d54945dSmrg    CYGPATH_W='cygpath -w'
91331d54945dSmrg  else
91341d54945dSmrg    CYGPATH_W=echo
91351d54945dSmrg  fi
91361d54945dSmrgfi
91371d54945dSmrgAC_SUBST([CYGPATH_W])
91381d54945dSmrg
91391d54945dSmrg# Define the identity of the package.
91401d54945dSmrgdnl Distinguish between old-style and new-style calls.
91411d54945dSmrgm4_ifval([$2],
91421d54945dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
91431d54945dSmrg AC_SUBST([PACKAGE], [$1])dnl
91441d54945dSmrg AC_SUBST([VERSION], [$2])],
91451d54945dSmrg[_AM_SET_OPTIONS([$1])dnl
9146ba85709eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9147ba85709eSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9148ba85709eSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
91491d54945dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
91501d54945dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
91511d54945dSmrg
91521d54945dSmrg_AM_IF_OPTION([no-define],,
91531d54945dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
91541d54945dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
91551d54945dSmrg
91561d54945dSmrg# Some tools Automake needs.
91571d54945dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
91581d54945dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
91591d54945dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
91601d54945dSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
91611d54945dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
91621d54945dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
91631d54945dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
91641d54945dSmrgAM_PROG_INSTALL_SH
91651d54945dSmrgAM_PROG_INSTALL_STRIP
91661d54945dSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
91671d54945dSmrg# We need awk for the "check" target.  The system "awk" is bad on
91681d54945dSmrg# some platforms.
91691d54945dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
91701d54945dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
91711d54945dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
91721d54945dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
91731d54945dSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
91741d54945dSmrg	      		     [_AM_PROG_TAR([v7])])])
91751d54945dSmrg_AM_IF_OPTION([no-dependencies],,
91761d54945dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
91771d54945dSmrg                  [_AM_DEPENDENCIES(CC)],
91781d54945dSmrg                  [define([AC_PROG_CC],
91791d54945dSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
91801d54945dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
91811d54945dSmrg                  [_AM_DEPENDENCIES(CXX)],
91821d54945dSmrg                  [define([AC_PROG_CXX],
91831d54945dSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9184ba85709eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
9185ba85709eSmrg                  [_AM_DEPENDENCIES(OBJC)],
9186ba85709eSmrg                  [define([AC_PROG_OBJC],
9187ba85709eSmrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
91881d54945dSmrg])
91891d54945dSmrg])
91901d54945dSmrg
91911d54945dSmrg
91921d54945dSmrg# When config.status generates a header, we must update the stamp-h file.
91931d54945dSmrg# This file resides in the same directory as the config header
91941d54945dSmrg# that is generated.  The stamp files are numbered to have different names.
91951d54945dSmrg
91961d54945dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
91971d54945dSmrg# loop where config.status creates the headers, so we can generate
91981d54945dSmrg# our stamp files there.
91991d54945dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
92001d54945dSmrg[# Compute $1's index in $config_headers.
9201ba85709eSmrg_am_arg=$1
92021d54945dSmrg_am_stamp_count=1
92031d54945dSmrgfor _am_header in $config_headers :; do
92041d54945dSmrg  case $_am_header in
9205ba85709eSmrg    $_am_arg | $_am_arg:* )
92061d54945dSmrg      break ;;
92071d54945dSmrg    * )
92081d54945dSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
92091d54945dSmrg  esac
92101d54945dSmrgdone
9211ba85709eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
92121d54945dSmrg
92131d54945dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
92141d54945dSmrg#
92151d54945dSmrg# This file is free software; the Free Software Foundation
92161d54945dSmrg# gives unlimited permission to copy and/or distribute it,
92171d54945dSmrg# with or without modifications, as long as this notice is preserved.
92181d54945dSmrg
92191d54945dSmrg# AM_PROG_INSTALL_SH
92201d54945dSmrg# ------------------
92211d54945dSmrg# Define $install_sh.
92221d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
92231d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9224ba85709eSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
92251d54945dSmrgAC_SUBST(install_sh)])
92261d54945dSmrg
92271d54945dSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
92281d54945dSmrg#
92291d54945dSmrg# This file is free software; the Free Software Foundation
92301d54945dSmrg# gives unlimited permission to copy and/or distribute it,
92311d54945dSmrg# with or without modifications, as long as this notice is preserved.
92321d54945dSmrg
92331d54945dSmrg# serial 2
92341d54945dSmrg
92351d54945dSmrg# Check whether the underlying file-system supports filenames
92361d54945dSmrg# with a leading dot.  For instance MS-DOS doesn't.
92371d54945dSmrgAC_DEFUN([AM_SET_LEADING_DOT],
92381d54945dSmrg[rm -rf .tst 2>/dev/null
92391d54945dSmrgmkdir .tst 2>/dev/null
92401d54945dSmrgif test -d .tst; then
92411d54945dSmrg  am__leading_dot=.
92421d54945dSmrgelse
92431d54945dSmrg  am__leading_dot=_
92441d54945dSmrgfi
92451d54945dSmrgrmdir .tst 2>/dev/null
92461d54945dSmrgAC_SUBST([am__leading_dot])])
92471d54945dSmrg
92481d54945dSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
92491d54945dSmrg# From Jim Meyering
92501d54945dSmrg
92511d54945dSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
92521d54945dSmrg# Free Software Foundation, Inc.
92531d54945dSmrg#
92541d54945dSmrg# This file is free software; the Free Software Foundation
92551d54945dSmrg# gives unlimited permission to copy and/or distribute it,
92561d54945dSmrg# with or without modifications, as long as this notice is preserved.
92571d54945dSmrg
92581d54945dSmrg# serial 4
92591d54945dSmrg
92601d54945dSmrgAC_DEFUN([AM_MAINTAINER_MODE],
92611d54945dSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
92621d54945dSmrg  dnl maintainer-mode is disabled by default
92631d54945dSmrg  AC_ARG_ENABLE(maintainer-mode,
92641d54945dSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
92651d54945dSmrg			  (and sometimes confusing) to the casual installer],
92661d54945dSmrg      USE_MAINTAINER_MODE=$enableval,
92671d54945dSmrg      USE_MAINTAINER_MODE=no)
92681d54945dSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
92691d54945dSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
92701d54945dSmrg  MAINT=$MAINTAINER_MODE_TRUE
92711d54945dSmrg  AC_SUBST(MAINT)dnl
92721d54945dSmrg]
92731d54945dSmrg)
92741d54945dSmrg
92751d54945dSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
92761d54945dSmrg
92771d54945dSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
92781d54945dSmrg
92791d54945dSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
92801d54945dSmrg#
92811d54945dSmrg# This file is free software; the Free Software Foundation
92821d54945dSmrg# gives unlimited permission to copy and/or distribute it,
92831d54945dSmrg# with or without modifications, as long as this notice is preserved.
92841d54945dSmrg
92851d54945dSmrg# serial 3
92861d54945dSmrg
92871d54945dSmrg# AM_MAKE_INCLUDE()
92881d54945dSmrg# -----------------
92891d54945dSmrg# Check to see how make treats includes.
92901d54945dSmrgAC_DEFUN([AM_MAKE_INCLUDE],
92911d54945dSmrg[am_make=${MAKE-make}
92921d54945dSmrgcat > confinc << 'END'
92931d54945dSmrgam__doit:
92941d54945dSmrg	@echo done
92951d54945dSmrg.PHONY: am__doit
92961d54945dSmrgEND
92971d54945dSmrg# If we don't find an include directive, just comment out the code.
92981d54945dSmrgAC_MSG_CHECKING([for style of include used by $am_make])
92991d54945dSmrgam__include="#"
93001d54945dSmrgam__quote=
93011d54945dSmrg_am_result=none
93021d54945dSmrg# First try GNU make style include.
93031d54945dSmrgecho "include confinc" > confmf
93041d54945dSmrg# We grep out `Entering directory' and `Leaving directory'
93051d54945dSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
93061d54945dSmrg# In particular we don't look at `^make:' because GNU make might
93071d54945dSmrg# be invoked under some other name (usually "gmake"), in which
93081d54945dSmrg# case it prints its new name instead of `make'.
93091d54945dSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
93101d54945dSmrg   am__include=include
93111d54945dSmrg   am__quote=
93121d54945dSmrg   _am_result=GNU
93131d54945dSmrgfi
93141d54945dSmrg# Now try BSD make style include.
93151d54945dSmrgif test "$am__include" = "#"; then
93161d54945dSmrg   echo '.include "confinc"' > confmf
93171d54945dSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
93181d54945dSmrg      am__include=.include
93191d54945dSmrg      am__quote="\""
93201d54945dSmrg      _am_result=BSD
93211d54945dSmrg   fi
93221d54945dSmrgfi
93231d54945dSmrgAC_SUBST([am__include])
93241d54945dSmrgAC_SUBST([am__quote])
93251d54945dSmrgAC_MSG_RESULT([$_am_result])
93261d54945dSmrgrm -f confinc confmf
93271d54945dSmrg])
93281d54945dSmrg
93291d54945dSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
93301d54945dSmrg
9331ba85709eSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
93321d54945dSmrg# Free Software Foundation, Inc.
93331d54945dSmrg#
93341d54945dSmrg# This file is free software; the Free Software Foundation
93351d54945dSmrg# gives unlimited permission to copy and/or distribute it,
93361d54945dSmrg# with or without modifications, as long as this notice is preserved.
93371d54945dSmrg
9338ba85709eSmrg# serial 5
93391d54945dSmrg
93401d54945dSmrg# AM_MISSING_PROG(NAME, PROGRAM)
93411d54945dSmrg# ------------------------------
93421d54945dSmrgAC_DEFUN([AM_MISSING_PROG],
93431d54945dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
93441d54945dSmrg$1=${$1-"${am_missing_run}$2"}
93451d54945dSmrgAC_SUBST($1)])
93461d54945dSmrg
93471d54945dSmrg
93481d54945dSmrg# AM_MISSING_HAS_RUN
93491d54945dSmrg# ------------------
93501d54945dSmrg# Define MISSING if not defined so far and test if it supports --run.
93511d54945dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
93521d54945dSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
93531d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9354ba85709eSmrgAC_REQUIRE_AUX_FILE([missing])dnl
93551d54945dSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
93561d54945dSmrg# Use eval to expand $SHELL
93571d54945dSmrgif eval "$MISSING --run true"; then
93581d54945dSmrg  am_missing_run="$MISSING --run "
93591d54945dSmrgelse
93601d54945dSmrg  am_missing_run=
93611d54945dSmrg  AC_MSG_WARN([`missing' script is too old or missing])
93621d54945dSmrgfi
93631d54945dSmrg])
93641d54945dSmrg
9365ba85709eSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
93661d54945dSmrg#
93671d54945dSmrg# This file is free software; the Free Software Foundation
93681d54945dSmrg# gives unlimited permission to copy and/or distribute it,
93691d54945dSmrg# with or without modifications, as long as this notice is preserved.
93701d54945dSmrg
93711d54945dSmrg# AM_PROG_MKDIR_P
93721d54945dSmrg# ---------------
9373ba85709eSmrg# Check for `mkdir -p'.
93741d54945dSmrgAC_DEFUN([AM_PROG_MKDIR_P],
9375ba85709eSmrg[AC_PREREQ([2.60])dnl
9376ba85709eSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
9377ba85709eSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9378ba85709eSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
9379ba85709eSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9380ba85709eSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9381ba85709eSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
9382ba85709eSmrgdnl adjustment using top_builddir (which is defined more often than
9383ba85709eSmrgdnl MKDIR_P).
9384ba85709eSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9385ba85709eSmrgcase $mkdir_p in
9386ba85709eSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
9387ba85709eSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9388ba85709eSmrgesac
9389ba85709eSmrg])
93901d54945dSmrg
93911d54945dSmrg# Helper functions for option handling.                     -*- Autoconf -*-
93921d54945dSmrg
9393786a6f21Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
93941d54945dSmrg#
93951d54945dSmrg# This file is free software; the Free Software Foundation
93961d54945dSmrg# gives unlimited permission to copy and/or distribute it,
93971d54945dSmrg# with or without modifications, as long as this notice is preserved.
93981d54945dSmrg
9399786a6f21Smrg# serial 4
94001d54945dSmrg
94011d54945dSmrg# _AM_MANGLE_OPTION(NAME)
94021d54945dSmrg# -----------------------
94031d54945dSmrgAC_DEFUN([_AM_MANGLE_OPTION],
94041d54945dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
94051d54945dSmrg
94061d54945dSmrg# _AM_SET_OPTION(NAME)
94071d54945dSmrg# ------------------------------
94081d54945dSmrg# Set option NAME.  Presently that only means defining a flag for this option.
94091d54945dSmrgAC_DEFUN([_AM_SET_OPTION],
94101d54945dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
94111d54945dSmrg
94121d54945dSmrg# _AM_SET_OPTIONS(OPTIONS)
94131d54945dSmrg# ----------------------------------
94141d54945dSmrg# OPTIONS is a space-separated list of Automake options.
94151d54945dSmrgAC_DEFUN([_AM_SET_OPTIONS],
9416786a6f21Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
94171d54945dSmrg
94181d54945dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
94191d54945dSmrg# -------------------------------------------
94201d54945dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
94211d54945dSmrgAC_DEFUN([_AM_IF_OPTION],
94221d54945dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
94231d54945dSmrg
94241d54945dSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
94251d54945dSmrg
94261d54945dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
94271d54945dSmrg# Free Software Foundation, Inc.
94281d54945dSmrg#
94291d54945dSmrg# This file is free software; the Free Software Foundation
94301d54945dSmrg# gives unlimited permission to copy and/or distribute it,
94311d54945dSmrg# with or without modifications, as long as this notice is preserved.
94321d54945dSmrg
94331d54945dSmrg# serial 4
94341d54945dSmrg
94351d54945dSmrg# AM_SANITY_CHECK
94361d54945dSmrg# ---------------
94371d54945dSmrgAC_DEFUN([AM_SANITY_CHECK],
94381d54945dSmrg[AC_MSG_CHECKING([whether build environment is sane])
94391d54945dSmrg# Just in case
94401d54945dSmrgsleep 1
94411d54945dSmrgecho timestamp > conftest.file
94421d54945dSmrg# Do `set' in a subshell so we don't clobber the current shell's
94431d54945dSmrg# arguments.  Must try -L first in case configure is actually a
94441d54945dSmrg# symlink; some systems play weird games with the mod time of symlinks
94451d54945dSmrg# (eg FreeBSD returns the mod time of the symlink's containing
94461d54945dSmrg# directory).
94471d54945dSmrgif (
94481d54945dSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
94491d54945dSmrg   if test "$[*]" = "X"; then
94501d54945dSmrg      # -L didn't work.
94511d54945dSmrg      set X `ls -t $srcdir/configure conftest.file`
94521d54945dSmrg   fi
94531d54945dSmrg   rm -f conftest.file
94541d54945dSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
94551d54945dSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
94561d54945dSmrg
94571d54945dSmrg      # If neither matched, then we have a broken ls.  This can happen
94581d54945dSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
94591d54945dSmrg      # broken ls alias from the environment.  This has actually
94601d54945dSmrg      # happened.  Such a system could not be considered "sane".
94611d54945dSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
94621d54945dSmrgalias in your environment])
94631d54945dSmrg   fi
94641d54945dSmrg
94651d54945dSmrg   test "$[2]" = conftest.file
94661d54945dSmrg   )
94671d54945dSmrgthen
94681d54945dSmrg   # Ok.
94691d54945dSmrg   :
94701d54945dSmrgelse
94711d54945dSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
94721d54945dSmrgCheck your system clock])
94731d54945dSmrgfi
94741d54945dSmrgAC_MSG_RESULT(yes)])
94751d54945dSmrg
94761d54945dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
94771d54945dSmrg#
94781d54945dSmrg# This file is free software; the Free Software Foundation
94791d54945dSmrg# gives unlimited permission to copy and/or distribute it,
94801d54945dSmrg# with or without modifications, as long as this notice is preserved.
94811d54945dSmrg
94821d54945dSmrg# AM_PROG_INSTALL_STRIP
94831d54945dSmrg# ---------------------
94841d54945dSmrg# One issue with vendor `install' (even GNU) is that you can't
94851d54945dSmrg# specify the program used to strip binaries.  This is especially
94861d54945dSmrg# annoying in cross-compiling environments, where the build's strip
94871d54945dSmrg# is unlikely to handle the host's binaries.
94881d54945dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
94891d54945dSmrg# always use install-sh in `make install-strip', and initialize
94901d54945dSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
94911d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
94921d54945dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
94931d54945dSmrg# Installed binaries are usually stripped using `strip' when the user
94941d54945dSmrg# run `make install-strip'.  However `strip' might not be the right
94951d54945dSmrg# tool to use in cross-compilation environments, therefore Automake
94961d54945dSmrg# will honor the `STRIP' environment variable to overrule this program.
94971d54945dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
94981d54945dSmrgif test "$cross_compiling" != no; then
94991d54945dSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
95001d54945dSmrgfi
9501ba85709eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
95021d54945dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
95031d54945dSmrg
9504ba85709eSmrg# Copyright (C) 2006  Free Software Foundation, Inc.
9505ba85709eSmrg#
9506ba85709eSmrg# This file is free software; the Free Software Foundation
9507ba85709eSmrg# gives unlimited permission to copy and/or distribute it,
9508ba85709eSmrg# with or without modifications, as long as this notice is preserved.
9509ba85709eSmrg
9510ba85709eSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
9511ba85709eSmrg# ---------------------------
9512ba85709eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9513ba85709eSmrg# This macro is traced by Automake.
9514ba85709eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9515ba85709eSmrg
95161d54945dSmrg# Check how to create a tarball.                            -*- Autoconf -*-
95171d54945dSmrg
95181d54945dSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
95191d54945dSmrg#
95201d54945dSmrg# This file is free software; the Free Software Foundation
95211d54945dSmrg# gives unlimited permission to copy and/or distribute it,
95221d54945dSmrg# with or without modifications, as long as this notice is preserved.
95231d54945dSmrg
95241d54945dSmrg# serial 2
95251d54945dSmrg
95261d54945dSmrg# _AM_PROG_TAR(FORMAT)
95271d54945dSmrg# --------------------
95281d54945dSmrg# Check how to create a tarball in format FORMAT.
95291d54945dSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
95301d54945dSmrg#
95311d54945dSmrg# Substitute a variable $(am__tar) that is a command
95321d54945dSmrg# writing to stdout a FORMAT-tarball containing the directory
95331d54945dSmrg# $tardir.
95341d54945dSmrg#     tardir=directory && $(am__tar) > result.tar
95351d54945dSmrg#
95361d54945dSmrg# Substitute a variable $(am__untar) that extract such
95371d54945dSmrg# a tarball read from stdin.
95381d54945dSmrg#     $(am__untar) < result.tar
95391d54945dSmrgAC_DEFUN([_AM_PROG_TAR],
95401d54945dSmrg[# Always define AMTAR for backward compatibility.
95411d54945dSmrgAM_MISSING_PROG([AMTAR], [tar])
95421d54945dSmrgm4_if([$1], [v7],
95431d54945dSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
95441d54945dSmrg     [m4_case([$1], [ustar],, [pax],,
95451d54945dSmrg              [m4_fatal([Unknown tar format])])
95461d54945dSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
95471d54945dSmrg# Loop over all known methods to create a tar archive until one works.
95481d54945dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
95491d54945dSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
95501d54945dSmrg# Do not fold the above two line into one, because Tru64 sh and
95511d54945dSmrg# Solaris sh will not grok spaces in the rhs of `-'.
95521d54945dSmrgfor _am_tool in $_am_tools
95531d54945dSmrgdo
95541d54945dSmrg  case $_am_tool in
95551d54945dSmrg  gnutar)
95561d54945dSmrg    for _am_tar in tar gnutar gtar;
95571d54945dSmrg    do
95581d54945dSmrg      AM_RUN_LOG([$_am_tar --version]) && break
95591d54945dSmrg    done
95601d54945dSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
95611d54945dSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
95621d54945dSmrg    am__untar="$_am_tar -xf -"
95631d54945dSmrg    ;;
95641d54945dSmrg  plaintar)
95651d54945dSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
95661d54945dSmrg    # ustar tarball either.
95671d54945dSmrg    (tar --version) >/dev/null 2>&1 && continue
95681d54945dSmrg    am__tar='tar chf - "$$tardir"'
95691d54945dSmrg    am__tar_='tar chf - "$tardir"'
95701d54945dSmrg    am__untar='tar xf -'
95711d54945dSmrg    ;;
95721d54945dSmrg  pax)
95731d54945dSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
95741d54945dSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
95751d54945dSmrg    am__untar='pax -r'
95761d54945dSmrg    ;;
95771d54945dSmrg  cpio)
95781d54945dSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
95791d54945dSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
95801d54945dSmrg    am__untar='cpio -i -H $1 -d'
95811d54945dSmrg    ;;
95821d54945dSmrg  none)
95831d54945dSmrg    am__tar=false
95841d54945dSmrg    am__tar_=false
95851d54945dSmrg    am__untar=false
95861d54945dSmrg    ;;
95871d54945dSmrg  esac
95881d54945dSmrg
95891d54945dSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
95901d54945dSmrg  # and am__untar set.
95911d54945dSmrg  test -n "${am_cv_prog_tar_$1}" && break
95921d54945dSmrg
95931d54945dSmrg  # tar/untar a dummy directory, and stop if the command works
95941d54945dSmrg  rm -rf conftest.dir
95951d54945dSmrg  mkdir conftest.dir
95961d54945dSmrg  echo GrepMe > conftest.dir/file
95971d54945dSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
95981d54945dSmrg  rm -rf conftest.dir
95991d54945dSmrg  if test -s conftest.tar; then
96001d54945dSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
96011d54945dSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
96021d54945dSmrg  fi
96031d54945dSmrgdone
96041d54945dSmrgrm -rf conftest.dir
96051d54945dSmrg
96061d54945dSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
96071d54945dSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
96081d54945dSmrgAC_SUBST([am__tar])
96091d54945dSmrgAC_SUBST([am__untar])
96101d54945dSmrg]) # _AM_PROG_TAR
96111d54945dSmrg
9612