aclocal.m4 revision f05b35a2
1f05b35a2Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2e0963edeSmrg
3e0963edeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4f05b35a2Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5e0963edeSmrg# This file is free software; the Free Software Foundation
6e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
7e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8e0963edeSmrg
9e0963edeSmrg# This program is distributed in the hope that it will be useful,
10e0963edeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11e0963edeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12e0963edeSmrg# PARTICULAR PURPOSE.
13e0963edeSmrg
14e0963edeSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15e0963edeSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16f05b35a2Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17f05b35a2Smrg[m4_warning([this file was generated for autoconf 2.63.
18e0963edeSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19e0963edeSmrgIf you have problems, you may need to regenerate the build system entirely.
20e0963edeSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21e0963edeSmrg
22e0963edeSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23f05b35a2Smrg#
24f05b35a2Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25f05b35a2Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26f05b35a2Smrg#   Written by Gordon Matzigkeit, 1996
27f05b35a2Smrg#
28f05b35a2Smrg# This file is free software; the Free Software Foundation gives
29f05b35a2Smrg# unlimited permission to copy and/or distribute it, with or without
30f05b35a2Smrg# modifications, as long as this notice is preserved.
31f05b35a2Smrg
32f05b35a2Smrgm4_define([_LT_COPYING], [dnl
33f05b35a2Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34f05b35a2Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35f05b35a2Smrg#   Written by Gordon Matzigkeit, 1996
36f05b35a2Smrg#
37f05b35a2Smrg#   This file is part of GNU Libtool.
38f05b35a2Smrg#
39f05b35a2Smrg# GNU Libtool is free software; you can redistribute it and/or
40f05b35a2Smrg# modify it under the terms of the GNU General Public License as
41f05b35a2Smrg# published by the Free Software Foundation; either version 2 of
42f05b35a2Smrg# the License, or (at your option) any later version.
43f05b35a2Smrg#
44f05b35a2Smrg# As a special exception to the GNU General Public License,
45f05b35a2Smrg# if you distribute this file as part of a program or library that
46f05b35a2Smrg# is built using GNU Libtool, you may include this file under the
47f05b35a2Smrg# same distribution terms that you use for the rest of that program.
48f05b35a2Smrg#
49f05b35a2Smrg# GNU Libtool is distributed in the hope that it will be useful,
50f05b35a2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51f05b35a2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52f05b35a2Smrg# GNU General Public License for more details.
53f05b35a2Smrg#
54f05b35a2Smrg# You should have received a copy of the GNU General Public License
55f05b35a2Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56f05b35a2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57f05b35a2Smrg# obtained by writing to the Free Software Foundation, Inc.,
58f05b35a2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59f05b35a2Smrg])
60e0963edeSmrg
61f05b35a2Smrg# serial 56 LT_INIT
62e0963edeSmrg
63e0963edeSmrg
64f05b35a2Smrg# LT_PREREQ(VERSION)
65f05b35a2Smrg# ------------------
66f05b35a2Smrg# Complain and exit if this libtool version is less that VERSION.
67f05b35a2Smrgm4_defun([LT_PREREQ],
68f05b35a2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69f05b35a2Smrg       [m4_default([$3],
70f05b35a2Smrg		   [m4_fatal([Libtool version $1 or higher is required],
71f05b35a2Smrg		             63)])],
72f05b35a2Smrg       [$2])])
73e0963edeSmrg
74e0963edeSmrg
75f05b35a2Smrg# _LT_CHECK_BUILDDIR
76f05b35a2Smrg# ------------------
77f05b35a2Smrg# Complain if the absolute build directory name contains unusual characters
78f05b35a2Smrgm4_defun([_LT_CHECK_BUILDDIR],
79f05b35a2Smrg[case `pwd` in
80f05b35a2Smrg  *\ * | *\	*)
81f05b35a2Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82f05b35a2Smrgesac
83f05b35a2Smrg])
84f05b35a2Smrg
85f05b35a2Smrg
86f05b35a2Smrg# LT_INIT([OPTIONS])
87f05b35a2Smrg# ------------------
88f05b35a2SmrgAC_DEFUN([LT_INIT],
89f05b35a2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90f05b35a2SmrgAC_BEFORE([$0], [LT_LANG])dnl
91f05b35a2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92f05b35a2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93f05b35a2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
94f05b35a2Smrg
95f05b35a2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96f05b35a2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97f05b35a2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98f05b35a2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99f05b35a2Smrgdnl unless we require an AC_DEFUNed macro:
100f05b35a2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101f05b35a2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102f05b35a2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103f05b35a2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104f05b35a2Smrgm4_require([_LT_PROG_LTMAIN])dnl
105f05b35a2Smrg
106f05b35a2Smrgdnl Parse OPTIONS
107f05b35a2Smrg_LT_SET_OPTIONS([$0], [$1])
108e0963edeSmrg
109e0963edeSmrg# This can be used to rebuild libtool when needed
110f05b35a2SmrgLIBTOOL_DEPS="$ltmain"
111e0963edeSmrg
112e0963edeSmrg# Always use our own libtool.
113e0963edeSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
114e0963edeSmrgAC_SUBST(LIBTOOL)dnl
115e0963edeSmrg
116f05b35a2Smrg_LT_SETUP
117e0963edeSmrg
118f05b35a2Smrg# Only expand once:
119f05b35a2Smrgm4_define([LT_INIT])
120f05b35a2Smrg])# LT_INIT
121e0963edeSmrg
122f05b35a2Smrg# Old names:
123f05b35a2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124f05b35a2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
126f05b35a2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127f05b35a2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128f05b35a2Smrg
129f05b35a2Smrg
130f05b35a2Smrg# _LT_CC_BASENAME(CC)
131f05b35a2Smrg# -------------------
132f05b35a2Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133f05b35a2Smrgm4_defun([_LT_CC_BASENAME],
134f05b35a2Smrg[for cc_temp in $1""; do
135f05b35a2Smrg  case $cc_temp in
136f05b35a2Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137f05b35a2Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138f05b35a2Smrg    \-*) ;;
139f05b35a2Smrg    *) break;;
140f05b35a2Smrg  esac
141f05b35a2Smrgdone
142f05b35a2Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143f05b35a2Smrg])
144f05b35a2Smrg
145f05b35a2Smrg
146f05b35a2Smrg# _LT_FILEUTILS_DEFAULTS
147f05b35a2Smrg# ----------------------
148f05b35a2Smrg# It is okay to use these file commands and assume they have been set
149f05b35a2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150f05b35a2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151f05b35a2Smrg[: ${CP="cp -f"}
152f05b35a2Smrg: ${MV="mv -f"}
153f05b35a2Smrg: ${RM="rm -f"}
154f05b35a2Smrg])# _LT_FILEUTILS_DEFAULTS
155f05b35a2Smrg
156f05b35a2Smrg
157f05b35a2Smrg# _LT_SETUP
158f05b35a2Smrg# ---------
159f05b35a2Smrgm4_defun([_LT_SETUP],
160f05b35a2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161e0963edeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162f05b35a2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163f05b35a2Smrg_LT_DECL([], [host], [0])dnl
164f05b35a2Smrg_LT_DECL([], [host_os], [0])dnl
165f05b35a2Smrgdnl
166f05b35a2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167f05b35a2Smrg_LT_DECL([], [build], [0])dnl
168f05b35a2Smrg_LT_DECL([], [build_os], [0])dnl
169f05b35a2Smrgdnl
170e0963edeSmrgAC_REQUIRE([AC_PROG_CC])dnl
171f05b35a2SmrgAC_REQUIRE([LT_PATH_LD])dnl
172f05b35a2SmrgAC_REQUIRE([LT_PATH_NM])dnl
173f05b35a2Smrgdnl
174e0963edeSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175f05b35a2Smrgtest -z "$LN_S" && LN_S="ln -s"
176f05b35a2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177f05b35a2Smrgdnl
178f05b35a2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179f05b35a2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180f05b35a2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181e0963edeSmrgdnl
182f05b35a2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183f05b35a2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184f05b35a2Smrgm4_require([_LT_CMD_RELOAD])dnl
185f05b35a2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186f05b35a2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187f05b35a2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188f05b35a2Smrg
189f05b35a2Smrg_LT_CONFIG_LIBTOOL_INIT([
190f05b35a2Smrg# See if we are running on zsh, and set the options which allow our
191f05b35a2Smrg# commands through without removal of \ escapes INIT.
192f05b35a2Smrgif test -n "\${ZSH_VERSION+set}" ; then
193f05b35a2Smrg   setopt NO_GLOB_SUBST
194f05b35a2Smrgfi
195f05b35a2Smrg])
196f05b35a2Smrgif test -n "${ZSH_VERSION+set}" ; then
197f05b35a2Smrg   setopt NO_GLOB_SUBST
198f05b35a2Smrgfi
199e0963edeSmrg
200f05b35a2Smrg_LT_CHECK_OBJDIR
201e0963edeSmrg
202f05b35a2Smrgm4_require([_LT_TAG_COMPILER])dnl
203f05b35a2Smrg_LT_PROG_ECHO_BACKSLASH
204e0963edeSmrg
205e0963edeSmrgcase $host_os in
206e0963edeSmrgaix3*)
207e0963edeSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
208e0963edeSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
209e0963edeSmrg  # vanish in a puff of smoke.
210e0963edeSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
211e0963edeSmrg    COLLECT_NAMES=
212e0963edeSmrg    export COLLECT_NAMES
213e0963edeSmrg  fi
214e0963edeSmrg  ;;
215e0963edeSmrgesac
216e0963edeSmrg
217e0963edeSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
218e0963edeSmrg# metacharacters that are still active within double-quoted strings.
219f05b35a2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220e0963edeSmrg
221e0963edeSmrg# Same as above, but do not quote variable references.
222f05b35a2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
223e0963edeSmrg
224e0963edeSmrg# Sed substitution to delay expansion of an escaped shell variable in a
225e0963edeSmrg# double_quote_subst'ed string.
226e0963edeSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227e0963edeSmrg
228f05b35a2Smrg# Sed substitution to delay expansion of an escaped single quote.
229f05b35a2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230f05b35a2Smrg
231e0963edeSmrg# Sed substitution to avoid accidental globbing in evaled expressions
232e0963edeSmrgno_glob_subst='s/\*/\\\*/g'
233e0963edeSmrg
234e0963edeSmrg# Global variables:
235f05b35a2Smrgofile=libtool
236e0963edeSmrgcan_build_shared=yes
237e0963edeSmrg
238e0963edeSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
239e0963edeSmrg# which needs '.lib').
240e0963edeSmrglibext=a
241e0963edeSmrg
242f05b35a2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
243e0963edeSmrg
244e0963edeSmrgold_CC="$CC"
245e0963edeSmrgold_CFLAGS="$CFLAGS"
246e0963edeSmrg
247e0963edeSmrg# Set sane defaults for various variables
248e0963edeSmrgtest -z "$CC" && CC=cc
249e0963edeSmrgtest -z "$LTCC" && LTCC=$CC
250e0963edeSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
251e0963edeSmrgtest -z "$LD" && LD=ld
252e0963edeSmrgtest -z "$ac_objext" && ac_objext=o
253e0963edeSmrg
254e0963edeSmrg_LT_CC_BASENAME([$compiler])
255e0963edeSmrg
256e0963edeSmrg# Only perform the check for file, if the check method requires it
257f05b35a2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
258e0963edeSmrgcase $deplibs_check_method in
259e0963edeSmrgfile_magic*)
260e0963edeSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261f05b35a2Smrg    _LT_PATH_MAGIC
262e0963edeSmrg  fi
263e0963edeSmrg  ;;
264e0963edeSmrgesac
265e0963edeSmrg
266f05b35a2Smrg# Use C for the default configuration in the libtool script
267f05b35a2SmrgLT_SUPPORTED_TAG([CC])
268f05b35a2Smrg_LT_LANG_C_CONFIG
269f05b35a2Smrg_LT_LANG_DEFAULT_CONFIG
270f05b35a2Smrg_LT_CONFIG_COMMANDS
271f05b35a2Smrg])# _LT_SETUP
272e0963edeSmrg
273e0963edeSmrg
274f05b35a2Smrg# _LT_PROG_LTMAIN
275f05b35a2Smrg# ---------------
276f05b35a2Smrg# Note that this code is called both from `configure', and `config.status'
277f05b35a2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278f05b35a2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279f05b35a2Smrg# so we pass a copy along to make sure it has a sensible value anyway.
280f05b35a2Smrgm4_defun([_LT_PROG_LTMAIN],
281f05b35a2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282f05b35a2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283f05b35a2Smrgltmain="$ac_aux_dir/ltmain.sh"
284f05b35a2Smrg])# _LT_PROG_LTMAIN
285e0963edeSmrg
286e0963edeSmrg
287e0963edeSmrg
288f05b35a2Smrg# So that we can recreate a full libtool script including additional
289f05b35a2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290f05b35a2Smrg# in macros and then make a single call at the end using the `libtool'
291f05b35a2Smrg# label.
292f05b35a2Smrg
293f05b35a2Smrg
294f05b35a2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295f05b35a2Smrg# ----------------------------------------
296f05b35a2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297f05b35a2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298f05b35a2Smrg[m4_ifval([$1],
299f05b35a2Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300f05b35a2Smrg                     [$1
301f05b35a2Smrg])])])
302f05b35a2Smrg
303f05b35a2Smrg# Initialize.
304f05b35a2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305f05b35a2Smrg
306f05b35a2Smrg
307f05b35a2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308f05b35a2Smrg# ------------------------------
309f05b35a2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310f05b35a2Smrgm4_define([_LT_CONFIG_LIBTOOL],
311f05b35a2Smrg[m4_ifval([$1],
312f05b35a2Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313f05b35a2Smrg                     [$1
314f05b35a2Smrg])])])
315f05b35a2Smrg
316f05b35a2Smrg# Initialize.
317f05b35a2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318f05b35a2Smrg
319f05b35a2Smrg
320f05b35a2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321f05b35a2Smrg# -----------------------------------------------------
322f05b35a2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323f05b35a2Smrg[_LT_CONFIG_LIBTOOL([$1])
324f05b35a2Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
325f05b35a2Smrg])
326f05b35a2Smrg
327f05b35a2Smrg
328f05b35a2Smrg# _LT_FORMAT_COMMENT([COMMENT])
329f05b35a2Smrg# -----------------------------
330f05b35a2Smrg# Add leading comment marks to the start of each line, and a trailing
331f05b35a2Smrg# full-stop to the whole comment if one is not present already.
332f05b35a2Smrgm4_define([_LT_FORMAT_COMMENT],
333f05b35a2Smrg[m4_ifval([$1], [
334f05b35a2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335f05b35a2Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336f05b35a2Smrg)])
337f05b35a2Smrg
338f05b35a2Smrg
339f05b35a2Smrg
340f05b35a2Smrg
341f05b35a2Smrg
342f05b35a2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343f05b35a2Smrg# -------------------------------------------------------------------
344f05b35a2Smrg# CONFIGNAME is the name given to the value in the libtool script.
345f05b35a2Smrg# VARNAME is the (base) name used in the configure script.
346f05b35a2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347f05b35a2Smrg# VARNAME.  Any other value will be used directly.
348f05b35a2Smrgm4_define([_LT_DECL],
349f05b35a2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350f05b35a2Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351f05b35a2Smrg	[m4_ifval([$1], [$1], [$2])])
352f05b35a2Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353f05b35a2Smrg    m4_ifval([$4],
354f05b35a2Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355f05b35a2Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356f05b35a2Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357f05b35a2Smrg])
358f05b35a2Smrg
359f05b35a2Smrg
360f05b35a2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361f05b35a2Smrg# --------------------------------------------------------
362f05b35a2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363f05b35a2Smrg
364f05b35a2Smrg
365f05b35a2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366f05b35a2Smrg# ------------------------------------------------
367f05b35a2Smrgm4_define([lt_decl_tag_varnames],
368f05b35a2Smrg[_lt_decl_filter([tagged?], [yes], $@)])
369f05b35a2Smrg
370f05b35a2Smrg
371f05b35a2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372f05b35a2Smrg# ---------------------------------------------------------
373f05b35a2Smrgm4_define([_lt_decl_filter],
374f05b35a2Smrg[m4_case([$#],
375f05b35a2Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
376f05b35a2Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377f05b35a2Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378f05b35a2Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379f05b35a2Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380f05b35a2Smrg])
381f05b35a2Smrg
382f05b35a2Smrg
383f05b35a2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384f05b35a2Smrg# --------------------------------------------------
385f05b35a2Smrgm4_define([lt_decl_quote_varnames],
386f05b35a2Smrg[_lt_decl_filter([value], [1], $@)])
387f05b35a2Smrg
388f05b35a2Smrg
389f05b35a2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390f05b35a2Smrg# ---------------------------------------------------
391f05b35a2Smrgm4_define([lt_decl_dquote_varnames],
392f05b35a2Smrg[_lt_decl_filter([value], [2], $@)])
393f05b35a2Smrg
394f05b35a2Smrg
395f05b35a2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396f05b35a2Smrg# ---------------------------------------------------
397f05b35a2Smrgm4_define([lt_decl_varnames_tagged],
398f05b35a2Smrg[m4_assert([$# <= 2])dnl
399f05b35a2Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
400f05b35a2Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401f05b35a2Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402f05b35a2Smrgm4_define([_lt_decl_varnames_tagged],
403f05b35a2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404f05b35a2Smrg
405f05b35a2Smrg
406f05b35a2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407f05b35a2Smrg# ------------------------------------------------
408f05b35a2Smrgm4_define([lt_decl_all_varnames],
409f05b35a2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410f05b35a2Smrg     m4_if([$2], [],
411f05b35a2Smrg	   m4_quote(lt_decl_varnames),
412f05b35a2Smrg	m4_quote(m4_shift($@))))[]dnl
413f05b35a2Smrg])
414f05b35a2Smrgm4_define([_lt_decl_all_varnames],
415f05b35a2Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
416f05b35a2Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417f05b35a2Smrg])
418f05b35a2Smrg
419f05b35a2Smrg
420f05b35a2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421f05b35a2Smrg# ------------------------------------
422f05b35a2Smrg# Quote a variable value, and forward it to `config.status' so that its
423f05b35a2Smrg# declaration there will have the same value as in `configure'.  VARNAME
424f05b35a2Smrg# must have a single quote delimited value for this to work.
425f05b35a2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426f05b35a2Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427f05b35a2Smrg
428f05b35a2Smrg
429f05b35a2Smrg# _LT_CONFIG_STATUS_DECLARATIONS
430f05b35a2Smrg# ------------------------------
431f05b35a2Smrg# We delimit libtool config variables with single quotes, so when
432f05b35a2Smrg# we write them to config.status, we have to be sure to quote all
433f05b35a2Smrg# embedded single quotes properly.  In configure, this macro expands
434f05b35a2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435f05b35a2Smrg#
436f05b35a2Smrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437f05b35a2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438f05b35a2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439f05b35a2Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440f05b35a2Smrg
441f05b35a2Smrg
442f05b35a2Smrg# _LT_LIBTOOL_TAGS
443f05b35a2Smrg# ----------------
444f05b35a2Smrg# Output comment and list of tags supported by the script
445f05b35a2Smrgm4_defun([_LT_LIBTOOL_TAGS],
446f05b35a2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447f05b35a2Smrgavailable_tags="_LT_TAGS"dnl
448f05b35a2Smrg])
449f05b35a2Smrg
450f05b35a2Smrg
451f05b35a2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452f05b35a2Smrg# -----------------------------------
453f05b35a2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454f05b35a2Smrg# expand to a commented shell variable setting:
455f05b35a2Smrg#
456f05b35a2Smrg#    # Some comment about what VAR is for.
457f05b35a2Smrg#    visible_name=$lt_internal_name
458f05b35a2Smrgm4_define([_LT_LIBTOOL_DECLARE],
459f05b35a2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460f05b35a2Smrg					   [description])))[]dnl
461f05b35a2Smrgm4_pushdef([_libtool_name],
462f05b35a2Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463f05b35a2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464f05b35a2Smrg    [0], [_libtool_name=[$]$1],
465f05b35a2Smrg    [1], [_libtool_name=$lt_[]$1],
466f05b35a2Smrg    [2], [_libtool_name=$lt_[]$1],
467f05b35a2Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468f05b35a2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469f05b35a2Smrg])
470f05b35a2Smrg
471f05b35a2Smrg
472f05b35a2Smrg# _LT_LIBTOOL_CONFIG_VARS
473f05b35a2Smrg# -----------------------
474f05b35a2Smrg# Produce commented declarations of non-tagged libtool config variables
475f05b35a2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476f05b35a2Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477f05b35a2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478f05b35a2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479f05b35a2Smrg[m4_foreach([_lt_var],
480f05b35a2Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481f05b35a2Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482f05b35a2Smrg
483f05b35a2Smrg
484f05b35a2Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
485f05b35a2Smrg# -------------------------
486f05b35a2Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
487f05b35a2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488f05b35a2Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489f05b35a2Smrg
490f05b35a2Smrg
491f05b35a2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492f05b35a2Smrg# ------------------------------
493f05b35a2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494f05b35a2Smrg
495f05b35a2Smrg
496f05b35a2Smrg# _LT_CONFIG_COMMANDS
497e0963edeSmrg# -------------------
498f05b35a2Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499f05b35a2Smrg# variables for single and double quote escaping we saved from calls
500f05b35a2Smrg# to _LT_DECL, we can put quote escaped variables declarations
501f05b35a2Smrg# into `config.status', and then the shell code to quote escape them in
502f05b35a2Smrg# for loops in `config.status'.  Finally, any additional code accumulated
503f05b35a2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504f05b35a2Smrgm4_defun([_LT_CONFIG_COMMANDS],
505f05b35a2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506f05b35a2Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507f05b35a2Smrg	dnl instead of duplicating it all over again into config.status,
508f05b35a2Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
509f05b35a2Smrg	dnl needs to know what name is stored there:
510f05b35a2Smrg        [AC_CONFIG_COMMANDS([libtool],
511f05b35a2Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512f05b35a2Smrg    dnl If the libtool generation code is destined for config.status,
513f05b35a2Smrg    dnl expand the accumulated commands and init code now:
514f05b35a2Smrg    [AC_CONFIG_COMMANDS([libtool],
515f05b35a2Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516f05b35a2Smrg])#_LT_CONFIG_COMMANDS
517f05b35a2Smrg
518f05b35a2Smrg
519f05b35a2Smrg# Initialize.
520f05b35a2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521f05b35a2Smrg[
522f05b35a2Smrg
523f05b35a2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524f05b35a2Smrg# if CDPATH is set.
525f05b35a2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526f05b35a2Smrg
527f05b35a2Smrgsed_quote_subst='$sed_quote_subst'
528f05b35a2Smrgdouble_quote_subst='$double_quote_subst'
529f05b35a2Smrgdelay_variable_subst='$delay_variable_subst'
530f05b35a2Smrg_LT_CONFIG_STATUS_DECLARATIONS
531f05b35a2SmrgLTCC='$LTCC'
532f05b35a2SmrgLTCFLAGS='$LTCFLAGS'
533f05b35a2Smrgcompiler='$compiler_DEFAULT'
534f05b35a2Smrg
535f05b35a2Smrg# Quote evaled strings.
536f05b35a2Smrgfor var in lt_decl_all_varnames([[ \
537f05b35a2Smrg]], lt_decl_quote_varnames); do
538f05b35a2Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539f05b35a2Smrg    *[[\\\\\\\`\\"\\\$]]*)
540f05b35a2Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541f05b35a2Smrg      ;;
542f05b35a2Smrg    *)
543f05b35a2Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544f05b35a2Smrg      ;;
545f05b35a2Smrg    esac
546f05b35a2Smrgdone
547f05b35a2Smrg
548f05b35a2Smrg# Double-quote double-evaled strings.
549f05b35a2Smrgfor var in lt_decl_all_varnames([[ \
550f05b35a2Smrg]], lt_decl_dquote_varnames); do
551f05b35a2Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552f05b35a2Smrg    *[[\\\\\\\`\\"\\\$]]*)
553f05b35a2Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554f05b35a2Smrg      ;;
555f05b35a2Smrg    *)
556f05b35a2Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557f05b35a2Smrg      ;;
558f05b35a2Smrg    esac
559f05b35a2Smrgdone
560f05b35a2Smrg
561f05b35a2Smrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562f05b35a2Smrgcase \$lt_ECHO in
563f05b35a2Smrg*'\\\[$]0 --fallback-echo"')dnl "
564f05b35a2Smrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565f05b35a2Smrg  ;;
566f05b35a2Smrgesac
567f05b35a2Smrg
568f05b35a2Smrg_LT_OUTPUT_LIBTOOL_INIT
569f05b35a2Smrg])
570f05b35a2Smrg
571f05b35a2Smrg
572f05b35a2Smrg# LT_OUTPUT
573f05b35a2Smrg# ---------
574f05b35a2Smrg# This macro allows early generation of the libtool script (before
575f05b35a2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
576f05b35a2Smrg# tests.
577f05b35a2SmrgAC_DEFUN([LT_OUTPUT],
578f05b35a2Smrg[: ${CONFIG_LT=./config.lt}
579f05b35a2SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580f05b35a2Smrgcat >"$CONFIG_LT" <<_LTEOF
581f05b35a2Smrg#! $SHELL
582f05b35a2Smrg# Generated by $as_me.
583f05b35a2Smrg# Run this file to recreate a libtool stub with the current configuration.
584f05b35a2Smrg
585f05b35a2Smrglt_cl_silent=false
586f05b35a2SmrgSHELL=\${CONFIG_SHELL-$SHELL}
587f05b35a2Smrg_LTEOF
588f05b35a2Smrg
589f05b35a2Smrgcat >>"$CONFIG_LT" <<\_LTEOF
590f05b35a2SmrgAS_SHELL_SANITIZE
591f05b35a2Smrg_AS_PREPARE
592f05b35a2Smrg
593f05b35a2Smrgexec AS_MESSAGE_FD>&1
594f05b35a2Smrgexec AS_MESSAGE_LOG_FD>>config.log
595f05b35a2Smrg{
596f05b35a2Smrg  echo
597f05b35a2Smrg  AS_BOX([Running $as_me.])
598f05b35a2Smrg} >&AS_MESSAGE_LOG_FD
599f05b35a2Smrg
600f05b35a2Smrglt_cl_help="\
601f05b35a2Smrg\`$as_me' creates a local libtool stub from the current configuration,
602f05b35a2Smrgfor use in further configure time tests before the real libtool is
603f05b35a2Smrggenerated.
604f05b35a2Smrg
605f05b35a2SmrgUsage: $[0] [[OPTIONS]]
606f05b35a2Smrg
607f05b35a2Smrg  -h, --help      print this help, then exit
608f05b35a2Smrg  -V, --version   print version number, then exit
609f05b35a2Smrg  -q, --quiet     do not print progress messages
610f05b35a2Smrg  -d, --debug     don't remove temporary files
611f05b35a2Smrg
612f05b35a2SmrgReport bugs to <bug-libtool@gnu.org>."
613f05b35a2Smrg
614f05b35a2Smrglt_cl_version="\
615f05b35a2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616f05b35a2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617f05b35a2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618f05b35a2Smrg
619f05b35a2SmrgCopyright (C) 2008 Free Software Foundation, Inc.
620f05b35a2SmrgThis config.lt script is free software; the Free Software Foundation
621f05b35a2Smrggives unlimited permision to copy, distribute and modify it."
622f05b35a2Smrg
623f05b35a2Smrgwhile test $[#] != 0
624f05b35a2Smrgdo
625f05b35a2Smrg  case $[1] in
626f05b35a2Smrg    --version | --v* | -V )
627f05b35a2Smrg      echo "$lt_cl_version"; exit 0 ;;
628f05b35a2Smrg    --help | --h* | -h )
629f05b35a2Smrg      echo "$lt_cl_help"; exit 0 ;;
630f05b35a2Smrg    --debug | --d* | -d )
631f05b35a2Smrg      debug=: ;;
632f05b35a2Smrg    --quiet | --q* | --silent | --s* | -q )
633f05b35a2Smrg      lt_cl_silent=: ;;
634f05b35a2Smrg
635f05b35a2Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636f05b35a2SmrgTry \`$[0] --help' for more information.]) ;;
637f05b35a2Smrg
638f05b35a2Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639f05b35a2SmrgTry \`$[0] --help' for more information.]) ;;
640f05b35a2Smrg  esac
641f05b35a2Smrg  shift
642f05b35a2Smrgdone
643f05b35a2Smrg
644f05b35a2Smrgif $lt_cl_silent; then
645f05b35a2Smrg  exec AS_MESSAGE_FD>/dev/null
646f05b35a2Smrgfi
647f05b35a2Smrg_LTEOF
648f05b35a2Smrg
649f05b35a2Smrgcat >>"$CONFIG_LT" <<_LTEOF
650f05b35a2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651f05b35a2Smrg_LTEOF
652f05b35a2Smrg
653f05b35a2Smrgcat >>"$CONFIG_LT" <<\_LTEOF
654f05b35a2SmrgAC_MSG_NOTICE([creating $ofile])
655f05b35a2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
656f05b35a2SmrgAS_EXIT(0)
657f05b35a2Smrg_LTEOF
658f05b35a2Smrgchmod +x "$CONFIG_LT"
659f05b35a2Smrg
660f05b35a2Smrg# configure is writing to config.log, but config.lt does its own redirection,
661f05b35a2Smrg# appending to config.log, which fails on DOS, as config.log is still kept
662f05b35a2Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663f05b35a2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664f05b35a2Smrgif test "$no_create" != yes; then
665f05b35a2Smrg  lt_cl_success=:
666f05b35a2Smrg  test "$silent" = yes &&
667f05b35a2Smrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668f05b35a2Smrg  exec AS_MESSAGE_LOG_FD>/dev/null
669f05b35a2Smrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670f05b35a2Smrg  exec AS_MESSAGE_LOG_FD>>config.log
671f05b35a2Smrg  $lt_cl_success || AS_EXIT(1)
672f05b35a2Smrgfi
673f05b35a2Smrg])# LT_OUTPUT
674f05b35a2Smrg
675f05b35a2Smrg
676f05b35a2Smrg# _LT_CONFIG(TAG)
677f05b35a2Smrg# ---------------
678f05b35a2Smrg# If TAG is the built-in tag, create an initial libtool script with a
679f05b35a2Smrg# default configuration from the untagged config vars.  Otherwise add code
680f05b35a2Smrg# to config.status for appending the configuration named by TAG from the
681f05b35a2Smrg# matching tagged config vars.
682f05b35a2Smrgm4_defun([_LT_CONFIG],
683f05b35a2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684f05b35a2Smrg_LT_CONFIG_SAVE_COMMANDS([
685f05b35a2Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686f05b35a2Smrg  m4_if(_LT_TAG, [C], [
687f05b35a2Smrg    # See if we are running on zsh, and set the options which allow our
688f05b35a2Smrg    # commands through without removal of \ escapes.
689f05b35a2Smrg    if test -n "${ZSH_VERSION+set}" ; then
690f05b35a2Smrg      setopt NO_GLOB_SUBST
691f05b35a2Smrg    fi
692f05b35a2Smrg
693f05b35a2Smrg    cfgfile="${ofile}T"
694f05b35a2Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695f05b35a2Smrg    $RM "$cfgfile"
696f05b35a2Smrg
697f05b35a2Smrg    cat <<_LT_EOF >> "$cfgfile"
698f05b35a2Smrg#! $SHELL
699f05b35a2Smrg
700f05b35a2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701f05b35a2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702f05b35a2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703f05b35a2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704f05b35a2Smrg#
705f05b35a2Smrg_LT_COPYING
706f05b35a2Smrg_LT_LIBTOOL_TAGS
707f05b35a2Smrg
708f05b35a2Smrg# ### BEGIN LIBTOOL CONFIG
709f05b35a2Smrg_LT_LIBTOOL_CONFIG_VARS
710f05b35a2Smrg_LT_LIBTOOL_TAG_VARS
711f05b35a2Smrg# ### END LIBTOOL CONFIG
712f05b35a2Smrg
713f05b35a2Smrg_LT_EOF
714f05b35a2Smrg
715f05b35a2Smrg  case $host_os in
716f05b35a2Smrg  aix3*)
717f05b35a2Smrg    cat <<\_LT_EOF >> "$cfgfile"
718f05b35a2Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
719f05b35a2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720f05b35a2Smrg# vanish in a puff of smoke.
721f05b35a2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
722f05b35a2Smrg  COLLECT_NAMES=
723f05b35a2Smrg  export COLLECT_NAMES
724f05b35a2Smrgfi
725f05b35a2Smrg_LT_EOF
726f05b35a2Smrg    ;;
727f05b35a2Smrg  esac
728f05b35a2Smrg
729f05b35a2Smrg  _LT_PROG_LTMAIN
730f05b35a2Smrg
731f05b35a2Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
732f05b35a2Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733f05b35a2Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734f05b35a2Smrg  # is reportedly fixed, but why not run on old versions too?
735f05b35a2Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736f05b35a2Smrg    || (rm -f "$cfgfile"; exit 1)
737f05b35a2Smrg
738f05b35a2Smrg  _LT_PROG_XSI_SHELLFNS
739f05b35a2Smrg
740f05b35a2Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741f05b35a2Smrg    || (rm -f "$cfgfile"; exit 1)
742f05b35a2Smrg
743f05b35a2Smrg  mv -f "$cfgfile" "$ofile" ||
744f05b35a2Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745f05b35a2Smrg  chmod +x "$ofile"
746f05b35a2Smrg],
747f05b35a2Smrg[cat <<_LT_EOF >> "$ofile"
748f05b35a2Smrg
749f05b35a2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750f05b35a2Smrgdnl in a comment (ie after a #).
751f05b35a2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752f05b35a2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753f05b35a2Smrg# ### END LIBTOOL TAG CONFIG: $1
754f05b35a2Smrg_LT_EOF
755f05b35a2Smrg])dnl /m4_if
756f05b35a2Smrg],
757f05b35a2Smrg[m4_if([$1], [], [
758f05b35a2Smrg    PACKAGE='$PACKAGE'
759f05b35a2Smrg    VERSION='$VERSION'
760f05b35a2Smrg    TIMESTAMP='$TIMESTAMP'
761f05b35a2Smrg    RM='$RM'
762f05b35a2Smrg    ofile='$ofile'], [])
763f05b35a2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764f05b35a2Smrg])# _LT_CONFIG
765f05b35a2Smrg
766f05b35a2Smrg
767f05b35a2Smrg# LT_SUPPORTED_TAG(TAG)
768f05b35a2Smrg# ---------------------
769f05b35a2Smrg# Trace this macro to discover what tags are supported by the libtool
770f05b35a2Smrg# --tag option, using:
771f05b35a2Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772f05b35a2SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773f05b35a2Smrg
774f05b35a2Smrg
775f05b35a2Smrg# C support is built-in for now
776f05b35a2Smrgm4_define([_LT_LANG_C_enabled], [])
777f05b35a2Smrgm4_define([_LT_TAGS], [])
778f05b35a2Smrg
779f05b35a2Smrg
780f05b35a2Smrg# LT_LANG(LANG)
781f05b35a2Smrg# -------------
782f05b35a2Smrg# Enable libtool support for the given language if not already enabled.
783f05b35a2SmrgAC_DEFUN([LT_LANG],
784f05b35a2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785f05b35a2Smrgm4_case([$1],
786f05b35a2Smrg  [C],			[_LT_LANG(C)],
787f05b35a2Smrg  [C++],		[_LT_LANG(CXX)],
788f05b35a2Smrg  [Java],		[_LT_LANG(GCJ)],
789f05b35a2Smrg  [Fortran 77],		[_LT_LANG(F77)],
790f05b35a2Smrg  [Fortran],		[_LT_LANG(FC)],
791f05b35a2Smrg  [Windows Resource],	[_LT_LANG(RC)],
792f05b35a2Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793f05b35a2Smrg    [_LT_LANG($1)],
794f05b35a2Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795f05b35a2Smrg])# LT_LANG
796f05b35a2Smrg
797f05b35a2Smrg
798f05b35a2Smrg# _LT_LANG(LANGNAME)
799f05b35a2Smrg# ------------------
800f05b35a2Smrgm4_defun([_LT_LANG],
801f05b35a2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802f05b35a2Smrg  [LT_SUPPORTED_TAG([$1])dnl
803f05b35a2Smrg  m4_append([_LT_TAGS], [$1 ])dnl
804f05b35a2Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805f05b35a2Smrg  _LT_LANG_$1_CONFIG($1)])dnl
806f05b35a2Smrg])# _LT_LANG
807f05b35a2Smrg
808f05b35a2Smrg
809f05b35a2Smrg# _LT_LANG_DEFAULT_CONFIG
810f05b35a2Smrg# -----------------------
811f05b35a2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812f05b35a2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813f05b35a2Smrg  [LT_LANG(CXX)],
814f05b35a2Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815f05b35a2Smrg
816f05b35a2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817f05b35a2Smrg  [LT_LANG(F77)],
818f05b35a2Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819f05b35a2Smrg
820f05b35a2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821f05b35a2Smrg  [LT_LANG(FC)],
822f05b35a2Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823f05b35a2Smrg
824f05b35a2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825f05b35a2Smrgdnl pulling things in needlessly.
826f05b35a2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827f05b35a2Smrg  [LT_LANG(GCJ)],
828f05b35a2Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829f05b35a2Smrg    [LT_LANG(GCJ)],
830f05b35a2Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831f05b35a2Smrg      [LT_LANG(GCJ)],
832f05b35a2Smrg      [m4_ifdef([AC_PROG_GCJ],
833f05b35a2Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834f05b35a2Smrg       m4_ifdef([A][M_PROG_GCJ],
835f05b35a2Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836f05b35a2Smrg       m4_ifdef([LT_PROG_GCJ],
837f05b35a2Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838f05b35a2Smrg
839f05b35a2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840f05b35a2Smrg  [LT_LANG(RC)],
841f05b35a2Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842f05b35a2Smrg])# _LT_LANG_DEFAULT_CONFIG
843f05b35a2Smrg
844f05b35a2Smrg# Obsolete macros:
845f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
850f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854f05b35a2Smrg
855f05b35a2Smrg
856f05b35a2Smrg# _LT_TAG_COMPILER
857f05b35a2Smrg# ----------------
858f05b35a2Smrgm4_defun([_LT_TAG_COMPILER],
859e0963edeSmrg[AC_REQUIRE([AC_PROG_CC])dnl
860e0963edeSmrg
861f05b35a2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862f05b35a2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863f05b35a2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864f05b35a2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865f05b35a2Smrg
866e0963edeSmrg# If no C compiler was specified, use CC.
867e0963edeSmrgLTCC=${LTCC-"$CC"}
868e0963edeSmrg
869e0963edeSmrg# If no C compiler flags were specified, use CFLAGS.
870e0963edeSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871e0963edeSmrg
872e0963edeSmrg# Allow CC to be a program name with arguments.
873e0963edeSmrgcompiler=$CC
874f05b35a2Smrg])# _LT_TAG_COMPILER
875e0963edeSmrg
876e0963edeSmrg
877e0963edeSmrg# _LT_COMPILER_BOILERPLATE
878e0963edeSmrg# ------------------------
879e0963edeSmrg# Check for compiler boilerplate output or warnings with
880e0963edeSmrg# the simple compiler test code.
881f05b35a2Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
882f05b35a2Smrg[m4_require([_LT_DECL_SED])dnl
883e0963edeSmrgac_outfile=conftest.$ac_objext
884e0963edeSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
885e0963edeSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886e0963edeSmrg_lt_compiler_boilerplate=`cat conftest.err`
887f05b35a2Smrg$RM conftest*
888e0963edeSmrg])# _LT_COMPILER_BOILERPLATE
889e0963edeSmrg
890e0963edeSmrg
891e0963edeSmrg# _LT_LINKER_BOILERPLATE
892e0963edeSmrg# ----------------------
893e0963edeSmrg# Check for linker boilerplate output or warnings with
894e0963edeSmrg# the simple link test code.
895f05b35a2Smrgm4_defun([_LT_LINKER_BOILERPLATE],
896f05b35a2Smrg[m4_require([_LT_DECL_SED])dnl
897e0963edeSmrgac_outfile=conftest.$ac_objext
898e0963edeSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
899e0963edeSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900e0963edeSmrg_lt_linker_boilerplate=`cat conftest.err`
901f05b35a2Smrg$RM -r conftest*
902e0963edeSmrg])# _LT_LINKER_BOILERPLATE
903e0963edeSmrg
904f05b35a2Smrg# _LT_REQUIRED_DARWIN_CHECKS
905f05b35a2Smrg# -------------------------
906f05b35a2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907f05b35a2Smrg  case $host_os in
908f05b35a2Smrg    rhapsody* | darwin*)
909f05b35a2Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910f05b35a2Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911f05b35a2Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912f05b35a2Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913f05b35a2Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914f05b35a2Smrg    _LT_DECL([], [DSYMUTIL], [1],
915f05b35a2Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916f05b35a2Smrg    _LT_DECL([], [NMEDIT], [1],
917f05b35a2Smrg      [Tool to change global to local symbols on Mac OS X])
918f05b35a2Smrg    _LT_DECL([], [LIPO], [1],
919f05b35a2Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
920f05b35a2Smrg    _LT_DECL([], [OTOOL], [1],
921f05b35a2Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922f05b35a2Smrg    _LT_DECL([], [OTOOL64], [1],
923f05b35a2Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924f05b35a2Smrg
925f05b35a2Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926f05b35a2Smrg      [lt_cv_apple_cc_single_mod=no
927f05b35a2Smrg      if test -z "${LT_MULTI_MODULE}"; then
928f05b35a2Smrg	# By default we will add the -single_module flag. You can override
929f05b35a2Smrg	# by either setting the environment variable LT_MULTI_MODULE
930f05b35a2Smrg	# non-empty at configure time, or by adding -multi_module to the
931f05b35a2Smrg	# link flags.
932f05b35a2Smrg	rm -rf libconftest.dylib*
933f05b35a2Smrg	echo "int foo(void){return 1;}" > conftest.c
934f05b35a2Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935f05b35a2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936f05b35a2Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937f05b35a2Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938f05b35a2Smrg        _lt_result=$?
939f05b35a2Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940f05b35a2Smrg	  lt_cv_apple_cc_single_mod=yes
941f05b35a2Smrg	else
942f05b35a2Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943f05b35a2Smrg	fi
944f05b35a2Smrg	rm -rf libconftest.dylib*
945f05b35a2Smrg	rm -f conftest.*
946f05b35a2Smrg      fi])
947f05b35a2Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948f05b35a2Smrg      [lt_cv_ld_exported_symbols_list],
949f05b35a2Smrg      [lt_cv_ld_exported_symbols_list=no
950f05b35a2Smrg      save_LDFLAGS=$LDFLAGS
951f05b35a2Smrg      echo "_main" > conftest.sym
952f05b35a2Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953f05b35a2Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954f05b35a2Smrg	[lt_cv_ld_exported_symbols_list=yes],
955f05b35a2Smrg	[lt_cv_ld_exported_symbols_list=no])
956f05b35a2Smrg	LDFLAGS="$save_LDFLAGS"
957f05b35a2Smrg    ])
958f05b35a2Smrg    case $host_os in
959f05b35a2Smrg    rhapsody* | darwin1.[[012]])
960f05b35a2Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961f05b35a2Smrg    darwin1.*)
962f05b35a2Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963f05b35a2Smrg    darwin*) # darwin 5.x on
964f05b35a2Smrg      # if running on 10.5 or later, the deployment target defaults
965f05b35a2Smrg      # to the OS version, if on x86, and 10.4, the deployment
966f05b35a2Smrg      # target defaults to 10.4. Don't you love it?
967f05b35a2Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968f05b35a2Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969f05b35a2Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970f05b35a2Smrg	10.[[012]]*)
971f05b35a2Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972f05b35a2Smrg	10.*)
973f05b35a2Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974f05b35a2Smrg      esac
975f05b35a2Smrg    ;;
976f05b35a2Smrg  esac
977f05b35a2Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978f05b35a2Smrg      _lt_dar_single_mod='$single_module'
979f05b35a2Smrg    fi
980f05b35a2Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981f05b35a2Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982f05b35a2Smrg    else
983f05b35a2Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984f05b35a2Smrg    fi
985f05b35a2Smrg    if test "$DSYMUTIL" != ":"; then
986f05b35a2Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987f05b35a2Smrg    else
988f05b35a2Smrg      _lt_dsymutil=
989f05b35a2Smrg    fi
990f05b35a2Smrg    ;;
991f05b35a2Smrg  esac
992f05b35a2Smrg])
993f05b35a2Smrg
994f05b35a2Smrg
995f05b35a2Smrg# _LT_DARWIN_LINKER_FEATURES
996f05b35a2Smrg# --------------------------
997f05b35a2Smrg# Checks for linker and compiler features on darwin
998f05b35a2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999f05b35a2Smrg[
1000f05b35a2Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001f05b35a2Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002f05b35a2Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003f05b35a2Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004f05b35a2Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005f05b35a2Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006f05b35a2Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007f05b35a2Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008f05b35a2Smrg  case $cc_basename in
1009f05b35a2Smrg     ifort*) _lt_dar_can_shared=yes ;;
1010f05b35a2Smrg     *) _lt_dar_can_shared=$GCC ;;
1011f05b35a2Smrg  esac
1012f05b35a2Smrg  if test "$_lt_dar_can_shared" = "yes"; then
1013f05b35a2Smrg    output_verbose_link_cmd=echo
1014f05b35a2Smrg    _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}"
1015f05b35a2Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016f05b35a2Smrg    _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}"
1017f05b35a2Smrg    _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}"
1018f05b35a2Smrg    m4_if([$1], [CXX],
1019f05b35a2Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020f05b35a2Smrg      _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}"
1021f05b35a2Smrg      _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}"
1022f05b35a2Smrg    fi
1023f05b35a2Smrg],[])
1024f05b35a2Smrg  else
1025f05b35a2Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026f05b35a2Smrg  fi
1027f05b35a2Smrg])
1028f05b35a2Smrg
1029f05b35a2Smrg# _LT_SYS_MODULE_PATH_AIX
1030f05b35a2Smrg# -----------------------
1031e0963edeSmrg# Links a minimal program and checks the executable
1032e0963edeSmrg# for the system default hardcoded library path. In most cases,
1033e0963edeSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1034e0963edeSmrg# the location of the communication and MPI libs are included too.
1035e0963edeSmrg# If we don't find anything, use the default library path according
1036e0963edeSmrg# to the aix ld manual.
1037f05b35a2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038f05b35a2Smrg[m4_require([_LT_DECL_SED])dnl
1039e0963edeSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040e0963edeSmrglt_aix_libpath_sed='
1041e0963edeSmrg    /Import File Strings/,/^$/ {
1042e0963edeSmrg	/^0/ {
1043e0963edeSmrg	    s/^0  *\(.*\)$/\1/
1044e0963edeSmrg	    p
1045e0963edeSmrg	}
1046e0963edeSmrg    }'
1047e0963edeSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048e0963edeSmrg# Check for a 64-bit object if we didn't find anything.
1049e0963edeSmrgif test -z "$aix_libpath"; then
1050e0963edeSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051e0963edeSmrgfi],[])
1052e0963edeSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053f05b35a2Smrg])# _LT_SYS_MODULE_PATH_AIX
1054e0963edeSmrg
1055e0963edeSmrg
1056f05b35a2Smrg# _LT_SHELL_INIT(ARG)
1057f05b35a2Smrg# -------------------
1058f05b35a2Smrgm4_define([_LT_SHELL_INIT],
1059e0963edeSmrg[ifdef([AC_DIVERSION_NOTICE],
1060e0963edeSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061e0963edeSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1062e0963edeSmrg$1
1063e0963edeSmrgAC_DIVERT_POP
1064f05b35a2Smrg])# _LT_SHELL_INIT
1065e0963edeSmrg
1066e0963edeSmrg
1067f05b35a2Smrg# _LT_PROG_ECHO_BACKSLASH
1068f05b35a2Smrg# -----------------------
1069e0963edeSmrg# Add some code to the start of the generated configure script which
1070e0963edeSmrg# will find an echo command which doesn't interpret backslashes.
1071f05b35a2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072f05b35a2Smrg[_LT_SHELL_INIT([
1073e0963edeSmrg# Check that we are running under the correct shell.
1074e0963edeSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1075e0963edeSmrg
1076f05b35a2Smrgcase X$lt_ECHO in
1077e0963edeSmrgX*--fallback-echo)
1078e0963edeSmrg  # Remove one level of quotation (which was required for Make).
1079f05b35a2Smrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080e0963edeSmrg  ;;
1081e0963edeSmrgesac
1082e0963edeSmrg
1083f05b35a2SmrgECHO=${lt_ECHO-echo}
1084e0963edeSmrgif test "X[$]1" = X--no-reexec; then
1085e0963edeSmrg  # Discard the --no-reexec flag, and continue.
1086e0963edeSmrg  shift
1087e0963edeSmrgelif test "X[$]1" = X--fallback-echo; then
1088e0963edeSmrg  # Avoid inline document here, it may be left over
1089e0963edeSmrg  :
1090f05b35a2Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091f05b35a2Smrg  # Yippee, $ECHO works!
1092e0963edeSmrg  :
1093e0963edeSmrgelse
1094e0963edeSmrg  # Restart under the correct shell.
1095e0963edeSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096e0963edeSmrgfi
1097e0963edeSmrg
1098e0963edeSmrgif test "X[$]1" = X--fallback-echo; then
1099e0963edeSmrg  # used as fallback echo
1100e0963edeSmrg  shift
1101f05b35a2Smrg  cat <<_LT_EOF
1102e0963edeSmrg[$]*
1103f05b35a2Smrg_LT_EOF
1104e0963edeSmrg  exit 0
1105e0963edeSmrgfi
1106e0963edeSmrg
1107e0963edeSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1108e0963edeSmrg# if CDPATH is set.
1109e0963edeSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110e0963edeSmrg
1111f05b35a2Smrgif test -z "$lt_ECHO"; then
1112f05b35a2Smrg  if test "X${echo_test_string+set}" != Xset; then
1113f05b35a2Smrg    # find a string as large as possible, as long as the shell can cope with it
1114f05b35a2Smrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115f05b35a2Smrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116f05b35a2Smrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117f05b35a2Smrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118f05b35a2Smrg      then
1119f05b35a2Smrg        break
1120f05b35a2Smrg      fi
1121f05b35a2Smrg    done
1122f05b35a2Smrg  fi
1123e0963edeSmrg
1124f05b35a2Smrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125f05b35a2Smrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126f05b35a2Smrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127f05b35a2Smrg    :
1128f05b35a2Smrg  else
1129f05b35a2Smrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130f05b35a2Smrg    # backslashes.  This makes it impossible to quote backslashes using
1131f05b35a2Smrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132f05b35a2Smrg    #
1133f05b35a2Smrg    # So, first we look for a working echo in the user's PATH.
1134e0963edeSmrg
1135f05b35a2Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136f05b35a2Smrg    for dir in $PATH /usr/ucb; do
1137f05b35a2Smrg      IFS="$lt_save_ifs"
1138f05b35a2Smrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139f05b35a2Smrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140f05b35a2Smrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141f05b35a2Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142f05b35a2Smrg        ECHO="$dir/echo"
1143f05b35a2Smrg        break
1144f05b35a2Smrg      fi
1145f05b35a2Smrg    done
1146e0963edeSmrg    IFS="$lt_save_ifs"
1147e0963edeSmrg
1148f05b35a2Smrg    if test "X$ECHO" = Xecho; then
1149f05b35a2Smrg      # We didn't find a better echo, so look for alternatives.
1150f05b35a2Smrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151f05b35a2Smrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152f05b35a2Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153f05b35a2Smrg        # This shell has a builtin print -r that does the trick.
1154f05b35a2Smrg        ECHO='print -r'
1155f05b35a2Smrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156f05b35a2Smrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157f05b35a2Smrg        # If we have ksh, try running configure again with it.
1158f05b35a2Smrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159f05b35a2Smrg        export ORIGINAL_CONFIG_SHELL
1160f05b35a2Smrg        CONFIG_SHELL=/bin/ksh
1161f05b35a2Smrg        export CONFIG_SHELL
1162f05b35a2Smrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163e0963edeSmrg      else
1164f05b35a2Smrg        # Try using printf.
1165f05b35a2Smrg        ECHO='printf %s\n'
1166f05b35a2Smrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167f05b35a2Smrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168f05b35a2Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169f05b35a2Smrg	  # Cool, printf works
1170f05b35a2Smrg	  :
1171f05b35a2Smrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172f05b35a2Smrg	     test "X$echo_testing_string" = 'X\t' &&
1173f05b35a2Smrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174f05b35a2Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175f05b35a2Smrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176f05b35a2Smrg	  export CONFIG_SHELL
1177f05b35a2Smrg	  SHELL="$CONFIG_SHELL"
1178f05b35a2Smrg	  export SHELL
1179f05b35a2Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180f05b35a2Smrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181f05b35a2Smrg	     test "X$echo_testing_string" = 'X\t' &&
1182f05b35a2Smrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183f05b35a2Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184f05b35a2Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185f05b35a2Smrg        else
1186f05b35a2Smrg	  # maybe with a smaller string...
1187f05b35a2Smrg	  prev=:
1188e0963edeSmrg
1189f05b35a2Smrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190f05b35a2Smrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191f05b35a2Smrg	    then
1192f05b35a2Smrg	      break
1193f05b35a2Smrg	    fi
1194f05b35a2Smrg	    prev="$cmd"
1195f05b35a2Smrg	  done
1196e0963edeSmrg
1197f05b35a2Smrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198f05b35a2Smrg	    echo_test_string=`eval $prev`
1199f05b35a2Smrg	    export echo_test_string
1200f05b35a2Smrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201f05b35a2Smrg	  else
1202f05b35a2Smrg	    # Oops.  We lost completely, so just stick with echo.
1203f05b35a2Smrg	    ECHO=echo
1204f05b35a2Smrg	  fi
1205f05b35a2Smrg        fi
1206e0963edeSmrg      fi
1207e0963edeSmrg    fi
1208e0963edeSmrg  fi
1209e0963edeSmrgfi
1210e0963edeSmrg
1211e0963edeSmrg# Copy echo and quote the copy suitably for passing to libtool from
1212e0963edeSmrg# the Makefile, instead of quoting the original, which is used later.
1213f05b35a2Smrglt_ECHO=$ECHO
1214f05b35a2Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215f05b35a2Smrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216e0963edeSmrgfi
1217e0963edeSmrg
1218f05b35a2SmrgAC_SUBST(lt_ECHO)
1219f05b35a2Smrg])
1220f05b35a2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221f05b35a2Smrg_LT_DECL([], [ECHO], [1],
1222f05b35a2Smrg    [An echo program that does not interpret backslashes])
1223f05b35a2Smrg])# _LT_PROG_ECHO_BACKSLASH
1224e0963edeSmrg
1225e0963edeSmrg
1226f05b35a2Smrg# _LT_ENABLE_LOCK
1227f05b35a2Smrg# ---------------
1228f05b35a2Smrgm4_defun([_LT_ENABLE_LOCK],
1229e0963edeSmrg[AC_ARG_ENABLE([libtool-lock],
1230f05b35a2Smrg  [AS_HELP_STRING([--disable-libtool-lock],
1231f05b35a2Smrg    [avoid locking (might break parallel builds)])])
1232e0963edeSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233e0963edeSmrg
1234e0963edeSmrg# Some flags need to be propagated to the compiler or linker for good
1235e0963edeSmrg# libtool support.
1236e0963edeSmrgcase $host in
1237e0963edeSmrgia64-*-hpux*)
1238e0963edeSmrg  # Find out which ABI we are using.
1239e0963edeSmrg  echo 'int i;' > conftest.$ac_ext
1240e0963edeSmrg  if AC_TRY_EVAL(ac_compile); then
1241e0963edeSmrg    case `/usr/bin/file conftest.$ac_objext` in
1242f05b35a2Smrg      *ELF-32*)
1243f05b35a2Smrg	HPUX_IA64_MODE="32"
1244f05b35a2Smrg	;;
1245f05b35a2Smrg      *ELF-64*)
1246f05b35a2Smrg	HPUX_IA64_MODE="64"
1247f05b35a2Smrg	;;
1248e0963edeSmrg    esac
1249e0963edeSmrg  fi
1250e0963edeSmrg  rm -rf conftest*
1251e0963edeSmrg  ;;
1252e0963edeSmrg*-*-irix6*)
1253e0963edeSmrg  # Find out which ABI we are using.
1254e0963edeSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255e0963edeSmrg  if AC_TRY_EVAL(ac_compile); then
1256f05b35a2Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257f05b35a2Smrg      case `/usr/bin/file conftest.$ac_objext` in
1258f05b35a2Smrg	*32-bit*)
1259f05b35a2Smrg	  LD="${LD-ld} -melf32bsmip"
1260f05b35a2Smrg	  ;;
1261f05b35a2Smrg	*N32*)
1262f05b35a2Smrg	  LD="${LD-ld} -melf32bmipn32"
1263f05b35a2Smrg	  ;;
1264f05b35a2Smrg	*64-bit*)
1265f05b35a2Smrg	  LD="${LD-ld} -melf64bmip"
1266f05b35a2Smrg	;;
1267f05b35a2Smrg      esac
1268f05b35a2Smrg    else
1269f05b35a2Smrg      case `/usr/bin/file conftest.$ac_objext` in
1270f05b35a2Smrg	*32-bit*)
1271f05b35a2Smrg	  LD="${LD-ld} -32"
1272f05b35a2Smrg	  ;;
1273f05b35a2Smrg	*N32*)
1274f05b35a2Smrg	  LD="${LD-ld} -n32"
1275f05b35a2Smrg	  ;;
1276f05b35a2Smrg	*64-bit*)
1277f05b35a2Smrg	  LD="${LD-ld} -64"
1278f05b35a2Smrg	  ;;
1279f05b35a2Smrg      esac
1280f05b35a2Smrg    fi
1281e0963edeSmrg  fi
1282e0963edeSmrg  rm -rf conftest*
1283e0963edeSmrg  ;;
1284e0963edeSmrg
1285e0963edeSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286f05b35a2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287e0963edeSmrg  # Find out which ABI we are using.
1288e0963edeSmrg  echo 'int i;' > conftest.$ac_ext
1289e0963edeSmrg  if AC_TRY_EVAL(ac_compile); then
1290e0963edeSmrg    case `/usr/bin/file conftest.o` in
1291f05b35a2Smrg      *32-bit*)
1292f05b35a2Smrg	case $host in
1293f05b35a2Smrg	  x86_64-*kfreebsd*-gnu)
1294f05b35a2Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295f05b35a2Smrg	    ;;
1296f05b35a2Smrg	  x86_64-*linux*)
1297f05b35a2Smrg	    LD="${LD-ld} -m elf_i386"
1298f05b35a2Smrg	    ;;
1299f05b35a2Smrg	  ppc64-*linux*|powerpc64-*linux*)
1300f05b35a2Smrg	    LD="${LD-ld} -m elf32ppclinux"
1301f05b35a2Smrg	    ;;
1302f05b35a2Smrg	  s390x-*linux*)
1303f05b35a2Smrg	    LD="${LD-ld} -m elf_s390"
1304f05b35a2Smrg	    ;;
1305f05b35a2Smrg	  sparc64-*linux*)
1306f05b35a2Smrg	    LD="${LD-ld} -m elf32_sparc"
1307f05b35a2Smrg	    ;;
1308f05b35a2Smrg	esac
1309f05b35a2Smrg	;;
1310f05b35a2Smrg      *64-bit*)
1311f05b35a2Smrg	case $host in
1312f05b35a2Smrg	  x86_64-*kfreebsd*-gnu)
1313f05b35a2Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314f05b35a2Smrg	    ;;
1315f05b35a2Smrg	  x86_64-*linux*)
1316f05b35a2Smrg	    LD="${LD-ld} -m elf_x86_64"
1317f05b35a2Smrg	    ;;
1318f05b35a2Smrg	  ppc*-*linux*|powerpc*-*linux*)
1319f05b35a2Smrg	    LD="${LD-ld} -m elf64ppc"
1320f05b35a2Smrg	    ;;
1321f05b35a2Smrg	  s390*-*linux*|s390*-*tpf*)
1322f05b35a2Smrg	    LD="${LD-ld} -m elf64_s390"
1323f05b35a2Smrg	    ;;
1324f05b35a2Smrg	  sparc*-*linux*)
1325f05b35a2Smrg	    LD="${LD-ld} -m elf64_sparc"
1326f05b35a2Smrg	    ;;
1327f05b35a2Smrg	esac
1328f05b35a2Smrg	;;
1329e0963edeSmrg    esac
1330e0963edeSmrg  fi
1331e0963edeSmrg  rm -rf conftest*
1332e0963edeSmrg  ;;
1333e0963edeSmrg
1334e0963edeSmrg*-*-sco3.2v5*)
1335e0963edeSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336e0963edeSmrg  SAVE_CFLAGS="$CFLAGS"
1337e0963edeSmrg  CFLAGS="$CFLAGS -belf"
1338e0963edeSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339e0963edeSmrg    [AC_LANG_PUSH(C)
1340f05b35a2Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341e0963edeSmrg     AC_LANG_POP])
1342e0963edeSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343e0963edeSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344e0963edeSmrg    CFLAGS="$SAVE_CFLAGS"
1345e0963edeSmrg  fi
1346e0963edeSmrg  ;;
1347e0963edeSmrgsparc*-*solaris*)
1348e0963edeSmrg  # Find out which ABI we are using.
1349e0963edeSmrg  echo 'int i;' > conftest.$ac_ext
1350e0963edeSmrg  if AC_TRY_EVAL(ac_compile); then
1351e0963edeSmrg    case `/usr/bin/file conftest.o` in
1352e0963edeSmrg    *64-bit*)
1353e0963edeSmrg      case $lt_cv_prog_gnu_ld in
1354e0963edeSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355f05b35a2Smrg      *)
1356f05b35a2Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357f05b35a2Smrg	  LD="${LD-ld} -64"
1358f05b35a2Smrg	fi
1359f05b35a2Smrg	;;
1360e0963edeSmrg      esac
1361e0963edeSmrg      ;;
1362e0963edeSmrg    esac
1363e0963edeSmrg  fi
1364e0963edeSmrg  rm -rf conftest*
1365e0963edeSmrg  ;;
1366e0963edeSmrgesac
1367e0963edeSmrg
1368e0963edeSmrgneed_locks="$enable_libtool_lock"
1369f05b35a2Smrg])# _LT_ENABLE_LOCK
1370f05b35a2Smrg
1371f05b35a2Smrg
1372f05b35a2Smrg# _LT_CMD_OLD_ARCHIVE
1373f05b35a2Smrg# -------------------
1374f05b35a2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375f05b35a2Smrg[AC_CHECK_TOOL(AR, ar, false)
1376f05b35a2Smrgtest -z "$AR" && AR=ar
1377f05b35a2Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378f05b35a2Smrg_LT_DECL([], [AR], [1], [The archiver])
1379f05b35a2Smrg_LT_DECL([], [AR_FLAGS], [1])
1380f05b35a2Smrg
1381f05b35a2SmrgAC_CHECK_TOOL(STRIP, strip, :)
1382f05b35a2Smrgtest -z "$STRIP" && STRIP=:
1383f05b35a2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384f05b35a2Smrg
1385f05b35a2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386f05b35a2Smrgtest -z "$RANLIB" && RANLIB=:
1387f05b35a2Smrg_LT_DECL([], [RANLIB], [1],
1388f05b35a2Smrg    [Commands used to install an old-style archive])
1389f05b35a2Smrg
1390f05b35a2Smrg# Determine commands to create old-style static archives.
1391f05b35a2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392f05b35a2Smrgold_postinstall_cmds='chmod 644 $oldlib'
1393f05b35a2Smrgold_postuninstall_cmds=
1394e0963edeSmrg
1395f05b35a2Smrgif test -n "$RANLIB"; then
1396f05b35a2Smrg  case $host_os in
1397f05b35a2Smrg  openbsd*)
1398f05b35a2Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399f05b35a2Smrg    ;;
1400f05b35a2Smrg  *)
1401f05b35a2Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402f05b35a2Smrg    ;;
1403f05b35a2Smrg  esac
1404f05b35a2Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405f05b35a2Smrgfi
1406f05b35a2Smrg_LT_DECL([], [old_postinstall_cmds], [2])
1407f05b35a2Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408f05b35a2Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409f05b35a2Smrg    [Commands used to build an old-style archive])
1410f05b35a2Smrg])# _LT_CMD_OLD_ARCHIVE
1411e0963edeSmrg
1412e0963edeSmrg
1413f05b35a2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1414e0963edeSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1415e0963edeSmrg# ----------------------------------------------------------------
1416e0963edeSmrg# Check whether the given compiler option works
1417f05b35a2SmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418f05b35a2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419f05b35a2Smrgm4_require([_LT_DECL_SED])dnl
1420e0963edeSmrgAC_CACHE_CHECK([$1], [$2],
1421e0963edeSmrg  [$2=no
1422f05b35a2Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423e0963edeSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1424e0963edeSmrg   lt_compiler_flag="$3"
1425e0963edeSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1426e0963edeSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1427e0963edeSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1428e0963edeSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1429e0963edeSmrg   # The option is referenced via a variable to avoid confusing sed.
1430e0963edeSmrg   lt_compile=`echo "$ac_compile" | $SED \
1431e0963edeSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432e0963edeSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433e0963edeSmrg   -e 's:$: $lt_compiler_flag:'`
1434e0963edeSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435e0963edeSmrg   (eval "$lt_compile" 2>conftest.err)
1436e0963edeSmrg   ac_status=$?
1437e0963edeSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1438e0963edeSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439e0963edeSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1440e0963edeSmrg     # The compiler can only warn and ignore the option if not recognized
1441e0963edeSmrg     # So say no if there are warnings other than the usual output.
1442f05b35a2Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1443e0963edeSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444e0963edeSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445e0963edeSmrg       $2=yes
1446e0963edeSmrg     fi
1447e0963edeSmrg   fi
1448f05b35a2Smrg   $RM conftest*
1449e0963edeSmrg])
1450e0963edeSmrg
1451e0963edeSmrgif test x"[$]$2" = xyes; then
1452f05b35a2Smrg    m4_if([$5], , :, [$5])
1453e0963edeSmrgelse
1454f05b35a2Smrg    m4_if([$6], , :, [$6])
1455e0963edeSmrgfi
1456f05b35a2Smrg])# _LT_COMPILER_OPTION
1457e0963edeSmrg
1458f05b35a2Smrg# Old name:
1459f05b35a2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
1461f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1462e0963edeSmrg
1463f05b35a2Smrg
1464f05b35a2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465f05b35a2Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466f05b35a2Smrg# ----------------------------------------------------
1467f05b35a2Smrg# Check whether the given linker option works
1468f05b35a2SmrgAC_DEFUN([_LT_LINKER_OPTION],
1469f05b35a2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470f05b35a2Smrgm4_require([_LT_DECL_SED])dnl
1471e0963edeSmrgAC_CACHE_CHECK([$1], [$2],
1472e0963edeSmrg  [$2=no
1473e0963edeSmrg   save_LDFLAGS="$LDFLAGS"
1474e0963edeSmrg   LDFLAGS="$LDFLAGS $3"
1475e0963edeSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1476e0963edeSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1477e0963edeSmrg     # The linker can only warn and ignore the option if not recognized
1478e0963edeSmrg     # So say no if there are warnings
1479e0963edeSmrg     if test -s conftest.err; then
1480e0963edeSmrg       # Append any errors to the config.log.
1481e0963edeSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482f05b35a2Smrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1483e0963edeSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484e0963edeSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1485e0963edeSmrg         $2=yes
1486e0963edeSmrg       fi
1487e0963edeSmrg     else
1488e0963edeSmrg       $2=yes
1489e0963edeSmrg     fi
1490e0963edeSmrg   fi
1491f05b35a2Smrg   $RM -r conftest*
1492e0963edeSmrg   LDFLAGS="$save_LDFLAGS"
1493e0963edeSmrg])
1494e0963edeSmrg
1495e0963edeSmrgif test x"[$]$2" = xyes; then
1496f05b35a2Smrg    m4_if([$4], , :, [$4])
1497e0963edeSmrgelse
1498f05b35a2Smrg    m4_if([$5], , :, [$5])
1499e0963edeSmrgfi
1500f05b35a2Smrg])# _LT_LINKER_OPTION
1501e0963edeSmrg
1502f05b35a2Smrg# Old name:
1503f05b35a2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
1505f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1506e0963edeSmrg
1507f05b35a2Smrg
1508f05b35a2Smrg# LT_CMD_MAX_LEN
1509f05b35a2Smrg#---------------
1510f05b35a2SmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511f05b35a2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512f05b35a2Smrg# find the maximum length of command line arguments
1513e0963edeSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1514e0963edeSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1515e0963edeSmrg  i=0
1516e0963edeSmrg  teststring="ABCD"
1517e0963edeSmrg
1518e0963edeSmrg  case $build_os in
1519e0963edeSmrg  msdosdjgpp*)
1520e0963edeSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1521e0963edeSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1522e0963edeSmrg    # during glob expansion).  Even if it were fixed, the result of this
1523e0963edeSmrg    # check would be larger than it should be.
1524e0963edeSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1525e0963edeSmrg    ;;
1526e0963edeSmrg
1527e0963edeSmrg  gnu*)
1528e0963edeSmrg    # Under GNU Hurd, this test is not required because there is
1529e0963edeSmrg    # no limit to the length of command line arguments.
1530e0963edeSmrg    # Libtool will interpret -1 as no limit whatsoever
1531e0963edeSmrg    lt_cv_sys_max_cmd_len=-1;
1532e0963edeSmrg    ;;
1533e0963edeSmrg
1534f05b35a2Smrg  cygwin* | mingw* | cegcc*)
1535e0963edeSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1536e0963edeSmrg    # about 5 minutes as the teststring grows exponentially.
1537e0963edeSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1538e0963edeSmrg    # you end up with a "frozen" computer, even though with patience
1539e0963edeSmrg    # the test eventually succeeds (with a max line length of 256k).
1540e0963edeSmrg    # Instead, let's just punt: use the minimum linelength reported by
1541e0963edeSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1542e0963edeSmrg    lt_cv_sys_max_cmd_len=8192;
1543e0963edeSmrg    ;;
1544e0963edeSmrg
1545e0963edeSmrg  amigaos*)
1546e0963edeSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
1547e0963edeSmrg    # So we just punt and use a minimum line length of 8192.
1548e0963edeSmrg    lt_cv_sys_max_cmd_len=8192;
1549e0963edeSmrg    ;;
1550e0963edeSmrg
1551e0963edeSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1552e0963edeSmrg    # This has been around since 386BSD, at least.  Likely further.
1553e0963edeSmrg    if test -x /sbin/sysctl; then
1554e0963edeSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1555e0963edeSmrg    elif test -x /usr/sbin/sysctl; then
1556e0963edeSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1557e0963edeSmrg    else
1558e0963edeSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1559e0963edeSmrg    fi
1560e0963edeSmrg    # And add a safety zone
1561e0963edeSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1562e0963edeSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1563e0963edeSmrg    ;;
1564e0963edeSmrg
1565e0963edeSmrg  interix*)
1566e0963edeSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1567e0963edeSmrg    lt_cv_sys_max_cmd_len=196608
1568e0963edeSmrg    ;;
1569e0963edeSmrg
1570e0963edeSmrg  osf*)
1571e0963edeSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1572e0963edeSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1573e0963edeSmrg    # nice to cause kernel panics so lets avoid the loop below.
1574e0963edeSmrg    # First set a reasonable default.
1575e0963edeSmrg    lt_cv_sys_max_cmd_len=16384
1576e0963edeSmrg    #
1577e0963edeSmrg    if test -x /sbin/sysconfig; then
1578e0963edeSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1579e0963edeSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1580e0963edeSmrg      esac
1581e0963edeSmrg    fi
1582e0963edeSmrg    ;;
1583e0963edeSmrg  sco3.2v5*)
1584e0963edeSmrg    lt_cv_sys_max_cmd_len=102400
1585e0963edeSmrg    ;;
1586e0963edeSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
1587e0963edeSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1588e0963edeSmrg    if test -n "$kargmax"; then
1589f05b35a2Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1590e0963edeSmrg    else
1591e0963edeSmrg      lt_cv_sys_max_cmd_len=32768
1592e0963edeSmrg    fi
1593e0963edeSmrg    ;;
1594e0963edeSmrg  *)
1595e0963edeSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596e0963edeSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597e0963edeSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598e0963edeSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599e0963edeSmrg    else
1600f05b35a2Smrg      # Make teststring a little bigger before we do anything with it.
1601f05b35a2Smrg      # a 1K string should be a reasonable start.
1602f05b35a2Smrg      for i in 1 2 3 4 5 6 7 8 ; do
1603f05b35a2Smrg        teststring=$teststring$teststring
1604f05b35a2Smrg      done
1605e0963edeSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606f05b35a2Smrg      # If test is not a shell built-in, we'll probably end up computing a
1607f05b35a2Smrg      # maximum length that is only half of the actual maximum length, but
1608f05b35a2Smrg      # we can't tell.
1609f05b35a2Smrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610f05b35a2Smrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611e0963edeSmrg	      test $i != 17 # 1/2 MB should be enough
1612e0963edeSmrg      do
1613e0963edeSmrg        i=`expr $i + 1`
1614e0963edeSmrg        teststring=$teststring$teststring
1615e0963edeSmrg      done
1616f05b35a2Smrg      # Only check the string length outside the loop.
1617f05b35a2Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618e0963edeSmrg      teststring=
1619f05b35a2Smrg      # Add a significant safety factor because C++ compilers can tack on
1620f05b35a2Smrg      # massive amounts of additional arguments before passing them to the
1621f05b35a2Smrg      # linker.  It appears as though 1/2 is a usable value.
1622e0963edeSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623e0963edeSmrg    fi
1624e0963edeSmrg    ;;
1625e0963edeSmrg  esac
1626e0963edeSmrg])
1627e0963edeSmrgif test -n $lt_cv_sys_max_cmd_len ; then
1628e0963edeSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1629e0963edeSmrgelse
1630e0963edeSmrg  AC_MSG_RESULT(none)
1631e0963edeSmrgfi
1632f05b35a2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633f05b35a2Smrg_LT_DECL([], [max_cmd_len], [0],
1634f05b35a2Smrg    [What is the maximum length of a command?])
1635f05b35a2Smrg])# LT_CMD_MAX_LEN
1636e0963edeSmrg
1637f05b35a2Smrg# Old name:
1638f05b35a2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
1640f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1641e0963edeSmrg
1642f05b35a2Smrg
1643f05b35a2Smrg# _LT_HEADER_DLFCN
1644f05b35a2Smrg# ----------------
1645f05b35a2Smrgm4_defun([_LT_HEADER_DLFCN],
1646f05b35a2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647f05b35a2Smrg])# _LT_HEADER_DLFCN
1648e0963edeSmrg
1649e0963edeSmrg
1650f05b35a2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651f05b35a2Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652f05b35a2Smrg# ----------------------------------------------------------------
1653f05b35a2Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654f05b35a2Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1655e0963edeSmrgif test "$cross_compiling" = yes; then :
1656e0963edeSmrg  [$4]
1657e0963edeSmrgelse
1658e0963edeSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659e0963edeSmrg  lt_status=$lt_dlunknown
1660f05b35a2Smrg  cat > conftest.$ac_ext <<_LT_EOF
1661e0963edeSmrg[#line __oline__ "configure"
1662e0963edeSmrg#include "confdefs.h"
1663e0963edeSmrg
1664e0963edeSmrg#if HAVE_DLFCN_H
1665e0963edeSmrg#include <dlfcn.h>
1666e0963edeSmrg#endif
1667e0963edeSmrg
1668e0963edeSmrg#include <stdio.h>
1669e0963edeSmrg
1670e0963edeSmrg#ifdef RTLD_GLOBAL
1671e0963edeSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1672e0963edeSmrg#else
1673e0963edeSmrg#  ifdef DL_GLOBAL
1674e0963edeSmrg#    define LT_DLGLOBAL		DL_GLOBAL
1675e0963edeSmrg#  else
1676e0963edeSmrg#    define LT_DLGLOBAL		0
1677e0963edeSmrg#  endif
1678e0963edeSmrg#endif
1679e0963edeSmrg
1680e0963edeSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1681e0963edeSmrg   find out it does not work in some platform. */
1682e0963edeSmrg#ifndef LT_DLLAZY_OR_NOW
1683e0963edeSmrg#  ifdef RTLD_LAZY
1684e0963edeSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1685e0963edeSmrg#  else
1686e0963edeSmrg#    ifdef DL_LAZY
1687e0963edeSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1688e0963edeSmrg#    else
1689e0963edeSmrg#      ifdef RTLD_NOW
1690e0963edeSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1691e0963edeSmrg#      else
1692e0963edeSmrg#        ifdef DL_NOW
1693e0963edeSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1694e0963edeSmrg#        else
1695e0963edeSmrg#          define LT_DLLAZY_OR_NOW	0
1696e0963edeSmrg#        endif
1697e0963edeSmrg#      endif
1698e0963edeSmrg#    endif
1699e0963edeSmrg#  endif
1700e0963edeSmrg#endif
1701e0963edeSmrg
1702e0963edeSmrgvoid fnord() { int i=42;}
1703e0963edeSmrgint main ()
1704e0963edeSmrg{
1705e0963edeSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1706e0963edeSmrg  int status = $lt_dlunknown;
1707e0963edeSmrg
1708e0963edeSmrg  if (self)
1709e0963edeSmrg    {
1710e0963edeSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711e0963edeSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1712e0963edeSmrg      /* dlclose (self); */
1713e0963edeSmrg    }
1714e0963edeSmrg  else
1715e0963edeSmrg    puts (dlerror ());
1716e0963edeSmrg
1717f05b35a2Smrg  return status;
1718e0963edeSmrg}]
1719f05b35a2Smrg_LT_EOF
1720e0963edeSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1721e0963edeSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1722e0963edeSmrg    lt_status=$?
1723e0963edeSmrg    case x$lt_status in
1724e0963edeSmrg      x$lt_dlno_uscore) $1 ;;
1725e0963edeSmrg      x$lt_dlneed_uscore) $2 ;;
1726e0963edeSmrg      x$lt_dlunknown|x*) $3 ;;
1727e0963edeSmrg    esac
1728e0963edeSmrg  else :
1729e0963edeSmrg    # compilation failed
1730e0963edeSmrg    $3
1731e0963edeSmrg  fi
1732e0963edeSmrgfi
1733e0963edeSmrgrm -fr conftest*
1734f05b35a2Smrg])# _LT_TRY_DLOPEN_SELF
1735e0963edeSmrg
1736e0963edeSmrg
1737f05b35a2Smrg# LT_SYS_DLOPEN_SELF
1738f05b35a2Smrg# ------------------
1739f05b35a2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740f05b35a2Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1741e0963edeSmrgif test "x$enable_dlopen" != xyes; then
1742e0963edeSmrg  enable_dlopen=unknown
1743e0963edeSmrg  enable_dlopen_self=unknown
1744e0963edeSmrg  enable_dlopen_self_static=unknown
1745e0963edeSmrgelse
1746e0963edeSmrg  lt_cv_dlopen=no
1747e0963edeSmrg  lt_cv_dlopen_libs=
1748e0963edeSmrg
1749e0963edeSmrg  case $host_os in
1750e0963edeSmrg  beos*)
1751e0963edeSmrg    lt_cv_dlopen="load_add_on"
1752e0963edeSmrg    lt_cv_dlopen_libs=
1753e0963edeSmrg    lt_cv_dlopen_self=yes
1754e0963edeSmrg    ;;
1755e0963edeSmrg
1756f05b35a2Smrg  mingw* | pw32* | cegcc*)
1757e0963edeSmrg    lt_cv_dlopen="LoadLibrary"
1758e0963edeSmrg    lt_cv_dlopen_libs=
1759f05b35a2Smrg    ;;
1760e0963edeSmrg
1761e0963edeSmrg  cygwin*)
1762e0963edeSmrg    lt_cv_dlopen="dlopen"
1763e0963edeSmrg    lt_cv_dlopen_libs=
1764f05b35a2Smrg    ;;
1765e0963edeSmrg
1766e0963edeSmrg  darwin*)
1767e0963edeSmrg  # if libdl is installed we need to link against it
1768e0963edeSmrg    AC_CHECK_LIB([dl], [dlopen],
1769e0963edeSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1770e0963edeSmrg    lt_cv_dlopen="dyld"
1771e0963edeSmrg    lt_cv_dlopen_libs=
1772e0963edeSmrg    lt_cv_dlopen_self=yes
1773e0963edeSmrg    ])
1774f05b35a2Smrg    ;;
1775e0963edeSmrg
1776e0963edeSmrg  *)
1777e0963edeSmrg    AC_CHECK_FUNC([shl_load],
1778e0963edeSmrg	  [lt_cv_dlopen="shl_load"],
1779e0963edeSmrg      [AC_CHECK_LIB([dld], [shl_load],
1780f05b35a2Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1781e0963edeSmrg	[AC_CHECK_FUNC([dlopen],
1782e0963edeSmrg	      [lt_cv_dlopen="dlopen"],
1783e0963edeSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1784e0963edeSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1785e0963edeSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1786e0963edeSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1787e0963edeSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1788f05b35a2Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1789e0963edeSmrg	      ])
1790e0963edeSmrg	    ])
1791e0963edeSmrg	  ])
1792e0963edeSmrg	])
1793e0963edeSmrg      ])
1794e0963edeSmrg    ;;
1795e0963edeSmrg  esac
1796e0963edeSmrg
1797e0963edeSmrg  if test "x$lt_cv_dlopen" != xno; then
1798e0963edeSmrg    enable_dlopen=yes
1799e0963edeSmrg  else
1800e0963edeSmrg    enable_dlopen=no
1801e0963edeSmrg  fi
1802e0963edeSmrg
1803e0963edeSmrg  case $lt_cv_dlopen in
1804e0963edeSmrg  dlopen)
1805e0963edeSmrg    save_CPPFLAGS="$CPPFLAGS"
1806e0963edeSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1807e0963edeSmrg
1808e0963edeSmrg    save_LDFLAGS="$LDFLAGS"
1809e0963edeSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1810e0963edeSmrg
1811e0963edeSmrg    save_LIBS="$LIBS"
1812e0963edeSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1813e0963edeSmrg
1814e0963edeSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1815e0963edeSmrg	  lt_cv_dlopen_self, [dnl
1816f05b35a2Smrg	  _LT_TRY_DLOPEN_SELF(
1817e0963edeSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1818e0963edeSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1819e0963edeSmrg    ])
1820e0963edeSmrg
1821e0963edeSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1822e0963edeSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1823e0963edeSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824f05b35a2Smrg	  lt_cv_dlopen_self_static, [dnl
1825f05b35a2Smrg	  _LT_TRY_DLOPEN_SELF(
1826e0963edeSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1827e0963edeSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1828e0963edeSmrg      ])
1829e0963edeSmrg    fi
1830e0963edeSmrg
1831e0963edeSmrg    CPPFLAGS="$save_CPPFLAGS"
1832e0963edeSmrg    LDFLAGS="$save_LDFLAGS"
1833e0963edeSmrg    LIBS="$save_LIBS"
1834e0963edeSmrg    ;;
1835e0963edeSmrg  esac
1836e0963edeSmrg
1837e0963edeSmrg  case $lt_cv_dlopen_self in
1838e0963edeSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1839e0963edeSmrg  *) enable_dlopen_self=unknown ;;
1840e0963edeSmrg  esac
1841e0963edeSmrg
1842e0963edeSmrg  case $lt_cv_dlopen_self_static in
1843e0963edeSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1844e0963edeSmrg  *) enable_dlopen_self_static=unknown ;;
1845e0963edeSmrg  esac
1846e0963edeSmrgfi
1847f05b35a2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848f05b35a2Smrg	 [Whether dlopen is supported])
1849f05b35a2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850f05b35a2Smrg	 [Whether dlopen of programs is supported])
1851f05b35a2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852f05b35a2Smrg	 [Whether dlopen of statically linked programs is supported])
1853f05b35a2Smrg])# LT_SYS_DLOPEN_SELF
1854e0963edeSmrg
1855f05b35a2Smrg# Old name:
1856f05b35a2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
1858f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1859e0963edeSmrg
1860f05b35a2Smrg
1861f05b35a2Smrg# _LT_COMPILER_C_O([TAGNAME])
1862f05b35a2Smrg# ---------------------------
1863f05b35a2Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864f05b35a2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865f05b35a2Smrgm4_defun([_LT_COMPILER_C_O],
1866f05b35a2Smrg[m4_require([_LT_DECL_SED])dnl
1867f05b35a2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868f05b35a2Smrgm4_require([_LT_TAG_COMPILER])dnl
1869e0963edeSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870f05b35a2Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871f05b35a2Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872f05b35a2Smrg   $RM -r conftest 2>/dev/null
1873e0963edeSmrg   mkdir conftest
1874e0963edeSmrg   cd conftest
1875e0963edeSmrg   mkdir out
1876e0963edeSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1877e0963edeSmrg
1878e0963edeSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1879e0963edeSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1880e0963edeSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1881e0963edeSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1882e0963edeSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1883e0963edeSmrg   lt_compile=`echo "$ac_compile" | $SED \
1884e0963edeSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885e0963edeSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886e0963edeSmrg   -e 's:$: $lt_compiler_flag:'`
1887e0963edeSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888e0963edeSmrg   (eval "$lt_compile" 2>out/conftest.err)
1889e0963edeSmrg   ac_status=$?
1890e0963edeSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891e0963edeSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892e0963edeSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893e0963edeSmrg   then
1894e0963edeSmrg     # The compiler can only warn and ignore the option if not recognized
1895e0963edeSmrg     # So say no if there are warnings
1896f05b35a2Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1897e0963edeSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898e0963edeSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899f05b35a2Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1900e0963edeSmrg     fi
1901e0963edeSmrg   fi
1902e0963edeSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903f05b35a2Smrg   $RM conftest*
1904e0963edeSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1905e0963edeSmrg   # template instantiation
1906f05b35a2Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907f05b35a2Smrg   $RM out/* && rmdir out
1908e0963edeSmrg   cd ..
1909f05b35a2Smrg   $RM -r conftest
1910f05b35a2Smrg   $RM conftest*
1911e0963edeSmrg])
1912f05b35a2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913f05b35a2Smrg	[Does compiler simultaneously support -c and -o options?])
1914f05b35a2Smrg])# _LT_COMPILER_C_O
1915e0963edeSmrg
1916e0963edeSmrg
1917f05b35a2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918f05b35a2Smrg# ----------------------------------
1919e0963edeSmrg# Check to see if we can do hard links to lock some files if needed
1920f05b35a2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921f05b35a2Smrg[m4_require([_LT_ENABLE_LOCK])dnl
1922f05b35a2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923f05b35a2Smrg_LT_COMPILER_C_O([$1])
1924e0963edeSmrg
1925e0963edeSmrghard_links="nottested"
1926f05b35a2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1927e0963edeSmrg  # do not overwrite the value of need_locks provided by the user
1928e0963edeSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1929e0963edeSmrg  hard_links=yes
1930f05b35a2Smrg  $RM conftest*
1931e0963edeSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1932e0963edeSmrg  touch conftest.a
1933e0963edeSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1934e0963edeSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935e0963edeSmrg  AC_MSG_RESULT([$hard_links])
1936e0963edeSmrg  if test "$hard_links" = no; then
1937e0963edeSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1938e0963edeSmrg    need_locks=warn
1939e0963edeSmrg  fi
1940e0963edeSmrgelse
1941e0963edeSmrg  need_locks=no
1942e0963edeSmrgfi
1943f05b35a2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944f05b35a2Smrg])# _LT_COMPILER_FILE_LOCKS
1945e0963edeSmrg
1946e0963edeSmrg
1947f05b35a2Smrg# _LT_CHECK_OBJDIR
1948f05b35a2Smrg# ----------------
1949f05b35a2Smrgm4_defun([_LT_CHECK_OBJDIR],
1950e0963edeSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1951e0963edeSmrg[rm -f .libs 2>/dev/null
1952e0963edeSmrgmkdir .libs 2>/dev/null
1953e0963edeSmrgif test -d .libs; then
1954e0963edeSmrg  lt_cv_objdir=.libs
1955e0963edeSmrgelse
1956e0963edeSmrg  # MS-DOS does not allow filenames that begin with a dot.
1957e0963edeSmrg  lt_cv_objdir=_libs
1958e0963edeSmrgfi
1959e0963edeSmrgrmdir .libs 2>/dev/null])
1960e0963edeSmrgobjdir=$lt_cv_objdir
1961f05b35a2Smrg_LT_DECL([], [objdir], [0],
1962f05b35a2Smrg         [The name of the directory that contains temporary libtool files])dnl
1963f05b35a2Smrgm4_pattern_allow([LT_OBJDIR])dnl
1964f05b35a2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965f05b35a2Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966f05b35a2Smrg])# _LT_CHECK_OBJDIR
1967e0963edeSmrg
1968e0963edeSmrg
1969f05b35a2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970f05b35a2Smrg# --------------------------------------
1971e0963edeSmrg# Check hardcoding attributes.
1972f05b35a2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1973e0963edeSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974f05b35a2Smrg_LT_TAGVAR(hardcode_action, $1)=
1975f05b35a2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976f05b35a2Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977f05b35a2Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978e0963edeSmrg
1979f05b35a2Smrg  # We can hardcode non-existent directories.
1980f05b35a2Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1981e0963edeSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1982e0963edeSmrg     # have to relink, otherwise we might link with an installed library
1983e0963edeSmrg     # when we should be linking with a yet-to-be-installed one
1984f05b35a2Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985f05b35a2Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1986e0963edeSmrg    # Linking always hardcodes the temporary library directory.
1987f05b35a2Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
1988e0963edeSmrg  else
1989e0963edeSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990f05b35a2Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
1991e0963edeSmrg  fi
1992e0963edeSmrgelse
1993e0963edeSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1994e0963edeSmrg  # directories.
1995f05b35a2Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
1996e0963edeSmrgfi
1997f05b35a2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1998e0963edeSmrg
1999f05b35a2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000f05b35a2Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2001e0963edeSmrg  # Fast installation is not supported
2002e0963edeSmrg  enable_fast_install=no
2003e0963edeSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2004e0963edeSmrg     test "$enable_shared" = no; then
2005e0963edeSmrg  # Fast installation is not necessary
2006e0963edeSmrg  enable_fast_install=needless
2007e0963edeSmrgfi
2008f05b35a2Smrg_LT_TAGDECL([], [hardcode_action], [0],
2009f05b35a2Smrg    [How to hardcode a shared library path into an executable])
2010f05b35a2Smrg])# _LT_LINKER_HARDCODE_LIBPATH
2011e0963edeSmrg
2012e0963edeSmrg
2013f05b35a2Smrg# _LT_CMD_STRIPLIB
2014f05b35a2Smrg# ----------------
2015f05b35a2Smrgm4_defun([_LT_CMD_STRIPLIB],
2016f05b35a2Smrg[m4_require([_LT_DECL_EGREP])
2017f05b35a2Smrgstriplib=
2018e0963edeSmrgold_striplib=
2019e0963edeSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020f05b35a2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2021e0963edeSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2022e0963edeSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2023e0963edeSmrg  AC_MSG_RESULT([yes])
2024e0963edeSmrgelse
2025e0963edeSmrg# FIXME - insert some real tests, host_os isn't really good enough
2026e0963edeSmrg  case $host_os in
2027f05b35a2Smrg  darwin*)
2028f05b35a2Smrg    if test -n "$STRIP" ; then
2029f05b35a2Smrg      striplib="$STRIP -x"
2030f05b35a2Smrg      old_striplib="$STRIP -S"
2031f05b35a2Smrg      AC_MSG_RESULT([yes])
2032f05b35a2Smrg    else
2033f05b35a2Smrg      AC_MSG_RESULT([no])
2034f05b35a2Smrg    fi
2035f05b35a2Smrg    ;;
2036f05b35a2Smrg  *)
2037f05b35a2Smrg    AC_MSG_RESULT([no])
2038e0963edeSmrg    ;;
2039e0963edeSmrg  esac
2040e0963edeSmrgfi
2041f05b35a2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042f05b35a2Smrg_LT_DECL([], [striplib], [1])
2043f05b35a2Smrg])# _LT_CMD_STRIPLIB
2044e0963edeSmrg
2045e0963edeSmrg
2046f05b35a2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2047e0963edeSmrg# -----------------------------
2048e0963edeSmrg# PORTME Fill in your ld.so characteristics
2049f05b35a2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050f05b35a2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051f05b35a2Smrgm4_require([_LT_DECL_EGREP])dnl
2052f05b35a2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053f05b35a2Smrgm4_require([_LT_DECL_OBJDUMP])dnl
2054f05b35a2Smrgm4_require([_LT_DECL_SED])dnl
2055e0963edeSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056f05b35a2Smrgm4_if([$1],
2057f05b35a2Smrg	[], [
2058e0963edeSmrgif test "$GCC" = yes; then
2059e0963edeSmrg  case $host_os in
2060e0963edeSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061e0963edeSmrg    *) lt_awk_arg="/^libraries:/" ;;
2062e0963edeSmrg  esac
2063e0963edeSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064f05b35a2Smrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065e0963edeSmrg    # if the path contains ";" then we assume it to be the separator
2066e0963edeSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2067e0963edeSmrg    # assumed that no part of a normal pathname contains ";" but that should
2068e0963edeSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069f05b35a2Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070e0963edeSmrg  else
2071f05b35a2Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072e0963edeSmrg  fi
2073e0963edeSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2074e0963edeSmrg  # and add multilib dir if necessary.
2075e0963edeSmrg  lt_tmp_lt_search_path_spec=
2076e0963edeSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077e0963edeSmrg  for lt_sys_path in $lt_search_path_spec; do
2078e0963edeSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079e0963edeSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080e0963edeSmrg    else
2081e0963edeSmrg      test -d "$lt_sys_path" && \
2082e0963edeSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083e0963edeSmrg    fi
2084e0963edeSmrg  done
2085f05b35a2Smrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086e0963edeSmrgBEGIN {RS=" "; FS="/|\n";} {
2087e0963edeSmrg  lt_foo="";
2088e0963edeSmrg  lt_count=0;
2089e0963edeSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090e0963edeSmrg    if ($lt_i != "" && $lt_i != ".") {
2091e0963edeSmrg      if ($lt_i == "..") {
2092e0963edeSmrg        lt_count++;
2093e0963edeSmrg      } else {
2094e0963edeSmrg        if (lt_count == 0) {
2095e0963edeSmrg          lt_foo="/" $lt_i lt_foo;
2096e0963edeSmrg        } else {
2097e0963edeSmrg          lt_count--;
2098e0963edeSmrg        }
2099e0963edeSmrg      }
2100e0963edeSmrg    }
2101e0963edeSmrg  }
2102e0963edeSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103e0963edeSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104e0963edeSmrg}'`
2105f05b35a2Smrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106e0963edeSmrgelse
2107e0963edeSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108e0963edeSmrgfi])
2109f05b35a2Smrglibrary_names_spec=
2110f05b35a2Smrglibname_spec='lib$name'
2111f05b35a2Smrgsoname_spec=
2112f05b35a2Smrgshrext_cmds=".so"
2113f05b35a2Smrgpostinstall_cmds=
2114f05b35a2Smrgpostuninstall_cmds=
2115f05b35a2Smrgfinish_cmds=
2116f05b35a2Smrgfinish_eval=
2117f05b35a2Smrgshlibpath_var=
2118f05b35a2Smrgshlibpath_overrides_runpath=unknown
2119f05b35a2Smrgversion_type=none
2120f05b35a2Smrgdynamic_linker="$host_os ld.so"
2121f05b35a2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2122e0963edeSmrgneed_lib_prefix=unknown
2123e0963edeSmrghardcode_into_libs=no
2124e0963edeSmrg
2125e0963edeSmrg# when you set need_version to no, make sure it does not cause -set_version
2126e0963edeSmrg# flags to be left without arguments
2127e0963edeSmrgneed_version=unknown
2128e0963edeSmrg
2129e0963edeSmrgcase $host_os in
2130e0963edeSmrgaix3*)
2131e0963edeSmrg  version_type=linux
2132e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2133e0963edeSmrg  shlibpath_var=LIBPATH
2134e0963edeSmrg
2135e0963edeSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2136e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2137e0963edeSmrg  ;;
2138e0963edeSmrg
2139f05b35a2Smrgaix[[4-9]]*)
2140e0963edeSmrg  version_type=linux
2141e0963edeSmrg  need_lib_prefix=no
2142e0963edeSmrg  need_version=no
2143e0963edeSmrg  hardcode_into_libs=yes
2144e0963edeSmrg  if test "$host_cpu" = ia64; then
2145e0963edeSmrg    # AIX 5 supports IA64
2146e0963edeSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2147e0963edeSmrg    shlibpath_var=LD_LIBRARY_PATH
2148e0963edeSmrg  else
2149e0963edeSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2150e0963edeSmrg    # for dependence libraries.  The import file would start with
2151e0963edeSmrg    # the line `#! .'.  This would cause the generated library to
2152e0963edeSmrg    # depend on `.', always an invalid library.  This was fixed in
2153e0963edeSmrg    # development snapshots of GCC prior to 3.0.
2154e0963edeSmrg    case $host_os in
2155e0963edeSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2156e0963edeSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2157e0963edeSmrg	   echo ' yes '
2158f05b35a2Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2159e0963edeSmrg	:
2160e0963edeSmrg      else
2161e0963edeSmrg	can_build_shared=no
2162e0963edeSmrg      fi
2163e0963edeSmrg      ;;
2164e0963edeSmrg    esac
2165e0963edeSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2166e0963edeSmrg    # soname into executable. Probably we can add versioning support to
2167e0963edeSmrg    # collect2, so additional links can be useful in future.
2168e0963edeSmrg    if test "$aix_use_runtimelinking" = yes; then
2169e0963edeSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2170e0963edeSmrg      # instead of lib<name>.a to let people know that these are not
2171e0963edeSmrg      # typical AIX shared libraries.
2172e0963edeSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173e0963edeSmrg    else
2174e0963edeSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2175e0963edeSmrg      # and later when we are not doing run time linking.
2176e0963edeSmrg      library_names_spec='${libname}${release}.a $libname.a'
2177e0963edeSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2178e0963edeSmrg    fi
2179e0963edeSmrg    shlibpath_var=LIBPATH
2180e0963edeSmrg  fi
2181e0963edeSmrg  ;;
2182e0963edeSmrg
2183e0963edeSmrgamigaos*)
2184f05b35a2Smrg  case $host_cpu in
2185f05b35a2Smrg  powerpc)
2186f05b35a2Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187f05b35a2Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188f05b35a2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189f05b35a2Smrg    ;;
2190f05b35a2Smrg  m68k)
2191f05b35a2Smrg    library_names_spec='$libname.ixlibrary $libname.a'
2192f05b35a2Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193f05b35a2Smrg    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'
2194f05b35a2Smrg    ;;
2195f05b35a2Smrg  esac
2196e0963edeSmrg  ;;
2197e0963edeSmrg
2198e0963edeSmrgbeos*)
2199e0963edeSmrg  library_names_spec='${libname}${shared_ext}'
2200e0963edeSmrg  dynamic_linker="$host_os ld.so"
2201e0963edeSmrg  shlibpath_var=LIBRARY_PATH
2202e0963edeSmrg  ;;
2203e0963edeSmrg
2204e0963edeSmrgbsdi[[45]]*)
2205e0963edeSmrg  version_type=linux
2206e0963edeSmrg  need_version=no
2207e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2208e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2209e0963edeSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2210e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2211e0963edeSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2212e0963edeSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2213e0963edeSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2214e0963edeSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2215e0963edeSmrg  # libtool to hard-code these into programs
2216e0963edeSmrg  ;;
2217e0963edeSmrg
2218f05b35a2Smrgcygwin* | mingw* | pw32* | cegcc*)
2219e0963edeSmrg  version_type=windows
2220e0963edeSmrg  shrext_cmds=".dll"
2221e0963edeSmrg  need_version=no
2222e0963edeSmrg  need_lib_prefix=no
2223e0963edeSmrg
2224e0963edeSmrg  case $GCC,$host_os in
2225f05b35a2Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2226e0963edeSmrg    library_names_spec='$libname.dll.a'
2227e0963edeSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228e0963edeSmrg    postinstall_cmds='base_file=`basename \${file}`~
2229f05b35a2Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2230e0963edeSmrg      dldir=$destdir/`dirname \$dlpath`~
2231e0963edeSmrg      test -d \$dldir || mkdir -p \$dldir~
2232e0963edeSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233f05b35a2Smrg      chmod a+x \$dldir/$dlname~
2234f05b35a2Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235f05b35a2Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236f05b35a2Smrg      fi'
2237e0963edeSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2238e0963edeSmrg      dlpath=$dir/\$dldll~
2239f05b35a2Smrg       $RM \$dlpath'
2240e0963edeSmrg    shlibpath_overrides_runpath=yes
2241e0963edeSmrg
2242e0963edeSmrg    case $host_os in
2243e0963edeSmrg    cygwin*)
2244e0963edeSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245e0963edeSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246e0963edeSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2247e0963edeSmrg      ;;
2248f05b35a2Smrg    mingw* | cegcc*)
2249e0963edeSmrg      # MinGW DLLs use traditional 'lib' prefix
2250e0963edeSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251f05b35a2Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252f05b35a2Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253e0963edeSmrg        # It is most probably a Windows format PATH printed by
2254e0963edeSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255e0963edeSmrg        # path with ; separators, and with drive letters. We can handle the
2256e0963edeSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2257e0963edeSmrg        # especially as we might pass files found there to a mingw objdump,
2258e0963edeSmrg        # which wouldn't understand a cygwinified path. Ahh.
2259f05b35a2Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260e0963edeSmrg      else
2261f05b35a2Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262e0963edeSmrg      fi
2263e0963edeSmrg      ;;
2264e0963edeSmrg    pw32*)
2265e0963edeSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266e0963edeSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267e0963edeSmrg      ;;
2268e0963edeSmrg    esac
2269e0963edeSmrg    ;;
2270e0963edeSmrg
2271e0963edeSmrg  *)
2272e0963edeSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2273e0963edeSmrg    ;;
2274e0963edeSmrg  esac
2275e0963edeSmrg  dynamic_linker='Win32 ld.exe'
2276e0963edeSmrg  # FIXME: first we should search . and the directory the executable is in
2277e0963edeSmrg  shlibpath_var=PATH
2278e0963edeSmrg  ;;
2279e0963edeSmrg
2280e0963edeSmrgdarwin* | rhapsody*)
2281e0963edeSmrg  dynamic_linker="$host_os dyld"
2282e0963edeSmrg  version_type=darwin
2283e0963edeSmrg  need_lib_prefix=no
2284e0963edeSmrg  need_version=no
2285f05b35a2Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2286e0963edeSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2287e0963edeSmrg  shlibpath_overrides_runpath=yes
2288e0963edeSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2289e0963edeSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290f05b35a2Smrgm4_if([$1], [],[
2291f05b35a2Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2292e0963edeSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2293e0963edeSmrg  ;;
2294e0963edeSmrg
2295e0963edeSmrgdgux*)
2296e0963edeSmrg  version_type=linux
2297e0963edeSmrg  need_lib_prefix=no
2298e0963edeSmrg  need_version=no
2299e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2300e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2301e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2302e0963edeSmrg  ;;
2303e0963edeSmrg
2304e0963edeSmrgfreebsd1*)
2305e0963edeSmrg  dynamic_linker=no
2306e0963edeSmrg  ;;
2307e0963edeSmrg
2308e0963edeSmrgfreebsd* | dragonfly*)
2309e0963edeSmrg  # DragonFly does not have aout.  When/if they implement a new
2310e0963edeSmrg  # versioning mechanism, adjust this.
2311e0963edeSmrg  if test -x /usr/bin/objformat; then
2312e0963edeSmrg    objformat=`/usr/bin/objformat`
2313e0963edeSmrg  else
2314e0963edeSmrg    case $host_os in
2315e0963edeSmrg    freebsd[[123]]*) objformat=aout ;;
2316e0963edeSmrg    *) objformat=elf ;;
2317e0963edeSmrg    esac
2318e0963edeSmrg  fi
2319e0963edeSmrg  version_type=freebsd-$objformat
2320e0963edeSmrg  case $version_type in
2321e0963edeSmrg    freebsd-elf*)
2322e0963edeSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2323e0963edeSmrg      need_version=no
2324e0963edeSmrg      need_lib_prefix=no
2325e0963edeSmrg      ;;
2326e0963edeSmrg    freebsd-*)
2327e0963edeSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2328e0963edeSmrg      need_version=yes
2329e0963edeSmrg      ;;
2330e0963edeSmrg  esac
2331e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2332e0963edeSmrg  case $host_os in
2333e0963edeSmrg  freebsd2*)
2334e0963edeSmrg    shlibpath_overrides_runpath=yes
2335e0963edeSmrg    ;;
2336e0963edeSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2337e0963edeSmrg    shlibpath_overrides_runpath=yes
2338e0963edeSmrg    hardcode_into_libs=yes
2339e0963edeSmrg    ;;
2340e0963edeSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2341e0963edeSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2342e0963edeSmrg    shlibpath_overrides_runpath=no
2343e0963edeSmrg    hardcode_into_libs=yes
2344e0963edeSmrg    ;;
2345e0963edeSmrg  *) # from 4.6 on, and DragonFly
2346e0963edeSmrg    shlibpath_overrides_runpath=yes
2347e0963edeSmrg    hardcode_into_libs=yes
2348e0963edeSmrg    ;;
2349e0963edeSmrg  esac
2350e0963edeSmrg  ;;
2351e0963edeSmrg
2352e0963edeSmrggnu*)
2353e0963edeSmrg  version_type=linux
2354e0963edeSmrg  need_lib_prefix=no
2355e0963edeSmrg  need_version=no
2356e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2357e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2358e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2359e0963edeSmrg  hardcode_into_libs=yes
2360e0963edeSmrg  ;;
2361e0963edeSmrg
2362e0963edeSmrghpux9* | hpux10* | hpux11*)
2363e0963edeSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2364e0963edeSmrg  # link against other versions.
2365e0963edeSmrg  version_type=sunos
2366e0963edeSmrg  need_lib_prefix=no
2367e0963edeSmrg  need_version=no
2368e0963edeSmrg  case $host_cpu in
2369e0963edeSmrg  ia64*)
2370e0963edeSmrg    shrext_cmds='.so'
2371e0963edeSmrg    hardcode_into_libs=yes
2372e0963edeSmrg    dynamic_linker="$host_os dld.so"
2373e0963edeSmrg    shlibpath_var=LD_LIBRARY_PATH
2374e0963edeSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375e0963edeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376e0963edeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2377e0963edeSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2378e0963edeSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2379e0963edeSmrg    else
2380e0963edeSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2381e0963edeSmrg    fi
2382e0963edeSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2383e0963edeSmrg    ;;
2384f05b35a2Smrg  hppa*64*)
2385f05b35a2Smrg    shrext_cmds='.sl'
2386f05b35a2Smrg    hardcode_into_libs=yes
2387f05b35a2Smrg    dynamic_linker="$host_os dld.sl"
2388f05b35a2Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2389f05b35a2Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2390f05b35a2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2391f05b35a2Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2392f05b35a2Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2393f05b35a2Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394f05b35a2Smrg    ;;
2395f05b35a2Smrg  *)
2396e0963edeSmrg    shrext_cmds='.sl'
2397e0963edeSmrg    dynamic_linker="$host_os dld.sl"
2398e0963edeSmrg    shlibpath_var=SHLIB_PATH
2399e0963edeSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2400e0963edeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2401e0963edeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2402e0963edeSmrg    ;;
2403e0963edeSmrg  esac
2404e0963edeSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2405e0963edeSmrg  postinstall_cmds='chmod 555 $lib'
2406e0963edeSmrg  ;;
2407e0963edeSmrg
2408e0963edeSmrginterix[[3-9]]*)
2409e0963edeSmrg  version_type=linux
2410e0963edeSmrg  need_lib_prefix=no
2411e0963edeSmrg  need_version=no
2412e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2413e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2414e0963edeSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2415e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2416e0963edeSmrg  shlibpath_overrides_runpath=no
2417e0963edeSmrg  hardcode_into_libs=yes
2418e0963edeSmrg  ;;
2419e0963edeSmrg
2420e0963edeSmrgirix5* | irix6* | nonstopux*)
2421e0963edeSmrg  case $host_os in
2422e0963edeSmrg    nonstopux*) version_type=nonstopux ;;
2423e0963edeSmrg    *)
2424e0963edeSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2425e0963edeSmrg		version_type=linux
2426e0963edeSmrg	else
2427e0963edeSmrg		version_type=irix
2428e0963edeSmrg	fi ;;
2429e0963edeSmrg  esac
2430e0963edeSmrg  need_lib_prefix=no
2431e0963edeSmrg  need_version=no
2432e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2433e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2434e0963edeSmrg  case $host_os in
2435e0963edeSmrg  irix5* | nonstopux*)
2436e0963edeSmrg    libsuff= shlibsuff=
2437e0963edeSmrg    ;;
2438e0963edeSmrg  *)
2439e0963edeSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2440e0963edeSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2441e0963edeSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2442e0963edeSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2443e0963edeSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2444e0963edeSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2445e0963edeSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2446e0963edeSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2447e0963edeSmrg    esac
2448e0963edeSmrg    ;;
2449e0963edeSmrg  esac
2450e0963edeSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2451e0963edeSmrg  shlibpath_overrides_runpath=no
2452e0963edeSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2453e0963edeSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2454e0963edeSmrg  hardcode_into_libs=yes
2455e0963edeSmrg  ;;
2456e0963edeSmrg
2457e0963edeSmrg# No shared lib support for Linux oldld, aout, or coff.
2458e0963edeSmrglinux*oldld* | linux*aout* | linux*coff*)
2459e0963edeSmrg  dynamic_linker=no
2460e0963edeSmrg  ;;
2461e0963edeSmrg
2462e0963edeSmrg# This must be Linux ELF.
2463e0963edeSmrglinux* | k*bsd*-gnu)
2464e0963edeSmrg  version_type=linux
2465e0963edeSmrg  need_lib_prefix=no
2466e0963edeSmrg  need_version=no
2467e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2469e0963edeSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2470e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2471e0963edeSmrg  shlibpath_overrides_runpath=no
2472f05b35a2Smrg  # Some binutils ld are patched to set DT_RUNPATH
2473f05b35a2Smrg  save_LDFLAGS=$LDFLAGS
2474f05b35a2Smrg  save_libdir=$libdir
2475f05b35a2Smrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476f05b35a2Smrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477f05b35a2Smrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478f05b35a2Smrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479f05b35a2Smrg       [shlibpath_overrides_runpath=yes])])
2480f05b35a2Smrg  LDFLAGS=$save_LDFLAGS
2481f05b35a2Smrg  libdir=$save_libdir
2482f05b35a2Smrg
2483e0963edeSmrg  # This implies no fast_install, which is unacceptable.
2484e0963edeSmrg  # Some rework will be needed to allow for fast_install
2485e0963edeSmrg  # before this can be enabled.
2486e0963edeSmrg  hardcode_into_libs=yes
2487f05b35a2Smrg
2488f05b35a2Smrg  # Add ABI-specific directories to the system library path.
2489f05b35a2Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2490e0963edeSmrg
2491e0963edeSmrg  # Append ld.so.conf contents to the search path
2492e0963edeSmrg  if test -f /etc/ld.so.conf; then
2493f05b35a2Smrg    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' ' '`
2494e0963edeSmrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2495e0963edeSmrg  fi
2496e0963edeSmrg
2497e0963edeSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2498e0963edeSmrg  # powerpc, because MkLinux only supported shared libraries with the
2499e0963edeSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2500e0963edeSmrg  # most powerpc-linux boxes support dynamic linking these days and
2501e0963edeSmrg  # people can always --disable-shared, the test was removed, and we
2502e0963edeSmrg  # assume the GNU/Linux dynamic linker is in use.
2503e0963edeSmrg  dynamic_linker='GNU/Linux ld.so'
2504e0963edeSmrg  ;;
2505e0963edeSmrg
2506e0963edeSmrgnetbsd*)
2507e0963edeSmrg  version_type=sunos
2508e0963edeSmrg  need_lib_prefix=no
2509e0963edeSmrg  need_version=no
2510f05b35a2Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2511e0963edeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2512e0963edeSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2513e0963edeSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2514e0963edeSmrg  else
2515e0963edeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2516e0963edeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2517e0963edeSmrg    dynamic_linker='NetBSD ld.elf_so'
2518e0963edeSmrg  fi
2519e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2520e0963edeSmrg  shlibpath_overrides_runpath=yes
2521e0963edeSmrg  hardcode_into_libs=yes
2522e0963edeSmrg  ;;
2523e0963edeSmrg
2524e0963edeSmrgnewsos6)
2525e0963edeSmrg  version_type=linux
2526e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2528e0963edeSmrg  shlibpath_overrides_runpath=yes
2529e0963edeSmrg  ;;
2530e0963edeSmrg
2531f05b35a2Smrg*nto* | *qnx*)
2532f05b35a2Smrg  version_type=qnx
2533e0963edeSmrg  need_lib_prefix=no
2534e0963edeSmrg  need_version=no
2535e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2536e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2537e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2538f05b35a2Smrg  shlibpath_overrides_runpath=no
2539f05b35a2Smrg  hardcode_into_libs=yes
2540f05b35a2Smrg  dynamic_linker='ldqnx.so'
2541e0963edeSmrg  ;;
2542e0963edeSmrg
2543e0963edeSmrgopenbsd*)
2544e0963edeSmrg  version_type=sunos
2545e0963edeSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
2546e0963edeSmrg  need_lib_prefix=no
2547e0963edeSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2548e0963edeSmrg  case $host_os in
2549f05b35a2Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2550f05b35a2Smrg    *)				need_version=no  ;;
2551e0963edeSmrg  esac
2552e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2553e0963edeSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2554e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2555f05b35a2Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2556e0963edeSmrg    case $host_os in
2557e0963edeSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2558e0963edeSmrg	shlibpath_overrides_runpath=no
2559e0963edeSmrg	;;
2560e0963edeSmrg      *)
2561e0963edeSmrg	shlibpath_overrides_runpath=yes
2562e0963edeSmrg	;;
2563e0963edeSmrg      esac
2564e0963edeSmrg  else
2565e0963edeSmrg    shlibpath_overrides_runpath=yes
2566e0963edeSmrg  fi
2567e0963edeSmrg  ;;
2568e0963edeSmrg
2569e0963edeSmrgos2*)
2570e0963edeSmrg  libname_spec='$name'
2571e0963edeSmrg  shrext_cmds=".dll"
2572e0963edeSmrg  need_lib_prefix=no
2573e0963edeSmrg  library_names_spec='$libname${shared_ext} $libname.a'
2574e0963edeSmrg  dynamic_linker='OS/2 ld.exe'
2575e0963edeSmrg  shlibpath_var=LIBPATH
2576e0963edeSmrg  ;;
2577e0963edeSmrg
2578e0963edeSmrgosf3* | osf4* | osf5*)
2579e0963edeSmrg  version_type=osf
2580e0963edeSmrg  need_lib_prefix=no
2581e0963edeSmrg  need_version=no
2582e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2583e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2585e0963edeSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2586e0963edeSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2587e0963edeSmrg  ;;
2588e0963edeSmrg
2589e0963edeSmrgrdos*)
2590e0963edeSmrg  dynamic_linker=no
2591e0963edeSmrg  ;;
2592e0963edeSmrg
2593e0963edeSmrgsolaris*)
2594e0963edeSmrg  version_type=linux
2595e0963edeSmrg  need_lib_prefix=no
2596e0963edeSmrg  need_version=no
2597e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2598e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2599e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2600e0963edeSmrg  shlibpath_overrides_runpath=yes
2601e0963edeSmrg  hardcode_into_libs=yes
2602e0963edeSmrg  # ldd complains unless libraries are executable
2603e0963edeSmrg  postinstall_cmds='chmod +x $lib'
2604e0963edeSmrg  ;;
2605e0963edeSmrg
2606e0963edeSmrgsunos4*)
2607e0963edeSmrg  version_type=sunos
2608e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2609e0963edeSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2610e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2611e0963edeSmrg  shlibpath_overrides_runpath=yes
2612e0963edeSmrg  if test "$with_gnu_ld" = yes; then
2613e0963edeSmrg    need_lib_prefix=no
2614e0963edeSmrg  fi
2615e0963edeSmrg  need_version=yes
2616e0963edeSmrg  ;;
2617e0963edeSmrg
2618e0963edeSmrgsysv4 | sysv4.3*)
2619e0963edeSmrg  version_type=linux
2620e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2621e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2622e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2623e0963edeSmrg  case $host_vendor in
2624e0963edeSmrg    sni)
2625e0963edeSmrg      shlibpath_overrides_runpath=no
2626e0963edeSmrg      need_lib_prefix=no
2627e0963edeSmrg      runpath_var=LD_RUN_PATH
2628e0963edeSmrg      ;;
2629e0963edeSmrg    siemens)
2630e0963edeSmrg      need_lib_prefix=no
2631e0963edeSmrg      ;;
2632e0963edeSmrg    motorola)
2633e0963edeSmrg      need_lib_prefix=no
2634e0963edeSmrg      need_version=no
2635e0963edeSmrg      shlibpath_overrides_runpath=no
2636e0963edeSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2637e0963edeSmrg      ;;
2638e0963edeSmrg  esac
2639e0963edeSmrg  ;;
2640e0963edeSmrg
2641e0963edeSmrgsysv4*MP*)
2642e0963edeSmrg  if test -d /usr/nec ;then
2643e0963edeSmrg    version_type=linux
2644e0963edeSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2645e0963edeSmrg    soname_spec='$libname${shared_ext}.$major'
2646e0963edeSmrg    shlibpath_var=LD_LIBRARY_PATH
2647e0963edeSmrg  fi
2648e0963edeSmrg  ;;
2649e0963edeSmrg
2650e0963edeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2651e0963edeSmrg  version_type=freebsd-elf
2652e0963edeSmrg  need_lib_prefix=no
2653e0963edeSmrg  need_version=no
2654e0963edeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2655e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2656e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2657f05b35a2Smrg  shlibpath_overrides_runpath=yes
2658e0963edeSmrg  hardcode_into_libs=yes
2659e0963edeSmrg  if test "$with_gnu_ld" = yes; then
2660e0963edeSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2661e0963edeSmrg  else
2662e0963edeSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2663e0963edeSmrg    case $host_os in
2664e0963edeSmrg      sco3.2v5*)
2665e0963edeSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2666e0963edeSmrg	;;
2667e0963edeSmrg    esac
2668e0963edeSmrg  fi
2669e0963edeSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
2670e0963edeSmrg  ;;
2671e0963edeSmrg
2672f05b35a2Smrgtpf*)
2673f05b35a2Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2674e0963edeSmrg  version_type=linux
2675f05b35a2Smrg  need_lib_prefix=no
2676f05b35a2Smrg  need_version=no
2677f05b35a2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678f05b35a2Smrg  shlibpath_var=LD_LIBRARY_PATH
2679f05b35a2Smrg  shlibpath_overrides_runpath=no
2680f05b35a2Smrg  hardcode_into_libs=yes
2681f05b35a2Smrg  ;;
2682f05b35a2Smrg
2683f05b35a2Smrguts4*)
2684f05b35a2Smrg  version_type=linux
2685f05b35a2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686e0963edeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2687e0963edeSmrg  shlibpath_var=LD_LIBRARY_PATH
2688e0963edeSmrg  ;;
2689e0963edeSmrg
2690e0963edeSmrg*)
2691e0963edeSmrg  dynamic_linker=no
2692e0963edeSmrg  ;;
2693e0963edeSmrgesac
2694e0963edeSmrgAC_MSG_RESULT([$dynamic_linker])
2695e0963edeSmrgtest "$dynamic_linker" = no && can_build_shared=no
2696e0963edeSmrg
2697e0963edeSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2698e0963edeSmrgif test "$GCC" = yes; then
2699e0963edeSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2700e0963edeSmrgfi
2701e0963edeSmrg
2702f05b35a2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2703f05b35a2Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2704f05b35a2Smrgfi
2705f05b35a2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2706f05b35a2Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2707e0963edeSmrgfi
2708e0963edeSmrg
2709f05b35a2Smrg_LT_DECL([], [variables_saved_for_relink], [1],
2710f05b35a2Smrg    [Variables whose values should be saved in libtool wrapper scripts and
2711f05b35a2Smrg    restored at link time])
2712f05b35a2Smrg_LT_DECL([], [need_lib_prefix], [0],
2713f05b35a2Smrg    [Do we need the "lib" prefix for modules?])
2714f05b35a2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2715f05b35a2Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
2716f05b35a2Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2717f05b35a2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2718f05b35a2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2719f05b35a2Smrg    [Is shlibpath searched before the hard-coded library search path?])
2720f05b35a2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2721f05b35a2Smrg_LT_DECL([], [library_names_spec], [1],
2722f05b35a2Smrg    [[List of archive names.  First name is the real one, the rest are links.
2723f05b35a2Smrg    The last name is the one that the linker finds with -lNAME]])
2724f05b35a2Smrg_LT_DECL([], [soname_spec], [1],
2725f05b35a2Smrg    [[The coded name of the library, if different from the real name]])
2726f05b35a2Smrg_LT_DECL([], [postinstall_cmds], [2],
2727f05b35a2Smrg    [Command to use after installation of a shared archive])
2728f05b35a2Smrg_LT_DECL([], [postuninstall_cmds], [2],
2729f05b35a2Smrg    [Command to use after uninstallation of a shared archive])
2730f05b35a2Smrg_LT_DECL([], [finish_cmds], [2],
2731f05b35a2Smrg    [Commands used to finish a libtool library installation in a directory])
2732f05b35a2Smrg_LT_DECL([], [finish_eval], [1],
2733f05b35a2Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
2734f05b35a2Smrg    not shown]])
2735f05b35a2Smrg_LT_DECL([], [hardcode_into_libs], [0],
2736f05b35a2Smrg    [Whether we should hardcode library paths into libraries])
2737f05b35a2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2738f05b35a2Smrg    [Compile-time system search path for libraries])
2739f05b35a2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2740f05b35a2Smrg    [Run-time system search path for libraries])
2741f05b35a2Smrg])# _LT_SYS_DYNAMIC_LINKER
2742f05b35a2Smrg
2743f05b35a2Smrg
2744f05b35a2Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
2745e0963edeSmrg# --------------------------
2746e0963edeSmrg# find a file program which can recognize shared library
2747f05b35a2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2748f05b35a2Smrg[m4_require([_LT_DECL_EGREP])dnl
2749e0963edeSmrgAC_MSG_CHECKING([for $1])
2750e0963edeSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2751e0963edeSmrg[case $MAGIC_CMD in
2752e0963edeSmrg[[\\/*] |  ?:[\\/]*])
2753e0963edeSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2754e0963edeSmrg  ;;
2755e0963edeSmrg*)
2756e0963edeSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2757e0963edeSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758e0963edeSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2759e0963edeSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2760e0963edeSmrgdnl not every word.  This closes a longstanding sh security hole.
2761f05b35a2Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2762e0963edeSmrg  for ac_dir in $ac_dummy; do
2763e0963edeSmrg    IFS="$lt_save_ifs"
2764e0963edeSmrg    test -z "$ac_dir" && ac_dir=.
2765e0963edeSmrg    if test -f $ac_dir/$1; then
2766e0963edeSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2767e0963edeSmrg      if test -n "$file_magic_test_file"; then
2768e0963edeSmrg	case $deplibs_check_method in
2769e0963edeSmrg	"file_magic "*)
2770e0963edeSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2771e0963edeSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2772e0963edeSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2773e0963edeSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2774e0963edeSmrg	    :
2775e0963edeSmrg	  else
2776f05b35a2Smrg	    cat <<_LT_EOF 1>&2
2777e0963edeSmrg
2778e0963edeSmrg*** Warning: the command libtool uses to detect shared libraries,
2779e0963edeSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2780e0963edeSmrg*** The result is that libtool may fail to recognize shared libraries
2781e0963edeSmrg*** as such.  This will affect the creation of libtool libraries that
2782e0963edeSmrg*** depend on shared libraries, but programs linked with such libtool
2783e0963edeSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2784e0963edeSmrg*** may want to report the problem to your system manager and/or to
2785e0963edeSmrg*** bug-libtool@gnu.org
2786e0963edeSmrg
2787f05b35a2Smrg_LT_EOF
2788e0963edeSmrg	  fi ;;
2789e0963edeSmrg	esac
2790e0963edeSmrg      fi
2791e0963edeSmrg      break
2792e0963edeSmrg    fi
2793e0963edeSmrg  done
2794e0963edeSmrg  IFS="$lt_save_ifs"
2795e0963edeSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2796e0963edeSmrg  ;;
2797e0963edeSmrgesac])
2798e0963edeSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2799e0963edeSmrgif test -n "$MAGIC_CMD"; then
2800e0963edeSmrg  AC_MSG_RESULT($MAGIC_CMD)
2801e0963edeSmrgelse
2802e0963edeSmrg  AC_MSG_RESULT(no)
2803e0963edeSmrgfi
2804f05b35a2Smrg_LT_DECL([], [MAGIC_CMD], [0],
2805f05b35a2Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2806f05b35a2Smrg])# _LT_PATH_TOOL_PREFIX
2807e0963edeSmrg
2808f05b35a2Smrg# Old name:
2809f05b35a2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2810f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
2811f05b35a2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2812e0963edeSmrg
2813f05b35a2Smrg
2814f05b35a2Smrg# _LT_PATH_MAGIC
2815f05b35a2Smrg# --------------
2816e0963edeSmrg# find a file program which can recognize a shared library
2817f05b35a2Smrgm4_defun([_LT_PATH_MAGIC],
2818f05b35a2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2819e0963edeSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2820e0963edeSmrg  if test -n "$ac_tool_prefix"; then
2821f05b35a2Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2822e0963edeSmrg  else
2823e0963edeSmrg    MAGIC_CMD=:
2824e0963edeSmrg  fi
2825e0963edeSmrgfi
2826f05b35a2Smrg])# _LT_PATH_MAGIC
2827e0963edeSmrg
2828e0963edeSmrg
2829f05b35a2Smrg# LT_PATH_LD
2830e0963edeSmrg# ----------
2831e0963edeSmrg# find the pathname to the GNU or non-GNU linker
2832f05b35a2SmrgAC_DEFUN([LT_PATH_LD],
2833f05b35a2Smrg[AC_REQUIRE([AC_PROG_CC])dnl
2834e0963edeSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2835e0963edeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2836f05b35a2Smrgm4_require([_LT_DECL_SED])dnl
2837f05b35a2Smrgm4_require([_LT_DECL_EGREP])dnl
2838f05b35a2Smrg
2839f05b35a2SmrgAC_ARG_WITH([gnu-ld],
2840f05b35a2Smrg    [AS_HELP_STRING([--with-gnu-ld],
2841f05b35a2Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2842f05b35a2Smrg    [test "$withval" = no || with_gnu_ld=yes],
2843f05b35a2Smrg    [with_gnu_ld=no])dnl
2844f05b35a2Smrg
2845e0963edeSmrgac_prog=ld
2846e0963edeSmrgif test "$GCC" = yes; then
2847e0963edeSmrg  # Check if gcc -print-prog-name=ld gives a path.
2848e0963edeSmrg  AC_MSG_CHECKING([for ld used by $CC])
2849e0963edeSmrg  case $host in
2850e0963edeSmrg  *-*-mingw*)
2851e0963edeSmrg    # gcc leaves a trailing carriage return which upsets mingw
2852e0963edeSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2853e0963edeSmrg  *)
2854e0963edeSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2855e0963edeSmrg  esac
2856e0963edeSmrg  case $ac_prog in
2857e0963edeSmrg    # Accept absolute paths.
2858e0963edeSmrg    [[\\/]]* | ?:[[\\/]]*)
2859e0963edeSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2860e0963edeSmrg      # Canonicalize the pathname of ld
2861f05b35a2Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2862f05b35a2Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2863f05b35a2Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2864e0963edeSmrg      done
2865e0963edeSmrg      test -z "$LD" && LD="$ac_prog"
2866e0963edeSmrg      ;;
2867e0963edeSmrg  "")
2868e0963edeSmrg    # If it fails, then pretend we aren't using GCC.
2869e0963edeSmrg    ac_prog=ld
2870e0963edeSmrg    ;;
2871e0963edeSmrg  *)
2872e0963edeSmrg    # If it is relative, then search for the first ld in PATH.
2873e0963edeSmrg    with_gnu_ld=unknown
2874e0963edeSmrg    ;;
2875e0963edeSmrg  esac
2876e0963edeSmrgelif test "$with_gnu_ld" = yes; then
2877e0963edeSmrg  AC_MSG_CHECKING([for GNU ld])
2878e0963edeSmrgelse
2879e0963edeSmrg  AC_MSG_CHECKING([for non-GNU ld])
2880e0963edeSmrgfi
2881e0963edeSmrgAC_CACHE_VAL(lt_cv_path_LD,
2882e0963edeSmrg[if test -z "$LD"; then
2883e0963edeSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2884e0963edeSmrg  for ac_dir in $PATH; do
2885e0963edeSmrg    IFS="$lt_save_ifs"
2886e0963edeSmrg    test -z "$ac_dir" && ac_dir=.
2887e0963edeSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2888e0963edeSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2889e0963edeSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2890e0963edeSmrg      # but apparently some variants of GNU ld only accept -v.
2891e0963edeSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2892e0963edeSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2893e0963edeSmrg      *GNU* | *'with BFD'*)
2894e0963edeSmrg	test "$with_gnu_ld" != no && break
2895e0963edeSmrg	;;
2896e0963edeSmrg      *)
2897e0963edeSmrg	test "$with_gnu_ld" != yes && break
2898e0963edeSmrg	;;
2899e0963edeSmrg      esac
2900e0963edeSmrg    fi
2901e0963edeSmrg  done
2902e0963edeSmrg  IFS="$lt_save_ifs"
2903e0963edeSmrgelse
2904e0963edeSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2905e0963edeSmrgfi])
2906e0963edeSmrgLD="$lt_cv_path_LD"
2907e0963edeSmrgif test -n "$LD"; then
2908e0963edeSmrg  AC_MSG_RESULT($LD)
2909e0963edeSmrgelse
2910e0963edeSmrg  AC_MSG_RESULT(no)
2911e0963edeSmrgfi
2912e0963edeSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2913f05b35a2Smrg_LT_PATH_LD_GNU
2914f05b35a2SmrgAC_SUBST([LD])
2915e0963edeSmrg
2916f05b35a2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2917f05b35a2Smrg])# LT_PATH_LD
2918e0963edeSmrg
2919f05b35a2Smrg# Old names:
2920f05b35a2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2921f05b35a2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2922f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
2923f05b35a2Smrgdnl AC_DEFUN([AM_PROG_LD], [])
2924f05b35a2Smrgdnl AC_DEFUN([AC_PROG_LD], [])
2925f05b35a2Smrg
2926f05b35a2Smrg
2927f05b35a2Smrg# _LT_PATH_LD_GNU
2928f05b35a2Smrg#- --------------
2929f05b35a2Smrgm4_defun([_LT_PATH_LD_GNU],
2930f05b35a2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2931e0963edeSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2932e0963edeSmrgcase `$LD -v 2>&1 </dev/null` in
2933e0963edeSmrg*GNU* | *'with BFD'*)
2934e0963edeSmrg  lt_cv_prog_gnu_ld=yes
2935e0963edeSmrg  ;;
2936e0963edeSmrg*)
2937e0963edeSmrg  lt_cv_prog_gnu_ld=no
2938e0963edeSmrg  ;;
2939e0963edeSmrgesac])
2940e0963edeSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2941f05b35a2Smrg])# _LT_PATH_LD_GNU
2942e0963edeSmrg
2943e0963edeSmrg
2944f05b35a2Smrg# _LT_CMD_RELOAD
2945f05b35a2Smrg# --------------
2946e0963edeSmrg# find reload flag for linker
2947e0963edeSmrg#   -- PORTME Some linkers may need a different reload flag.
2948f05b35a2Smrgm4_defun([_LT_CMD_RELOAD],
2949e0963edeSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2950e0963edeSmrg  lt_cv_ld_reload_flag,
2951e0963edeSmrg  [lt_cv_ld_reload_flag='-r'])
2952e0963edeSmrgreload_flag=$lt_cv_ld_reload_flag
2953e0963edeSmrgcase $reload_flag in
2954e0963edeSmrg"" | " "*) ;;
2955e0963edeSmrg*) reload_flag=" $reload_flag" ;;
2956e0963edeSmrgesac
2957e0963edeSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2958e0963edeSmrgcase $host_os in
2959e0963edeSmrg  darwin*)
2960e0963edeSmrg    if test "$GCC" = yes; then
2961e0963edeSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2962e0963edeSmrg    else
2963e0963edeSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2964e0963edeSmrg    fi
2965e0963edeSmrg    ;;
2966e0963edeSmrgesac
2967f05b35a2Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2968f05b35a2Smrg_LT_DECL([], [reload_cmds], [2])dnl
2969f05b35a2Smrg])# _LT_CMD_RELOAD
2970e0963edeSmrg
2971e0963edeSmrg
2972f05b35a2Smrg# _LT_CHECK_MAGIC_METHOD
2973f05b35a2Smrg# ----------------------
2974e0963edeSmrg# how to check for library dependencies
2975e0963edeSmrg#  -- PORTME fill in with the dynamic library characteristics
2976f05b35a2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2977f05b35a2Smrg[m4_require([_LT_DECL_EGREP])
2978f05b35a2Smrgm4_require([_LT_DECL_OBJDUMP])
2979f05b35a2SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
2980e0963edeSmrglt_cv_deplibs_check_method,
2981e0963edeSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2982e0963edeSmrglt_cv_file_magic_test_file=
2983e0963edeSmrglt_cv_deplibs_check_method='unknown'
2984e0963edeSmrg# Need to set the preceding variable on all platforms that support
2985e0963edeSmrg# interlibrary dependencies.
2986e0963edeSmrg# 'none' -- dependencies not supported.
2987e0963edeSmrg# `unknown' -- same as none, but documents that we really don't know.
2988e0963edeSmrg# 'pass_all' -- all dependencies passed with no checks.
2989e0963edeSmrg# 'test_compile' -- check by making test program.
2990e0963edeSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
2991e0963edeSmrg# which responds to the $file_magic_cmd with a given extended regex.
2992e0963edeSmrg# If you have `file' or equivalent on your system and you're not sure
2993e0963edeSmrg# whether `pass_all' will *always* work, you probably want this one.
2994e0963edeSmrg
2995e0963edeSmrgcase $host_os in
2996f05b35a2Smrgaix[[4-9]]*)
2997e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
2998e0963edeSmrg  ;;
2999e0963edeSmrg
3000e0963edeSmrgbeos*)
3001e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3002e0963edeSmrg  ;;
3003e0963edeSmrg
3004e0963edeSmrgbsdi[[45]]*)
3005e0963edeSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3006e0963edeSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3007e0963edeSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3008e0963edeSmrg  ;;
3009e0963edeSmrg
3010e0963edeSmrgcygwin*)
3011e0963edeSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3012e0963edeSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3013e0963edeSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3014e0963edeSmrg  ;;
3015e0963edeSmrg
3016e0963edeSmrgmingw* | pw32*)
3017e0963edeSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3018e0963edeSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3019e0963edeSmrg  # unless we find 'file', for example because we are cross-compiling.
3020e0963edeSmrg  if ( file / ) >/dev/null 2>&1; then
3021e0963edeSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022e0963edeSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3023e0963edeSmrg  else
3024e0963edeSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3025e0963edeSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3026e0963edeSmrg  fi
3027e0963edeSmrg  ;;
3028e0963edeSmrg
3029f05b35a2Smrgcegcc)
3030f05b35a2Smrg  # use the weaker test based on 'objdump'. See mingw*.
3031f05b35a2Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3032f05b35a2Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3033f05b35a2Smrg  ;;
3034f05b35a2Smrg
3035e0963edeSmrgdarwin* | rhapsody*)
3036e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3037e0963edeSmrg  ;;
3038e0963edeSmrg
3039e0963edeSmrgfreebsd* | dragonfly*)
3040f05b35a2Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3041e0963edeSmrg    case $host_cpu in
3042e0963edeSmrg    i*86 )
3043e0963edeSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3044e0963edeSmrg      # Let's accept both of them until this is cleared up.
3045e0963edeSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3046e0963edeSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3047e0963edeSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3048e0963edeSmrg      ;;
3049e0963edeSmrg    esac
3050e0963edeSmrg  else
3051e0963edeSmrg    lt_cv_deplibs_check_method=pass_all
3052e0963edeSmrg  fi
3053e0963edeSmrg  ;;
3054e0963edeSmrg
3055e0963edeSmrggnu*)
3056e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3057e0963edeSmrg  ;;
3058e0963edeSmrg
3059e0963edeSmrghpux10.20* | hpux11*)
3060e0963edeSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3061e0963edeSmrg  case $host_cpu in
3062e0963edeSmrg  ia64*)
3063e0963edeSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3064e0963edeSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3065e0963edeSmrg    ;;
3066e0963edeSmrg  hppa*64*)
3067e0963edeSmrg    [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]']
3068e0963edeSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3069e0963edeSmrg    ;;
3070e0963edeSmrg  *)
3071e0963edeSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3072e0963edeSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3073e0963edeSmrg    ;;
3074e0963edeSmrg  esac
3075e0963edeSmrg  ;;
3076e0963edeSmrg
3077e0963edeSmrginterix[[3-9]]*)
3078e0963edeSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3079e0963edeSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3080e0963edeSmrg  ;;
3081e0963edeSmrg
3082e0963edeSmrgirix5* | irix6* | nonstopux*)
3083e0963edeSmrg  case $LD in
3084e0963edeSmrg  *-32|*"-32 ") libmagic=32-bit;;
3085e0963edeSmrg  *-n32|*"-n32 ") libmagic=N32;;
3086e0963edeSmrg  *-64|*"-64 ") libmagic=64-bit;;
3087e0963edeSmrg  *) libmagic=never-match;;
3088e0963edeSmrg  esac
3089e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3090e0963edeSmrg  ;;
3091e0963edeSmrg
3092e0963edeSmrg# This must be Linux ELF.
3093e0963edeSmrglinux* | k*bsd*-gnu)
3094e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3095e0963edeSmrg  ;;
3096e0963edeSmrg
3097e0963edeSmrgnetbsd*)
3098f05b35a2Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3099e0963edeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3100e0963edeSmrg  else
3101e0963edeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3102e0963edeSmrg  fi
3103e0963edeSmrg  ;;
3104e0963edeSmrg
3105e0963edeSmrgnewos6*)
3106e0963edeSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3107e0963edeSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3108e0963edeSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3109e0963edeSmrg  ;;
3110e0963edeSmrg
3111f05b35a2Smrg*nto* | *qnx*)
3112f05b35a2Smrg  lt_cv_deplibs_check_method=pass_all
3113e0963edeSmrg  ;;
3114e0963edeSmrg
3115e0963edeSmrgopenbsd*)
3116f05b35a2Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3117e0963edeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3118e0963edeSmrg  else
3119e0963edeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3120e0963edeSmrg  fi
3121e0963edeSmrg  ;;
3122e0963edeSmrg
3123e0963edeSmrgosf3* | osf4* | osf5*)
3124e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3125e0963edeSmrg  ;;
3126e0963edeSmrg
3127e0963edeSmrgrdos*)
3128e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3129e0963edeSmrg  ;;
3130e0963edeSmrg
3131e0963edeSmrgsolaris*)
3132e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3133e0963edeSmrg  ;;
3134e0963edeSmrg
3135f05b35a2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3136f05b35a2Smrg  lt_cv_deplibs_check_method=pass_all
3137f05b35a2Smrg  ;;
3138f05b35a2Smrg
3139e0963edeSmrgsysv4 | sysv4.3*)
3140e0963edeSmrg  case $host_vendor in
3141e0963edeSmrg  motorola)
3142e0963edeSmrg    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]]'
3143e0963edeSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3144e0963edeSmrg    ;;
3145e0963edeSmrg  ncr)
3146e0963edeSmrg    lt_cv_deplibs_check_method=pass_all
3147e0963edeSmrg    ;;
3148e0963edeSmrg  sequent)
3149e0963edeSmrg    lt_cv_file_magic_cmd='/bin/file'
3150e0963edeSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3151e0963edeSmrg    ;;
3152e0963edeSmrg  sni)
3153e0963edeSmrg    lt_cv_file_magic_cmd='/bin/file'
3154e0963edeSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3155e0963edeSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3156e0963edeSmrg    ;;
3157e0963edeSmrg  siemens)
3158e0963edeSmrg    lt_cv_deplibs_check_method=pass_all
3159e0963edeSmrg    ;;
3160e0963edeSmrg  pc)
3161e0963edeSmrg    lt_cv_deplibs_check_method=pass_all
3162e0963edeSmrg    ;;
3163e0963edeSmrg  esac
3164e0963edeSmrg  ;;
3165e0963edeSmrg
3166f05b35a2Smrgtpf*)
3167e0963edeSmrg  lt_cv_deplibs_check_method=pass_all
3168e0963edeSmrg  ;;
3169e0963edeSmrgesac
3170e0963edeSmrg])
3171e0963edeSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3172e0963edeSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3173e0963edeSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3174e0963edeSmrg
3175f05b35a2Smrg_LT_DECL([], [deplibs_check_method], [1],
3176f05b35a2Smrg    [Method to check whether dependent libraries are shared objects])
3177f05b35a2Smrg_LT_DECL([], [file_magic_cmd], [1],
3178f05b35a2Smrg    [Command to use when deplibs_check_method == "file_magic"])
3179f05b35a2Smrg])# _LT_CHECK_MAGIC_METHOD
3180e0963edeSmrg
3181f05b35a2Smrg
3182f05b35a2Smrg# LT_PATH_NM
3183e0963edeSmrg# ----------
3184f05b35a2Smrg# find the pathname to a BSD- or MS-compatible name lister
3185f05b35a2SmrgAC_DEFUN([LT_PATH_NM],
3186f05b35a2Smrg[AC_REQUIRE([AC_PROG_CC])dnl
3187f05b35a2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3188e0963edeSmrg[if test -n "$NM"; then
3189e0963edeSmrg  # Let the user override the test.
3190e0963edeSmrg  lt_cv_path_NM="$NM"
3191e0963edeSmrgelse
3192e0963edeSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3193e0963edeSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3194e0963edeSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3195e0963edeSmrg  fi
3196e0963edeSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3197e0963edeSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3198e0963edeSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3199e0963edeSmrg      IFS="$lt_save_ifs"
3200e0963edeSmrg      test -z "$ac_dir" && ac_dir=.
3201e0963edeSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3202e0963edeSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3203e0963edeSmrg	# Check to see if the nm accepts a BSD-compat flag.
3204e0963edeSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3205e0963edeSmrg	#   nm: unknown option "B" ignored
3206e0963edeSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3207e0963edeSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3208e0963edeSmrg	*/dev/null* | *'Invalid file or object type'*)
3209e0963edeSmrg	  lt_cv_path_NM="$tmp_nm -B"
3210e0963edeSmrg	  break
3211e0963edeSmrg	  ;;
3212e0963edeSmrg	*)
3213e0963edeSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3214e0963edeSmrg	  */dev/null*)
3215e0963edeSmrg	    lt_cv_path_NM="$tmp_nm -p"
3216e0963edeSmrg	    break
3217e0963edeSmrg	    ;;
3218e0963edeSmrg	  *)
3219e0963edeSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3220e0963edeSmrg	    continue # so that we can try to find one that supports BSD flags
3221e0963edeSmrg	    ;;
3222e0963edeSmrg	  esac
3223e0963edeSmrg	  ;;
3224e0963edeSmrg	esac
3225e0963edeSmrg      fi
3226e0963edeSmrg    done
3227e0963edeSmrg    IFS="$lt_save_ifs"
3228e0963edeSmrg  done
3229f05b35a2Smrg  : ${lt_cv_path_NM=no}
3230e0963edeSmrgfi])
3231f05b35a2Smrgif test "$lt_cv_path_NM" != "no"; then
3232f05b35a2Smrg  NM="$lt_cv_path_NM"
3233f05b35a2Smrgelse
3234f05b35a2Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3235f05b35a2Smrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3236f05b35a2Smrg  AC_SUBST([DUMPBIN])
3237f05b35a2Smrg  if test "$DUMPBIN" != ":"; then
3238f05b35a2Smrg    NM="$DUMPBIN"
3239f05b35a2Smrg  fi
3240f05b35a2Smrgfi
3241f05b35a2Smrgtest -z "$NM" && NM=nm
3242f05b35a2SmrgAC_SUBST([NM])
3243f05b35a2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3244f05b35a2Smrg
3245f05b35a2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3246f05b35a2Smrg  [lt_cv_nm_interface="BSD nm"
3247f05b35a2Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
3248f05b35a2Smrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3249f05b35a2Smrg  (eval "$ac_compile" 2>conftest.err)
3250f05b35a2Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3251f05b35a2Smrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3252f05b35a2Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3253f05b35a2Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3254f05b35a2Smrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3255f05b35a2Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3256f05b35a2Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3257f05b35a2Smrg    lt_cv_nm_interface="MS dumpbin"
3258f05b35a2Smrg  fi
3259f05b35a2Smrg  rm -f conftest*])
3260f05b35a2Smrg])# LT_PATH_NM
3261e0963edeSmrg
3262f05b35a2Smrg# Old names:
3263f05b35a2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3264f05b35a2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3265f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
3266f05b35a2Smrgdnl AC_DEFUN([AM_PROG_NM], [])
3267f05b35a2Smrgdnl AC_DEFUN([AC_PROG_NM], [])
3268e0963edeSmrg
3269f05b35a2Smrg
3270f05b35a2Smrg# LT_LIB_M
3271f05b35a2Smrg# --------
3272e0963edeSmrg# check for math library
3273f05b35a2SmrgAC_DEFUN([LT_LIB_M],
3274e0963edeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3275e0963edeSmrgLIBM=
3276e0963edeSmrgcase $host in
3277e0963edeSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3278e0963edeSmrg  # These system don't have libm, or don't need it
3279e0963edeSmrg  ;;
3280e0963edeSmrg*-ncr-sysv4.3*)
3281e0963edeSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3282e0963edeSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3283e0963edeSmrg  ;;
3284e0963edeSmrg*)
3285e0963edeSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3286e0963edeSmrg  ;;
3287e0963edeSmrgesac
3288f05b35a2SmrgAC_SUBST([LIBM])
3289f05b35a2Smrg])# LT_LIB_M
3290e0963edeSmrg
3291f05b35a2Smrg# Old name:
3292f05b35a2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3293f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
3294f05b35a2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3295e0963edeSmrg
3296e0963edeSmrg
3297f05b35a2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3298f05b35a2Smrg# -------------------------------
3299f05b35a2Smrgm4_defun([_LT_COMPILER_NO_RTTI],
3300f05b35a2Smrg[m4_require([_LT_TAG_COMPILER])dnl
3301e0963edeSmrg
3302f05b35a2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3303e0963edeSmrg
3304f05b35a2Smrgif test "$GCC" = yes; then
3305f05b35a2Smrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3306e0963edeSmrg
3307f05b35a2Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3308f05b35a2Smrg    lt_cv_prog_compiler_rtti_exceptions,
3309f05b35a2Smrg    [-fno-rtti -fno-exceptions], [],
3310f05b35a2Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3311e0963edeSmrgfi
3312f05b35a2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3313f05b35a2Smrg	[Compiler flag to turn off builtin functions])
3314f05b35a2Smrg])# _LT_COMPILER_NO_RTTI
3315e0963edeSmrg
3316e0963edeSmrg
3317f05b35a2Smrg# _LT_CMD_GLOBAL_SYMBOLS
3318f05b35a2Smrg# ----------------------
3319f05b35a2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3320f05b35a2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3321f05b35a2SmrgAC_REQUIRE([AC_PROG_CC])dnl
3322f05b35a2SmrgAC_REQUIRE([LT_PATH_NM])dnl
3323f05b35a2SmrgAC_REQUIRE([LT_PATH_LD])dnl
3324f05b35a2Smrgm4_require([_LT_DECL_SED])dnl
3325f05b35a2Smrgm4_require([_LT_DECL_EGREP])dnl
3326f05b35a2Smrgm4_require([_LT_TAG_COMPILER])dnl
3327e0963edeSmrg
3328f05b35a2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3329f05b35a2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3330f05b35a2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3331f05b35a2Smrg[
3332f05b35a2Smrg# These are sane defaults that work on at least a few old systems.
3333f05b35a2Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3334e0963edeSmrg
3335f05b35a2Smrg# Character class describing NM global symbol codes.
3336f05b35a2Smrgsymcode='[[BCDEGRST]]'
3337e0963edeSmrg
3338f05b35a2Smrg# Regexp to match symbols that can be accessed directly from C.
3339f05b35a2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3340e0963edeSmrg
3341f05b35a2Smrg# Define system-specific variables.
3342e0963edeSmrgcase $host_os in
3343f05b35a2Smrgaix*)
3344f05b35a2Smrg  symcode='[[BCDT]]'
3345f05b35a2Smrg  ;;
3346f05b35a2Smrgcygwin* | mingw* | pw32* | cegcc*)
3347f05b35a2Smrg  symcode='[[ABCDGISTW]]'
3348f05b35a2Smrg  ;;
3349f05b35a2Smrghpux*)
3350f05b35a2Smrg  if test "$host_cpu" = ia64; then
3351f05b35a2Smrg    symcode='[[ABCDEGRST]]'
3352e0963edeSmrg  fi
3353e0963edeSmrg  ;;
3354f05b35a2Smrgirix* | nonstopux*)
3355f05b35a2Smrg  symcode='[[BCDEGRST]]'
3356f05b35a2Smrg  ;;
3357f05b35a2Smrgosf*)
3358f05b35a2Smrg  symcode='[[BCDEGQRST]]'
3359f05b35a2Smrg  ;;
3360f05b35a2Smrgsolaris*)
3361f05b35a2Smrg  symcode='[[BDRT]]'
3362f05b35a2Smrg  ;;
3363f05b35a2Smrgsco3.2v5*)
3364f05b35a2Smrg  symcode='[[DT]]'
3365f05b35a2Smrg  ;;
3366f05b35a2Smrgsysv4.2uw2*)
3367f05b35a2Smrg  symcode='[[DT]]'
3368f05b35a2Smrg  ;;
3369f05b35a2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3370f05b35a2Smrg  symcode='[[ABDT]]'
3371f05b35a2Smrg  ;;
3372f05b35a2Smrgsysv4)
3373f05b35a2Smrg  symcode='[[DFNSTU]]'
3374f05b35a2Smrg  ;;
3375e0963edeSmrgesac
3376e0963edeSmrg
3377f05b35a2Smrg# If we're using GNU nm, then use its standard symbol codes.
3378f05b35a2Smrgcase `$NM -V 2>&1` in
3379f05b35a2Smrg*GNU* | *'with BFD'*)
3380f05b35a2Smrg  symcode='[[ABCDGIRSTW]]' ;;
3381f05b35a2Smrgesac
3382e0963edeSmrg
3383f05b35a2Smrg# Transform an extracted symbol line into a proper C declaration.
3384f05b35a2Smrg# Some systems (esp. on ia64) link data and code symbols differently,
3385f05b35a2Smrg# so use this general approach.
3386f05b35a2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3387e0963edeSmrg
3388f05b35a2Smrg# Transform an extracted symbol line into symbol name and symbol address
3389f05b35a2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3390f05b35a2Smrglt_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'"
3391e0963edeSmrg
3392f05b35a2Smrg# Handle CRLF in mingw tool chain
3393f05b35a2Smrgopt_cr=
3394f05b35a2Smrgcase $build_os in
3395f05b35a2Smrgmingw*)
3396f05b35a2Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3397f05b35a2Smrg  ;;
3398f05b35a2Smrgesac
3399e0963edeSmrg
3400f05b35a2Smrg# Try without a prefix underscore, then with it.
3401f05b35a2Smrgfor ac_symprfx in "" "_"; do
3402e0963edeSmrg
3403f05b35a2Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3404f05b35a2Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3405e0963edeSmrg
3406f05b35a2Smrg  # Write the raw and C identifiers.
3407f05b35a2Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3408f05b35a2Smrg    # Fake it for dumpbin and say T for any non-static function
3409f05b35a2Smrg    # and D for any global variable.
3410f05b35a2Smrg    # Also find C++ and __fastcall symbols from MSVC++,
3411f05b35a2Smrg    # which start with @ or ?.
3412f05b35a2Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3413f05b35a2Smrg"     {last_section=section; section=\$ 3};"\
3414f05b35a2Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3415f05b35a2Smrg"     \$ 0!~/External *\|/{next};"\
3416f05b35a2Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3417f05b35a2Smrg"     {if(hide[section]) next};"\
3418f05b35a2Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3419f05b35a2Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3420f05b35a2Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3421f05b35a2Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3422f05b35a2Smrg"     ' prfx=^$ac_symprfx]"
3423f05b35a2Smrg  else
3424f05b35a2Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3425f05b35a2Smrg  fi
3426e0963edeSmrg
3427f05b35a2Smrg  # Check to see that the pipe works correctly.
3428f05b35a2Smrg  pipe_works=no
3429e0963edeSmrg
3430f05b35a2Smrg  rm -f conftest*
3431f05b35a2Smrg  cat > conftest.$ac_ext <<_LT_EOF
3432f05b35a2Smrg#ifdef __cplusplus
3433f05b35a2Smrgextern "C" {
3434f05b35a2Smrg#endif
3435f05b35a2Smrgchar nm_test_var;
3436f05b35a2Smrgvoid nm_test_func(void);
3437f05b35a2Smrgvoid nm_test_func(void){}
3438f05b35a2Smrg#ifdef __cplusplus
3439f05b35a2Smrg}
3440f05b35a2Smrg#endif
3441f05b35a2Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
3442f05b35a2Smrg_LT_EOF
3443e0963edeSmrg
3444f05b35a2Smrg  if AC_TRY_EVAL(ac_compile); then
3445f05b35a2Smrg    # Now try to grab the symbols.
3446f05b35a2Smrg    nlist=conftest.nm
3447f05b35a2Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3448f05b35a2Smrg      # Try sorting and uniquifying the output.
3449f05b35a2Smrg      if sort "$nlist" | uniq > "$nlist"T; then
3450f05b35a2Smrg	mv -f "$nlist"T "$nlist"
3451f05b35a2Smrg      else
3452f05b35a2Smrg	rm -f "$nlist"T
3453f05b35a2Smrg      fi
3454e0963edeSmrg
3455f05b35a2Smrg      # Make sure that we snagged all the symbols we need.
3456f05b35a2Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3457f05b35a2Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3458f05b35a2Smrg	  cat <<_LT_EOF > conftest.$ac_ext
3459f05b35a2Smrg#ifdef __cplusplus
3460f05b35a2Smrgextern "C" {
3461f05b35a2Smrg#endif
3462e0963edeSmrg
3463f05b35a2Smrg_LT_EOF
3464f05b35a2Smrg	  # Now generate the symbol file.
3465f05b35a2Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3466e0963edeSmrg
3467f05b35a2Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
3468e0963edeSmrg
3469f05b35a2Smrg/* The mapping between symbol names and symbols.  */
3470f05b35a2Smrgconst struct {
3471f05b35a2Smrg  const char *name;
3472f05b35a2Smrg  void       *address;
3473f05b35a2Smrg}
3474f05b35a2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3475f05b35a2Smrg{
3476f05b35a2Smrg  { "@PROGRAM@", (void *) 0 },
3477f05b35a2Smrg_LT_EOF
3478f05b35a2Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3479f05b35a2Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3480f05b35a2Smrg  {0, (void *) 0}
3481f05b35a2Smrg};
3482e0963edeSmrg
3483f05b35a2Smrg/* This works around a problem in FreeBSD linker */
3484f05b35a2Smrg#ifdef FREEBSD_WORKAROUND
3485f05b35a2Smrgstatic const void *lt_preloaded_setup() {
3486f05b35a2Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
3487f05b35a2Smrg}
3488f05b35a2Smrg#endif
3489e0963edeSmrg
3490f05b35a2Smrg#ifdef __cplusplus
3491f05b35a2Smrg}
3492f05b35a2Smrg#endif
3493f05b35a2Smrg_LT_EOF
3494f05b35a2Smrg	  # Now try linking the two files.
3495f05b35a2Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
3496f05b35a2Smrg	  lt_save_LIBS="$LIBS"
3497f05b35a2Smrg	  lt_save_CFLAGS="$CFLAGS"
3498f05b35a2Smrg	  LIBS="conftstm.$ac_objext"
3499f05b35a2Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3500f05b35a2Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3501f05b35a2Smrg	    pipe_works=yes
3502f05b35a2Smrg	  fi
3503f05b35a2Smrg	  LIBS="$lt_save_LIBS"
3504f05b35a2Smrg	  CFLAGS="$lt_save_CFLAGS"
3505f05b35a2Smrg	else
3506f05b35a2Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3507f05b35a2Smrg	fi
3508f05b35a2Smrg      else
3509f05b35a2Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3510f05b35a2Smrg      fi
3511e0963edeSmrg    else
3512f05b35a2Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3513e0963edeSmrg    fi
3514e0963edeSmrg  else
3515f05b35a2Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3516f05b35a2Smrg    cat conftest.$ac_ext >&5
3517e0963edeSmrg  fi
3518f05b35a2Smrg  rm -rf conftest* conftst*
3519e0963edeSmrg
3520f05b35a2Smrg  # Do not use the global_symbol_pipe unless it works.
3521f05b35a2Smrg  if test "$pipe_works" = yes; then
3522f05b35a2Smrg    break
3523f05b35a2Smrg  else
3524f05b35a2Smrg    lt_cv_sys_global_symbol_pipe=
3525f05b35a2Smrg  fi
3526f05b35a2Smrgdone
3527f05b35a2Smrg])
3528f05b35a2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3529f05b35a2Smrg  lt_cv_sys_global_symbol_to_cdecl=
3530f05b35a2Smrgfi
3531f05b35a2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3532f05b35a2Smrg  AC_MSG_RESULT(failed)
3533e0963edeSmrgelse
3534f05b35a2Smrg  AC_MSG_RESULT(ok)
3535e0963edeSmrgfi
3536e0963edeSmrg
3537f05b35a2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3538f05b35a2Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
3539f05b35a2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3540f05b35a2Smrg    [Transform the output of nm in a proper C declaration])
3541f05b35a2Smrg_LT_DECL([global_symbol_to_c_name_address],
3542f05b35a2Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3543f05b35a2Smrg    [Transform the output of nm in a C name address pair])
3544f05b35a2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3545f05b35a2Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3546f05b35a2Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3547f05b35a2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
3548e0963edeSmrg
3549e0963edeSmrg
3550f05b35a2Smrg# _LT_COMPILER_PIC([TAGNAME])
3551f05b35a2Smrg# ---------------------------
3552f05b35a2Smrgm4_defun([_LT_COMPILER_PIC],
3553f05b35a2Smrg[m4_require([_LT_TAG_COMPILER])dnl
3554f05b35a2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3555f05b35a2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3556f05b35a2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3557e0963edeSmrg
3558f05b35a2SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3559f05b35a2Smrgm4_if([$1], [CXX], [
3560f05b35a2Smrg  # C++ specific cases for pic, static, wl, etc.
3561f05b35a2Smrg  if test "$GXX" = yes; then
3562f05b35a2Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563f05b35a2Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3564e0963edeSmrg
3565f05b35a2Smrg    case $host_os in
3566f05b35a2Smrg    aix*)
3567f05b35a2Smrg      # All AIX code is PIC.
3568e0963edeSmrg      if test "$host_cpu" = ia64; then
3569f05b35a2Smrg	# AIX 5 now supports IA64 processor
3570f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3571e0963edeSmrg      fi
3572e0963edeSmrg      ;;
3573e0963edeSmrg
3574f05b35a2Smrg    amigaos*)
3575e0963edeSmrg      case $host_cpu in
3576f05b35a2Smrg      powerpc)
3577f05b35a2Smrg            # see comment about AmigaOS4 .so support
3578f05b35a2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3579f05b35a2Smrg        ;;
3580f05b35a2Smrg      m68k)
3581f05b35a2Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
3582f05b35a2Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
3583f05b35a2Smrg            # like `-m68040'.
3584f05b35a2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3585e0963edeSmrg        ;;
3586e0963edeSmrg      esac
3587e0963edeSmrg      ;;
3588f05b35a2Smrg
3589f05b35a2Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3590f05b35a2Smrg      # PIC is the default for these OSes.
3591f05b35a2Smrg      ;;
3592f05b35a2Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3593f05b35a2Smrg      # This hack is so that the source file can tell whether it is being
3594f05b35a2Smrg      # built for inclusion in a dll (and should export symbols for example).
3595f05b35a2Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3596f05b35a2Smrg      # (--disable-auto-import) libraries
3597f05b35a2Smrg      m4_if([$1], [GCJ], [],
3598f05b35a2Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3599f05b35a2Smrg      ;;
3600f05b35a2Smrg    darwin* | rhapsody*)
3601f05b35a2Smrg      # PIC is the default on this platform
3602f05b35a2Smrg      # Common symbols not allowed in MH_DYLIB files
3603f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3604f05b35a2Smrg      ;;
3605f05b35a2Smrg    *djgpp*)
3606f05b35a2Smrg      # DJGPP does not support shared libraries at all
3607f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3608f05b35a2Smrg      ;;
3609f05b35a2Smrg    interix[[3-9]]*)
3610f05b35a2Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3611f05b35a2Smrg      # Instead, we relocate shared libraries at runtime.
3612f05b35a2Smrg      ;;
3613f05b35a2Smrg    sysv4*MP*)
3614f05b35a2Smrg      if test -d /usr/nec; then
3615f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3616f05b35a2Smrg      fi
3617f05b35a2Smrg      ;;
3618f05b35a2Smrg    hpux*)
3619f05b35a2Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3620f05b35a2Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3621f05b35a2Smrg      # sets the default TLS model and affects inlining.
3622f05b35a2Smrg      case $host_cpu in
3623f05b35a2Smrg      hppa*64*)
3624f05b35a2Smrg	;;
3625f05b35a2Smrg      *)
3626f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3627f05b35a2Smrg	;;
3628f05b35a2Smrg      esac
3629f05b35a2Smrg      ;;
3630f05b35a2Smrg    *qnx* | *nto*)
3631f05b35a2Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3632f05b35a2Smrg      # it will coredump.
3633f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3634f05b35a2Smrg      ;;
3635f05b35a2Smrg    *)
3636f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3637e0963edeSmrg      ;;
3638e0963edeSmrg    esac
3639f05b35a2Smrg  else
3640f05b35a2Smrg    case $host_os in
3641f05b35a2Smrg      aix[[4-9]]*)
3642f05b35a2Smrg	# All AIX code is PIC.
3643f05b35a2Smrg	if test "$host_cpu" = ia64; then
3644f05b35a2Smrg	  # AIX 5 now supports IA64 processor
3645f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3646f05b35a2Smrg	else
3647f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3648f05b35a2Smrg	fi
3649e0963edeSmrg	;;
3650f05b35a2Smrg      chorus*)
3651f05b35a2Smrg	case $cc_basename in
3652f05b35a2Smrg	cxch68*)
3653f05b35a2Smrg	  # Green Hills C++ Compiler
3654f05b35a2Smrg	  # _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"
3655e0963edeSmrg	  ;;
3656e0963edeSmrg	esac
3657e0963edeSmrg	;;
3658f05b35a2Smrg      dgux*)
3659f05b35a2Smrg	case $cc_basename in
3660f05b35a2Smrg	  ec++*)
3661f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3662f05b35a2Smrg	    ;;
3663f05b35a2Smrg	  ghcx*)
3664f05b35a2Smrg	    # Green Hills C++ Compiler
3665f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3666f05b35a2Smrg	    ;;
3667f05b35a2Smrg	  *)
3668f05b35a2Smrg	    ;;
3669f05b35a2Smrg	esac
3670f05b35a2Smrg	;;
3671f05b35a2Smrg      freebsd* | dragonfly*)
3672f05b35a2Smrg	# FreeBSD uses GNU C++
3673f05b35a2Smrg	;;
3674f05b35a2Smrg      hpux9* | hpux10* | hpux11*)
3675f05b35a2Smrg	case $cc_basename in
3676f05b35a2Smrg	  CC*)
3677f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3679f05b35a2Smrg	    if test "$host_cpu" != ia64; then
3680f05b35a2Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3681f05b35a2Smrg	    fi
3682f05b35a2Smrg	    ;;
3683f05b35a2Smrg	  aCC*)
3684f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3685f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3686e0963edeSmrg	    case $host_cpu in
3687f05b35a2Smrg	    hppa*64*|ia64*)
3688f05b35a2Smrg	      # +Z the default
3689e0963edeSmrg	      ;;
3690e0963edeSmrg	    *)
3691f05b35a2Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3692e0963edeSmrg	      ;;
3693e0963edeSmrg	    esac
3694f05b35a2Smrg	    ;;
3695f05b35a2Smrg	  *)
3696f05b35a2Smrg	    ;;
3697e0963edeSmrg	esac
3698e0963edeSmrg	;;
3699f05b35a2Smrg      interix*)
3700f05b35a2Smrg	# This is c89, which is MS Visual C++ (no shared libs)
3701f05b35a2Smrg	# Anyone wants to do a port?
3702e0963edeSmrg	;;
3703f05b35a2Smrg      irix5* | irix6* | nonstopux*)
3704f05b35a2Smrg	case $cc_basename in
3705f05b35a2Smrg	  CC*)
3706f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3708f05b35a2Smrg	    # CC pic flag -KPIC is the default.
3709f05b35a2Smrg	    ;;
3710f05b35a2Smrg	  *)
3711f05b35a2Smrg	    ;;
3712e0963edeSmrg	esac
3713e0963edeSmrg	;;
3714f05b35a2Smrg      linux* | k*bsd*-gnu)
3715f05b35a2Smrg	case $cc_basename in
3716f05b35a2Smrg	  KCC*)
3717f05b35a2Smrg	    # KAI C++ Compiler
3718f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3719f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3720f05b35a2Smrg	    ;;
3721f05b35a2Smrg	  ecpc* )
3722f05b35a2Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3723f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3724f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3725f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3726f05b35a2Smrg	    ;;
3727f05b35a2Smrg	  icpc* )
3728f05b35a2Smrg	    # Intel C++, used to be incompatible with GCC.
3729f05b35a2Smrg	    # ICC 10 doesn't accept -KPIC any more.
3730f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3732f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3733f05b35a2Smrg	    ;;
3734f05b35a2Smrg	  pgCC* | pgcpp*)
3735f05b35a2Smrg	    # Portland Group C++ compiler
3736f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3737f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3738f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739f05b35a2Smrg	    ;;
3740f05b35a2Smrg	  cxx*)
3741f05b35a2Smrg	    # Compaq C++
3742f05b35a2Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3743f05b35a2Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3744f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3745f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3746f05b35a2Smrg	    ;;
3747f05b35a2Smrg	  xlc* | xlC*)
3748f05b35a2Smrg	    # IBM XL 8.0 on PPC
3749f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3750f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3751f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3752f05b35a2Smrg	    ;;
3753f05b35a2Smrg	  *)
3754f05b35a2Smrg	    case `$CC -V 2>&1 | sed 5q` in
3755f05b35a2Smrg	    *Sun\ C*)
3756f05b35a2Smrg	      # Sun C++ 5.9
3757f05b35a2Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3758f05b35a2Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759f05b35a2Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3760f05b35a2Smrg	      ;;
3761f05b35a2Smrg	    esac
3762f05b35a2Smrg	    ;;
3763f05b35a2Smrg	esac
3764e0963edeSmrg	;;
3765f05b35a2Smrg      lynxos*)
3766e0963edeSmrg	;;
3767f05b35a2Smrg      m88k*)
3768e0963edeSmrg	;;
3769f05b35a2Smrg      mvs*)
3770f05b35a2Smrg	case $cc_basename in
3771f05b35a2Smrg	  cxx*)
3772f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3773f05b35a2Smrg	    ;;
3774f05b35a2Smrg	  *)
3775f05b35a2Smrg	    ;;
3776f05b35a2Smrg	esac
3777e0963edeSmrg	;;
3778f05b35a2Smrg      netbsd*)
3779e0963edeSmrg	;;
3780f05b35a2Smrg      *qnx* | *nto*)
3781f05b35a2Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3782f05b35a2Smrg        # it will coredump.
3783f05b35a2Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3784f05b35a2Smrg        ;;
3785f05b35a2Smrg      osf3* | osf4* | osf5*)
3786f05b35a2Smrg	case $cc_basename in
3787f05b35a2Smrg	  KCC*)
3788f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3789f05b35a2Smrg	    ;;
3790f05b35a2Smrg	  RCC*)
3791f05b35a2Smrg	    # Rational C++ 2.4.1
3792f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3793f05b35a2Smrg	    ;;
3794f05b35a2Smrg	  cxx*)
3795f05b35a2Smrg	    # Digital/Compaq C++
3796f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3797f05b35a2Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3798f05b35a2Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3799f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3800f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3801f05b35a2Smrg	    ;;
3802f05b35a2Smrg	  *)
3803f05b35a2Smrg	    ;;
3804f05b35a2Smrg	esac
3805e0963edeSmrg	;;
3806f05b35a2Smrg      psos*)
3807e0963edeSmrg	;;
3808f05b35a2Smrg      solaris*)
3809f05b35a2Smrg	case $cc_basename in
3810f05b35a2Smrg	  CC*)
3811f05b35a2Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
3812f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3813f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3814f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3815f05b35a2Smrg	    ;;
3816f05b35a2Smrg	  gcx*)
3817f05b35a2Smrg	    # Green Hills C++ Compiler
3818f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3819f05b35a2Smrg	    ;;
3820f05b35a2Smrg	  *)
3821f05b35a2Smrg	    ;;
3822f05b35a2Smrg	esac
3823e0963edeSmrg	;;
3824f05b35a2Smrg      sunos4*)
3825f05b35a2Smrg	case $cc_basename in
3826f05b35a2Smrg	  CC*)
3827f05b35a2Smrg	    # Sun C++ 4.x
3828f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3829f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3830f05b35a2Smrg	    ;;
3831f05b35a2Smrg	  lcc*)
3832f05b35a2Smrg	    # Lucid
3833f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3834f05b35a2Smrg	    ;;
3835f05b35a2Smrg	  *)
3836f05b35a2Smrg	    ;;
3837f05b35a2Smrg	esac
3838e0963edeSmrg	;;
3839f05b35a2Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3840f05b35a2Smrg	case $cc_basename in
3841f05b35a2Smrg	  CC*)
3842f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3843f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3844f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3845f05b35a2Smrg	    ;;
3846f05b35a2Smrg	esac
3847e0963edeSmrg	;;
3848f05b35a2Smrg      tandem*)
3849f05b35a2Smrg	case $cc_basename in
3850f05b35a2Smrg	  NCC*)
3851f05b35a2Smrg	    # NonStop-UX NCC 3.20
3852f05b35a2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853f05b35a2Smrg	    ;;
3854e0963edeSmrg	  *)
3855e0963edeSmrg	    ;;
3856e0963edeSmrg	esac
3857e0963edeSmrg	;;
3858f05b35a2Smrg      vxworks*)
3859e0963edeSmrg	;;
3860e0963edeSmrg      *)
3861f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3862f05b35a2Smrg	;;
3863f05b35a2Smrg    esac
3864f05b35a2Smrg  fi
3865f05b35a2Smrg],
3866f05b35a2Smrg[
3867f05b35a2Smrg  if test "$GCC" = yes; then
3868f05b35a2Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3869f05b35a2Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3870e0963edeSmrg
3871f05b35a2Smrg    case $host_os in
3872f05b35a2Smrg      aix*)
3873f05b35a2Smrg      # All AIX code is PIC.
3874f05b35a2Smrg      if test "$host_cpu" = ia64; then
3875f05b35a2Smrg	# AIX 5 now supports IA64 processor
3876f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3877f05b35a2Smrg      fi
3878f05b35a2Smrg      ;;
3879e0963edeSmrg
3880f05b35a2Smrg    amigaos*)
3881f05b35a2Smrg      case $host_cpu in
3882f05b35a2Smrg      powerpc)
3883f05b35a2Smrg            # see comment about AmigaOS4 .so support
3884f05b35a2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3885f05b35a2Smrg        ;;
3886f05b35a2Smrg      m68k)
3887f05b35a2Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
3888f05b35a2Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
3889f05b35a2Smrg            # like `-m68040'.
3890f05b35a2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3891f05b35a2Smrg        ;;
3892f05b35a2Smrg      esac
3893f05b35a2Smrg      ;;
3894e0963edeSmrg
3895f05b35a2Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3896f05b35a2Smrg      # PIC is the default for these OSes.
3897f05b35a2Smrg      ;;
3898f05b35a2Smrg
3899f05b35a2Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3900f05b35a2Smrg      # This hack is so that the source file can tell whether it is being
3901f05b35a2Smrg      # built for inclusion in a dll (and should export symbols for example).
3902f05b35a2Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3903f05b35a2Smrg      # (--disable-auto-import) libraries
3904f05b35a2Smrg      m4_if([$1], [GCJ], [],
3905f05b35a2Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3906f05b35a2Smrg      ;;
3907f05b35a2Smrg
3908f05b35a2Smrg    darwin* | rhapsody*)
3909f05b35a2Smrg      # PIC is the default on this platform
3910f05b35a2Smrg      # Common symbols not allowed in MH_DYLIB files
3911f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3912f05b35a2Smrg      ;;
3913f05b35a2Smrg
3914f05b35a2Smrg    hpux*)
3915f05b35a2Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3916f05b35a2Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3917f05b35a2Smrg      # sets the default TLS model and affects inlining.
3918f05b35a2Smrg      case $host_cpu in
3919f05b35a2Smrg      hppa*64*)
3920f05b35a2Smrg	# +Z the default
3921e0963edeSmrg	;;
3922e0963edeSmrg      *)
3923f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3924e0963edeSmrg	;;
3925f05b35a2Smrg      esac
3926f05b35a2Smrg      ;;
3927f05b35a2Smrg
3928f05b35a2Smrg    interix[[3-9]]*)
3929f05b35a2Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3930f05b35a2Smrg      # Instead, we relocate shared libraries at runtime.
3931f05b35a2Smrg      ;;
3932f05b35a2Smrg
3933f05b35a2Smrg    msdosdjgpp*)
3934f05b35a2Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3935f05b35a2Smrg      # on systems that don't support them.
3936f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3937f05b35a2Smrg      enable_shared=no
3938f05b35a2Smrg      ;;
3939f05b35a2Smrg
3940f05b35a2Smrg    *nto* | *qnx*)
3941f05b35a2Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3942f05b35a2Smrg      # it will coredump.
3943f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3944f05b35a2Smrg      ;;
3945f05b35a2Smrg
3946f05b35a2Smrg    sysv4*MP*)
3947f05b35a2Smrg      if test -d /usr/nec; then
3948f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3949f05b35a2Smrg      fi
3950f05b35a2Smrg      ;;
3951f05b35a2Smrg
3952f05b35a2Smrg    *)
3953f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3954f05b35a2Smrg      ;;
3955e0963edeSmrg    esac
3956f05b35a2Smrg  else
3957f05b35a2Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
3958f05b35a2Smrg    case $host_os in
3959f05b35a2Smrg    aix*)
3960f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3961f05b35a2Smrg      if test "$host_cpu" = ia64; then
3962f05b35a2Smrg	# AIX 5 now supports IA64 processor
3963f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3964f05b35a2Smrg      else
3965f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3966f05b35a2Smrg      fi
3967f05b35a2Smrg      ;;
3968f05b35a2Smrg
3969f05b35a2Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3970f05b35a2Smrg      # This hack is so that the source file can tell whether it is being
3971f05b35a2Smrg      # built for inclusion in a dll (and should export symbols for example).
3972f05b35a2Smrg      m4_if([$1], [GCJ], [],
3973f05b35a2Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3974f05b35a2Smrg      ;;
3975f05b35a2Smrg
3976f05b35a2Smrg    hpux9* | hpux10* | hpux11*)
3977f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3978f05b35a2Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3979f05b35a2Smrg      # not for PA HP-UX.
3980f05b35a2Smrg      case $host_cpu in
3981f05b35a2Smrg      hppa*64*|ia64*)
3982f05b35a2Smrg	# +Z the default
3983e0963edeSmrg	;;
3984e0963edeSmrg      *)
3985f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3986e0963edeSmrg	;;
3987f05b35a2Smrg      esac
3988f05b35a2Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3989f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3990f05b35a2Smrg      ;;
3991f05b35a2Smrg
3992f05b35a2Smrg    irix5* | irix6* | nonstopux*)
3993f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3994f05b35a2Smrg      # PIC (with -KPIC) is the default.
3995f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3996f05b35a2Smrg      ;;
3997f05b35a2Smrg
3998f05b35a2Smrg    linux* | k*bsd*-gnu)
3999f05b35a2Smrg      case $cc_basename in
4000f05b35a2Smrg      # old Intel for x86_64 which still supported -KPIC.
4001f05b35a2Smrg      ecc*)
4002f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4004f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4005f05b35a2Smrg        ;;
4006f05b35a2Smrg      # icc used to be incompatible with GCC.
4007f05b35a2Smrg      # ICC 10 doesn't accept -KPIC any more.
4008f05b35a2Smrg      icc* | ifort*)
4009f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4011f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4012f05b35a2Smrg        ;;
4013f05b35a2Smrg      # Lahey Fortran 8.1.
4014f05b35a2Smrg      lf95*)
4015f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4016f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4017f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4018f05b35a2Smrg	;;
4019f05b35a2Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
4020f05b35a2Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4021f05b35a2Smrg	# which looks to be a dead project)
4022f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4023f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4024f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4025f05b35a2Smrg        ;;
4026f05b35a2Smrg      ccc*)
4027f05b35a2Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028f05b35a2Smrg        # All Alpha code is PIC.
4029f05b35a2Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4030f05b35a2Smrg        ;;
4031f05b35a2Smrg      xl*)
4032f05b35a2Smrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4033f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4034f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4035f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4036e0963edeSmrg	;;
4037e0963edeSmrg      *)
4038f05b35a2Smrg	case `$CC -V 2>&1 | sed 5q` in
4039f05b35a2Smrg	*Sun\ C*)
4040f05b35a2Smrg	  # Sun C 5.9
4041f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044f05b35a2Smrg	  ;;
4045f05b35a2Smrg	*Sun\ F*)
4046f05b35a2Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4047f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4048f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4049f05b35a2Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4050f05b35a2Smrg	  ;;
4051f05b35a2Smrg	esac
4052e0963edeSmrg	;;
4053f05b35a2Smrg      esac
4054f05b35a2Smrg      ;;
4055e0963edeSmrg
4056f05b35a2Smrg    newsos6)
4057f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4058f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059f05b35a2Smrg      ;;
4060e0963edeSmrg
4061f05b35a2Smrg    *nto* | *qnx*)
4062f05b35a2Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4063f05b35a2Smrg      # it will coredump.
4064f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4065f05b35a2Smrg      ;;
4066e0963edeSmrg
4067f05b35a2Smrg    osf3* | osf4* | osf5*)
4068f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4069f05b35a2Smrg      # All OSF/1 code is PIC.
4070f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4071f05b35a2Smrg      ;;
4072e0963edeSmrg
4073f05b35a2Smrg    rdos*)
4074f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4075f05b35a2Smrg      ;;
4076e0963edeSmrg
4077f05b35a2Smrg    solaris*)
4078f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4079f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4080f05b35a2Smrg      case $cc_basename in
4081f05b35a2Smrg      f77* | f90* | f95*)
4082f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4083f05b35a2Smrg      *)
4084f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4085f05b35a2Smrg      esac
4086f05b35a2Smrg      ;;
4087e0963edeSmrg
4088f05b35a2Smrg    sunos4*)
4089f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4091f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092f05b35a2Smrg      ;;
4093e0963edeSmrg
4094f05b35a2Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4095f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4096f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4097f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098f05b35a2Smrg      ;;
4099e0963edeSmrg
4100f05b35a2Smrg    sysv4*MP*)
4101f05b35a2Smrg      if test -d /usr/nec ;then
4102f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4103f05b35a2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4104f05b35a2Smrg      fi
4105f05b35a2Smrg      ;;
4106e0963edeSmrg
4107f05b35a2Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4108f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4110f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4111f05b35a2Smrg      ;;
4112e0963edeSmrg
4113f05b35a2Smrg    unicos*)
4114f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4116f05b35a2Smrg      ;;
4117e0963edeSmrg
4118f05b35a2Smrg    uts4*)
4119f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4120f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4121f05b35a2Smrg      ;;
4122e0963edeSmrg
4123f05b35a2Smrg    *)
4124f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4125f05b35a2Smrg      ;;
4126e0963edeSmrg    esac
4127f05b35a2Smrg  fi
4128f05b35a2Smrg])
4129f05b35a2Smrgcase $host_os in
4130f05b35a2Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
4131f05b35a2Smrg  *djgpp*)
4132f05b35a2Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4133f05b35a2Smrg    ;;
4134f05b35a2Smrg  *)
4135f05b35a2Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4136f05b35a2Smrg    ;;
4137f05b35a2Smrgesac
4138f05b35a2SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4139f05b35a2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4140f05b35a2Smrg	[How to pass a linker flag through the compiler])
4141e0963edeSmrg
4142f05b35a2Smrg#
4143f05b35a2Smrg# Check to make sure the PIC flag actually works.
4144f05b35a2Smrg#
4145f05b35a2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4146f05b35a2Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4147f05b35a2Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4148f05b35a2Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4149f05b35a2Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4150f05b35a2Smrg     "" | " "*) ;;
4151f05b35a2Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4152f05b35a2Smrg     esac],
4153f05b35a2Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4154f05b35a2Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4155f05b35a2Smrgfi
4156f05b35a2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4157f05b35a2Smrg	[Additional compiler flags for building library objects])
4158e0963edeSmrg
4159f05b35a2Smrg#
4160f05b35a2Smrg# Check to make sure the static flag actually works.
4161f05b35a2Smrg#
4162f05b35a2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4163f05b35a2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4164f05b35a2Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4165f05b35a2Smrg  $lt_tmp_static_flag,
4166f05b35a2Smrg  [],
4167f05b35a2Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4168f05b35a2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4169f05b35a2Smrg	[Compiler flag to prevent dynamic linking])
4170f05b35a2Smrg])# _LT_COMPILER_PIC
4171e0963edeSmrg
4172e0963edeSmrg
4173f05b35a2Smrg# _LT_LINKER_SHLIBS([TAGNAME])
4174f05b35a2Smrg# ----------------------------
4175f05b35a2Smrg# See if the linker supports building shared libraries.
4176f05b35a2Smrgm4_defun([_LT_LINKER_SHLIBS],
4177f05b35a2Smrg[AC_REQUIRE([LT_PATH_LD])dnl
4178f05b35a2SmrgAC_REQUIRE([LT_PATH_NM])dnl
4179f05b35a2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4180f05b35a2Smrgm4_require([_LT_DECL_EGREP])dnl
4181f05b35a2Smrgm4_require([_LT_DECL_SED])dnl
4182f05b35a2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4183f05b35a2Smrgm4_require([_LT_TAG_COMPILER])dnl
4184f05b35a2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4185f05b35a2Smrgm4_if([$1], [CXX], [
4186f05b35a2Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4187f05b35a2Smrg  case $host_os in
4188f05b35a2Smrg  aix[[4-9]]*)
4189f05b35a2Smrg    # If we're using GNU nm, then we don't want the "-C" option.
4190f05b35a2Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4191f05b35a2Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4192f05b35a2Smrg      _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'
4193f05b35a2Smrg    else
4194f05b35a2Smrg      _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'
4195e0963edeSmrg    fi
4196e0963edeSmrg    ;;
4197f05b35a2Smrg  pw32*)
4198f05b35a2Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4199e0963edeSmrg  ;;
4200f05b35a2Smrg  cygwin* | mingw* | cegcc*)
4201f05b35a2Smrg    _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'
4202f05b35a2Smrg  ;;
4203f05b35a2Smrg  *)
4204f05b35a2Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4205f05b35a2Smrg  ;;
4206f05b35a2Smrg  esac
4207f05b35a2Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4208f05b35a2Smrg], [
4209f05b35a2Smrg  runpath_var=
4210f05b35a2Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4211f05b35a2Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
4212f05b35a2Smrg  _LT_TAGVAR(archive_cmds, $1)=
4213f05b35a2Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4214f05b35a2Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4215f05b35a2Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4216f05b35a2Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4217f05b35a2Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4218f05b35a2Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4219f05b35a2Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
4220f05b35a2Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4221f05b35a2Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4222f05b35a2Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4223f05b35a2Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4224f05b35a2Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4225f05b35a2Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4226f05b35a2Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
4227f05b35a2Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4228f05b35a2Smrg  _LT_TAGVAR(module_cmds, $1)=
4229f05b35a2Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4230f05b35a2Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4231f05b35a2Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4232f05b35a2Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4233f05b35a2Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4234f05b35a2Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
4235f05b35a2Smrg  # included in the symbol list
4236f05b35a2Smrg  _LT_TAGVAR(include_expsyms, $1)=
4237f05b35a2Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4238f05b35a2Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4239f05b35a2Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4240f05b35a2Smrg  # as well as any symbol that contains `d'.
4241f05b35a2Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4242f05b35a2Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4243f05b35a2Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4244f05b35a2Smrg  # the symbol is explicitly referenced.  Since portable code cannot
4245f05b35a2Smrg  # rely on this symbol name, it's probably fine to never include it in
4246f05b35a2Smrg  # preloaded symbol tables.
4247f05b35a2Smrg  # Exclude shared library initialization/finalization symbols.
4248f05b35a2Smrgdnl Note also adjust exclude_expsyms for C++ above.
4249f05b35a2Smrg  extract_expsyms_cmds=
4250e0963edeSmrg
4251f05b35a2Smrg  case $host_os in
4252f05b35a2Smrg  cygwin* | mingw* | pw32* | cegcc*)
4253f05b35a2Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4254f05b35a2Smrg    # When not using gcc, we currently assume that we are using
4255f05b35a2Smrg    # Microsoft Visual C++.
4256f05b35a2Smrg    if test "$GCC" != yes; then
4257f05b35a2Smrg      with_gnu_ld=no
4258e0963edeSmrg    fi
4259e0963edeSmrg    ;;
4260f05b35a2Smrg  interix*)
4261f05b35a2Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4262f05b35a2Smrg    with_gnu_ld=yes
4263f05b35a2Smrg    ;;
4264f05b35a2Smrg  openbsd*)
4265f05b35a2Smrg    with_gnu_ld=no
4266f05b35a2Smrg    ;;
4267e0963edeSmrg  esac
4268e0963edeSmrg
4269f05b35a2Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4270f05b35a2Smrg  if test "$with_gnu_ld" = yes; then
4271f05b35a2Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4272f05b35a2Smrg    wlarc='${wl}'
4273e0963edeSmrg
4274f05b35a2Smrg    # Set some defaults for GNU ld with shared library support. These
4275f05b35a2Smrg    # are reset later if shared libraries are not supported. Putting them
4276f05b35a2Smrg    # here allows them to be overridden if necessary.
4277f05b35a2Smrg    runpath_var=LD_RUN_PATH
4278f05b35a2Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279f05b35a2Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280f05b35a2Smrg    # ancient GNU ld didn't support --whole-archive et. al.
4281f05b35a2Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282f05b35a2Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283f05b35a2Smrg    else
4284f05b35a2Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285f05b35a2Smrg    fi
4286f05b35a2Smrg    supports_anon_versioning=no
4287f05b35a2Smrg    case `$LD -v 2>&1` in
4288f05b35a2Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4289f05b35a2Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4290f05b35a2Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4291f05b35a2Smrg      *\ 2.11.*) ;; # other 2.11 versions
4292f05b35a2Smrg      *) supports_anon_versioning=yes ;;
4293f05b35a2Smrg    esac
4294e0963edeSmrg
4295f05b35a2Smrg    # See if GNU ld supports shared libraries.
4296f05b35a2Smrg    case $host_os in
4297f05b35a2Smrg    aix[[3-9]]*)
4298f05b35a2Smrg      # On AIX/PPC, the GNU linker is very broken
4299f05b35a2Smrg      if test "$host_cpu" != ia64; then
4300f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4301f05b35a2Smrg	cat <<_LT_EOF 1>&2
4302e0963edeSmrg
4303f05b35a2Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4304f05b35a2Smrg*** to be unable to reliably create shared libraries on AIX.
4305f05b35a2Smrg*** Therefore, libtool is disabling shared libraries support.  If you
4306f05b35a2Smrg*** really care for shared libraries, you may want to modify your PATH
4307f05b35a2Smrg*** so that a non-GNU linker is found, and then restart.
4308e0963edeSmrg
4309f05b35a2Smrg_LT_EOF
4310f05b35a2Smrg      fi
4311f05b35a2Smrg      ;;
4312e0963edeSmrg
4313f05b35a2Smrg    amigaos*)
4314f05b35a2Smrg      case $host_cpu in
4315f05b35a2Smrg      powerpc)
4316f05b35a2Smrg            # see comment about AmigaOS4 .so support
4317f05b35a2Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4318f05b35a2Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4319f05b35a2Smrg        ;;
4320f05b35a2Smrg      m68k)
4321f05b35a2Smrg            _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)'
4322f05b35a2Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4323f05b35a2Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4324f05b35a2Smrg        ;;
4325f05b35a2Smrg      esac
4326f05b35a2Smrg      ;;
4327e0963edeSmrg
4328f05b35a2Smrg    beos*)
4329f05b35a2Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4330f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4331f05b35a2Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4332f05b35a2Smrg	# support --undefined.  This deserves some investigation.  FIXME
4333f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4334f05b35a2Smrg      else
4335f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4336f05b35a2Smrg      fi
4337f05b35a2Smrg      ;;
4338e0963edeSmrg
4339f05b35a2Smrg    cygwin* | mingw* | pw32* | cegcc*)
4340f05b35a2Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4341f05b35a2Smrg      # as there is no search path for DLLs.
4342f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4343f05b35a2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4344f05b35a2Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
4345f05b35a2Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4346f05b35a2Smrg      _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'
4347f05b35a2Smrg
4348f05b35a2Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4349f05b35a2Smrg        _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'
4350f05b35a2Smrg	# If the export-symbols file already is a .def file (1st line
4351f05b35a2Smrg	# is EXPORTS), use it as is; otherwise, prepend...
4352f05b35a2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4353f05b35a2Smrg	  cp $export_symbols $output_objdir/$soname.def;
4354f05b35a2Smrg	else
4355f05b35a2Smrg	  echo EXPORTS > $output_objdir/$soname.def;
4356f05b35a2Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
4357f05b35a2Smrg	fi~
4358f05b35a2Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4359f05b35a2Smrg      else
4360f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4361f05b35a2Smrg      fi
4362f05b35a2Smrg      ;;
4363e0963edeSmrg
4364f05b35a2Smrg    interix[[3-9]]*)
4365f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
4366f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4367f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4368f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369f05b35a2Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4370f05b35a2Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4371f05b35a2Smrg      # default) and relocated if they conflict, which is a slow very memory
4372f05b35a2Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4373f05b35a2Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4374f05b35a2Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4375f05b35a2Smrg      _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'
4376f05b35a2Smrg      _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'
4377f05b35a2Smrg      ;;
4378e0963edeSmrg
4379f05b35a2Smrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4380f05b35a2Smrg      tmp_diet=no
4381f05b35a2Smrg      if test "$host_os" = linux-dietlibc; then
4382f05b35a2Smrg	case $cc_basename in
4383f05b35a2Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4384f05b35a2Smrg	esac
4385f05b35a2Smrg      fi
4386f05b35a2Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4387f05b35a2Smrg	 && test "$tmp_diet" = no
4388f05b35a2Smrg      then
4389f05b35a2Smrg	tmp_addflag=
4390f05b35a2Smrg	tmp_sharedflag='-shared'
4391f05b35a2Smrg	case $cc_basename,$host_cpu in
4392f05b35a2Smrg        pgcc*)				# Portland Group C compiler
4393f05b35a2Smrg	  _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'
4394f05b35a2Smrg	  tmp_addflag=' $pic_flag'
4395f05b35a2Smrg	  ;;
4396f05b35a2Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4397f05b35a2Smrg	  _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'
4398f05b35a2Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4399f05b35a2Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4400f05b35a2Smrg	  tmp_addflag=' -i_dynamic' ;;
4401f05b35a2Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4402f05b35a2Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4403f05b35a2Smrg	ifc* | ifort*)			# Intel Fortran compiler
4404f05b35a2Smrg	  tmp_addflag=' -nofor_main' ;;
4405f05b35a2Smrg	lf95*)				# Lahey Fortran 8.1
4406f05b35a2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4407f05b35a2Smrg	  tmp_sharedflag='--shared' ;;
4408f05b35a2Smrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4409f05b35a2Smrg	  tmp_sharedflag='-qmkshrobj'
4410f05b35a2Smrg	  tmp_addflag= ;;
4411f05b35a2Smrg	esac
4412f05b35a2Smrg	case `$CC -V 2>&1 | sed 5q` in
4413f05b35a2Smrg	*Sun\ C*)			# Sun C 5.9
4414f05b35a2Smrg	  _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'
4415f05b35a2Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4416f05b35a2Smrg	  tmp_sharedflag='-G' ;;
4417f05b35a2Smrg	*Sun\ F*)			# Sun Fortran 8.3
4418f05b35a2Smrg	  tmp_sharedflag='-G' ;;
4419f05b35a2Smrg	esac
4420f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4421e0963edeSmrg
4422f05b35a2Smrg        if test "x$supports_anon_versioning" = xyes; then
4423f05b35a2Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4424f05b35a2Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4425f05b35a2Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4426f05b35a2Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4427f05b35a2Smrg        fi
4428e0963edeSmrg
4429f05b35a2Smrg	case $cc_basename in
4430f05b35a2Smrg	xlf*)
4431f05b35a2Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4432f05b35a2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4433f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4434f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4435f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4436f05b35a2Smrg	  if test "x$supports_anon_versioning" = xyes; then
4437f05b35a2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4438f05b35a2Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4439f05b35a2Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4440f05b35a2Smrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4441f05b35a2Smrg	  fi
4442f05b35a2Smrg	  ;;
4443f05b35a2Smrg	esac
4444f05b35a2Smrg      else
4445f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
4446f05b35a2Smrg      fi
4447f05b35a2Smrg      ;;
4448e0963edeSmrg
4449f05b35a2Smrg    netbsd*)
4450f05b35a2Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4451f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4452f05b35a2Smrg	wlarc=
4453f05b35a2Smrg      else
4454f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455f05b35a2Smrg	_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'
4456f05b35a2Smrg      fi
4457f05b35a2Smrg      ;;
4458e0963edeSmrg
4459f05b35a2Smrg    solaris*)
4460f05b35a2Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4461f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4462f05b35a2Smrg	cat <<_LT_EOF 1>&2
4463e0963edeSmrg
4464f05b35a2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4465f05b35a2Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
4466f05b35a2Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4467f05b35a2Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4468f05b35a2Smrg*** your PATH or compiler configuration so that the native linker is
4469f05b35a2Smrg*** used, and then restart.
4470e0963edeSmrg
4471f05b35a2Smrg_LT_EOF
4472f05b35a2Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4473f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474f05b35a2Smrg	_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'
4475f05b35a2Smrg      else
4476f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4477f05b35a2Smrg      fi
4478f05b35a2Smrg      ;;
4479e0963edeSmrg
4480f05b35a2Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4481f05b35a2Smrg      case `$LD -v 2>&1` in
4482f05b35a2Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4483f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4484f05b35a2Smrg	cat <<_LT_EOF 1>&2
4485e0963edeSmrg
4486f05b35a2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4487f05b35a2Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4488f05b35a2Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4489f05b35a2Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4490f05b35a2Smrg*** your PATH or compiler configuration so that the native linker is
4491f05b35a2Smrg*** used, and then restart.
4492e0963edeSmrg
4493f05b35a2Smrg_LT_EOF
4494f05b35a2Smrg	;;
4495f05b35a2Smrg	*)
4496f05b35a2Smrg	  # For security reasons, it is highly recommended that you always
4497f05b35a2Smrg	  # use absolute paths for naming shared libraries, and exclude the
4498f05b35a2Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4499f05b35a2Smrg	  # requires that you compile everything twice, which is a pain.
4500f05b35a2Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4502f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4503f05b35a2Smrg	    _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'
4504f05b35a2Smrg	  else
4505f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4506f05b35a2Smrg	  fi
4507f05b35a2Smrg	;;
4508f05b35a2Smrg      esac
4509f05b35a2Smrg      ;;
4510e0963edeSmrg
4511f05b35a2Smrg    sunos4*)
4512f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4513f05b35a2Smrg      wlarc=
4514f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4515f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4516f05b35a2Smrg      ;;
4517e0963edeSmrg
4518f05b35a2Smrg    *)
4519f05b35a2Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4520f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521f05b35a2Smrg	_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'
4522f05b35a2Smrg      else
4523f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4524f05b35a2Smrg      fi
4525f05b35a2Smrg      ;;
4526f05b35a2Smrg    esac
4527e0963edeSmrg
4528f05b35a2Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4529f05b35a2Smrg      runpath_var=
4530f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4531f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4532f05b35a2Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4533f05b35a2Smrg    fi
4534f05b35a2Smrg  else
4535f05b35a2Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
4536f05b35a2Smrg    case $host_os in
4537f05b35a2Smrg    aix3*)
4538f05b35a2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4539f05b35a2Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4540f05b35a2Smrg      _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'
4541f05b35a2Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
4542f05b35a2Smrg      # are no directories specified by -L.
4543f05b35a2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4544f05b35a2Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4545f05b35a2Smrg	# Neither direct hardcoding nor static linking is supported with a
4546f05b35a2Smrg	# broken collect2.
4547f05b35a2Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4548f05b35a2Smrg      fi
4549f05b35a2Smrg      ;;
4550e0963edeSmrg
4551f05b35a2Smrg    aix[[4-9]]*)
4552f05b35a2Smrg      if test "$host_cpu" = ia64; then
4553f05b35a2Smrg	# On IA64, the linker does run time linking by default, so we don't
4554f05b35a2Smrg	# have to do anything special.
4555f05b35a2Smrg	aix_use_runtimelinking=no
4556f05b35a2Smrg	exp_sym_flag='-Bexport'
4557f05b35a2Smrg	no_entry_flag=""
4558f05b35a2Smrg      else
4559f05b35a2Smrg	# If we're using GNU nm, then we don't want the "-C" option.
4560f05b35a2Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4561f05b35a2Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562f05b35a2Smrg	  _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'
4563f05b35a2Smrg	else
4564f05b35a2Smrg	  _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'
4565f05b35a2Smrg	fi
4566f05b35a2Smrg	aix_use_runtimelinking=no
4567e0963edeSmrg
4568f05b35a2Smrg	# Test if we are trying to use run time linking or normal
4569f05b35a2Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4570f05b35a2Smrg	# need to do runtime linking.
4571f05b35a2Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4572f05b35a2Smrg	  for ld_flag in $LDFLAGS; do
4573f05b35a2Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4574f05b35a2Smrg	    aix_use_runtimelinking=yes
4575f05b35a2Smrg	    break
4576f05b35a2Smrg	  fi
4577f05b35a2Smrg	  done
4578f05b35a2Smrg	  ;;
4579f05b35a2Smrg	esac
4580e0963edeSmrg
4581f05b35a2Smrg	exp_sym_flag='-bexport'
4582f05b35a2Smrg	no_entry_flag='-bnoentry'
4583f05b35a2Smrg      fi
4584e0963edeSmrg
4585f05b35a2Smrg      # When large executables or shared objects are built, AIX ld can
4586f05b35a2Smrg      # have problems creating the table of contents.  If linking a library
4587f05b35a2Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
4588f05b35a2Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4589f05b35a2Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4590e0963edeSmrg
4591f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)=''
4592f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4593f05b35a2Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4594f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4595f05b35a2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4596f05b35a2Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4597e0963edeSmrg
4598f05b35a2Smrg      if test "$GCC" = yes; then
4599f05b35a2Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4600f05b35a2Smrg	# We only want to do this on AIX 4.2 and lower, the check
4601f05b35a2Smrg	# below for broken collect2 doesn't work under 4.3+
4602f05b35a2Smrg	  collect2name=`${CC} -print-prog-name=collect2`
4603f05b35a2Smrg	  if test -f "$collect2name" &&
4604f05b35a2Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4605f05b35a2Smrg	  then
4606f05b35a2Smrg	  # We have reworked collect2
4607f05b35a2Smrg	  :
4608f05b35a2Smrg	  else
4609f05b35a2Smrg	  # We have old collect2
4610f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4611f05b35a2Smrg	  # It fails to find uninstalled libraries when the uninstalled
4612f05b35a2Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4613f05b35a2Smrg	  # to unsupported forces relinking
4614f05b35a2Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4615f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4616f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617f05b35a2Smrg	  fi
4618f05b35a2Smrg	  ;;
4619f05b35a2Smrg	esac
4620f05b35a2Smrg	shared_flag='-shared'
4621f05b35a2Smrg	if test "$aix_use_runtimelinking" = yes; then
4622f05b35a2Smrg	  shared_flag="$shared_flag "'${wl}-G'
4623f05b35a2Smrg	fi
4624f05b35a2Smrg      else
4625f05b35a2Smrg	# not using gcc
4626f05b35a2Smrg	if test "$host_cpu" = ia64; then
4627f05b35a2Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4628f05b35a2Smrg	# chokes on -Wl,-G. The following line is correct:
4629f05b35a2Smrg	  shared_flag='-G'
4630f05b35a2Smrg	else
4631f05b35a2Smrg	  if test "$aix_use_runtimelinking" = yes; then
4632f05b35a2Smrg	    shared_flag='${wl}-G'
4633f05b35a2Smrg	  else
4634f05b35a2Smrg	    shared_flag='${wl}-bM:SRE'
4635f05b35a2Smrg	  fi
4636f05b35a2Smrg	fi
4637f05b35a2Smrg      fi
4638e0963edeSmrg
4639f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4640f05b35a2Smrg      # It seems that -bexpall does not export symbols beginning with
4641f05b35a2Smrg      # underscore (_), so it is better to generate a list of symbols to export.
4642f05b35a2Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4643f05b35a2Smrg      if test "$aix_use_runtimelinking" = yes; then
4644f05b35a2Smrg	# Warning - without using the other runtime loading flags (-brtl),
4645f05b35a2Smrg	# -berok will link without error, but may produce a broken library.
4646f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4647f05b35a2Smrg        # Determine the default libpath from the value encoded in an
4648f05b35a2Smrg        # empty executable.
4649f05b35a2Smrg        _LT_SYS_MODULE_PATH_AIX
4650f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4651f05b35a2Smrg        _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"
4652f05b35a2Smrg      else
4653f05b35a2Smrg	if test "$host_cpu" = ia64; then
4654f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4655f05b35a2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4656f05b35a2Smrg	  _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"
4657f05b35a2Smrg	else
4658f05b35a2Smrg	 # Determine the default libpath from the value encoded in an
4659f05b35a2Smrg	 # empty executable.
4660f05b35a2Smrg	 _LT_SYS_MODULE_PATH_AIX
4661f05b35a2Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4662f05b35a2Smrg	  # Warning - without using the other run time loading flags,
4663f05b35a2Smrg	  # -berok will link without error, but may produce a broken library.
4664f05b35a2Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4665f05b35a2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4666f05b35a2Smrg	  # Exported symbols can be pulled into shared objects from archives
4667f05b35a2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4668f05b35a2Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4669f05b35a2Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
4670f05b35a2Smrg	  _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'
4671f05b35a2Smrg	fi
4672f05b35a2Smrg      fi
4673f05b35a2Smrg      ;;
4674e0963edeSmrg
4675f05b35a2Smrg    amigaos*)
4676f05b35a2Smrg      case $host_cpu in
4677f05b35a2Smrg      powerpc)
4678f05b35a2Smrg            # see comment about AmigaOS4 .so support
4679f05b35a2Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4680f05b35a2Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4681f05b35a2Smrg        ;;
4682f05b35a2Smrg      m68k)
4683f05b35a2Smrg            _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)'
4684f05b35a2Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4685f05b35a2Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4686f05b35a2Smrg        ;;
4687f05b35a2Smrg      esac
4688f05b35a2Smrg      ;;
4689e0963edeSmrg
4690f05b35a2Smrg    bsdi[[45]]*)
4691f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4692f05b35a2Smrg      ;;
4693e0963edeSmrg
4694f05b35a2Smrg    cygwin* | mingw* | pw32* | cegcc*)
4695f05b35a2Smrg      # When not using gcc, we currently assume that we are using
4696f05b35a2Smrg      # Microsoft Visual C++.
4697f05b35a2Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4698f05b35a2Smrg      # no search path for DLLs.
4699f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4700f05b35a2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4701f05b35a2Smrg      # Tell ltmain to make .lib files, not .a files.
4702f05b35a2Smrg      libext=lib
4703f05b35a2Smrg      # Tell ltmain to make .dll files, not .so files.
4704f05b35a2Smrg      shrext_cmds=".dll"
4705f05b35a2Smrg      # FIXME: Setting linknames here is a bad hack.
4706f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4707f05b35a2Smrg      # The linker will automatically build a .lib file if we build a DLL.
4708f05b35a2Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4709f05b35a2Smrg      # FIXME: Should let the user specify the lib program.
4710f05b35a2Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4711f05b35a2Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4712f05b35a2Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4713f05b35a2Smrg      ;;
4714e0963edeSmrg
4715f05b35a2Smrg    darwin* | rhapsody*)
4716f05b35a2Smrg      _LT_DARWIN_LINKER_FEATURES($1)
4717f05b35a2Smrg      ;;
4718e0963edeSmrg
4719f05b35a2Smrg    dgux*)
4720f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4721f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4723f05b35a2Smrg      ;;
4724e0963edeSmrg
4725f05b35a2Smrg    freebsd1*)
4726f05b35a2Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
4727f05b35a2Smrg      ;;
4728e0963edeSmrg
4729f05b35a2Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4730f05b35a2Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4731f05b35a2Smrg    # does not break anything, and helps significantly (at the cost of a little
4732f05b35a2Smrg    # extra space).
4733f05b35a2Smrg    freebsd2.2*)
4734f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4735f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4736f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4737f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4738f05b35a2Smrg      ;;
4739e0963edeSmrg
4740f05b35a2Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4741f05b35a2Smrg    freebsd2*)
4742f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4743f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4744f05b35a2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4746f05b35a2Smrg      ;;
4747e0963edeSmrg
4748f05b35a2Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4749f05b35a2Smrg    freebsd* | dragonfly*)
4750f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4751f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4753f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754f05b35a2Smrg      ;;
4755e0963edeSmrg
4756f05b35a2Smrg    hpux9*)
4757f05b35a2Smrg      if test "$GCC" = yes; then
4758f05b35a2Smrg	_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'
4759f05b35a2Smrg      else
4760f05b35a2Smrg	_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'
4761f05b35a2Smrg      fi
4762f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4763f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4764f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4765e0963edeSmrg
4766f05b35a2Smrg      # hardcode_minus_L: Not really in the search PATH,
4767f05b35a2Smrg      # but as the default location of the library.
4768f05b35a2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4769f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4770f05b35a2Smrg      ;;
4771e0963edeSmrg
4772f05b35a2Smrg    hpux10*)
4773f05b35a2Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4774f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4775f05b35a2Smrg      else
4776f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4777f05b35a2Smrg      fi
4778f05b35a2Smrg      if test "$with_gnu_ld" = no; then
4779f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4780f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4781f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4782f05b35a2Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4783f05b35a2Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4784f05b35a2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4785f05b35a2Smrg	# hardcode_minus_L: Not really in the search PATH,
4786f05b35a2Smrg	# but as the default location of the library.
4787f05b35a2Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4788f05b35a2Smrg      fi
4789f05b35a2Smrg      ;;
4790e0963edeSmrg
4791f05b35a2Smrg    hpux11*)
4792f05b35a2Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4793f05b35a2Smrg	case $host_cpu in
4794f05b35a2Smrg	hppa*64*)
4795f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4796f05b35a2Smrg	  ;;
4797f05b35a2Smrg	ia64*)
4798f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4799f05b35a2Smrg	  ;;
4800f05b35a2Smrg	*)
4801f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4802f05b35a2Smrg	  ;;
4803f05b35a2Smrg	esac
4804f05b35a2Smrg      else
4805f05b35a2Smrg	case $host_cpu in
4806f05b35a2Smrg	hppa*64*)
4807f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4808f05b35a2Smrg	  ;;
4809f05b35a2Smrg	ia64*)
4810f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4811f05b35a2Smrg	  ;;
4812f05b35a2Smrg	*)
4813f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4814f05b35a2Smrg	  ;;
4815f05b35a2Smrg	esac
4816f05b35a2Smrg      fi
4817f05b35a2Smrg      if test "$with_gnu_ld" = no; then
4818f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4819f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4820e0963edeSmrg
4821f05b35a2Smrg	case $host_cpu in
4822f05b35a2Smrg	hppa*64*|ia64*)
4823f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4824f05b35a2Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4825f05b35a2Smrg	  ;;
4826f05b35a2Smrg	*)
4827f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4828f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4829f05b35a2Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4830e0963edeSmrg
4831f05b35a2Smrg	  # hardcode_minus_L: Not really in the search PATH,
4832f05b35a2Smrg	  # but as the default location of the library.
4833f05b35a2Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4834f05b35a2Smrg	  ;;
4835f05b35a2Smrg	esac
4836f05b35a2Smrg      fi
4837f05b35a2Smrg      ;;
4838e0963edeSmrg
4839f05b35a2Smrg    irix5* | irix6* | nonstopux*)
4840f05b35a2Smrg      if test "$GCC" = yes; then
4841f05b35a2Smrg	_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'
4842f05b35a2Smrg	# Try to use the -exported_symbol ld option, if it does not
4843f05b35a2Smrg	# work, assume that -exports_file does not work either and
4844f05b35a2Smrg	# implicitly export all symbols.
4845f05b35a2Smrg        save_LDFLAGS="$LDFLAGS"
4846f05b35a2Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4847f05b35a2Smrg        AC_LINK_IFELSE(int foo(void) {},
4848f05b35a2Smrg          _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'
4849f05b35a2Smrg        )
4850f05b35a2Smrg        LDFLAGS="$save_LDFLAGS"
4851f05b35a2Smrg      else
4852f05b35a2Smrg	_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'
4853f05b35a2Smrg	_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'
4854f05b35a2Smrg      fi
4855f05b35a2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4856f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4857f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4858f05b35a2Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4859f05b35a2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4860e0963edeSmrg      ;;
4861f05b35a2Smrg
4862f05b35a2Smrg    netbsd*)
4863f05b35a2Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4864f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4865f05b35a2Smrg      else
4866f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4867f05b35a2Smrg      fi
4868f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4869f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4870f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871e0963edeSmrg      ;;
4872e0963edeSmrg
4873f05b35a2Smrg    newsos6)
4874f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4875f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4876f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4877f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4878f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4879f05b35a2Smrg      ;;
4880e0963edeSmrg
4881f05b35a2Smrg    *nto* | *qnx*)
4882f05b35a2Smrg      ;;
4883e0963edeSmrg
4884f05b35a2Smrg    openbsd*)
4885f05b35a2Smrg      if test -f /usr/libexec/ld.so; then
4886f05b35a2Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4887f05b35a2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4888f05b35a2Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4889f05b35a2Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4890f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4891f05b35a2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4892f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4893f05b35a2Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4894f05b35a2Smrg	else
4895f05b35a2Smrg	  case $host_os in
4896f05b35a2Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4897f05b35a2Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4898f05b35a2Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4899f05b35a2Smrg	     ;;
4900f05b35a2Smrg	   *)
4901f05b35a2Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4902f05b35a2Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4903f05b35a2Smrg	     ;;
4904f05b35a2Smrg	  esac
4905f05b35a2Smrg	fi
4906f05b35a2Smrg      else
4907f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
4908f05b35a2Smrg      fi
4909f05b35a2Smrg      ;;
4910e0963edeSmrg
4911f05b35a2Smrg    os2*)
4912f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4913f05b35a2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4914f05b35a2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4915f05b35a2Smrg      _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'
4916f05b35a2Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4917f05b35a2Smrg      ;;
4918e0963edeSmrg
4919f05b35a2Smrg    osf3*)
4920f05b35a2Smrg      if test "$GCC" = yes; then
4921f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4922f05b35a2Smrg	_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'
4923f05b35a2Smrg      else
4924f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4925f05b35a2Smrg	_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'
4926f05b35a2Smrg      fi
4927f05b35a2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4928f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4929f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4930f05b35a2Smrg      ;;
4931e0963edeSmrg
4932f05b35a2Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4933f05b35a2Smrg      if test "$GCC" = yes; then
4934f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4935f05b35a2Smrg	_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'
4936f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4937f05b35a2Smrg      else
4938f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4939f05b35a2Smrg	_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'
4940f05b35a2Smrg	_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~
4941f05b35a2Smrg	$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'
4942e0963edeSmrg
4943f05b35a2Smrg	# Both c and cxx compiler support -rpath directly
4944f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4945f05b35a2Smrg      fi
4946f05b35a2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4947f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4948f05b35a2Smrg      ;;
4949e0963edeSmrg
4950f05b35a2Smrg    solaris*)
4951f05b35a2Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4952f05b35a2Smrg      if test "$GCC" = yes; then
4953f05b35a2Smrg	wlarc='${wl}'
4954f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4955f05b35a2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4956f05b35a2Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4957f05b35a2Smrg      else
4958f05b35a2Smrg	case `$CC -V 2>&1` in
4959f05b35a2Smrg	*"Compilers 5.0"*)
4960f05b35a2Smrg	  wlarc=''
4961f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4962f05b35a2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4963f05b35a2Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4964f05b35a2Smrg	  ;;
4965f05b35a2Smrg	*)
4966f05b35a2Smrg	  wlarc='${wl}'
4967f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4968f05b35a2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4969f05b35a2Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4970f05b35a2Smrg	  ;;
4971f05b35a2Smrg	esac
4972f05b35a2Smrg      fi
4973f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4974f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4975f05b35a2Smrg      case $host_os in
4976f05b35a2Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4977f05b35a2Smrg      *)
4978f05b35a2Smrg	# The compiler driver will combine and reorder linker options,
4979f05b35a2Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4980f05b35a2Smrg	# but is careful enough not to reorder.
4981f05b35a2Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4982f05b35a2Smrg	if test "$GCC" = yes; then
4983f05b35a2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4984f05b35a2Smrg	else
4985f05b35a2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4986f05b35a2Smrg	fi
4987f05b35a2Smrg	;;
4988f05b35a2Smrg      esac
4989f05b35a2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4990f05b35a2Smrg      ;;
4991e0963edeSmrg
4992f05b35a2Smrg    sunos4*)
4993f05b35a2Smrg      if test "x$host_vendor" = xsequent; then
4994f05b35a2Smrg	# Use $CC to link under sequent, because it throws in some extra .o
4995f05b35a2Smrg	# files that make .init and .fini sections work.
4996f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4997f05b35a2Smrg      else
4998f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4999f05b35a2Smrg      fi
5000f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5001f05b35a2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5002f05b35a2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5003f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5004f05b35a2Smrg      ;;
5005e0963edeSmrg
5006f05b35a2Smrg    sysv4)
5007f05b35a2Smrg      case $host_vendor in
5008f05b35a2Smrg	sni)
5009f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5010f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5011f05b35a2Smrg	;;
5012f05b35a2Smrg	siemens)
5013f05b35a2Smrg	  ## LD is ld it makes a PLAMLIB
5014f05b35a2Smrg	  ## CC just makes a GrossModule.
5015f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5016f05b35a2Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5017f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5018f05b35a2Smrg        ;;
5019f05b35a2Smrg	motorola)
5020f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5021f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5022f05b35a2Smrg	;;
5023f05b35a2Smrg      esac
5024f05b35a2Smrg      runpath_var='LD_RUN_PATH'
5025f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5026f05b35a2Smrg      ;;
5027e0963edeSmrg
5028f05b35a2Smrg    sysv4.3*)
5029f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5030f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5031f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5032f05b35a2Smrg      ;;
5033e0963edeSmrg
5034f05b35a2Smrg    sysv4*MP*)
5035f05b35a2Smrg      if test -d /usr/nec; then
5036f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037f05b35a2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5038f05b35a2Smrg	runpath_var=LD_RUN_PATH
5039f05b35a2Smrg	hardcode_runpath_var=yes
5040f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5041f05b35a2Smrg      fi
5042f05b35a2Smrg      ;;
5043e0963edeSmrg
5044f05b35a2Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5045f05b35a2Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5046f05b35a2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5047f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5048f05b35a2Smrg      runpath_var='LD_RUN_PATH'
5049e0963edeSmrg
5050f05b35a2Smrg      if test "$GCC" = yes; then
5051f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5052f05b35a2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5053f05b35a2Smrg      else
5054f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055f05b35a2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5056f05b35a2Smrg      fi
5057f05b35a2Smrg      ;;
5058e0963edeSmrg
5059f05b35a2Smrg    sysv5* | sco3.2v5* | sco5v6*)
5060f05b35a2Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
5061f05b35a2Smrg      # link with -lc, and that would cause any symbols used from libc to
5062f05b35a2Smrg      # always be unresolved, which means just about no library would
5063f05b35a2Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
5064f05b35a2Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
5065f05b35a2Smrg      # as -z defs.
5066f05b35a2Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5067f05b35a2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5068f05b35a2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5069f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5070f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5071f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5072f05b35a2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5073f05b35a2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5074f05b35a2Smrg      runpath_var='LD_RUN_PATH'
5075e0963edeSmrg
5076f05b35a2Smrg      if test "$GCC" = yes; then
5077f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5078f05b35a2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5079f05b35a2Smrg      else
5080f05b35a2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081f05b35a2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5082f05b35a2Smrg      fi
5083f05b35a2Smrg      ;;
5084e0963edeSmrg
5085f05b35a2Smrg    uts4*)
5086f05b35a2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5087f05b35a2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5088f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5089f05b35a2Smrg      ;;
5090e0963edeSmrg
5091f05b35a2Smrg    *)
5092f05b35a2Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
5093f05b35a2Smrg      ;;
5094f05b35a2Smrg    esac
5095e0963edeSmrg
5096f05b35a2Smrg    if test x$host_vendor = xsni; then
5097f05b35a2Smrg      case $host in
5098f05b35a2Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5099f05b35a2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5100f05b35a2Smrg	;;
5101f05b35a2Smrg      esac
5102f05b35a2Smrg    fi
5103f05b35a2Smrg  fi
5104f05b35a2Smrg])
5105f05b35a2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5106f05b35a2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5107e0963edeSmrg
5108f05b35a2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5109e0963edeSmrg
5110f05b35a2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5111f05b35a2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5112f05b35a2Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
5113f05b35a2Smrg    [The commands to extract the exported symbol list from a shared archive])
5114e0963edeSmrg
5115f05b35a2Smrg#
5116f05b35a2Smrg# Do we need to explicitly link libc?
5117f05b35a2Smrg#
5118f05b35a2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5119f05b35a2Smrgx|xyes)
5120f05b35a2Smrg  # Assume -lc should be added
5121f05b35a2Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5122e0963edeSmrg
5123f05b35a2Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5124f05b35a2Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
5125f05b35a2Smrg    *'~'*)
5126f05b35a2Smrg      # FIXME: we may have to deal with multi-command sequences.
5127f05b35a2Smrg      ;;
5128f05b35a2Smrg    '$CC '*)
5129f05b35a2Smrg      # Test whether the compiler implicitly links with -lc since on some
5130f05b35a2Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5131f05b35a2Smrg      # to ld, don't add -lc before -lgcc.
5132f05b35a2Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5133f05b35a2Smrg      $RM conftest*
5134f05b35a2Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5135e0963edeSmrg
5136f05b35a2Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5137f05b35a2Smrg        soname=conftest
5138f05b35a2Smrg        lib=conftest
5139f05b35a2Smrg        libobjs=conftest.$ac_objext
5140f05b35a2Smrg        deplibs=
5141f05b35a2Smrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5142f05b35a2Smrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5143f05b35a2Smrg        compiler_flags=-v
5144f05b35a2Smrg        linker_flags=-v
5145f05b35a2Smrg        verstring=
5146f05b35a2Smrg        output_objdir=.
5147f05b35a2Smrg        libname=conftest
5148f05b35a2Smrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5149f05b35a2Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5150f05b35a2Smrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5151f05b35a2Smrg        then
5152f05b35a2Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5153f05b35a2Smrg        else
5154f05b35a2Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5155f05b35a2Smrg        fi
5156f05b35a2Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5157f05b35a2Smrg      else
5158f05b35a2Smrg        cat conftest.err 1>&5
5159f05b35a2Smrg      fi
5160f05b35a2Smrg      $RM conftest*
5161f05b35a2Smrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5162f05b35a2Smrg      ;;
5163f05b35a2Smrg    esac
5164f05b35a2Smrg  fi
5165f05b35a2Smrg  ;;
5166f05b35a2Smrgesac
5167e0963edeSmrg
5168f05b35a2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5169f05b35a2Smrg    [Whether or not to add -lc for building shared libraries])
5170f05b35a2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5171f05b35a2Smrg    [enable_shared_with_static_runtimes], [0],
5172f05b35a2Smrg    [Whether or not to disallow shared libs when runtime libs are static])
5173f05b35a2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5174f05b35a2Smrg    [Compiler flag to allow reflexive dlopens])
5175f05b35a2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5176f05b35a2Smrg    [Compiler flag to generate shared objects directly from archives])
5177f05b35a2Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
5178f05b35a2Smrg    [Whether the compiler copes with passing no objects directly])
5179f05b35a2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5180f05b35a2Smrg    [Create an old-style archive from a shared archive])
5181f05b35a2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5182f05b35a2Smrg    [Create a temporary old-style archive to link instead of a shared archive])
5183f05b35a2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5184f05b35a2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5185f05b35a2Smrg_LT_TAGDECL([], [module_cmds], [2],
5186f05b35a2Smrg    [Commands used to build a loadable module if different from building
5187f05b35a2Smrg    a shared archive.])
5188f05b35a2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5189f05b35a2Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
5190f05b35a2Smrg    [Whether we are building with GNU ld or not])
5191f05b35a2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5192f05b35a2Smrg    [Flag that allows shared libraries with undefined symbols to be built])
5193f05b35a2Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
5194f05b35a2Smrg    [Flag that enforces no undefined symbols])
5195f05b35a2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5196f05b35a2Smrg    [Flag to hardcode $libdir into a binary during linking.
5197f05b35a2Smrg    This must work even if $libdir does not exist])
5198f05b35a2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5199f05b35a2Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5200f05b35a2Smrg    during linking.  This must work even if $libdir does not exist]])
5201f05b35a2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5202f05b35a2Smrg    [Whether we need a single "-rpath" flag with a separated argument])
5203f05b35a2Smrg_LT_TAGDECL([], [hardcode_direct], [0],
5204f05b35a2Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5205f05b35a2Smrg    DIR into the resulting binary])
5206f05b35a2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5207f05b35a2Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5208f05b35a2Smrg    DIR into the resulting binary and the resulting library dependency is
5209f05b35a2Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5210f05b35a2Smrg    library is relocated])
5211f05b35a2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5212f05b35a2Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5213f05b35a2Smrg    into the resulting binary])
5214f05b35a2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5215f05b35a2Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5216f05b35a2Smrg    into the resulting binary])
5217f05b35a2Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
5218f05b35a2Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5219f05b35a2Smrg    into the library and all subsequent libraries and executables linked
5220f05b35a2Smrg    against it])
5221f05b35a2Smrg_LT_TAGDECL([], [inherit_rpath], [0],
5222f05b35a2Smrg    [Set to yes if linker adds runtime paths of dependent libraries
5223f05b35a2Smrg    to runtime path list])
5224f05b35a2Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
5225f05b35a2Smrg    [Whether libtool must link a program against all its dependency libraries])
5226f05b35a2Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5227f05b35a2Smrg    [Fix the shell variable $srcfile for the compiler])
5228f05b35a2Smrg_LT_TAGDECL([], [always_export_symbols], [0],
5229f05b35a2Smrg    [Set to "yes" if exported symbols are required])
5230f05b35a2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5231f05b35a2Smrg    [The commands to list exported symbols])
5232f05b35a2Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
5233f05b35a2Smrg    [Symbols that should not be listed in the preloaded symbols])
5234f05b35a2Smrg_LT_TAGDECL([], [include_expsyms], [1],
5235f05b35a2Smrg    [Symbols that must always be exported])
5236f05b35a2Smrg_LT_TAGDECL([], [prelink_cmds], [2],
5237f05b35a2Smrg    [Commands necessary for linking programs (against libraries) with templates])
5238f05b35a2Smrg_LT_TAGDECL([], [file_list_spec], [1],
5239f05b35a2Smrg    [Specify filename containing input files])
5240f05b35a2Smrgdnl FIXME: Not yet implemented
5241f05b35a2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5242f05b35a2Smrgdnl    [Compiler flag to generate thread safe objects])
5243f05b35a2Smrg])# _LT_LINKER_SHLIBS
5244f05b35a2Smrg
5245f05b35a2Smrg
5246f05b35a2Smrg# _LT_LANG_C_CONFIG([TAG])
5247f05b35a2Smrg# ------------------------
5248f05b35a2Smrg# Ensure that the configuration variables for a C compiler are suitably
5249f05b35a2Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5250f05b35a2Smrg# the compiler configuration to `libtool'.
5251f05b35a2Smrgm4_defun([_LT_LANG_C_CONFIG],
5252f05b35a2Smrg[m4_require([_LT_DECL_EGREP])dnl
5253f05b35a2Smrglt_save_CC="$CC"
5254f05b35a2SmrgAC_LANG_PUSH(C)
5255e0963edeSmrg
5256f05b35a2Smrg# Source file extension for C test sources.
5257f05b35a2Smrgac_ext=c
5258e0963edeSmrg
5259f05b35a2Smrg# Object file extension for compiled C test sources.
5260f05b35a2Smrgobjext=o
5261f05b35a2Smrg_LT_TAGVAR(objext, $1)=$objext
5262e0963edeSmrg
5263f05b35a2Smrg# Code to be used in simple compile tests
5264f05b35a2Smrglt_simple_compile_test_code="int some_variable = 0;"
5265e0963edeSmrg
5266f05b35a2Smrg# Code to be used in simple link tests
5267f05b35a2Smrglt_simple_link_test_code='int main(){return(0);}'
5268e0963edeSmrg
5269f05b35a2Smrg_LT_TAG_COMPILER
5270f05b35a2Smrg# Save the default compiler, since it gets overwritten when the other
5271f05b35a2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5272f05b35a2Smrgcompiler_DEFAULT=$CC
5273e0963edeSmrg
5274f05b35a2Smrg# save warnings/boilerplate of simple test code
5275f05b35a2Smrg_LT_COMPILER_BOILERPLATE
5276f05b35a2Smrg_LT_LINKER_BOILERPLATE
5277e0963edeSmrg
5278f05b35a2Smrgif test -n "$compiler"; then
5279f05b35a2Smrg  _LT_COMPILER_NO_RTTI($1)
5280f05b35a2Smrg  _LT_COMPILER_PIC($1)
5281f05b35a2Smrg  _LT_COMPILER_C_O($1)
5282f05b35a2Smrg  _LT_COMPILER_FILE_LOCKS($1)
5283f05b35a2Smrg  _LT_LINKER_SHLIBS($1)
5284f05b35a2Smrg  _LT_SYS_DYNAMIC_LINKER($1)
5285f05b35a2Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5286f05b35a2Smrg  LT_SYS_DLOPEN_SELF
5287f05b35a2Smrg  _LT_CMD_STRIPLIB
5288f05b35a2Smrg
5289f05b35a2Smrg  # Report which library types will actually be built
5290f05b35a2Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5291f05b35a2Smrg  AC_MSG_RESULT([$can_build_shared])
5292f05b35a2Smrg
5293f05b35a2Smrg  AC_MSG_CHECKING([whether to build shared libraries])
5294f05b35a2Smrg  test "$can_build_shared" = "no" && enable_shared=no
5295f05b35a2Smrg
5296f05b35a2Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
5297f05b35a2Smrg  # are all built from PIC.
5298f05b35a2Smrg  case $host_os in
5299f05b35a2Smrg  aix3*)
5300f05b35a2Smrg    test "$enable_shared" = yes && enable_static=no
5301f05b35a2Smrg    if test -n "$RANLIB"; then
5302f05b35a2Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5303f05b35a2Smrg      postinstall_cmds='$RANLIB $lib'
5304f05b35a2Smrg    fi
5305f05b35a2Smrg    ;;
5306e0963edeSmrg
5307f05b35a2Smrg  aix[[4-9]]*)
5308f05b35a2Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5309f05b35a2Smrg      test "$enable_shared" = yes && enable_static=no
5310f05b35a2Smrg    fi
5311f05b35a2Smrg    ;;
5312f05b35a2Smrg  esac
5313f05b35a2Smrg  AC_MSG_RESULT([$enable_shared])
5314e0963edeSmrg
5315f05b35a2Smrg  AC_MSG_CHECKING([whether to build static libraries])
5316f05b35a2Smrg  # Make sure either enable_shared or enable_static is yes.
5317f05b35a2Smrg  test "$enable_shared" = yes || enable_static=yes
5318f05b35a2Smrg  AC_MSG_RESULT([$enable_static])
5319e0963edeSmrg
5320f05b35a2Smrg  _LT_CONFIG($1)
5321f05b35a2Smrgfi
5322f05b35a2SmrgAC_LANG_POP
5323f05b35a2SmrgCC="$lt_save_CC"
5324f05b35a2Smrg])# _LT_LANG_C_CONFIG
5325e0963edeSmrg
5326e0963edeSmrg
5327f05b35a2Smrg# _LT_PROG_CXX
5328f05b35a2Smrg# ------------
5329f05b35a2Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5330f05b35a2Smrg# compiler, we have our own version here.
5331f05b35a2Smrgm4_defun([_LT_PROG_CXX],
5332f05b35a2Smrg[
5333f05b35a2Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5334f05b35a2SmrgAC_PROG_CXX
5335f05b35a2Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5336f05b35a2Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5337f05b35a2Smrg    (test "X$CXX" != "Xg++"))) ; then
5338f05b35a2Smrg  AC_PROG_CXXCPP
5339f05b35a2Smrgelse
5340f05b35a2Smrg  _lt_caught_CXX_error=yes
5341f05b35a2Smrgfi
5342f05b35a2Smrgpopdef([AC_MSG_ERROR])
5343f05b35a2Smrg])# _LT_PROG_CXX
5344e0963edeSmrg
5345f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
5346f05b35a2Smrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5347e0963edeSmrg
5348e0963edeSmrg
5349f05b35a2Smrg# _LT_LANG_CXX_CONFIG([TAG])
5350f05b35a2Smrg# --------------------------
5351f05b35a2Smrg# Ensure that the configuration variables for a C++ compiler are suitably
5352f05b35a2Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5353f05b35a2Smrg# the compiler configuration to `libtool'.
5354f05b35a2Smrgm4_defun([_LT_LANG_CXX_CONFIG],
5355f05b35a2Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5356f05b35a2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5357f05b35a2Smrgm4_require([_LT_DECL_EGREP])dnl
5358f05b35a2Smrg
5359f05b35a2SmrgAC_LANG_PUSH(C++)
5360f05b35a2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5361f05b35a2Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
5362f05b35a2Smrg_LT_TAGVAR(always_export_symbols, $1)=no
5363f05b35a2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5364f05b35a2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
5365f05b35a2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5366f05b35a2Smrg_LT_TAGVAR(hardcode_direct, $1)=no
5367f05b35a2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5368f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5369f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5370f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5371f05b35a2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5372f05b35a2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5373f05b35a2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
5374f05b35a2Smrg_LT_TAGVAR(inherit_rpath, $1)=no
5375f05b35a2Smrg_LT_TAGVAR(module_cmds, $1)=
5376f05b35a2Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
5377f05b35a2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5378f05b35a2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5379f05b35a2Smrg_LT_TAGVAR(no_undefined_flag, $1)=
5380f05b35a2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5381f05b35a2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5382e0963edeSmrg
5383f05b35a2Smrg# Source file extension for C++ test sources.
5384f05b35a2Smrgac_ext=cpp
5385e0963edeSmrg
5386f05b35a2Smrg# Object file extension for compiled C++ test sources.
5387f05b35a2Smrgobjext=o
5388f05b35a2Smrg_LT_TAGVAR(objext, $1)=$objext
5389f05b35a2Smrg
5390f05b35a2Smrg# No sense in running all these tests if we already determined that
5391f05b35a2Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5392f05b35a2Smrg# are currently assumed to apply to all compilers on this platform,
5393f05b35a2Smrg# and will be corrupted by setting them based on a non-working compiler.
5394f05b35a2Smrgif test "$_lt_caught_CXX_error" != yes; then
5395f05b35a2Smrg  # Code to be used in simple compile tests
5396f05b35a2Smrg  lt_simple_compile_test_code="int some_variable = 0;"
5397f05b35a2Smrg
5398f05b35a2Smrg  # Code to be used in simple link tests
5399f05b35a2Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5400f05b35a2Smrg
5401f05b35a2Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5402f05b35a2Smrg  _LT_TAG_COMPILER
5403f05b35a2Smrg
5404f05b35a2Smrg  # save warnings/boilerplate of simple test code
5405f05b35a2Smrg  _LT_COMPILER_BOILERPLATE
5406f05b35a2Smrg  _LT_LINKER_BOILERPLATE
5407f05b35a2Smrg
5408f05b35a2Smrg  # Allow CC to be a program name with arguments.
5409f05b35a2Smrg  lt_save_CC=$CC
5410f05b35a2Smrg  lt_save_LD=$LD
5411f05b35a2Smrg  lt_save_GCC=$GCC
5412f05b35a2Smrg  GCC=$GXX
5413f05b35a2Smrg  lt_save_with_gnu_ld=$with_gnu_ld
5414f05b35a2Smrg  lt_save_path_LD=$lt_cv_path_LD
5415f05b35a2Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5416f05b35a2Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5417f05b35a2Smrg  else
5418f05b35a2Smrg    $as_unset lt_cv_prog_gnu_ld
5419f05b35a2Smrg  fi
5420f05b35a2Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5421f05b35a2Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5422f05b35a2Smrg  else
5423f05b35a2Smrg    $as_unset lt_cv_path_LD
5424f05b35a2Smrg  fi
5425f05b35a2Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
5426f05b35a2Smrg  CC=${CXX-"c++"}
5427f05b35a2Smrg  compiler=$CC
5428f05b35a2Smrg  _LT_TAGVAR(compiler, $1)=$CC
5429f05b35a2Smrg  _LT_CC_BASENAME([$compiler])
5430e0963edeSmrg
5431f05b35a2Smrg  if test -n "$compiler"; then
5432f05b35a2Smrg    # We don't want -fno-exception when compiling C++ code, so set the
5433f05b35a2Smrg    # no_builtin_flag separately
5434f05b35a2Smrg    if test "$GXX" = yes; then
5435f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5436f05b35a2Smrg    else
5437f05b35a2Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5438f05b35a2Smrg    fi
5439e0963edeSmrg
5440f05b35a2Smrg    if test "$GXX" = yes; then
5441f05b35a2Smrg      # Set up default GNU C++ configuration
5442e0963edeSmrg
5443f05b35a2Smrg      LT_PATH_LD
5444e0963edeSmrg
5445f05b35a2Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5446f05b35a2Smrg      # archiving commands below assume that GNU ld is being used.
5447f05b35a2Smrg      if test "$with_gnu_ld" = yes; then
5448f05b35a2Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5449f05b35a2Smrg        _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'
5450e0963edeSmrg
5451f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5452f05b35a2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5453e0963edeSmrg
5454f05b35a2Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5455f05b35a2Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5456f05b35a2Smrg        #     investigate it a little bit more. (MM)
5457f05b35a2Smrg        wlarc='${wl}'
5458e0963edeSmrg
5459f05b35a2Smrg        # ancient GNU ld didn't support --whole-archive et. al.
5460f05b35a2Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5461f05b35a2Smrg	  $GREP 'no-whole-archive' > /dev/null; then
5462f05b35a2Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5463f05b35a2Smrg        else
5464f05b35a2Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5465f05b35a2Smrg        fi
5466f05b35a2Smrg      else
5467f05b35a2Smrg        with_gnu_ld=no
5468f05b35a2Smrg        wlarc=
5469f05b35a2Smrg
5470f05b35a2Smrg        # A generic and very simple default shared library creation
5471f05b35a2Smrg        # command for GNU C++ for the case where it uses the native
5472f05b35a2Smrg        # linker, instead of GNU ld.  If possible, this setting should
5473f05b35a2Smrg        # overridden to take advantage of the native linker features on
5474f05b35a2Smrg        # the platform it is being used on.
5475f05b35a2Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5476f05b35a2Smrg      fi
5477e0963edeSmrg
5478f05b35a2Smrg      # Commands to make compiler produce verbose output that lists
5479f05b35a2Smrg      # what "hidden" libraries, object files and flags are used when
5480f05b35a2Smrg      # linking a shared library.
5481f05b35a2Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5482e0963edeSmrg
5483f05b35a2Smrg    else
5484f05b35a2Smrg      GXX=no
5485f05b35a2Smrg      with_gnu_ld=no
5486f05b35a2Smrg      wlarc=
5487f05b35a2Smrg    fi
5488e0963edeSmrg
5489f05b35a2Smrg    # PORTME: fill in a description of your system's C++ link characteristics
5490f05b35a2Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5491f05b35a2Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5492f05b35a2Smrg    case $host_os in
5493f05b35a2Smrg      aix3*)
5494f05b35a2Smrg        # FIXME: insert proper C++ library support
5495f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5496f05b35a2Smrg        ;;
5497f05b35a2Smrg      aix[[4-9]]*)
5498f05b35a2Smrg        if test "$host_cpu" = ia64; then
5499f05b35a2Smrg          # On IA64, the linker does run time linking by default, so we don't
5500f05b35a2Smrg          # have to do anything special.
5501f05b35a2Smrg          aix_use_runtimelinking=no
5502f05b35a2Smrg          exp_sym_flag='-Bexport'
5503f05b35a2Smrg          no_entry_flag=""
5504f05b35a2Smrg        else
5505f05b35a2Smrg          aix_use_runtimelinking=no
5506f05b35a2Smrg
5507f05b35a2Smrg          # Test if we are trying to use run time linking or normal
5508f05b35a2Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5509f05b35a2Smrg          # need to do runtime linking.
5510f05b35a2Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5511f05b35a2Smrg	    for ld_flag in $LDFLAGS; do
5512f05b35a2Smrg	      case $ld_flag in
5513f05b35a2Smrg	      *-brtl*)
5514f05b35a2Smrg	        aix_use_runtimelinking=yes
5515f05b35a2Smrg	        break
5516f05b35a2Smrg	        ;;
5517f05b35a2Smrg	      esac
5518f05b35a2Smrg	    done
5519f05b35a2Smrg	    ;;
5520f05b35a2Smrg          esac
5521e0963edeSmrg
5522f05b35a2Smrg          exp_sym_flag='-bexport'
5523f05b35a2Smrg          no_entry_flag='-bnoentry'
5524f05b35a2Smrg        fi
5525e0963edeSmrg
5526f05b35a2Smrg        # When large executables or shared objects are built, AIX ld can
5527f05b35a2Smrg        # have problems creating the table of contents.  If linking a library
5528f05b35a2Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
5529f05b35a2Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5530f05b35a2Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5531f05b35a2Smrg
5532f05b35a2Smrg        _LT_TAGVAR(archive_cmds, $1)=''
5533f05b35a2Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5534f05b35a2Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5535f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5536f05b35a2Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5537f05b35a2Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5538f05b35a2Smrg
5539f05b35a2Smrg        if test "$GXX" = yes; then
5540f05b35a2Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5541f05b35a2Smrg          # We only want to do this on AIX 4.2 and lower, the check
5542f05b35a2Smrg          # below for broken collect2 doesn't work under 4.3+
5543f05b35a2Smrg	  collect2name=`${CC} -print-prog-name=collect2`
5544f05b35a2Smrg	  if test -f "$collect2name" &&
5545f05b35a2Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5546f05b35a2Smrg	  then
5547f05b35a2Smrg	    # We have reworked collect2
5548f05b35a2Smrg	    :
5549f05b35a2Smrg	  else
5550f05b35a2Smrg	    # We have old collect2
5551f05b35a2Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5552f05b35a2Smrg	    # It fails to find uninstalled libraries when the uninstalled
5553f05b35a2Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5554f05b35a2Smrg	    # to unsupported forces relinking
5555f05b35a2Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5556f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5557f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5558f05b35a2Smrg	  fi
5559f05b35a2Smrg          esac
5560f05b35a2Smrg          shared_flag='-shared'
5561f05b35a2Smrg	  if test "$aix_use_runtimelinking" = yes; then
5562f05b35a2Smrg	    shared_flag="$shared_flag "'${wl}-G'
5563f05b35a2Smrg	  fi
5564f05b35a2Smrg        else
5565f05b35a2Smrg          # not using gcc
5566f05b35a2Smrg          if test "$host_cpu" = ia64; then
5567f05b35a2Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5568f05b35a2Smrg	  # chokes on -Wl,-G. The following line is correct:
5569f05b35a2Smrg	  shared_flag='-G'
5570f05b35a2Smrg          else
5571f05b35a2Smrg	    if test "$aix_use_runtimelinking" = yes; then
5572f05b35a2Smrg	      shared_flag='${wl}-G'
5573f05b35a2Smrg	    else
5574f05b35a2Smrg	      shared_flag='${wl}-bM:SRE'
5575f05b35a2Smrg	    fi
5576f05b35a2Smrg          fi
5577f05b35a2Smrg        fi
5578e0963edeSmrg
5579f05b35a2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5580f05b35a2Smrg        # It seems that -bexpall does not export symbols beginning with
5581f05b35a2Smrg        # underscore (_), so it is better to generate a list of symbols to
5582f05b35a2Smrg	# export.
5583f05b35a2Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5584f05b35a2Smrg        if test "$aix_use_runtimelinking" = yes; then
5585f05b35a2Smrg          # Warning - without using the other runtime loading flags (-brtl),
5586f05b35a2Smrg          # -berok will link without error, but may produce a broken library.
5587f05b35a2Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5588f05b35a2Smrg          # Determine the default libpath from the value encoded in an empty
5589f05b35a2Smrg          # executable.
5590f05b35a2Smrg          _LT_SYS_MODULE_PATH_AIX
5591f05b35a2Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5592f05b35a2Smrg
5593f05b35a2Smrg          _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"
5594f05b35a2Smrg        else
5595f05b35a2Smrg          if test "$host_cpu" = ia64; then
5596f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5597f05b35a2Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5598f05b35a2Smrg	    _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"
5599f05b35a2Smrg          else
5600f05b35a2Smrg	    # Determine the default libpath from the value encoded in an
5601f05b35a2Smrg	    # empty executable.
5602f05b35a2Smrg	    _LT_SYS_MODULE_PATH_AIX
5603f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5604f05b35a2Smrg	    # Warning - without using the other run time loading flags,
5605f05b35a2Smrg	    # -berok will link without error, but may produce a broken library.
5606f05b35a2Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5607f05b35a2Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5608f05b35a2Smrg	    # Exported symbols can be pulled into shared objects from archives
5609f05b35a2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5610f05b35a2Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5611f05b35a2Smrg	    # This is similar to how AIX traditionally builds its shared
5612f05b35a2Smrg	    # libraries.
5613f05b35a2Smrg	    _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'
5614f05b35a2Smrg          fi
5615f05b35a2Smrg        fi
5616f05b35a2Smrg        ;;
5617e0963edeSmrg
5618f05b35a2Smrg      beos*)
5619f05b35a2Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5620f05b35a2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621f05b35a2Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5622f05b35a2Smrg	  # support --undefined.  This deserves some investigation.  FIXME
5623f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5624f05b35a2Smrg	else
5625f05b35a2Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5626f05b35a2Smrg	fi
5627f05b35a2Smrg	;;
5628e0963edeSmrg
5629f05b35a2Smrg      chorus*)
5630f05b35a2Smrg        case $cc_basename in
5631f05b35a2Smrg          *)
5632f05b35a2Smrg	  # FIXME: insert proper C++ library support
5633f05b35a2Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5634f05b35a2Smrg	  ;;
5635f05b35a2Smrg        esac
5636f05b35a2Smrg        ;;
5637e0963edeSmrg
5638f05b35a2Smrg      cygwin* | mingw* | pw32* | cegcc*)
5639f05b35a2Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5640f05b35a2Smrg        # as there is no search path for DLLs.
5641f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5642f05b35a2Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5643f05b35a2Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
5644f05b35a2Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5645f05b35a2Smrg
5646f05b35a2Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5647f05b35a2Smrg          _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'
5648f05b35a2Smrg          # If the export-symbols file already is a .def file (1st line
5649f05b35a2Smrg          # is EXPORTS), use it as is; otherwise, prepend...
5650f05b35a2Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5651f05b35a2Smrg	    cp $export_symbols $output_objdir/$soname.def;
5652f05b35a2Smrg          else
5653f05b35a2Smrg	    echo EXPORTS > $output_objdir/$soname.def;
5654f05b35a2Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
5655f05b35a2Smrg          fi~
5656f05b35a2Smrg          $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'
5657f05b35a2Smrg        else
5658f05b35a2Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
5659f05b35a2Smrg        fi
5660f05b35a2Smrg        ;;
5661f05b35a2Smrg      darwin* | rhapsody*)
5662f05b35a2Smrg        _LT_DARWIN_LINKER_FEATURES($1)
5663f05b35a2Smrg	;;
5664e0963edeSmrg
5665f05b35a2Smrg      dgux*)
5666f05b35a2Smrg        case $cc_basename in
5667f05b35a2Smrg          ec++*)
5668f05b35a2Smrg	    # FIXME: insert proper C++ library support
5669f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5670f05b35a2Smrg	    ;;
5671f05b35a2Smrg          ghcx*)
5672f05b35a2Smrg	    # Green Hills C++ Compiler
5673f05b35a2Smrg	    # FIXME: insert proper C++ library support
5674f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5675f05b35a2Smrg	    ;;
5676f05b35a2Smrg          *)
5677f05b35a2Smrg	    # FIXME: insert proper C++ library support
5678f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5679f05b35a2Smrg	    ;;
5680f05b35a2Smrg        esac
5681f05b35a2Smrg        ;;
5682e0963edeSmrg
5683f05b35a2Smrg      freebsd[[12]]*)
5684f05b35a2Smrg        # C++ shared libraries reported to be fairly broken before
5685f05b35a2Smrg	# switch to ELF
5686f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
5687f05b35a2Smrg        ;;
5688e0963edeSmrg
5689f05b35a2Smrg      freebsd-elf*)
5690f05b35a2Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5691f05b35a2Smrg        ;;
5692e0963edeSmrg
5693f05b35a2Smrg      freebsd* | dragonfly*)
5694f05b35a2Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5695f05b35a2Smrg        # conventions
5696f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5697f05b35a2Smrg        ;;
5698e0963edeSmrg
5699f05b35a2Smrg      gnu*)
5700f05b35a2Smrg        ;;
5701e0963edeSmrg
5702f05b35a2Smrg      hpux9*)
5703f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5704f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5705f05b35a2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5706f05b35a2Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5707f05b35a2Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5708f05b35a2Smrg				             # but as the default
5709f05b35a2Smrg				             # location of the library.
5710f05b35a2Smrg
5711f05b35a2Smrg        case $cc_basename in
5712f05b35a2Smrg          CC*)
5713f05b35a2Smrg            # FIXME: insert proper C++ library support
5714f05b35a2Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
5715f05b35a2Smrg            ;;
5716f05b35a2Smrg          aCC*)
5717f05b35a2Smrg            _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'
5718f05b35a2Smrg            # Commands to make compiler produce verbose output that lists
5719f05b35a2Smrg            # what "hidden" libraries, object files and flags are used when
5720f05b35a2Smrg            # linking a shared library.
5721f05b35a2Smrg            #
5722f05b35a2Smrg            # There doesn't appear to be a way to prevent this compiler from
5723f05b35a2Smrg            # explicitly linking system object files so we need to strip them
5724f05b35a2Smrg            # from the output so that they don't get included in the library
5725f05b35a2Smrg            # dependencies.
5726f05b35a2Smrg            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'
5727f05b35a2Smrg            ;;
5728f05b35a2Smrg          *)
5729f05b35a2Smrg            if test "$GXX" = yes; then
5730f05b35a2Smrg              _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'
5731f05b35a2Smrg            else
5732f05b35a2Smrg              # FIXME: insert proper C++ library support
5733f05b35a2Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
5734f05b35a2Smrg            fi
5735f05b35a2Smrg            ;;
5736f05b35a2Smrg        esac
5737f05b35a2Smrg        ;;
5738e0963edeSmrg
5739f05b35a2Smrg      hpux10*|hpux11*)
5740f05b35a2Smrg        if test $with_gnu_ld = no; then
5741f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5742f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5743f05b35a2Smrg
5744f05b35a2Smrg          case $host_cpu in
5745f05b35a2Smrg            hppa*64*|ia64*)
5746f05b35a2Smrg              ;;
5747f05b35a2Smrg            *)
5748f05b35a2Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749f05b35a2Smrg              ;;
5750f05b35a2Smrg          esac
5751f05b35a2Smrg        fi
5752f05b35a2Smrg        case $host_cpu in
5753f05b35a2Smrg          hppa*64*|ia64*)
5754f05b35a2Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
5755f05b35a2Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5756f05b35a2Smrg            ;;
5757f05b35a2Smrg          *)
5758f05b35a2Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5759f05b35a2Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760f05b35a2Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5761f05b35a2Smrg					         # but as the default
5762f05b35a2Smrg					         # location of the library.
5763f05b35a2Smrg            ;;
5764f05b35a2Smrg        esac
5765e0963edeSmrg
5766f05b35a2Smrg        case $cc_basename in
5767f05b35a2Smrg          CC*)
5768f05b35a2Smrg	    # FIXME: insert proper C++ library support
5769f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5770f05b35a2Smrg	    ;;
5771f05b35a2Smrg          aCC*)
5772f05b35a2Smrg	    case $host_cpu in
5773f05b35a2Smrg	      hppa*64*)
5774f05b35a2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5775f05b35a2Smrg	        ;;
5776f05b35a2Smrg	      ia64*)
5777f05b35a2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5778f05b35a2Smrg	        ;;
5779f05b35a2Smrg	      *)
5780f05b35a2Smrg	        _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'
5781f05b35a2Smrg	        ;;
5782f05b35a2Smrg	    esac
5783f05b35a2Smrg	    # Commands to make compiler produce verbose output that lists
5784f05b35a2Smrg	    # what "hidden" libraries, object files and flags are used when
5785f05b35a2Smrg	    # linking a shared library.
5786f05b35a2Smrg	    #
5787f05b35a2Smrg	    # There doesn't appear to be a way to prevent this compiler from
5788f05b35a2Smrg	    # explicitly linking system object files so we need to strip them
5789f05b35a2Smrg	    # from the output so that they don't get included in the library
5790f05b35a2Smrg	    # dependencies.
5791f05b35a2Smrg	    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'
5792f05b35a2Smrg	    ;;
5793f05b35a2Smrg          *)
5794f05b35a2Smrg	    if test "$GXX" = yes; then
5795f05b35a2Smrg	      if test $with_gnu_ld = no; then
5796f05b35a2Smrg	        case $host_cpu in
5797f05b35a2Smrg	          hppa*64*)
5798f05b35a2Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5799f05b35a2Smrg	            ;;
5800f05b35a2Smrg	          ia64*)
5801f05b35a2Smrg	            _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'
5802f05b35a2Smrg	            ;;
5803f05b35a2Smrg	          *)
5804f05b35a2Smrg	            _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'
5805f05b35a2Smrg	            ;;
5806f05b35a2Smrg	        esac
5807f05b35a2Smrg	      fi
5808f05b35a2Smrg	    else
5809f05b35a2Smrg	      # FIXME: insert proper C++ library support
5810f05b35a2Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5811f05b35a2Smrg	    fi
5812f05b35a2Smrg	    ;;
5813f05b35a2Smrg        esac
5814f05b35a2Smrg        ;;
5815e0963edeSmrg
5816f05b35a2Smrg      interix[[3-9]]*)
5817f05b35a2Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
5818f05b35a2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5820f05b35a2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5821f05b35a2Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5822f05b35a2Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5823f05b35a2Smrg	# default) and relocated if they conflict, which is a slow very memory
5824f05b35a2Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5825f05b35a2Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5826f05b35a2Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5827f05b35a2Smrg	_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'
5828f05b35a2Smrg	_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'
5829f05b35a2Smrg	;;
5830f05b35a2Smrg      irix5* | irix6*)
5831f05b35a2Smrg        case $cc_basename in
5832f05b35a2Smrg          CC*)
5833f05b35a2Smrg	    # SGI C++
5834f05b35a2Smrg	    _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'
5835f05b35a2Smrg
5836f05b35a2Smrg	    # Archives containing C++ object files must be created using
5837f05b35a2Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5838f05b35a2Smrg	    # necessary to make sure instantiated templates are included
5839f05b35a2Smrg	    # in the archive.
5840f05b35a2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5841f05b35a2Smrg	    ;;
5842f05b35a2Smrg          *)
5843f05b35a2Smrg	    if test "$GXX" = yes; then
5844f05b35a2Smrg	      if test "$with_gnu_ld" = no; then
5845f05b35a2Smrg	        _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'
5846f05b35a2Smrg	      else
5847f05b35a2Smrg	        _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'
5848f05b35a2Smrg	      fi
5849f05b35a2Smrg	    fi
5850f05b35a2Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5851f05b35a2Smrg	    ;;
5852f05b35a2Smrg        esac
5853f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5854f05b35a2Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5855f05b35a2Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5856f05b35a2Smrg        ;;
5857e0963edeSmrg
5858f05b35a2Smrg      linux* | k*bsd*-gnu)
5859f05b35a2Smrg        case $cc_basename in
5860f05b35a2Smrg          KCC*)
5861f05b35a2Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5862f05b35a2Smrg
5863f05b35a2Smrg	    # KCC will only create a shared library if the output file
5864f05b35a2Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5865f05b35a2Smrg	    # to its proper name (with version) after linking.
5866f05b35a2Smrg	    _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'
5867f05b35a2Smrg	    _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'
5868f05b35a2Smrg	    # Commands to make compiler produce verbose output that lists
5869f05b35a2Smrg	    # what "hidden" libraries, object files and flags are used when
5870f05b35a2Smrg	    # linking a shared library.
5871f05b35a2Smrg	    #
5872f05b35a2Smrg	    # There doesn't appear to be a way to prevent this compiler from
5873f05b35a2Smrg	    # explicitly linking system object files so we need to strip them
5874f05b35a2Smrg	    # from the output so that they don't get included in the library
5875f05b35a2Smrg	    # dependencies.
5876f05b35a2Smrg	    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'
5877f05b35a2Smrg
5878f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5879f05b35a2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5880f05b35a2Smrg
5881f05b35a2Smrg	    # Archives containing C++ object files must be created using
5882f05b35a2Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5883f05b35a2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5884f05b35a2Smrg	    ;;
5885f05b35a2Smrg	  icpc* | ecpc* )
5886f05b35a2Smrg	    # Intel C++
5887f05b35a2Smrg	    with_gnu_ld=yes
5888f05b35a2Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5889f05b35a2Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5890f05b35a2Smrg	    # earlier do not add the objects themselves.
5891f05b35a2Smrg	    case `$CC -V 2>&1` in
5892f05b35a2Smrg	      *"Version 7."*)
5893f05b35a2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5894f05b35a2Smrg		_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'
5895f05b35a2Smrg		;;
5896f05b35a2Smrg	      *)  # Version 8.0 or newer
5897f05b35a2Smrg	        tmp_idyn=
5898f05b35a2Smrg	        case $host_cpu in
5899f05b35a2Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
5900f05b35a2Smrg		esac
5901f05b35a2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5902f05b35a2Smrg		_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'
5903f05b35a2Smrg		;;
5904f05b35a2Smrg	    esac
5905f05b35a2Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5906f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5907f05b35a2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5908f05b35a2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5909f05b35a2Smrg	    ;;
5910f05b35a2Smrg          pgCC* | pgcpp*)
5911f05b35a2Smrg            # Portland Group C++ compiler
5912f05b35a2Smrg	    case `$CC -V` in
5913f05b35a2Smrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5914f05b35a2Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5915f05b35a2Smrg		rm -rf $tpldir~
5916f05b35a2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5917f05b35a2Smrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5918f05b35a2Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5919f05b35a2Smrg		rm -rf $tpldir~
5920f05b35a2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5921f05b35a2Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5922f05b35a2Smrg		$RANLIB $oldlib'
5923f05b35a2Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5924f05b35a2Smrg		rm -rf $tpldir~
5925f05b35a2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5926f05b35a2Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5927f05b35a2Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5928f05b35a2Smrg		rm -rf $tpldir~
5929f05b35a2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5930f05b35a2Smrg		$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'
5931f05b35a2Smrg	      ;;
5932f05b35a2Smrg	    *) # Version 6 will use weak symbols
5933f05b35a2Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5934f05b35a2Smrg	      _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'
5935f05b35a2Smrg	      ;;
5936f05b35a2Smrg	    esac
5937e0963edeSmrg
5938f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5939f05b35a2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5940f05b35a2Smrg	    _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'
5941f05b35a2Smrg            ;;
5942f05b35a2Smrg	  cxx*)
5943f05b35a2Smrg	    # Compaq C++
5944f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5945f05b35a2Smrg	    _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'
5946e0963edeSmrg
5947f05b35a2Smrg	    runpath_var=LD_RUN_PATH
5948f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5949f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5950e0963edeSmrg
5951f05b35a2Smrg	    # Commands to make compiler produce verbose output that lists
5952f05b35a2Smrg	    # what "hidden" libraries, object files and flags are used when
5953f05b35a2Smrg	    # linking a shared library.
5954f05b35a2Smrg	    #
5955f05b35a2Smrg	    # There doesn't appear to be a way to prevent this compiler from
5956f05b35a2Smrg	    # explicitly linking system object files so we need to strip them
5957f05b35a2Smrg	    # from the output so that they don't get included in the library
5958f05b35a2Smrg	    # dependencies.
5959f05b35a2Smrg	    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'
5960f05b35a2Smrg	    ;;
5961f05b35a2Smrg	  xl*)
5962f05b35a2Smrg	    # IBM XL 8.0 on PPC, with GNU ld
5963f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5964f05b35a2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5965f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5966f05b35a2Smrg	    if test "x$supports_anon_versioning" = xyes; then
5967f05b35a2Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5968f05b35a2Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5969f05b35a2Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5970f05b35a2Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5971f05b35a2Smrg	    fi
5972f05b35a2Smrg	    ;;
5973f05b35a2Smrg	  *)
5974f05b35a2Smrg	    case `$CC -V 2>&1 | sed 5q` in
5975f05b35a2Smrg	    *Sun\ C*)
5976f05b35a2Smrg	      # Sun C++ 5.9
5977f05b35a2Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5978f05b35a2Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5979f05b35a2Smrg	      _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'
5980f05b35a2Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5981f05b35a2Smrg	      _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'
5982f05b35a2Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5983f05b35a2Smrg
5984f05b35a2Smrg	      # Not sure whether something based on
5985f05b35a2Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5986f05b35a2Smrg	      # would be better.
5987f05b35a2Smrg	      output_verbose_link_cmd='echo'
5988f05b35a2Smrg
5989f05b35a2Smrg	      # Archives containing C++ object files must be created using
5990f05b35a2Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5991f05b35a2Smrg	      # necessary to make sure instantiated templates are included
5992f05b35a2Smrg	      # in the archive.
5993f05b35a2Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5994f05b35a2Smrg	      ;;
5995f05b35a2Smrg	    esac
5996f05b35a2Smrg	    ;;
5997f05b35a2Smrg	esac
5998f05b35a2Smrg	;;
5999e0963edeSmrg
6000f05b35a2Smrg      lynxos*)
6001f05b35a2Smrg        # FIXME: insert proper C++ library support
6002f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6003f05b35a2Smrg	;;
6004e0963edeSmrg
6005f05b35a2Smrg      m88k*)
6006f05b35a2Smrg        # FIXME: insert proper C++ library support
6007f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6008f05b35a2Smrg	;;
6009e0963edeSmrg
6010f05b35a2Smrg      mvs*)
6011f05b35a2Smrg        case $cc_basename in
6012f05b35a2Smrg          cxx*)
6013f05b35a2Smrg	    # FIXME: insert proper C++ library support
6014f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6015f05b35a2Smrg	    ;;
6016f05b35a2Smrg	  *)
6017f05b35a2Smrg	    # FIXME: insert proper C++ library support
6018f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6019f05b35a2Smrg	    ;;
6020f05b35a2Smrg	esac
6021f05b35a2Smrg	;;
6022e0963edeSmrg
6023f05b35a2Smrg      netbsd*)
6024f05b35a2Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6025f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6026f05b35a2Smrg	  wlarc=
6027f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6028f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6029f05b35a2Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030f05b35a2Smrg	fi
6031f05b35a2Smrg	# Workaround some broken pre-1.5 toolchains
6032f05b35a2Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6033f05b35a2Smrg	;;
6034e0963edeSmrg
6035f05b35a2Smrg      *nto* | *qnx*)
6036f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6037f05b35a2Smrg	;;
6038e0963edeSmrg
6039f05b35a2Smrg      openbsd2*)
6040f05b35a2Smrg        # C++ shared libraries are fairly broken
6041f05b35a2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6042f05b35a2Smrg	;;
6043e0963edeSmrg
6044f05b35a2Smrg      openbsd*)
6045f05b35a2Smrg	if test -f /usr/libexec/ld.so; then
6046f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6047f05b35a2Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6048f05b35a2Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6049f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050f05b35a2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6051f05b35a2Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6052f05b35a2Smrg	    _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'
6053f05b35a2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6054f05b35a2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6055f05b35a2Smrg	  fi
6056f05b35a2Smrg	  output_verbose_link_cmd=echo
6057f05b35a2Smrg	else
6058f05b35a2Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6059f05b35a2Smrg	fi
6060f05b35a2Smrg	;;
6061e0963edeSmrg
6062f05b35a2Smrg      osf3* | osf4* | osf5*)
6063f05b35a2Smrg        case $cc_basename in
6064f05b35a2Smrg          KCC*)
6065f05b35a2Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6066f05b35a2Smrg
6067f05b35a2Smrg	    # KCC will only create a shared library if the output file
6068f05b35a2Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6069f05b35a2Smrg	    # to its proper name (with version) after linking.
6070f05b35a2Smrg	    _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'
6071f05b35a2Smrg
6072f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6073f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6074f05b35a2Smrg
6075f05b35a2Smrg	    # Archives containing C++ object files must be created using
6076f05b35a2Smrg	    # the KAI C++ compiler.
6077f05b35a2Smrg	    case $host in
6078f05b35a2Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6079f05b35a2Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6080f05b35a2Smrg	    esac
6081f05b35a2Smrg	    ;;
6082f05b35a2Smrg          RCC*)
6083f05b35a2Smrg	    # Rational C++ 2.4.1
6084f05b35a2Smrg	    # FIXME: insert proper C++ library support
6085f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6086f05b35a2Smrg	    ;;
6087f05b35a2Smrg          cxx*)
6088f05b35a2Smrg	    case $host in
6089f05b35a2Smrg	      osf3*)
6090f05b35a2Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6091f05b35a2Smrg	        _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'
6092f05b35a2Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6093f05b35a2Smrg		;;
6094f05b35a2Smrg	      *)
6095f05b35a2Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6096f05b35a2Smrg	        _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'
6097f05b35a2Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6098f05b35a2Smrg	          echo "-hidden">> $lib.exp~
6099f05b35a2Smrg	          $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~
6100f05b35a2Smrg	          $RM $lib.exp'
6101f05b35a2Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6102f05b35a2Smrg		;;
6103f05b35a2Smrg	    esac
6104e0963edeSmrg
6105f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6106e0963edeSmrg
6107f05b35a2Smrg	    # Commands to make compiler produce verbose output that lists
6108f05b35a2Smrg	    # what "hidden" libraries, object files and flags are used when
6109f05b35a2Smrg	    # linking a shared library.
6110f05b35a2Smrg	    #
6111f05b35a2Smrg	    # There doesn't appear to be a way to prevent this compiler from
6112f05b35a2Smrg	    # explicitly linking system object files so we need to strip them
6113f05b35a2Smrg	    # from the output so that they don't get included in the library
6114f05b35a2Smrg	    # dependencies.
6115f05b35a2Smrg	    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'
6116f05b35a2Smrg	    ;;
6117f05b35a2Smrg	  *)
6118f05b35a2Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6119f05b35a2Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6120f05b35a2Smrg	      case $host in
6121f05b35a2Smrg	        osf3*)
6122f05b35a2Smrg	          _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'
6123f05b35a2Smrg		  ;;
6124f05b35a2Smrg	        *)
6125f05b35a2Smrg	          _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'
6126f05b35a2Smrg		  ;;
6127f05b35a2Smrg	      esac
6128f05b35a2Smrg
6129f05b35a2Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130f05b35a2Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6131f05b35a2Smrg
6132f05b35a2Smrg	      # Commands to make compiler produce verbose output that lists
6133f05b35a2Smrg	      # what "hidden" libraries, object files and flags are used when
6134f05b35a2Smrg	      # linking a shared library.
6135f05b35a2Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6136f05b35a2Smrg
6137f05b35a2Smrg	    else
6138f05b35a2Smrg	      # FIXME: insert proper C++ library support
6139f05b35a2Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6140f05b35a2Smrg	    fi
6141f05b35a2Smrg	    ;;
6142f05b35a2Smrg        esac
6143f05b35a2Smrg        ;;
6144e0963edeSmrg
6145f05b35a2Smrg      psos*)
6146f05b35a2Smrg        # FIXME: insert proper C++ library support
6147f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6148f05b35a2Smrg        ;;
6149e0963edeSmrg
6150f05b35a2Smrg      sunos4*)
6151f05b35a2Smrg        case $cc_basename in
6152f05b35a2Smrg          CC*)
6153f05b35a2Smrg	    # Sun C++ 4.x
6154f05b35a2Smrg	    # FIXME: insert proper C++ library support
6155f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6156f05b35a2Smrg	    ;;
6157f05b35a2Smrg          lcc*)
6158f05b35a2Smrg	    # Lucid
6159f05b35a2Smrg	    # FIXME: insert proper C++ library support
6160f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6161f05b35a2Smrg	    ;;
6162f05b35a2Smrg          *)
6163f05b35a2Smrg	    # FIXME: insert proper C++ library support
6164f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6165f05b35a2Smrg	    ;;
6166f05b35a2Smrg        esac
6167f05b35a2Smrg        ;;
6168e0963edeSmrg
6169f05b35a2Smrg      solaris*)
6170f05b35a2Smrg        case $cc_basename in
6171f05b35a2Smrg          CC*)
6172f05b35a2Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
6173f05b35a2Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6174f05b35a2Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6175f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6176f05b35a2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6177f05b35a2Smrg	      $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'
6178f05b35a2Smrg
6179f05b35a2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6180f05b35a2Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6181f05b35a2Smrg	    case $host_os in
6182f05b35a2Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6183f05b35a2Smrg	      *)
6184f05b35a2Smrg		# The compiler driver will combine and reorder linker options,
6185f05b35a2Smrg		# but understands `-z linker_flag'.
6186f05b35a2Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6187f05b35a2Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6188f05b35a2Smrg	        ;;
6189f05b35a2Smrg	    esac
6190f05b35a2Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6191e0963edeSmrg
6192f05b35a2Smrg	    output_verbose_link_cmd='echo'
6193e0963edeSmrg
6194f05b35a2Smrg	    # Archives containing C++ object files must be created using
6195f05b35a2Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6196f05b35a2Smrg	    # necessary to make sure instantiated templates are included
6197f05b35a2Smrg	    # in the archive.
6198f05b35a2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6199f05b35a2Smrg	    ;;
6200f05b35a2Smrg          gcx*)
6201f05b35a2Smrg	    # Green Hills C++ Compiler
6202f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6203e0963edeSmrg
6204f05b35a2Smrg	    # The C++ compiler must be used to create the archive.
6205f05b35a2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6206f05b35a2Smrg	    ;;
6207f05b35a2Smrg          *)
6208f05b35a2Smrg	    # GNU C++ compiler with Solaris linker
6209f05b35a2Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6210f05b35a2Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6211f05b35a2Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6212f05b35a2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6213f05b35a2Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6214f05b35a2Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6215f05b35a2Smrg
6216f05b35a2Smrg	        # Commands to make compiler produce verbose output that lists
6217f05b35a2Smrg	        # what "hidden" libraries, object files and flags are used when
6218f05b35a2Smrg	        # linking a shared library.
6219f05b35a2Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6220f05b35a2Smrg	      else
6221f05b35a2Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6222f05b35a2Smrg	        # platform.
6223f05b35a2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6224f05b35a2Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6225f05b35a2Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6226f05b35a2Smrg
6227f05b35a2Smrg	        # Commands to make compiler produce verbose output that lists
6228f05b35a2Smrg	        # what "hidden" libraries, object files and flags are used when
6229f05b35a2Smrg	        # linking a shared library.
6230f05b35a2Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6231f05b35a2Smrg	      fi
6232f05b35a2Smrg
6233f05b35a2Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6234f05b35a2Smrg	      case $host_os in
6235f05b35a2Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6236f05b35a2Smrg		*)
6237f05b35a2Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6238f05b35a2Smrg		  ;;
6239f05b35a2Smrg	      esac
6240f05b35a2Smrg	    fi
6241f05b35a2Smrg	    ;;
6242f05b35a2Smrg        esac
6243f05b35a2Smrg        ;;
6244e0963edeSmrg
6245f05b35a2Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6246f05b35a2Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6247f05b35a2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6248f05b35a2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249f05b35a2Smrg      runpath_var='LD_RUN_PATH'
6250e0963edeSmrg
6251f05b35a2Smrg      case $cc_basename in
6252f05b35a2Smrg        CC*)
6253f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6254f05b35a2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6255f05b35a2Smrg	  ;;
6256f05b35a2Smrg	*)
6257f05b35a2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6258f05b35a2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6259f05b35a2Smrg	  ;;
6260f05b35a2Smrg      esac
6261f05b35a2Smrg      ;;
6262e0963edeSmrg
6263f05b35a2Smrg      sysv5* | sco3.2v5* | sco5v6*)
6264f05b35a2Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
6265f05b35a2Smrg	# link with -lc, and that would cause any symbols used from libc to
6266f05b35a2Smrg	# always be unresolved, which means just about no library would
6267f05b35a2Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
6268f05b35a2Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
6269f05b35a2Smrg	# as -z defs.
6270f05b35a2Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6271f05b35a2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6272f05b35a2Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6273f05b35a2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6274f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6275f05b35a2Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6276f05b35a2Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6277f05b35a2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6278f05b35a2Smrg	runpath_var='LD_RUN_PATH'
6279e0963edeSmrg
6280f05b35a2Smrg	case $cc_basename in
6281f05b35a2Smrg          CC*)
6282f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6283f05b35a2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6284f05b35a2Smrg	    ;;
6285f05b35a2Smrg	  *)
6286f05b35a2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6287f05b35a2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6288f05b35a2Smrg	    ;;
6289f05b35a2Smrg	esac
6290f05b35a2Smrg      ;;
6291e0963edeSmrg
6292f05b35a2Smrg      tandem*)
6293f05b35a2Smrg        case $cc_basename in
6294f05b35a2Smrg          NCC*)
6295f05b35a2Smrg	    # NonStop-UX NCC 3.20
6296f05b35a2Smrg	    # FIXME: insert proper C++ library support
6297f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6298f05b35a2Smrg	    ;;
6299f05b35a2Smrg          *)
6300f05b35a2Smrg	    # FIXME: insert proper C++ library support
6301f05b35a2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6302f05b35a2Smrg	    ;;
6303f05b35a2Smrg        esac
6304f05b35a2Smrg        ;;
6305e0963edeSmrg
6306f05b35a2Smrg      vxworks*)
6307f05b35a2Smrg        # FIXME: insert proper C++ library support
6308f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6309f05b35a2Smrg        ;;
6310e0963edeSmrg
6311f05b35a2Smrg      *)
6312f05b35a2Smrg        # FIXME: insert proper C++ library support
6313f05b35a2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6314f05b35a2Smrg        ;;
6315f05b35a2Smrg    esac
6316e0963edeSmrg
6317f05b35a2Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6318f05b35a2Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6319f05b35a2Smrg
6320f05b35a2Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
6321f05b35a2Smrg    _LT_TAGVAR(LD, $1)="$LD"
6322f05b35a2Smrg
6323f05b35a2Smrg    ## CAVEAT EMPTOR:
6324f05b35a2Smrg    ## There is no encapsulation within the following macros, do not change
6325f05b35a2Smrg    ## the running order or otherwise move them around unless you know exactly
6326f05b35a2Smrg    ## what you are doing...
6327f05b35a2Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6328f05b35a2Smrg    _LT_COMPILER_PIC($1)
6329f05b35a2Smrg    _LT_COMPILER_C_O($1)
6330f05b35a2Smrg    _LT_COMPILER_FILE_LOCKS($1)
6331f05b35a2Smrg    _LT_LINKER_SHLIBS($1)
6332f05b35a2Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6333f05b35a2Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6334f05b35a2Smrg
6335f05b35a2Smrg    _LT_CONFIG($1)
6336f05b35a2Smrg  fi # test -n "$compiler"
6337f05b35a2Smrg
6338f05b35a2Smrg  CC=$lt_save_CC
6339f05b35a2Smrg  LDCXX=$LD
6340f05b35a2Smrg  LD=$lt_save_LD
6341f05b35a2Smrg  GCC=$lt_save_GCC
6342f05b35a2Smrg  with_gnu_ld=$lt_save_with_gnu_ld
6343f05b35a2Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6344f05b35a2Smrg  lt_cv_path_LD=$lt_save_path_LD
6345f05b35a2Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6346f05b35a2Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6347f05b35a2Smrgfi # test "$_lt_caught_CXX_error" != yes
6348e0963edeSmrg
6349f05b35a2SmrgAC_LANG_POP
6350f05b35a2Smrg])# _LT_LANG_CXX_CONFIG
6351e0963edeSmrg
6352e0963edeSmrg
6353f05b35a2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6354f05b35a2Smrg# ---------------------------------
6355f05b35a2Smrg# Figure out "hidden" library dependencies from verbose
6356f05b35a2Smrg# compiler output when linking a shared library.
6357f05b35a2Smrg# Parse the compiler output and extract the necessary
6358f05b35a2Smrg# objects, libraries and library flags.
6359f05b35a2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6360f05b35a2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6361f05b35a2Smrg# Dependencies to place before and after the object being linked:
6362f05b35a2Smrg_LT_TAGVAR(predep_objects, $1)=
6363f05b35a2Smrg_LT_TAGVAR(postdep_objects, $1)=
6364f05b35a2Smrg_LT_TAGVAR(predeps, $1)=
6365f05b35a2Smrg_LT_TAGVAR(postdeps, $1)=
6366f05b35a2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6367e0963edeSmrg
6368f05b35a2Smrgdnl we can't use the lt_simple_compile_test_code here,
6369f05b35a2Smrgdnl because it contains code intended for an executable,
6370f05b35a2Smrgdnl not a library.  It's possible we should let each
6371f05b35a2Smrgdnl tag define a new lt_????_link_test_code variable,
6372f05b35a2Smrgdnl but it's only used here...
6373f05b35a2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6374f05b35a2Smrgint a;
6375f05b35a2Smrgvoid foo (void) { a = 0; }
6376f05b35a2Smrg_LT_EOF
6377f05b35a2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6378f05b35a2Smrgclass Foo
6379f05b35a2Smrg{
6380f05b35a2Smrgpublic:
6381f05b35a2Smrg  Foo (void) { a = 0; }
6382f05b35a2Smrgprivate:
6383f05b35a2Smrg  int a;
6384f05b35a2Smrg};
6385f05b35a2Smrg_LT_EOF
6386f05b35a2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6387f05b35a2Smrg      subroutine foo
6388f05b35a2Smrg      implicit none
6389f05b35a2Smrg      integer*4 a
6390f05b35a2Smrg      a=0
6391f05b35a2Smrg      return
6392f05b35a2Smrg      end
6393f05b35a2Smrg_LT_EOF
6394f05b35a2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6395f05b35a2Smrg      subroutine foo
6396f05b35a2Smrg      implicit none
6397f05b35a2Smrg      integer a
6398f05b35a2Smrg      a=0
6399f05b35a2Smrg      return
6400f05b35a2Smrg      end
6401f05b35a2Smrg_LT_EOF
6402f05b35a2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6403f05b35a2Smrgpublic class foo {
6404f05b35a2Smrg  private int a;
6405f05b35a2Smrg  public void bar (void) {
6406f05b35a2Smrg    a = 0;
6407f05b35a2Smrg  }
6408f05b35a2Smrg};
6409f05b35a2Smrg_LT_EOF
6410f05b35a2Smrg])
6411f05b35a2Smrgdnl Parse the compiler output and extract the necessary
6412f05b35a2Smrgdnl objects, libraries and library flags.
6413f05b35a2Smrgif AC_TRY_EVAL(ac_compile); then
6414f05b35a2Smrg  # Parse the compiler output and extract the necessary
6415f05b35a2Smrg  # objects, libraries and library flags.
6416e0963edeSmrg
6417f05b35a2Smrg  # Sentinel used to keep track of whether or not we are before
6418f05b35a2Smrg  # the conftest object file.
6419f05b35a2Smrg  pre_test_object_deps_done=no
6420e0963edeSmrg
6421f05b35a2Smrg  for p in `eval "$output_verbose_link_cmd"`; do
6422f05b35a2Smrg    case $p in
6423e0963edeSmrg
6424f05b35a2Smrg    -L* | -R* | -l*)
6425f05b35a2Smrg       # Some compilers place space between "-{L,R}" and the path.
6426f05b35a2Smrg       # Remove the space.
6427f05b35a2Smrg       if test $p = "-L" ||
6428f05b35a2Smrg          test $p = "-R"; then
6429f05b35a2Smrg	 prev=$p
6430f05b35a2Smrg	 continue
6431f05b35a2Smrg       else
6432f05b35a2Smrg	 prev=
6433f05b35a2Smrg       fi
6434e0963edeSmrg
6435f05b35a2Smrg       if test "$pre_test_object_deps_done" = no; then
6436f05b35a2Smrg	 case $p in
6437f05b35a2Smrg	 -L* | -R*)
6438f05b35a2Smrg	   # Internal compiler library paths should come after those
6439f05b35a2Smrg	   # provided the user.  The postdeps already come after the
6440f05b35a2Smrg	   # user supplied libs so there is no need to process them.
6441f05b35a2Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6442f05b35a2Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6443f05b35a2Smrg	   else
6444f05b35a2Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6445f05b35a2Smrg	   fi
6446f05b35a2Smrg	   ;;
6447f05b35a2Smrg	 # The "-l" case would never come before the object being
6448f05b35a2Smrg	 # linked, so don't bother handling this case.
6449f05b35a2Smrg	 esac
6450f05b35a2Smrg       else
6451f05b35a2Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6452f05b35a2Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6453f05b35a2Smrg	 else
6454f05b35a2Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6455f05b35a2Smrg	 fi
6456f05b35a2Smrg       fi
6457f05b35a2Smrg       ;;
6458e0963edeSmrg
6459f05b35a2Smrg    *.$objext)
6460f05b35a2Smrg       # This assumes that the test object file only shows up
6461f05b35a2Smrg       # once in the compiler output.
6462f05b35a2Smrg       if test "$p" = "conftest.$objext"; then
6463f05b35a2Smrg	 pre_test_object_deps_done=yes
6464f05b35a2Smrg	 continue
6465f05b35a2Smrg       fi
6466e0963edeSmrg
6467f05b35a2Smrg       if test "$pre_test_object_deps_done" = no; then
6468f05b35a2Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6469f05b35a2Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6470f05b35a2Smrg	 else
6471f05b35a2Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6472f05b35a2Smrg	 fi
6473f05b35a2Smrg       else
6474f05b35a2Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6475f05b35a2Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6476f05b35a2Smrg	 else
6477f05b35a2Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6478f05b35a2Smrg	 fi
6479f05b35a2Smrg       fi
6480f05b35a2Smrg       ;;
6481e0963edeSmrg
6482f05b35a2Smrg    *) ;; # Ignore the rest.
6483e0963edeSmrg
6484f05b35a2Smrg    esac
6485f05b35a2Smrg  done
6486e0963edeSmrg
6487f05b35a2Smrg  # Clean up.
6488f05b35a2Smrg  rm -f a.out a.exe
6489f05b35a2Smrgelse
6490f05b35a2Smrg  echo "libtool.m4: error: problem compiling $1 test program"
6491e0963edeSmrgfi
6492e0963edeSmrg
6493f05b35a2Smrg$RM -f confest.$objext
6494e0963edeSmrg
6495f05b35a2Smrg# PORTME: override above test on systems where it is broken
6496f05b35a2Smrgm4_if([$1], [CXX],
6497f05b35a2Smrg[case $host_os in
6498f05b35a2Smrginterix[[3-9]]*)
6499f05b35a2Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6500f05b35a2Smrg  # hack all around it, let's just trust "g++" to DTRT.
6501f05b35a2Smrg  _LT_TAGVAR(predep_objects,$1)=
6502f05b35a2Smrg  _LT_TAGVAR(postdep_objects,$1)=
6503f05b35a2Smrg  _LT_TAGVAR(postdeps,$1)=
6504f05b35a2Smrg  ;;
6505e0963edeSmrg
6506f05b35a2Smrglinux*)
6507f05b35a2Smrg  case `$CC -V 2>&1 | sed 5q` in
6508f05b35a2Smrg  *Sun\ C*)
6509f05b35a2Smrg    # Sun C++ 5.9
6510e0963edeSmrg
6511f05b35a2Smrg    # The more standards-conforming stlport4 library is
6512f05b35a2Smrg    # incompatible with the Cstd library. Avoid specifying
6513f05b35a2Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
6514f05b35a2Smrg    # -library=stlport4 depends on it.
6515f05b35a2Smrg    case " $CXX $CXXFLAGS " in
6516f05b35a2Smrg    *" -library=stlport4 "*)
6517f05b35a2Smrg      solaris_use_stlport4=yes
6518f05b35a2Smrg      ;;
6519f05b35a2Smrg    esac
6520e0963edeSmrg
6521f05b35a2Smrg    if test "$solaris_use_stlport4" != yes; then
6522f05b35a2Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6523f05b35a2Smrg    fi
6524f05b35a2Smrg    ;;
6525f05b35a2Smrg  esac
6526e0963edeSmrg  ;;
6527f05b35a2Smrg
6528e0963edeSmrgsolaris*)
6529f05b35a2Smrg  case $cc_basename in
6530f05b35a2Smrg  CC*)
6531f05b35a2Smrg    # The more standards-conforming stlport4 library is
6532f05b35a2Smrg    # incompatible with the Cstd library. Avoid specifying
6533f05b35a2Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
6534f05b35a2Smrg    # -library=stlport4 depends on it.
6535f05b35a2Smrg    case " $CXX $CXXFLAGS " in
6536f05b35a2Smrg    *" -library=stlport4 "*)
6537f05b35a2Smrg      solaris_use_stlport4=yes
6538f05b35a2Smrg      ;;
6539f05b35a2Smrg    esac
6540e0963edeSmrg
6541f05b35a2Smrg    # Adding this requires a known-good setup of shared libraries for
6542f05b35a2Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
6543f05b35a2Smrg    # archive will be linked into the output, leading to subtle bugs.
6544f05b35a2Smrg    if test "$solaris_use_stlport4" != yes; then
6545f05b35a2Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6546f05b35a2Smrg    fi
6547f05b35a2Smrg    ;;
6548f05b35a2Smrg  esac
6549e0963edeSmrg  ;;
6550e0963edeSmrgesac
6551f05b35a2Smrg])
6552e0963edeSmrg
6553f05b35a2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
6554f05b35a2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6555e0963edeSmrgesac
6556f05b35a2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6557f05b35a2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6558f05b35a2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6559f05b35a2Smrgfi
6560f05b35a2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6561f05b35a2Smrg    [The directories searched by this compiler when creating a shared library])
6562f05b35a2Smrg_LT_TAGDECL([], [predep_objects], [1],
6563f05b35a2Smrg    [Dependencies to place before and after the objects being linked to
6564f05b35a2Smrg    create a shared library])
6565f05b35a2Smrg_LT_TAGDECL([], [postdep_objects], [1])
6566f05b35a2Smrg_LT_TAGDECL([], [predeps], [1])
6567f05b35a2Smrg_LT_TAGDECL([], [postdeps], [1])
6568f05b35a2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6569f05b35a2Smrg    [The library search path used internally by the compiler when linking
6570f05b35a2Smrg    a shared library])
6571f05b35a2Smrg])# _LT_SYS_HIDDEN_LIBDEPS
6572f05b35a2Smrg
6573f05b35a2Smrg
6574f05b35a2Smrg# _LT_PROG_F77
6575f05b35a2Smrg# ------------
6576f05b35a2Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6577f05b35a2Smrg# if there is no fortran compiler, we have our own version here.
6578f05b35a2Smrgm4_defun([_LT_PROG_F77],
6579f05b35a2Smrg[
6580f05b35a2Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6581f05b35a2SmrgAC_PROG_F77
6582f05b35a2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
6583f05b35a2Smrg  _lt_disable_F77=yes
6584f05b35a2Smrgfi
6585f05b35a2Smrgpopdef([AC_MSG_ERROR])
6586f05b35a2Smrg])# _LT_PROG_F77
6587e0963edeSmrg
6588f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
6589f05b35a2Smrgdnl AC_DEFUN([_LT_PROG_F77], [])
6590e0963edeSmrg
6591e0963edeSmrg
6592f05b35a2Smrg# _LT_LANG_F77_CONFIG([TAG])
6593f05b35a2Smrg# --------------------------
6594f05b35a2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
6595f05b35a2Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6596f05b35a2Smrg# to write the compiler configuration to `libtool'.
6597f05b35a2Smrgm4_defun([_LT_LANG_F77_CONFIG],
6598f05b35a2Smrg[AC_REQUIRE([_LT_PROG_F77])dnl
6599f05b35a2SmrgAC_LANG_PUSH(Fortran 77)
6600e0963edeSmrg
6601f05b35a2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6602f05b35a2Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6603f05b35a2Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6604f05b35a2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6605f05b35a2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6606f05b35a2Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6607f05b35a2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6608f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6609f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6610f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6611f05b35a2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6612f05b35a2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6613f05b35a2Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6614f05b35a2Smrg_LT_TAGVAR(module_cmds, $1)=
6615f05b35a2Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6616f05b35a2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6617f05b35a2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6618f05b35a2Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6619f05b35a2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6620f05b35a2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6621e0963edeSmrg
6622f05b35a2Smrg# Source file extension for f77 test sources.
6623f05b35a2Smrgac_ext=f
6624e0963edeSmrg
6625f05b35a2Smrg# Object file extension for compiled f77 test sources.
6626f05b35a2Smrgobjext=o
6627f05b35a2Smrg_LT_TAGVAR(objext, $1)=$objext
6628f05b35a2Smrg
6629f05b35a2Smrg# No sense in running all these tests if we already determined that
6630f05b35a2Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6631f05b35a2Smrg# are currently assumed to apply to all compilers on this platform,
6632f05b35a2Smrg# and will be corrupted by setting them based on a non-working compiler.
6633f05b35a2Smrgif test "$_lt_disable_F77" != yes; then
6634f05b35a2Smrg  # Code to be used in simple compile tests
6635f05b35a2Smrg  lt_simple_compile_test_code="\
6636f05b35a2Smrg      subroutine t
6637f05b35a2Smrg      return
6638f05b35a2Smrg      end
6639f05b35a2Smrg"
6640e0963edeSmrg
6641f05b35a2Smrg  # Code to be used in simple link tests
6642f05b35a2Smrg  lt_simple_link_test_code="\
6643f05b35a2Smrg      program t
6644f05b35a2Smrg      end
6645f05b35a2Smrg"
6646e0963edeSmrg
6647f05b35a2Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6648f05b35a2Smrg  _LT_TAG_COMPILER
6649e0963edeSmrg
6650f05b35a2Smrg  # save warnings/boilerplate of simple test code
6651f05b35a2Smrg  _LT_COMPILER_BOILERPLATE
6652f05b35a2Smrg  _LT_LINKER_BOILERPLATE
6653e0963edeSmrg
6654f05b35a2Smrg  # Allow CC to be a program name with arguments.
6655f05b35a2Smrg  lt_save_CC="$CC"
6656f05b35a2Smrg  lt_save_GCC=$GCC
6657f05b35a2Smrg  CC=${F77-"f77"}
6658f05b35a2Smrg  compiler=$CC
6659f05b35a2Smrg  _LT_TAGVAR(compiler, $1)=$CC
6660f05b35a2Smrg  _LT_CC_BASENAME([$compiler])
6661f05b35a2Smrg  GCC=$G77
6662f05b35a2Smrg  if test -n "$compiler"; then
6663f05b35a2Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6664f05b35a2Smrg    AC_MSG_RESULT([$can_build_shared])
6665e0963edeSmrg
6666f05b35a2Smrg    AC_MSG_CHECKING([whether to build shared libraries])
6667f05b35a2Smrg    test "$can_build_shared" = "no" && enable_shared=no
6668f05b35a2Smrg
6669f05b35a2Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
6670f05b35a2Smrg    # are all built from PIC.
6671f05b35a2Smrg    case $host_os in
6672f05b35a2Smrg      aix3*)
6673f05b35a2Smrg        test "$enable_shared" = yes && enable_static=no
6674f05b35a2Smrg        if test -n "$RANLIB"; then
6675f05b35a2Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6676f05b35a2Smrg          postinstall_cmds='$RANLIB $lib'
6677f05b35a2Smrg        fi
6678f05b35a2Smrg        ;;
6679f05b35a2Smrg      aix[[4-9]]*)
6680f05b35a2Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6681f05b35a2Smrg	  test "$enable_shared" = yes && enable_static=no
6682e0963edeSmrg	fi
6683f05b35a2Smrg        ;;
6684f05b35a2Smrg    esac
6685f05b35a2Smrg    AC_MSG_RESULT([$enable_shared])
6686f05b35a2Smrg
6687f05b35a2Smrg    AC_MSG_CHECKING([whether to build static libraries])
6688f05b35a2Smrg    # Make sure either enable_shared or enable_static is yes.
6689f05b35a2Smrg    test "$enable_shared" = yes || enable_static=yes
6690f05b35a2Smrg    AC_MSG_RESULT([$enable_static])
6691f05b35a2Smrg
6692f05b35a2Smrg    _LT_TAGVAR(GCC, $1)="$G77"
6693f05b35a2Smrg    _LT_TAGVAR(LD, $1)="$LD"
6694f05b35a2Smrg
6695f05b35a2Smrg    ## CAVEAT EMPTOR:
6696f05b35a2Smrg    ## There is no encapsulation within the following macros, do not change
6697f05b35a2Smrg    ## the running order or otherwise move them around unless you know exactly
6698f05b35a2Smrg    ## what you are doing...
6699f05b35a2Smrg    _LT_COMPILER_PIC($1)
6700f05b35a2Smrg    _LT_COMPILER_C_O($1)
6701f05b35a2Smrg    _LT_COMPILER_FILE_LOCKS($1)
6702f05b35a2Smrg    _LT_LINKER_SHLIBS($1)
6703f05b35a2Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6704f05b35a2Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6705f05b35a2Smrg
6706f05b35a2Smrg    _LT_CONFIG($1)
6707f05b35a2Smrg  fi # test -n "$compiler"
6708f05b35a2Smrg
6709f05b35a2Smrg  GCC=$lt_save_GCC
6710f05b35a2Smrg  CC="$lt_save_CC"
6711f05b35a2Smrgfi # test "$_lt_disable_F77" != yes
6712e0963edeSmrg
6713f05b35a2SmrgAC_LANG_POP
6714f05b35a2Smrg])# _LT_LANG_F77_CONFIG
6715f05b35a2Smrg
6716f05b35a2Smrg
6717f05b35a2Smrg# _LT_PROG_FC
6718f05b35a2Smrg# -----------
6719f05b35a2Smrg# Since AC_PROG_FC is broken, in that it returns the empty string
6720f05b35a2Smrg# if there is no fortran compiler, we have our own version here.
6721f05b35a2Smrgm4_defun([_LT_PROG_FC],
6722f05b35a2Smrg[
6723f05b35a2Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6724f05b35a2SmrgAC_PROG_FC
6725f05b35a2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
6726f05b35a2Smrg  _lt_disable_FC=yes
6727e0963edeSmrgfi
6728f05b35a2Smrgpopdef([AC_MSG_ERROR])
6729f05b35a2Smrg])# _LT_PROG_FC
6730e0963edeSmrg
6731f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
6732f05b35a2Smrgdnl AC_DEFUN([_LT_PROG_FC], [])
6733e0963edeSmrg
6734e0963edeSmrg
6735f05b35a2Smrg# _LT_LANG_FC_CONFIG([TAG])
6736f05b35a2Smrg# -------------------------
6737f05b35a2Smrg# Ensure that the configuration variables for a Fortran compiler are
6738f05b35a2Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6739f05b35a2Smrg# to write the compiler configuration to `libtool'.
6740f05b35a2Smrgm4_defun([_LT_LANG_FC_CONFIG],
6741f05b35a2Smrg[AC_REQUIRE([_LT_PROG_FC])dnl
6742f05b35a2SmrgAC_LANG_PUSH(Fortran)
6743f05b35a2Smrg
6744f05b35a2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6745f05b35a2Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
6746f05b35a2Smrg_LT_TAGVAR(always_export_symbols, $1)=no
6747f05b35a2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6748f05b35a2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6749f05b35a2Smrg_LT_TAGVAR(hardcode_direct, $1)=no
6750f05b35a2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6751f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6752f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6753f05b35a2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6754f05b35a2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6755f05b35a2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
6756f05b35a2Smrg_LT_TAGVAR(inherit_rpath, $1)=no
6757f05b35a2Smrg_LT_TAGVAR(module_cmds, $1)=
6758f05b35a2Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
6759f05b35a2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6760f05b35a2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6761f05b35a2Smrg_LT_TAGVAR(no_undefined_flag, $1)=
6762f05b35a2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6763f05b35a2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6764f05b35a2Smrg
6765f05b35a2Smrg# Source file extension for fc test sources.
6766f05b35a2Smrgac_ext=${ac_fc_srcext-f}
6767f05b35a2Smrg
6768f05b35a2Smrg# Object file extension for compiled fc test sources.
6769f05b35a2Smrgobjext=o
6770f05b35a2Smrg_LT_TAGVAR(objext, $1)=$objext
6771f05b35a2Smrg
6772f05b35a2Smrg# No sense in running all these tests if we already determined that
6773f05b35a2Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
6774f05b35a2Smrg# are currently assumed to apply to all compilers on this platform,
6775f05b35a2Smrg# and will be corrupted by setting them based on a non-working compiler.
6776f05b35a2Smrgif test "$_lt_disable_FC" != yes; then
6777f05b35a2Smrg  # Code to be used in simple compile tests
6778f05b35a2Smrg  lt_simple_compile_test_code="\
6779f05b35a2Smrg      subroutine t
6780f05b35a2Smrg      return
6781f05b35a2Smrg      end
6782f05b35a2Smrg"
6783f05b35a2Smrg
6784f05b35a2Smrg  # Code to be used in simple link tests
6785f05b35a2Smrg  lt_simple_link_test_code="\
6786f05b35a2Smrg      program t
6787f05b35a2Smrg      end
6788f05b35a2Smrg"
6789f05b35a2Smrg
6790f05b35a2Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6791f05b35a2Smrg  _LT_TAG_COMPILER
6792f05b35a2Smrg
6793f05b35a2Smrg  # save warnings/boilerplate of simple test code
6794f05b35a2Smrg  _LT_COMPILER_BOILERPLATE
6795f05b35a2Smrg  _LT_LINKER_BOILERPLATE
6796e0963edeSmrg
6797f05b35a2Smrg  # Allow CC to be a program name with arguments.
6798f05b35a2Smrg  lt_save_CC="$CC"
6799f05b35a2Smrg  lt_save_GCC=$GCC
6800f05b35a2Smrg  CC=${FC-"f95"}
6801f05b35a2Smrg  compiler=$CC
6802f05b35a2Smrg  GCC=$ac_cv_fc_compiler_gnu
6803f05b35a2Smrg
6804f05b35a2Smrg  _LT_TAGVAR(compiler, $1)=$CC
6805f05b35a2Smrg  _LT_CC_BASENAME([$compiler])
6806f05b35a2Smrg
6807f05b35a2Smrg  if test -n "$compiler"; then
6808f05b35a2Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6809f05b35a2Smrg    AC_MSG_RESULT([$can_build_shared])
6810f05b35a2Smrg
6811f05b35a2Smrg    AC_MSG_CHECKING([whether to build shared libraries])
6812f05b35a2Smrg    test "$can_build_shared" = "no" && enable_shared=no
6813f05b35a2Smrg
6814f05b35a2Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
6815f05b35a2Smrg    # are all built from PIC.
6816e0963edeSmrg    case $host_os in
6817f05b35a2Smrg      aix3*)
6818f05b35a2Smrg        test "$enable_shared" = yes && enable_static=no
6819f05b35a2Smrg        if test -n "$RANLIB"; then
6820f05b35a2Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821f05b35a2Smrg          postinstall_cmds='$RANLIB $lib'
6822f05b35a2Smrg        fi
6823f05b35a2Smrg        ;;
6824f05b35a2Smrg      aix[[4-9]]*)
6825f05b35a2Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6826f05b35a2Smrg	  test "$enable_shared" = yes && enable_static=no
6827e0963edeSmrg	fi
6828f05b35a2Smrg        ;;
6829e0963edeSmrg    esac
6830f05b35a2Smrg    AC_MSG_RESULT([$enable_shared])
6831f05b35a2Smrg
6832f05b35a2Smrg    AC_MSG_CHECKING([whether to build static libraries])
6833f05b35a2Smrg    # Make sure either enable_shared or enable_static is yes.
6834f05b35a2Smrg    test "$enable_shared" = yes || enable_static=yes
6835f05b35a2Smrg    AC_MSG_RESULT([$enable_static])
6836f05b35a2Smrg
6837f05b35a2Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6838f05b35a2Smrg    _LT_TAGVAR(LD, $1)="$LD"
6839f05b35a2Smrg
6840f05b35a2Smrg    ## CAVEAT EMPTOR:
6841f05b35a2Smrg    ## There is no encapsulation within the following macros, do not change
6842f05b35a2Smrg    ## the running order or otherwise move them around unless you know exactly
6843f05b35a2Smrg    ## what you are doing...
6844f05b35a2Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6845f05b35a2Smrg    _LT_COMPILER_PIC($1)
6846f05b35a2Smrg    _LT_COMPILER_C_O($1)
6847f05b35a2Smrg    _LT_COMPILER_FILE_LOCKS($1)
6848f05b35a2Smrg    _LT_LINKER_SHLIBS($1)
6849f05b35a2Smrg    _LT_SYS_DYNAMIC_LINKER($1)
6850f05b35a2Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6851f05b35a2Smrg
6852f05b35a2Smrg    _LT_CONFIG($1)
6853f05b35a2Smrg  fi # test -n "$compiler"
6854f05b35a2Smrg
6855f05b35a2Smrg  GCC=$lt_save_GCC
6856f05b35a2Smrg  CC="$lt_save_CC"
6857f05b35a2Smrgfi # test "$_lt_disable_FC" != yes
6858e0963edeSmrg
6859f05b35a2SmrgAC_LANG_POP
6860f05b35a2Smrg])# _LT_LANG_FC_CONFIG
6861e0963edeSmrg
6862e0963edeSmrg
6863f05b35a2Smrg# _LT_LANG_GCJ_CONFIG([TAG])
6864f05b35a2Smrg# --------------------------
6865f05b35a2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6866f05b35a2Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6867f05b35a2Smrg# to write the compiler configuration to `libtool'.
6868f05b35a2Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
6869f05b35a2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6870f05b35a2SmrgAC_LANG_SAVE
6871e0963edeSmrg
6872f05b35a2Smrg# Source file extension for Java test sources.
6873f05b35a2Smrgac_ext=java
6874e0963edeSmrg
6875f05b35a2Smrg# Object file extension for compiled Java test sources.
6876f05b35a2Smrgobjext=o
6877f05b35a2Smrg_LT_TAGVAR(objext, $1)=$objext
6878e0963edeSmrg
6879f05b35a2Smrg# Code to be used in simple compile tests
6880f05b35a2Smrglt_simple_compile_test_code="class foo {}"
6881e0963edeSmrg
6882f05b35a2Smrg# Code to be used in simple link tests
6883f05b35a2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6884e0963edeSmrg
6885f05b35a2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6886f05b35a2Smrg_LT_TAG_COMPILER
6887e0963edeSmrg
6888f05b35a2Smrg# save warnings/boilerplate of simple test code
6889f05b35a2Smrg_LT_COMPILER_BOILERPLATE
6890f05b35a2Smrg_LT_LINKER_BOILERPLATE
6891e0963edeSmrg
6892f05b35a2Smrg# Allow CC to be a program name with arguments.
6893f05b35a2Smrglt_save_CC="$CC"
6894f05b35a2Smrglt_save_GCC=$GCC
6895f05b35a2SmrgGCC=yes
6896f05b35a2SmrgCC=${GCJ-"gcj"}
6897f05b35a2Smrgcompiler=$CC
6898f05b35a2Smrg_LT_TAGVAR(compiler, $1)=$CC
6899f05b35a2Smrg_LT_TAGVAR(LD, $1)="$LD"
6900f05b35a2Smrg_LT_CC_BASENAME([$compiler])
6901f05b35a2Smrg
6902f05b35a2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6903f05b35a2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6904f05b35a2Smrg
6905f05b35a2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6906f05b35a2Smrg
6907f05b35a2Smrgif test -n "$compiler"; then
6908f05b35a2Smrg  _LT_COMPILER_NO_RTTI($1)
6909f05b35a2Smrg  _LT_COMPILER_PIC($1)
6910f05b35a2Smrg  _LT_COMPILER_C_O($1)
6911f05b35a2Smrg  _LT_COMPILER_FILE_LOCKS($1)
6912f05b35a2Smrg  _LT_LINKER_SHLIBS($1)
6913f05b35a2Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6914f05b35a2Smrg
6915f05b35a2Smrg  _LT_CONFIG($1)
6916f05b35a2Smrgfi
6917f05b35a2Smrg
6918f05b35a2SmrgAC_LANG_RESTORE
6919f05b35a2Smrg
6920f05b35a2SmrgGCC=$lt_save_GCC
6921f05b35a2SmrgCC="$lt_save_CC"
6922f05b35a2Smrg])# _LT_LANG_GCJ_CONFIG
6923f05b35a2Smrg
6924f05b35a2Smrg
6925f05b35a2Smrg# _LT_LANG_RC_CONFIG([TAG])
6926f05b35a2Smrg# -------------------------
6927f05b35a2Smrg# Ensure that the configuration variables for the Windows resource compiler
6928f05b35a2Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6929f05b35a2Smrg# to write the compiler configuration to `libtool'.
6930f05b35a2Smrgm4_defun([_LT_LANG_RC_CONFIG],
6931f05b35a2Smrg[AC_REQUIRE([LT_PROG_RC])dnl
6932f05b35a2SmrgAC_LANG_SAVE
6933f05b35a2Smrg
6934f05b35a2Smrg# Source file extension for RC test sources.
6935f05b35a2Smrgac_ext=rc
6936f05b35a2Smrg
6937f05b35a2Smrg# Object file extension for compiled RC test sources.
6938f05b35a2Smrgobjext=o
6939f05b35a2Smrg_LT_TAGVAR(objext, $1)=$objext
6940f05b35a2Smrg
6941f05b35a2Smrg# Code to be used in simple compile tests
6942f05b35a2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6943f05b35a2Smrg
6944f05b35a2Smrg# Code to be used in simple link tests
6945f05b35a2Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
6946f05b35a2Smrg
6947f05b35a2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6948f05b35a2Smrg_LT_TAG_COMPILER
6949f05b35a2Smrg
6950f05b35a2Smrg# save warnings/boilerplate of simple test code
6951f05b35a2Smrg_LT_COMPILER_BOILERPLATE
6952f05b35a2Smrg_LT_LINKER_BOILERPLATE
6953f05b35a2Smrg
6954f05b35a2Smrg# Allow CC to be a program name with arguments.
6955f05b35a2Smrglt_save_CC="$CC"
6956f05b35a2Smrglt_save_GCC=$GCC
6957f05b35a2SmrgGCC=
6958f05b35a2SmrgCC=${RC-"windres"}
6959f05b35a2Smrgcompiler=$CC
6960f05b35a2Smrg_LT_TAGVAR(compiler, $1)=$CC
6961f05b35a2Smrg_LT_CC_BASENAME([$compiler])
6962f05b35a2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6963e0963edeSmrg
6964f05b35a2Smrgif test -n "$compiler"; then
6965f05b35a2Smrg  :
6966f05b35a2Smrg  _LT_CONFIG($1)
6967f05b35a2Smrgfi
6968e0963edeSmrg
6969f05b35a2SmrgGCC=$lt_save_GCC
6970f05b35a2SmrgAC_LANG_RESTORE
6971f05b35a2SmrgCC="$lt_save_CC"
6972f05b35a2Smrg])# _LT_LANG_RC_CONFIG
6973e0963edeSmrg
6974e0963edeSmrg
6975f05b35a2Smrg# LT_PROG_GCJ
6976f05b35a2Smrg# -----------
6977f05b35a2SmrgAC_DEFUN([LT_PROG_GCJ],
6978f05b35a2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6979f05b35a2Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6980f05b35a2Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
6981f05b35a2Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6982f05b35a2Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
6983f05b35a2Smrg])
6984e0963edeSmrg
6985f05b35a2Smrg# Old name:
6986f05b35a2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6987f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
6988f05b35a2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6989e0963edeSmrg
6990e0963edeSmrg
6991f05b35a2Smrg# LT_PROG_RC
6992f05b35a2Smrg# ----------
6993f05b35a2SmrgAC_DEFUN([LT_PROG_RC],
6994f05b35a2Smrg[AC_CHECK_TOOL(RC, windres,)
6995f05b35a2Smrg])
6996e0963edeSmrg
6997f05b35a2Smrg# Old name:
6998f05b35a2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6999f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7000f05b35a2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7001e0963edeSmrg
7002e0963edeSmrg
7003f05b35a2Smrg# _LT_DECL_EGREP
7004f05b35a2Smrg# --------------
7005f05b35a2Smrg# If we don't have a new enough Autoconf to choose the best grep
7006f05b35a2Smrg# available, choose the one first in the user's PATH.
7007f05b35a2Smrgm4_defun([_LT_DECL_EGREP],
7008f05b35a2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7009f05b35a2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7010f05b35a2Smrgtest -z "$GREP" && GREP=grep
7011f05b35a2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7012f05b35a2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7013f05b35a2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7014f05b35a2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7015f05b35a2SmrgAC_SUBST([GREP])
7016f05b35a2Smrg])
7017e0963edeSmrg
7018e0963edeSmrg
7019f05b35a2Smrg# _LT_DECL_OBJDUMP
7020f05b35a2Smrg# --------------
7021f05b35a2Smrg# If we don't have a new enough Autoconf to choose the best objdump
7022f05b35a2Smrg# available, choose the one first in the user's PATH.
7023f05b35a2Smrgm4_defun([_LT_DECL_OBJDUMP],
7024f05b35a2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7025f05b35a2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7026f05b35a2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7027f05b35a2SmrgAC_SUBST([OBJDUMP])
7028f05b35a2Smrg])
7029e0963edeSmrg
7030e0963edeSmrg
7031f05b35a2Smrg# _LT_DECL_SED
7032f05b35a2Smrg# ------------
7033f05b35a2Smrg# Check for a fully-functional sed program, that truncates
7034f05b35a2Smrg# as few characters as possible.  Prefer GNU sed if found.
7035f05b35a2Smrgm4_defun([_LT_DECL_SED],
7036f05b35a2Smrg[AC_PROG_SED
7037f05b35a2Smrgtest -z "$SED" && SED=sed
7038f05b35a2SmrgXsed="$SED -e 1s/^X//"
7039f05b35a2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7040f05b35a2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7041f05b35a2Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7042f05b35a2Smrg])# _LT_DECL_SED
7043e0963edeSmrg
7044f05b35a2Smrgm4_ifndef([AC_PROG_SED], [
7045f05b35a2Smrg# NOTE: This macro has been submitted for inclusion into   #
7046f05b35a2Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7047f05b35a2Smrg#  a released version of Autoconf we should remove this    #
7048f05b35a2Smrg#  macro and use it instead.                               #
7049f05b35a2Smrg
7050f05b35a2Smrgm4_defun([AC_PROG_SED],
7051f05b35a2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7052f05b35a2SmrgAC_CACHE_VAL(lt_cv_path_SED,
7053f05b35a2Smrg[# Loop through the user's path and test for sed and gsed.
7054f05b35a2Smrg# Then use that list of sed's as ones to test for truncation.
7055f05b35a2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056f05b35a2Smrgfor as_dir in $PATH
7057f05b35a2Smrgdo
7058f05b35a2Smrg  IFS=$as_save_IFS
7059f05b35a2Smrg  test -z "$as_dir" && as_dir=.
7060f05b35a2Smrg  for lt_ac_prog in sed gsed; do
7061f05b35a2Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
7062f05b35a2Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7063f05b35a2Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7064f05b35a2Smrg      fi
7065f05b35a2Smrg    done
7066f05b35a2Smrg  done
7067f05b35a2Smrgdone
7068f05b35a2SmrgIFS=$as_save_IFS
7069f05b35a2Smrglt_ac_max=0
7070f05b35a2Smrglt_ac_count=0
7071f05b35a2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7072f05b35a2Smrg# along with /bin/sed that truncates output.
7073f05b35a2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7074f05b35a2Smrg  test ! -f $lt_ac_sed && continue
7075f05b35a2Smrg  cat /dev/null > conftest.in
7076f05b35a2Smrg  lt_ac_count=0
7077f05b35a2Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7078f05b35a2Smrg  # Check for GNU sed and select it if it is found.
7079f05b35a2Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7080f05b35a2Smrg    lt_cv_path_SED=$lt_ac_sed
7081f05b35a2Smrg    break
7082e0963edeSmrg  fi
7083f05b35a2Smrg  while true; do
7084f05b35a2Smrg    cat conftest.in conftest.in >conftest.tmp
7085f05b35a2Smrg    mv conftest.tmp conftest.in
7086f05b35a2Smrg    cp conftest.in conftest.nl
7087f05b35a2Smrg    echo >>conftest.nl
7088f05b35a2Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7089f05b35a2Smrg    cmp -s conftest.out conftest.nl || break
7090f05b35a2Smrg    # 10000 chars as input seems more than enough
7091f05b35a2Smrg    test $lt_ac_count -gt 10 && break
7092f05b35a2Smrg    lt_ac_count=`expr $lt_ac_count + 1`
7093f05b35a2Smrg    if test $lt_ac_count -gt $lt_ac_max; then
7094f05b35a2Smrg      lt_ac_max=$lt_ac_count
7095f05b35a2Smrg      lt_cv_path_SED=$lt_ac_sed
7096f05b35a2Smrg    fi
7097f05b35a2Smrg  done
7098f05b35a2Smrgdone
7099e0963edeSmrg])
7100f05b35a2SmrgSED=$lt_cv_path_SED
7101f05b35a2SmrgAC_SUBST([SED])
7102f05b35a2SmrgAC_MSG_RESULT([$SED])
7103f05b35a2Smrg])#AC_PROG_SED
7104f05b35a2Smrg])#m4_ifndef
7105e0963edeSmrg
7106f05b35a2Smrg# Old name:
7107f05b35a2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7108f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7109f05b35a2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7110f05b35a2Smrg
7111f05b35a2Smrg
7112f05b35a2Smrg# _LT_CHECK_SHELL_FEATURES
7113f05b35a2Smrg# ------------------------
7114f05b35a2Smrg# Find out whether the shell is Bourne or XSI compatible,
7115f05b35a2Smrg# or has some other useful features.
7116f05b35a2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7117f05b35a2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7118f05b35a2Smrg# Try some XSI features
7119f05b35a2Smrgxsi_shell=no
7120f05b35a2Smrg( _lt_dummy="a/b/c"
7121f05b35a2Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7122f05b35a2Smrg      = c,a/b,, \
7123f05b35a2Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7124f05b35a2Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7125f05b35a2Smrg  && xsi_shell=yes
7126f05b35a2SmrgAC_MSG_RESULT([$xsi_shell])
7127f05b35a2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7128f05b35a2Smrg
7129f05b35a2SmrgAC_MSG_CHECKING([whether the shell understands "+="])
7130f05b35a2Smrglt_shell_append=no
7131f05b35a2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7132f05b35a2Smrg    >/dev/null 2>&1 \
7133f05b35a2Smrg  && lt_shell_append=yes
7134f05b35a2SmrgAC_MSG_RESULT([$lt_shell_append])
7135f05b35a2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7136f05b35a2Smrg
7137f05b35a2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7138f05b35a2Smrg  lt_unset=unset
7139f05b35a2Smrgelse
7140f05b35a2Smrg  lt_unset=false
7141e0963edeSmrgfi
7142f05b35a2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7143f05b35a2Smrg
7144f05b35a2Smrg# test EBCDIC or ASCII
7145f05b35a2Smrgcase `echo X|tr X '\101'` in
7146f05b35a2Smrg A) # ASCII based system
7147f05b35a2Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7148f05b35a2Smrg  lt_SP2NL='tr \040 \012'
7149f05b35a2Smrg  lt_NL2SP='tr \015\012 \040\040'
7150f05b35a2Smrg  ;;
7151f05b35a2Smrg *) # EBCDIC based system
7152f05b35a2Smrg  lt_SP2NL='tr \100 \n'
7153f05b35a2Smrg  lt_NL2SP='tr \r\n \100\100'
7154f05b35a2Smrg  ;;
7155e0963edeSmrgesac
7156f05b35a2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7157f05b35a2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7158f05b35a2Smrg])# _LT_CHECK_SHELL_FEATURES
7159e0963edeSmrg
7160e0963edeSmrg
7161f05b35a2Smrg# _LT_PROG_XSI_SHELLFNS
7162f05b35a2Smrg# ---------------------
7163f05b35a2Smrg# Bourne and XSI compatible variants of some useful shell functions.
7164f05b35a2Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7165f05b35a2Smrg[case $xsi_shell in
7166f05b35a2Smrg  yes)
7167f05b35a2Smrg    cat << \_LT_EOF >> "$cfgfile"
7168f05b35a2Smrg
7169f05b35a2Smrg# func_dirname file append nondir_replacement
7170f05b35a2Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7171f05b35a2Smrg# otherwise set result to NONDIR_REPLACEMENT.
7172f05b35a2Smrgfunc_dirname ()
7173f05b35a2Smrg{
7174f05b35a2Smrg  case ${1} in
7175f05b35a2Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
7176f05b35a2Smrg    *  ) func_dirname_result="${3}" ;;
7177f05b35a2Smrg  esac
7178f05b35a2Smrg}
7179e0963edeSmrg
7180f05b35a2Smrg# func_basename file
7181f05b35a2Smrgfunc_basename ()
7182f05b35a2Smrg{
7183f05b35a2Smrg  func_basename_result="${1##*/}"
7184f05b35a2Smrg}
7185f05b35a2Smrg
7186f05b35a2Smrg# func_dirname_and_basename file append nondir_replacement
7187f05b35a2Smrg# perform func_basename and func_dirname in a single function
7188f05b35a2Smrg# call:
7189f05b35a2Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7190f05b35a2Smrg#             add APPEND to the result, otherwise set result
7191f05b35a2Smrg#             to NONDIR_REPLACEMENT.
7192f05b35a2Smrg#             value returned in "$func_dirname_result"
7193f05b35a2Smrg#   basename: Compute filename of FILE.
7194f05b35a2Smrg#             value retuned in "$func_basename_result"
7195f05b35a2Smrg# Implementation must be kept synchronized with func_dirname
7196f05b35a2Smrg# and func_basename. For efficiency, we do not delegate to
7197f05b35a2Smrg# those functions but instead duplicate the functionality here.
7198f05b35a2Smrgfunc_dirname_and_basename ()
7199f05b35a2Smrg{
7200f05b35a2Smrg  case ${1} in
7201f05b35a2Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
7202f05b35a2Smrg    *  ) func_dirname_result="${3}" ;;
7203e0963edeSmrg  esac
7204f05b35a2Smrg  func_basename_result="${1##*/}"
7205f05b35a2Smrg}
7206f05b35a2Smrg
7207f05b35a2Smrg# func_stripname prefix suffix name
7208f05b35a2Smrg# strip PREFIX and SUFFIX off of NAME.
7209f05b35a2Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7210f05b35a2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7211f05b35a2Smrg# dot (in which case that matches only a dot).
7212f05b35a2Smrgfunc_stripname ()
7213f05b35a2Smrg{
7214f05b35a2Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7215f05b35a2Smrg  # positional parameters, so assign one to ordinary parameter first.
7216f05b35a2Smrg  func_stripname_result=${3}
7217f05b35a2Smrg  func_stripname_result=${func_stripname_result#"${1}"}
7218f05b35a2Smrg  func_stripname_result=${func_stripname_result%"${2}"}
7219f05b35a2Smrg}
7220f05b35a2Smrg
7221f05b35a2Smrg# func_opt_split
7222f05b35a2Smrgfunc_opt_split ()
7223f05b35a2Smrg{
7224f05b35a2Smrg  func_opt_split_opt=${1%%=*}
7225f05b35a2Smrg  func_opt_split_arg=${1#*=}
7226f05b35a2Smrg}
7227f05b35a2Smrg
7228f05b35a2Smrg# func_lo2o object
7229f05b35a2Smrgfunc_lo2o ()
7230f05b35a2Smrg{
7231f05b35a2Smrg  case ${1} in
7232f05b35a2Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7233f05b35a2Smrg    *)    func_lo2o_result=${1} ;;
7234f05b35a2Smrg  esac
7235f05b35a2Smrg}
7236f05b35a2Smrg
7237f05b35a2Smrg# func_xform libobj-or-source
7238f05b35a2Smrgfunc_xform ()
7239f05b35a2Smrg{
7240f05b35a2Smrg  func_xform_result=${1%.*}.lo
7241f05b35a2Smrg}
7242f05b35a2Smrg
7243f05b35a2Smrg# func_arith arithmetic-term...
7244f05b35a2Smrgfunc_arith ()
7245f05b35a2Smrg{
7246f05b35a2Smrg  func_arith_result=$(( $[*] ))
7247f05b35a2Smrg}
7248f05b35a2Smrg
7249f05b35a2Smrg# func_len string
7250f05b35a2Smrg# STRING may not start with a hyphen.
7251f05b35a2Smrgfunc_len ()
7252f05b35a2Smrg{
7253f05b35a2Smrg  func_len_result=${#1}
7254f05b35a2Smrg}
7255f05b35a2Smrg
7256f05b35a2Smrg_LT_EOF
7257e0963edeSmrg    ;;
7258f05b35a2Smrg  *) # Bourne compatible functions.
7259f05b35a2Smrg    cat << \_LT_EOF >> "$cfgfile"
7260f05b35a2Smrg
7261f05b35a2Smrg# func_dirname file append nondir_replacement
7262f05b35a2Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7263f05b35a2Smrg# otherwise set result to NONDIR_REPLACEMENT.
7264f05b35a2Smrgfunc_dirname ()
7265f05b35a2Smrg{
7266f05b35a2Smrg  # Extract subdirectory from the argument.
7267f05b35a2Smrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7268f05b35a2Smrg  if test "X$func_dirname_result" = "X${1}"; then
7269f05b35a2Smrg    func_dirname_result="${3}"
7270f05b35a2Smrg  else
7271f05b35a2Smrg    func_dirname_result="$func_dirname_result${2}"
7272f05b35a2Smrg  fi
7273f05b35a2Smrg}
7274f05b35a2Smrg
7275f05b35a2Smrg# func_basename file
7276f05b35a2Smrgfunc_basename ()
7277f05b35a2Smrg{
7278f05b35a2Smrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7279f05b35a2Smrg}
7280f05b35a2Smrg
7281f05b35a2Smrgdnl func_dirname_and_basename
7282f05b35a2Smrgdnl A portable version of this function is already defined in general.m4sh
7283f05b35a2Smrgdnl so there is no need for it here.
7284f05b35a2Smrg
7285f05b35a2Smrg# func_stripname prefix suffix name
7286f05b35a2Smrg# strip PREFIX and SUFFIX off of NAME.
7287f05b35a2Smrg# PREFIX and SUFFIX must not contain globbing or regex special
7288f05b35a2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7289f05b35a2Smrg# dot (in which case that matches only a dot).
7290f05b35a2Smrg# func_strip_suffix prefix name
7291f05b35a2Smrgfunc_stripname ()
7292f05b35a2Smrg{
7293f05b35a2Smrg  case ${2} in
7294f05b35a2Smrg    .*) func_stripname_result=`$ECHO "X${3}" \
7295f05b35a2Smrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7296f05b35a2Smrg    *)  func_stripname_result=`$ECHO "X${3}" \
7297f05b35a2Smrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7298e0963edeSmrg  esac
7299f05b35a2Smrg}
7300f05b35a2Smrg
7301f05b35a2Smrg# sed scripts:
7302f05b35a2Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7303f05b35a2Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
7304f05b35a2Smrg
7305f05b35a2Smrg# func_opt_split
7306f05b35a2Smrgfunc_opt_split ()
7307f05b35a2Smrg{
7308f05b35a2Smrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7309f05b35a2Smrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7310f05b35a2Smrg}
7311e0963edeSmrg
7312f05b35a2Smrg# func_lo2o object
7313f05b35a2Smrgfunc_lo2o ()
7314f05b35a2Smrg{
7315f05b35a2Smrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7316f05b35a2Smrg}
7317e0963edeSmrg
7318f05b35a2Smrg# func_xform libobj-or-source
7319f05b35a2Smrgfunc_xform ()
7320f05b35a2Smrg{
7321f05b35a2Smrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7322f05b35a2Smrg}
7323e0963edeSmrg
7324f05b35a2Smrg# func_arith arithmetic-term...
7325f05b35a2Smrgfunc_arith ()
7326f05b35a2Smrg{
7327f05b35a2Smrg  func_arith_result=`expr "$[@]"`
7328f05b35a2Smrg}
7329e0963edeSmrg
7330f05b35a2Smrg# func_len string
7331f05b35a2Smrg# STRING may not start with a hyphen.
7332f05b35a2Smrgfunc_len ()
7333f05b35a2Smrg{
7334f05b35a2Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7335f05b35a2Smrg}
7336e0963edeSmrg
7337f05b35a2Smrg_LT_EOF
7338f05b35a2Smrgesac
7339e0963edeSmrg
7340f05b35a2Smrgcase $lt_shell_append in
7341f05b35a2Smrg  yes)
7342f05b35a2Smrg    cat << \_LT_EOF >> "$cfgfile"
7343e0963edeSmrg
7344f05b35a2Smrg# func_append var value
7345f05b35a2Smrg# Append VALUE to the end of shell variable VAR.
7346f05b35a2Smrgfunc_append ()
7347f05b35a2Smrg{
7348f05b35a2Smrg  eval "$[1]+=\$[2]"
7349f05b35a2Smrg}
7350f05b35a2Smrg_LT_EOF
7351f05b35a2Smrg    ;;
7352f05b35a2Smrg  *)
7353f05b35a2Smrg    cat << \_LT_EOF >> "$cfgfile"
7354e0963edeSmrg
7355f05b35a2Smrg# func_append var value
7356f05b35a2Smrg# Append VALUE to the end of shell variable VAR.
7357f05b35a2Smrgfunc_append ()
7358f05b35a2Smrg{
7359f05b35a2Smrg  eval "$[1]=\$$[1]\$[2]"
7360f05b35a2Smrg}
7361e0963edeSmrg
7362f05b35a2Smrg_LT_EOF
7363f05b35a2Smrg    ;;
7364f05b35a2Smrg  esac
7365f05b35a2Smrg])
7366e0963edeSmrg
7367f05b35a2Smrg# Helper functions for option handling.                    -*- Autoconf -*-
7368f05b35a2Smrg#
7369f05b35a2Smrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7370f05b35a2Smrg#   Written by Gary V. Vaughan, 2004
7371f05b35a2Smrg#
7372f05b35a2Smrg# This file is free software; the Free Software Foundation gives
7373f05b35a2Smrg# unlimited permission to copy and/or distribute it, with or without
7374f05b35a2Smrg# modifications, as long as this notice is preserved.
7375e0963edeSmrg
7376f05b35a2Smrg# serial 6 ltoptions.m4
7377e0963edeSmrg
7378f05b35a2Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7379f05b35a2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7380e0963edeSmrg
7381e0963edeSmrg
7382f05b35a2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7383f05b35a2Smrg# ------------------------------------------
7384f05b35a2Smrgm4_define([_LT_MANGLE_OPTION],
7385f05b35a2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7386e0963edeSmrg
7387e0963edeSmrg
7388f05b35a2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7389f05b35a2Smrg# ---------------------------------------
7390f05b35a2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7391f05b35a2Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7392f05b35a2Smrg# saved as a flag.
7393f05b35a2Smrgm4_define([_LT_SET_OPTION],
7394f05b35a2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7395f05b35a2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7396f05b35a2Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
7397f05b35a2Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7398f05b35a2Smrg])
7399e0963edeSmrg
7400e0963edeSmrg
7401f05b35a2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7402f05b35a2Smrg# ------------------------------------------------------------
7403f05b35a2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7404f05b35a2Smrgm4_define([_LT_IF_OPTION],
7405f05b35a2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7406f05b35a2Smrg
7407f05b35a2Smrg
7408f05b35a2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7409f05b35a2Smrg# -------------------------------------------------------
7410f05b35a2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7411f05b35a2Smrg# are set.
7412f05b35a2Smrgm4_define([_LT_UNLESS_OPTIONS],
7413f05b35a2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7414f05b35a2Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7415f05b35a2Smrg		      [m4_define([$0_found])])])[]dnl
7416f05b35a2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7417f05b35a2Smrg])[]dnl
7418f05b35a2Smrg])
7419e0963edeSmrg
7420e0963edeSmrg
7421f05b35a2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7422f05b35a2Smrg# ----------------------------------------
7423f05b35a2Smrg# OPTION-LIST is a space-separated list of Libtool options associated
7424f05b35a2Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7425f05b35a2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7426f05b35a2Smrg# the unknown option and exit.
7427f05b35a2Smrgm4_defun([_LT_SET_OPTIONS],
7428f05b35a2Smrg[# Set options
7429f05b35a2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430f05b35a2Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
7431f05b35a2Smrg
7432f05b35a2Smrgm4_if([$1],[LT_INIT],[
7433f05b35a2Smrg  dnl
7434f05b35a2Smrg  dnl Simply set some default values (i.e off) if boolean options were not
7435f05b35a2Smrg  dnl specified:
7436f05b35a2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7437f05b35a2Smrg  ])
7438f05b35a2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7439f05b35a2Smrg  ])
7440f05b35a2Smrg  dnl
7441f05b35a2Smrg  dnl If no reference was made to various pairs of opposing options, then
7442f05b35a2Smrg  dnl we run the default mode handler for the pair.  For example, if neither
7443f05b35a2Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7444f05b35a2Smrg  dnl archives by default:
7445f05b35a2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7446f05b35a2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7447f05b35a2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7448f05b35a2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7449f05b35a2Smrg  		   [_LT_ENABLE_FAST_INSTALL])
7450f05b35a2Smrg  ])
7451f05b35a2Smrg])# _LT_SET_OPTIONS
7452e0963edeSmrg
7453e0963edeSmrg
7454e0963edeSmrg
7455f05b35a2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7456f05b35a2Smrg# -----------------------------------------
7457f05b35a2Smrgm4_define([_LT_MANGLE_DEFUN],
7458f05b35a2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7459e0963edeSmrg
7460e0963edeSmrg
7461f05b35a2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7462f05b35a2Smrg# -----------------------------------------------
7463f05b35a2Smrgm4_define([LT_OPTION_DEFINE],
7464f05b35a2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7465f05b35a2Smrg])# LT_OPTION_DEFINE
7466e0963edeSmrg
7467e0963edeSmrg
7468f05b35a2Smrg# dlopen
7469f05b35a2Smrg# ------
7470f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7471f05b35a2Smrg])
7472e0963edeSmrg
7473f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7474f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7475f05b35a2SmrgAC_DIAGNOSE([obsolete],
7476f05b35a2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7477f05b35a2Smrgput the `dlopen' option into LT_INIT's first parameter.])
7478f05b35a2Smrg])
7479e0963edeSmrg
7480f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7481f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7482e0963edeSmrg
7483e0963edeSmrg
7484f05b35a2Smrg# win32-dll
7485f05b35a2Smrg# ---------
7486f05b35a2Smrg# Declare package support for building win32 dll's.
7487f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7488f05b35a2Smrg[enable_win32_dll=yes
7489f05b35a2Smrg
7490f05b35a2Smrgcase $host in
7491f05b35a2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7492f05b35a2Smrg  AC_CHECK_TOOL(AS, as, false)
7493f05b35a2Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7494f05b35a2Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7495f05b35a2Smrg  ;;
7496f05b35a2Smrgesac
7497e0963edeSmrg
7498f05b35a2Smrgtest -z "$AS" && AS=as
7499f05b35a2Smrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
7500e0963edeSmrg
7501f05b35a2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7502f05b35a2Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7503e0963edeSmrg
7504f05b35a2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7505f05b35a2Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7506f05b35a2Smrg])# win32-dll
7507e0963edeSmrg
7508f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7509f05b35a2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7510f05b35a2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7511f05b35a2SmrgAC_DIAGNOSE([obsolete],
7512f05b35a2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7513f05b35a2Smrgput the `win32-dll' option into LT_INIT's first parameter.])
7514f05b35a2Smrg])
7515e0963edeSmrg
7516f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7517f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7518e0963edeSmrg
7519f05b35a2Smrg
7520f05b35a2Smrg# _LT_ENABLE_SHARED([DEFAULT])
7521f05b35a2Smrg# ----------------------------
7522f05b35a2Smrg# implement the --enable-shared flag, and supports the `shared' and
7523f05b35a2Smrg# `disable-shared' LT_INIT options.
7524f05b35a2Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7525f05b35a2Smrgm4_define([_LT_ENABLE_SHARED],
7526f05b35a2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7527f05b35a2SmrgAC_ARG_ENABLE([shared],
7528f05b35a2Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7529f05b35a2Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7530f05b35a2Smrg    [p=${PACKAGE-default}
7531f05b35a2Smrg    case $enableval in
7532f05b35a2Smrg    yes) enable_shared=yes ;;
7533f05b35a2Smrg    no) enable_shared=no ;;
7534f05b35a2Smrg    *)
7535f05b35a2Smrg      enable_shared=no
7536f05b35a2Smrg      # Look at the argument we got.  We use all the common list separators.
7537f05b35a2Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7538f05b35a2Smrg      for pkg in $enableval; do
7539f05b35a2Smrg	IFS="$lt_save_ifs"
7540f05b35a2Smrg	if test "X$pkg" = "X$p"; then
7541f05b35a2Smrg	  enable_shared=yes
7542f05b35a2Smrg	fi
7543f05b35a2Smrg      done
7544f05b35a2Smrg      IFS="$lt_save_ifs"
7545e0963edeSmrg      ;;
7546f05b35a2Smrg    esac],
7547f05b35a2Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7548e0963edeSmrg
7549f05b35a2Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7550f05b35a2Smrg	[Whether or not to build shared libraries])
7551f05b35a2Smrg])# _LT_ENABLE_SHARED
7552e0963edeSmrg
7553f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7554f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7555e0963edeSmrg
7556f05b35a2Smrg# Old names:
7557f05b35a2SmrgAC_DEFUN([AC_ENABLE_SHARED],
7558f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7559f05b35a2Smrg])
7560e0963edeSmrg
7561f05b35a2SmrgAC_DEFUN([AC_DISABLE_SHARED],
7562f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7563f05b35a2Smrg])
7564e0963edeSmrg
7565f05b35a2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7566f05b35a2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7567e0963edeSmrg
7568f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7569f05b35a2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7570f05b35a2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
7571e0963edeSmrg
7572e0963edeSmrg
7573e0963edeSmrg
7574f05b35a2Smrg# _LT_ENABLE_STATIC([DEFAULT])
7575f05b35a2Smrg# ----------------------------
7576f05b35a2Smrg# implement the --enable-static flag, and support the `static' and
7577f05b35a2Smrg# `disable-static' LT_INIT options.
7578f05b35a2Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7579f05b35a2Smrgm4_define([_LT_ENABLE_STATIC],
7580f05b35a2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7581f05b35a2SmrgAC_ARG_ENABLE([static],
7582f05b35a2Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7583f05b35a2Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7584f05b35a2Smrg    [p=${PACKAGE-default}
7585f05b35a2Smrg    case $enableval in
7586f05b35a2Smrg    yes) enable_static=yes ;;
7587f05b35a2Smrg    no) enable_static=no ;;
7588f05b35a2Smrg    *)
7589f05b35a2Smrg     enable_static=no
7590f05b35a2Smrg      # Look at the argument we got.  We use all the common list separators.
7591f05b35a2Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7592f05b35a2Smrg      for pkg in $enableval; do
7593f05b35a2Smrg	IFS="$lt_save_ifs"
7594f05b35a2Smrg	if test "X$pkg" = "X$p"; then
7595f05b35a2Smrg	  enable_static=yes
7596f05b35a2Smrg	fi
7597f05b35a2Smrg      done
7598f05b35a2Smrg      IFS="$lt_save_ifs"
7599e0963edeSmrg      ;;
7600f05b35a2Smrg    esac],
7601f05b35a2Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7602e0963edeSmrg
7603f05b35a2Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
7604f05b35a2Smrg	[Whether or not to build static libraries])
7605f05b35a2Smrg])# _LT_ENABLE_STATIC
7606e0963edeSmrg
7607f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7608f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7609e0963edeSmrg
7610f05b35a2Smrg# Old names:
7611f05b35a2SmrgAC_DEFUN([AC_ENABLE_STATIC],
7612f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7613f05b35a2Smrg])
7614e0963edeSmrg
7615f05b35a2SmrgAC_DEFUN([AC_DISABLE_STATIC],
7616f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7617f05b35a2Smrg])
7618e0963edeSmrg
7619f05b35a2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7620f05b35a2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7621e0963edeSmrg
7622f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7623f05b35a2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7624f05b35a2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7625e0963edeSmrg
7626e0963edeSmrg
7627f05b35a2Smrg
7628f05b35a2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7629f05b35a2Smrg# ----------------------------------
7630f05b35a2Smrg# implement the --enable-fast-install flag, and support the `fast-install'
7631f05b35a2Smrg# and `disable-fast-install' LT_INIT options.
7632f05b35a2Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7633f05b35a2Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
7634f05b35a2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7635f05b35a2SmrgAC_ARG_ENABLE([fast-install],
7636f05b35a2Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7637f05b35a2Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7638f05b35a2Smrg    [p=${PACKAGE-default}
7639f05b35a2Smrg    case $enableval in
7640f05b35a2Smrg    yes) enable_fast_install=yes ;;
7641f05b35a2Smrg    no) enable_fast_install=no ;;
7642f05b35a2Smrg    *)
7643f05b35a2Smrg      enable_fast_install=no
7644f05b35a2Smrg      # Look at the argument we got.  We use all the common list separators.
7645f05b35a2Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7646f05b35a2Smrg      for pkg in $enableval; do
7647f05b35a2Smrg	IFS="$lt_save_ifs"
7648f05b35a2Smrg	if test "X$pkg" = "X$p"; then
7649f05b35a2Smrg	  enable_fast_install=yes
7650e0963edeSmrg	fi
7651f05b35a2Smrg      done
7652f05b35a2Smrg      IFS="$lt_save_ifs"
7653e0963edeSmrg      ;;
7654f05b35a2Smrg    esac],
7655f05b35a2Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7656e0963edeSmrg
7657f05b35a2Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
7658f05b35a2Smrg	 [Whether or not to optimize for fast installation])dnl
7659f05b35a2Smrg])# _LT_ENABLE_FAST_INSTALL
7660e0963edeSmrg
7661f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7662f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7663e0963edeSmrg
7664f05b35a2Smrg# Old names:
7665f05b35a2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7666f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7667f05b35a2SmrgAC_DIAGNOSE([obsolete],
7668f05b35a2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7669f05b35a2Smrgthe `fast-install' option into LT_INIT's first parameter.])
7670f05b35a2Smrg])
7671e0963edeSmrg
7672f05b35a2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7673f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7674f05b35a2SmrgAC_DIAGNOSE([obsolete],
7675f05b35a2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7676f05b35a2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7677f05b35a2Smrg])
7678e0963edeSmrg
7679f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7680f05b35a2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7681f05b35a2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7682e0963edeSmrg
7683e0963edeSmrg
7684f05b35a2Smrg# _LT_WITH_PIC([MODE])
7685f05b35a2Smrg# --------------------
7686f05b35a2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7687f05b35a2Smrg# LT_INIT options.
7688f05b35a2Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7689f05b35a2Smrgm4_define([_LT_WITH_PIC],
7690f05b35a2Smrg[AC_ARG_WITH([pic],
7691f05b35a2Smrg    [AS_HELP_STRING([--with-pic],
7692f05b35a2Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7693f05b35a2Smrg    [pic_mode="$withval"],
7694f05b35a2Smrg    [pic_mode=default])
7695f05b35a2Smrg
7696f05b35a2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7697f05b35a2Smrg
7698f05b35a2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7699f05b35a2Smrg])# _LT_WITH_PIC
7700f05b35a2Smrg
7701f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7702f05b35a2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7703f05b35a2Smrg
7704f05b35a2Smrg# Old name:
7705f05b35a2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7706f05b35a2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7707f05b35a2SmrgAC_DIAGNOSE([obsolete],
7708f05b35a2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7709f05b35a2Smrgput the `pic-only' option into LT_INIT's first parameter.])
7710f05b35a2Smrg])
7711f05b35a2Smrg
7712f05b35a2Smrgdnl aclocal-1.4 backwards compatibility:
7713f05b35a2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7714e0963edeSmrg
7715e0963edeSmrg
7716f05b35a2Smrgm4_define([_LTDL_MODE], [])
7717f05b35a2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7718f05b35a2Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7719f05b35a2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7720f05b35a2Smrg		 [m4_define([_LTDL_MODE], [recursive])])
7721f05b35a2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7722f05b35a2Smrg		 [m4_define([_LTDL_MODE], [subproject])])
7723e0963edeSmrg
7724f05b35a2Smrgm4_define([_LTDL_TYPE], [])
7725f05b35a2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7726f05b35a2Smrg		 [m4_define([_LTDL_TYPE], [installable])])
7727f05b35a2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7728f05b35a2Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
7729e0963edeSmrg
7730f05b35a2Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7731e0963edeSmrg#
7732f05b35a2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7733f05b35a2Smrg# Written by Gary V. Vaughan, 2004
7734e0963edeSmrg#
7735f05b35a2Smrg# This file is free software; the Free Software Foundation gives
7736f05b35a2Smrg# unlimited permission to copy and/or distribute it, with or without
7737f05b35a2Smrg# modifications, as long as this notice is preserved.
7738e0963edeSmrg
7739f05b35a2Smrg# serial 6 ltsugar.m4
7740e0963edeSmrg
7741f05b35a2Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7742f05b35a2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7743e0963edeSmrg
7744e0963edeSmrg
7745f05b35a2Smrg# lt_join(SEP, ARG1, [ARG2...])
7746f05b35a2Smrg# -----------------------------
7747f05b35a2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7748f05b35a2Smrg# associated separator.
7749f05b35a2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7750f05b35a2Smrg# versions in m4sugar had bugs.
7751f05b35a2Smrgm4_define([lt_join],
7752f05b35a2Smrg[m4_if([$#], [1], [],
7753f05b35a2Smrg       [$#], [2], [[$2]],
7754f05b35a2Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7755f05b35a2Smrgm4_define([_lt_join],
7756f05b35a2Smrg[m4_if([$#$2], [2], [],
7757f05b35a2Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7758f05b35a2Smrg
7759f05b35a2Smrg
7760f05b35a2Smrg# lt_car(LIST)
7761f05b35a2Smrg# lt_cdr(LIST)
7762f05b35a2Smrg# ------------
7763f05b35a2Smrg# Manipulate m4 lists.
7764f05b35a2Smrg# These macros are necessary as long as will still need to support
7765f05b35a2Smrg# Autoconf-2.59 which quotes differently.
7766f05b35a2Smrgm4_define([lt_car], [[$1]])
7767f05b35a2Smrgm4_define([lt_cdr],
7768f05b35a2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7769f05b35a2Smrg       [$#], 1, [],
7770f05b35a2Smrg       [m4_dquote(m4_shift($@))])])
7771f05b35a2Smrgm4_define([lt_unquote], $1)
7772f05b35a2Smrg
7773f05b35a2Smrg
7774f05b35a2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7775f05b35a2Smrg# ------------------------------------------
7776f05b35a2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7777f05b35a2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7778f05b35a2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7779f05b35a2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7780f05b35a2Smrg# than defined and empty).
7781e0963edeSmrg#
7782f05b35a2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7783f05b35a2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7784f05b35a2Smrgm4_define([lt_append],
7785f05b35a2Smrg[m4_define([$1],
7786f05b35a2Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7787f05b35a2Smrg
7788f05b35a2Smrg
7789f05b35a2Smrg
7790f05b35a2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7791f05b35a2Smrg# ----------------------------------------------------------
7792f05b35a2Smrg# Produce a SEP delimited list of all paired combinations of elements of
7793f05b35a2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7794f05b35a2Smrg# has the form PREFIXmINFIXSUFFIXn.
7795f05b35a2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7796f05b35a2Smrgm4_define([lt_combine],
7797f05b35a2Smrg[m4_if(m4_eval([$# > 3]), [1],
7798f05b35a2Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7799f05b35a2Smrg[[m4_foreach([_Lt_prefix], [$2],
7800f05b35a2Smrg	     [m4_foreach([_Lt_suffix],
7801f05b35a2Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7802f05b35a2Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7803f05b35a2Smrg
7804f05b35a2Smrg
7805f05b35a2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7806f05b35a2Smrg# -----------------------------------------------------------------------
7807f05b35a2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7808f05b35a2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7809f05b35a2Smrgm4_define([lt_if_append_uniq],
7810f05b35a2Smrg[m4_ifdef([$1],
7811f05b35a2Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7812f05b35a2Smrg		 [lt_append([$1], [$2], [$3])$4],
7813f05b35a2Smrg		 [$5])],
7814f05b35a2Smrg	  [lt_append([$1], [$2], [$3])$4])])
7815f05b35a2Smrg
7816f05b35a2Smrg
7817f05b35a2Smrg# lt_dict_add(DICT, KEY, VALUE)
7818f05b35a2Smrg# -----------------------------
7819f05b35a2Smrgm4_define([lt_dict_add],
7820f05b35a2Smrg[m4_define([$1($2)], [$3])])
7821e0963edeSmrg
7822e0963edeSmrg
7823f05b35a2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7824f05b35a2Smrg# --------------------------------------------
7825f05b35a2Smrgm4_define([lt_dict_add_subkey],
7826f05b35a2Smrg[m4_define([$1($2:$3)], [$4])])
7827f05b35a2Smrg
7828e0963edeSmrg
7829f05b35a2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7830f05b35a2Smrg# ----------------------------------
7831f05b35a2Smrgm4_define([lt_dict_fetch],
7832f05b35a2Smrg[m4_ifval([$3],
7833f05b35a2Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7834f05b35a2Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7835e0963edeSmrg
7836e0963edeSmrg
7837f05b35a2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7838f05b35a2Smrg# -----------------------------------------------------------------
7839f05b35a2Smrgm4_define([lt_if_dict_fetch],
7840f05b35a2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7841f05b35a2Smrg	[$5],
7842f05b35a2Smrg    [$6])])
7843e0963edeSmrg
7844e0963edeSmrg
7845f05b35a2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7846f05b35a2Smrg# --------------------------------------------------------------
7847f05b35a2Smrgm4_define([lt_dict_filter],
7848f05b35a2Smrg[m4_if([$5], [], [],
7849f05b35a2Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7850f05b35a2Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7851f05b35a2Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7852e0963edeSmrg])
7853e0963edeSmrg
7854f05b35a2Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7855f05b35a2Smrg#
7856f05b35a2Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7857f05b35a2Smrg#   Written by Scott James Remnant, 2004
7858f05b35a2Smrg#
7859f05b35a2Smrg# This file is free software; the Free Software Foundation gives
7860f05b35a2Smrg# unlimited permission to copy and/or distribute it, with or without
7861f05b35a2Smrg# modifications, as long as this notice is preserved.
7862e0963edeSmrg
7863f05b35a2Smrg# Generated from ltversion.in.
7864e0963edeSmrg
7865f05b35a2Smrg# serial 3012 ltversion.m4
7866f05b35a2Smrg# This file is part of GNU Libtool
7867e0963edeSmrg
7868f05b35a2Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
7869f05b35a2Smrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7870e0963edeSmrg
7871f05b35a2SmrgAC_DEFUN([LTVERSION_VERSION],
7872f05b35a2Smrg[macro_version='2.2.6'
7873f05b35a2Smrgmacro_revision='1.3012'
7874f05b35a2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7875f05b35a2Smrg_LT_DECL(, macro_revision, 0)
7876e0963edeSmrg])
7877e0963edeSmrg
7878f05b35a2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7879f05b35a2Smrg#
7880f05b35a2Smrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7881f05b35a2Smrg#   Written by Scott James Remnant, 2004.
7882f05b35a2Smrg#
7883f05b35a2Smrg# This file is free software; the Free Software Foundation gives
7884f05b35a2Smrg# unlimited permission to copy and/or distribute it, with or without
7885f05b35a2Smrg# modifications, as long as this notice is preserved.
7886f05b35a2Smrg
7887f05b35a2Smrg# serial 4 lt~obsolete.m4
7888f05b35a2Smrg
7889f05b35a2Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
7890f05b35a2Smrg#
7891f05b35a2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7892f05b35a2Smrg# which have later been changed to m4_define as they aren't part of the
7893f05b35a2Smrg# exported API, or moved to Autoconf or Automake where they belong.
7894f05b35a2Smrg#
7895f05b35a2Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7896f05b35a2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7897f05b35a2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
7898f05b35a2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7899f05b35a2Smrg# and doesn't know about Autoconf macros at all.)
7900f05b35a2Smrg#
7901f05b35a2Smrg# So we provide this file, which has a silly filename so it's always
7902f05b35a2Smrg# included after everything else.  This provides aclocal with the
7903f05b35a2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7904f05b35a2Smrg# because those macros already exist, or will be overwritten later.
7905f05b35a2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7906f05b35a2Smrg#
7907f05b35a2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7908f05b35a2Smrg# Yes, that means every name once taken will need to remain here until
7909f05b35a2Smrg# we give up compatibility with versions before 1.7, at which point
7910f05b35a2Smrg# we need to keep only those names which we still refer to.
7911f05b35a2Smrg
7912f05b35a2Smrg# This is to help aclocal find these macros, as it can't see m4_define.
7913f05b35a2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7914f05b35a2Smrg
7915f05b35a2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7916f05b35a2Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7917f05b35a2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7918f05b35a2Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7919f05b35a2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7920f05b35a2Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7921f05b35a2Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7922f05b35a2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7923f05b35a2Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7924f05b35a2Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7925f05b35a2Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7926f05b35a2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7927f05b35a2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7928f05b35a2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7929f05b35a2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7930f05b35a2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7931f05b35a2Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7932f05b35a2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7933f05b35a2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7934f05b35a2Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7935f05b35a2Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7936f05b35a2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7937f05b35a2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7938f05b35a2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7939f05b35a2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7940f05b35a2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7941f05b35a2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7942f05b35a2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7943f05b35a2Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7944f05b35a2Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7945f05b35a2Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7946f05b35a2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7947f05b35a2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7948f05b35a2Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7949f05b35a2Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7950f05b35a2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7951f05b35a2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7952f05b35a2Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7953f05b35a2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7954f05b35a2Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7955f05b35a2Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7956f05b35a2Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7957f05b35a2Smrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7958f05b35a2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7959f05b35a2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7960f05b35a2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7961f05b35a2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7962f05b35a2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7963f05b35a2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7964f05b35a2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7965f05b35a2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7966f05b35a2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7967f05b35a2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7968f05b35a2Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7969f05b35a2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7970f05b35a2Smrg
7971e0963edeSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7972e0963edeSmrg# 
7973e0963edeSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7974e0963edeSmrg#
7975e0963edeSmrg# This program is free software; you can redistribute it and/or modify
7976e0963edeSmrg# it under the terms of the GNU General Public License as published by
7977e0963edeSmrg# the Free Software Foundation; either version 2 of the License, or
7978e0963edeSmrg# (at your option) any later version.
7979e0963edeSmrg#
7980e0963edeSmrg# This program is distributed in the hope that it will be useful, but
7981e0963edeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7982e0963edeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7983e0963edeSmrg# General Public License for more details.
7984e0963edeSmrg#
7985e0963edeSmrg# You should have received a copy of the GNU General Public License
7986e0963edeSmrg# along with this program; if not, write to the Free Software
7987e0963edeSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7988e0963edeSmrg#
7989e0963edeSmrg# As a special exception to the GNU General Public License, if you
7990e0963edeSmrg# distribute this file as part of a program that contains a
7991e0963edeSmrg# configuration script generated by Autoconf, you may include it under
7992e0963edeSmrg# the same distribution terms that you use for the rest of that program.
7993e0963edeSmrg
7994e0963edeSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7995e0963edeSmrg# ----------------------------------
7996e0963edeSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7997e0963edeSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7998e0963edeSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7999e0963edeSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8000e0963edeSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8001e0963edeSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8002e0963edeSmrgfi
8003e0963edeSmrgif test -n "$PKG_CONFIG"; then
8004e0963edeSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
8005e0963edeSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8006e0963edeSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8007e0963edeSmrg		AC_MSG_RESULT([yes])
8008e0963edeSmrg	else
8009e0963edeSmrg		AC_MSG_RESULT([no])
8010e0963edeSmrg		PKG_CONFIG=""
8011e0963edeSmrg	fi
8012e0963edeSmrg		
8013e0963edeSmrgfi[]dnl
8014e0963edeSmrg])# PKG_PROG_PKG_CONFIG
8015e0963edeSmrg
8016e0963edeSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8017e0963edeSmrg#
8018e0963edeSmrg# Check to see whether a particular set of modules exists.  Similar
8019e0963edeSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8020e0963edeSmrg#
8021e0963edeSmrg#
8022e0963edeSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8023e0963edeSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
8024e0963edeSmrg# PKG_CHECK_EXISTS manually
8025e0963edeSmrg# --------------------------------------------------------------
8026e0963edeSmrgAC_DEFUN([PKG_CHECK_EXISTS],
8027e0963edeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8028e0963edeSmrgif test -n "$PKG_CONFIG" && \
8029e0963edeSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8030e0963edeSmrg  m4_ifval([$2], [$2], [:])
8031e0963edeSmrgm4_ifvaln([$3], [else
8032e0963edeSmrg  $3])dnl
8033e0963edeSmrgfi])
8034e0963edeSmrg
8035e0963edeSmrg
8036e0963edeSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8037e0963edeSmrg# ---------------------------------------------
8038e0963edeSmrgm4_define([_PKG_CONFIG],
8039e0963edeSmrg[if test -n "$$1"; then
8040e0963edeSmrg    pkg_cv_[]$1="$$1"
8041e0963edeSmrg elif test -n "$PKG_CONFIG"; then
8042e0963edeSmrg    PKG_CHECK_EXISTS([$3],
8043e0963edeSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8044e0963edeSmrg		     [pkg_failed=yes])
8045e0963edeSmrg else
8046e0963edeSmrg    pkg_failed=untried
8047e0963edeSmrgfi[]dnl
8048e0963edeSmrg])# _PKG_CONFIG
8049e0963edeSmrg
8050e0963edeSmrg# _PKG_SHORT_ERRORS_SUPPORTED
8051e0963edeSmrg# -----------------------------
8052e0963edeSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8053e0963edeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8054e0963edeSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8055e0963edeSmrg        _pkg_short_errors_supported=yes
8056e0963edeSmrgelse
8057e0963edeSmrg        _pkg_short_errors_supported=no
8058e0963edeSmrgfi[]dnl
8059e0963edeSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
8060e0963edeSmrg
8061e0963edeSmrg
8062e0963edeSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8063e0963edeSmrg# [ACTION-IF-NOT-FOUND])
8064e0963edeSmrg#
8065e0963edeSmrg#
8066e0963edeSmrg# Note that if there is a possibility the first call to
8067e0963edeSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8068e0963edeSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8069e0963edeSmrg#
8070e0963edeSmrg#
8071e0963edeSmrg# --------------------------------------------------------------
8072e0963edeSmrgAC_DEFUN([PKG_CHECK_MODULES],
8073e0963edeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8074e0963edeSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8075e0963edeSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8076e0963edeSmrg
8077e0963edeSmrgpkg_failed=no
8078e0963edeSmrgAC_MSG_CHECKING([for $1])
8079e0963edeSmrg
8080e0963edeSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8081e0963edeSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8082e0963edeSmrg
8083e0963edeSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8084e0963edeSmrgand $1[]_LIBS to avoid the need to call pkg-config.
8085e0963edeSmrgSee the pkg-config man page for more details.])
8086e0963edeSmrg
8087e0963edeSmrgif test $pkg_failed = yes; then
8088e0963edeSmrg        _PKG_SHORT_ERRORS_SUPPORTED
8089e0963edeSmrg        if test $_pkg_short_errors_supported = yes; then
8090e0963edeSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8091e0963edeSmrg        else 
8092e0963edeSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8093e0963edeSmrg        fi
8094e0963edeSmrg	# Put the nasty error message in config.log where it belongs
8095e0963edeSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8096e0963edeSmrg
8097e0963edeSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8098e0963edeSmrg[Package requirements ($2) were not met:
8099e0963edeSmrg
8100e0963edeSmrg$$1_PKG_ERRORS
8101e0963edeSmrg
8102e0963edeSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8103e0963edeSmrginstalled software in a non-standard prefix.
8104e0963edeSmrg
8105e0963edeSmrg_PKG_TEXT
8106e0963edeSmrg])],
8107e0963edeSmrg		[AC_MSG_RESULT([no])
8108e0963edeSmrg                $4])
8109e0963edeSmrgelif test $pkg_failed = untried; then
8110e0963edeSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8111e0963edeSmrg[The pkg-config script could not be found or is too old.  Make sure it
8112e0963edeSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
8113e0963edeSmrgpath to pkg-config.
8114e0963edeSmrg
8115e0963edeSmrg_PKG_TEXT
8116e0963edeSmrg
8117e0963edeSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8118e0963edeSmrg		[$4])
8119e0963edeSmrgelse
8120e0963edeSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8121e0963edeSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8122e0963edeSmrg        AC_MSG_RESULT([yes])
8123e0963edeSmrg	ifelse([$3], , :, [$3])
8124e0963edeSmrgfi[]dnl
8125e0963edeSmrg])# PKG_CHECK_MODULES
8126e0963edeSmrg
8127f05b35a2Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8128e0963edeSmrg#
8129f05b35a2Smrg# This file is free software; the Free Software Foundation
8130f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8131f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8132e0963edeSmrg
8133f05b35a2Smrg# AM_AUTOMAKE_VERSION(VERSION)
8134f05b35a2Smrg# ----------------------------
8135f05b35a2Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
8136f05b35a2Smrg# generated from the m4 files accompanying Automake X.Y.
8137f05b35a2Smrg# (This private macro should not be called outside this file.)
8138f05b35a2SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8139f05b35a2Smrg[am__api_version='1.11'
8140f05b35a2Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8141f05b35a2Smrgdnl require some minimum version.  Point them to the right macro.
8142f05b35a2Smrgm4_if([$1], [1.11], [],
8143f05b35a2Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8144f05b35a2Smrg])
8145e0963edeSmrg
8146f05b35a2Smrg# _AM_AUTOCONF_VERSION(VERSION)
8147f05b35a2Smrg# -----------------------------
8148f05b35a2Smrg# aclocal traces this macro to find the Autoconf version.
8149f05b35a2Smrg# This is a private macro too.  Using m4_define simplifies
8150f05b35a2Smrg# the logic in aclocal, which can simply ignore this definition.
8151f05b35a2Smrgm4_define([_AM_AUTOCONF_VERSION], [])
8152e0963edeSmrg
8153f05b35a2Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
8154f05b35a2Smrg# -------------------------------
8155f05b35a2Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8156f05b35a2Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8157f05b35a2SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8158f05b35a2Smrg[AM_AUTOMAKE_VERSION([1.11])dnl
8159f05b35a2Smrgm4_ifndef([AC_AUTOCONF_VERSION],
8160f05b35a2Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8161f05b35a2Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8162e0963edeSmrg
8163f05b35a2Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8164f05b35a2Smrg
8165f05b35a2Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8166f05b35a2Smrg#
8167f05b35a2Smrg# This file is free software; the Free Software Foundation
8168f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8169f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8170f05b35a2Smrg
8171f05b35a2Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8172f05b35a2Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8173f05b35a2Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8174f05b35a2Smrg#
8175f05b35a2Smrg# Of course, Automake must honor this variable whenever it calls a
8176f05b35a2Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
8177f05b35a2Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
8178f05b35a2Smrg# depending on how configure is run.  This is pretty annoying, since
8179f05b35a2Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8180f05b35a2Smrg# source directory, any form will work fine, but in subdirectories a
8181f05b35a2Smrg# relative path needs to be adjusted first.
8182e0963edeSmrg#
8183f05b35a2Smrg# $ac_aux_dir/missing
8184f05b35a2Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8185f05b35a2Smrg# $top_srcdir/$ac_aux_dir/missing
8186f05b35a2Smrg#    fails if $ac_aux_dir is absolute,
8187f05b35a2Smrg#    fails when called from a subdirectory in a VPATH build with
8188f05b35a2Smrg#          a relative $ac_aux_dir
8189f05b35a2Smrg#
8190f05b35a2Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8191f05b35a2Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8192f05b35a2Smrg# harmless because $srcdir is `.', but things will broke when you
8193f05b35a2Smrg# start a VPATH build or use an absolute $srcdir.
8194f05b35a2Smrg#
8195f05b35a2Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8196f05b35a2Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8197f05b35a2Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8198f05b35a2Smrg# and then we would define $MISSING as
8199f05b35a2Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
8200f05b35a2Smrg# This will work as long as MISSING is not called from configure, because
8201f05b35a2Smrg# unfortunately $(top_srcdir) has no meaning in configure.
8202f05b35a2Smrg# However there are other variables, like CC, which are often used in
8203f05b35a2Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
8204f05b35a2Smrg#
8205f05b35a2Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
8206f05b35a2Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
8207f05b35a2Smrg# configured tree to be moved without reconfiguration.
8208e0963edeSmrg
8209f05b35a2SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
8210f05b35a2Smrg[dnl Rely on autoconf to set up CDPATH properly.
8211f05b35a2SmrgAC_PREREQ([2.50])dnl
8212f05b35a2Smrg# expand $ac_aux_dir to an absolute path
8213f05b35a2Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
8214f05b35a2Smrg])
8215e0963edeSmrg
8216f05b35a2Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
8217e0963edeSmrg
8218f05b35a2Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8219f05b35a2Smrg# Free Software Foundation, Inc.
8220f05b35a2Smrg#
8221f05b35a2Smrg# This file is free software; the Free Software Foundation
8222f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8223f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8224e0963edeSmrg
8225f05b35a2Smrg# serial 9
8226e0963edeSmrg
8227f05b35a2Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8228f05b35a2Smrg# -------------------------------------
8229f05b35a2Smrg# Define a conditional.
8230f05b35a2SmrgAC_DEFUN([AM_CONDITIONAL],
8231f05b35a2Smrg[AC_PREREQ(2.52)dnl
8232f05b35a2Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8233f05b35a2Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8234f05b35a2SmrgAC_SUBST([$1_TRUE])dnl
8235f05b35a2SmrgAC_SUBST([$1_FALSE])dnl
8236f05b35a2Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8237f05b35a2Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8238f05b35a2Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
8239f05b35a2Smrgif $2; then
8240f05b35a2Smrg  $1_TRUE=
8241f05b35a2Smrg  $1_FALSE='#'
8242f05b35a2Smrgelse
8243f05b35a2Smrg  $1_TRUE='#'
8244f05b35a2Smrg  $1_FALSE=
8245e0963edeSmrgfi
8246f05b35a2SmrgAC_CONFIG_COMMANDS_PRE(
8247f05b35a2Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8248f05b35a2Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
8249f05b35a2SmrgUsually this means the macro was only invoked conditionally.]])
8250f05b35a2Smrgfi])])
8251e0963edeSmrg
8252f05b35a2Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8253f05b35a2Smrg# Free Software Foundation, Inc.
8254f05b35a2Smrg#
8255f05b35a2Smrg# This file is free software; the Free Software Foundation
8256f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8257f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8258e0963edeSmrg
8259f05b35a2Smrg# serial 10
8260e0963edeSmrg
8261f05b35a2Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8262f05b35a2Smrg# written in clear, in which case automake, when reading aclocal.m4,
8263f05b35a2Smrg# will think it sees a *use*, and therefore will trigger all it's
8264f05b35a2Smrg# C support machinery.  Also note that it means that autoscan, seeing
8265f05b35a2Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8266e0963edeSmrg
8267e0963edeSmrg
8268f05b35a2Smrg# _AM_DEPENDENCIES(NAME)
8269f05b35a2Smrg# ----------------------
8270f05b35a2Smrg# See how the compiler implements dependency checking.
8271f05b35a2Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
8272f05b35a2Smrg# We try a few techniques and use that to set a single cache variable.
8273e0963edeSmrg#
8274f05b35a2Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8275f05b35a2Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8276f05b35a2Smrg# dependency, and given that the user is not expected to run this macro,
8277f05b35a2Smrg# just rely on AC_PROG_CC.
8278f05b35a2SmrgAC_DEFUN([_AM_DEPENDENCIES],
8279f05b35a2Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
8280f05b35a2SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8281f05b35a2SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
8282f05b35a2SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
8283e0963edeSmrg
8284f05b35a2Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8285f05b35a2Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8286f05b35a2Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8287f05b35a2Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8288f05b35a2Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8289f05b35a2Smrg                   [depcc="$$1"   am_compiler_list=])
8290e0963edeSmrg
8291f05b35a2SmrgAC_CACHE_CHECK([dependency style of $depcc],
8292f05b35a2Smrg               [am_cv_$1_dependencies_compiler_type],
8293f05b35a2Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8294f05b35a2Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
8295f05b35a2Smrg  # making bogus files that we don't know about and never remove.  For
8296f05b35a2Smrg  # instance it was reported that on HP-UX the gcc test will end up
8297f05b35a2Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
8298f05b35a2Smrg  # in D'.
8299f05b35a2Smrg  mkdir conftest.dir
8300f05b35a2Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
8301f05b35a2Smrg  # using a relative directory.
8302f05b35a2Smrg  cp "$am_depcomp" conftest.dir
8303f05b35a2Smrg  cd conftest.dir
8304f05b35a2Smrg  # We will build objects and dependencies in a subdirectory because
8305f05b35a2Smrg  # it helps to detect inapplicable dependency modes.  For instance
8306f05b35a2Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
8307f05b35a2Smrg  # side effect of compilation, but ICC will put the dependencies in
8308f05b35a2Smrg  # the current directory while Tru64 will put them in the object
8309f05b35a2Smrg  # directory.
8310f05b35a2Smrg  mkdir sub
8311e0963edeSmrg
8312f05b35a2Smrg  am_cv_$1_dependencies_compiler_type=none
8313f05b35a2Smrg  if test "$am_compiler_list" = ""; then
8314f05b35a2Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8315f05b35a2Smrg  fi
8316f05b35a2Smrg  am__universal=false
8317f05b35a2Smrg  m4_case([$1], [CC],
8318f05b35a2Smrg    [case " $depcc " in #(
8319f05b35a2Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8320f05b35a2Smrg     esac],
8321f05b35a2Smrg    [CXX],
8322f05b35a2Smrg    [case " $depcc " in #(
8323f05b35a2Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8324f05b35a2Smrg     esac])
8325e0963edeSmrg
8326f05b35a2Smrg  for depmode in $am_compiler_list; do
8327f05b35a2Smrg    # Setup a source with many dependencies, because some compilers
8328f05b35a2Smrg    # like to wrap large dependency lists on column 80 (with \), and
8329f05b35a2Smrg    # we should not choose a depcomp mode which is confused by this.
8330f05b35a2Smrg    #
8331f05b35a2Smrg    # We need to recreate these files for each test, as the compiler may
8332f05b35a2Smrg    # overwrite some of them when testing with obscure command lines.
8333f05b35a2Smrg    # This happens at least with the AIX C compiler.
8334f05b35a2Smrg    : > sub/conftest.c
8335f05b35a2Smrg    for i in 1 2 3 4 5 6; do
8336f05b35a2Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8337f05b35a2Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8338f05b35a2Smrg      # Solaris 8's {/usr,}/bin/sh.
8339f05b35a2Smrg      touch sub/conftst$i.h
8340f05b35a2Smrg    done
8341f05b35a2Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8342f05b35a2Smrg
8343f05b35a2Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8344f05b35a2Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
8345f05b35a2Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
8346f05b35a2Smrg    # versions had trouble with output in subdirs
8347f05b35a2Smrg    am__obj=sub/conftest.${OBJEXT-o}
8348f05b35a2Smrg    am__minus_obj="-o $am__obj"
8349f05b35a2Smrg    case $depmode in
8350f05b35a2Smrg    gcc)
8351f05b35a2Smrg      # This depmode causes a compiler race in universal mode.
8352f05b35a2Smrg      test "$am__universal" = false || continue
8353f05b35a2Smrg      ;;
8354f05b35a2Smrg    nosideeffect)
8355f05b35a2Smrg      # after this tag, mechanisms are not by side-effect, so they'll
8356f05b35a2Smrg      # only be used when explicitly requested
8357f05b35a2Smrg      if test "x$enable_dependency_tracking" = xyes; then
8358f05b35a2Smrg	continue
8359f05b35a2Smrg      else
8360f05b35a2Smrg	break
8361f05b35a2Smrg      fi
8362f05b35a2Smrg      ;;
8363f05b35a2Smrg    msvisualcpp | msvcmsys)
8364f05b35a2Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
8365f05b35a2Smrg      # not run yet.  These depmodes are late enough in the game, and
8366f05b35a2Smrg      # so weak that their functioning should not be impacted.
8367f05b35a2Smrg      am__obj=conftest.${OBJEXT-o}
8368f05b35a2Smrg      am__minus_obj=
8369f05b35a2Smrg      ;;
8370f05b35a2Smrg    none) break ;;
8371f05b35a2Smrg    esac
8372f05b35a2Smrg    if depmode=$depmode \
8373f05b35a2Smrg       source=sub/conftest.c object=$am__obj \
8374f05b35a2Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8375f05b35a2Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8376f05b35a2Smrg         >/dev/null 2>conftest.err &&
8377f05b35a2Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8378f05b35a2Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8379f05b35a2Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8380f05b35a2Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8381f05b35a2Smrg      # icc doesn't choke on unknown options, it will just issue warnings
8382f05b35a2Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
8383f05b35a2Smrg      # that says an option was ignored or not supported.
8384f05b35a2Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
8385f05b35a2Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
8386f05b35a2Smrg      # The diagnosis changed in icc 8.0:
8387f05b35a2Smrg      #   icc: Command line remark: option '-MP' not supported
8388f05b35a2Smrg      if (grep 'ignoring option' conftest.err ||
8389f05b35a2Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8390f05b35a2Smrg        am_cv_$1_dependencies_compiler_type=$depmode
8391f05b35a2Smrg        break
8392f05b35a2Smrg      fi
8393f05b35a2Smrg    fi
8394f05b35a2Smrg  done
8395f05b35a2Smrg
8396f05b35a2Smrg  cd ..
8397f05b35a2Smrg  rm -rf conftest.dir
8398e0963edeSmrgelse
8399f05b35a2Smrg  am_cv_$1_dependencies_compiler_type=none
8400e0963edeSmrgfi
8401f05b35a2Smrg])
8402f05b35a2SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8403f05b35a2SmrgAM_CONDITIONAL([am__fastdep$1], [
8404f05b35a2Smrg  test "x$enable_dependency_tracking" != xno \
8405f05b35a2Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8406f05b35a2Smrg])
8407e0963edeSmrg
8408e0963edeSmrg
8409f05b35a2Smrg# AM_SET_DEPDIR
8410f05b35a2Smrg# -------------
8411f05b35a2Smrg# Choose a directory name for dependency files.
8412f05b35a2Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
8413f05b35a2SmrgAC_DEFUN([AM_SET_DEPDIR],
8414f05b35a2Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8415f05b35a2SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8416f05b35a2Smrg])
8417e0963edeSmrg
8418e0963edeSmrg
8419f05b35a2Smrg# AM_DEP_TRACK
8420f05b35a2Smrg# ------------
8421f05b35a2SmrgAC_DEFUN([AM_DEP_TRACK],
8422f05b35a2Smrg[AC_ARG_ENABLE(dependency-tracking,
8423f05b35a2Smrg[  --disable-dependency-tracking  speeds up one-time build
8424f05b35a2Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
8425f05b35a2Smrgif test "x$enable_dependency_tracking" != xno; then
8426f05b35a2Smrg  am_depcomp="$ac_aux_dir/depcomp"
8427f05b35a2Smrg  AMDEPBACKSLASH='\'
8428e0963edeSmrgfi
8429f05b35a2SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8430f05b35a2SmrgAC_SUBST([AMDEPBACKSLASH])dnl
8431f05b35a2Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8432f05b35a2Smrg])
8433e0963edeSmrg
8434f05b35a2Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
8435e0963edeSmrg
8436f05b35a2Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8437f05b35a2Smrg# Free Software Foundation, Inc.
8438e0963edeSmrg#
8439f05b35a2Smrg# This file is free software; the Free Software Foundation
8440f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8441f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8442e0963edeSmrg
8443f05b35a2Smrg#serial 5
8444e0963edeSmrg
8445f05b35a2Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
8446f05b35a2Smrg# ------------------------------
8447f05b35a2SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8448f05b35a2Smrg[{
8449f05b35a2Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
8450f05b35a2Smrg  # are listed without --file.  Let's play safe and only enable the eval
8451f05b35a2Smrg  # if we detect the quoting.
8452f05b35a2Smrg  case $CONFIG_FILES in
8453f05b35a2Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
8454f05b35a2Smrg  *)   set x $CONFIG_FILES ;;
8455f05b35a2Smrg  esac
8456f05b35a2Smrg  shift
8457f05b35a2Smrg  for mf
8458f05b35a2Smrg  do
8459f05b35a2Smrg    # Strip MF so we end up with the name of the file.
8460f05b35a2Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
8461f05b35a2Smrg    # Check whether this is an Automake generated Makefile or not.
8462f05b35a2Smrg    # We used to match only the files named `Makefile.in', but
8463f05b35a2Smrg    # some people rename them; so instead we look at the file content.
8464f05b35a2Smrg    # Grep'ing the first line is not enough: some people post-process
8465f05b35a2Smrg    # each Makefile.in and add a new line on top of each file to say so.
8466f05b35a2Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
8467f05b35a2Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
8468f05b35a2Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8469f05b35a2Smrg      dirpart=`AS_DIRNAME("$mf")`
8470f05b35a2Smrg    else
8471f05b35a2Smrg      continue
8472f05b35a2Smrg    fi
8473f05b35a2Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
8474f05b35a2Smrg    # from the Makefile without running `make'.
8475f05b35a2Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8476f05b35a2Smrg    test -z "$DEPDIR" && continue
8477f05b35a2Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
8478f05b35a2Smrg    test -z "am__include" && continue
8479f05b35a2Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8480f05b35a2Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
8481f05b35a2Smrg    U=`sed -n 's/^U = //p' < "$mf"`
8482f05b35a2Smrg    # Find all dependency output files, they are included files with
8483f05b35a2Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
8484f05b35a2Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
8485f05b35a2Smrg    # expansion.
8486f05b35a2Smrg    for file in `sed -n "
8487f05b35a2Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8488f05b35a2Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8489f05b35a2Smrg      # Make sure the directory exists.
8490f05b35a2Smrg      test -f "$dirpart/$file" && continue
8491f05b35a2Smrg      fdir=`AS_DIRNAME(["$file"])`
8492f05b35a2Smrg      AS_MKDIR_P([$dirpart/$fdir])
8493f05b35a2Smrg      # echo "creating $dirpart/$file"
8494f05b35a2Smrg      echo '# dummy' > "$dirpart/$file"
8495f05b35a2Smrg    done
8496f05b35a2Smrg  done
8497f05b35a2Smrg}
8498f05b35a2Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8499e0963edeSmrg
8500e0963edeSmrg
8501f05b35a2Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
8502f05b35a2Smrg# -----------------------------
8503f05b35a2Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
8504f05b35a2Smrg#
8505f05b35a2Smrg# This code is only required when automatic dependency tracking
8506f05b35a2Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
8507f05b35a2Smrg# need in order to bootstrap the dependency handling code.
8508f05b35a2SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8509f05b35a2Smrg[AC_CONFIG_COMMANDS([depfiles],
8510f05b35a2Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8511f05b35a2Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8512f05b35a2Smrg])
8513e0963edeSmrg
8514f05b35a2Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8515f05b35a2Smrg# Free Software Foundation, Inc.
8516f05b35a2Smrg#
8517f05b35a2Smrg# This file is free software; the Free Software Foundation
8518f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8519f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8520e0963edeSmrg
8521f05b35a2Smrg# serial 8
8522e0963edeSmrg
8523f05b35a2Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
8524f05b35a2SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
8525e0963edeSmrg
8526f05b35a2Smrg# Do all the work for Automake.                             -*- Autoconf -*-
8527e0963edeSmrg
8528f05b35a2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8529f05b35a2Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
8530e0963edeSmrg#
8531f05b35a2Smrg# This file is free software; the Free Software Foundation
8532f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8533f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8534e0963edeSmrg
8535f05b35a2Smrg# serial 16
8536f05b35a2Smrg
8537f05b35a2Smrg# This macro actually does too much.  Some checks are only needed if
8538f05b35a2Smrg# your package does certain things.  But this isn't really a big deal.
8539f05b35a2Smrg
8540f05b35a2Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8541f05b35a2Smrg# AM_INIT_AUTOMAKE([OPTIONS])
8542f05b35a2Smrg# -----------------------------------------------
8543f05b35a2Smrg# The call with PACKAGE and VERSION arguments is the old style
8544f05b35a2Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
8545f05b35a2Smrg# and VERSION should now be passed to AC_INIT and removed from
8546f05b35a2Smrg# the call to AM_INIT_AUTOMAKE.
8547f05b35a2Smrg# We support both call styles for the transition.  After
8548f05b35a2Smrg# the next Automake release, Autoconf can make the AC_INIT
8549f05b35a2Smrg# arguments mandatory, and then we can depend on a new Autoconf
8550f05b35a2Smrg# release and drop the old call support.
8551f05b35a2SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
8552f05b35a2Smrg[AC_PREREQ([2.62])dnl
8553f05b35a2Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
8554f05b35a2Smrgdnl the ones we care about.
8555f05b35a2Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8556f05b35a2SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8557f05b35a2SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
8558f05b35a2Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
8559f05b35a2Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8560f05b35a2Smrg  # is not polluted with repeated "-I."
8561f05b35a2Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8562f05b35a2Smrg  # test to see if srcdir already configured
8563f05b35a2Smrg  if test -f $srcdir/config.status; then
8564f05b35a2Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8565f05b35a2Smrg  fi
8566e0963edeSmrgfi
8567e0963edeSmrg
8568f05b35a2Smrg# test whether we have cygpath
8569f05b35a2Smrgif test -z "$CYGPATH_W"; then
8570f05b35a2Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
8571f05b35a2Smrg    CYGPATH_W='cygpath -w'
8572f05b35a2Smrg  else
8573f05b35a2Smrg    CYGPATH_W=echo
8574f05b35a2Smrg  fi
8575e0963edeSmrgfi
8576f05b35a2SmrgAC_SUBST([CYGPATH_W])
8577e0963edeSmrg
8578f05b35a2Smrg# Define the identity of the package.
8579f05b35a2Smrgdnl Distinguish between old-style and new-style calls.
8580f05b35a2Smrgm4_ifval([$2],
8581f05b35a2Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8582f05b35a2Smrg AC_SUBST([PACKAGE], [$1])dnl
8583f05b35a2Smrg AC_SUBST([VERSION], [$2])],
8584f05b35a2Smrg[_AM_SET_OPTIONS([$1])dnl
8585f05b35a2Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8586f05b35a2Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8587f05b35a2Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8588f05b35a2Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8589f05b35a2Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8590f05b35a2Smrg
8591f05b35a2Smrg_AM_IF_OPTION([no-define],,
8592f05b35a2Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8593f05b35a2Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8594f05b35a2Smrg
8595f05b35a2Smrg# Some tools Automake needs.
8596f05b35a2SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
8597f05b35a2SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
8598f05b35a2SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8599f05b35a2SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
8600f05b35a2SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8601f05b35a2SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
8602f05b35a2SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
8603f05b35a2SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8604f05b35a2SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
8605f05b35a2SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
8606f05b35a2Smrg# We need awk for the "check" target.  The system "awk" is bad on
8607f05b35a2Smrg# some platforms.
8608f05b35a2SmrgAC_REQUIRE([AC_PROG_AWK])dnl
8609f05b35a2SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
8610f05b35a2SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
8611f05b35a2Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8612f05b35a2Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8613f05b35a2Smrg			     [_AM_PROG_TAR([v7])])])
8614f05b35a2Smrg_AM_IF_OPTION([no-dependencies],,
8615f05b35a2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
8616f05b35a2Smrg		  [_AM_DEPENDENCIES(CC)],
8617f05b35a2Smrg		  [define([AC_PROG_CC],
8618f05b35a2Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8619f05b35a2SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
8620f05b35a2Smrg		  [_AM_DEPENDENCIES(CXX)],
8621f05b35a2Smrg		  [define([AC_PROG_CXX],
8622f05b35a2Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8623f05b35a2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
8624f05b35a2Smrg		  [_AM_DEPENDENCIES(OBJC)],
8625f05b35a2Smrg		  [define([AC_PROG_OBJC],
8626f05b35a2Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8627f05b35a2Smrg])
8628f05b35a2Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
8629f05b35a2Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
8630f05b35a2Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
8631f05b35a2Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
8632f05b35a2SmrgAC_CONFIG_COMMANDS_PRE(dnl
8633f05b35a2Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
8634f05b35a2Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
8635f05b35a2Smrg])
8636e0963edeSmrg
8637f05b35a2Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
8638f05b35a2Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
8639f05b35a2Smrgdnl mangled by Autoconf and run in a shell conditional statement.
8640f05b35a2Smrgm4_define([_AC_COMPILER_EXEEXT],
8641f05b35a2Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
8642e0963edeSmrg
8643e0963edeSmrg
8644f05b35a2Smrg# When config.status generates a header, we must update the stamp-h file.
8645f05b35a2Smrg# This file resides in the same directory as the config header
8646f05b35a2Smrg# that is generated.  The stamp files are numbered to have different names.
8647e0963edeSmrg
8648f05b35a2Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8649f05b35a2Smrg# loop where config.status creates the headers, so we can generate
8650f05b35a2Smrg# our stamp files there.
8651f05b35a2SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8652f05b35a2Smrg[# Compute $1's index in $config_headers.
8653f05b35a2Smrg_am_arg=$1
8654f05b35a2Smrg_am_stamp_count=1
8655f05b35a2Smrgfor _am_header in $config_headers :; do
8656f05b35a2Smrg  case $_am_header in
8657f05b35a2Smrg    $_am_arg | $_am_arg:* )
8658f05b35a2Smrg      break ;;
8659f05b35a2Smrg    * )
8660f05b35a2Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8661f05b35a2Smrg  esac
8662f05b35a2Smrgdone
8663f05b35a2Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8664e0963edeSmrg
8665f05b35a2Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
8666e0963edeSmrg#
8667f05b35a2Smrg# This file is free software; the Free Software Foundation
8668f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8669f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8670e0963edeSmrg
8671f05b35a2Smrg# AM_PROG_INSTALL_SH
8672f05b35a2Smrg# ------------------
8673f05b35a2Smrg# Define $install_sh.
8674f05b35a2SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
8675f05b35a2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8676f05b35a2Smrgif test x"${install_sh}" != xset; then
8677f05b35a2Smrg  case $am_aux_dir in
8678f05b35a2Smrg  *\ * | *\	*)
8679f05b35a2Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8680f05b35a2Smrg  *)
8681f05b35a2Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
8682f05b35a2Smrg  esac
8683e0963edeSmrgfi
8684f05b35a2SmrgAC_SUBST(install_sh)])
8685e0963edeSmrg
8686f05b35a2Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
8687e0963edeSmrg#
8688e0963edeSmrg# This file is free software; the Free Software Foundation
8689e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8690e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8691e0963edeSmrg
8692f05b35a2Smrg# serial 2
8693e0963edeSmrg
8694f05b35a2Smrg# Check whether the underlying file-system supports filenames
8695f05b35a2Smrg# with a leading dot.  For instance MS-DOS doesn't.
8696f05b35a2SmrgAC_DEFUN([AM_SET_LEADING_DOT],
8697f05b35a2Smrg[rm -rf .tst 2>/dev/null
8698f05b35a2Smrgmkdir .tst 2>/dev/null
8699f05b35a2Smrgif test -d .tst; then
8700f05b35a2Smrg  am__leading_dot=.
8701f05b35a2Smrgelse
8702f05b35a2Smrg  am__leading_dot=_
8703f05b35a2Smrgfi
8704f05b35a2Smrgrmdir .tst 2>/dev/null
8705f05b35a2SmrgAC_SUBST([am__leading_dot])])
8706e0963edeSmrg
8707f05b35a2Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
8708f05b35a2Smrg# From Jim Meyering
8709e0963edeSmrg
8710f05b35a2Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8711f05b35a2Smrg# Free Software Foundation, Inc.
8712e0963edeSmrg#
8713e0963edeSmrg# This file is free software; the Free Software Foundation
8714e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8715e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8716e0963edeSmrg
8717f05b35a2Smrg# serial 5
8718e0963edeSmrg
8719f05b35a2Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
8720f05b35a2Smrg# ----------------------------------
8721f05b35a2Smrg# Control maintainer-specific portions of Makefiles.
8722f05b35a2Smrg# Default is to disable them, unless `enable' is passed literally.
8723f05b35a2Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
8724f05b35a2Smrg# can override the default with the --enable/--disable switch.
8725f05b35a2SmrgAC_DEFUN([AM_MAINTAINER_MODE],
8726f05b35a2Smrg[m4_case(m4_default([$1], [disable]),
8727f05b35a2Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
8728f05b35a2Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
8729f05b35a2Smrg       [m4_define([am_maintainer_other], [enable])
8730f05b35a2Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8731f05b35a2SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
8732f05b35a2Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
8733f05b35a2Smrg  AC_ARG_ENABLE([maintainer-mode],
8734f05b35a2Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
8735f05b35a2Smrg			  (and sometimes confusing) to the casual installer],
8736f05b35a2Smrg      [USE_MAINTAINER_MODE=$enableval],
8737f05b35a2Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
8738f05b35a2Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8739f05b35a2Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
8740f05b35a2Smrg  MAINT=$MAINTAINER_MODE_TRUE
8741f05b35a2Smrg  AC_SUBST([MAINT])dnl
8742f05b35a2Smrg]
8743f05b35a2Smrg)
8744e0963edeSmrg
8745f05b35a2SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8746f05b35a2Smrg
8747f05b35a2Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
8748e0963edeSmrg
8749f05b35a2Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
8750e0963edeSmrg#
8751e0963edeSmrg# This file is free software; the Free Software Foundation
8752e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8753e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8754e0963edeSmrg
8755f05b35a2Smrg# serial 4
8756e0963edeSmrg
8757f05b35a2Smrg# AM_MAKE_INCLUDE()
8758f05b35a2Smrg# -----------------
8759f05b35a2Smrg# Check to see how make treats includes.
8760f05b35a2SmrgAC_DEFUN([AM_MAKE_INCLUDE],
8761f05b35a2Smrg[am_make=${MAKE-make}
8762f05b35a2Smrgcat > confinc << 'END'
8763f05b35a2Smrgam__doit:
8764f05b35a2Smrg	@echo this is the am__doit target
8765f05b35a2Smrg.PHONY: am__doit
8766f05b35a2SmrgEND
8767f05b35a2Smrg# If we don't find an include directive, just comment out the code.
8768f05b35a2SmrgAC_MSG_CHECKING([for style of include used by $am_make])
8769f05b35a2Smrgam__include="#"
8770f05b35a2Smrgam__quote=
8771f05b35a2Smrg_am_result=none
8772f05b35a2Smrg# First try GNU make style include.
8773f05b35a2Smrgecho "include confinc" > confmf
8774f05b35a2Smrg# Ignore all kinds of additional output from `make'.
8775f05b35a2Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
8776f05b35a2Smrg*the\ am__doit\ target*)
8777f05b35a2Smrg  am__include=include
8778f05b35a2Smrg  am__quote=
8779f05b35a2Smrg  _am_result=GNU
8780f05b35a2Smrg  ;;
8781f05b35a2Smrgesac
8782f05b35a2Smrg# Now try BSD make style include.
8783f05b35a2Smrgif test "$am__include" = "#"; then
8784f05b35a2Smrg   echo '.include "confinc"' > confmf
8785f05b35a2Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
8786f05b35a2Smrg   *the\ am__doit\ target*)
8787f05b35a2Smrg     am__include=.include
8788f05b35a2Smrg     am__quote="\""
8789f05b35a2Smrg     _am_result=BSD
8790f05b35a2Smrg     ;;
8791f05b35a2Smrg   esac
8792e0963edeSmrgfi
8793f05b35a2SmrgAC_SUBST([am__include])
8794f05b35a2SmrgAC_SUBST([am__quote])
8795f05b35a2SmrgAC_MSG_RESULT([$_am_result])
8796f05b35a2Smrgrm -f confinc confmf
8797f05b35a2Smrg])
8798e0963edeSmrg
8799f05b35a2Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8800f05b35a2Smrg
8801f05b35a2Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8802e0963edeSmrg# Free Software Foundation, Inc.
8803e0963edeSmrg#
8804e0963edeSmrg# This file is free software; the Free Software Foundation
8805e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8806e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8807e0963edeSmrg
8808f05b35a2Smrg# serial 6
8809e0963edeSmrg
8810f05b35a2Smrg# AM_MISSING_PROG(NAME, PROGRAM)
8811f05b35a2Smrg# ------------------------------
8812f05b35a2SmrgAC_DEFUN([AM_MISSING_PROG],
8813f05b35a2Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
8814f05b35a2Smrg$1=${$1-"${am_missing_run}$2"}
8815f05b35a2SmrgAC_SUBST($1)])
8816e0963edeSmrg
8817e0963edeSmrg
8818f05b35a2Smrg# AM_MISSING_HAS_RUN
8819f05b35a2Smrg# ------------------
8820f05b35a2Smrg# Define MISSING if not defined so far and test if it supports --run.
8821f05b35a2Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
8822f05b35a2SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
8823f05b35a2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8824f05b35a2SmrgAC_REQUIRE_AUX_FILE([missing])dnl
8825f05b35a2Smrgif test x"${MISSING+set}" != xset; then
8826f05b35a2Smrg  case $am_aux_dir in
8827f05b35a2Smrg  *\ * | *\	*)
8828f05b35a2Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8829f05b35a2Smrg  *)
8830f05b35a2Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8831f05b35a2Smrg  esac
8832f05b35a2Smrgfi
8833f05b35a2Smrg# Use eval to expand $SHELL
8834f05b35a2Smrgif eval "$MISSING --run true"; then
8835f05b35a2Smrg  am_missing_run="$MISSING --run "
8836e0963edeSmrgelse
8837f05b35a2Smrg  am_missing_run=
8838f05b35a2Smrg  AC_MSG_WARN([`missing' script is too old or missing])
8839e0963edeSmrgfi
8840e0963edeSmrg])
8841e0963edeSmrg
8842f05b35a2Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8843f05b35a2Smrg#
8844f05b35a2Smrg# This file is free software; the Free Software Foundation
8845f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8846f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8847e0963edeSmrg
8848f05b35a2Smrg# AM_PROG_MKDIR_P
8849f05b35a2Smrg# ---------------
8850f05b35a2Smrg# Check for `mkdir -p'.
8851f05b35a2SmrgAC_DEFUN([AM_PROG_MKDIR_P],
8852f05b35a2Smrg[AC_PREREQ([2.60])dnl
8853f05b35a2SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8854f05b35a2Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8855f05b35a2Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
8856f05b35a2Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8857f05b35a2Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8858f05b35a2Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
8859f05b35a2Smrgdnl adjustment using top_builddir (which is defined more often than
8860f05b35a2Smrgdnl MKDIR_P).
8861f05b35a2SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8862f05b35a2Smrgcase $mkdir_p in
8863f05b35a2Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
8864f05b35a2Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8865f05b35a2Smrgesac
8866e0963edeSmrg])
8867e0963edeSmrg
8868f05b35a2Smrg# Helper functions for option handling.                     -*- Autoconf -*-
8869e0963edeSmrg
8870f05b35a2Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8871f05b35a2Smrg#
8872f05b35a2Smrg# This file is free software; the Free Software Foundation
8873f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
8874f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
8875f05b35a2Smrg
8876f05b35a2Smrg# serial 4
8877f05b35a2Smrg
8878f05b35a2Smrg# _AM_MANGLE_OPTION(NAME)
8879f05b35a2Smrg# -----------------------
8880f05b35a2SmrgAC_DEFUN([_AM_MANGLE_OPTION],
8881f05b35a2Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8882f05b35a2Smrg
8883f05b35a2Smrg# _AM_SET_OPTION(NAME)
8884f05b35a2Smrg# ------------------------------
8885f05b35a2Smrg# Set option NAME.  Presently that only means defining a flag for this option.
8886f05b35a2SmrgAC_DEFUN([_AM_SET_OPTION],
8887f05b35a2Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8888f05b35a2Smrg
8889f05b35a2Smrg# _AM_SET_OPTIONS(OPTIONS)
8890f05b35a2Smrg# ----------------------------------
8891f05b35a2Smrg# OPTIONS is a space-separated list of Automake options.
8892f05b35a2SmrgAC_DEFUN([_AM_SET_OPTIONS],
8893f05b35a2Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8894e0963edeSmrg
8895f05b35a2Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8896f05b35a2Smrg# -------------------------------------------
8897f05b35a2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8898f05b35a2SmrgAC_DEFUN([_AM_IF_OPTION],
8899f05b35a2Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8900f05b35a2Smrg
8901f05b35a2Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8902e0963edeSmrg
8903f05b35a2Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8904e0963edeSmrg# Free Software Foundation, Inc.
8905e0963edeSmrg#
8906e0963edeSmrg# This file is free software; the Free Software Foundation
8907e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8908e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8909e0963edeSmrg
8910f05b35a2Smrg# serial 5
8911e0963edeSmrg
8912f05b35a2Smrg# AM_SANITY_CHECK
8913f05b35a2Smrg# ---------------
8914f05b35a2SmrgAC_DEFUN([AM_SANITY_CHECK],
8915f05b35a2Smrg[AC_MSG_CHECKING([whether build environment is sane])
8916f05b35a2Smrg# Just in case
8917f05b35a2Smrgsleep 1
8918f05b35a2Smrgecho timestamp > conftest.file
8919f05b35a2Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8920f05b35a2Smrg# name.  Accept space and tab only in the latter.
8921f05b35a2Smrgam_lf='
8922f05b35a2Smrg'
8923f05b35a2Smrgcase `pwd` in
8924f05b35a2Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8925f05b35a2Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8926f05b35a2Smrgesac
8927f05b35a2Smrgcase $srcdir in
8928f05b35a2Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8929f05b35a2Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8930f05b35a2Smrgesac
8931e0963edeSmrg
8932f05b35a2Smrg# Do `set' in a subshell so we don't clobber the current shell's
8933f05b35a2Smrg# arguments.  Must try -L first in case configure is actually a
8934f05b35a2Smrg# symlink; some systems play weird games with the mod time of symlinks
8935f05b35a2Smrg# (eg FreeBSD returns the mod time of the symlink's containing
8936f05b35a2Smrg# directory).
8937f05b35a2Smrgif (
8938f05b35a2Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8939f05b35a2Smrg   if test "$[*]" = "X"; then
8940f05b35a2Smrg      # -L didn't work.
8941f05b35a2Smrg      set X `ls -t "$srcdir/configure" conftest.file`
8942f05b35a2Smrg   fi
8943f05b35a2Smrg   rm -f conftest.file
8944f05b35a2Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8945f05b35a2Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8946e0963edeSmrg
8947f05b35a2Smrg      # If neither matched, then we have a broken ls.  This can happen
8948f05b35a2Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8949f05b35a2Smrg      # broken ls alias from the environment.  This has actually
8950f05b35a2Smrg      # happened.  Such a system could not be considered "sane".
8951f05b35a2Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8952f05b35a2Smrgalias in your environment])
8953f05b35a2Smrg   fi
8954e0963edeSmrg
8955f05b35a2Smrg   test "$[2]" = conftest.file
8956f05b35a2Smrg   )
8957f05b35a2Smrgthen
8958f05b35a2Smrg   # Ok.
8959f05b35a2Smrg   :
8960f05b35a2Smrgelse
8961f05b35a2Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
8962f05b35a2SmrgCheck your system clock])
8963f05b35a2Smrgfi
8964f05b35a2SmrgAC_MSG_RESULT(yes)])
8965f05b35a2Smrg
8966f05b35a2Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
8967e0963edeSmrg#
8968e0963edeSmrg# This file is free software; the Free Software Foundation
8969e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8970e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8971e0963edeSmrg
8972f05b35a2Smrg# serial 1
8973e0963edeSmrg
8974f05b35a2Smrg# AM_SILENT_RULES([DEFAULT])
8975f05b35a2Smrg# --------------------------
8976f05b35a2Smrg# Enable less verbose build rules; with the default set to DEFAULT
8977f05b35a2Smrg# (`yes' being less verbose, `no' or empty being verbose).
8978f05b35a2SmrgAC_DEFUN([AM_SILENT_RULES],
8979f05b35a2Smrg[AC_ARG_ENABLE([silent-rules],
8980f05b35a2Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8981f05b35a2Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8982f05b35a2Smrgcase $enable_silent_rules in
8983f05b35a2Smrgyes) AM_DEFAULT_VERBOSITY=0;;
8984f05b35a2Smrgno)  AM_DEFAULT_VERBOSITY=1;;
8985f05b35a2Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8986f05b35a2Smrgesac
8987f05b35a2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8988f05b35a2SmrgAM_BACKSLASH='\'
8989f05b35a2SmrgAC_SUBST([AM_BACKSLASH])dnl
8990f05b35a2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8991f05b35a2Smrg])
8992e0963edeSmrg
8993f05b35a2Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8994e0963edeSmrg#
8995e0963edeSmrg# This file is free software; the Free Software Foundation
8996e0963edeSmrg# gives unlimited permission to copy and/or distribute it,
8997e0963edeSmrg# with or without modifications, as long as this notice is preserved.
8998e0963edeSmrg
8999f05b35a2Smrg# AM_PROG_INSTALL_STRIP
9000f05b35a2Smrg# ---------------------
9001f05b35a2Smrg# One issue with vendor `install' (even GNU) is that you can't
9002f05b35a2Smrg# specify the program used to strip binaries.  This is especially
9003f05b35a2Smrg# annoying in cross-compiling environments, where the build's strip
9004f05b35a2Smrg# is unlikely to handle the host's binaries.
9005f05b35a2Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9006f05b35a2Smrg# always use install-sh in `make install-strip', and initialize
9007f05b35a2Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
9008f05b35a2SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9009f05b35a2Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9010f05b35a2Smrg# Installed binaries are usually stripped using `strip' when the user
9011f05b35a2Smrg# run `make install-strip'.  However `strip' might not be the right
9012f05b35a2Smrg# tool to use in cross-compilation environments, therefore Automake
9013f05b35a2Smrg# will honor the `STRIP' environment variable to overrule this program.
9014f05b35a2Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9015f05b35a2Smrgif test "$cross_compiling" != no; then
9016f05b35a2Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9017f05b35a2Smrgfi
9018f05b35a2SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9019f05b35a2SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9020e0963edeSmrg
9021f05b35a2Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9022f05b35a2Smrg#
9023f05b35a2Smrg# This file is free software; the Free Software Foundation
9024f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
9025f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
9026e0963edeSmrg
9027f05b35a2Smrg# serial 2
9028e0963edeSmrg
9029f05b35a2Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
9030f05b35a2Smrg# ---------------------------
9031f05b35a2Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9032f05b35a2Smrg# This macro is traced by Automake.
9033f05b35a2SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9034e0963edeSmrg
9035f05b35a2Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9036f05b35a2Smrg# ---------------------------
9037f05b35a2Smrg# Public sister of _AM_SUBST_NOTMAKE.
9038f05b35a2SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9039e0963edeSmrg
9040f05b35a2Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9041e0963edeSmrg
9042f05b35a2Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9043f05b35a2Smrg#
9044f05b35a2Smrg# This file is free software; the Free Software Foundation
9045f05b35a2Smrg# gives unlimited permission to copy and/or distribute it,
9046f05b35a2Smrg# with or without modifications, as long as this notice is preserved.
9047e0963edeSmrg
9048f05b35a2Smrg# serial 2
9049f05b35a2Smrg
9050f05b35a2Smrg# _AM_PROG_TAR(FORMAT)
9051f05b35a2Smrg# --------------------
9052f05b35a2Smrg# Check how to create a tarball in format FORMAT.
9053f05b35a2Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9054f05b35a2Smrg#
9055f05b35a2Smrg# Substitute a variable $(am__tar) that is a command
9056f05b35a2Smrg# writing to stdout a FORMAT-tarball containing the directory
9057f05b35a2Smrg# $tardir.
9058f05b35a2Smrg#     tardir=directory && $(am__tar) > result.tar
9059f05b35a2Smrg#
9060f05b35a2Smrg# Substitute a variable $(am__untar) that extract such
9061f05b35a2Smrg# a tarball read from stdin.
9062f05b35a2Smrg#     $(am__untar) < result.tar
9063f05b35a2SmrgAC_DEFUN([_AM_PROG_TAR],
9064f05b35a2Smrg[# Always define AMTAR for backward compatibility.
9065f05b35a2SmrgAM_MISSING_PROG([AMTAR], [tar])
9066f05b35a2Smrgm4_if([$1], [v7],
9067f05b35a2Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9068f05b35a2Smrg     [m4_case([$1], [ustar],, [pax],,
9069f05b35a2Smrg              [m4_fatal([Unknown tar format])])
9070f05b35a2SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9071f05b35a2Smrg# Loop over all known methods to create a tar archive until one works.
9072f05b35a2Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9073f05b35a2Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9074f05b35a2Smrg# Do not fold the above two line into one, because Tru64 sh and
9075f05b35a2Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9076f05b35a2Smrgfor _am_tool in $_am_tools
9077f05b35a2Smrgdo
9078f05b35a2Smrg  case $_am_tool in
9079f05b35a2Smrg  gnutar)
9080f05b35a2Smrg    for _am_tar in tar gnutar gtar;
9081f05b35a2Smrg    do
9082f05b35a2Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9083f05b35a2Smrg    done
9084f05b35a2Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9085f05b35a2Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9086f05b35a2Smrg    am__untar="$_am_tar -xf -"
9087f05b35a2Smrg    ;;
9088f05b35a2Smrg  plaintar)
9089f05b35a2Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9090f05b35a2Smrg    # ustar tarball either.
9091f05b35a2Smrg    (tar --version) >/dev/null 2>&1 && continue
9092f05b35a2Smrg    am__tar='tar chf - "$$tardir"'
9093f05b35a2Smrg    am__tar_='tar chf - "$tardir"'
9094f05b35a2Smrg    am__untar='tar xf -'
9095f05b35a2Smrg    ;;
9096f05b35a2Smrg  pax)
9097f05b35a2Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
9098f05b35a2Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
9099f05b35a2Smrg    am__untar='pax -r'
9100f05b35a2Smrg    ;;
9101f05b35a2Smrg  cpio)
9102f05b35a2Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9103f05b35a2Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9104f05b35a2Smrg    am__untar='cpio -i -H $1 -d'
9105f05b35a2Smrg    ;;
9106f05b35a2Smrg  none)
9107f05b35a2Smrg    am__tar=false
9108f05b35a2Smrg    am__tar_=false
9109f05b35a2Smrg    am__untar=false
9110f05b35a2Smrg    ;;
9111f05b35a2Smrg  esac
9112e0963edeSmrg
9113f05b35a2Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
9114f05b35a2Smrg  # and am__untar set.
9115f05b35a2Smrg  test -n "${am_cv_prog_tar_$1}" && break
9116e0963edeSmrg
9117f05b35a2Smrg  # tar/untar a dummy directory, and stop if the command works
9118f05b35a2Smrg  rm -rf conftest.dir
9119f05b35a2Smrg  mkdir conftest.dir
9120f05b35a2Smrg  echo GrepMe > conftest.dir/file
9121f05b35a2Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9122f05b35a2Smrg  rm -rf conftest.dir
9123f05b35a2Smrg  if test -s conftest.tar; then
9124f05b35a2Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
9125f05b35a2Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9126f05b35a2Smrg  fi
9127e0963edeSmrgdone
9128f05b35a2Smrgrm -rf conftest.dir
9129e0963edeSmrg
9130f05b35a2SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9131f05b35a2SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
9132f05b35a2SmrgAC_SUBST([am__tar])
9133f05b35a2SmrgAC_SUBST([am__untar])
9134f05b35a2Smrg]) # _AM_PROG_TAR
9135e0963edeSmrg
9136f05b35a2Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9137f05b35a2Smrgdnl
9138f05b35a2Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
9139f05b35a2Smrgdnl 
9140f05b35a2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
9141f05b35a2Smrgdnl copy of this software and associated documentation files (the
9142f05b35a2Smrgdnl "Software"), to deal in the Software without restriction, including
9143f05b35a2Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
9144f05b35a2Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
9145f05b35a2Smrgdnl to whom the Software is furnished to do so, provided that the above
9146f05b35a2Smrgdnl copyright notice(s) and this permission notice appear in all copies of
9147f05b35a2Smrgdnl the Software and that both the above copyright notice(s) and this
9148f05b35a2Smrgdnl permission notice appear in supporting documentation.
9149f05b35a2Smrgdnl
9150f05b35a2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9151f05b35a2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9152f05b35a2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
9153f05b35a2Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
9154f05b35a2Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
9155f05b35a2Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
9156f05b35a2Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
9157f05b35a2Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
9158f05b35a2Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9159f05b35a2Smrgdnl
9160f05b35a2Smrgdnl Except as contained in this notice, the name of a copyright holder
9161f05b35a2Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
9162f05b35a2Smrgdnl or other dealings in this Software without prior written authorization
9163f05b35a2Smrgdnl of the copyright holder.
9164e0963edeSmrg
9165f05b35a2Smrg# XORG_MACROS_VERSION(required-version)
9166f05b35a2Smrg# -------------------------------------
9167f05b35a2Smrg# Minimum version: 1.1.0
9168e0963edeSmrg#
9169f05b35a2Smrg# If you're using a macro added in Version 1.1 or newer, include this in
9170f05b35a2Smrg# your configure.ac with the minimum required version, such as:
9171f05b35a2Smrg# XORG_MACROS_VERSION(1.1)
9172f05b35a2Smrg#
9173f05b35a2Smrg# To ensure that this macro is defined, also add:
9174f05b35a2Smrg# m4_ifndef([XORG_MACROS_VERSION],
9175f05b35a2Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9176f05b35a2Smrg#
9177f05b35a2Smrg#
9178f05b35a2Smrg# See the "minimum version" comment for each macro you use to see what 
9179f05b35a2Smrg# version you require.
9180f05b35a2Smrgm4_defun([XORG_MACROS_VERSION],[
9181f05b35a2Smrgm4_define([vers_have], [1.3.0])
9182f05b35a2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9183f05b35a2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9184f05b35a2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
9185f05b35a2Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9186f05b35a2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
9187f05b35a2Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9188f05b35a2Smrgm4_undefine([vers_have])
9189f05b35a2Smrgm4_undefine([maj_have])
9190f05b35a2Smrgm4_undefine([maj_needed])
9191f05b35a2Smrg]) # XORG_MACROS_VERSION
9192e0963edeSmrg
9193f05b35a2Smrg# XORG_PROG_RAWCPP()
9194f05b35a2Smrg# ------------------
9195f05b35a2Smrg# Minimum version: 1.0.0
9196f05b35a2Smrg#
9197f05b35a2Smrg# Find cpp program and necessary flags for use in pre-processing text files
9198f05b35a2Smrg# such as man pages and config files
9199f05b35a2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
9200f05b35a2SmrgAC_REQUIRE([AC_PROG_CPP])
9201f05b35a2SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
9202f05b35a2Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9203e0963edeSmrg
9204f05b35a2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
9205f05b35a2Smrg# which is not the best choice for supporting other OS'es, but covers most
9206f05b35a2Smrg# of the ones we need for now.
9207f05b35a2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
9208f05b35a2SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
9209f05b35a2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9210f05b35a2Smrg	AC_MSG_RESULT([no])
9211e0963edeSmrgelse
9212f05b35a2Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9213f05b35a2Smrg		RAWCPPFLAGS=-undef
9214f05b35a2Smrg		AC_MSG_RESULT([yes])
9215f05b35a2Smrg	# under Cygwin unix is still defined even with -undef
9216f05b35a2Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9217f05b35a2Smrg		RAWCPPFLAGS="-undef -ansi"
9218f05b35a2Smrg		AC_MSG_RESULT([yes, with -ansi])
9219f05b35a2Smrg	else
9220f05b35a2Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9221f05b35a2Smrg	fi
9222e0963edeSmrgfi
9223f05b35a2Smrgrm -f conftest.$ac_ext
9224e0963edeSmrg
9225f05b35a2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
9226f05b35a2SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
9227f05b35a2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9228f05b35a2Smrg	AC_MSG_RESULT([no])
9229f05b35a2Smrgelse
9230f05b35a2Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9231f05b35a2Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9232f05b35a2Smrg		AC_MSG_RESULT([yes])
9233f05b35a2Smrg	else
9234f05b35a2Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9235f05b35a2Smrg	fi
9236f05b35a2Smrgfi
9237f05b35a2Smrgrm -f conftest.$ac_ext
9238f05b35a2SmrgAC_SUBST(RAWCPPFLAGS)
9239f05b35a2Smrg]) # XORG_PROG_RAWCPP
9240e0963edeSmrg
9241f05b35a2Smrg# XORG_MANPAGE_SECTIONS()
9242f05b35a2Smrg# -----------------------
9243f05b35a2Smrg# Minimum version: 1.0.0
9244e0963edeSmrg#
9245f05b35a2Smrg# Determine which sections man pages go in for the different man page types
9246f05b35a2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9247f05b35a2Smrg# Not sure if there's any better way than just hardcoding by OS name.
9248f05b35a2Smrg# Override default settings by setting environment variables
9249e0963edeSmrg
9250f05b35a2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
9251f05b35a2SmrgAC_REQUIRE([AC_CANONICAL_HOST])
9252e0963edeSmrg
9253f05b35a2Smrgif test x$APP_MAN_SUFFIX = x    ; then
9254f05b35a2Smrg    APP_MAN_SUFFIX=1
9255f05b35a2Smrgfi
9256f05b35a2Smrgif test x$APP_MAN_DIR = x    ; then
9257f05b35a2Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9258f05b35a2Smrgfi
9259e0963edeSmrg
9260f05b35a2Smrgif test x$LIB_MAN_SUFFIX = x    ; then
9261f05b35a2Smrg    LIB_MAN_SUFFIX=3
9262f05b35a2Smrgfi
9263f05b35a2Smrgif test x$LIB_MAN_DIR = x    ; then
9264f05b35a2Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9265f05b35a2Smrgfi
9266e0963edeSmrg
9267f05b35a2Smrgif test x$FILE_MAN_SUFFIX = x    ; then
9268f05b35a2Smrg    case $host_os in
9269f05b35a2Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
9270f05b35a2Smrg	*)		FILE_MAN_SUFFIX=5  ;;
9271f05b35a2Smrg    esac
9272f05b35a2Smrgfi
9273f05b35a2Smrgif test x$FILE_MAN_DIR = x    ; then
9274f05b35a2Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9275f05b35a2Smrgfi
9276e0963edeSmrg
9277f05b35a2Smrgif test x$MISC_MAN_SUFFIX = x    ; then
9278f05b35a2Smrg    case $host_os in
9279f05b35a2Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
9280f05b35a2Smrg	*)		MISC_MAN_SUFFIX=7  ;;
9281f05b35a2Smrg    esac
9282f05b35a2Smrgfi
9283f05b35a2Smrgif test x$MISC_MAN_DIR = x    ; then
9284f05b35a2Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9285f05b35a2Smrgfi
9286e0963edeSmrg
9287f05b35a2Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
9288f05b35a2Smrg    case $host_os in
9289f05b35a2Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
9290f05b35a2Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
9291f05b35a2Smrg    esac
9292f05b35a2Smrgfi
9293f05b35a2Smrgif test x$DRIVER_MAN_DIR = x    ; then
9294f05b35a2Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9295f05b35a2Smrgfi
9296e0963edeSmrg
9297f05b35a2Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
9298f05b35a2Smrg    case $host_os in
9299f05b35a2Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
9300f05b35a2Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
9301f05b35a2Smrg    esac
9302f05b35a2Smrgfi
9303f05b35a2Smrgif test x$ADMIN_MAN_DIR = x    ; then
9304f05b35a2Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9305f05b35a2Smrgfi
9306f05b35a2Smrg
9307f05b35a2Smrg
9308f05b35a2SmrgAC_SUBST([APP_MAN_SUFFIX])
9309f05b35a2SmrgAC_SUBST([LIB_MAN_SUFFIX])
9310f05b35a2SmrgAC_SUBST([FILE_MAN_SUFFIX])
9311f05b35a2SmrgAC_SUBST([MISC_MAN_SUFFIX])
9312f05b35a2SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
9313f05b35a2SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
9314f05b35a2SmrgAC_SUBST([APP_MAN_DIR])
9315f05b35a2SmrgAC_SUBST([LIB_MAN_DIR])
9316f05b35a2SmrgAC_SUBST([FILE_MAN_DIR])
9317f05b35a2SmrgAC_SUBST([MISC_MAN_DIR])
9318f05b35a2SmrgAC_SUBST([DRIVER_MAN_DIR])
9319f05b35a2SmrgAC_SUBST([ADMIN_MAN_DIR])
9320f05b35a2Smrg]) # XORG_MANPAGE_SECTIONS
9321f05b35a2Smrg
9322f05b35a2Smrg# XORG_CHECK_LINUXDOC
9323f05b35a2Smrg# -------------------
9324f05b35a2Smrg# Minimum version: 1.0.0
9325f05b35a2Smrg#
9326f05b35a2Smrg# Defines the variable MAKE_TEXT if the necessary tools and
9327f05b35a2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9328f05b35a2Smrg# Whether or not the necessary tools and files are found can be checked
9329f05b35a2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
9330f05b35a2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
9331f05b35a2Smrgif test x$XORG_SGML_PATH = x ; then
9332f05b35a2Smrg    XORG_SGML_PATH=$prefix/share/sgml
9333e0963edeSmrgfi
9334f05b35a2SmrgHAVE_DEFS_ENT=
9335f05b35a2Smrg
9336f05b35a2Smrgif test x"$cross_compiling" = x"yes" ; then
9337f05b35a2Smrg  HAVE_DEFS_ENT=no
9338f05b35a2Smrgelse
9339f05b35a2Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
9340e0963edeSmrgfi
9341e0963edeSmrg
9342f05b35a2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
9343f05b35a2SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
9344e0963edeSmrg
9345f05b35a2SmrgAC_MSG_CHECKING([Whether to build documentation])
9346e0963edeSmrg
9347f05b35a2Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
9348f05b35a2Smrg   BUILDDOC=yes
9349f05b35a2Smrgelse
9350f05b35a2Smrg   BUILDDOC=no
9351f05b35a2Smrgfi
9352e0963edeSmrg
9353f05b35a2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9354e0963edeSmrg
9355f05b35a2SmrgAC_MSG_RESULT([$BUILDDOC])
9356e0963edeSmrg
9357f05b35a2SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
9358f05b35a2Smrg
9359f05b35a2Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
9360f05b35a2Smrg   BUILDPDFDOC=yes
9361e0963edeSmrgelse
9362f05b35a2Smrg   BUILDPDFDOC=no
9363e0963edeSmrgfi
9364e0963edeSmrg
9365f05b35a2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9366e0963edeSmrg
9367f05b35a2SmrgAC_MSG_RESULT([$BUILDPDFDOC])
9368e0963edeSmrg
9369f05b35a2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
9370f05b35a2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9371f05b35a2SmrgMAKE_PDF="$PS2PDF"
9372f05b35a2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9373f05b35a2Smrg
9374f05b35a2SmrgAC_SUBST(MAKE_TEXT)
9375f05b35a2SmrgAC_SUBST(MAKE_PS)
9376f05b35a2SmrgAC_SUBST(MAKE_PDF)
9377f05b35a2SmrgAC_SUBST(MAKE_HTML)
9378f05b35a2Smrg]) # XORG_CHECK_LINUXDOC
9379e0963edeSmrg
9380f05b35a2Smrg# XORG_CHECK_DOCBOOK
9381f05b35a2Smrg# -------------------
9382f05b35a2Smrg# Minimum version: 1.0.0
9383e0963edeSmrg#
9384f05b35a2Smrg# Checks for the ability to build output formats from SGML DocBook source.
9385f05b35a2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9386f05b35a2Smrg# indicates whether the necessary tools and files are found and, if set,
9387f05b35a2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
9388f05b35a2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
9389f05b35a2Smrgif test x$XORG_SGML_PATH = x ; then
9390f05b35a2Smrg    XORG_SGML_PATH=$prefix/share/sgml
9391f05b35a2Smrgfi
9392f05b35a2SmrgHAVE_DEFS_ENT=
9393f05b35a2SmrgBUILDTXTDOC=no
9394f05b35a2SmrgBUILDPDFDOC=no
9395f05b35a2SmrgBUILDPSDOC=no
9396f05b35a2SmrgBUILDHTMLDOC=no
9397e0963edeSmrg
9398f05b35a2SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
9399e0963edeSmrg
9400f05b35a2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
9401f05b35a2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9402f05b35a2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
9403f05b35a2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9404e0963edeSmrg
9405f05b35a2SmrgAC_MSG_CHECKING([Whether to build text documentation])
9406f05b35a2Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
9407f05b35a2Smrg   test x$BUILD_TXTDOC != xno; then
9408f05b35a2Smrg	BUILDTXTDOC=yes
9409f05b35a2Smrgfi
9410f05b35a2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9411f05b35a2SmrgAC_MSG_RESULT([$BUILDTXTDOC])
9412e0963edeSmrg
9413f05b35a2SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
9414f05b35a2Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
9415f05b35a2Smrg   test x$BUILD_PDFDOC != xno; then
9416f05b35a2Smrg	BUILDPDFDOC=yes
9417f05b35a2Smrgfi
9418f05b35a2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9419f05b35a2SmrgAC_MSG_RESULT([$BUILDPDFDOC])
9420e0963edeSmrg
9421f05b35a2SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
9422f05b35a2Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
9423f05b35a2Smrg   test x$BUILD_PSDOC != xno; then
9424f05b35a2Smrg	BUILDPSDOC=yes
9425f05b35a2Smrgfi
9426f05b35a2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9427f05b35a2SmrgAC_MSG_RESULT([$BUILDPSDOC])
9428e0963edeSmrg
9429f05b35a2SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
9430f05b35a2Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
9431f05b35a2Smrg   test x$BUILD_HTMLDOC != xno; then
9432f05b35a2Smrg	BUILDHTMLDOC=yes
9433f05b35a2Smrgfi
9434f05b35a2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9435f05b35a2SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
9436e0963edeSmrg
9437f05b35a2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9438f05b35a2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9439f05b35a2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9440f05b35a2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9441f05b35a2Smrg
9442f05b35a2SmrgAC_SUBST(MAKE_TEXT)
9443f05b35a2SmrgAC_SUBST(MAKE_PS)
9444f05b35a2SmrgAC_SUBST(MAKE_PDF)
9445f05b35a2SmrgAC_SUBST(MAKE_HTML)
9446f05b35a2Smrg]) # XORG_CHECK_DOCBOOK
9447f05b35a2Smrg
9448f05b35a2Smrg# XORG_CHECK_MALLOC_ZERO
9449f05b35a2Smrg# ----------------------
9450f05b35a2Smrg# Minimum version: 1.0.0
9451e0963edeSmrg#
9452f05b35a2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
9453f05b35a2Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
9454f05b35a2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
9455f05b35a2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
9456f05b35a2SmrgAC_ARG_ENABLE(malloc0returnsnull,
9457f05b35a2Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
9458f05b35a2Smrg		       [malloc(0) returns NULL (default: auto)]),
9459f05b35a2Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
9460f05b35a2Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
9461e0963edeSmrg
9462f05b35a2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
9463f05b35a2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
9464f05b35a2Smrg	AC_RUN_IFELSE([
9465f05b35a2Smrgchar *malloc();
9466f05b35a2Smrgchar *realloc();
9467f05b35a2Smrgchar *calloc();
9468f05b35a2Smrgmain() {
9469f05b35a2Smrg    char *m0, *r0, *c0, *p;
9470f05b35a2Smrg    m0 = malloc(0);
9471f05b35a2Smrg    p = malloc(10);
9472f05b35a2Smrg    r0 = realloc(p,0);
9473f05b35a2Smrg    c0 = calloc(0);
9474f05b35a2Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
9475f05b35a2Smrg}],
9476f05b35a2Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
9477f05b35a2Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
9478f05b35a2Smrgfi
9479f05b35a2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
9480e0963edeSmrg
9481f05b35a2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
9482f05b35a2Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
9483f05b35a2Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
9484f05b35a2Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
9485f05b35a2Smrgelse
9486f05b35a2Smrg	MALLOC_ZERO_CFLAGS=""
9487f05b35a2Smrg	XMALLOC_ZERO_CFLAGS=""
9488f05b35a2Smrg	XTMALLOC_ZERO_CFLAGS=""
9489f05b35a2Smrgfi
9490e0963edeSmrg
9491f05b35a2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
9492f05b35a2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
9493f05b35a2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
9494f05b35a2Smrg]) # XORG_CHECK_MALLOC_ZERO
9495f05b35a2Smrg
9496f05b35a2Smrg# XORG_WITH_LINT()
9497f05b35a2Smrg# ----------------
9498f05b35a2Smrg# Minimum version: 1.1.0
9499f05b35a2Smrg#
9500f05b35a2Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
9501f05b35a2Smrg# is specified.   (Use --with-lint=sparse for sparse.)
9502f05b35a2Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
9503f05b35a2Smrg# Sets $LINT_FLAGS to flags to pass to source checker
9504f05b35a2Smrg# Sets LINT automake conditional if enabled (default: disabled)
9505f05b35a2Smrg#
9506f05b35a2SmrgAC_DEFUN([XORG_WITH_LINT],[
9507e0963edeSmrg
9508f05b35a2Smrg# Allow checking code with lint, sparse, etc.
9509f05b35a2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
9510f05b35a2Smrg		[Use a lint-style source code checker (default: disabled)])],
9511f05b35a2Smrg		[use_lint=$withval], [use_lint=no])
9512f05b35a2Smrgif test "x$use_lint" = "xyes" ; then
9513f05b35a2Smrg	LINT="lint"
9514e0963edeSmrgelse
9515f05b35a2Smrg	LINT="$use_lint"
9516f05b35a2Smrgfi
9517f05b35a2Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
9518f05b35a2Smrg    case $LINT in
9519f05b35a2Smrg	lint|*/lint)
9520f05b35a2Smrg	    case $host_os in
9521f05b35a2Smrg		solaris*)
9522f05b35a2Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
9523f05b35a2Smrg			;;
9524f05b35a2Smrg	    esac
9525f05b35a2Smrg	    ;;
9526f05b35a2Smrg    esac
9527e0963edeSmrgfi
9528e0963edeSmrg
9529f05b35a2SmrgAC_SUBST(LINT)
9530f05b35a2SmrgAC_SUBST(LINT_FLAGS)
9531f05b35a2SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
9532e0963edeSmrg
9533f05b35a2Smrg]) # XORG_WITH_LINT
9534e0963edeSmrg
9535f05b35a2Smrg# XORG_LINT_LIBRARY(LIBNAME)
9536f05b35a2Smrg# --------------------------
9537f05b35a2Smrg# Minimum version: 1.1.0
9538f05b35a2Smrg#
9539f05b35a2Smrg# Sets up flags for building lint libraries for checking programs that call
9540f05b35a2Smrg# functions in the library.
9541f05b35a2Smrg# Disabled by default, enable with --enable-lint-library
9542f05b35a2Smrg# Sets: 
9543f05b35a2Smrg#	@LINTLIB@		- name of lint library file to make
9544f05b35a2Smrg#	MAKE_LINT_LIB		- automake conditional
9545e0963edeSmrg#
9546e0963edeSmrg
9547f05b35a2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
9548f05b35a2SmrgAC_REQUIRE([XORG_WITH_LINT])
9549f05b35a2Smrg# Build lint "library" for more indepth checks of programs calling this library
9550f05b35a2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
9551f05b35a2Smrg	[Create lint library (default: disabled)])],
9552f05b35a2Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
9553f05b35a2Smrgif test "x$make_lint_lib" != "xno" ; then
9554f05b35a2Smrg	if test "x$LINT" = "xno" ; then
9555f05b35a2Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
9556f05b35a2Smrg	fi
9557f05b35a2Smrg	if test "x$make_lint_lib" = "xyes" ; then
9558f05b35a2Smrg		LINTLIB=llib-l$1.ln
9559f05b35a2Smrg	else
9560f05b35a2Smrg		LINTLIB=$make_lint_lib
9561f05b35a2Smrg	fi
9562f05b35a2Smrgfi
9563f05b35a2SmrgAC_SUBST(LINTLIB)
9564f05b35a2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
9565e0963edeSmrg
9566f05b35a2Smrg]) # XORG_LINT_LIBRARY
9567e0963edeSmrg
9568f05b35a2Smrg# XORG_CWARNFLAGS
9569f05b35a2Smrg# ---------------
9570f05b35a2Smrg# Minimum version: 1.2.0
9571e0963edeSmrg#
9572f05b35a2Smrg# Defines CWARNFLAGS to enable C compiler warnings.
9573f05b35a2Smrg#
9574f05b35a2SmrgAC_DEFUN([XORG_CWARNFLAGS], [
9575f05b35a2SmrgAC_REQUIRE([AC_PROG_CC])
9576f05b35a2Smrgif  test "x$GCC" = xyes ; then
9577f05b35a2Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
9578f05b35a2Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
9579f05b35a2Smrg-Wbad-function-cast"
9580f05b35a2Smrg    case `$CC -dumpversion` in
9581f05b35a2Smrg    3.4.* | 4.*)
9582f05b35a2Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
9583f05b35a2Smrg	;;
9584f05b35a2Smrg    esac
9585f05b35a2Smrgelse
9586f05b35a2Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9587f05b35a2Smrg    if test "x$SUNCC" = "xyes"; then
9588f05b35a2Smrg	CWARNFLAGS="-v"
9589f05b35a2Smrg    fi
9590f05b35a2Smrgfi
9591f05b35a2SmrgAC_SUBST(CWARNFLAGS)
9592f05b35a2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9593f05b35a2Smrg]) # XORG_CWARNFLAGS
9594e0963edeSmrg
9595f05b35a2Smrg# XORG_STRICT_OPTION
9596f05b35a2Smrg# -----------------------
9597f05b35a2Smrg# Minimum version: 1.3.0
9598f05b35a2Smrg#
9599f05b35a2Smrg# Add configure option to enable strict compilation
9600f05b35a2SmrgAC_DEFUN([XORG_STRICT_OPTION], [
9601f05b35a2SmrgAC_REQUIRE([AC_PROG_CC])
9602f05b35a2SmrgAC_REQUIRE([AC_PROG_CC_C99])
9603f05b35a2SmrgAC_REQUIRE([XORG_CWARNFLAGS])
9604f05b35a2Smrg
9605f05b35a2SmrgAC_ARG_ENABLE(strict-compilation,
9606f05b35a2Smrg			  AS_HELP_STRING([--enable-strict-compilation],
9607f05b35a2Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
9608f05b35a2Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
9609f05b35a2Smrgif test "x$STRICT_COMPILE" = "xyes"; then
9610f05b35a2Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9611f05b35a2Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
9612f05b35a2Smrg	if test "x$GCC" = xyes ; then
9613f05b35a2Smrg		STRICT_CFLAGS="-pedantic -Werror"
9614f05b35a2Smrg	elif test "x$SUNCC" = "xyes"; then
9615f05b35a2Smrg		STRICT_CFLAGS="-errwarn"
9616f05b35a2Smrg    elif test "x$INTELCC" = "xyes"; then
9617f05b35a2Smrg		STRICT_CFLAGS="-Werror"
9618f05b35a2Smrg	fi
9619f05b35a2Smrgfi
9620f05b35a2SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
9621f05b35a2SmrgAC_SUBST([CWARNFLAGS])
9622f05b35a2Smrg]) # XORG_STRICT_OPTION
9623e0963edeSmrg
9624f05b35a2Smrg# XORG_DEFAULT_OPTIONS
9625e0963edeSmrg# --------------------
9626f05b35a2Smrg# Minimum version: 1.3.0
9627e0963edeSmrg#
9628f05b35a2Smrg# Defines default options for X.Org modules.
9629e0963edeSmrg#
9630f05b35a2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
9631f05b35a2SmrgXORG_CWARNFLAGS
9632f05b35a2SmrgXORG_STRICT_OPTION
9633f05b35a2SmrgXORG_RELEASE_VERSION
9634f05b35a2SmrgXORG_CHANGELOG
9635f05b35a2SmrgXORG_MANPAGE_SECTIONS
9636f05b35a2Smrg]) # XORG_DEFAULT_OPTIONS
9637f05b35a2Smrgdnl Copyright 2005 Red Hat, Inc
9638f05b35a2Smrgdnl
9639f05b35a2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
9640f05b35a2Smrgdnl documentation for any purpose is hereby granted without fee, provided that
9641f05b35a2Smrgdnl the above copyright notice appear in all copies and that both that
9642f05b35a2Smrgdnl copyright notice and this permission notice appear in supporting
9643f05b35a2Smrgdnl documentation.
9644f05b35a2Smrgdnl
9645f05b35a2Smrgdnl The above copyright notice and this permission notice shall be included
9646f05b35a2Smrgdnl in all copies or substantial portions of the Software.
9647f05b35a2Smrgdnl
9648f05b35a2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9649f05b35a2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9650f05b35a2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9651f05b35a2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
9652f05b35a2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
9653f05b35a2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
9654f05b35a2Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
9655f05b35a2Smrgdnl
9656f05b35a2Smrgdnl Except as contained in this notice, the name of the copyright holders shall
9657f05b35a2Smrgdnl not be used in advertising or otherwise to promote the sale, use or
9658f05b35a2Smrgdnl other dealings in this Software without prior written authorization
9659f05b35a2Smrgdnl from the copyright holders.
9660f05b35a2Smrgdnl
9661e0963edeSmrg
9662f05b35a2Smrg# XORG_RELEASE_VERSION
9663f05b35a2Smrg# --------------------
9664f05b35a2Smrg# Adds --with/without-release-string and changes the PACKAGE and
9665f05b35a2Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
9666f05b35a2Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
9667f05b35a2Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
9668f05b35a2Smrg 
9669f05b35a2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
9670f05b35a2Smrg	AC_ARG_WITH(release-version,
9671f05b35a2Smrg			AS_HELP_STRING([--with-release-version=STRING],
9672f05b35a2Smrg				[Use release version string in package name]),
9673f05b35a2Smrg			[RELEASE_VERSION="$withval"],
9674f05b35a2Smrg			[RELEASE_VERSION=""])
9675f05b35a2Smrg	if test "x$RELEASE_VERSION" != "x"; then
9676f05b35a2Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
9677f05b35a2Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
9678f05b35a2Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
9679f05b35a2Smrg	fi
9680f05b35a2Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
9681f05b35a2Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
9682f05b35a2Smrg		[Major version of this package])
9683f05b35a2Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
9684f05b35a2Smrg	if test "x$PVM" = "x"; then
9685f05b35a2Smrg		PVM="0"
9686f05b35a2Smrg	fi
9687f05b35a2Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
9688f05b35a2Smrg		[$PVM],
9689f05b35a2Smrg		[Minor version of this package])
9690f05b35a2Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
9691f05b35a2Smrg	if test "x$PVP" = "x"; then
9692f05b35a2Smrg		PVP="0"
9693f05b35a2Smrg	fi
9694f05b35a2Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
9695f05b35a2Smrg		[$PVP],
9696f05b35a2Smrg		[Patch version of this package])
9697f05b35a2Smrg])
9698e0963edeSmrg
9699f05b35a2Smrg# XORG_CHANGELOG()
9700f05b35a2Smrg# ----------------
9701f05b35a2Smrg# Minimum version: 1.2.0
9702f05b35a2Smrg#
9703f05b35a2Smrg# Defines the variable CHANGELOG_CMD as the command to generate
9704f05b35a2Smrg# ChangeLog from git.
9705f05b35a2Smrg#
9706f05b35a2Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
9707f05b35a2Smrg#
9708f05b35a2SmrgAC_DEFUN([XORG_CHANGELOG], [
9709f05b35a2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
9710f05b35a2Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
9711f05b35a2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
9712f05b35a2SmrgAC_SUBST([CHANGELOG_CMD])
9713f05b35a2SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
9714f05b35a2Smrg]) # XORG_CHANGELOG
9715e0963edeSmrg
9716